z80 rom hacking

joeyd999

Joined Jun 6, 2011
5,283
Oh, and here's the disassembler, in case it is useful for you.

As I just threw it quickly together, notice that the input and output file names are hard coded. In addition, there is a variable called "offset" that offsets the address (0x8000 for the second rom), also hard coded.

Someone may want to take the code and clean it up.

EDIT: At the top of the code, I meant 2013, not 2012! Can't keep up with the years anymore. They go by way too fast.
 

Attachments

Thread Starter

m121212

Joined Jul 24, 2011
96
I got a few programs that do this online. The output of one of them gave a similar listing (so your code must work well!)

The version I got output labels which makes it slightly easier to follow (see attached).

I guess what I need help with is figuring out where this 500F threshold is, and how to change it. As someone previously pointed out, there is no representation for 500 in 8-bit.
 

Attachments

joeyd999

Joined Jun 6, 2011
5,283
The version I got output labels which makes it slightly easier to follow (see attached).
Actually, not easier to follow. The left rom starts at address 0x8000, not 0x0000. So, all your absolute jumps are incorrect (in the left rom). Also, since the disassembler has no concept of the "split" roms, it cannot make labels that jump from one rom into the other.
 

joeyd999

Joined Jun 6, 2011
5,283
Look at this segment of code from GF12 Right.asm:

Rich (BB code):
11AF 2AB8C5     LD	HL,(C5B8H)
11B2 11F401     LD	DE,01F4H
11B5 B7         OR	A
11B6 ED52       SBC	HL,DE
11B8 2005       JR	NZ,11BFH
11BA 21BC02     LD	HL,02BCH
11BD 1803       JR	11C2H
11BF 21F401     LD	HL,01F4H
11C2 22B8C5     LD	(C5B8H),HL
It is the only occurrence of the literal 500 (0x01F4) anywhere in the code .
 
Top