Sat Sep 13 07:04:11 EDT 2014

NMK004 ROM Dumping, Part 5: The Release

This post is the final part of a series. I highly recommend reading the previous articles, or this one may not make much sense: Part 1 Part 2 Part 3 Part 4.

The time has finally come for the release. This will be my final post on the NMK004 dump. As of this post, the patches have been added to MAME, and will definitely be included in the next stable release.

Let's start out with what everybody has been waiting for, the NMK004 internal ROM dump. You may obtain the dump here:

Next, I'm also releasing my dumping tools. This is split into two repositories, both hosted on bitbucket. OPNCAP is located at, and nmk004-trojan is located at

Lastly, I have a special secret extra bonus, but you'll have to put up with story time for a bit. A few months ago, I bought a Hacha Mecha Fighter PCB off of eBay. I knew it looked somewhat strange, being mostly EPROMs instead of mask ROMs, and lacking the NMK-110 protection MCU that's usually on the PCB. When I got it, I realized almost instantly that it had to have been a bootleg conversion from Thunder Dragon. After playing and comparing to PCB recordings of a genuine board, I knew that what I had was gold: an unprotected version of Hacha Mecha Fighter. I never bothered to dump it until I started on this project, but I felt now was the right time. So I dumped the program ROMs and sent them off to Haze to have them added to MAME. As expected, it works perfectly in MAME, and now it's possible for anyone to play it properly. In the future, I'd like to actually figure out the protection on Thunder Dragon and Hacha Mecha Fighter, but having unprotected versions works just as well.

You can get this ROM set from

Title screen of Hacha Mecha Fighter

The following MAMETesters bugs may now be closed:

Last but not least, I'd like to give some shout outs to those who made this all possible:

As a cute little aside, I've uploaded the work log I kept while doing this. Maybe somebody will find it interesting. There's a lot of content, lots of information on my thought process, a few diagrams and tables, stuff like that. Pretty unfiltered though, so don't be offended by anything I have written.

comment #0
2014-09-13 07:47:45 EDT
amazing job... Thank you !
comment #1
2014-09-13 09:06:11 EDT
Only one word, Thanks!

We even have the rotative sun in the bootleg of hachamf which was not the case in the original one due to protection issues.

Thanks also to Haze to helping you in hooking up your work in Mame.

comment #2
2014-09-13 09:23:39 EDT
Excellent work, my friend :) Excellent!
Felipe Sanches
comment #3
2014-09-13 10:51:59 EDT
Cool! Great work!

How likely do you think it is for the ROM contents to differ between the NMK004 chips used in different game PCBs ? I think they are all the same binary, but there's a chance they may differ, right?

How long does it take to perform the full dump once you have all dumping equipment setup?
comment #4
2014-09-13 11:59:34 EDT
Gracias por tu trabajo, es impresionante !!! ;)

Es asombroso volver a poder jugar a todos esos titulos de NMK gracias a ti.

Te escribo en Español porque he visto en tu foto esas botellas de agua que si mal no veo creo que son las que bebemos tambien en mi casa.

Un Abrazo Amigo.

comment #5
2014-09-13 14:23:14 EDT
Cool, thanks for the efforts, man.

According to the previously mentioned manual, sprite RAM is indeed DMA'd on each frame, adding 1 frame of sprite delay. However, as part of some investigation I've been doing the past year or so, I also knew that the sprite hardware was framebuffer-based, and double-buffered. This adds a second frame of sprite delay. Therefore, NMK PCBs have 2 frames of sprite delay. We have added this to the MAME driver to preserve accuracy.

Just wondering, have you compared the emulated games with your NMK PCB's in regards to this? Do both respond alike?
comment #6
2014-09-13 17:38:38 EDT
Just a quick question:
I wonder if your method can be used to dump the internal rom of the HD647180 CPU which is in charge of the sound in some of the Toaplan games. It is a Z180 CPU.

comment #7
2014-09-13 18:03:06 EDT
Felipe Sanches: I think it's pretty likely that all NMK004 chips have the same internal ROM. However, it's possible that they don't, and that's part of why I released my dumping tools. It took me a total of about 10 hours from when I started dumping to when it was done, which included a bunch of goofing off and bug fixing. So, not that long, relatively.

Extra: yeah, the PCBs don't have any sprite wobble, and I'd already figured out that the sprite hardware is double-buffered through some previous messing about. I think it's unlikely for them to not have 2 frames of sprite delay.

Sonic: My understanding is that the Toaplan games are entirely an internal ROM, with no external. Because of this, it would require a more involved process to trojan the ROM contents out. A possibility is to utilize clock/power glitching to get external code running, but I've not done too much research into it.

comment #8
2014-09-15 10:54:36 EDT
Incredible work there, thanks a lot for putting time in this. Your talent and knowledge really baffles the mind! Keep up the good work.
comment #9
2014-09-16 04:01:01 EDT
Nice NMK staff being done,thanks! do you have any plan the next challange work?
comment #10
2014-09-16 07:51:26 EDT
Great job.Thanks.
I wonder if those Dynax games with TLCS-90 MCU(16k internal roms)can be treated in the same way?
comment #11
2014-09-16 23:17:20 EDT
That was an amazing read! Great job indeed.
comment #12
2014-09-17 04:12:38 EDT
Awesome work, but I got a completely unrelated question.
Do you use any kind of software for your worklog/notes taking? It's perfectly formatted and I could use something like that!
comment #13
2014-09-17 04:47:03 EDT
jark: I'm somewhat attempting to work on a "ghetto" ICE for Motorola 68000 CPUs next, but I don't know if I've the necessary skills. So far it's been frustrating enough that I think I might not, but we'll see :)

bnathan: That's an interesting thought. I have a bunch of Dynax gamblers, I'll have to take a look. I doubt they can be dumped the same way, but it's something I might look into. Thanks for the heads up!

gromain: Nope, I just wrote that in a plain ol' text editor. I probably could have just used a private IRC channel for myself so that the IRC logger would take care of timestamps. I thought it'd break my workflow a bit though, so I just had it in another tab in notepad++ (I know, I know. I don't know of anything better though) and updated it whenever I had a thought.
comment #14
2014-09-17 05:47:10 EDT
I thought you add something to take care of the timestamp for you!
That's even more amazing then! (not as much as the rest of the work, but doc is an important part too!)
comment #15
2014-09-17 20:57:05 EDT
trap15,the NMK game tharrier has dip switch bugs that you can't set the lives,please check it,thanks!