test: add assertions during video init

This commit is contained in:
2018-02-19 06:52:21 +00:00
parent ee318b348d
commit d20d929335

View File

@@ -28,14 +28,12 @@ assert $f == 0x2
step step
runto 0xc runto 0xc
regs
assert $pc == 0xc assert $pc == 0xc
assert $hl == 0x7fff assert $hl == 0x7fff
# TODO: There is a bug in GBDB where breakpoints fire at the start of an # TODO: There is a bug in GBDB where breakpoints fire at the start of an
# instruction and "step" stops at the end of an instruction # instruction and "step" stops at the end of an instruction
step; step step; step
regs
assert $pc == 0xf assert $pc == 0xf
assert $hl == 0xff26 assert $hl == 0xff26
@@ -95,13 +93,10 @@ assert $pc == 0xa0
step step
assert $pc == 0xa1 assert $pc == 0xa1
break add 0xa3 runto 0xa3
step 100000
break del 2
assert $pc == 0xa3 assert $pc == 0xa3
step #FIXME: bugs step; step #FIXME: bugs
step
assert $pc == 0xa4 assert $pc == 0xa4
step step
@@ -119,10 +114,8 @@ assert $pc == 0x2b
step step
assert $pc == 0x96 assert $pc == 0x96
break add 0x34 runto 0x34
step 10000
assert $pc == 0x34 assert $pc == 0x34
break del 3
step; step step; step
assert $pc == 0x37 assert $pc == 0x37
@@ -132,11 +125,9 @@ step;
assert $pc == 0x39 assert $pc == 0x39
assert $b == 0x08 assert $b == 0x08
break add 0x40 runto 0x40
step 10000
assert $pc == 0x40 assert $pc == 0x40
assert $b == 0 assert $b == 0
break del 4
step; step step; step
assert $pc == 0x42 assert $pc == 0x42
@@ -153,11 +144,69 @@ step
assert $pc == 0x4a assert $pc == 0x4a
assert $c == 0x0c assert $c == 0x0c
break add 0x55 #
step 10000 # Setup Display
assert $pc == 0x55 #
runto 0x55
assert $a == 0 assert $a == 0
break del 5
assert $pc == 0x55
step; 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
runto 0x100 runto 0x100
assert $pc == 0x100 assert $pc == 0x100