The video code now writes out a bmp file per-frame. With this patch applied, the Nintendo logo is rendered in each frame. There is still plenty of work to be done. Pretty much everything is hardcoded to make the bootrom work.
208 lines
2.4 KiB
Plaintext
208 lines
2.4 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
|
|
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
regs; peek; step;
|
|
|
|
|
|
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
|