Add support for the NEO cartridge format in romtool#152
Open
floitsch wants to merge 1 commit into
Open
Conversation
The NEO format is a single-file cartridge format originally designed for the NeoSD flashcart, and also used by the Geolith emulator and the MiSTer Neo Geo core. A cartridge is built with: romtool -b cartridge -f neo -o game.neo <roms...> Game metadata (genre, NGH id, NeoSD screenshot id) can be passed as extra options, e.g. -x neo.genre=Shooter neo.ngh=041. The generated files are byte-identical to the ones produced by the reference converter (neosdconv).
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.
This adds a new cartridge output format to
romtool: the NEO format, a single-file cartridge format originally designed for the NeoSD flashcart, and also used by the Geolith emulator and the MiSTer Neo Geo core. Geolith does not load MAME-style zip romsets, so this makes ngdevkit games directly runnable there.Format
The file consists of a 4KiB header (magic
NEO+ version 1, region sizes, year/genre/screenshot/NGH metadata, game name and manufacturer), followed by the ROM data in P, S, M, V1, V2, C order:0xffto 64KiBUsage
The
-x neo.*extras are optional: genre defaults toOther, and NGH/screenshot default to 0, which is appropriate for homebrew (emulators only use the NGH id to apply per-game quirks for commercial titles).Validation
The generated files are byte-identical to the ones produced by the reference converter (neosdconv), tested with one and two C-ROM pairs, including region sizes that exercise the padding. The existing mame/gngeo/zip code paths are unchanged.
Note: neosdconv swaps the two megabytes of a 2MiB P-ROM because commercial MAME dumps store the banked megabyte first. This is deliberately not replicated here, since ngdevkit build outputs are already in linear 68k address order, consistent with how the MAME hash backend loads them.