Neo Geo Rom Editor



Unzip a Neo Geo game; There will be at least two C ROM files, such as 019-c1.rom and 019-c2.rom for League Bowling, or RBFF1C1.rom and RBFF1C2.rom for Real Bout Fatal Fury. Choose those two files in the file dialog above; Bigger games will have more C ROM file pairs. Real Bout Fatal Fury has C1, C2, C3, C4, C5, C6, C7 and C8 ROMs. Editing neo geo graphic roms If this is your first visit, be sure to check out the FAQ by clicking the link above. You will have to register before you can post or view most sections the forum. The Neo Geo Pocket is a monochrome handheld video game console released by SNK. It was the company's first handheld system and is part of the Neo Geo family. It debuted in Japan in late 1998, however never saw a western release, being exclusive to Japan and smaller Asian markets such as Hong.

TOPICS
1. Introduction
2. What is MML?
3. Neo-Geo sound hardware
4. ADK's MML format
a. general commands
b. note length commands
c. FM-specific commands
d. ADPCM & SSG commands
5. Conversion tools & downloads
6. Example videos
(hmmm, yes, I know it's a long title..)

Pre-technical gush:

Among the earliest Neo-Geo releases, the most graphically- and musically-impressive ones to me were by Alpha Denshi Corporation (ADK). ADK games often had large, rainbow-hued, lushly-shaded graphics (some were, yes, a bit too garish), while SNK-developed ones were still at a smaller scale, and had at times comedic art styles and forgettable music. True, 'Nam-1975 (by SNK) had an excellent musical score, but SNK's other first efforts on the Neo-Geo showed they had yet to come to grips with the hardware. Meanwhile, ADK's first effort on the system, Magician Lord, was so impressive that one wondered what SNK had been smoking; and, um, what ADK's guys had been smoking instead.

Well, the truth is that the Neo-Geo hardware was largely ADK's baby, developed within ADK and manufactured by SNK, similar to the Hudson-NEC arrangement for the PC-Engine. While much of the early Neo-Geo library has music and sound that is oh-so-'90s (like Fatal Fury or Super Spy), ADK's music -- with some exceptions -- can't really date itself, each production bettering the one previous. Magician Lord has synthy fantasy themes; Blue's Journey, steel-drum calypso themes; Crossed Swords, swords-and-sorcery orchestral hits paired with tribal drums; and Thrash Rally, some decent imitations of SEGA racing rock tunes.

Age of empires 2 definitive edition tips

The above-mentioned games have some of my favourite music on the entire system, so I wasn't all that surprised to see that the best ADK compositions tended to have a person named Yuka (or 'Yuuka') Watanabe as sole (or co-) composer. Hideki Yamamoto, Hiroaki Shimizu are two other names featured in 'lesser' ADK productions, save for the fabulous Thrash Rally. (Ninja Combat's music is rather shitty, so you can see what I mean about the latter two guys.)

ANYHOW. One day, I was looking around the games' sound ROMs in a hex editor when I was intrigued to discover that ADK's games had mostly unencoded MML data for music.

MML.. What?

Well, it's rather unknown in the West, but MML is a musical notation language for home computers that was pretty well-supported by Japanese companies in the '80s. It was also a major method of musical composition in the Japanese videogame world, kind of how .MODs / trackers were huge in the PC/Amiga music world.

So, finding MML notation in a Z80 ROM is almost like finding BASIC statements in a game ROM: you can read it rather easily and understand it with a bit of effort. So that's what I did: I disassembled the Z80 music ROM to Magician Lord and tried to figure out how the special MML statements used by the ADK interpreter mapped to 'modern' MML (though MML seems to be lacking in standardization and clear explanation these days as well..)

Neo Geo Rom Editor Emulator

Here's some meta-data about ADK's early music driver for the Neo-Geo:

NameDriver Ver.Driver DateNote Data Add.New CommandsComposeretc.
Magician Lord1.202/18/1990$0200Yuka Watanabe, Hideki Yamamoto, Hiroaki Shimizu
Sun Shine??
(if you have this game, e-mail me!) ^_^
Ninja Combat2.206/18/1990$0200g, o, q, t, uHideki Yamamoto, Hiroaki Shimizu 'Special Thanks' Y.Watanabe
Blue's Journey3.511/01/1990$0200Yuka Watanabe
Crossed Swords6.103/14/1991$2C00Yuka Watanabe
Thrash Rally6.507/05/1991$2C00Hideki Yamamoto, Hiroaki Shimizu
Ninja Commando7.312/03/1991$2E00Yuka Watanabefinal boss tune is an EL&P ripoff..

As you can see, the ADK MML driver has gone through several revisions, though when I compared version 1.2 with 7.3, it didn't seem drastically different or have that much more code. Perhaps someone else can pitch in and clear up what has changed through all these driver versions.

ADK developed their sound driver beyond those listed above: World Heroes and later had 128K of data with more bankswitching, but I may deal with those games some other day. It's also interesting to note that many of Alpha's pre-Neo-Geo games also have similarly unencoded MML data just sitting in the Z80 ROMs, waiting to be extracted and interpreted. I wouldn't be at all surprised if many other videogames, either for home consoles or in the arcade, had MML interpreters running the sound driver-- probably the note data would be uncompressed but encoded into gibberish somehow. Anyhow, it's an interesting avenue for someone to research.

A quick description of the Neo-Geo's sound hardware

Neo Geo Rom Editor

The Neo-Geo uses a YM2610 FM/ADPCM/SSG audio chip to produce all of its sound effects and music. This chip has 15 sound channels, separated into 4 FM, 3 PSG, 1 noise, 6 ADPCM-A, and 1 ADPCM-B channel. Each type of ADPCM sampling uses its own bus on the YM2610. The ADPCM-A sample channels produce a fixed 18.5 Khz sample rate at 12 bits from 4-bit data, and the ADPCM-B channel can produce a wide range of sample rates with 16-bit output and with sample looping.

The Neo-Geo can thus produce, with effort, sounds ranging from the simplest PSG beeps of Sega Master System-style square waves, all the way up to streamed minutes-long sampled soundtracks. Obviously, due to the cost of mask ROMs in the early 1990s, most games stuck to FM music tracks, with samples used for percussion, some instruments, voices, and sound effects. Starting in the mid-late-1990s, many Neo-Geo game soundtracks became simply long monophonic samples -- kinda losing the distinct character of the YM2610 hardware.

A Z80 CPU inside the Neo-Geo handles all of the YM2610 management, port writing, and music driver software. Although all 15 channels can be used simultaneously, the SSG (3 PSG, 1 noise) portion of the YM chip was mostly neglected & used sparingly in SNK's own driver. The ADK sound driver perhaps cannot even use SSG voices as part of the main music data (though as sound effects overlaid on top of the music, it is possible). And since Westerners tend to run away screaming from FM sound generation in general, homebrew Neo-Geo drivers gloss over the subject of FM, sticking to PSG and PCM for everything. So perhaps this page will help put the FM channels back into future music & homebrew creations on Neo-Geo hardware.

Neo geo rom bin

ADK's MML Format

Neo Geo Rom Editor Download

Since this music driver has to deal with various sound hardware channels (FM, PCM, SSG) and allow the composer to alter their parameters, instruments, and effects, the commands in ADK's MML driver are expanded compared to modern MML. The ADK driver basically contains 4 separate MML interpreters/engines each processing one of the FM, ADPCM-A, ADPCM-B, and SSG sound units. In the main chunk of note data, the interpreter works its way through 4 tracks of FM, 6 tracks of ADPCM, and then the final ADPCM-B track. It looks like the SSG tracks are handled separately by the sound effect portion of the Z80 code.

Some ADK MML commands have nothing to compare to in the modern version. While modern MML may be case-insensitive for notes and other commands, ADK's driver is very much CASE-SENSITIVE. Many extra commands use up the range of available lowercase and uppercase letters. Watch out!

In cases where MML commands take an extra parameter 'n', the ADK MML version is always a HEX byte, whereas the modern MML parameter is written in decimal in ASCII.

Geo

I want to note that this information is INCOMPLETE, so if anyone else with technical knowledge wants to figure it out in more detail, please do!!!

General MML commands
HEXsyntaxmodern MML equivalentmeaning
43-47,41,42C D E F G A Bc d e f g a bplays the specified note
52Rrrest
54Tntnset tempo
4FOnon+1set octave number *
3C<< ( or > )octave UP*
3E>> ( or < )octave DOWN*
51Qnqnquantize (quick/long keyoff)
56Vnvnvolume (can be 00-$7F for FM)
2E..extend note
23#+(after note) sharp
62b-' ' flat
2B+' quarter(?)-tone up
2D-' quarter(?)-tone down
6Fo' eighth(?)-tone up
71q' eighth(?)-tone down
74t' 3/8 (?)-tone up
75u' 3/8 (?)-tone down
5F_n^n (??)no change for duration ('NOP')
Looping Commands
5B[n[nouter loop start + counter
5D]]outer loop end
7B{n[ninner / single note loop start + counter
7D}]inner / single note loop end
28(looping track start
29)looping track end
24$$ (??)sequence loop start
25%; (??)sequence loop end
2F/restart track
7C|n(??)another loop start/break? pitch bend? non-functional?
2A*n(??)yet another?
FF;track end
* Warning: octave (and other) settings persist between loops in the ADK code, unlike in some modern MML players. Also, the meaning of '<' and '>' is sometimes backwards depending on the MML application!

Setting Note Lengths

The ADK MML player seems to ignore local note lengths (eg 'A16'), thus lengths are set (globally) prior to the note.

Neo Geo Rom Editor Software

Note Length Commands
HEXmodern MML equivalentHEXmodern MML equivalent
01l103l3
02l206l6
04l40Cl12
08l818l24
10l1630l48
20l3260l96
40l64C0l192

FM-Specific Commands

HEXsyntaxmodern MML equivalentmeaning
57Wnchange / reset timers?
70pntpn (??)pitch bend / envelope
64dhlbypass 'notes' and write 16-bit frequency value
65ennchange note length or timers?
3F?nFM Instrument no. (resets settings such as panning & volume)
66fnLFO frequency
76vnVibrato ('PM Sense')
61anTremolo ('AM Sense')
5AZnFM Release Rate (RR)
53SnPM sense (PMS) direct write
67gn?? Writes some YM reg.setting.
6Clleft channel only
73scentre channel
72rright channel only
3D=nZ80 music engine command #
ADPCM(A) TRACK COMMANDS
HEXsyntaxmodern MML equivalentmeaning
3F?nADPCM Instrument / Sample no.
55UnvnADPCM master volume (can be $00-$3F)
56Vnvnsample volume (can be 00-$1F)
58Xcdefgabstart sample playing
e,l,s,r,R,Q, {}()[]/|*$%, etc. seem the same as for FM channels.
ADPCM(B) TRACK COMMANDS
4BKn?? Turns on/off some YM reg.setting.
56Vnvnsample volume (can be 00-$FF)
SSG PSG special commands
6Ennset SSG Noise frequency
4ENstop SSG Noise???
6Dmn (?)set SSG (noise?) note
4DMstop SSG Note???
50Pnset PSG note

Tool Downloads & Links


ADK <-> MML Converters & Z80 Project Example<- The Useful Stuff is Here! <- A couple conversion tools with (poor) C source, and a Z80 project file for WLA DX that injects MML-converted music back into Magician Lord's Z80 ROM (sold separately). You can test your own composition in M1 ((or in MAME) if you can edit CRC32/SHA expectations) as the 1st stage music.
Disassembly of Magician Lord sound driverI try to figure out what the Z80 code is even doing. Hopefully this will get you started on your own disassembly or reverse-engineering effort.
link: Visual MML PlayerSomething that will help you quickly get MML note data playing. Somewhat idiosyncratic, but is there anything better out there?
link: YM2610 Reference PageThis is quite a good page with descriptions of most/all the YM registers and ports, etc.

Editor

Example Videos

Editor
All FM instrumentsI play all the instrument numbers in Magician Lord's music driver in 3 notes each: C4,G3,C3. A text file with my vague naming of these instruments is HERE.
All ADPCM-A samplesI play all the samples in Magician Lord's ADPCM-A format. ADPCM-A samples are 12-bit but have a fixed pitch / sampling rate.
All ADPCM-B samplesI play all the samples in Magician Lord's ADPCM-B format. ADPCM-B samples are 16-bit and can be played at a variable pitch, so again it's the 3 notes of C4,G3,C3.
Example of extracted MML note dataOnce you use ADKtoMML on a Neo-Geo sound ROM, it'll create dozens of MML text files. You can then copy & paste the notes in these files into any MML editor. For ease of use, I use the online Visual MML Player. This player generates only square waves, but it does the job of previewing the songs. Anyway, here are some example recordings from the VMML player.
Example of an original(.?) song in MML running on the ADK driverPlaying around with the original soundtracks from ADK games is fine, but the ultimate goal is probably putting your own compositions into a Neo-Geo sound driver! So, here's an example of an arrangement that I made. I took a friend's PC-Engine arrangement of Big Blue from F-Zero, and converted it to run in Magician Lord's sound driver -- trying to preserve the same early 1990 feeling of the instruments in Magician Lord.

Neo Geo Rom Editor Gratis

<-- BACK to MAIN | e-Mail Chris!