Running Lua on a tiny console from 2001
2 days ago
- #Homebrew
- #Nelua
- #Pokemon Mini
- The Pokemon Mini is a small, underpowered console released in 2001 with 4KB of RAM and a black-and-white screen.
- The homebrew community for the Pokemon Mini is active, with emulators, a C SDK, and assemblers/linkers available.
- The author's goal was to run Lua code on the Pokemon Mini by compiling Lua to C using Nelua.
- Initial attempts failed due to syntax errors from C99 to C89 incompatibility with the Pokemon Mini SDK.
- A C99 to C89 converter was found, but manual adjustments and a custom PowerShell script were needed for successful compilation.
- Further adjustments were required to correctly place the 'NINTENDO' string and reserve memory for hardware registers.
- Helper functions for hardware registers (e.g., set_pixel, get_pixel) were written to facilitate Lua usage.
- The final library works on both emulators and physical devices, and the author plans to use it for game development.