Thursday, March 03, 2005

NMK Sound

One of the longest standing hurdles in MAME emulation is the sound in NMK/UPL games like Mustang, Vandyke, GunNail, etc.

Those games use an custom CPU, labelled "NMK004", to drive the sound. It is still not known what kind of CPU it is, what's known is that it has 8 or 16kB of internal ROM which cannot be directly dumped, and which contains the whole program. The external ROM only contains data.

I am convinced that that the program contained inside the NMK004 is either always the same, or it has minor difference to handle protection - but the format of the data in the external ROM is always the same.

What I'm trying to do at the moment is understand the format of the external data. I have started with the easy part, that is the Oki 6295 samples control. I have found the command table, and the mappingd from command to 6295 sample number. This allowed me to make the games play the correct samples at the correct time so e.g. in Vandyke I hear a "swoosh" when I swing the sword and a "uumph" when I jump. I still haven't understood all of the control bits, so it isn't perfect yet, but it's a good start for a night's work.

I'm hoping that other games that use a standard Z80 instead of the NMK004 will use similar logic to drive the sound (though I have already verified that they don't use the same data format as the NMK004).

Of course the YM2203 part will be much harder since it won't be just a matter of playinga few samples here and there, but I will have to fully understand how the data translates into music and drive the YM2203 accordingly. However there's nothing stopping it in principle, so I am confident that eventually I or someone else will be able to add full sound to these games.

6 comments:

Anonymous said...

Super, good luck and Kick Arse, from the chap in cornwall, uk

Ps. Also donated some cash to the project

Mauro_ said...

Nicola,

You gotta write a book about hardware hacking, custom chips analisys and decryption. It would be a best seller and you could finance yourself and the MAME dev.

Mauro_

Anonymous said...

Does this mean that your finished with the Seibu games?
anyway goodluck on the sound stuff.

Raiden99 said...

As far as i understood, Nicolas has finished working on Seibu Spi graphics decryption (and he did something really amazing !). Now it's up to Ville Linde to fix what's remaining regarding Raiden Fighters games emulation (sound, special effects ...). I'm just surprised that Ville's fix for raiden fighters jet has not been delivered in 0.93u2 (fix that prevent Raiden Fighters Jet to Hang when you try to play one more time or when you try to play when the demo has run).

Anyway, regading your last Stuff Nicola, even if i'm not especially concerned about it, it's allways a real pleasure to read your explanations.

Good luck !

biiiiiiiyyyyyyyaaaaaattttch said...

hmmmmm as you managed to get the spi games to work you can manage the sound issue too. I believe it. Peace

Mark said...

I like the idea of a book - or at least something to capture all that knowledge you've accumulated over the years.