Page 1 of 1
Starting a Disassembly Project
Posted: Sun Sep 28, 2014 10:08 am
by KW_455
Hi!
I'm looking for a small 16/8KB game that I can reverse engineer into commented compilable sourcecode - just to see and learn how they made games back in the day. The problem is that I don't want to redo a game that has already been disassembled. I have found disassemblies (or parts of) of at least Metroid, SMB1, SMB3, Zelda 1 online; has anyone made a list of all disassembled commercial games?
The one I've had in mind at first is "Ice Climber", but perhaps someone has already done this game though I have not found it online? Other games that could be of interest include, but are not limited to, "Pinball", "Excitebike", "Donkey Kong 1/Jr./3", "Balloon Fight", "Golf", "Pac Man", "Sky Destroyer", "Ikki", "Macross".
Which would be the best candidate that hasn't been disassembled before?
Re: Starting a Disassembly Project
Posted: Sun Sep 28, 2014 10:30 am
by Prime
http://www.thealmightyguru.com/Games/Ha ... gory:Games
That might help you get started about your question I've seen Excite bike,Donkey Kong among the rest of the games that you listed as known.
Re: Starting a Disassembly Project
Posted: Sun Sep 28, 2014 12:15 pm
by lidnariq
Bisqwit's
nescom's clever-disasm does a really nice job with most simple games.
But it doesn't add any documentation, so you'll still have to figure out what's going on.
Re: Starting a Disassembly Project
Posted: Sun Sep 28, 2014 12:27 pm
by Kasumi
There's also
nesrevplus that does a pretty decent job of small roms. Not sure if it's better or worse than nescom, but more options are always nice. What game you should do is really up to you.
Edit: Here's Donkey Kong:
http://www.romhacking.net/documents/540/
I'd go for "Sky Destroyer", "Ikki" or "Macross", just because I've never even heard of those games. Games like Ice Climber/Balloon Fight/The Donkey Kong Family, I'd be really surprised if they haven't been done.
Re: Starting a Disassembly Project
Posted: Sun Oct 05, 2014 2:08 pm
by Prime
KW_455
I've all the logic for Super Arabian commented and just about all of Rainbow Islands logic completed(as I'm not interested in anything else besides the logic I've not completed the entire games)your welcome to these if you want.As neither of these games were on your list I assume your not interested.
Re: Starting a Disassembly Project
Posted: Wed Oct 08, 2014 10:36 am
by KW_455
Thanks for your suggestions! I still haven't found any hint that Ice Climber have been disassembled into readable code. This game was the first game I owned back in the day, I know most about it and have the closest "bond" to it of all the 16+8KB games, making it the game of choice for this project, even though it seems to be one of the most "complicated" of the simple NES games. I also realised that the Famicom version of Galaxian was a mere 8+8KB cartridge, but then found out that this games was already reversed engineered by you, lidarniq, unfortunately

. The two disassemblers will certanly prove useful in this project, though I will mainly use my own combined emulator/debugger/logger/editor to take the game apart while running it.
Prime, have you posted Super Arabian/Rainbow Island somewhere for us to see?
Re: Starting a Disassembly Project
Posted: Wed Oct 08, 2014 7:14 pm
by Memblers
Most of Nintendo's earliest NES games have an arcade version, VS Unisystem/Dualsystem. They're harder than the NES versions, and often have extra screens and music. VS Excitebike and VS Duck Hunt have bonus levels, VS Ice Climber has a dual-system version. Building an NES version though would require changing the palette, and changing the controls a little bit. It's not simpler, but maybe it would be interesting.
Re: Starting a Disassembly Project
Posted: Wed Oct 08, 2014 7:40 pm
by lidnariq
Yeah, complete disassemblies of
any of
those would
be nice
to get more complete porting kits (between all 7 different 60Hz PPUs)...
Re: Starting a Disassembly Project
Posted: Fri Oct 17, 2014 2:13 pm
by KW_455
I've decided to go with Balloon Fight; seems to be a little bit less code and more data than Ice Climber according to my logger, but still a good game I played back in the day. So, which version should I decide to focus on? US/EUR/JAP? The US/EUR version differs only by two bytes, both in the NMI routine:
Code: Select all
European:
$C0D6 A2 08: ldx #$08
$C0D8 A0 10: ldy #$10
US:
$C0D6 A2 04: ldx #$04
$C0D8 A0 C6: ldy #$C6
while, just by comparing at a glance, the Japanese & US version differ even at the reset vector, with the US version waiting for the PPU to stabilize a bit longer:
Code: Select all
US:
_Reset $C000 A9 00: lda #$00
$C002 8D 00 20: sta $2000
$C005 8D 01 20: sta $2001
- $C008 AD 02 20: lda $2002
$C00B 10 FB: bpl - ; $C008
- $C00D AD 02 20: lda $2002
$C010 30 FB: bmi - ; $C00D
- $C012 AD 02 20: lda $2002
$C015 10 FB: bpl - ; $C012
$C017 78: sei
$C018 D8: cld
__________________________________________
Japanese:
_Reset $C000 A9 00: lda #$00
$C002 8D 00 20: sta $2000
$C005 8D 01 20: sta $2001
- $C008 AD 02 20: lda $2002
$C00B 10 FB: bpl - ; $C008
$C00D 78: sei
$C00E D8: cld
which also brings up my second question: Why isn't the SEI CLD combo the first instructions, like the rest of the games I've looked at? And, more importantly, why is the CLD always present when the BCD-unit isn't even there in the Richo 2A03 core? Is it just a precaution if they ever would have produced a NES with a different 6502 CPU present?
(As a side note, the VS Balloon Fight two player mode seems to require a second screen, so there will be a lot of redesign work to be done to transform VS Balloon Fight into a playable NES game - perhaps some split screen effect can be used to make both players have their part of the screen. Changing the VS PPU requirments would be easier though, I guess.)
Re: Starting a Disassembly Project
Posted: Fri Oct 17, 2014 2:30 pm
by tepples
KW_455 wrote:I've decided to go with Balloon Fight; seems to be a little bit less code and more data than Ice Climber according to my logger, but still a good game I played back in the day. So, which version should I decide to focus on? US/EUR/JAP? The US/EUR version differs only by two bytes, both in the NMI routine:
Code: Select all
European:
$C0D6 A2 08: ldx #$08
$C0D8 A0 10: ldy #$10
US:
$C0D6 A2 04: ldx #$04
$C0D8 A0 C6: ldy #$C6
Does that precede a big spin wait loop? If so, that might be the loop before the scroll split in Balloon Trip. Before sprite 0 was fully figured out, games needed to use constant-timed NMI handlers for scroll splits. This means you'll want to use the NTSC version on a Dendy, whose longer post-render period (51 lines instead of 1) is tuned for compatibility with constant-timed NMI handlers and cycle-counting interval timers in mappers.
while, just by comparing at a glance, the Japanese & US version differ even at the reset vector, with the US version waiting for the PPU to stabilize a bit longer
Reason: The front-loader's PPU is connected to the reset line, and writes to most registers don't work until the PPU has completed a frame.
which also brings up my second question: Why isn't the SEI CLD combo the first instructions, like the rest of the games I've looked at? And, more importantly, why is the CLD always present when the BCD-unit isn't even there in the Richo 2A03 core? Is it just a precaution if they ever would have produced a NES with a different 6502 CPU present?
That and perhaps early debugger hardware had an actual MOS 6502. I seem to remember certain Famicom prototypes being built as a "cage" of boards full of discrete logic.
Re: Starting a Disassembly Project
Posted: Fri Oct 17, 2014 6:20 pm
by strat
If you plan on publishing the disasm, it's a lot more helpful to create a data format guide than to write comments like "add highbyte of x position and store" (not an actual quote, just something that captures the feel of some disasm comments I don't find very useful). This is part of my notes for Balloon Kid (GB):
Code: Select all
character animation frame:
b0: # of sprite segments used by this frame
b1...bn(b0*3)
b1: V---YYYY
V: vertical flip;
Y: offset to draw segment down from character y pos
b2: FP--XXXX
F: x flip flag;
P: palette;
X: offset to draw segment right from character x pos
b3: tile index
Looking at this chart and knowing how sprites work on GB, you should be able to read the routine at 0x188F-0x1A14, which draws the animation frame or what many would call a metasprite, and find where these bytes are acted on. One really nice thing Doppelganger did in his disasm of SMB was a detailed listing of each code routine and the purpose of each ram byte/array.
Re: Starting a Disassembly Project
Posted: Fri Oct 17, 2014 7:27 pm
by Memblers
KW_455 wrote:
(As a side note, the VS Balloon Fight two player mode seems to require a second screen, so there will be a lot of redesign work to be done to transform VS Balloon Fight into a playable NES game - perhaps some split screen effect can be used to make both players have their part of the screen. Changing the VS PPU requirments would be easier though, I guess.)
You probably know already, but to be clear, the VS board has 2 complete systems. They can run 2 different games independently, but for dual games the CPUs communicate through shared memory.
Re: Starting a Disassembly Project
Posted: Mon Oct 20, 2014 8:51 am
by KW_455
You probably know already, but to be clear, the VS board has 2 complete systems. They can run 2 different games independently, but for dual games the CPUs communicate through shared memory.
Has anyone ever constructed a "null modem cable" or something similar to connect two NESes?
If you plan on publishing the disasm, it's a lot more helpful to create a data format guide than to write comments like "add highbyte of x position and store"
I got inspired by, among other things,
http://www.computerarcheology.com/wiki/ ... ceInvaders and
http://altairbasic.org/ , so my intention is to create something similar - a guide to what makes a simple NES game like Balloon Fight tick. Don't expect anything nearing completion within a year or two though

(Unless someone pays me of course

)