Page 1 of 1

What is the GB's equivalent to the NES' RAM?

Posted: Tue Jun 19, 2012 6:41 pm
by Pennywise
Hello all,

I need to convert a DTE routine coded in 6502 to Z80 for a little translation. I have been toying around with the GB for a while now, but I'm still not terribly comfortable yet. Is WRAM the equivalent to the $00-$FF and $600-$7FF RAM address range for NES and GB? Or is there something else I can use that is more convenient?

Example of the DTE check.

0F:C1B6:AD FF 06 LDA $06FF = #$00 ;
0F:C1B9:D0 1A BNE $C1D5 ; If 2nd_Pass = 0 Then

Posted: Tue Jun 19, 2012 6:50 pm
by Shiru
Main GB RAM is $c000...$dfff, it is equivalent to the main NES RAM at $0000..$07ff, but GB has 8K while NES has only 2K.

$ff80..$fffe is an extra RAM piece in the GB that is equivalent for $0000..$00ff of NES, the zero page, but it has only 127 bytes instead of 256.

Extra RAM (save RAM) could be located at $6000..#7fff in the NES and at $a000..$bfff in the GB. It is 8K in both cases (more with bank switching).

Posted: Tue Jun 19, 2012 7:14 pm
by tepples
Are you sure about those addresses? You might want to check them against the Pan Docs.

[checks]
GB RAM is $C000-$DFFF, and NES RAM is $0000-$07FF. The rest are correct.

Posted: Tue Jun 19, 2012 7:47 pm
by Shiru
Yes, it was a mistake, corrected.