+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  what does debugger display lol
Pages: [1]
Author Topic: what does debugger display lol  (Read 2 times)
poliver
Guest
« on: May 19, 2008, 10:09:21 am »

I see this in the 6502 debugger window

Quote
$C067:A5 08     LDA $08 = #$00
$C069:F0 FC     BEQ $C067
$C06B:A9 00     LDA #$00
$C06D:85 08     STA $08 = #$00
$C06F:60        RTS
$C070:A5 09     LDA $09 = #$A8
$C072:29 7F     AND #$7F
$C074:8D 00 20  STA $2000 = #$A8
$C077:AD 02 20  LDA $2002 = #$40
$C07A:10 FB     BPL $C077
$C07C:60        RTS
$C07D:20 A0 C0  JSR $C0A0
$C080:20 84 C0  JSR $C084
etc.

is this the rom file? game code... or something that's been loaded from it?
i know, don't tell probably a lame question...  Embarrassed
DaMarsMan
Guest
« Reply #1 on: May 19, 2008, 10:50:27 am »

It's game code. If you just stopped the game in a random spot you wont really be able to tell what it's doing.
poliver
Guest
« Reply #2 on: May 19, 2008, 11:06:12 am »

oh, so it's a game code... thanks
debugger takes it from the rom file and shows it?
does this game code include whole ROM? the header and CHR graphics? Or is it just PRG?

well, i don't need to know what that code is doing i just picked some and copy pasted
i'm trying to understand bigger things now (or are they actually smaller lol) :'( Smiley
syntax error
Guest
« Reply #3 on: May 19, 2008, 11:16:56 am »

Hello newbie !
This looks NES code.
6502 instructions range from 1 to 3 bytes.
The numbers on the left are the binary representation
of the instructions.This is only a very small part and seems only code, no graphics.
Would you please download the SMB 1 disassembly from here because
the uploader commented it and it is a small NES game.

Disch
Guest
« Reply #4 on: May 19, 2008, 11:22:59 am »

Quote
does this game code include whole ROM? the header and CHR graphics? Or is it just PRG?

None of the above.  It shows CPU addressing space (often misnomered as "RAM" even though it's not RAM -- I still say it's important for people to understand the difference, even though several docs and utilities speak of them them as if they're the same).  Different addresses in this space represent different things on the NES.

Usually you will be looking at PRG-ROM which is usually between addresses $8000-FFFF.  Those numbers on the left side show the address of the next instruction(s) to be executed.  As you can see.. that "LDA $08" is at address $C067.

System RAM lies between addresses $0000-07FF, and on-cartridge RAM (aka "SRAM" since it's often battery backed and used to save games) lies between $6000-7FFF.  RAM is like the 'workspace' for programs -- it holds variables that are used and changed by the game as it runs.


Other addresses either are usually nothing (unmapped) or are some kind of register.  In that code snippit, you can see the game doing "AND #$7F    STA $2000"  which is writing a value to address $2000 (a PPU register).  This code effectively disables NMIs.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC