Repository navigation
Neo Geo CD port onto upstream's Neo Geo refactor - #346
Merged
Merged
Conversation
added 4 commits
November 6, 2026 17:21
CD memory/state port compiles and passes tests/ngcd (2835/0), and the desktop build passes for every core, but the device clears it: Neo Geo AES renders corrupted graphics and Neo Geo CD shows no picture. Upstream's refactored media path (mia/medium/neo-geo.cpp plus the new board classes) expects Neo Geo ROM-region data that this ares snapshot's Arcade.bml does not carry for most carts (only BIOS lists), so the assembled ROMs are wrong; Phobos's medium did its own assembly/decryption on top of the old boards. Kept for reference, not for merge.
…, diagnostics Progress on the port: use Phobos's global scheduler (upstream's per-core scheduler refactor was not merged into Phobos; the local Scheduler shadowed it and left the Z80/other threads unscheduled - AES carts now boot). Restore the CD interrupt level swap (timer -> vector 1, vblank -> vector 2) that upstream's CPU::main lacks, and take upstream's acknowledge semantics (writing a 1 sets the pending flag; a 0 does not clear it). Neo Geo CD still stops early in its BIOS: no vblank IRQ is delivered and the Z80 idles at PC 0x138 with communication.output 0, so the next step is to port the rest of upstream's LSPC interrupt model and trace the CD Z80 handshake. Contains temporary android logging throughout ares/ng and mia/medium/neo-geo.cpp.
Take upstream ares's Neo Geo media/board refactor (Arcade.bml assembly plus runtime cartridge decryption) and port Phobos's Neo Geo CD onto it: CDD/CDC/DMA, CD sprite and fix-layer decode, upload registers and the CD save format run on the new system/cartridge API, with upstream's uPD4990A RTC, DIP switches and arcade controls. The Neo Geo core keeps Phobos's single global scheduler: upstream's per-core Scheduler only exists in the cores migrated with it, so a local instance left the Z80 and the other threads unscheduled and the CD BIOS hung waiting for the sound handshake. CD interrupts are wired the way the CD BIOS expects (vblank on vector 2, timer on vector 1, a level-triggered VBL and set-only REG_IRQACK pending flags); non-CD keeps the old behaviour. Verified on the RP6: AES (Alpha Mission II, Garou) and Neo Geo CD (Real Bout Fatal Fury, CHD to title menu) both run at 59.2 fps. Host: tests/ngcd 2835/0, tests/psp 675 groups/0, tests/psp/ares 423/0, desktop CMake build, 688 Android unit tests. The Arcade database test now expects ares's full Arcade list instead of the old 18-game one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finishes the Neo Geo half of the ares merge that PR #344 left deferred.
Upstream ares moved Neo Geo ROM assembly into
mia(Arcade.bml) and decryption/protection into runtime cartridge boards. After the merge Phobos's old medium still looked for the deletedNeo Geo.bml, so AES/MVS did not load on a clean tree (the phone only worked because of an old database in its files directory, now fixed by #345).This takes upstream's medium and board set (rom/cmc/sma/pvc/pcm2/k2k2/fatfury2/kof98/mslugx/jockey-gp) and ports Phobos's Neo Geo CD onto the new system/cartridge API: CDD/CDC/DMA, CD sprite and fix-layer decode, upload registers, CD state format, plus upstream's uPD4990A RTC, shared DIP switches and arcade controls.
Two non-obvious fixes were needed:
Scheduler. Upstream's per-coreScheduleronly exists in the cores migrated with it; a local instance shadows the global one and leaves the Z80 and other threads unscheduled, so the CD BIOS hung waiting for the sound handshake.REG_IRQACKsets pending flags on a 1 and leaves them alone on a 0. Non-CD keeps the previous model.Verified on the RP6: AES Alpha Mission II and Garou - Mark of the Wolves boot and render at 59.2 fps (Garou exercises the new runtime decryption); Neo Geo CD Real Bout Fatal Fury loads from CHD through
NOW LOADINGto the title menu at 59.2 fps.Host:
tests/ngcd2835 checks / 0 failures,tests/psp675 groups / 0,tests/psp/ares423 / 0, desktop all-core CMake build, 688 Android unit tests. The Arcade-database art test now expects ares's full Arcade list instead of the old 18-game one.Limits: pad input beyond the AES coin counter was not verified end to end; the controller code is unchanged from master, so Neo Geo pad mapping stays a separate follow-up. CD saves keep the shipped
v136format.