Arduboy Crosscompiling

Par Sorunome, il y a 2 ans

So, some time ago I worked on cross-compilation of Arduboy games.

For those of you who don't know, Arduboy is an Arduino-based gaming system, similar to the Gamebuino Classic but with a different screen and with a different MCU. You can find their website here: https://arduboy.com/


Anyhow, here is a screenshot of cross-compiled Mystic Balloon:

And the settings page:

There are two display modes: fast and recordable. In fast display mode games should actually run at 60FPS.

Frameskip happens automatically if CPU usage goes up, and gets disabled again automatically if enough CPU time is free.


To cross-compile your own games you need to replace the Arduboy includes with the correct cross-compile library ones:

You will also need to remove everything that has to do with Serial.

If a game defines its own main function, comment that out / remove it.


On that note, use this at your own risk, some games may work better than others.

Derniers commentaires

avatar
gibs
il y a 2 mois

Hi :slight_smile:
Each time I it reach a sound stuff, it stops.
I have tried Mystic Balloon and I get the same errors:

C:\Users\gibs\AppData\Local\Temp\arduino_build_329581\libraries\Arduboy2\Gamebuino-ArduboyTones.cpp.o: In function `gb_updateTones()’:

C:\Users\gibs\Documents\ArduinoInstManuelle\libraries\Arduboy2\src/Gamebuino-ArduboyTones.cpp:245: multiple definition of `gb_updateTones()’

C:\Users\gibs\AppData\Local\Temp\arduino_build_329581\libraries\Arduboy2\Gamebuino-ArduboyPlaytune.cpp.o:C:\Users\gibs\Documents\ArduinoInstManuelle\libraries\Arduboy2\src/Gamebuino-ArduboyPlaytune.cpp:297: first defined here

C:\Users\gibs\AppData\Local\Temp\arduino_build_329581\libraries\Arduboy2\Gamebuino-ArduboyTones.cpp.o:C:\Users\gibs\Documents\ArduinoInstManuelle\libraries\Arduboy2\src/Gamebuino-ArduboyTones.cpp:171: multiple definition of `gb_tone_duration’

C:\Users\gibs\AppData\Local\Temp\arduino_build_329581\libraries\Arduboy2\Gamebuino-ArduboyPlaytune.cpp.o:C:\Users\gibs\Documents\ArduinoInstManuelle\libraries\Arduboy2\src/Gamebuino-ArduboyPlaytune.cpp:259: first defined here

C:\Users\gibs\AppData\Local\Temp\arduino_build_329581\libraries\Arduboy2\Gamebuino-ArduboyTones.cpp.o:C:\Users\gibs\Documents\ArduinoInstManuelle\libraries\Arduboy2\src/Gamebuino-ArduboyTones.cpp:61: multiple definition of `gb_handler’

C:\Users\gibs\AppData\Local\Temp\arduino_build_329581\libraries\Arduboy2\Gamebuino-ArduboyPlaytune.cpp.o:C:\Users\gibs\Documents\ArduinoInstManuelle\libraries\Arduboy2\src/Gamebuino-ArduboyPlaytune.cpp:100: first defined here

C:\Users\gibs\AppData\Local\Temp\arduino_build_329581\libraries\Arduboy2\Gamebuino-ArduboyTones.cpp.o:C:\Users\gibs\Documents\ArduinoInstManuelle\libraries\Arduboy2\src/Gamebuino-ArduboyTones.cpp:58: multiple definition of `gb_channel’

C:\Users\gibs\AppData\Local\Temp\arduino_build_329581\libraries\Arduboy2\Gamebuino-ArduboyPlaytune.cpp.o:C:\Users\gibs\Documents\ArduinoInstManuelle\libraries\Arduboy2\src/Gamebuino-ArduboyPlaytune.cpp:99: first defined here

collect2.exe: error: ld returned 1 exit status

Utilisation de la bibliothèque Arduboy2 version 5.2.1 dans le dossier: C:\Users\gibs\Documents\ArduinoInstManuelle\libraries\Arduboy2
Utilisation de la bibliothèque Gamebuino_META version 1.3.2 dans le dossier: C:\Users\gibs\Documents\ArduinoInstManuelle\libraries\Gamebuino_META
Utilisation de la bibliothèque SPI version 1.0 dans le dossier: C:\Users\gibs\AppData\Local\Arduino15\packages\gamebuino\hardware\samd\1.2.2\libraries\SPI
exit status 1
Erreur de compilation pour la carte Gamebuino Meta

Thanks for your help

avatar
gamebuino-admin
il y a 1 an
Author :  Sorunome

It doesn't sound like you installed the Gamebuino-EEPROM library! You can find it here: https://github.com/Gamebuino/Gamebuino-EEPROM

avatar
gamebuino-admin
il y a 1 an
Author :  Oasis

Hi I've followed the instructions but this message keeps popping up!!


Arduino: 1.8.8 (Windows Store 1.8.19.0) (Windows 10), Board: "Gamebuino Meta"

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware -hardware C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\tools-builder -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware\tools\avr -tools C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages -built-in-libraries C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\libraries -libraries C:\Users\ohuss\OneDrive\Documents\Arduino\libraries -fqbn=gamebuino:samd:gamebuino_meta_native -vid-pid=0X2341_0X804D -ide-version=10808 -build-path C:\Users\ohuss\AppData\Local\Temp\arduino_build_721986 -warnings=none -build-cache C:\Users\ohuss\AppData\Local\Temp\arduino_cache_989943 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -prefs=runtime.tools.arm-none-eabi-gcc-4.8.3-2014q1.path=C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -prefs=runtime.tools.CMSIS.path=C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\CMSIS\4.0.0-atmel -prefs=runtime.tools.CMSIS-4.0.0-atmel.path=C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\CMSIS\4.0.0-atmel -prefs=runtime.tools.bossac.path=C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\bossac\1.6.1-arduino -prefs=runtime.tools.bossac-1.6.1-arduino.path=C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\bossac\1.6.1-arduino -prefs=runtime.tools.openocd.path=C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\openocd\0.9.0-arduino -prefs=runtime.tools.openocd-0.9.0-arduino.path=C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\openocd\0.9.0-arduino -verbose C:\Users\ohuss\OneDrive\Desktop\ID-34-Mystic-Balloon-master\MYBL_AB\MYBL_AB.ino
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\arduino-builder -compile -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware -hardware C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\tools-builder -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware\tools\avr -tools C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages -built-in-libraries C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\libraries -libraries C:\Users\ohuss\OneDrive\Documents\Arduino\libraries -fqbn=gamebuino:samd:gamebuino_meta_native -vid-pid=0X2341_0X804D -ide-version=10808 -build-path C:\Users\ohuss\AppData\Local\Temp\arduino_build_721986 -warnings=none -build-cache C:\Users\ohuss\AppData\Local\Temp\arduino_cache_989943 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -prefs=runtime.tools.arm-none-eabi-gcc-4.8.3-2014q1.path=C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -prefs=runtime.tools.CMSIS.path=C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\CMSIS\4.0.0-atmel -prefs=runtime.tools.CMSIS-4.0.0-atmel.path=C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\CMSIS\4.0.0-atmel -prefs=runtime.tools.bossac.path=C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\bossac\1.6.1-arduino -prefs=runtime.tools.bossac-1.6.1-arduino.path=C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\bossac\1.6.1-arduino -prefs=runtime.tools.openocd.path=C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\openocd\0.9.0-arduino -prefs=runtime.tools.openocd-0.9.0-arduino.path=C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\openocd\0.9.0-arduino -verbose C:\Users\ohuss\OneDrive\Desktop\ID-34-Mystic-Balloon-master\MYBL_AB\MYBL_AB.ino
Using board 'gamebuino_meta_native' from platform in folder: C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\gamebuino\hardware\samd\1.2.1
Using core 'arduino' from platform in folder: C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\gamebuino\hardware\samd\1.2.1
Detecting libraries used...
"C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions "-D__SKETCH_NAME__="""MYBL_AB.ino"""" -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10808 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON "-DUSB_MANUFACTURER="Arduino LLC"" "-DUSB_PRODUCT="Arduino Zero"" "-IC:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\ohuss\AppData\Local\Temp\arduino_build_721986" "-IC:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\gamebuino\hardware\samd\1.2.1\cores\arduino" "-IC:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\gamebuino\hardware\samd\1.2.1\variants\gamebuino_meta" "C:\Users\ohuss\AppData\Local\Temp\arduino_build_721986\sketch\MYBL_AB.ino.cpp" -o nul
"C:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions "-D__SKETCH_NAME__="""MYBL_AB.ino"""" -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10808 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON "-DUSB_MANUFACTURER="Arduino LLC"" "-DUSB_PRODUCT="Arduino Zero"" "-IC:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\ohuss\AppData\Local\Temp\arduino_build_721986" "-IC:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\gamebuino\hardware\samd\1.2.1\cores\arduino" "-IC:\Users\ohuss\OneDrive\Documents\ArduinoData\packages\gamebuino\hardware\samd\1.2.1\variants\gamebuino_meta" "-IC:\Users\ohuss\OneDrive\Documents\Arduino\libraries\Gamebuino-Arduboy2-master\src" "C:\Users\ohuss\AppData\Local\Temp\arduino_build_721986\sketch\MYBL_AB.ino.cpp" -o nul
In file included from C:\Users\ohuss\AppData\Local\Temp\arduino_build_721986\sketch\globals.h:1:0,

                 from C:\Users\ohuss\OneDrive\Desktop\ID-34-Mystic-Balloon-master\MYBL_AB\MYBL_AB.ino:17:

C:\Users\ohuss\OneDrive\Documents\Arduino\libraries\Gamebuino-Arduboy2-master\src/Gamebuino-Arduboy2.h:11:30: fatal error: Gamebuino-EEPROM.h: No such file or directory

 #include <Gamebuino-EEPROM.h>

                              ^

compilation terminated.

Using library Gamebuino-Arduboy2-master at version 5.1.0 in folder: C:\Users\ohuss\OneDrive\Documents\Arduino\libraries\Gamebuino-Arduboy2-master
exit status 1
Error compiling for board Gamebuino Meta.