+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Geiger's and the Data Bank Register
Pages: [1]
Author Topic: Geiger's and the Data Bank Register  (Read 463 times)
RedComet
Guest
« on: May 13, 2007, 03:13:17 am »

So I'm working on a game that's LoROM, right? And there's something that's showing up in my log that just doesn't make any sense to me whatsoever:

Code:
$87/80C7 9D 71 17    STA $1771,x[$87:1771]   A:0003 X:0000 Y:0092 D:0000 DB:87 S:1FE9 P:envmxdizcHC:0246 VC:260 00 FL:65105
...
$87/8E43 8D CC 02    STA $02CC  [$92:02CC]   A:0001 X:0000 Y:0006 D:0000 DB:92 S:1FDA P:envmxdizcHC:0048 VC:002 00 FL:65107

You'll notice both of these are storing data to ram, but it's showing up in the log as going to rom. Now, I know that it's really going to ram (checked to make sure), but why the hell is DB pointing to a rom bank? Is this a quirk with how LoROM works or with the way Geiger's logs things or something else entirely? It's really annoying trying to track down reads from bank X when it's showing up everywhere it shouldn't be.

Anyway, thanks for the help in advance. Smiley
Tauwasser
Guest
« Reply #1 on: May 13, 2007, 05:30:53 am »

Isn't the ram made up like the rom sits only at 4000 ~ FFFF and the other 0000 ~ 3FFF are RAM that's always accessible? I mean, it would be pretty dump if you had to clear your data bank register for each and every store to RAM, wouldn't it?

That's how much I got out of SNES emulation anyways ^^"

cYa,

Tauwasser
Disch
Guest
« Reply #2 on: May 13, 2007, 09:49:50 am »

"LoRAM" exists in most banks.  $0000-$1FFF is RAM in both banks listed ($87 and $92) for both LoROM and HiROM games.  It simply mirrors $7E:0000 - $7E:1FFF

This doc may help:

http://www.romhacking.net/docs/snesmem.txt
creaothceann
Guest
« Reply #3 on: May 13, 2007, 10:46:22 am »

http://www.romhacking.net/docs/memmap.txt Wink
RedComet
Guest
« Reply #4 on: May 14, 2007, 05:08:09 am »

Thanks, you guys. That cleared it up quite nicely. I've read both of that document (the one Disch linked to) quite a few times over the years and I can't believe I didn't remember that. I must be slipping.
Nightcrawler
Guest
« Reply #5 on: May 14, 2007, 08:21:35 am »

Quote from: RedComet on May 14, 2007, 05:08:09 am
Thanks, you guys. That cleared it up quite nicely. I've read both of that document (the one Disch linked to) quite a few times over the years and I can't believe I didn't remember that. I must be slipping.

I know this by heart and I still randomly forget it sometimes. I'm sitting there not understanding what the hell is happening, banging my head for a few minutes, then I'm like.. 'OHHHH... It's just storing that value in RAM'. Then I proceed to feel like a great big retard. It's also easy to forget this if you've recently been working with HiROM for awhile and trying to jump back to LoROM. OR... maybe it's just me. I easily confuse myself. In fact, I think this very post is confusing me now. I don't understand my point. Grin
Pages: [1]  


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