

On a whim I decided to look into reverse engineering Kung Fu, a launch title for the NES released in 1985. I was surprised there wasn’t a lot available online already.
Ever since RE’ing Downland I was thinking about my next RE project. I wanted something I could complete in a reasonable amount of time with a reasonable amount of effort. I have huge ambitious dreams of RE’ing all my favorite games, but I have no time or patience for anything big.
The Kung Fu ROM is 40 kilobytes, 8kb of program and 32kb of graphics rom. I think that’s pretty much what I can realistically tackle.
I did find a YouTube video series by DandyLo about KungFu’s inner workings, including one about how it handles collisions.
One thing I’ve already found that surprised me is that the main player character is made out of background tiles, not sprites. If the game already uses sprite 0 to do the split screen, I wonder how it scrolls the middle part of the screen to move the player around.
I got a Ghidra project up and started the preliminary investigation. I’m also using Mesen and its debugging features. I’m not very far in. I’m at the point where it sets up RAM, the PPU, and namespaces and then goes into an infinite loop. After that I guess it handles everything through the vblank handler.
I’ve barely gotten off the ground but I’ll want to post up the work somewhere. I don’t actually know if I can post Ghidra projects on Github. At the very least I’ll post a disassembly listing.
I plan to interleave this work with other projects. I still have maybe a few more Downland Unearthed articles in me, and I’ll want to eventually tackle scrolling of really large areas in SMS Rally. The idea is that instead of intensely concentrating on just one project (and potentially burning out, again) switching between different ones will keep my interest and energy up. We’ll see!
Leave a Reply