This project is in Arduino, with heavy C additions. You can build it yourself if you want to add support for a different board, or try different settings.

First up - add support for your board in Arduino so you can compile & upload code. Then load all the Arcada libraries.

Download/clone the Arcada nofrendo port from here, rename the folder nofrendo_arcada and open it in Arduino.

Compilation Settings

You must have a few settings when you upload:

CPU Speed must be the highest possible, we like to overclock at 200MHz.  Optimizations must be -Ofast we don't recommend -funroll-loops as it doesn't seem to speed up play and it makes the build very large. TinyUSB is required in order to have the disk drive show up.

Configuration Settings

In emuapi.h there are a few settings you can make:

#elif defined(ADAFRUIT_PYGAMER_M4_EXPRESS) ||  defined(ADAFRUIT_PYBADGE_M4_EXPRESS)
  #define EMU_SCALEDOWN       2
  #define USE_FLASH_FOR_ROMSTORAGE       // slows it down, but bigger roms!
  #define DEFAULT_FLASH_ADDRESS (0x40000-2048)  // make sure this is after this programs memory, with unrolled loops we're at 222,192! we need a little more than 256KB since roms have 10 extra bytes
  #define USE_SAVEFILES
  #define USE_SRAM
#else 
  • EMU_SCALEDOWN is for taking the NES output and scaling it down to 160x128 display. Set to 1 if you have a 320x240 display!
  • USE_FLASH_FOR_ROMSTORAGE puts the ROM in FLASH, required for games over like 48KB, but if you want highest speed you can comment this out to use RAM/malloc.
  • DEFAULT_FLASH_ADDRESS - Where we start burning the ROM in. This must be after the bootlader (16KB) + arduino code (~200KB) The default is pretty good, don't mess unless you know the math.
  • USE_SAVEFILES is the save/restore support, takes a ton of RAM up when we save because it memory maps the whole file so comment out if you are running out of RAM
  • USE_SRAM turns on/off the SRAM implementation of the emulator. Keep on please.

If you have a board with an SD card, you can enable SD storage instead of QSPI, info on how to do that is here.

This guide was first published on Jun 09, 2019. It was last updated on Jun 09, 2019.

This page (Build in Arduino) was last updated on Oct 15, 2021.

Text editor powered by tinymce.