Appendix A; Emulator Notes - Nintendo DMG-01 - Game Boy Console Manual

Manual
Table of Contents

Advertisement

5. Appendix A

5. Appendix A

5.1. Emulator Notes

Notes for getting assembly language programs that run
on an emulator to run on a real GB (by kOOPa, 2-Jan-98)
1. Emulators tend to set all of RAM to $00 on power up.
Real GBs do NOT initialize RAM on power up. RAM is
filled with random values on power up. You must clear
it yourself if you wish it to be set to some known
value.
2. The real hardware could care less about the ROM
checksum ($14e,$14f) but the complement check ($14d)
MUST be correct or programs will "lock up" after
scrolling the Nintendo logo.
Use RGBFIX -V in the RGBDS development system to set
the checksum and the complement byte after each
source code compile. It doesn't matter whether you
program in C or assembly, this program will fix it.
3. The Nintendo scrolling graphic from $104 - $133 must
be accurate. If one byte of it is changed then your
programs will "lock up" after scrolling this graphic
logo.
4. When the LCD display is off (bit 7 of $ff40 set to 0)
you can write to video memory at any time with out
restrictions. While it is on you can only write to
video memory during H-Blank and V-Blank. Code similar
to this will work:
; Write B to Video RAM location HL
WriteVRAM:
di
Page 134
Game Boy
;turn off interrupts
TM
CPU Manual
V 1.01

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Game boy

Table of Contents