Skip to content

v1.1.0 — seven games on the Fruit Jam

Choose a tag to compare

@jedgarpark jedgarpark released this 02 Sep 21:10
· 110 commits to main since this release

Seven classic arcade games running on the Adafruit Fruit Jam
(RP2350B) under the Arduino framework, built on the SAMP (Single Arcade
Machine Port) framework: a CPU-core axis, a game-machine axis, and a
board axis, composed into a thin per-game sketch.

All seven are confirmed playing on real hardware.

What's new since v1.0.0

  • Burger Time (Data East, 1982) — the seventh game, running at a flat
    60 fps with its sound checked by ear against a real cabinet.
  • ArcadeCPU_M6502, the project's fourth CPU family, verified against
    Klaus Dormann's 6502 functional and decimal test suites plus AllSuiteA.
    It adds an optional encrypted-opcode hook (for the DECO CPU-7) and an
    optional direct-read page table that was worth 2.1 ms of a 16.66 ms
    frame and applies to the other three cores too.
  • hal_video_take_starve_count() in the ArcadeHAL video contract. DVI
    starvation is a within-frame event, so it was invisible to the existing
    whole-frame timing instruments; three separate visual symptoms in the
    Burger Time port could not be measured until this existed. All seven
    sketches were rebuilt against it, which is why every binary here differs
    slightly from its v1.0.0 counterpart.
  • One known divergence is documented rather than fixed: a close-range
    pepper hit in Burger Time loses its "boing". See DEVNOTES.md #74.

Games

Game Hardware notes
Space Invaders The original port. i8080, "8080bw" board family, sample-based sound.
Lunar Rescue Same 8080bw family, plus one genuinely synthesized (bit-banged) audio channel.
Pac-Man First Z80 port and first tile+sprite video hardware, with fully synthesized Namco WSG sound.
Galaga First multi-CPU machine — three Z80s sharing RAM — plus a Namco 06XX/51XX/54XX I/O chain and the 05XX starfield.
Ms. Pac-Man Pac-Man hardware plus the aux daughterboard: first banked address space and first encrypted ROM decode.
Donkey Kong First Nintendo board, first DMA-driven sprites (i8257), first NMI, first resistor-network palette, and an emulated 8035 sound CPU.
Burger Time First 6502 — a DECO CPU-7, whose opcode fetches are encrypted, so the ROM cannot be pre-decrypted. First machine with no vblank interrupt (it polls a bit wired into a DIP-switch port), a palette held in RAM rather than a PROM, and a general-purpose AY-3-8910 PSG behind an emulated discrete filter network.

Flashing

Download the .uf2 for the game you want. Hold BOOT while connecting
USB (or hold BOOT and tap RESET) — a drive named RP2350 appears.
Copy the .uf2 onto it and the board reboots into the game.

These are RP2350 ARM-S builds (UF2 family ID 0xe48bff57) and will not
load on an RP2040 board.

You still need a microSD card with ROMs

These binaries contain no ROM data. Each game loads its ROM and sample
files from a microSD card at boot. See that game's README in the repository
for its exact /rom/ and /samples/ layout, and use legally-obtained
ROMs.

Format the card FAT32 with an MBR partition scheme — not GPT, which
macOS Disk Utility defaults to on "Erase". The bundled FatFs is configured
for simple single-partition mounting and does not understand a GPT disk's
protective MBR.

If the screen comes up solid red, that is either a missing/unreadable
SD card or a starved video pipeline. Check the card first.

Build details

Each binary is built at the optimization level its own sketch.yaml pins,
verified against the compiler command line. These are deliberately not
normalized to one level — Invaders is the only game that runs comfortably
at -O2; the other six need -O3 to fit the 16.67 ms frame budget.

Asset opt= Flash RAM
invaders_fruitjam.uf2 Optimize2 (-O2) 97,644 B 218,484 B
lrescue_fruitjam.uf2 Optimize3 (-O3) 111,220 B 352,992 B
pacman_fruitjam.uf2 Optimize3 (-O3) 92,788 B 249,992 B
mspacman_fruitjam.uf2 Optimize3 (-O3) 96,692 B 332,056 B
dkong_fruitjam.uf2 Optimize3 (-O3) 99,564 B 284,484 B
galaga_fruitjam.uf2 Optimize3 (-O3) 90,084 B 295,680 B
btime_fruitjam.uf2 Optimize3 (-O3) 96,252 B 263,480 B

All seven binaries were rebuilt from this tag in one pass with
--clean, so each one matches the source here exactly. (In v1.0.0 the
Burger Time binary was added after the fact and postdated its tag; that is
what this release exists to tidy up.)

Built with arduino-cli against Earle Philhower's rp2040 core. To build
from source, see the repository README — arduino-cli reads each sketch's
sketch.yaml automatically, so the right opt= level is applied without
passing --fqbn. The Arduino IDE often does not honour it; set
Tools > Optimize > Optimize3 by hand there.

DEVNOTES.md in the repository records every hardware bug found during
these ports and why each fix works — including why the optimization level
differs per game (problems #11 and #19).