i have sinned and done way too much in a commit. sry.

This commit is contained in:
Shoofle 2025-05-10 13:05:53 -04:00
parent 243654d1dc
commit d74414ee72
44 changed files with 1137 additions and 1285 deletions

View File

@ -25,6 +25,7 @@ def Card_Offset_functions equ @-TheFool
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: .fInit:
ld hl, CVS ld hl, CVS
@ -72,7 +73,7 @@ def Card_Offset_functions equ @-TheFool
ld hl, .cloud1 ld hl, .cloud1
; six sprites for the doggie, four for the zero, 4 bytes each ; six sprites for the doggie, four for the zero, 4 bytes each
ld de, MY_OAM + 10*4 ld de, MY_OAM + 10*4
ld bc, 73*$100 + 15 ld bc, 78*$100 + 15
ld a, $13 ; one by three ld a, $13 ; one by three
call BuildMetaSprite call BuildMetaSprite
; set those three sprites to use OBP palette 1 ; set those three sprites to use OBP palette 1
@ -98,7 +99,7 @@ def Card_Offset_functions equ @-TheFool
ld hl, .cloud3 ld hl, .cloud3
ld de, MY_OAM + 16*4 ld de, MY_OAM + 16*4
ld bc, 88*$100 + 67 ld bc, 92*$100 + 67
ld a, $11 ld a, $11
call BuildMetaSprite call BuildMetaSprite
ld hl, MY_OAM + 16*4+3 ld hl, MY_OAM + 16*4+3
@ -113,13 +114,12 @@ def Card_Offset_functions equ @-TheFool
ld a, [CVS+1] ; checking the high byte of the timer ld a, [CVS+1] ; checking the high byte of the timer
cp a, $06 ; $10 00 = 1 second cp a, $06 ; $10 00 = 1 second
jp c, .doneWithTimer1 ; if the timer is less than $0600, skip jp c, .doneWithTimer1 ; if the timer is less than $0600, skip
; if the timer is greater or equal to $0600, reset it
; if the timer is greater or equal to $0600, reset it ld a, 0
ld a, 0 ld [CVS], a
ld [CVS], a ld [CVS+1], a
ld [CVS+1], a call .dogDance ; and make the dog dance
call .dogDance ; and make the dog dance .doneWithTimer1
.doneWithTimer1
ld hl, CVS+3 ld hl, CVS+3
call IncrementTimer call IncrementTimer
@ -127,13 +127,12 @@ def Card_Offset_functions equ @-TheFool
ld a, [CVS+3+1] ; check the high byte of the zero sprite timer ld a, [CVS+3+1] ; check the high byte of the zero sprite timer
cp a, $30 ; $10 00 = 1 second cp a, $30 ; $10 00 = 1 second
jp c, .doneWithTimer2 jp c, .doneWithTimer2
jp .doneWithTimer2
ld a, 0 ld a, 0
ld [CVS+3], a ld [CVS+3], a
ld [CVS+3+1], a ld [CVS+3+1], a
call .zeroRotate call .zeroRotate
.doneWithTimer2 .doneWithTimer2
ld hl, CVS+6 ld hl, CVS+6
call IncrementTimer call IncrementTimer
@ -142,11 +141,11 @@ def Card_Offset_functions equ @-TheFool
cp a, $20 cp a, $20
jp c, .doneWithTimer3 jp c, .doneWithTimer3
ld a, 0 ld a, 0
ld [CVS+6], a ld [CVS+6], a
ld [CVS+6+1], a ld [CVS+6+1], a
call .cloud1Move call .cloud1Move
.doneWithTimer3 .doneWithTimer3
ld hl, CVS+9 ld hl, CVS+9
call IncrementTimer call IncrementTimer
@ -155,11 +154,11 @@ def Card_Offset_functions equ @-TheFool
cp a, $20 cp a, $20
jp c, .doneWithTimer4 jp c, .doneWithTimer4
ld a, 0 ld a, 0
ld [CVS+9], a ld [CVS+9], a
ld [CVS+9+1], a ld [CVS+9+1], a
call .cloud2Move call .cloud2Move
.doneWithTimer4 .doneWithTimer4
ld hl, CVS+12 ld hl, CVS+12
call IncrementTimer call IncrementTimer
@ -168,11 +167,11 @@ def Card_Offset_functions equ @-TheFool
cp a, $60 cp a, $60
jp c, .doneWithTimer5 jp c, .doneWithTimer5
ld a, 0 ld a, 0
ld [CVS+12], a ld [CVS+12], a
ld [CVS+12+1], a ld [CVS+12+1], a
call .cloud3Move call .cloud3Move
.doneWithTimer5 .doneWithTimer5
ret ret
.dogDance: .dogDance:
@ -240,6 +239,7 @@ def Card_Offset_functions equ @-TheFool
ld hl, .zero ld hl, .zero
ld de, MY_OAM + 6*4 ; we've already written six sprites for the doggie, 4 bytes each ld de, MY_OAM + 6*4 ; we've already written six sprites for the doggie, 4 bytes each
ld a, $22 ; two by two ld a, $22 ; two by two
ld bc, 0
; location of source tile map: hl ; location of source tile map: hl
; location in memory to write to: de ; location in memory to write to: de
; y and x in b and c (set above) ; y and x in b and c (set above)
@ -273,6 +273,7 @@ def Card_Offset_functions equ @-TheFool
ld hl, .cloud1 ld hl, .cloud1
; six sprites for the doggie, four for the zero, 4 bytes each ; six sprites for the doggie, four for the zero, 4 bytes each
ld de, MY_OAM + 10*4 ld de, MY_OAM + 10*4
ld bc, 0
ld a, $13 ; two by two ld a, $13 ; two by two
; location of source tile map: hl ; location of source tile map: hl
; location in memory to write to: de ; location in memory to write to: de
@ -283,7 +284,7 @@ def Card_Offset_functions equ @-TheFool
.cloud1: .cloud1:
db $0e, $0f, $10 db $0e, $0f, $10
.cloud1Anim: .cloud1Anim:
db 9, 73, 15, 73, 15, 73, 16, 73, 17, 73, 18, 73, 19, 73, 18, 73, 17, 73, 16, db 9, 78, 15, 78, 15, 78, 16, 78, 17, 78, 18, 78, 19, 78, 18, 78, 17, 78, 16,
.cloud2Move: .cloud2Move:
ld hl, .cloud2Anim ld hl, .cloud2Anim
@ -306,6 +307,7 @@ def Card_Offset_functions equ @-TheFool
ld hl, .cloud2 ld hl, .cloud2
; six sprites for the doggie, four for the zero, 4 bytes each ; six sprites for the doggie, four for the zero, 4 bytes each
ld de, MY_OAM + 13*4 ld de, MY_OAM + 13*4
ld bc, 0
ld a, $13 ; two by two ld a, $13 ; two by two
; location of source tile map: hl ; location of source tile map: hl
; location in memory to write to: de ; location in memory to write to: de
@ -339,6 +341,7 @@ def Card_Offset_functions equ @-TheFool
ld hl, .cloud3 ld hl, .cloud3
; six sprites for the doggie, four for the zero, 4 bytes each ; six sprites for the doggie, four for the zero, 4 bytes each
ld de, MY_OAM + 16*4 ld de, MY_OAM + 16*4
ld bc, 0
ld a, $11 ld a, $11
; location of source tile map: hl ; location of source tile map: hl
; location in memory to write to: de ; location in memory to write to: de
@ -349,13 +352,15 @@ def Card_Offset_functions equ @-TheFool
.cloud3: .cloud3:
db $14 db $14
.cloud3Anim: .cloud3Anim:
db 2, 88, 66, 88, 67, db 2, 92, 66, 92, 67,
.fDraw: .fDraw:
ret ret
.fPrintPrep:
ret
@ -370,132 +375,129 @@ def Card_Offset_functions equ @-TheFool
db $00,$00,$00,$00,$00,$00,$0e,$0e,$8f,$8b,$ff,$fd,$ff,$01,$ff,$01 db $00,$00,$00,$00,$00,$00,$0e,$0e,$8f,$8b,$ff,$fd,$ff,$01,$ff,$01
db $ff,$00,$ff,$00,$ff,$00,$ff,$80,$ff,$93,$fe,$96,$fc,$dc,$70,$70 db $ff,$00,$ff,$00,$ff,$00,$ff,$80,$ff,$93,$fe,$96,$fc,$dc,$70,$70
db $ff,$01,$ff,$01,$ff,$01,$ff,$01,$ff,$c9,$7f,$4b,$7e,$6e,$38,$38 db $ff,$01,$ff,$01,$ff,$01,$ff,$01,$ff,$c9,$7f,$4b,$7e,$6e,$38,$38
db $00,$00,$03,$03,$07,$07,$0c,$0c,$18,$18,$18,$18,$30,$30,$30,$30 db $00,$00,$00,$03,$00,$07,$00,$0c,$00,$18,$00,$18,$00,$30,$00,$30
db $00,$00,$c0,$c0,$e0,$e0,$30,$30,$18,$18,$18,$18,$0c,$0c,$0c,$0c db $00,$00,$00,$c0,$00,$e0,$00,$30,$00,$18,$00,$18,$00,$0c,$00,$0c
db $30,$30,$30,$30,$18,$18,$18,$18,$0c,$0c,$07,$07,$03,$03,$00,$00 db $00,$30,$00,$30,$00,$18,$00,$18,$00,$0c,$00,$07,$00,$03,$00,$00
db $0c,$0c,$0c,$0c,$18,$18,$18,$18,$30,$30,$e0,$e0,$c0,$c0,$00,$00 db $00,$0c,$00,$0c,$00,$18,$00,$18,$00,$30,$00,$e0,$00,$c0,$00,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$07,$00,$3f db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$07,$00,$3f,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$07,$00,$1f,$00,$ff,$00,$ff db $00,$00,$00,$00,$00,$00,$00,$00,$07,$00,$1f,$00,$ff,$00,$ff,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$00,$c0,$00,$f0,$00,$fc db $00,$00,$00,$00,$00,$00,$00,$00,$80,$00,$c0,$00,$f0,$00,$f0,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$07 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$07,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$78,$00,$ff,$00,$ff db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$78,$00,$ff,$00,$ff,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$c0,$00,$f0 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$c0,$00,$f0,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00
.SpriteTilesEnd: .SpriteTilesEnd:
.KeyArtTiles: .KeyArtTiles:
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$00,$80,$00
db $1f,$00,$0f,$00,$0f,$00,$0f,$00,$07,$00,$07,$00,$07,$00,$07,$00 db $1f,$00,$0f,$00,$0f,$00,$0f,$00,$07,$00,$07,$00,$07,$00,$07,$00
db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00
db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$fe,$00,$fe,$00,$fe,$00,$fe,$00
db $c0,$00,$c0,$00,$e0,$00,$e0,$00,$f0,$00,$f0,$00,$f0,$00,$f8,$00
db $07,$00,$03,$00,$03,$00,$03,$00,$03,$00,$03,$00,$01,$00,$01,$00 db $07,$00,$03,$00,$03,$00,$03,$00,$03,$00,$03,$00,$01,$00,$01,$00
db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$e7,$1f,$cf,$30,$9f,$62,$7f,$81 db $fe,$00,$fe,$00,$fc,$00,$fc,$00,$fc,$00,$fc,$00,$fc,$00,$fc,$00
db $ff,$00,$ff,$00,$ff,$00,$ff,$fc,$e1,$1e,$ff,$3e,$e1,$1e,$90,$ff db $f8,$00,$fc,$00,$fc,$00,$fe,$00,$fe,$00,$fe,$00,$ff,$00,$ff,$00
db $f8,$00,$f8,$00,$f8,$00,$f8,$00,$f8,$00,$f8,$00,$70,$80,$30,$c0 db $01,$00,$01,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $ff,$00,$ff,$00,$fe,$00,$c0,$00,$87,$1f,$0f,$30,$1f,$62,$7f,$81
db $ff,$00,$ff,$00,$01,$00,$fc,$fc,$e0,$1e,$fe,$3e,$e0,$1e,$90,$ff
db $f8,$00,$f8,$00,$f8,$00,$f8,$00,$f8,$00,$38,$00,$10,$80,$00,$c0
db $00,$00,$00,$00,$00,$00,$01,$00,$01,$00,$03,$00,$03,$00,$07,$00
db $80,$00,$80,$00,$c0,$00,$c0,$00,$c0,$00,$e0,$00,$e0,$00,$f0,$00
db $00,$00,$00,$01,$00,$01,$01,$02,$03,$04,$07,$08,$0f,$10,$0f,$10 db $00,$00,$00,$01,$00,$01,$01,$02,$03,$04,$07,$08,$0f,$10,$0f,$10
db $79,$86,$f7,$08,$f7,$08,$ef,$10,$ef,$10,$de,$21,$de,$21,$bd,$42 db $78,$86,$f0,$08,$f2,$08,$e2,$10,$e4,$10,$c4,$21,$c8,$21,$81,$42
db $c0,$7f,$80,$7f,$00,$ff,$80,$7f,$f0,$cf,$f8,$87,$f8,$07,$f8,$87 db $40,$7f,$00,$7f,$00,$ff,$00,$7f,$f0,$cf,$f8,$87,$f8,$07,$f8,$87
db $00,$f0,$00,$fc,$00,$f8,$00,$f8,$00,$f8,$00,$f8,$00,$fc,$80,$7c db $00,$f0,$00,$fc,$00,$f8,$00,$f8,$00,$f8,$00,$f8,$00,$fc,$80,$7c
db $07,$00,$07,$00,$0f,$00,$0f,$00,$0f,$00,$1f,$00,$1f,$00,$3f,$00
db $f0,$00,$f0,$00,$f8,$00,$f8,$00,$fc,$00,$fc,$00,$fe,$00,$fe,$00
db $1f,$20,$1f,$20,$0f,$11,$07,$0a,$04,$06,$05,$04,$06,$04,$05,$04 db $1f,$20,$1f,$20,$0f,$11,$07,$0a,$04,$06,$05,$04,$06,$04,$05,$04
db $fd,$7a,$de,$8f,$a9,$03,$55,$01,$a8,$02,$55,$00,$aa,$00,$55,$00 db $f9,$7a,$de,$8f,$a9,$03,$55,$01,$a8,$02,$55,$00,$aa,$00,$55,$00
db $fc,$43,$fd,$02,$3e,$c1,$0e,$31,$81,$9e,$8f,$f0,$8e,$71,$5e,$9e db $fc,$43,$fd,$02,$3e,$c1,$0e,$31,$81,$9e,$8f,$f0,$8e,$71,$5e,$9e
db $80,$7c,$80,$7c,$00,$fc,$00,$fc,$17,$ff,$c4,$ff,$0c,$ff,$9f,$3f db $80,$7c,$80,$7c,$00,$fc,$00,$fc,$17,$ff,$c4,$ff,$0c,$ff,$9f,$3f
db $00,$00,$00,$00,$00,$00,$00,$00,$80,$80,$40,$c0,$e0,$e0,$e1,$e0 db $00,$00,$00,$00,$00,$00,$00,$00,$80,$80,$40,$c0,$e0,$e0,$e1,$e0
db $3f,$00,$3f,$00,$7f,$00,$7f,$00,$7f,$00,$ff,$00,$ff,$00,$ff,$00
db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$7f,$00,$3f,$00,$1f,$00
db $fe,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00
db $06,$04,$05,$04,$07,$05,$86,$06,$84,$04,$c0,$00,$c0,$00,$c0,$00 db $06,$04,$05,$04,$07,$05,$86,$06,$84,$04,$c0,$00,$c0,$00,$c0,$00
db $aa,$00,$55,$01,$ff,$ff,$3f,$01,$3f,$01,$3e,$02,$3f,$02,$1e,$02 db $aa,$00,$55,$01,$ff,$ff,$01,$01,$39,$01,$3a,$02,$3b,$02,$1a,$02
db $33,$ae,$ff,$47,$79,$47,$fb,$46,$7e,$44,$e5,$5c,$3e,$44,$b9,$46 db $33,$ae,$ff,$47,$79,$47,$fb,$46,$7e,$44,$e5,$5c,$3e,$44,$b9,$46
db $5f,$0f,$af,$07,$57,$03,$ab,$81,$d5,$81,$ab,$81,$d5,$81,$ab,$81 db $5f,$0f,$af,$07,$57,$03,$ab,$81,$d5,$81,$ab,$81,$d5,$81,$ab,$81
db $d1,$f0,$8f,$f8,$87,$fc,$87,$fe,$87,$fe,$87,$fe,$87,$fe,$87,$fe db $d1,$f0,$89,$f8,$84,$fc,$86,$fe,$86,$fe,$86,$fe,$86,$fe,$86,$fe
db $1f,$02,$1e,$02,$1f,$02,$1e,$02,$1f,$02,$1e,$02,$0f,$02,$0e,$03 db $0f,$00,$07,$00,$03,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $e0,$00,$e0,$00,$f0,$00,$f0,$00,$f8,$00,$f8,$00,$f8,$00,$fc,$00
db $1b,$02,$1a,$02,$1b,$02,$1a,$02,$1b,$02,$1a,$02,$0b,$02,$0a,$03
db $3c,$42,$9e,$21,$5e,$21,$9e,$21,$5f,$20,$af,$10,$4f,$10,$af,$11 db $3c,$42,$9e,$21,$5e,$21,$9e,$21,$5f,$20,$af,$10,$4f,$10,$af,$11
db $d5,$81,$ab,$81,$d5,$81,$ab,$81,$d5,$81,$ab,$83,$d7,$83,$ab,$03 db $d5,$81,$ab,$81,$d5,$81,$ab,$81,$d5,$81,$ab,$83,$d7,$83,$ab,$03
db $87,$fe,$87,$fe,$87,$fe,$87,$fe,$87,$fe,$0f,$fc,$0f,$fc,$1f,$f8 db $86,$fe,$86,$fe,$86,$fe,$86,$fe,$86,$fe,$0c,$fc,$0d,$fc,$19,$f8
db $fc,$00,$fe,$00,$fe,$00,$ff,$00,$ff,$00,$7f,$00,$3f,$03,$1f,$07 db $fc,$00,$fe,$00,$fe,$00,$ff,$00,$ff,$00,$7e,$00,$3e,$00,$18,$00
db $0f,$01,$0f,$01,$0f,$03,$0f,$0f,$3f,$3f,$ff,$ff,$ff,$ff,$ff,$ff db $09,$01,$09,$01,$03,$03,$07,$07,$0f,$0f,$3f,$3f,$ff,$ff,$7f,$ff
db $4f,$11,$8f,$31,$e7,$f9,$e3,$ed,$ff,$fd,$ff,$ff,$ff,$ff,$ff,$ff db $4f,$11,$8f,$31,$e7,$f9,$f3,$fd,$ff,$fd,$ff,$ff,$ff,$ff,$ff,$ff
db $57,$03,$ab,$03,$57,$03,$af,$07,$55,$04,$ae,$04,$55,$04,$ae,$05 db $57,$03,$ab,$03,$57,$03,$af,$07,$54,$04,$ad,$04,$55,$04,$a9,$08
db $3f,$f0,$7f,$e0,$ff,$c0,$ff,$80,$7f,$80,$7f,$80,$7f,$80,$ff,$00 db $33,$f0,$67,$e0,$cf,$c0,$9f,$80,$3f,$00,$ff,$00,$ff,$00,$ff,$00
db $1f,$0f,$7f,$7f,$7f,$7f,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff db $fe,$00,$fc,$00,$f8,$00,$f0,$00,$e0,$00,$c0,$00,$80,$00,$00,$00
db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$fc,$fc db $00,$03,$03,$0c,$0f,$10,$0f,$10,$0f,$10,$1f,$20,$1f,$20,$3f,$40
db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$bf,$ff,$1f,$3f,$1f,$3f db $ff,$7f,$ff,$3f,$ff,$1f,$ff,$0f,$ff,$0f,$ff,$07,$fb,$07,$e0,$18
db $54,$05,$be,$1d,$7d,$3c,$ff,$7e,$ff,$fe,$ff,$fe,$ff,$fe,$ff,$fe db $ff,$ff,$7f,$ff,$7f,$ff,$7f,$ff,$7f,$ff,$7f,$ff,$7f,$ff,$7f,$7f
db $e0,$00,$f8,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$1c,$e3,$3b db $73,$30,$f3,$70,$fb,$f8,$fb,$f8,$fb,$f8,$fb,$f8,$f9,$f8,$f0,$f0
db $00,$00,$00,$01,$c0,$01,$e1,$02,$e1,$06,$e3,$04,$c7,$08,$8f,$10 db $e0,$00,$f8,$00,$ff,$00,$ff,$00,$87,$00,$31,$30,$5c,$7c,$43,$73
db $ff,$ff,$7f,$ff,$ff,$7f,$ff,$3f,$fe,$1e,$e8,$18,$c0,$20,$88,$40 db $00,$00,$00,$00,$c0,$01,$f9,$02,$f1,$02,$e3,$04,$47,$08,$0f,$10
db $f8,$f8,$c0,$c0,$80,$80,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $7f,$80,$7f,$80,$fe,$01,$f8,$06,$f0,$08,$e0,$10,$c0,$20,$88,$40
db $1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f db $80,$60,$00,$80,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $fc,$fc,$fc,$fc,$fc,$fc,$fe,$fe,$fe,$fe,$fc,$fc,$fc,$fc,$fc,$fc db $7f,$7f,$7f,$7e,$3f,$40,$3f,$40,$3f,$40,$3f,$40,$3f,$40,$3f,$40
db $e0,$38,$f0,$18,$f8,$0c,$f8,$0e,$fc,$07,$fe,$03,$ff,$01,$ff,$01 db $f0,$f0,$c0,$20,$c0,$20,$c0,$20,$c0,$20,$80,$40,$80,$40,$80,$40
db $ff,$f0,$3f,$20,$3c,$23,$1c,$12,$1e,$1e,$0f,$0e,$07,$84,$0f,$c8 db $00,$00,$00,$00,$00,$00,$00,$00,$03,$00,$0f,$00,$3f,$00,$7f,$00
db $18,$80,$38,$80,$3c,$00,$7c,$00,$fc,$00,$fc,$00,$fc,$00,$ff,$00 db $03,$00,$0f,$00,$3f,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00
db $1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$ff,$1f db $40,$70,$20,$38,$90,$1c,$c8,$0e,$e4,$07,$f2,$03,$f9,$01,$fd,$01
db $fc,$fc,$fc,$fc,$fe,$fe,$fe,$fe,$ff,$ff,$ff,$ff,$f0,$fc,$bc,$c2 db $ff,$f0,$3f,$20,$3c,$23,$1c,$12,$1e,$1e,$0e,$0e,$04,$84,$09,$c8
db $9f,$f0,$fb,$64,$f5,$0a,$ee,$11,$55,$aa,$aa,$55,$55,$aa,$aa,$55 db $18,$80,$38,$80,$3c,$00,$7c,$00,$fc,$00,$fc,$00,$fc,$00,$fe,$00
db $7c,$82,$7e,$81,$3f,$40,$1f,$20,$0f,$90,$87,$48,$43,$a4,$a1,$52 db $3f,$40,$3f,$40,$3f,$40,$3f,$40,$1f,$20,$0f,$10,$07,$08,$03,$04
db $55,$2a,$3b,$04,$15,$8a,$8e,$11,$85,$4a,$c2,$05,$e1,$02,$e2,$11 db $80,$40,$80,$40,$c0,$20,$c0,$20,$e0,$10,$e0,$10,$f0,$08,$f1,$08
db $7f,$00,$7f,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00
db $fc,$00,$fe,$00,$ff,$00,$ee,$11,$55,$aa,$aa,$55,$55,$aa,$aa,$55
db $93,$f0,$63,$64,$05,$0a,$ee,$11,$55,$aa,$aa,$55,$55,$aa,$aa,$55
db $55,$aa,$bb,$44,$55,$aa,$ee,$11,$55,$aa,$aa,$55,$55,$aa,$aa,$55
db $41,$a2,$b8,$41,$54,$a8,$ee,$10,$55,$aa,$aa,$55,$55,$aa,$aa,$55
db $f9,$04,$f8,$04,$7c,$82,$3c,$42,$1e,$21,$9f,$20,$0f,$90,$87,$48
db $55,$aa,$bb,$44,$55,$aa,$2e,$51,$15,$2a,$0a,$95,$85,$42,$f2,$31
db $55,$aa,$aa,$55,$55,$aa,$aa,$55,$11,$ee,$aa,$55,$44,$bb,$aa,$55
db $55,$aa,$aa,$55,$55,$aa,$aa,$55,$11,$ee,$af,$57,$47,$bf,$ae,$5f db $55,$aa,$aa,$55,$55,$aa,$aa,$55,$11,$ee,$af,$57,$47,$bf,$ae,$5f
db $55,$aa,$aa,$55,$55,$aa,$af,$5f,$ff,$ff,$f0,$ff,$fe,$ff,$0f,$ff db $55,$aa,$aa,$55,$55,$aa,$af,$5f,$ff,$ff,$f0,$ff,$fe,$ff,$0f,$ff
db $55,$aa,$aa,$55,$55,$aa,$ff,$ff,$ff,$ff,$00,$ff,$00,$ff,$80,$ff db $55,$aa,$aa,$55,$55,$aa,$ff,$ff,$ff,$ff,$00,$ff,$00,$ff,$80,$ff
db $50,$a9,$a8,$54,$fd,$fd,$fe,$ff,$38,$f8,$40,$c0,$40,$e0,$40,$ff db $55,$aa,$aa,$55,$7f,$ff,$ff,$ff,$00,$fe,$00,$fe,$00,$fe,$00,$fe
db $f1,$08,$60,$9c,$d3,$ef,$7f,$ff,$01,$01,$01,$01,$01,$01,$01,$ff db $43,$a4,$a1,$52,$c7,$c7,$18,$18,$60,$60,$80,$80,$80,$c0,$80,$ff
db $16,$ef,$ae,$57,$46,$bf,$af,$57,$03,$ff,$ab,$57,$01,$ff,$ab,$55 db $c9,$48,$84,$84,$02,$02,$02,$02,$06,$0e,$0c,$1c,$30,$71,$c0,$c7
db $f0,$ff,$3e,$ff,$07,$ff,$01,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff
db $00,$ff,$00,$ff,$fc,$ff,$ff,$ff,$7f,$ff,$00,$ff,$00,$ff,$00,$ff
db $3f,$ff,$00,$ff,$01,$ff,$ff,$ff,$ff,$ff,$01,$ff,$00,$ff,$00,$ff
db $ff,$ff,$00,$ff,$c0,$ff,$f0,$ff,$ff,$ff,$ff,$ff,$00,$ff,$00,$ff
db $00,$ff,$00,$ff,$00,$ff,$02,$ff,$ff,$ff,$ff,$ff,$00,$ff,$00,$ff
db $80,$ff,$80,$ff,$80,$ff,$c0,$ff,$c0,$ff,$c0,$ff,$e0,$ff,$e0,$7f
db $60,$ff,$60,$ff,$60,$ff,$60,$ff,$60,$ff,$30,$ff,$30,$ff,$30,$ff
db $1f,$00,$1f,$00,$1f,$00,$1f,$00,$1f,$00,$1f,$00,$1f,$00,$ff,$00
db $80,$00,$c0,$00,$40,$00,$60,$00,$33,$00,$3f,$00,$3f,$00,$1f,$00
db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$7f,$00,$3f,$00,$1f,$00
db $0f,$00,$07,$00,$03,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $80,$00,$80,$00,$c0,$00,$c0,$00,$c0,$00,$e0,$00,$e0,$00,$f0,$00
db $f0,$00,$f0,$00,$f8,$00,$f8,$00,$fc,$00,$fc,$00,$fe,$00,$fe,$00
db $fe,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00
db $e0,$00,$e0,$00,$f0,$00,$f0,$00,$f8,$00,$f8,$00,$f8,$00,$fc,$00
db $ff,$00,$ff,$00,$ff,$00,$ee,$11,$55,$aa,$aa,$55,$55,$aa,$aa,$55
db $55,$aa,$aa,$55,$7f,$ff,$ff,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff
db $55,$aa,$af,$5f,$ff,$ff,$f8,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff db $55,$aa,$af,$5f,$ff,$ff,$f8,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff
db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01,$01,$01,$01,$00,$00
db $01,$00,$01,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$fe,$00,$fe,$00,$fe,$00,$fe,$00
db $fe,$00,$fe,$00,$fc,$00,$fc,$00,$fc,$00,$fc,$00,$fc,$00,$fc,$00
db $00,$00,$00,$00,$00,$00,$01,$00,$01,$00,$03,$00,$03,$00,$07,$00
db $07,$00,$07,$00,$0f,$00,$0f,$00,$0f,$00,$1f,$00,$1f,$00,$3f,$00
db $3f,$00,$3f,$00,$7f,$00,$7f,$00,$7f,$00,$ff,$00,$ff,$00,$ff,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01,$00
db $03,$00,$0f,$00,$3f,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00
db $fe,$00,$fc,$00,$f8,$00,$f0,$00,$e0,$00,$c0,$00,$80,$00,$80,$00
db $fe,$00,$fc,$00,$f8,$00,$f0,$00,$e0,$00,$c0,$00,$80,$00,$00,$00
db $01,$ff,$23,$dd,$01,$ff,$ab,$55,$00,$ff,$22,$dd,$00,$ff,$88,$77
db $5e,$bf,$b8,$44,$54,$aa,$ee,$11,$55,$aa,$aa,$55,$55,$aa,$aa,$55
db $01,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$80,$ff,$80,$ff
db $00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff
db $55,$aa,$bb,$44,$55,$aa,$ee,$11,$55,$aa,$aa,$55,$55,$aa,$aa,$55
db $55,$aa,$aa,$55,$55,$aa,$aa,$55,$11,$ee,$aa,$55,$44,$bb,$aa,$55
db $11,$ee,$aa,$55,$44,$bb,$aa,$55,$00,$ff,$aa,$55,$00,$ff,$aa,$55 db $11,$ee,$aa,$55,$44,$bb,$aa,$55,$00,$ff,$aa,$55,$00,$ff,$aa,$55
db $16,$ef,$ae,$57,$46,$bf,$af,$57,$03,$ff,$ab,$57,$01,$ff,$ab,$55
db $01,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$80,$ff,$80,$ff
db $f0,$ff,$3e,$ff,$07,$ff,$01,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff
db $00,$fe,$00,$ff,$f8,$ff,$ff,$ff,$7f,$ff,$00,$ff,$00,$ff,$00,$ff
db $7f,$7f,$00,$00,$07,$ff,$ff,$ff,$ff,$ff,$01,$ff,$00,$ff,$00,$ff
db $80,$9f,$00,$3f,$00,$ff,$f0,$ff,$ff,$ff,$ff,$ff,$00,$ff,$00,$ff
db $00,$ff,$00,$ff,$00,$ff,$02,$ff,$ff,$ff,$ff,$ff,$00,$ff,$00,$ff
db $00,$ff,$22,$dd,$00,$ff,$aa,$55,$00,$ff,$22,$dd,$00,$ff,$88,$77 db $00,$ff,$22,$dd,$00,$ff,$aa,$55,$00,$ff,$22,$dd,$00,$ff,$88,$77
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$00,$80,$00 db $01,$ff,$23,$dd,$01,$ff,$ab,$55,$00,$ff,$22,$dd,$00,$ff,$88,$77
db $c0,$00,$c0,$00,$e0,$00,$e0,$00,$f0,$00,$f0,$00,$f0,$00,$f8,$00 db $80,$ff,$80,$ff,$80,$ff,$c0,$ff,$c0,$ff,$c0,$ff,$e0,$ff,$e0,$7f
db $f8,$00,$fc,$00,$fc,$00,$fe,$00,$fe,$00,$fe,$00,$ff,$00,$ff,$00 db $00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff
db $60,$ff,$60,$ff,$60,$ff,$60,$ff,$60,$ff,$30,$ff,$30,$ff,$30,$ff
.KeyArtTilesEnd: .KeyArtTilesEnd:
.BackgroundCopy: ; tiles start at 26 .BackgroundCopy: ; tiles start at 26
db $75, $1a, $1b, $61, $61, $64, $1a, $1a db $1b, $1a, $1c, $1d, $1d, $1e, $1a, $1a
db $76, $1a, $1c, $61, $61, $65, $1a, $1a db $1f, $1a, $20, $1d, $1d, $21, $1a, $1a
db $77, $1a, $63, $1d, $1e, $1f, $1a, $66 db $22, $1a, $23, $24, $25, $26, $1a, $27
db $61, $5a, $20, $21, $22, $23, $1a, $67 db $1d, $28, $29, $2a, $2b, $2c, $1a, $2d
db $61, $5b, $24, $25, $26, $27, $28, $68 db $1d, $2e, $2f, $30, $31, $32, $33, $34
db $58, $5c, $29, $2a, $2b, $2c, $2d, $61 db $35, $36, $37, $38, $39, $3a, $3b, $1d
db $59, $58, $5d, $2e, $2f, $30, $31, $61 db $3c, $35, $3d, $3e, $3f, $40, $41, $1d
db $1a, $59, $32, $33, $34, $35, $36, $6c db $1a, $3c, $42, $43, $44, $45, $46, $47
db $1a, $62, $37, $38, $39, $3a, $6b, $69 db $1a, $1a, $48, $49, $4a, $4b, $47, $1a
db $3b, $3c, $3d, $3e, $3f, $40, $57, $6a db $4c, $4d, $4e, $4f, $50, $51, $52, $53
db $41, $42, $43, $1a, $44, $45, $56, $61 db $54, $55, $56, $1a, $57, $58, $59, $1d
db $5e, $46, $71, $71, $6e, $47, $48, $71 db $5a, $5b, $5c, $5c, $5d, $5e, $5f, $5c
db $72, $49, $4a, $4b, $5f, $4c, $4d, $60 db $60, $61, $62, $63, $64, $65, $66, $67
db $73, $4e, $6f, $4f, $50, $51, $52, $53 db $68, $69, $6a, $6b, $6c, $6d, $6e, $6f
db $74, $6d, $54, $70, $70, $70, $70, $70 db $70, $71, $72, $73, $73, $73, $73, $73
db $70, $70, $55, $70, $70, $70, $70, $70 db $73, $73, $74, $73, $73, $73, $73, $73
.BackgroundCopyEnd: .BackgroundCopyEnd:

View File

@ -13,6 +13,7 @@ TheMagician:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
; CARD_VARS_START + 0 ; timer for lemniscate ; CARD_VARS_START + 0 ; timer for lemniscate
; CARD_VARS_START + 2 ; frame counter 1 ; CARD_VARS_START + 2 ; frame counter 1
@ -282,6 +283,8 @@ TheMagician:
db 22, 96, 0, 96, 0, 96, 0, 96, 0, 96, 0, 96, 0, 96, 0, 96, 0, 96, 0, 96, 0, 96, 0, 96, 0, 96, 32, 96, 33, 96, 34, 96, 35, 96, 36, 96, 37, 96, 38, 96, 39, 96, 40, 96, 41, db 22, 96, 0, 96, 0, 96, 0, 96, 0, 96, 0, 96, 0, 96, 0, 96, 0, 96, 0, 96, 0, 96, 0, 96, 0, 96, 32, 96, 33, 96, 34, 96, 35, 96, 36, 96, 37, 96, 38, 96, 39, 96, 40, 96, 41,
.fDraw: .fDraw:
ret ret
.fPrintPrep:
ret
.SpriteTiles: .SpriteTiles:
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00

View File

@ -13,6 +13,7 @@ TheHighPriestess:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
; original export script by gabriel reis, modified by shoofle ; original export script by gabriel reis, modified by shoofle
.fInit: .fInit:
@ -100,6 +101,8 @@ TheHighPriestess:
.fDraw: .fDraw:
ret ret
.fPrintPrep:
ret
.SpriteTiles: .SpriteTiles:
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00

View File

@ -13,133 +13,250 @@ TheEmpress:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: ret .fInit:
.fUpdate: ret ld hl, CVS
ld a, 0
ld [hl+], a ; CVS timer for swing
ld [hl+], a
ld [hl+], a ; CVS+2 frame of animation
ret
.fUpdate:
ld hl, CVS
call IncrementTimer
ld a, [CVS+1] ; checking the high byte of the timer
cp a, $08 ; $10 = 1 second, $02 = 1/8 of a second
jp c, :+ ; if the timer is less than $0600, skip
; if the timer is greater or equal to $0600, reset it
ld a, 0
ld [CVS], a
ld [CVS+1], a
ld b, 4
ld a, [CVS+2]
inc a
call ArrayClampLoopingB
ld [CVS+2], a
call .render
:
ret
.fDraw: ret .fDraw: ret
.fPrintPrep: ret
.render:
ld a, [CVS+2]
cp a, 0
jp nz, :+
ld hl, .sprite1
: cp a, 1
jp nz, :+
ld hl, .sprite2
: cp a, 2
jp nz, :+
ld hl, .sprite3
: cp a, 3
jp nz, :+
ld hl, .sprite4
:
ld de, MY_OAM
ld b, 8*4
ld c, 8*2
ld a, $68
call BuildMetaSpritePacked
ret
.sprite1 ; 6 talll by 8 wide = 48
db $00, $00, $08, $00, $00, $00, $0b, $0c
db $00, $09, $0a, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $0e, $04, $0d
db $00, $00, $00, $00, $0f, $05, $01, $10
db $00, $00, $00, $00, $00, $06, $03, $1e
.sprite2
db $00, $00, $08, $00, $00, $00, $0b, $0c
db $00, $09, $0a, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $0e, $19, $1a
db $00, $00, $00, $00, $0f, $1c, $1b, $1f
db $00, $00, $00, $00, $00, $06, $03, $1e
.sprite3
db $00, $20, $21, $00, $00, $00, $22, $23
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $15, $13, $14
db $00, $00, $00, $00, $0f, $1d, $16, $12
db $00, $00, $00, $00, $00, $06, $03, $1e
.sprite4
db $00, $20, $21, $00, $00, $00, $22, $23
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $15, $24, $25
db $00, $00, $00, $00, $0f, $11, $18, $17
db $00, $00, $00, $00, $00, $06, $03, $1e
.SpriteTiles: .SpriteTiles:
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $1e,$18,$6c,$08,$7d,$09,$b7,$83,$9f,$87,$8c,$84,$cc,$c4,$4c,$44
db $00,$00,$c0,$c0,$c0,$c0,$80,$80,$00,$00,$00,$00,$00,$00,$8a,$00
db $4c,$44,$2c,$04,$25,$05,$a1,$81,$81,$81,$01,$01,$00,$00,$00,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$63,$60,$73,$70
db $40,$40,$40,$40,$03,$03,$23,$23,$61,$21,$68,$20,$6c,$24,$4c,$04
db $16,$14,$12,$10,$12,$10,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $ca,$00,$4a,$00,$5a,$10,$10,$10,$10,$10,$00,$00,$00,$00,$00,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0c,$00
db $0f,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $f0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$07,$00,$00,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$f8,$00,$00,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$3f,$00,$00,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$3e,$00,$00,$00,$00,$00
db $01,$01,$01,$01,$01,$01,$08,$08,$0a,$0a,$02,$02,$00,$00,$00,$00
db $00,$00,$c7,$c7,$c7,$c7,$8e,$8e,$0c,$0c,$08,$08,$08,$08,$8e,$0c
db $40,$40,$41,$41,$01,$01,$20,$20,$60,$20,$68,$20,$6c,$24,$4c,$04
db $c0,$00,$00,$00,$61,$61,$e1,$e1,$83,$83,$06,$06,$04,$04,$8e,$0c
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0c,$0c,$0d,$0c
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$3c,$00,$00,$00
db $0f,$0c,$de,$c4,$de,$c4,$da,$c0,$cd,$c1,$4d,$41,$4a,$42,$4a,$42
db $00,$00,$60,$60,$e3,$e3,$83,$83,$06,$06,$0c,$0c,$08,$08,$8e,$0c
db $0b,$08,$ba,$88,$b6,$84,$db,$c1,$cd,$c1,$4b,$43,$4a,$42,$4e,$46
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$31,$30,$33,$30
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$bf,$00,$00,$00
db $1a,$18,$2c,$08,$bc,$88,$b5,$81,$9b,$83,$4a,$42,$4c,$44,$4c,$44
db $40,$40,$40,$40,$01,$01,$21,$21,$61,$21,$68,$20,$6c,$24,$4c,$04
db $40,$40,$40,$40,$00,$00,$20,$20,$60,$20,$68,$20,$6c,$24,$4c,$04
db $ce,$0c,$5e,$14,$5e,$14,$10,$10,$10,$10,$00,$00,$00,$00,$00,$00
db $00,$00,$63,$63,$e7,$e7,$87,$87,$0c,$0c,$08,$08,$08,$08,$8e,$0c
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0f,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0c,$00,$f0,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$03,$00,$00,$00,$00,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$f0,$00,$00,$00,$00,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$19,$18,$19,$18
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$00,$ff,$00
.SpriteTilesEnd: .SpriteTilesEnd:
EmpressMap: EmpressMap:
db $7e, $1b, $1c, $1d, $1a, $1a, $78, $79 db $7d, $7d, $67, $68, $69, $6a, $7d, $7d
db $75, $1e, $5f, $1f, $20, $21, $7d, $7a db $73, $73, $6b, $6c, $6d, $6e, $73, $73
db $76, $22, $5f, $23, $74, $7c, $24, $7b db $73, $20, $21, $6f, $70, $71, $61, $61
db $77, $25, $26, $27, $71, $28, $1a, $1a db $74, $22, $23, $60, $72, $61, $61, $61
db $1a, $29, $2a, $70, $6d, $6f, $68, $1a db $75, $24, $25, $76, $77, $78, $7a, $7b
db $1a, $2d, $2e, $6e, $60, $63, $66, $6a db $26, $49, $4a, $27, $1a, $79, $73, $73
db $2f, $30, $31, $32, $61, $64, $67, $6b db $28, $4b, $5f, $4c, $29, $1a, $1a, $1a
db $33, $34, $5f, $35, $62, $65, $69, $6c db $2a, $44, $55, $4d, $4e, $2b, $1a, $1a
db $36, $37, $38, $39, $3a, $3b, $3c, $73 db $2c, $2d, $45, $43, $52, $4f, $2e, $54
db $3d, $3e, $3f, $40, $41, $42, $1a, $1a db $2f, $30, $46, $47, $58, $53, $50, $31
db $43, $44, $45, $5f, $46, $47, $48, $1a db $32, $33, $34, $35, $48, $51, $7c, $36
db $49, $4a, $2b, $4b, $4c, $5a, $4d, $1a db $5c, $37, $38, $39, $3a, $3b, $51, $3c
db $4e, $4f, $50, $51, $52, $53, $54, $55 db $5e, $5d, $61, $59, $42, $3d, $3e, $3f
db $1a, $1a, $1a, $56, $1a, $57, $58, $59 db $62, $63, $61, $5b, $5a, $56, $40, $41
db $1a, $1a, $1a, $5b, $5c, $1a, $1a, $7f db $1a, $1a, $64, $1c, $1d, $65, $66, $57
db $1a, $1a, $1a, $5d, $5e, $1a, $1a, $1a db $1a, $1a, $1a, $1e, $1f, $1a, $1a, $1a
EmpressMapEnd: EmpressMapEnd:
EmpressTiles: EmpressTiles:
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $00,$39,$01,$f6,$07,$e8,$06,$79,$1f,$20,$3f,$40,$37,$48,$0f,$70
db $fe,$01,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00
db $00,$88,$00,$9f,$80,$7e,$c0,$26,$20,$cc,$c0,$3c,$e0,$1c,$00,$fc
db $0f,$f0,$1b,$64,$13,$ec,$25,$da,$2b,$54,$0f,$f0,$1f,$e0,$3f,$40
db $c0,$3e,$e0,$1f,$f3,$0f,$73,$8f,$53,$af,$93,$6f,$c3,$3b,$f1,$09
db $00,$80,$00,$e2,$00,$f3,$00,$ff,$80,$ff,$9c,$ff,$ff,$ff,$f3,$f7
db $00,$80,$00,$00,$00,$e2,$00,$b3,$00,$fc,$00,$ff,$c0,$cf,$ff,$ff
db $7f,$80,$1f,$e0,$9f,$60,$3f,$c0,$0f,$f0,$03,$fc,$31,$ce,$f9,$06
db $30,$cc,$b0,$4e,$88,$74,$f0,$0f,$f6,$09,$f0,$0f,$f0,$0e,$e0,$1f
db $80,$b7,$c4,$ff,$fe,$ff,$78,$ff,$ff,$ff,$6f,$6f,$3f,$3f,$01,$31
db $ff,$00,$0d,$f2,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$38,$00,$00
db $ff,$00,$ff,$00,$bf,$40,$80,$7f,$80,$7f,$18,$fe,$3c,$7c,$2c,$7c
db $f0,$0f,$9c,$63,$80,$7f,$00,$fe,$00,$fe,$0c,$00,$00,$00,$00,$00
db $54,$fe,$50,$fe,$18,$f6,$78,$86,$70,$8e,$f0,$0e,$60,$8e,$e0,$06
db $00,$00,$00,$00,$07,$07,$18,$1c,$20,$30,$40,$60,$43,$43,$86,$c7
db $2c,$7c,$2c,$7c,$fc,$fc,$0c,$0c,$02,$06,$02,$02,$e1,$e1,$3d,$bd
db $03,$03,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $00,$00,$00,$c0,$00,$30,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$c0,$00,$30,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $84,$84,$84,$8c,$8c,$8d,$88,$88,$88,$88,$98,$f8,$90,$f0,$d8,$d8 db $ff,$00,$ff,$00,$00,$00,$1f,$1f,$04,$0d,$04,$0d,$04,$0d,$04,$0d
db $05,$05,$05,$a5,$a5,$b5,$07,$07,$05,$65,$04,$04,$08,$e8,$08,$08 db $ff,$00,$ff,$00,$00,$00,$fc,$fc,$90,$b0,$90,$b0,$90,$b0,$90,$b0
db $01,$01,$00,$00,$01,$00,$07,$06,$0c,$0c,$08,$18,$18,$18,$10,$10 db $04,$0d,$04,$0d,$04,$0d,$04,$0d,$04,$0d,$1f,$1f,$00,$00,$00,$00
db $7c,$7c,$00,$03,$f8,$04,$ff,$00,$ff,$00,$7f,$00,$7f,$00,$7f,$00 db $90,$b0,$90,$b0,$90,$b0,$90,$b0,$90,$b0,$fc,$fc,$00,$00,$00,$00
db $30,$30,$40,$c0,$3c,$00,$fe,$00,$ff,$01,$ff,$00,$ff,$00,$ff,$00 db $00,$ff,$00,$ff,$00,$ff,$00,$f0,$07,$e7,$0f,$cf,$1f,$9f,$3f,$3f
db $07,$60,$07,$60,$07,$60,$04,$60,$04,$40,$84,$80,$44,$40,$04,$20 db $00,$ff,$03,$fc,$0f,$c0,$07,$00,$f1,$f0,$fc,$fc,$fe,$fe,$ff,$bf
db $10,$10,$10,$10,$10,$10,$10,$10,$10,$10,$10,$30,$10,$70,$10,$d0 db $7f,$7f,$7f,$7f,$7f,$7f,$ff,$ff,$ff,$ff,$fe,$fe,$f0,$e0,$f0,$ee
db $7f,$40,$7f,$40,$7f,$40,$7f,$40,$7f,$40,$ff,$80,$ff,$80,$ff,$80 db $ff,$df,$fe,$ee,$ff,$ff,$cf,$cf,$8f,$8f,$07,$07,$03,$03,$03,$3b
db $24,$20,$10,$90,$10,$90,$08,$88,$09,$89,$05,$85,$83,$47,$41,$a1 db $7a,$66,$10,$20,$51,$a0,$10,$a0,$0a,$b1,$85,$18,$c2,$0c,$00,$0f
db $10,$90,$10,$90,$10,$d0,$10,$d0,$1e,$9e,$03,$83,$00,$c0,$00,$c0 db $ab,$33,$80,$02,$00,$82,$04,$02,$28,$c4,$d0,$0d,$21,$18,$00,$f8
db $bc,$c3,$77,$f8,$0f,$1f,$00,$00,$00,$00,$80,$80,$f8,$f8,$3f,$47 db $00,$00,$00,$00,$0f,$0f,$1f,$1f,$3a,$3c,$78,$71,$70,$60,$70,$68
db $00,$ff,$ff,$00,$ef,$f0,$3f,$3e,$01,$03,$00,$00,$00,$00,$f8,$f8 db $00,$00,$80,$80,$f0,$f0,$78,$f8,$3c,$3c,$3c,$bc,$1e,$1e,$0f,$8f
db $c0,$30,$e0,$10,$e0,$18,$e0,$18,$fc,$04,$ff,$87,$ff,$83,$7f,$40 db $70,$60,$60,$74,$60,$70,$68,$70,$68,$72,$60,$78,$20,$38,$34,$39
db $90,$80,$40,$40,$20,$20,$10,$10,$08,$08,$04,$04,$c2,$c2,$e1,$e1 db $00,$00,$80,$80,$c0,$c0,$f0,$f0,$f8,$f8,$fc,$fc,$fe,$fe,$ff,$ff
db $2f,$90,$28,$80,$28,$80,$0f,$80,$0f,$80,$0f,$80,$0f,$00,$9a,$80 db $30,$3c,$3a,$3c,$19,$3e,$1d,$3e,$0c,$3f,$0e,$3f,$06,$3f,$07,$1f
db $82,$30,$02,$30,$00,$20,$80,$20,$c0,$21,$40,$21,$c0,$21,$80,$01 db $80,$80,$c0,$c0,$e0,$e0,$f0,$f0,$f8,$f8,$c0,$f8,$c0,$7c,$c0,$6f
db $00,$c0,$00,$c0,$00,$c0,$00,$c0,$00,$c0,$00,$40,$00,$40,$00,$60 db $03,$1f,$01,$1d,$00,$1c,$00,$0e,$00,$0e,$00,$0e,$00,$0e,$00,$0e
db $1f,$60,$1f,$20,$0f,$30,$0f,$10,$0f,$10,$0f,$10,$07,$18,$07,$18 db $bc,$c0,$9e,$e1,$cf,$f0,$67,$78,$33,$3c,$19,$1e,$0e,$0f,$07,$07
db $f8,$0c,$fc,$05,$fc,$05,$fe,$03,$ff,$01,$ff,$00,$ff,$00,$ff,$00 db $00,$c0,$00,$f0,$00,$38,$00,$0c,$00,$06,$80,$03,$00,$81,$00,$aa
db $3f,$20,$3f,$60,$3f,$60,$6f,$70,$e3,$dc,$f2,$cf,$ff,$01,$ff,$00 db $00,$0e,$00,$07,$00,$07,$00,$07,$00,$07,$00,$07,$00,$03,$00,$03
db $f0,$30,$08,$e8,$e6,$1e,$f1,$0f,$f8,$07,$7f,$80,$ff,$c0,$bf,$60 db $03,$03,$00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$00,$80,$00,$80
db $52,$40,$20,$20,$20,$20,$20,$20,$e0,$e0,$1c,$fc,$db,$27,$fe,$01 db $00,$60,$00,$60,$00,$60,$10,$70,$18,$f8,$fc,$fc,$fc,$fc,$fe,$fe
db $00,$60,$00,$20,$00,$30,$00,$30,$00,$18,$00,$08,$00,$0c,$00,$04 db $00,$03,$00,$01,$00,$00,$00,$00,$01,$00,$03,$00,$03,$00,$07,$00
db $07,$08,$07,$08,$07,$08,$03,$0c,$02,$0f,$01,$0d,$00,$0c,$00,$04 db $00,$c0,$00,$c0,$00,$e0,$00,$f0,$80,$78,$c0,$3c,$e0,$3f,$f8,$7f
db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$7f,$80,$9f,$e0,$67,$78,$1d,$1e db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$e0
db $df,$30,$cb,$3c,$e5,$1e,$f2,$0f,$f9,$07,$fc,$03,$ff,$00,$ff,$00 db $00,$07,$00,$03,$00,$03,$00,$03,$00,$01,$00,$01,$00,$01,$00,$01
db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$7f,$80,$f7,$98,$77,$f8,$b7,$78 db $fe,$fe,$fe,$fe,$fe,$fe,$fe,$fe,$fe,$fe,$7c,$fc,$7c,$fc,$b0,$f8
db $80,$80,$40,$c0,$40,$c0,$c0,$40,$c0,$40,$c0,$40,$c0,$40,$c0,$40 db $fc,$ff,$fe,$ff,$fd,$fe,$fb,$fc,$ff,$f8,$f7,$f8,$ff,$f0,$df,$e0
db $00,$06,$00,$02,$00,$03,$00,$01,$00,$01,$00,$03,$00,$06,$00,$04 db $00,$fc,$00,$ff,$c0,$3f,$f8,$07,$ff,$0f,$ff,$0f,$ff,$0e,$ff,$04
db $00,$04,$00,$00,$00,$80,$00,$80,$00,$c0,$00,$e0,$00,$18,$00,$04 db $00,$01,$00,$80,$00,$f0,$00,$fc,$00,$ff,$e0,$1f,$fe,$1f,$ff,$1f
db $ff,$80,$6f,$70,$1f,$1c,$03,$03,$00,$00,$00,$00,$00,$01,$00,$06 db $1f,$ff,$0f,$ff,$0f,$ff,$03,$7f,$01,$ff,$01,$fe,$0f,$f0,$ff,$80
db $ff,$00,$ff,$00,$ff,$00,$ff,$80,$7f,$e0,$1f,$b0,$0f,$28,$07,$24 db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$7f,$3f,$ff
db $c0,$40,$80,$c0,$80,$c0,$80,$c0,$80,$c0,$80,$c0,$80,$c0,$80,$c0 db $a0,$f0,$d0,$f0,$d8,$f8,$dc,$fc,$ec,$fc,$ee,$fe,$f6,$fe,$f6,$fe
db $00,$0c,$00,$08,$00,$18,$00,$10,$00,$31,$00,$22,$00,$24,$00,$38 db $1f,$ff,$3f,$cf,$3f,$c7,$7f,$83,$7f,$81,$7f,$80,$ff,$80,$bf,$ff
db $00,$1f,$00,$1f,$00,$60,$00,$80,$00,$00,$00,$00,$00,$00,$00,$00 db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$bf,$df
db $00,$00,$00,$ff,$00,$7f,$00,$01,$00,$01,$00,$01,$00,$01,$00,$00 db $fa,$fe,$fc,$fc,$fe,$fe,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
db $00,$78,$00,$90,$00,$10,$00,$10,$00,$10,$00,$08,$00,$88,$00,$88 db $bf,$4f,$df,$27,$df,$23,$bf,$c1,$ff,$80,$ff,$00,$ff,$00,$ff,$00
db $03,$12,$01,$11,$00,$08,$00,$08,$00,$04,$00,$07,$00,$00,$00,$00 db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$7f,$ff,$3f,$ff,$1f
db $fe,$01,$ff,$00,$ff,$80,$7f,$c0,$3f,$b0,$0f,$9c,$0b,$0b,$10,$10 db $fe,$83,$fe,$87,$fe,$cf,$fe,$cf,$ff,$e7,$ff,$e3,$ff,$e3,$ff,$f1
db $80,$80,$60,$e0,$d0,$30,$e8,$1c,$fd,$07,$fe,$03,$ff,$00,$ff,$c0 db $00,$7c,$00,$07,$00,$01,$00,$00,$c0,$00,$f0,$00,$00,$f8,$00,$fe
db $3c,$3c,$44,$44,$44,$44,$84,$84,$04,$84,$04,$84,$04,$84,$04,$84 db $07,$06,$07,$07,$03,$83,$83,$03,$c3,$03,$c1,$21,$70,$80,$30,$c8
db $00,$c4,$00,$44,$00,$62,$00,$23,$00,$31,$00,$19,$00,$0f,$00,$00 db $06,$06,$04,$04,$cc,$0c,$d8,$28,$ff,$08,$ff,$08,$f8,$0f,$3f,$cf
db $10,$10,$10,$10,$18,$18,$0c,$0c,$06,$06,$03,$03,$01,$01,$00,$00 db $cc,$ff,$fc,$ff,$70,$71,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $ff,$f0,$6f,$7c,$33,$37,$18,$1b,$0c,$0e,$04,$06,$86,$87,$fe,$ff db $00,$ff,$0e,$ff,$00,$ff,$00,$ff,$00,$3f,$00,$1f,$00,$0f,$00,$0f
db $04,$0c,$04,$8c,$08,$88,$88,$98,$90,$d8,$f0,$fc,$00,$84,$00,$84 db $03,$ff,$7f,$ff,$7f,$ff,$7f,$ff,$3f,$ff,$3f,$ff,$1f,$ff,$1f,$ff
db $b7,$78,$d7,$38,$f7,$18,$ff,$08,$ff,$08,$f7,$0c,$fb,$06,$fd,$03 db $07,$18,$07,$78,$88,$f0,$e0,$c0,$60,$e0,$30,$30,$1f,$5c,$07,$17
db $00,$00,$00,$00,$00,$00,$00,$1f,$00,$04,$00,$04,$00,$04,$00,$04 db $f0,$0c,$23,$07,$23,$03,$03,$03,$03,$03,$01,$01,$87,$01,$01,$01
db $00,$00,$00,$00,$00,$00,$00,$fc,$00,$90,$00,$90,$00,$90,$00,$90 db $01,$05,$00,$01,$00,$00,$00,$00,$18,$18,$1c,$1c,$0c,$0c,$0e,$0e
db $00,$04,$00,$04,$00,$04,$00,$04,$00,$04,$00,$1f,$00,$00,$00,$00 db $07,$07,$03,$83,$03,$03,$01,$01,$01,$01,$01,$01,$01,$00,$03,$00
db $00,$90,$00,$90,$00,$90,$00,$90,$00,$90,$00,$fc,$00,$00,$00,$00 db $0f,$00,$fe,$01,$f9,$06,$e4,$18,$90,$60,$40,$80,$80,$00,$00,$c0
db $9f,$9f,$87,$07,$03,$03,$01,$01,$01,$00,$01,$00,$01,$00,$01,$00
db $d0,$67,$d0,$61,$d8,$60,$dc,$e0,$c7,$f8,$f9,$fe,$7e,$ff,$3f,$ff
db $00,$a5,$00,$b5,$00,$f5,$e0,$f5,$e0,$f5,$e0,$f7,$e3,$ff,$7f,$ff
db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
db $01,$00,$01,$00,$3f,$c0,$1f,$60,$07,$39,$01,$0f,$00,$03,$00,$00
db $3f,$7f,$3f,$7f,$2f,$7f,$37,$7f,$3b,$ff,$fd,$ff,$fe,$ff,$ff,$ff
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$00,$c0
db $00,$00,$00,$00,$f3,$00,$ff,$00,$ff,$80,$ff,$e0,$ff,$ff,$1f,$1f
db $ff,$e3,$eb,$f5,$f3,$7d,$ff,$3f,$ff,$0f,$ff,$03,$ff,$00,$ff,$00
db $ff,$0f,$ff,$07,$ff,$03,$ff,$01,$ff,$00,$0f,$00,$02,$00,$00,$00
db $00,$00,$80,$01,$80,$01,$c0,$05,$40,$95,$00,$d5,$00,$d5,$00,$d7
db $ff,$1f,$ff,$0f,$ff,$0f,$ff,$07,$ff,$07,$ff,$03,$ff,$03,$ff,$01
db $ff,$f0,$ff,$f8,$ff,$f8,$ff,$7c,$ff,$7c,$ff,$3e,$ff,$1e,$ff,$0e
db $ff,$01,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00
db $0f,$00,$0f,$00,$1f,$01,$1f,$01,$3f,$01,$3f,$03,$3f,$03,$3f,$07
db $ff,$c0,$ff,$80,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00
db $3f,$0f,$3f,$0f,$3f,$1f,$3f,$1e,$3f,$0c,$3f,$00,$3f,$00,$1f,$00
db $e3,$e3,$3f,$3f,$07,$47,$00,$15,$00,$00,$00,$00,$00,$00,$00,$00
db $02,$3f,$1c,$7f,$3f,$1f,$3f,$00,$bf,$80,$bf,$80,$bf,$80,$bf,$80
db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00 db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00
db $eb,$03,$eb,$03,$fe,$06,$fc,$1f,$fe,$3f,$f8,$3f,$fc,$3f,$f1,$7e db $0f,$00,$07,$00,$03,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $f9,$7e,$71,$7e,$7b,$7c,$63,$7c,$73,$7c,$e7,$f8,$e4,$f8,$c4,$d0 db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$7f,$00,$0f,$00,$03,$00,$00,$00
db $8c,$b1,$88,$b1,$88,$b1,$88,$b1,$88,$a1,$98,$a1,$98,$a1,$18,$21 db $1f,$00,$03,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $88,$f9,$00,$53,$31,$4f,$e1,$1f,$f3,$0f,$e3,$1a,$e7,$18,$e7,$18 db $ff,$00,$c1,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $e7,$18,$c7,$30,$ce,$31,$cf,$30,$9c,$63,$0e,$f1,$08,$b7,$08,$b5 db $ff,$00,$ff,$00,$3f,$00,$07,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $08,$f5,$0b,$f4,$13,$68,$13,$68,$03,$68,$07,$68,$07,$78,$27,$d0 db $00,$80,$03,$03,$00,$80,$00,$50,$00,$fc,$60,$fe,$60,$ff,$70,$ff
db $e6,$fe,$e4,$f4,$c4,$f4,$c3,$f0,$ce,$b0,$c7,$38,$8e,$70,$c7,$38 db $00,$01,$00,$01,$00,$03,$00,$10,$00,$40,$00,$7c,$00,$f6,$00,$ff
db $0f,$f1,$9f,$60,$0d,$f1,$1f,$e1,$39,$c7,$1d,$e3,$71,$8d,$79,$85 db $00,$00,$00,$80,$00,$c0,$00,$00,$00,$00,$00,$40,$00,$7c,$00,$98
db $00,$1e,$c0,$df,$c0,$fe,$80,$ff,$80,$fc,$00,$fe,$00,$ec,$60,$fe db $00,$02,$00,$1c,$00,$00,$00,$c0,$00,$e0,$00,$3c,$00,$3c,$00,$1e
db $e3,$1f,$d3,$2e,$c1,$3c,$81,$3c,$83,$3c,$82,$38,$82,$38,$82,$38 db $73,$ff,$7f,$ff,$3e,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff
db $78,$78,$70,$70,$fe,$f8,$fe,$f0,$fe,$f8,$fe,$e0,$fe,$f0,$fc,$e0 db $80,$ff,$f8,$f9,$7f,$ff,$3f,$ff,$3c,$ff,$1d,$ff,$1d,$ff,$1c,$ff
db $fc,$f0,$fc,$c0,$fc,$e0,$f8,$81,$f8,$c1,$f0,$83,$f0,$c3,$e0,$07 db $00,$f8,$00,$fe,$e0,$fb,$f0,$f6,$d8,$ff,$bf,$ff,$0f,$ff,$0f,$ff
db $80,$0e,$80,$0e,$00,$1c,$00,$1c,$00,$3c,$00,$38,$00,$20,$00,$40 db $00,$00,$00,$00,$01,$01,$01,$fd,$83,$ff,$c2,$ff,$0e,$ff,$fc,$ff
db $f0,$ff,$e3,$fc,$f1,$fe,$c3,$f8,$e6,$f8,$04,$60,$05,$c1,$2d,$c1 db $f9,$1f,$fa,$1f,$fa,$1f,$fa,$1f,$fa,$1f,$f0,$1f,$72,$1f,$72,$1f
db $01,$1f,$00,$3e,$03,$3e,$01,$3e,$03,$3e,$01,$7e,$03,$78,$03,$70 db $7f,$8d,$7f,$80,$ff,$80,$ff,$80,$ff,$80,$ff,$80,$ff,$80,$7f,$80
db $e0,$0c,$c1,$0d,$83,$0f,$87,$1f,$67,$7f,$c7,$f7,$ce,$fe,$c8,$f8 db $ff,$e0,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$01,$01,$00,$0f,$01,$0f,$00,$1f db $3f,$c0,$1f,$e0,$ff,$c0,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00
db $00,$c0,$00,$00,$0c,$0c,$1c,$1f,$38,$3f,$3c,$3f,$70,$7f,$79,$7e db $00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff
db $00,$00,$00,$00,$00,$00,$00,$80,$00,$80,$00,$00,$00,$00,$00,$00 db $00,$ff,$0f,$f0,$06,$f8,$00,$fe,$00,$fe,$00,$fe,$02,$fc,$06,$f8
db $00,$40,$00,$40,$00,$80,$00,$80,$00,$00,$00,$00,$00,$00,$00,$00 db $02,$fc,$00,$fe,$00,$ff,$00,$ff,$e0,$1f,$ff,$00,$00,$00,$00,$00
db $81,$83,$01,$01,$00,$00,$00,$80,$00,$c0,$00,$c0,$00,$40,$00,$c0 db $3f,$00,$7f,$00,$01,$7e,$00,$ff,$00,$ff,$00,$ff,$80,$7f,$ff,$00
db $00,$00,$00,$03,$00,$07,$00,$0e,$00,$18,$00,$0a,$00,$02,$00,$07 db $ff,$00,$ff,$00,$ff,$00,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$fe,$01
db $00,$0f,$00,$0f,$00,$0f,$00,$0b,$00,$07,$00,$07,$00,$07,$00,$07 db $ff,$00,$ff,$00,$ff,$00,$07,$f8,$00,$ff,$00,$ff,$00,$ff,$00,$ff
db $00,$07,$00,$0e,$00,$0f,$00,$0c,$00,$01,$00,$01,$00,$00,$00,$00 db $00,$ff,$00,$1f,$00,$3f,$00,$ff,$00,$ff,$00,$7f,$00,$03,$00,$00
db $00,$39,$00,$ff,$00,$37,$00,$00,$00,$12,$00,$00,$00,$00,$00,$00 db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$03,$fc,$00,$ff,$00,$ff,$00,$ff
db $00,$94,$00,$fc,$00,$ee,$00,$f6,$00,$7e,$00,$7e,$00,$1c,$00,$1c db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$00,$ff,$00,$ff,$00,$ff,$00,$ff
db $00,$0c,$00,$04,$00,$e6,$00,$ff,$00,$f7,$00,$1f,$00,$07,$00,$1e db $bf,$ff,$df,$ff,$ef,$ff,$f7,$ff,$f9,$ff,$fe,$ff,$ff,$ff,$ff,$ff
db $00,$fc,$00,$f8,$00,$fc,$6e,$ff,$f8,$ff,$18,$98,$f0,$f0,$e0,$f0 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$ff,$00,$ff
db $ff,$ff,$e6,$ff,$ed,$ff,$68,$ff,$60,$ff,$48,$fe,$50,$fe,$54,$fe
db $00,$06,$00,$07,$00,$01,$00,$e1,$00,$c0,$00,$c0,$00,$f0,$00,$d8
db $00,$00,$00,$00,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $00,$84,$00,$fc,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
EmpressTilesEnd: EmpressTilesEnd:

View File

@ -13,6 +13,7 @@ TheEmperor:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: .fInit:
ld hl, CVS ld hl, CVS
@ -316,6 +317,7 @@ TheEmperor:
db $00, $00 db $00, $00
db $00, $00 db $00, $00
.fDraw: ret .fDraw: ret
.fPrintPrep: ret
.SpriteTiles: .SpriteTiles:
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $03,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $03,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00

View File

@ -15,6 +15,7 @@ TheHierophant:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: .fInit:
ld hl, CVS ld hl, CVS
@ -77,6 +78,7 @@ TheHierophant:
.fDraw: .fDraw:
ret ret
.fPrintPrep: ret
.halo ; 5 tall 7 wide sprites .halo ; 5 tall 7 wide sprites
db $00, $01, $02, $0d, $03, $04, $00 db $00, $01, $02, $0d, $03, $04, $00

View File

@ -13,6 +13,7 @@ TheLovers:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: .fInit:
ld hl, CVS ld hl, CVS
@ -45,6 +46,7 @@ TheLovers:
call .doRipples call .doRipples
ret ret
.fDraw: ret .fDraw: ret
.fPrintPrep: ret
.doRipples: .doRipples:
ld a, [CVS+2] ld a, [CVS+2]

View File

@ -13,6 +13,7 @@ TheChariot:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: .fInit:
ld a, %00100100 ld a, %00100100
@ -130,6 +131,7 @@ TheChariot:
.fDraw: ret .fDraw: ret
.fPrintPrep: ret
.horse1 ;; 8 by 4 .horse1 ;; 8 by 4
db $01, $02, $03, $04 db $01, $02, $03, $04
db $00, $10, $11, $12 db $00, $10, $11, $12

View File

@ -13,6 +13,7 @@ Strength:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: .fInit:
ld hl, CVS ld hl, CVS
@ -118,6 +119,7 @@ Strength:
ret ret
.fDraw: ret .fDraw: ret
.fPrintPrep: ret
.cloud1 .cloud1
db $09, $05, $06 db $09, $05, $06

View File

@ -13,10 +13,12 @@ TheHermit:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: ret .fInit: ret
.fUpdate: ret .fUpdate: ret
.fDraw: ret .fDraw: ret
.fPrintPrep: ret
.SpriteTiles: .SpriteTiles:
.SpriteTilesEnd: .SpriteTilesEnd:
; original export script by gabriel reis, modified by shoofle ; original export script by gabriel reis, modified by shoofle

View File

@ -13,6 +13,7 @@ WheelOfFortune:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: .fInit:
ld hl, CVS ld hl, CVS
@ -36,7 +37,25 @@ WheelOfFortune:
; final row ; final row
ld [hl+], a ; CVS+12 ld [hl+], a ; CVS+12
ld [hl+], a ; CVS+13 ld [hl+], a ; CVS+13
; setting up the positioins of all the sprites now that w'ere drawing with
; sprites and not background tiles
ld hl, .numbersBlockSprite
ld de, MY_OAM
ld b, 24 + 6*8
ld c, 16 + 2*8
ld a, $44
call BuildMetaSprite
; location of source tile map: hl
; location in memory to write to: de
; y and x in b and c
; height and width in a & %11110000 and a & %00001111 ??? that's deranged
ret ret
.numbersBlockSprite
db $90, $00, $00, $90
db $00, $00, $00, $00
db $00, $00, $00, $00
db $90, $00, $00, $90
.fUpdate: .fUpdate:
ld hl, CVS ld hl, CVS
@ -44,136 +63,91 @@ WheelOfFortune:
ld a, [CVS+1] ; checking the high byte of the timer ld a, [CVS+1] ; checking the high byte of the timer
cp a, $04 ; $10 = 1 second, $02 = 1/8 of a second cp a, $04 ; $10 = 1 second, $02 = 1/8 of a second
jp c, :+ ; if the timer is less than $0600, skip jp c, :+ ; if the timer is less than $0400, skip
; if the timer is greater or equal to $0400, reset it and update numbers
; if the timer is greater or equal to $0600, reset it ld a, 0
ld a, 0 ld [CVS], a
ld [CVS], a ld [CVS+1], a
ld [CVS+1], a call .updateNumbers
call .updateNumbers :
:
ret ret
.updateNumbers: .updateNumbers:
call OneRandomByte call OneRandomByte
ld hl, rLFSR ld hl, rLFSR
ld de, CVS+2 ld de, CVS+2
call .WriteByte call DrawByte
call OneRandomByte call OneRandomByte
ld hl, rLFSR ld hl, rLFSR
ld de, CVS+4 ld de, CVS+4
call .WriteByte call DrawByte
call OneRandomByte call OneRandomByte
ld hl, rLFSR ld hl, rLFSR
ld de, CVS+6 ld de, CVS+6
call .WriteByte call DrawByte
call OneRandomByte call OneRandomByte
ld hl, rLFSR ld hl, rLFSR
ld de, CVS+8 ld de, CVS+8
call .WriteByte call DrawByte
call OneRandomByte call OneRandomByte
ld hl, rLFSR ld hl, rLFSR
ld de, CVS+10 ld de, CVS+10
call .WriteByte call DrawByte
call OneRandomByte call OneRandomByte
ld hl, rLFSR ld hl, rLFSR
ld de, CVS+12 ld de, CVS+12
call .WriteByte call DrawByte
; draw those into sprites
ld a, [CVS+2]
ld hl, MY_OAM + 2 + 1*4
ld [hl], a
ld a, [CVS+3]
ld hl, MY_OAM + 2 + 2*4
ld [hl], a
ld a, [CVS+4]
ld hl, MY_OAM + 2 + 4*4
ld [hl], a
ld a, [CVS+5]
ld hl, MY_OAM + 2 + 5*4
ld [hl], a
ld a, [CVS+6]
ld hl, MY_OAM + 2 + 6*4
ld [hl], a
ld a, [CVS+7]
ld hl, MY_OAM + 2 + 7*4
ld [hl], a
ld a, [CVS+8]
ld hl, MY_OAM + 2 + 8*4
ld [hl], a
ld a, [CVS+9]
ld hl, MY_OAM + 2 + 9*4
ld [hl], a
ld a, [CVS+10]
ld hl, MY_OAM + 2 + 10*4
ld [hl], a
ld a, [CVS+11]
ld hl, MY_OAM + 2 + 11*4
ld [hl], a
ld a, [CVS+12]
ld hl, MY_OAM + 2 + 13*4
ld [hl], a
ld a, [CVS+13]
ld hl, MY_OAM + 2 + 14*4
ld [hl], a
ret ret
.fDraw: .fDraw: ret
ld hl, CVS+2 .fPrintPrep: ret
ld de, _SCRN0 + 3+1 + 7*32
ld a, [hl+]
ld [de], a
inc de
ld a, [hl+]
ld [de], a ; first two tiles
ld de, _SCRN0 + 3+0 + 8*32
ld a, [hl+]
ld [de], a
inc de
ld a, [hl+]
ld [de], a
inc de
ld a, [hl+]
ld [de], a
inc de
ld a, [hl+]
ld [de], a ; second row, four tles
ld de, _SCRN0 + 3+0 + 9*32
ld a, [hl+]
ld [de], a
inc de
ld a, [hl+]
ld [de], a
inc de
ld a, [hl+]
ld [de], a
inc de
ld a, [hl+]
ld [de], a ; third row, four tiles
ld de, _SCRN0 + 3+1 + 10*32
ld a, [hl+]
ld [de], a
inc de
ld a, [hl+]
ld [de], a ; final two tiles
ret
.WriteByte: ; accepts [hl] as the number to write, de as location to write tile IDs to
; writes tile IDs for one byte (two nibbles) from [hl] into [de]
ld b, 0
push hl
ld a, [hl]
swap a
and a, $0F
ld c, a
ld hl, .lowerHex
add hl, bc
ld a, [hl]
ld [de], a
inc de
pop hl
ld a, [hl]
and a, $0F
ld c, a
ld hl, .lowerHex
add hl, bc
ld a, [hl]
ld [de], a
ret
.hex ; tile IDs for hex values. this can live elsewhere alongside WriteByte
; 0, 1, 2, 3,
db $a0, $a1, $a2, $a3
; 4, 5, 6, 7,
db $a4, $a5, $a6, $a7
; 8, 9
db $a8, $a9
; a, b, c, d, e, f
db $b1, $b2, $b3, $b4, $b5, $b6
.lowerHex ; tile IDs for hex values. this can live elsewhere alongside WriteByte
; 0, 1, 2, 3,
db $a0, $a1, $a2, $a3
; 4, 5, 6, 7,
db $a4, $a5, $a6, $a7
; 8, 9
db $a8, $a9
; a, b, c, d, e, f
db $d1, $d2, $d3, $d4, $d5, $d6
.SpriteTiles: .SpriteTiles:
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.SpriteTilesEnd: .SpriteTilesEnd:
; original export script by gabriel reis, modified by shoofle ; original export script by gabriel reis, modified by shoofle
@ -276,10 +250,10 @@ WheelOfFortune:
db $55, $55, $55, $5b, $61, $62, $55, $55 db $55, $55, $55, $5b, $61, $62, $55, $55
db $56, $4c, $20, $21, $22, $23, $4d, $56 db $56, $4c, $20, $21, $22, $23, $4d, $56
db $1f, $25, $26, $27, $28, $29, $2a, $24 db $1f, $25, $26, $27, $28, $29, $2a, $24
db $2b, $2c, $2d, $2e, $2e, $2f, $30, $31 db $2b, $2c, $2d, $1a, $1a, $2f, $30, $31
db $32, $33, $2e, $2e, $2e, $2e, $34, $35 db $32, $33, $1a, $1a, $1a, $1a, $34, $35
db $36, $37, $2e, $2e, $2e, $2e, $38, $39 db $36, $37, $1a, $1a, $1a, $1a, $38, $39
db $3a, $3b, $3c, $2e, $2e, $3d, $3e, $3f db $3a, $3b, $3c, $1a, $1a, $3d, $3e, $3f
db $4e, $41, $42, $43, $44, $45, $46, $4f db $4e, $41, $42, $43, $44, $45, $46, $4f
db $50, $40, $48, $49, $4a, $4b, $47, $51 db $50, $40, $48, $49, $4a, $4b, $47, $51
db $6f, $63, $64, $57, $57, $66, $67, $6f db $6f, $63, $64, $57, $57, $66, $67, $6f

View File

@ -13,6 +13,7 @@ Justice:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: .fInit:
ld hl, CVS ld hl, CVS
@ -45,6 +46,7 @@ Justice:
: :
ret ret
.fDraw: ret .fDraw: ret
.fPrintPrep: ret
.swing: .swing:
ld b, 6 ld b, 6

View File

@ -13,6 +13,7 @@ TheHangedMan:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: .fInit:
ld hl, CVS ld hl, CVS
@ -47,6 +48,7 @@ TheHangedMan:
: :
ret ret
.fDraw: ret .fDraw: ret
.fPrintPrep: ret
.swing: .swing:
ld a, [CVS+2] ld a, [CVS+2]

View File

@ -13,6 +13,7 @@ Death:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: .fInit:
ld hl, CVS ld hl, CVS
@ -123,6 +124,7 @@ Death:
: :
ret ret
.fDraw: ret .fDraw: ret
.fPrintPrep: ret
.blink: .blink:
ld a, 2 ld a, 2

View File

@ -13,6 +13,7 @@ Temperance:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: .fInit:
ld hl, CVS ld hl, CVS
@ -29,19 +30,19 @@ Temperance:
cp a, $01 ; $10 = 1 second, $02 = 1/8 of a second cp a, $01 ; $10 = 1 second, $02 = 1/8 of a second
jp c, :+ jp c, :+
ld a, 0 ld a, 0
ld [CVS], a ld [CVS], a
ld [CVS+1], a ld [CVS+1], a
ld b, 6 ld b, 6
ld a, [CVS+2] ld a, [CVS+2]
inc a inc a
call ArrayClampLoopingB call ArrayClampLoopingB
ld [CVS+2], a ld [CVS+2], a
call .waterfall call .waterfall
: :
ret ret
.fDraw: .fDraw:
@ -54,18 +55,18 @@ Temperance:
cp a, 2 cp a, 2
jp z, .frame2 jp z, .frame2
.frame0 .frame0
ld a, %10_01_00_00 ld a, %10_01_00_00
ld [rOBP0], a ld [rOBP0], a
ret ret
.frame1 .frame1
ld a, %01_00_10_00 ld a, %01_00_10_00
ld [rOBP0], a ld [rOBP0], a
ret ret
.frame2 .frame2
ld a, %00_10_01_00 ld a, %00_10_01_00
ld [rOBP0], a ld [rOBP0], a
ret ret
.waterfall: .waterfall:
ld hl, .waterfall1 ld hl, .waterfall1
@ -81,6 +82,8 @@ Temperance:
call BuildMetaSprite call BuildMetaSprite
ret ret
.fPrintPrep: ret
.waterfall1 .waterfall1
db $00, $00, $0f db $00, $00, $0f
db $13, $12, $11 db $13, $12, $11

View File

@ -13,10 +13,12 @@ TheDevil:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: ret .fInit: ret
.fUpdate: ret .fUpdate: ret
.fDraw: ret .fDraw: ret
.fPrintPrep: ret
.SpriteTiles: .SpriteTiles:
.SpriteTilesEnd: .SpriteTilesEnd:
; original export script by gabriel reis, modified by shoofle ; original export script by gabriel reis, modified by shoofle

View File

@ -13,6 +13,7 @@ TheTower:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: .fInit:
ld hl, CVS ld hl, CVS
@ -180,7 +181,10 @@ TheTower:
ld a, %00_01_10_00 ld a, %00_01_10_00
ld [rOBP1], a ld [rOBP1], a
ret ret
.fPrintPrep:
ld a, 1
ld [CVS+2], a
ret
.bolt: ; $55, 18 active sprites .bolt: ; $55, 18 active sprites

View File

@ -13,6 +13,7 @@ TheStar:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: .fInit:
ld hl, CVS ld hl, CVS
@ -169,11 +170,9 @@ TheStar:
call ArrayClampLoopingB call ArrayClampLoopingB
ld [CVS+5], a ld [CVS+5], a
: :
call .flicker
ret ret
.flicker: .flicker:
ret ret
.fDraw: .fDraw:
ld a, [CVS+2] ld a, [CVS+2]
@ -203,6 +202,8 @@ TheStar:
ld [rOBP0], a ld [rOBP0], a
ret ret
.fPrintPrep: ret
.starflare .starflare
db $09, $0a, $0b, $0c db $09, $0a, $0b, $0c
db $07, $08, $0d, $04 db $07, $08, $0d, $04

View File

@ -13,6 +13,7 @@ TheMoon:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: .fInit:
ld hl, CVS ld hl, CVS
@ -136,7 +137,7 @@ TheMoon:
ret ret
.fDraw: ret .fDraw: ret
.fPrintPrep: ret
.cloud1 .cloud1
db $17 db $17

View File

@ -13,6 +13,7 @@ TheSun:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: .fInit:
ld hl, CVS ld hl, CVS
@ -66,7 +67,7 @@ TheSun:
ret ret
.fDraw: ret .fDraw: ret
.fPrintPrep: ret
.frame1 ; $48 .frame1 ; $48
db $66, $66, $02, $21, $53, $12, $22, $66 db $66, $66, $02, $21, $53, $12, $22, $66
db $03, $00, $3b, $3c, $3d, $3e, $18, $14 db $03, $00, $3b, $3c, $3d, $3e, $18, $14

View File

@ -13,6 +13,7 @@ Judgement:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: .fInit:
ld hl, CVS ld hl, CVS
@ -174,7 +175,7 @@ Judgement:
ret ret
.fDraw: ret .fDraw: ret
.fPrintPrep: ret
.drawSpark: .drawSpark:
; hl should point to a curve animation ; hl should point to a curve animation
; d should be the offset into the tile IDs for the sprite animation? ; d should be the offset into the tile IDs for the sprite animation?

View File

@ -21,6 +21,7 @@ TheWorld:
dw .fInit dw .fInit
dw .fUpdate dw .fUpdate
dw .fDraw dw .fDraw
dw .fPrintPrep
.fInit: .fInit:
ld hl, CVS ld hl, CVS
@ -459,8 +460,6 @@ TheWorld:
dw .stripes + 78 dw .stripes + 78
db 70 db 70
dw .stripes + 84 dw .stripes + 84
db 75
dw .stripes + 90
db 255 db 255
.stripes .stripes
@ -479,7 +478,10 @@ db $22, $23, $2b, $27, $29, $30
db $34, $37, $00, $28, $2a, $31 db $34, $37, $00, $28, $2a, $31
db $35, $38, $00, $00, $39, $00 db $35, $38, $00, $00, $39, $00
db $36, $00, $00, $00, $00, $00 db $36, $00, $00, $00, $00, $00
.fDraw: ret .fDraw: ret
.fPrintPrep: ret
.SpriteTiles: .SpriteTiles:
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff db $00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff

View File

@ -17,7 +17,7 @@ def ASYNC_STACK_TOP equ $ffc0
def ASYNC_THREAD_CALL equ ASYNC_STACK_TOP - 2 - 2 def ASYNC_THREAD_CALL equ ASYNC_STACK_TOP - 2 - 2
; timing for async execution, in scanlines ; timing for async execution, in scanlines
def SAFE_ASYNC_START EQU 146 def SAFE_ASYNC_START EQU 145
def SAFE_ASYNC_END EQU 0 def SAFE_ASYNC_END EQU 0
Async_Spawn_HL: Async_Spawn_HL:
@ -159,28 +159,19 @@ Async_Spawn:
reti reti
Async_Kill:
ld hl, EndOfInstructions
call Async_Spawn_HL
ret
Async_EnterThread: Async_EnterThread:
;stack looks like: ;stack looks like:
;c113 (SMC int @ LYC 90 pc), 004b (hw int @ LYC 90 pc), outer context pc ;c113 (SMC int @ LYC 90 pc), 004b (hw int @ LYC 90 pc), outer context pc
; 16 cycles
push af push af
push bc push bc
push de push de
push hl push hl
; check if there's anything queued up for executing; if no, just clean up
ld a, LOW(ASYNC_STACK_TOP) ; we're checkng if the current async stack is empty
ld hl, vAsyncThreadSP ; comparing to the current thread sp
cp a, [hl] ; are they equal?
jp z, Async_CleanUpThread
;af, de, bc, hl, c113 (SMC interrupt pc), 004b (hardwired interrput pc), outer context pc ;af, de, bc, hl, c113 (SMC interrupt pc), 004b (hardwired interrput pc), outer context pc
; 18 cycles
ld a, LOW(Async_ExitThread) ld a, LOW(Async_ExitThread)
ld [INTERRUPT_LCD], a ld [INTERRUPT_LCD], a
ld a, HIGH(Async_ExitThread) ld a, HIGH(Async_ExitThread)
@ -188,20 +179,19 @@ Async_EnterThread:
ld a, SAFE_ASYNC_END ; CHANGE ME TO ADJUST SAFE TRANSFER TIMING ld a, SAFE_ASYNC_END ; CHANGE ME TO ADJUST SAFE TRANSFER TIMING
ld [rLYC], a ; set lcd interrupt handler to EXIT SAFE MODE on line 153 ld [rLYC], a ; set lcd interrupt handler to EXIT SAFE MODE on line 153
; 5 cycles
; save main thread stack pointer ; save main thread stack pointer
ld hl, sp+0 ld [vAsyncMainSP], sp
ld a, l
ld [vAsyncMainSP], a
ld a, h
ld [vAsyncMainSP+1], a
; 12 cycless
; load side thread stack pointer ; load side thread stack pointer
ld a, [vAsyncThreadSP] ld a, [vAsyncThreadSP] ; 4
ld l, a ld l, a ; 1
ld a, [vAsyncThreadSP+1] ld a, [vAsyncThreadSP+1] ; 4
ld h, a ld h, a ; 1
ld sp, hl ld sp, hl ; 2
; 12 cycles
; pop registers ; pop registers
; canonical ordering to push should be: AF, BC, DE, HL, ; canonical ordering to push should be: AF, BC, DE, HL,
; pop is HL, DE, BC, AF ; pop is HL, DE, BC, AF
@ -210,7 +200,8 @@ Async_EnterThread:
pop bc pop bc
pop af pop af
reti ; "return" to the vAsyncPC wee put on the stack previously. ; 4 cycles
reti ; "return" to the vAsyncPC wee put on the stack previously. ; 4
; this is more or less a jump, not a return. ; this is more or less a jump, not a return.
; is that the source of our problems? ; is that the source of our problems?
; after this instruction executes, stack looks like: ; after this instruction executes, stack looks like:
@ -224,8 +215,6 @@ Async_ExitThread:
push de push de
push hl push hl
;af, de, bc, hl, c113 (SMC interrupt pc), 004b (hardwired interrput pc), thread pc, return
ld a, LOW(Async_EnterThread) ld a, LOW(Async_EnterThread)
ld [INTERRUPT_LCD], a ld [INTERRUPT_LCD], a
ld a, HIGH(Async_EnterThread) ld a, HIGH(Async_EnterThread)
@ -234,11 +223,7 @@ Async_ExitThread:
ld [rLYC], a ; set lcd interrupt handler to EXIT SAFE MODE on line 153 ld [rLYC], a ; set lcd interrupt handler to EXIT SAFE MODE on line 153
; save side thread stack pointer ; save side thread stack pointer
ld hl, sp+0 ld [vAsyncThreadSP], sp
ld a, l
ld [vAsyncThreadSP], a
ld a, h
ld [vAsyncThreadSP+1], a
; load main thread stack pointer ; load main thread stack pointer
ld a, [vAsyncMainSP] ld a, [vAsyncMainSP]
@ -263,11 +248,7 @@ Async_EarlyReturn:
; don't care about current registers bc we're done executing. ; don't care about current registers bc we're done executing.
; store side thread SP, so everyone knows that the side thread stack is empty ; store side thread SP, so everyone knows that the side thread stack is empty
ld hl, sp+0 ld [vAsyncThreadSP], sp ; 5 cycles instead of 13
ld a, l
ld [vAsyncThreadSP], a
ld a, h
ld [vAsyncThreadSP+1], a
; unset next call ; unset next call
ld hl, rIE ld hl, rIE
@ -289,15 +270,3 @@ Async_EarlyReturn:
pop hl pop hl
reti reti
Async_CleanUpThread:
;stack looks like:
;hl, de, bc, af, c113 (SMC int @ LYC 90 pc), 004b (hw int @ LYC 90 pc), outer context pc
pop hl
pop de
pop bc
pop af
reti

View File

@ -579,7 +579,7 @@ ChangeLoadedWave:
ld c, a ld c, a
add hl, bc ; hl shoulld now ponit to the appropriate wave add hl, bc ; hl shoulld now ponit to the appropriate wave
ld de, _AUD3WAVERAM ld de, _AUD3WAVERAM
ld bc, 16 / 8 ; using by8s for unnecessary optimization, so divide length by 8 ld bc, 16
call CopyRangeBy8s call CopyRangeBy8s
pop af pop af

View File

@ -85,6 +85,10 @@ LoadCardDataAsync:
ld [hl], c ld [hl], c
inc hl inc hl
ld [hl], b ld [hl], b
ld hl, CARD_PRINT_PREP
ld [hl], c
inc hl
ld [hl], b
ei ei
ld a, [vSelectedCardIndex] ld a, [vSelectedCardIndex]
@ -117,15 +121,15 @@ LoadCardDataAsync:
; so when we're done writing one, hl will be correctly placed to read the next ; so when we're done writing one, hl will be correctly placed to read the next
; length-prefixed print doesn't require passing a length ; length-prefixed print doesn't require passing a length
; so all we have to set is the destination for each ; so all we have to set is the destination for each
ld de, $9800 + 32*11 + 10 ld de, _SCRN0 + 32*11 + 10
call PrintString call PrintString
ld de, $9800 + 32*12 + 10 ld de, _SCRN0 + 32*12 + 10
call PrintString call PrintString
ld de, $9800 + 32*14 + 10 ld de, _SCRN0 + 32*14 + 10
call PrintString call PrintString
ld de, $9800 + 32*15 + 10 ld de, _SCRN0 + 32*15 + 10
call PrintString call PrintString
ld de, $9800 + 32*16 + 10 ld de, _SCRN0 + 32*16 + 10
call PrintString call PrintString
; hl now contains the address after all the strings. ; hl now contains the address after all the strings.
@ -141,7 +145,7 @@ LoadCardDataAsync:
ld h, d ld h, d
ld l, e ; source ld l, e ; source
ld de, $9800 + 32 + 1 ; destination ld de, _SCRN0 + 32 + 1 ; destination
ld b, 16 ; height ld b, 16 ; height
ld c, 8 ; width ld c, 8 ; width
@ -152,11 +156,10 @@ LoadCardDataAsync:
ld a, [cvCardAddress + 1] ld a, [cvCardAddress + 1]
ld h, a ; hl now contains the address of the card data. ld h, a ; hl now contains the address of the card data.
ld b, 0 ld bc, Card_Offset_functions ; jump straight to function handles
ld c, Card_Offset_functions ; jump straight to function handles
add hl, bc ; hl now points to the card functions add hl, bc ; hl now points to the card functions
di ; make sure we never call card_update and card_draw without them being fully set di ; make sure we never call any callbacks without them being fully set
nop nop
ld a, [hl+] ld a, [hl+]
ld [CARD_INIT], a ld [CARD_INIT], a
@ -170,6 +173,10 @@ LoadCardDataAsync:
ld [CARD_DRAW], a ld [CARD_DRAW], a
ld a, [hl+] ld a, [hl+]
ld [CARD_DRAW+1], a ld [CARD_DRAW+1], a
ld a, [hl+]
ld [CARD_PRINT_PREP], a
ld a, [hl+]
ld [CARD_PRINT_PREP+1], a
ei ei
call CardInit call CardInit
@ -180,8 +187,7 @@ LoadCardDataAsync:
ld a, [cvCardAddress + 1] ld a, [cvCardAddress + 1]
ld h, a ; hl now contains the address of the card data. ld h, a ; hl now contains the address of the card data.
ld b, 0 ld bc, Card_Offset_keytiles ; jump straight to keytiles length and location!
ld c, Card_Offset_keytiles ; jump straight to keytiles length and location!
add hl, bc add hl, bc
ld a, [hl+] ld a, [hl+]
@ -196,8 +202,8 @@ LoadCardDataAsync:
ld h, d ld h, d
ld l, e ; hl takes the source ld l, e ; hl takes the source
ld de, $9000 + VARIABLE_TILES_START*$10 ; always load tile data into the same spot in vram ld de, _VRAM + $1000 + VARIABLE_TILES_START*$10 ; always load tile data into the same spot in vram
call CopyRange call CopyRangeBy8s
ld a, [cvCardAddress] ld a, [cvCardAddress]
@ -205,8 +211,7 @@ LoadCardDataAsync:
ld a, [cvCardAddress + 1] ld a, [cvCardAddress + 1]
ld h, a ; hl now contains the address of the card data. ld h, a ; hl now contains the address of the card data.
ld b, 0 ld bc, Card_Offset_spritetiles ; jump straight to sprite tiles length and location!
ld c, Card_Offset_spritetiles ; jump straight to sprite tiles length and location!
add hl, bc add hl, bc
ld a, [hl+] ld a, [hl+]
@ -221,8 +226,8 @@ LoadCardDataAsync:
ld h, d ld h, d
ld l, e ; hl takes the source ld l, e ; hl takes the source
ld de, $8000 ; sprite tiles get loaded into the bottom of vram ld de, _VRAM ; sprite tiles get loaded into the bottom of vram
call CopyRange call CopyRangeBy8s
ret ret
@ -245,17 +250,15 @@ CardInit:
ret ret
CardUpdate: CardUpdate:
di
nop
call CARD_UPDATE - 1 call CARD_UPDATE - 1
ei
ret ret
CardDraw: CardDraw:
di
nop
call CARD_DRAW - 1 call CARD_DRAW - 1
ei ret
CardPrintPrep:
call CARD_PRINT_PREP - 1
ret ret
@ -308,24 +311,24 @@ CleanUpOutsideSprites:
ld a, 17 ; sprites are visible if y value >= 17 ld a, 17 ; sprites are visible if y value >= 17
cp a, [hl] cp a, [hl]
jp c, :+ ; skip if 17-y < 0 jp c, :+ ; skip if 17-y < 0
ld [hl], 0 ld [hl], 0
: :
ld a, 152 ; sprites are visible if y value is < 152 ld a, 152 ; sprites are visible if y value is < 152
cp a, [hl] cp a, [hl]
jp nc, :+ ; skip if 152 - y < 0 jp nc, :+ ; skip if 152 - y < 0
ld [hl], 0 ld [hl], 0
: :
inc hl ; look at x value inc hl ; look at x value
ld a, 8 ; sprites are visible if y value >= 8 ld a, 8 ; sprites are visible if y value >= 8
cp a, [hl] cp a, [hl]
jp c, :+ ; skip if 8-y <= 0 jp c, :+ ; skip if 8-y <= 0
ld [hl], 0 ld [hl], 0
: :
ld a, 80 ; sprites are visible if x value < 80 ld a, 80 ; sprites are visible if x value < 80
cp a, [hl] cp a, [hl]
jp nc, :+ jp nc, :+
ld [hl], 0 ld [hl], 0
: :
inc hl ; now pointing at tile ID inc hl ; now pointing at tile ID
inc hl ; now pointing at attributes inc hl ; now pointing at attributes
inc hl ; now pointing at next OAM y value inc hl ; now pointing at next OAM y value

View File

@ -1,5 +1,4 @@
CopyRange: CopyRange:
CopyRangeUnsafe:
; hl is source ; hl is source
; de is destination ; de is destination
; bc is length to copy ; bc is length to copy
@ -13,46 +12,35 @@ CopyRangeUnsafe:
dec bc dec bc
ld a, b ld a, b
or a, c ; check if bc is zero or a, c ; check if bc is zero
jp nz, .loop jr nz, .loop
ret ret
CopyRangeBy8s: CopyRangeBy8s:
CopyRangeUnsafeBy8s:
; hl is source ; hl is source
; de is destination ; de is destination
; bc is 1/8 of length to copy!!! ; bc is length to copy
; so like this will copy 8*bc bytes!
ld a, b ld a, b
or a, c or a, c
ret z ret z
.loop .loop
ld a, [hl+] rept 8
ld [de], a ld a, [hl+]
inc de ld [de], a
ld a, [hl+] inc de
ld [de], a dec bc
inc de endr
ld a, [hl+]
ld [de], a
inc de
ld a, [hl+]
ld [de], a
inc de
ld a, [hl+]
ld [de], a
inc de
ld a, [hl+]
ld [de], a
inc de
ld a, [hl+]
ld [de], a
inc de
ld a, [hl+]
ld [de], a
inc de
dec bc
ld a, b ld a, b
or a, c ; check if bc is zero or a, c ; check if bc is zero
jp nz, .loop jr nz, .loop
ret ret
CopyOneTileData:
di
rept 16
ld a, [hl+]
ld [de], a
inc de
endr
reti

View File

@ -1,5 +1,4 @@
CopyTilesToMap: CopyTilesToMap:
CopyTilesToMapUnsafe:
; copy tiles from where they are linearly packed at an origin (hl) ; copy tiles from where they are linearly packed at an origin (hl)
; to a rectangle in the tilemap in vram (de) ; to a rectangle in the tilemap in vram (de)
; assuming it has height in b and width in c. ; assuming it has height in b and width in c.
@ -8,35 +7,25 @@ CopyTilesToMapUnsafe:
ret z ret z
push bc push bc
.copyTile .copyTile
ld a, [hl] ; load from the tile map into a ld a, [hl+] ; load from the tile map into a
ld [de], a ; load from a into the destination ld [de], a ; load from a into the destination
inc hl ; this is slower than using hli but i'm trying to work with this here
inc de inc de
dec c dec c
; check if we've completed a line? jr nz, .copyTile ; if there's lines left to copy, jump back and redo
ld a, 0
or a, c ; check if c is zero, if it's not zero go back and copy more bytes
jp nz, .copyTile
.doneWithLine .doneWithLine
pop bc pop bc
ld a, e ; this adds 32-c to de
add a, 32 ld a, 32
sub a, c ; first calculate 32-c
add a, e
ld e, a ld e, a
ld a, d ld a, d
adc a, 0 adc a, 0
ld d, a ld d, a
ld a, e
sub a, c
ld e, a
ld a, d
sbc a, 0
ld d, a
dec b dec b
ld a, b jr nz, CopyTilesToMap
cp a, 0
jp nz, CopyTilesToMap
ret ret
; this function is used by practically all the card animations and all over the place. ; this function is used by practically all the card animations and all over the place.
@ -53,6 +42,10 @@ BuildMetaSprite:
push de push de
pop hl ; want hl and de to be swapped just for the sake of consistent apis pop hl ; want hl and de to be swapped just for the sake of consistent apis
pop de ; hl now holds the OAM location, de holds the sprite map pop de ; hl now holds the OAM location, de holds the sprite map
; fundamentally the reason for this is we need to advance through the OAM
; four times for every time we addvance de, so it makes maybe more sense
; to increment hl more often? but we can't use hl+ much because we're loading
; from different places. so maybe this is unnecessary
push af ; save to the stack so we can retrieve it for row-wise decrement push af ; save to the stack so we can retrieve it for row-wise decrement
push bc ; hold onto the upper-left corner so we can update it each row push bc ; hold onto the upper-left corner so we can update it each row

View File

@ -9,40 +9,45 @@ GetDoubledTopNibble:
GetDoubledNibbleInner: GetDoubledNibbleInner:
; b holds a byte of tile data ; b holds a byte of tile data
; this returns the first byte of the doubled tile data ; this returns the first byte of the doubled tile data
ld a, b ld a, b
and a, %10000000 ; a contains a0000000 and a, %10000000 ; a contains a0000000
ld c, a ld c, a
srl c rrca
or a, c ; a now contains aa000000 or a, c ; a now contains aa000000
ld [vBuildingByte], a ; vBuildingByte has aa000000 ld [vBuildingByte], a ; vBuildingByte has aa000000
ld a, b ld a, b
and a, %01000000 ; a has 0b000000 and a, %01000000 ; a has 0b000000
srl a ; a has 00b00000 rrca ; a has 00b00000
ld c, a ld c, a ; c has 00b00000
srl c ; c has 000b0000 rrca ; a has 000b0000
or a, c or a, c
ld c, a ; c has 00bb0000 ld c, a ; c has 00bb0000
ld a, [vBuildingByte] ld a, [vBuildingByte]
or a, c or a, c
ld [vBuildingByte], a ; vBuildingBye has aabb0000 ld [vBuildingByte], a ; vBuildingBye has aabb0000
ld a, b ld a, b
and a, %00100000 ; 00c00000 and a, %00100000 ; 00c00000
srl a ; 000c0000 rrca ; 000c0000
srl a ; 0000c000 rrca ; 0000c000
ld c, a ld c, a
srl c ; 00000c00 rrca ; 00000c00
or a, c or a, c ; 0000cc00
ld c, a ld c, a
ld a, [vBuildingByte] ld a, [vBuildingByte]
or a, c or a, c
ld [vBuildingByte], a ; vBuildingByte has aabbcc00 ld [vBuildingByte], a ; vBuildingByte has aabbcc00
ld a, b ld a, b
and a, %00010000 and a, %00010000
srl a rrca
srl a rrca
srl a rrca
ld c, a ld c, a
srl c rrca
or a, c or a, c
ld c, a ld c, a
ld a, [vBuildingByte] ld a, [vBuildingByte]
@ -169,16 +174,7 @@ DrawByte: ; accepts [hl] as the number to write, de as location to write tile ID
ret ret
.hex ; tile IDs for hex values. this can live elsewhere alongside WriteByte .lowerHex ; tile IDs for hex values.
; 0, 1, 2, 3,
db $a0, $a1, $a2, $a3
; 4, 5, 6, 7,
db $a4, $a5, $a6, $a7
; 8, 9
db $a8, $a9
; a, b, c, d, e, f
db $b1, $b2, $b3, $b4, $b5, $b6
.lowerHex ; tile IDs for hex values. this can live elsewhere alongside WriteByte
; 0, 1, 2, 3, ; 0, 1, 2, 3,
db $a0, $a1, $a2, $a3 db $a0, $a1, $a2, $a3
; 4, 5, 6, 7, ; 4, 5, 6, 7,

View File

@ -203,34 +203,32 @@ PrepNetwork:
ld a, 0 ld a, 0
ld [vPrinterStart], a ld [vPrinterStart], a
ld a, $1 ld hl, rSC
ld [rSC], a set 0, [hl]
ret ret
SendByte: SendByte:
; waits until the thing is free, then sends the byte in a. puts the receiived ; waits until the thing is free, then sends the byte in a. puts the receiived
; byte in a anad returns. ; byte in a anad returns.
push af push hl
ld hl, rSC
.waitForFree .waitForFree
ld a, [rSC] bit 7, [hl]
bit 7, a
jp nz, .waitForFree jp nz, .waitForFree
pop af
ld [rSB], a ld [rSB], a
ld a, 0 set 7, [hl] ; request transfer
set 7, a ; request transfer
set 0, a ; set to leader
ld [rSC], a
.waitForResponse .waitForResponse
ld a, [rSC] bit 7, [hl]
bit 7, a
jp nz, .waitForResponse jp nz, .waitForResponse
ld a, [rSB] ld a, [rSB]
pop hl
ret ret
KickOffPrintJob: KickOffPrintJob:
@ -242,6 +240,9 @@ KickOffPrintJob:
ld a, 0 ld a, 0
ld [vPrinterRow], a ld [vPrinterRow], a
call CardPrintPrep
call CardUpdate
ret ret
RunPrintJob: RunPrintJob:
@ -249,44 +250,68 @@ RunPrintJob:
cp a, 0 cp a, 0
ret z ret z
ld a, [vPrinterRow] ld a, [vPrinterRow] ; printer row holds the row of printing we're on; this
bit 0, a ; combines the tile row of the card + borders and also when to wait for printing
; to finish. also later we use the register for 'whetther it's a row of the card'
bit 0, a ; on even numbered printer rows just jump to the "wait for printable"
; routine. this should increase the printer row only if the printer is ready
; and return.
jp z, WaitForPrintable jp z, WaitForPrintable
cp a, 1 cp a, 1 ; if the print row is 1, then we want the top border
jp nz, :+ jp nz, :+
call PlanTopRow call PlanTopRow
call BuildTopRow call BuildRow
call DoubleTheBuffer set 7, a ; set bit 7 as a flaag thatt we've already taken one of these branches.
call PrintTheBuffer
ld a, [vPrinterRow]
inc a
ld [vPrinterRow], a
ret
: :
cp a, 35 cp a, 35 ; if the print row is 35, we want the bottom border
jp z, DoBottomRow jp nz, :+
cp a, 37 call PlanBottomRow
jp z, FinishUp call BuildRow
set 7, a
:
cp a, 37 ; if the row is 37, we want to clear the buffer and reset
jp nz, :+
call ClearBuffer
call PlanRowA ld a, 0
call BuildTopRow ld [vBlocked], a
ld [vPrinterStart],a
ld [vPrinterRow], a
ld a, 1
ld [vPrinterIsReady], a
ld b, 8 ; pre-increment so that when we pre-decrement in the loop later it works ret ; don't finish sending the print if we're cleaning up.
sla a :
sla a bit 7, a ; if this bit was set by one of the previous branches, then
sla a ; mullitply by 8 ; we aren't drawing a row; otherwise the rest of a holds the printer row for
add a, 24 ; offset for the border and overscan ; a card row to draw
add a, b ; start from the bottom row of these tiles, a*8 + 7 jp nz, :+
.addSpriteLinesLoop res 7, a ; get rid of that "drawing a row" bit
dec a srl a ; divide by two to get rid of the "drawing or waiting" bit
dec a ; subtract one to get the row index into card space
ld [vCurrentScanline], a call PlanRowA
call AddSpritesToLine call BuildRow
dec b ld b, 8 ; pre-increment so that when we pre-decrement in the loop later it works
jp nz, .addSpriteLinesLoop sla a
.doneAddSpriteLinesLoop sla a
sla a
add a, 24 ; multiply by 8 and add 24 to get from card tile space to sprite space
add a, b ; start from the bottom row of these tiles, a*8 + 7
ld c, a ; c holds the current scanline we're looking at for this inner loop
.addSpriteLinesLoop
dec c
ld a, c
ld [vCurrentScanline], a
call AddSpritesToLine
dec b
jp nz, .addSpriteLinesLoop
.doneAddSpriteLinesLoop
:
call DoubleTheBuffer call DoubleTheBuffer
call PrintTheBuffer call PrintTheBuffer
@ -303,9 +328,7 @@ PlanTopRow:
call CopyRange ; copy tiles for the top row to the first buffer call CopyRange ; copy tiles for the top row to the first buffer
ld b, b ld b, b
ret ret
PlanRowA: PlanRowA: ; a should be which row of a tile map we should draw
srl a ; divide by two and subtract one to get row numbre in card space
dec a
push af push af
ld de, BUFFER_ONE ld de, BUFFER_ONE
@ -314,15 +337,16 @@ PlanRowA:
ld [de], a ld [de], a
inc de inc de
call FindCardTileMap ; now hl points at the beginning of the tile map
pop af pop af
push af push af
call FindCardTileMap ; now hl points at the beginning of the tile map
sla a
sla a sla a
sla a sla a
sla a ; multiply row number by 8 for the stride of the tile map
ld b, 0 ld b, 0
ld c, a ; need to advance it by a*8 bytes. ld c, a ; advance to the row we're looking for.
add hl, bc add hl, bc
ld b, 8 ld b, 8
: :
@ -338,10 +362,16 @@ PlanRowA:
pop af pop af
ret ret
PlanBottomRow:
; draw the bottom of a card as tile ids in buffer one
ld hl, CardBrowse.UITilemap + 20*17 ;
ld bc, 10
ld de, BUFFER_ONE
call CopyRange ; copy tiles for the top row to the first buffer
ld b, b
ret
BuildRow:
BuildTopRow:
; assuming buffer one contains a sequence of ten tile IDs ; assuming buffer one contains a sequence of ten tile IDs
; this writes the tile data for each of those tiles sequentially into BUFFER_TWO ; this writes the tile data for each of those tiles sequentially into BUFFER_TWO
push af push af
@ -403,7 +433,6 @@ DoubleTheBuffer:
ld b, b ld b, b
ret ret
PrintTheBuffer: PrintTheBuffer:
call ClearBuffer call ClearBuffer
@ -446,38 +475,6 @@ WaitForPrintable:
ret ret
DoMiddleRow:
call ClearBuffer
ld a, [vPrinterRow]
srl a
dec a
call SendRowA
call SendEmpty
call SendPrint
ld a, [vPrinterRow]
inc a
ld [vPrinterRow], a
ret
DoBottomRow:
call ClearBuffer
call SendBottomRow
call SendPrint
ld a, [vPrinterRow]
inc a
ld [vPrinterRow], a
ret
FinishUp:
call ClearBuffer
ld a, 0
ld [vBlocked], a
ld [vPrinterStart],a
ld [vPrinterRow], a
ld a, 1
ld [vPrinterIsReady], a
ret
SendEmpty: SendEmpty:
ld a, 4 ld a, 4
@ -486,217 +483,6 @@ SendEmpty:
call SendPacket call SendPacket
ret ret
SendBottomRow:
; draw the top of a card
ld de, BUFFER_ONE
; top half of border
ld a, $11
ld hl, UITiles
call FindTileData
call WriteTopHalfDoubledTile
ld c, 8
.loop
push bc
ld a, $0d
ld hl, UITiles
call FindTileData
call WriteTopHalfDoubledTile
pop bc
dec c
ld a, 0
or a, c
jp nz, .loop
ld a, $10
ld hl, UITiles
call FindTileData
call WriteTopHalfDoubledTile
; bottom half of border
ld a, $11
ld hl, UITiles
call FindTileData
call WriteBottomHalfDoubledTile
ld c, 8
.loop2
push bc
ld a, $0d
ld hl, UITiles
call FindTileData
call WriteBottomHalfDoubledTile
pop bc
dec c
jp nz, .loop2
ld a, $10
ld hl, UITiles
call FindTileData
call WriteBottomHalfDoubledTile
ld a, 4 ; fill buffer
ld hl, BUFFER_ONE
ld bc, $280
call SendPacket
ret
SendTopRow:
; draw the top of a card
ld de, BUFFER_ONE
; top half of border
ld a, $0e
ld hl, UITiles
call FindTileData ; give it a=index into some tiles, hl=what to start from
call WriteTopHalfDoubledTile
ld c, 8
.loop
push bc
ld a, $0a
ld hl, UITiles
call FindTileData
call WriteTopHalfDoubledTile
pop bc
dec c
ld a, 0
or a, c
jp nz, .loop
ld a, $0f
ld hl, UITiles
call FindTileData
call WriteTopHalfDoubledTile
; bottom half of border
ld a, $0e
ld hl, UITiles
call FindTileData
call WriteBottomHalfDoubledTile
ld c, 8
.loop2
push bc
ld a, $0a
ld hl, UITiles
call FindTileData
call WriteBottomHalfDoubledTile
pop bc
dec c
jp nz, .loop2
ld a, $0f
ld hl, UITiles
call FindTileData
call WriteBottomHalfDoubledTile
ld a, 4 ; fill buffer
ld hl, BUFFER_ONE
ld bc, $280
call SendPacket
ret
SendRowA:
push af
ld de, BUFFER_ONE
; left side border
ld a, $0b
ld hl, UITiles
call FindTileData
call WriteTopHalfDoubledTile
; find the row of tile data we're looking for
pop af
push af
; a might be from 0-16, and we needd to multiply it by 8. that should stay
; within 256 tho so we can just sla three times
call FindCardTileMap
sla a
sla a
sla a
ld b, 0
ld c, a
add hl, bc
push hl
; hl now holds the row of the tile map we're interested in.
ld c, 8
.loop
push bc
ld a, [hl+]
sub a, 26 ; undo the offset normally encoded into the tile data
push hl
call FindCardKeyTiles
call FindTileData
call WriteTopHalfDoubledTile
pop hl
pop bc
dec c
jp nz, .loop
; right side border
ld a, $0c
ld hl, UITiles
call FindTileData
call WriteTopHalfDoubledTile
ld a, $0b
ld hl, UITiles
call FindTileData
call WriteBottomHalfDoubledTile
pop hl
ld c, 8
.loop2
push bc
ld a, [hl+]
sub a, 26 ; undo the offset normally encoded into the tile data
push hl
call FindCardKeyTiles
call FindTileData
call WriteBottomHalfDoubledTile
pop hl
pop bc
dec c
ld a, 0
or a, c
jp nz, .loop2
ld a, $0c
ld hl, UITiles
call FindTileData
call WriteBottomHalfDoubledTile
pop af
; a holds the row we're on
ld b, 8 ; pre-increment so that when we pre-decrement in the loop later it works
sla a
sla a
sla a ; mullitply by 8
add a, 24 ; offset for the border and overscan
add a, b ; start from the bottom row of these tiles, a*8 + 7
.addSpriteLinesLoop
dec a
ld [vCurrentScanline], a
call AddSpritesToLine
dec b
jp nz, .addSpriteLinesLoop
.doneAddSpriteLinesLoop
ld a, 4 ; fill buffer
ld hl, BUFFER_ONE
ld bc, $280
call SendPacket
ret
SendPrint: SendPrint:
call SendEmpty call SendEmpty

View File

@ -27,9 +27,9 @@ ClockLFSR: ; uses af, bc and clocks one bit of the LFSR.
ld a, [rLFSR] ; 2 cycles ld a, [rLFSR] ; 2 cycles
rra ; 1 cycle rra ; 1 cycle
ld [rLFSR], a ; 2 cycles ld [rLFSR], a ; 2 cycles
ret ; 37 cycles total. can call roughly three of these per scanline ret ; 37 cycles total. can call roughly 12? of these per scanline
OneRandomByte: ; clocks LFSR 8 times so a is OneRandomByte: ; clocks LFSR 8 times so a is a fresh random byte
call ClockLFSR call ClockLFSR
call ClockLFSR call ClockLFSR
call ClockLFSR call ClockLFSR

View File

@ -9,7 +9,14 @@ vTopHalfOfSprite: ds $20 ; two tiles of tile data for the top half of a sprite
vBottomHalfOfSprite: ds $20 ; two tiles of tile data for the bottom half of a sprite vBottomHalfOfSprite: ds $20 ; two tiles of tile data for the bottom half of a sprite
POPS POPS
CardAdjustTileMap:
; "fix" the tile map copied into BUFFER_ONE if it needs to be edited for proper
; display of a card. so far this should only apply to Wheel of Fortune because
; that's the only card that uses custom non-sprite drawing.
; a holds the row of the tile map we're on.
BuildRelevantSpritesList: BuildRelevantSpritesList:
; uses a, bc, de
ld a, 0 ; a should now hold how many sprites we've looked at for this row ld a, 0 ; a should now hold how many sprites we've looked at for this row
push af push af
@ -21,7 +28,7 @@ BuildRelevantSpritesList:
ld [de], a ld [de], a
inc de inc de
dec b dec b
jp nz, .buildBlankList jr nz, .buildBlankList
ld de, vCurrentLineOAMOffsets ld de, vCurrentLineOAMOffsets
ld bc, $0000 ; starting offset ld bc, $0000 ; starting offset
@ -32,15 +39,12 @@ BuildRelevantSpritesList:
call c, AddThisSpriteToDE ; if it is relevant tthen add it call c, AddThisSpriteToDE ; if it is relevant tthen add it
push af ; save the counter for the next row push af ; save the counter for the next row
cp a, 10 ; if the new counter is 10, then we're full up! and done w sprites cp a, 10 ; if the new counter is 10, then we're full up! and done w sprites
jp z, .doneWithOAM jr z, .doneWithOAM
inc c
inc c
inc c
inc c
ld a, c ld a, c
add a, 4
cp a, $A0 cp a, $A0
jp z, .doneWithOAM jr z, .doneWithOAM
jp .loop jr .loop
.doneWithOAM .doneWithOAM
pop af pop af
ld a, [vCurrentScanline] ld a, [vCurrentScanline]
@ -83,12 +87,11 @@ AddThisSpriteToDE:
AddSpritesToLine: AddSpritesToLine:
; operates on sscanline [vCurrentScanline] and buffer BUFFER_ONE ; operates on sscanline [vCurrentScanline] and buffer BUFFER_ONE
push af
push bc push bc
call BuildRelevantSpritesList call BuildRelevantSpritesList
ld a, 16 ; account for border ld a, 16 ; account for border and overscan
ld [vCurrentDotX], a ld [vCurrentDotX], a
.loopOverX .loopOverX
call GetCurrentBackgroundPixelValueFromBuffer call GetCurrentBackgroundPixelValueFromBuffer
@ -129,8 +132,6 @@ AddSpritesToLine:
inc hl ; point to x value inc hl ; point to x value
inc hl ; point tto tile id inc hl ; point tto tile id
inc hl ; point to attributes inc hl ; point to attributes
; palette is bit 4 [hl]
; priority is bit 7 [hl]
bit OAMB_PRI, [hl] ; if priority is zero, continue writing sprite color (skip this block) bit OAMB_PRI, [hl] ; if priority is zero, continue writing sprite color (skip this block)
jp z, :+ jp z, :+
@ -138,6 +139,8 @@ AddSpritesToLine:
cp a, 0 cp a, 0
jp z, :+ ; if priority is 1 and background is zero, continue writing sprite color jp z, :+ ; if priority is 1 and background is zero, continue writing sprite color
pop af ; gotta get that off the stack so it's clean pop af ; gotta get that off the stack so it's clean
pop hl ; gotta get this off the stack too, bc we're jumpinig to
; doneloopingoversprites which doesn't normally pop hl
jp .doneLoopingOverSprites ; if priiority is 1 AND backgruond is nonzero, jp .doneLoopingOverSprites ; if priiority is 1 AND backgruond is nonzero,
; we're done with this pixel forever. this does not properly deal with priority ; we're done with this pixel forever. this does not properly deal with priority
; but it should be good enough for thiis program. ; but it should be good enough for thiis program.
@ -165,7 +168,6 @@ AddSpritesToLine:
ld a, b ld a, b
and a, $3 ; now holds just the color itself and a, $3 ; now holds just the color itself
call WritePixelToBuffer call WritePixelToBuffer
.nextSprite .nextSprite
@ -181,26 +183,54 @@ AddSpritesToLine:
jp nc, .loopOverX jp nc, .loopOverX
pop bc pop bc
pop af
ret ret
GetPixelFromOAM: GetPixelFromOAM:
; hl takes an oam record ; hl takes an oam record
; a has an x offset ; a has an x offset
; bit 5, [hl+3] = x flip ; bit 5, [hl+3] = x flip
; de takes the yx offsets ; we set de to the yx offsets here, and incorporate flippnig
push hl push hl
push de push de
inc hl
inc hl
inc hl
bit 5, [hl]
jr z, :+
ld e, a
ld a, 7
sub a, e
:
dec hl
dec hl
dec hl
ld e, a ; hold on to x offset ld e, a ; hold on to x offset
ld a, [vCurrentScanline] ; y position ld a, [vCurrentScanline] ; y position
sub a, [hl] ; currentScanline - y position sub a, [hl] ; currentScanline - y position
ld d, a ; hold on to y offset ld d, a ; hold on to y offset
inc hl ; look at x coord inc hl
inc hl ; look at tile id inc hl
inc hl
bit 6, [hl]
jr z, :+
ld a, 7
sub a, d
ld d, a
:
dec hl
ld a, [hl] ld a, [hl]
call FindCardSpriteTiles ; puts card sprite tiles in hl cp a, $90
call FindTileData ; uses a + hl to get tile data jr nc, .tileDataFromText
.tileDataFromSpriteTiles
call FindCardSpriteTiles ; puts card sprite tiles in hl
call FindTileData ; uses a + hl to get tile data
jr .foundTileData
.tileDataFromText
sub a, $90
ld hl, LetterTiles
call FindTileData
.foundTileData
ld a, d ; y offset is number of pairs of bytes to skip ld a, d ; y offset is number of pairs of bytes to skip
cp a, 0 cp a, 0
@ -349,8 +379,6 @@ WipeTargetBit:
ret ret
FindCurrentBufferBytes: FindCurrentBufferBytes:
; points hl at the bytes of BUFFER_TWO where the current scanline/dot live ; points hl at the bytes of BUFFER_TWO where the current scanline/dot live
ld a, [vCurrentScanline] ld a, [vCurrentScanline]

View File

@ -47,63 +47,59 @@ CardBrowseSetup:
ret ret
CardBrowseUpdate: CardBrowseUpdate:
call CardUpdate ld a, [vPrinterStart]
cp a, 0
call z, CardUpdate
ld hl, vTime call ScrollBackgroundTile
call IncrementTimer
ld a, [vTime+1]
cp a, $01
jp c, .doneTimer ; reset the timer and do behavior when vTime passes $0100
ld a, 0
ld [vTime], a
ld [vTime+1], a
ld hl, SquaresTiles
ld a, [vFrameCountSquares]
inc a
call ArrayClampLooping
ld [vFrameCountSquares], a
.doneTimer
ld a, [vTooBusyForPrinter] ld a, [vTooBusyForPrinter]
cp a, 0 cp a, 0
jp nz, .donePrinter jp nz, .donePrinter
call CheckForPrinter .checkForPrinter
call UpdatePrintUI ld a, [vPrinterStart]
call RunPrintJob cp a, 0
call z, CheckForPrinter
.updatePrintUI
ld a, [vPrinterStart]
cp a, 0
call z, UpdatePrintUI
.runPrintJob
ld a, [vPrinterStart]
cp a, 0
call nz, RunPrintJob
.printButton
ld hl, rMYBTNP
bit 6, [hl] ; check select?
jp z, .donePrinter
ld a, [vPrinterState]
cp a, PS_READY
jp nz, .donePrinter
call KickOffPrintJob
ret
.donePrinter
ld hl, rMYBTNP ld hl, rMYBTNP
bit 6, [hl] ; check select? bit 5, [hl]
jp z, .donePrinter
ld a, [vPrinterState]
cp a, PS_READY
jp nz, .donePrinter
call KickOffPrintJob
ret
.donePrinter
ld hl, rMYBTNP
bit 4, [hl]
jp z, .doneWithB jp z, .doneWithB
ld hl, ScreenMainMenu ld hl, ScreenMainMenu
call ChangeScene call ChangeScene
ret ret
.doneWithB .doneWithB
ld a, [vSelectedCardIndex] ld a, [vSelectedCardIndex]
ld hl, rMYBTNP ld hl, rMYBTNP
bit 0, [hl] bit 0, [hl]
jp z, :+ ; skip the following code if left is not pressed jp z, :+ ; skip the following code if left is not pressed
inc a inc a
: :
bit 1, [hl] bit 1, [hl]
jp z, :+ ; skip the following code if right is not pressed jp z, :+ ; skip the following code if right is not pressed
dec a dec a
: :
ld [vSelectedCardIndex], a ld [vSelectedCardIndex], a
ld hl, Cards ld hl, Cards
call ArrayClampLooping call ArrayClampLooping
@ -133,23 +129,12 @@ CardBrowseUpdate:
CardBrowseDraw: CardBrowseDraw:
; the card data is loaded asynchronously, initiated in CardReadUpdate ld a, [vCurrentBackgroundTile]
ld l, a
ld hl, SquaresTiles ld a, [vCurrentBackgroundTile+1]
inc hl ld h, a
ld b, 0
ld a, [vFrameCountSquares]
ld c, a
add hl, bc
add hl, bc
ld c, [hl]
inc hl
ld b, [hl]
ld h, b
ld l, c
ld de, _VRAM + $1000 + 1*16 ld de, _VRAM + $1000 + 1*16
ld bc, (SquaresTileset8 - SquaresTileset7) / 8 call CopyOneTileData
call CopyRangeBy8s
call CardDraw call CardDraw
@ -157,12 +142,6 @@ CardBrowseDraw:
ld a, HIGH(MY_OAM) ld a, HIGH(MY_OAM)
call RunDMA call RunDMA
ld hl, vPrinterReturnValue
ld de, _SCRN0 + 32*6 + 12
call DrawByte
ld hl, vPrinterReturnValue+1
ld de, _SCRN0 + 32*6 + 14
call DrawByte
ret ret

View File

@ -40,43 +40,26 @@ CardReadSetup:
CardReadUpdate: CardReadUpdate:
call CardUpdate call CardUpdate
ld hl, vTime call ScrollBackgroundTile
call IncrementTimer
ld a, [vTime+1]
cp a, $01
jp c, .doneTimer ; if the timer is less than $0100, skip to end
;otherwise reset the timer
ld a, 0
ld [vTime], a
ld [vTime+1], a
ld hl, SquaresTiles
ld a, [vFrameCountSquares]
inc a
call ArrayClampLooping
ld [vFrameCountSquares], a
.doneTimer
ld hl, rMYBTNP ld hl, rMYBTNP
bit 4, [hl] bit 5, [hl]
jp z, .doneWithB jp z, .doneWithB
ld hl, ScreenSpreadSelect ld hl, ScreenSpreadSelect
call ChangeScene call ChangeScene
ret ret
.doneWithB .doneWithB
ld a, [vSelectedSpreadCard] ld a, [vSelectedSpreadCard]
ld hl, rMYBTNP ld hl, rMYBTNP
bit 1, [hl] bit 1, [hl]
jp z, :+ ; skip the following code if left is not pressed jp z, :+ ; skip the following code if left is not pressed
dec a dec a
: :
bit 0, [hl] bit 0, [hl]
jp z, :+ ; skip the following code if right is not pressed jp z, :+ ; skip the following code if right is not pressed
inc a inc a
: :
ld [vSelectedSpreadCard], a ld [vSelectedSpreadCard], a
ld a, [vCurrentSpread] ld a, [vCurrentSpread]
ld l, a ld l, a
@ -100,21 +83,12 @@ CardReadUpdate:
ret ret
CardReadDraw: CardReadDraw:
ld hl, SquaresTiles ld a, [vCurrentBackgroundTile]
inc hl ld l, a
ld b, 0 ld a, [vCurrentBackgroundTile+1]
ld a, [vFrameCountSquares] ld h, a
ld c, a
add hl, bc
add hl, bc
ld c, [hl]
inc hl
ld b, [hl]
ld h, b
ld l, c
ld de, _VRAM + $1000 + 1*16 ld de, _VRAM + $1000 + 1*16
ld bc, (SquaresTileset8 - SquaresTileset7) / 8 call CopyOneTileData
call CopyRangeUnsafeBy8s
call CardDraw call CardDraw

View File

@ -4,6 +4,7 @@ vSelectedSpreadIndex: db
vSelectedSpreadCard: db vSelectedSpreadCard: db
vSelectedCardIndex: db vSelectedCardIndex: db
vFrameCountSquares: db vFrameCountSquares: db
vCurrentBackgroundTile: dw
vTime: dw vTime: dw
vBlocked: db vBlocked: db
println "vBlocked is ", vBlocked ; println "vBlocked is ", vBlocked ;
@ -56,7 +57,7 @@ MainMenuSetup:
def TileStartCardBackSprites23 equ TileStartCardBackSprites24 + spacing def TileStartCardBackSprites23 equ TileStartCardBackSprites24 + spacing
ld de, $8000 + TileStartCardBackSprites23*$10; destination of copy ld de, $8000 + TileStartCardBackSprites23*$10; destination of copy
ld bc, CardBackSprites23End - CardBackSprites23 ld bc, CardBackSprites23End - CardBackSprites23
call CopyRangeUnsafe call CopyRange
ld hl, CardBackSprites22 ld hl, CardBackSprites22
def TileStartCardBackSprites22 equ TileStartCardBackSprites23 + spacing def TileStartCardBackSprites22 equ TileStartCardBackSprites23 + spacing
@ -215,12 +216,12 @@ MainMenuUpdate:
ld a, [vMenuIndex] ld a, [vMenuIndex]
bit 3, [hl] ; select the down key bit 3, [hl] ; select the down key
jp z, .doneWithDownInput ; skip the following code if down is not pressed jp z, .doneWithDownInput ; skip the following code if down is not pressed
inc a inc a
.doneWithDownInput .doneWithDownInput
bit 2, [hl] ; select up key %0000_0100 bit 2, [hl] ; select up key %0000_0100
jp z, .doneWithUpInput ; skip the following code if up is not pressed jp z, .doneWithUpInput ; skip the following code if up is not pressed
dec a dec a
.doneWithUpInput .doneWithUpInput
ld hl, MenuCount ld hl, MenuCount
call ArrayClampLooping call ArrayClampLooping
ld [vMenuIndex], a ld [vMenuIndex], a
@ -228,33 +229,33 @@ MainMenuUpdate:
ld hl, rMYBTNP ld hl, rMYBTNP
bit 5, [hl] ; button a pressed? bit 4, [hl] ; button a pressed?
jp z, .doneWithMenuSelect jp z, .doneWithMenuSelect
ld a, [vMenuIndex] ld a, [vMenuIndex]
cp a, 0 cp a, 0
jp z, .option1 jp z, .option1
cp a, 1 cp a, 1
jp z, .option2 jp z, .option2
cp a, 2 cp a, 2
jp z, .option3 jp z, .option3
jp .doneWithMenuSelect jp .doneWithMenuSelect
.option1 .option1
ld a, 0 ld a, 0
ld [vSelectedSpreadIndex], a ld [vSelectedSpreadIndex], a
ld hl, ScreenSpreadSelect ld hl, ScreenSpreadSelect
call ChangeScene call ChangeScene
ret ret
.option2 .option2
ld hl, ScreenShuffle ld hl, ScreenShuffle
call ChangeScene call ChangeScene
ret ret
.option3 .option3
ld a, 0 ld a, 0
ld [vSelectedCardIndex], a ld [vSelectedCardIndex], a
ld hl, ScreenCardBrowse ld hl, ScreenCardBrowse
call ChangeScene call ChangeScene
ret ret
.doneWithMenuSelect .doneWithMenuSelect
ld a, [rDELTAT] ld a, [rDELTAT]
ld b, a ld b, a
@ -301,7 +302,15 @@ MainMenuUpdate:
call ArrayClampLooping call ArrayClampLooping
ld [vFrameCountSquares], a ld [vFrameCountSquares], a
sla a ; mulltiiply by 2
ld b, 0
ld c, a
ld hl, SquaresTiles + 1
add hl, bc
ld a, [hl+]
ld [vCurrentBackgroundTile], a
ld a, [hl+]
ld [vCurrentBackgroundTile+1], a
ld hl, Coords ld hl, Coords
inc hl inc hl
@ -358,27 +367,17 @@ MainMenuUpdate:
ret ret
MainMenuDraw: MainMenuDraw:
ld a, [vCurrentBackgroundTile]
ld l, a
ld a, [vCurrentBackgroundTile+1]
ld h, a
ld de, _VRAM + $1000 + 1*16
call CopyOneTileData
ld de, SAFE_DMA_LOCATION ld de, SAFE_DMA_LOCATION
ld a, HIGH(MY_OAM) ld a, HIGH(MY_OAM)
call RunDMA call RunDMA
di
ld hl, SquaresTiles
inc hl
ld b, 0
ld a, [vFrameCountSquares]
ld c, a
add hl, bc
add hl, bc
ld c, [hl]
inc hl
ld b, [hl]
ld h, b
ld l, c
ld de, _VRAM + $100*16 + 1*16
ld bc, (SquaresTileset8 - SquaresTileset7) / 8
call CopyRangeUnsafeBy8s
ld b, 0 ld b, 0
ld c, 32 ld c, 32
@ -1068,6 +1067,37 @@ CardBackSprites17:
db $00,$80,$00,$80,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; bottom-right db $00,$80,$00,$80,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; bottom-right
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; empty db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; empty
CardBackSprites17End: CardBackSprites17End:
ScrollBackgroundTile:
ld hl, vTime
call IncrementTimer
ld a, [vTime+1]
cp a, $01
ret c ; if the timer hasn't passed $0100, don't do anythhiing.
ld a, 0
ld [vTime], a
ld [vTime+1], a
ld hl, SquaresTiles
ld a, [vFrameCountSquares]
inc a
call ArrayClampLooping
ld [vFrameCountSquares], a
sla a ; mulltiiply by 2
ld b, 0
ld c, a
ld hl, SquaresTiles + 1
add hl, bc
ld a, [hl+]
ld [vCurrentBackgroundTile], a
ld a, [hl+]
ld [vCurrentBackgroundTile+1], a
ret
SquaresTiles: SquaresTiles:
db 8 db 8
dw SquaresTileset1 dw SquaresTileset1

View File

@ -71,44 +71,26 @@ ShuffleUpdate:
ld hl, vShuffleTime ld hl, vShuffleTime
call IncrementTimer call IncrementTimer
ld hl, vTime call ScrollBackgroundTile
call IncrementTimer
ld a, [vTime+1]
cp a, $01
jp c, .doneTimer ; if the timer is less than $0100, skip to end
;otherwise reset the timer
ld a, 0
ld [vTime], a
ld [vTime+1], a
ld hl, SquaresTiles
ld a, [vFrameCountSquares]
inc a
call ArrayClampLooping
ld [vFrameCountSquares], a
.doneTimer
ld a, [rMYBTNP] ld a, [rMYBTNP]
cp a, 0 cp a, 0
jr z, .doneWithButtons jr z, .doneWithButtons
ld a, [rLFSR] ld a, [rLFSR]
ld [rLFSR+1], a ; lfsr = (lfsr << 8) + (vShuffleTime & $ff) ld [rLFSR+1], a ; lfsr = (lfsr << 8) + (vShuffleTime & $ff)
ld a, [vShuffleTime] ld a, [vShuffleTime]
ld [rLFSR], a ld [rLFSR], a
; check for B button press and change scene ; check for A button press and change scene
ld hl, rMYBTNP ld hl, rMYBTNP
bit 4, [hl] bit 5, [hl]
jp z, .doneWithB jp z, .doneWithB
ld hl, ScreenMainMenu ld hl, ScreenMainMenu
call ChangeScene call ChangeScene
ret ret
.doneWithB .doneWithB
call ShuffleButtonHandler call ShuffleButtonHandler
.doneWithButtons .doneWithButtons
call ShufflePickAnimation call ShufflePickAnimation
@ -348,26 +330,17 @@ ShowSprites:
ret ret
ShuffleDraw: ShuffleDraw:
ld a, [vCurrentBackgroundTile]
ld l, a
ld a, [vCurrentBackgroundTile+1]
ld h, a
ld de, _VRAM + $1000 + 1*16
call CopyOneTileData
ld de, SAFE_DMA_LOCATION ld de, SAFE_DMA_LOCATION
ld a, HIGH(MY_OAM) ld a, HIGH(MY_OAM)
call RunDMA call RunDMA
ld hl, SquaresTiles
inc hl
ld b, 0
ld a, [vFrameCountSquares]
ld c, a
add hl, bc
add hl, bc
ld c, [hl]
inc hl
ld b, [hl]
ld h, b
ld l, c
ld de, _VRAM+$100*16 + 1*16 ; tile number $101 is the sliding background
ld bc, (SquaresTileset8 - SquaresTileset7) / 8
call CopyRangeUnsafeBy8s
ret ret
ShuffleTeardown: ShuffleTeardown:

View File

@ -25,6 +25,7 @@ SpreadSelectSetup:
ret ret
.asyncTask: ; setup task to be executed async .asyncTask: ; setup task to be executed async
ld a, HIGH(ZEROES) ld a, HIGH(ZEROES)
ld de, SAFE_DMA_LOCATION ld de, SAFE_DMA_LOCATION
call RunDMA call RunDMA
@ -46,31 +47,33 @@ SpreadSelectSetup:
ret ret
SpreadSelectUpdate: SpreadSelectUpdate:
call ScrollBackgroundTile
ld hl, rMYBTNP ld hl, rMYBTNP
bit 4, [hl]
jp z, .doneB
ld hl, ScreenMainMenu
call ChangeScene
ret
.doneB
bit 5, [hl] bit 5, [hl]
jp z, .doneA jp z, .doneB
ld hl, ScreenCardRead ld hl, ScreenMainMenu
call ChangeScene call ChangeScene
ret ret
.doneA .doneB
bit 4, [hl]
jp z, .doneA
ld hl, ScreenCardRead
call ChangeScene
ret
.doneA
;up and down ;up and down
ld a, [vSelectedSpreadIndex] ld a, [vSelectedSpreadIndex]
bit 3, [hl] ; select the down key bit 3, [hl] ; select the down key
jp z, .doneDown ; skip the following code if down is not pressed jp z, .doneDown ; skip the following code if down is not pressed
inc a ; increment when they press down inc a ; increment when they press down
.doneDown .doneDown
bit 2, [hl] ; select up key bit 2, [hl] ; select up key
jp z, .doneUp ; skip the following code if up is not pressed jp z, .doneUp ; skip the following code if up is not pressed
dec a ; decrement when they press up because the deck has card 0 at the top dec a ; decrement when they press up because the deck has card 0 at the top
.doneUp .doneUp
ld hl, Spreads ld hl, Spreads
call ArrayClampLooping call ArrayClampLooping
ld [vSelectedSpreadIndex], a ; save clamped index ld [vSelectedSpreadIndex], a ; save clamped index
@ -80,12 +83,12 @@ SpreadSelectUpdate:
ld hl, rMYBTNP ld hl, rMYBTNP
bit 1, [hl] bit 1, [hl]
jp z, .doneLeft ; skip the following code if left is not pressed jp z, .doneLeft ; skip the following code if left is not pressed
dec a dec a
.doneLeft .doneLeft
bit 0, [hl] bit 0, [hl]
jp z, .doneRight ; skip the following code if right is not pressed jp z, .doneRight ; skip the following code if right is not pressed
inc a inc a
.doneRight .doneRight
ld hl, vCurrentSpread ld hl, vCurrentSpread
ld c, [hl] ld c, [hl]
inc hl inc hl
@ -97,34 +100,6 @@ SpreadSelectUpdate:
ld [vSelectedSpreadCard], a ld [vSelectedSpreadCard], a
ld hl, vTime
ld a, [rDELTAT]
ld b, a
ld a, [vTime]
add a, b
ld [vTime], a
ld a, [vTime+1]
adc a, 0
ld [vTime+1], a ; increment time. when the 16bit time register is greater
; than 4096 ($10_00) then one second has passed. so that's satisfied when
; vTime+1 is equal to or greater than $10
ld a, [vTime+1]
cp a, $01
jp c, .doneTimer ; if the timer is less than $0100, skip to end
;otherwise reset the timer
ld a, 0
ld [vTime], a
ld [vTime+1], a
ld hl, SquaresTiles
ld a, [vFrameCountSquares]
inc a
call ArrayClampLooping
ld [vFrameCountSquares], a
.doneTimer
ld a, [vSelectedSpreadIndex] ld a, [vSelectedSpreadIndex]
ld hl, vPreviousSpreadIndex ld hl, vPreviousSpreadIndex
cp a, [hl] cp a, [hl]
@ -219,7 +194,7 @@ DrawSpreadTask: ; draw the spread large in the middle of the screen, and descs
ld hl, ONES ld hl, ONES
ld b, 8 ld b, 8
ld c, 14 ld c, 14
call CopyTilesToMapUnsafe call CopyTilesToMap
DrawSpreadTaskWithoutRefreshingBackgroundFirst: DrawSpreadTaskWithoutRefreshingBackgroundFirst:
; step past the spread layout to get to the spread description ; step past the spread layout to get to the spread description
ld a, [vCurrentSpread] ld a, [vCurrentSpread]
@ -280,21 +255,12 @@ DrawSpreadCards:
ret ret
SpreadSelectDraw: SpreadSelectDraw:
ld hl, SquaresTiles ld a, [vCurrentBackgroundTile]
inc hl ld l, a
ld b, 0 ld a, [vCurrentBackgroundTile+1]
ld a, [vFrameCountSquares] ld h, a
ld c, a ld de, _VRAM + $1000 + 1*16
add hl, bc call CopyOneTileData
add hl, bc
ld c, [hl]
inc hl
ld b, [hl]
ld h, b
ld l, c
ld de, _VRAM + $100*16 + 1*16
ld bc, (SquaresTileset8 - SquaresTileset7) / 8
call CopyRangeUnsafeBy8s
ret ret
SpreadSelectTeardown: SpreadSelectTeardown:

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -4,75 +4,122 @@
KeyArtTiles: KeyArtTiles:
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00 db $00,$00,$00,$c0,$00,$30,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $ff,$03,$ff,$03,$ff,$03,$ff,$03,$ff,$07,$ff,$07,$ff,$07,$ff,$07 db $ff,$00,$ff,$00,$00,$00,$1f,$1f,$04,$0d,$04,$0d,$04,$0d,$04,$0d
db $ff,$00,$ff,$00,$00,$00,$fc,$fc,$90,$b0,$90,$b0,$90,$b0,$90,$b0
db $04,$0d,$04,$0d,$04,$0d,$04,$0d,$04,$0d,$1f,$1f,$00,$00,$00,$00
db $90,$b0,$90,$b0,$90,$b0,$90,$b0,$90,$b0,$fc,$fc,$00,$00,$00,$00
db $00,$ff,$00,$ff,$00,$ff,$00,$f0,$07,$e7,$0f,$cf,$1f,$9f,$3f,$3f
db $00,$ff,$03,$fc,$0f,$c0,$07,$00,$f1,$f0,$fc,$fc,$fe,$fe,$ff,$bf
db $7f,$7f,$7f,$7f,$7f,$7f,$ff,$ff,$ff,$ff,$fe,$fe,$f0,$e0,$f0,$ee
db $ff,$df,$fe,$ee,$ff,$ff,$cf,$cf,$8f,$8f,$07,$07,$03,$03,$03,$3b
db $7a,$66,$10,$20,$51,$a0,$10,$a0,$0a,$b1,$85,$18,$c2,$0c,$00,$0f
db $ab,$33,$80,$02,$00,$82,$04,$02,$28,$c4,$d0,$0d,$21,$18,$00,$f8
db $00,$00,$00,$00,$0f,$0f,$1f,$1f,$3a,$3c,$78,$71,$70,$60,$70,$68
db $00,$00,$80,$80,$f0,$f0,$78,$f8,$3c,$3c,$3c,$bc,$1e,$1e,$0f,$8f
db $70,$60,$60,$74,$60,$70,$68,$70,$68,$72,$60,$78,$20,$38,$34,$39
db $00,$00,$80,$80,$c0,$c0,$f0,$f0,$f8,$f8,$fc,$fc,$fe,$fe,$ff,$ff
db $30,$3c,$3a,$3c,$19,$3e,$1d,$3e,$0c,$3f,$0e,$3f,$06,$3f,$07,$1f
db $80,$80,$c0,$c0,$e0,$e0,$f0,$f0,$f8,$f8,$c0,$f8,$c0,$7c,$c0,$6f
db $03,$1f,$01,$1d,$00,$1c,$00,$0e,$00,$0e,$00,$0e,$00,$0e,$00,$0e
db $bc,$c0,$9e,$e1,$cf,$f0,$67,$78,$33,$3c,$19,$1e,$0e,$0f,$07,$07
db $00,$c0,$00,$f0,$00,$38,$00,$0c,$00,$06,$80,$03,$00,$81,$00,$aa
db $00,$0e,$00,$07,$00,$07,$00,$07,$00,$07,$00,$07,$00,$03,$00,$03
db $03,$03,$00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$00,$80,$00,$80
db $00,$60,$00,$60,$00,$60,$10,$70,$18,$f8,$fc,$fc,$fc,$fc,$fe,$fe
db $00,$03,$00,$01,$00,$00,$00,$00,$01,$00,$03,$00,$03,$00,$07,$00
db $00,$c0,$00,$c0,$00,$e0,$00,$f0,$80,$78,$c0,$3c,$e0,$3f,$f8,$7f
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$e0
db $00,$07,$00,$03,$00,$03,$00,$03,$00,$01,$00,$01,$00,$01,$00,$01
db $fe,$fe,$fe,$fe,$fe,$fe,$fe,$fe,$fe,$fe,$7c,$fc,$7c,$fc,$b0,$f8
db $fc,$ff,$fe,$ff,$fd,$fe,$fb,$fc,$ff,$f8,$f7,$f8,$ff,$f0,$df,$e0
db $00,$fc,$00,$ff,$c0,$3f,$f8,$07,$ff,$0f,$ff,$0f,$ff,$0e,$ff,$04
db $00,$01,$00,$80,$00,$f0,$00,$fc,$00,$ff,$e0,$1f,$fe,$1f,$ff,$1f
db $1f,$ff,$0f,$ff,$0f,$ff,$03,$7f,$01,$ff,$01,$fe,$0f,$f0,$ff,$80
db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$7f,$3f,$ff
db $a0,$f0,$d0,$f0,$d8,$f8,$dc,$fc,$ec,$fc,$ee,$fe,$f6,$fe,$f6,$fe
db $1f,$ff,$3f,$cf,$3f,$c7,$7f,$83,$7f,$81,$7f,$80,$ff,$80,$bf,$ff
db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$bf,$df
db $fa,$fe,$fc,$fc,$fe,$fe,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
db $bf,$4f,$df,$27,$df,$23,$bf,$c1,$ff,$80,$ff,$00,$ff,$00,$ff,$00
db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$7f,$ff,$3f,$ff,$1f
db $fe,$83,$fe,$87,$fe,$cf,$fe,$cf,$ff,$e7,$ff,$e3,$ff,$e3,$ff,$f1
db $00,$7c,$00,$07,$00,$01,$00,$00,$c0,$00,$f0,$00,$00,$f8,$00,$fe
db $07,$06,$07,$07,$03,$83,$83,$03,$c3,$03,$c1,$21,$70,$80,$30,$c8
db $06,$06,$04,$04,$cc,$0c,$d8,$28,$ff,$08,$ff,$08,$f8,$0f,$3f,$cf
db $cc,$ff,$fc,$ff,$70,$71,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $00,$ff,$0e,$ff,$00,$ff,$00,$ff,$00,$3f,$00,$1f,$00,$0f,$00,$0f
db $03,$ff,$7f,$ff,$7f,$ff,$7f,$ff,$3f,$ff,$3f,$ff,$1f,$ff,$1f,$ff
db $07,$18,$07,$78,$88,$f0,$e0,$c0,$60,$e0,$30,$30,$1f,$5c,$07,$17
db $f0,$0c,$23,$07,$23,$03,$03,$03,$03,$03,$01,$01,$87,$01,$01,$01
db $01,$05,$00,$01,$00,$00,$00,$00,$18,$18,$1c,$1c,$0c,$0c,$0e,$0e
db $07,$07,$03,$83,$03,$03,$01,$01,$01,$01,$01,$01,$01,$00,$03,$00
db $0f,$00,$fe,$01,$f9,$06,$e4,$18,$90,$60,$40,$80,$80,$00,$00,$c0
db $9f,$9f,$87,$07,$03,$03,$01,$01,$01,$00,$01,$00,$01,$00,$01,$00
db $d0,$67,$d0,$61,$d8,$60,$dc,$e0,$c7,$f8,$f9,$fe,$7e,$ff,$3f,$ff
db $00,$a5,$00,$b5,$00,$f5,$e0,$f5,$e0,$f5,$e0,$f7,$e3,$ff,$7f,$ff
db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
db $ff,$00,$ff,$00,$ff,$80,$ff,$80,$ff,$c0,$ff,$f8,$ff,$ff,$ff,$ff db $01,$00,$01,$00,$3f,$c0,$1f,$60,$07,$39,$01,$0f,$00,$03,$00,$00
db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$04 db $3f,$7f,$3f,$7f,$2f,$7f,$37,$7f,$3b,$ff,$fd,$ff,$fe,$ff,$ff,$ff
db $ff,$00,$ff,$00,$ff,$07,$ff,$07,$ff,$07,$ff,$07,$ff,$07,$ff,$0f db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$00,$c0
db $ff,$0f,$ff,$7f,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff db $00,$00,$00,$00,$f3,$00,$ff,$00,$ff,$80,$ff,$e0,$ff,$ff,$1f,$1f
db $ff,$80,$ff,$80,$ff,$c0,$ff,$f0,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff db $ff,$e3,$eb,$f5,$f3,$7d,$ff,$3f,$ff,$0f,$ff,$03,$ff,$00,$ff,$00
db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$c0,$ff,$f0,$ff,$f8 db $ff,$0f,$ff,$07,$ff,$03,$ff,$01,$ff,$00,$0f,$00,$02,$00,$00,$00
db $ff,$06,$ff,$03,$ff,$03,$ff,$03,$ff,$03,$ff,$07,$ff,$0f,$ff,$3f db $00,$00,$80,$01,$80,$01,$c0,$05,$40,$95,$00,$d5,$00,$d5,$00,$d7
db $ff,$3f,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff db $ff,$1f,$ff,$0f,$ff,$0f,$ff,$07,$ff,$07,$ff,$03,$ff,$03,$ff,$01
db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$fe,$fe db $ff,$f0,$ff,$f8,$ff,$f8,$ff,$7c,$ff,$7c,$ff,$3e,$ff,$1e,$ff,$0e
db $ff,$ff,$fe,$fe,$fd,$fd,$ea,$ea,$d4,$d4,$a0,$a0,$50,$50,$a0,$a0 db $ff,$01,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00
db $e0,$e0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $0f,$00,$0f,$00,$1f,$01,$1f,$01,$3f,$01,$3f,$03,$3f,$03,$3f,$07
db $07,$07,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $ff,$c0,$ff,$80,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00
db $ff,$ff,$7f,$7f,$1f,$1f,$07,$07,$03,$03,$00,$00,$00,$00,$00,$00 db $3f,$0f,$3f,$0f,$3f,$1f,$3f,$1e,$3f,$0c,$3f,$00,$3f,$00,$1f,$00
db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$7f,$7f,$3f,$3f db $e3,$e3,$3f,$3f,$07,$47,$00,$15,$00,$00,$00,$00,$00,$00,$00,$00
db $fe,$fe,$fd,$fd,$fa,$fa,$fd,$fd,$fa,$fa,$d5,$d5,$fa,$fa,$f5,$f5 db $02,$3f,$1c,$7f,$3f,$1f,$3f,$00,$bf,$80,$bf,$80,$bf,$80,$bf,$80
db $a0,$a0,$00,$00,$80,$80,$00,$00,$80,$80,$00,$00,$00,$00,$00,$00 db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00
db $1f,$1f,$1f,$1f,$0f,$0f,$07,$07,$07,$07,$03,$03,$03,$03,$01,$01 db $0f,$00,$07,$00,$03,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $fc,$fc,$aa,$aa,$f4,$f4,$aa,$aa,$f4,$f4,$ea,$ea,$74,$74,$aa,$aa db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$7f,$00,$0f,$00,$03,$00,$00,$00
db $01,$01,$01,$01,$01,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $1f,$00,$03,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $fc,$fc,$aa,$aa,$74,$74,$aa,$aa,$f4,$f4,$ea,$ea,$f4,$f4,$aa,$aa db $ff,$00,$c1,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01,$01,$01,$01,$01,$01 db $ff,$00,$ff,$00,$3f,$00,$07,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $ee,$ee,$f5,$f5,$fa,$fa,$f5,$f5,$fa,$fa,$fd,$fd,$fa,$fa,$fd,$fd db $00,$80,$03,$03,$00,$80,$00,$50,$00,$fc,$60,$fe,$60,$ff,$70,$ff
db $00,$00,$00,$00,$00,$00,$00,$00,$80,$80,$00,$00,$80,$80,$40,$40 db $00,$01,$00,$01,$00,$03,$00,$10,$00,$40,$00,$7c,$00,$f6,$00,$ff
db $01,$01,$03,$03,$03,$03,$07,$07,$07,$07,$0f,$0f,$1f,$1f,$1f,$1f db $00,$00,$00,$80,$00,$c0,$00,$00,$00,$00,$00,$40,$00,$7c,$00,$98
db $ff,$ff,$fe,$fe,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff db $00,$02,$00,$1c,$00,$00,$00,$c0,$00,$e0,$00,$3c,$00,$3c,$00,$1e
db $40,$40,$80,$80,$50,$50,$e8,$e8,$f4,$f4,$f8,$f8,$ff,$ff,$ff,$ff db $73,$ff,$7f,$ff,$3e,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$ff db $80,$ff,$f8,$f9,$7f,$ff,$3f,$ff,$3c,$ff,$1d,$ff,$1d,$ff,$1c,$ff
db $00,$00,$00,$00,$00,$00,$03,$03,$07,$07,$1f,$1f,$7f,$7f,$ff,$ff db $00,$f8,$00,$fe,$e0,$fb,$f0,$f6,$d8,$ff,$bf,$ff,$0f,$ff,$0f,$ff
db $3f,$3f,$7f,$7f,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff db $00,$00,$00,$00,$01,$01,$01,$fd,$83,$ff,$c2,$ff,$0e,$ff,$fc,$ff
db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$0f db $f9,$1f,$fa,$1f,$fa,$1f,$fa,$1f,$fa,$1f,$f0,$1f,$72,$1f,$72,$1f
db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$fe,$ff,$f8,$ff,$f0,$ff,$f0 db $7f,$8d,$7f,$80,$ff,$80,$ff,$80,$ff,$80,$ff,$80,$ff,$80,$7f,$80
db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$e7,$ff,$00,$ff,$00,$ff,$00,$ff,$00 db $ff,$e0,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00
db $ff,$07,$ff,$03,$ff,$03,$ff,$02,$ff,$00,$ff,$00,$ff,$00,$ff,$00 db $3f,$c0,$1f,$e0,$ff,$c0,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00
db $ff,$ff,$ff,$ff,$ff,$cf,$ff,$07,$ff,$03,$ff,$01,$ff,$00,$ff,$00 db $00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff
db $ff,$ff,$f8,$f8,$fd,$fd,$fc,$fc,$fe,$fe,$fe,$fe,$ff,$1f,$ff,$0f db $00,$ff,$0f,$f0,$06,$f8,$00,$fe,$00,$fe,$00,$fe,$02,$fc,$06,$f8
db $ff,$ff,$00,$00,$f6,$f6,$e6,$e6,$ef,$ef,$4f,$4f,$5f,$5f,$1f,$1f db $02,$fc,$00,$fe,$00,$ff,$00,$ff,$e0,$1f,$ff,$00,$00,$00,$00,$00
db $ff,$ff,$00,$00,$fb,$fb,$73,$73,$77,$77,$27,$27,$af,$af,$8f,$8f db $3f,$00,$7f,$00,$01,$7e,$00,$ff,$00,$ff,$00,$ff,$80,$7f,$ff,$00
db $ff,$ff,$1f,$1f,$3f,$3f,$3f,$3f,$3f,$3f,$3f,$3e,$3f,$38,$3f,$38 db $ff,$00,$ff,$00,$ff,$00,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$fe,$01
db $ff,$e0,$ff,$e0,$ff,$e0,$ff,$e0,$ff,$80,$ff,$00,$ff,$00,$ff,$00 db $ff,$00,$ff,$00,$ff,$00,$07,$f8,$00,$ff,$00,$ff,$00,$ff,$00,$ff
db $ff,$0f,$ff,$0f,$ff,$0f,$fe,$0e,$fe,$0e,$fc,$0c,$f8,$08,$ff,$0f db $00,$ff,$00,$1f,$00,$3f,$00,$ff,$00,$ff,$00,$7f,$00,$03,$00,$00
db $bf,$bf,$1f,$1f,$5f,$5f,$4f,$4f,$ef,$ef,$e6,$e6,$00,$00,$ff,$ff db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$03,$fc,$00,$ff,$00,$ff,$00,$ff
db $df,$df,$8f,$8f,$af,$af,$27,$27,$77,$77,$73,$73,$00,$00,$ff,$ff db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$00,$ff,$00,$ff,$00,$ff,$00,$ff
db $3f,$38,$3f,$38,$3f,$30,$3f,$30,$3f,$30,$3f,$30,$1f,$10,$ff,$f0 db $bf,$ff,$df,$ff,$ef,$ff,$f7,$ff,$f9,$ff,$fe,$ff,$ff,$ff,$ff,$ff
db $1f,$1f,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$ff,$00,$ff
db $ff,$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $fd,$fd,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $dd,$dd,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $55,$55,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $11,$11,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
KeyArt: BackgroundCopy:
db $1b, $1b, $1c, $1d, $1d, $1e, $1b, $1b db $7d, $7d, $67, $68, $69, $6a, $7d, $7d
db $1f, $20, $21, $1d, $1d, $1d, $22, $23 db $73, $73, $6b, $6c, $6d, $6e, $73, $73
db $24, $25, $1d, $1d, $1d, $1d, $1d, $1d db $73, $20, $21, $6f, $70, $71, $61, $61
db $1d, $1d, $1d, $1d, $1d, $1d, $1d, $1d db $74, $22, $23, $60, $72, $61, $61, $61
db $1d, $1d, $1d, $1d, $1d, $1d, $1d, $1d db $75, $24, $25, $76, $77, $78, $7a, $7b
db $1d, $26, $27, $28, $29, $2a, $2b, $1d db $26, $49, $4a, $27, $1a, $79, $73, $73
db $1d, $2c, $2d, $1a, $1a, $1a, $2e, $1d db $28, $4b, $5f, $4c, $29, $1a, $1a, $1a
db $1d, $2f, $1a, $1a, $1a, $1a, $30, $1d db $2a, $44, $55, $4d, $4e, $2b, $1a, $1a
db $1d, $31, $1a, $1a, $1a, $1a, $32, $1d db $2c, $2d, $45, $43, $52, $4f, $2e, $54
db $1d, $33, $34, $1a, $1a, $1a, $35, $1d db $2f, $30, $46, $47, $58, $53, $50, $31
db $1d, $36, $37, $38, $38, $39, $3a, $1d db $32, $33, $34, $35, $48, $51, $7c, $36
db $1d, $1d, $1d, $1d, $1d, $1d, $1d, $1d db $5c, $37, $38, $39, $3a, $3b, $51, $3c
db $1d, $1d, $1d, $1d, $1d, $1d, $1d, $1d db $5e, $5d, $61, $59, $42, $3d, $3e, $3f
db $3b, $1d, $1d, $1d, $1d, $1d, $3c, $3d db $62, $63, $61, $5b, $5a, $56, $40, $41
db $3e, $3f, $40, $41, $42, $43, $44, $1b db $1a, $1a, $64, $1c, $1d, $65, $66, $57
db $1b, $1b, $45, $46, $47, $48, $1b, $1b db $1a, $1a, $1a, $1e, $1f, $1a, $1a, $1a

View File

@ -4,70 +4,50 @@
SpriteTiles: SpriteTiles:
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff db $1e,$18,$6c,$08,$7d,$09,$b7,$83,$9f,$87,$8c,$84,$cc,$c4,$4c,$44
db $00,$00,$03,$03,$0f,$0f,$ff,$ff,$ff,$ff,$ff,$ff,$7f,$7f,$1f,$1f db $00,$00,$c0,$c0,$c0,$c0,$80,$80,$00,$00,$00,$00,$00,$00,$8a,$00
db $00,$00,$f0,$f0,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff db $4c,$44,$2c,$04,$25,$05,$a1,$81,$81,$81,$01,$01,$00,$00,$00,$00
db $00,$00,$3e,$3e,$ff,$ff,$f7,$ff,$d5,$ff,$ea,$ff,$d1,$ff,$ff,$ff db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$63,$60,$73,$70
db $03,$03,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $40,$40,$40,$40,$03,$03,$23,$23,$61,$21,$68,$20,$6c,$24,$4c,$04
db $cf,$ff,$e7,$ff,$73,$7f,$19,$1f,$0f,$0f,$0e,$0f,$06,$07,$06,$05 db $16,$14,$12,$10,$12,$10,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $06,$05,$06,$05,$07,$04,$07,$04,$03,$03,$01,$01,$00,$00,$00,$00 db $ca,$00,$4a,$00,$5a,$10,$10,$10,$10,$10,$00,$00,$00,$00,$00,$00
db $f2,$7e,$fe,$fe,$ee,$ee,$c6,$c6,$e0,$e0,$f0,$f0,$ff,$ff,$01,$01 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0c,$00
db $00,$00,$00,$00,$fc,$fc,$58,$f8,$b0,$f0,$60,$e0,$80,$80,$00,$00 db $0f,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$fa,$fa,$fd,$3d,$fd,$1f,$fb,$1f db $f0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $80,$80,$e0,$e0,$e0,$e0,$e0,$e0,$c0,$c0,$80,$80,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$07,$00,$00,$00
db $01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$f8,$00,$00,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$80,$f8,$f8 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$3f,$00,$00,$00
db $fe,$fe,$e3,$ff,$61,$ff,$60,$ff,$30,$ff,$b3,$ff,$bf,$ff,$bf,$ff db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$3e,$00,$00,$00,$00,$00
db $00,$00,$80,$80,$c0,$c0,$40,$c0,$e0,$e0,$e0,$e0,$c0,$c0,$c0,$c0 db $01,$01,$01,$01,$01,$01,$08,$08,$0a,$0a,$02,$02,$00,$00,$00,$00
db $5f,$7f,$5f,$7f,$5f,$73,$bc,$e4,$f0,$c0,$e0,$c0,$c0,$80,$80,$80 db $00,$00,$c7,$c7,$c7,$c7,$8e,$8e,$0c,$0c,$08,$08,$08,$08,$8e,$0c
db $80,$80,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $40,$40,$41,$41,$01,$01,$20,$20,$60,$20,$68,$20,$6c,$24,$4c,$04
db $7f,$41,$7f,$41,$7f,$40,$3f,$00,$3f,$31,$1f,$13,$1e,$12,$00,$00 db $c0,$00,$00,$00,$61,$61,$e1,$e1,$83,$83,$06,$06,$04,$04,$8e,$0c
db $01,$01,$03,$03,$0f,$0f,$0e,$0e,$00,$00,$03,$03,$0f,$0e,$1f,$10 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0c,$0c,$0d,$0c
db $ff,$ff,$f2,$f2,$02,$02,$00,$00,$00,$00,$ff,$ff,$ff,$06,$ff,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00
db $ff,$ff,$bb,$ba,$3b,$3a,$1f,$1f,$3c,$34,$7f,$61,$df,$d0,$ef,$68 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$3c,$00,$00,$00
db $ff,$e0,$ff,$00,$ff,$00,$ff,$c0,$3f,$3e,$07,$07,$81,$81,$01,$01 db $0f,$0c,$de,$c4,$de,$c4,$da,$c0,$cd,$c1,$4d,$41,$4a,$42,$4a,$42
db $1f,$10,$1f,$10,$1f,$18,$0f,$0f,$03,$03,$00,$00,$00,$00,$00,$00 db $00,$00,$60,$60,$e3,$e3,$83,$83,$06,$06,$0c,$0c,$08,$08,$8e,$0c
db $ff,$00,$ff,$00,$ff,$30,$ff,$fc,$cf,$cd,$0f,$0f,$07,$07,$0f,$0f db $0b,$08,$ba,$88,$b6,$84,$db,$c1,$cd,$c1,$4b,$43,$4a,$42,$4e,$46
db $f2,$32,$f0,$00,$fa,$0a,$fe,$3e,$fe,$3e,$fe,$fe,$fe,$fe,$fc,$fc db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$31,$30,$33,$30
db $07,$07,$0f,$0f,$07,$07,$07,$07,$0f,$0f,$0f,$0d,$07,$04,$03,$02 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$bf,$00,$00,$00
db $fc,$fc,$fc,$fc,$fc,$fc,$fc,$fc,$fd,$fd,$f9,$99,$f1,$11,$e0,$00 db $1a,$18,$2c,$08,$bc,$88,$b5,$81,$9b,$83,$4a,$42,$4c,$44,$4c,$44
db $00,$00,$01,$01,$01,$01,$03,$03,$46,$46,$c0,$c0,$87,$87,$1f,$1f db $40,$40,$40,$40,$01,$01,$21,$21,$61,$21,$68,$20,$6c,$24,$4c,$04
db $00,$00,$80,$80,$df,$df,$fb,$ff,$73,$7f,$e7,$ff,$cf,$ff,$df,$ff db $40,$40,$40,$40,$00,$00,$20,$20,$60,$20,$68,$20,$6c,$24,$4c,$04
db $ff,$02,$ff,$04,$f3,$0c,$f9,$0f,$fc,$3f,$fe,$ff,$ff,$ff,$f8,$f8 db $ce,$0c,$5e,$14,$5e,$14,$10,$10,$10,$10,$00,$00,$00,$00,$00,$00
db $f0,$f0,$e0,$e0,$c0,$c0,$00,$00,$20,$20,$60,$60,$00,$00,$00,$00 db $00,$00,$63,$63,$e7,$e7,$87,$87,$0c,$0c,$08,$08,$08,$08,$8e,$0c
db $ff,$63,$ff,$03,$ff,$07,$ff,$0f,$fb,$8f,$76,$fe,$fc,$fc,$f8,$f8 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0f,$00
db $78,$78,$38,$38,$38,$38,$20,$20,$20,$20,$30,$30,$18,$18,$08,$08 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0c,$00,$f0,$00
db $0c,$0c,$ff,$7f,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$03,$00,$00,$00,$00,$00
db $ff,$ff,$fc,$fc,$e0,$e0,$c0,$c0,$70,$70,$18,$18,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$f0,$00,$00,$00,$00,$00
db $00,$00,$0f,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$19,$18,$19,$18
db $3f,$00,$ff,$00,$ff,$f0,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$00,$ff,$00
db $fc,$00,$ff,$00,$ff,$01,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$f1
db $03,$03,$00,$00,$e0,$e0,$07,$07,$1f,$1f,$3f,$31,$7f,$60,$ff,$e0
db $fe,$fe,$00,$00,$00,$00,$08,$08,$08,$08,$9c,$9c,$fe,$fe,$ff,$07
db $ff,$e4,$7f,$7f,$38,$38,$10,$10,$00,$00,$00,$00,$00,$00,$00,$00
db $ff,$03,$ff,$c3,$fe,$fe,$3c,$3c,$00,$00,$00,$00,$00,$00,$00,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$18,$18,$10,$10,$c0,$c0,$8f,$8f
db $00,$00,$00,$00,$03,$03,$0e,$0e,$fc,$fc,$f8,$f8,$fe,$fe,$00,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$03,$03,$ff,$ff,$ff,$ff,$00,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$e0,$e0,$ff,$ff,$ff,$ff,$00,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$f3,$f3,$ff,$ff,$00,$00
db $00,$00,$00,$00,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00
db $00,$00,$00,$00,$00,$00,$f0,$f0,$f8,$f8,$d8,$d8,$c0,$c0,$00,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01,$01,$ff,$ff,$00,$00
db $00,$00,$00,$00,$00,$00,$00,$00,$01,$01,$07,$07,$07,$07,$00,$00
db $00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
db $00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$e0,$e0
db $00,$00,$e0,$e0,$fc,$fc,$fc,$fc,$f8,$f8,$e0,$e0,$00,$00,$00,$00
db $f8,$f8,$00,$00,$00,$00,$00,$00,$20,$20,$20,$20,$60,$60,$c0,$c0
db $60,$60,$60,$60,$60,$60,$c0,$c0,$00,$00,$00,$00,$00,$00,$00,$00
db $00,$00,$00,$00,$06,$06,$02,$02,$06,$06,$0c,$0c,$18,$18,$00,$00
Sprites: Sprites:
db $02, $03, $04, $09, $12, $00, $1c, $1d, $24, $25, $26, $22, $34, $35, $36 db $00, $00, $08, $00, $00, $00, $0b, $0c
db $05, $06, $0a, $0b, $00, $13, $14, $15, $16, $1e, $20, $23, $37, $38, $00 db $00, $09, $0a, $00, $00, $00, $00, $00
db $00, $07, $08, $0d, $00, $17, $18, $19, $00, $1f, $21, $2b, $00, $00, $00 db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $0c, $0e, $0f, $00, $1a, $1b, $00, $00, $00, $27, $28, $00, $00 db $00, $00, $00, $00, $00, $0e, $04, $0d
db $00, $00, $00, $10, $11, $00, $00, $00, $00, $00, $00, $29, $2a, $39, $00 db $00, $00, $00, $00, $0f, $05, $01, $10
db $00, $33, $2c, $00, $00, $2d, $2e, $2f, $00, $00, $32, $30, $31, $00, $00 db $00, $00, $00, $00, $00, $06, $03, $1e

Binary file not shown.

View File

@ -26,7 +26,8 @@ DEF INTERRUPT_LCD EQU SCENE_TEARDOWN + 4
def CARD_INIT equ INTERRUPT_LCD + 4 def CARD_INIT equ INTERRUPT_LCD + 4
def CARD_UPDATE equ CARD_INIT + 4 def CARD_UPDATE equ CARD_INIT + 4
def CARD_DRAW equ CARD_UPDATE + 4 def CARD_DRAW equ CARD_UPDATE + 4
println "Card Draw is ", SCENE_DRAW def CARD_PRINT_PREP equ CARD_DRAW + 4
println "Card Draw is ", CARD_DRAW
; each of these sections is way bgger than it needs to be ; each of these sections is way bgger than it needs to be
; i doubt any of them will hold more than $20 bytes at all ; i doubt any of them will hold more than $20 bytes at all
@ -81,8 +82,8 @@ SECTION "Header", ROM0[$100]
jp EntryPoint jp EntryPoint
ds $147 - @, 0 ; skip to the mbc byte ds $147 - @, 0 ; skip to the mbc byte
db $01 ; MBC1 with no ram or battery :) db CART_ROM_MBC1 ; MBC1 with no ram or battery :)
db $01 ; 64kb rom :) db CART_ROM_128KB
ds $150 - @, 0 ; Make room for the header ds $150 - @, 0 ; Make room for the header
EntryPoint: EntryPoint:
@ -166,6 +167,8 @@ EntryPoint:
ld [hl], a ld [hl], a
ld hl, CARD_DRAW - 1 ld hl, CARD_DRAW - 1
ld [hl], a ld [hl], a
ld hl, CARD_PRINT_PREP - 1
ld [hl], a
ld hl, Instructions ld hl, Instructions
inc hl inc hl
@ -187,6 +190,8 @@ EntryPoint:
ld [hl], a ld [hl], a
ld hl, CARD_DRAW ld hl, CARD_DRAW
ld [hl], a ld [hl], a
ld hl, CARD_PRINT_PREP
ld [hl], a
ld hl, Instructions ld hl, Instructions
inc hl inc hl
@ -209,6 +214,8 @@ EntryPoint:
ld [hl], a ld [hl], a
ld hl, CARD_DRAW + 1 ld hl, CARD_DRAW + 1
ld [hl], a ld [hl], a
ld hl, CARD_PRINT_PREP + 1
ld [hl], a
ld hl, Instructions ld hl, Instructions
inc hl inc hl
@ -232,6 +239,8 @@ EntryPoint:
ld [hl], a ld [hl], a
ld hl, CARD_DRAW + 2 ld hl, CARD_DRAW + 2
ld [hl], a ld [hl], a
ld hl, CARD_PRINT_PREP + 2
ld [hl], a
; set up our scene handle ; set up our scene handle
ld hl, ScreenMainMenu ld hl, ScreenMainMenu
@ -293,9 +302,8 @@ println "scene update is ", SCENE_UPDATE - 1
call SCENE_UPDATE - 1 ; hope this takes not too many scanlines! call SCENE_UPDATE - 1 ; hope this takes not too many scanlines!
di di
ld a, [rIE] ld hl, rIE
or a, IEF_VBLANK set 0, [hl] ; IEF_VBLANK
ld [rIE], a
ei ei
halt halt

Binary file not shown.