Files
gb-emu/gbdb_boot_test
Max Regan 447276d029 boot_test: updates for changes to breakpoints
Because now they actually stop in the correct place.

Also, some other fixups because I'm too lazy to properly split patches
for a personal project.
2018-07-09 02:36:20 +00:00

229 lines
2.3 KiB
Plaintext

load ../harvest_moon.gb
bootrom ../bootrom.gb
echo Running test...
set quiet 1
assert $pc == 0
step
# Executed LD SP, D16 (0xfffe)
assert $pc == 3
assert $sp == 0xfffe
step
# Executed XOR A
assert $pc == 4
assert $a == 0
step
assert $pc == 7
assert $hl == 0x9fff
step
assert $pc == 8
assert $hl == 0x9ffe
step
assert $pc == 10
assert $f == 0x2
step
runto 0xc
assert $pc == 0xc
assert $hl == 0x7fff
step
assert $pc == 0xf
assert $hl == 0xff26
step
assert $pc == 0x11
assert $c == 0x11
step
assert $pc == 0x13
assert $a == 0x80
step
assert $pc == 0x14
assert $hl == 0xff25
step
assert $pc == 0x15
# LD (0xFF00 + $C), A
step
assert $pc == 0x16
assert $c == 0x12
runto 0x27
assert $pc == 0x27
step
assert $pc == 0x28
step
assert $pc == 0x95
step
assert $pc == 0x96
step
assert $pc == 0x98
step
assert $pc == 0x99
step
assert $pc == 0x9b
step
assert $pc == 0x9c
step
assert $pc == 0x9d
step
assert $pc == 0x9f
step
assert $pc == 0xa0
step
assert $pc == 0xa1
runto 0xa3
assert $pc == 0xa3
step
assert $pc == 0xa4
step
assert $pc == 0xa5
step
assert $pc == 0xa6
step
assert $pc == 0xa7
step
assert $pc == 0x2b
step
assert $pc == 0x96
runto 0x34
assert $pc == 0x34
step
assert $pc == 0x37
assert $de == 0xd8
step
assert $pc == 0x39
assert $b == 0x08
runto 0x40
assert $pc == 0x40
assert $b == 0
step
assert $pc == 0x42
assert $a == 0x19
step
assert $pc == 0x45
step
assert $pc == 0x48
assert $hl == 0x992f
step
assert $pc == 0x4a
assert $c == 0x0c
#
# Setup Display
#
runto 0x55
assert $a == 0
assert $pc == 0x55
step
assert $h == 0
assert $pc == 0x56
step
assert $a == 0x64
assert $pc == 0x58
step
assert $d == 0x64
assert $pc == 0x59
step
assert $pc == 0x5b
step
assert $a == 0x91
assert $pc == 0x5d
step
assert $pc == 0x5f
step
assert $b == 1
assert $pc == 0x60
step
assert $e == 0x2
runto 0x70
assert $pc == 0x70
runto 0x80
assert $pc == 0x80
#
# Play sound 1
#
runto 0x86
assert $pc == 0x86
#
# Play sound 2
#
runto 0xe0
assert $pc == 0xe0
#
# Setup Logo comparison
#
runto 0xf4
assert $pc == 0xf4
#
# Based on http://bgb.bircd.org/pandocs.htm#powerupsequence these are the values
# the registers should hold after the boot process is done
#
runto 0x100
assert $pc == 0x100
assert $af == 0x01b0
assert $bc == 0x0013
assert $de == 0x00d8
assert $hl == 0x014d
#
runto 0x2213
regs
stat
# exit