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

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
What is the GB's equivalent to the NES' RAM?
by on (#95671)
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

by on (#95673)
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).

by on (#95676)
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.

by on (#95681)
Yes, it was a mistake, corrected.