Could someone please help me with understanding code disassembly? More specifically, why are there differences between disassembled code and whats in the debug window?
I have been wrestling with the Gunsmoke (U.S. Set 1) roms. Here is what I did and what I am seeing.
First, I combined the three program roms:
copy /b 9n_gs03.bin + 10n_gs04.bin + 12n_gs05.bin gscombined.bin
Then I disassembled gscombined.bin
The following the routine is ok:
0159: ld a,($C003) ; -- Read dipswitch 1 015C: and $80 015E: jp nz,$016C ; -- Check for service mode - Jump if not in service 0161: ld a,$0C 0163: ld ($C804),a 0166: ld ($E285),a 0169: jp $8000 ; -- Jump to service mode routines
Ok, now heres where things are different. On my disassembled code, the start of the service mode routines look like this:
8000 ld hl,$81ea 8003 ld de,$f780 8006 ld iy,$f780 800a call $0300 800d call $06c3 8010 call $0657 8013 ret
However, the dump from the debugger shows this code:
8000: ld sp,$E840 8003: di 8004: call $04C5 8007: ld hl,$865C 800A: call $03AF 800D: ld d,$FF 800F: ld hl,$E000 8012: ld bc,$2000 8015: ld (hl),d 8016: inc hl 8017: dec bc 8018: ld a,b 8019: or c 801A: jr nz,$8015
I must not be disassembling the roms properly. What am I doing wrong?
Thanks
|