Skip to content

m0boy 0.10.33 — an adaptive ROM cache sharing RAM with the stack, Sega save states on device

Choose a tag to compare

@r043v r043v released this 21 Oct 19:36
· 423 commits to main since this release

The ROM cache now shares its RAM with the C stack at run time, Game Boy profiles of games with cartridge RAM are right again, and Sega save states finally reach the consoles. Version française : README.fr.md.

  • Adaptive ROM cache (GBL_CACHE_DYN, GG_CACHE_DYN, META): a fixed part (.cachepool, the one the menu uses) plus blocks taken at boot from the free RAM under the stack (m0_stack_pool.h). The stack keeps priority: a refused native call gives a block back at once (down to the boot size); a block is only taken again after about 8 s without pressure and with 256 bytes of margin, from the dispatcher's entry point, so the split does not flicker.
  • 64-byte cache blocks by default on the META (Game Boy unified pool, Game Gear and Master System). Measured on a console, Super Mario Land 2 demo over 150 s: 10,985 frames with the fixed 128-byte cache, 13,326 with the adaptive 64-byte one; Ristar card loads 9,001 → 4,131.
  • Game Boy profiling fixed: the host harness (and metaview, m0bench) failed reads of cartridge RAM never written, so the games' writes were lost and games with saves ran wrong while profiling (Super Mario Land 2 demo: 948 → 6,744 covered instructions). Redo the sessions of games with cartridge RAM.
  • Sega save states on the consoles: since 0.10.29 meta_state.cpp built its empty stubs on device (it never saw sg_config.h), so the menu never showed the state lines; the host harness had them.
  • ESPboy 0.3.3: the Sega entry tables live in flash (Ristar no longer linked: +3.5 KiB of RAM over), and the continuation stack is 12 KiB in .bss instead of 6 KiB on the SDK's SYS stack.
  • compile.sh SOURCE=1: delivers the generated project, ready to build (pio run, the build's options written into platformio.ini, BUILD.txt), instead of the firmware; the extracted sources rebuild byte-identical firmwares.
  • META runtime 0.10.33, Pokitto 0.10.27, ESPboy 0.3.3: rebuild your games (compile.sh does it on the next run, UPDATE=1 when not interactive).
    The archive m0boy-0.10.33.zip is the repository tree at this tag (no ROMs, no built firmwares); it was validated by extracting it, building it with BUILD_TESTS=ON and running ctest.