I made good progress in the port of the Arduboy library for the ARM architecture !
I added a decoupling layer between the library and the functions specific to a platform. For each platform, the following functions must be defined:
- void start(), to init all the peripheral
- long getTime(), for the frame management
- void drawScreen(const unsigned char *image), for the display
- uint8_t getInput(), for the buttons
- (The sound and the EEPROM are not yet implemented but will follow the same logic)
This makes it easy to change platforms while keeping the same code base. I tested my code on a NRF52 devkit (which will be the final processor) and a STM32F7 devkit. The code is based on the MBED platform.
Since it is no longer code for Arduino, games must be modified slightly to be compiled.
The next step is to implement a bootloader that allows you to change games via BLE with a smartphone. It will also allow you to connect multiple devices together for multiplayer.
At the same time, I will start designing a new PCB based on an NRF51 module (https://www.seeedstudio.com/MDBT40P%C2%A0-%C2%A0nRF51822%C2%A0based%C2%A0BLE%C2%A0module-p-2503.html) that will be easy to mount.