I was thinking that the Pokitto SD loader could be quite easily to be improved to support the Python script file (*.py) loading
- When e.g. the “mygame.py” file is selected in the loader it would search for the “python.bin” file in the SD card and would flash that instead
- Before flashing it would write the string “mygame.py” to EEPROM (or in a file in SD?)
- When Python.bin is started it gets the name of the script from EEPROM and imports the “mygame.py” file from SD.
Of course, compared to the frozen python files in ROM, there are more memory limitations for the scripts as we can use RAM only. But it would be suitable for simple games and programs that e.g. control the PEX pins (e.g. “Robot Car” ). In the “Python.bin” ROM image there could be included some example graphics and libraries (like PyGame based Sprite classes I am using in the Mars Attack game).
Edit: To improve the loader even further: it could recognize if the Python.bin is already flashed to the device and do not flash it again. It just updates EEPROM and restarts the device. That way you can load consecutive Python games very quickly. The recognition could be based some fixed ROM memory address where the Python.bin has some ID.