diff --git a/00TheFool.inc b/00TheFool.inc index 9750561..a18231a 100644 --- a/00TheFool.inc +++ b/00TheFool.inc @@ -10,127 +10,198 @@ TheFool: db 9, "beginning" db 9, "leap " db 9, "naivete " - dw FoolMapEnd - FoolMap - dw FoolMap - dw FoolTilesEnd - FoolTiles - dw FoolTiles + dw .BackgroundCopyEnd - .BackgroundCopy + dw .BackgroundCopy + dw .KeyArtTilesEnd - .KeyArtTiles + dw .KeyArtTiles + dw .SpriteTilesEnd - .SpriteTiles + dw .SpriteTiles + dw .fInit + dw .fUpdate + dw .fDraw + + ; original export script by gabriel reis, modified by shoofle +.fInit: + ld h, $c2 + ld l, $00 + ld a, 0 + ld [hl+], a ; $c200 = timer for dog + ld [hl+], a ; $c201 = timer for big zero + +.fUpdate: + ldh a, [rDELTAT] + ld b, a + + ld a, [$c300] + add a, b + ld [$c200], a + ld a, [$c300+1] + adc a, 0 + ld [$c300+1], a ; increment time. when the 16bit time register is greater -FoolTiles: + ld a, [$c300+1] + cp a, $08 ; $10 00 = 1 second + jp c, .doneWithTimer1 ; if the timer is less than $0800, skip to end + + ;otherwise reset the timer + ld a, 0 + ld [$c300], a + ld [$c300+1], a + +.doneWithTimer1 + + ld a, [$c302] + add a, b + ld [$c302], a + ld a, [$c302+1] + adc a, 0 + ld [$c302+1], a + + ld a, [$c302+1] + cp a, $10 ; $10 00 = 1 second + jp c, .doneWithTimer2 ; if the timer is less than $0800, skip to end + + ;otherwise reset the timer + ld a, 0 + ld [$c302], a + ld [$c302+1], a + +.doneWithTimer2 + + ret + +.fDraw: + ret + +.SpriteTiles: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 - db $e0,$00,$e0,$10,$e0,$10,$e0,$10,$f0,$08,$f0,$08,$f0,$08,$f0,$09 - db $00,$00,$00,$00,$00,$0f,$00,$30,$00,$40,$00,$80,$00,$80,$00,$00 - db $00,$00,$00,$00,$00,$80,$00,$60,$00,$10,$00,$08,$00,$08,$00,$04 - db $f0,$09,$f8,$05,$f8,$05,$f8,$04,$f8,$04,$f8,$04,$fc,$02,$fc,$02 - db $00,$00,$00,$00,$00,$00,$00,$80,$00,$80,$00,$40,$00,$30,$00,$0f - db $00,$04,$00,$04,$00,$04,$00,$08,$00,$08,$00,$10,$00,$60,$00,$80 - db $00,$00,$00,$00,$00,$00,$00,$00,$07,$1f,$0f,$30,$1f,$62,$7f,$81 - db $00,$00,$00,$00,$00,$00,$fc,$fc,$e0,$1e,$fe,$3e,$e0,$1c,$f0,$90 - db $01,$02,$03,$04,$03,$04,$03,$04,$03,$04,$03,$04,$03,$04,$07,$88 - db $fc,$00,$fc,$01,$fc,$01,$f9,$02,$f3,$04,$e7,$08,$cf,$10,$cf,$10 - db $78,$86,$f0,$08,$f0,$08,$e0,$10,$e0,$10,$c0,$21,$c0,$21,$81,$42 - db $78,$7f,$10,$15,$08,$29,$7c,$75,$7e,$c7,$7f,$a1,$ff,$00,$fe,$81 - db $07,$08,$07,$88,$07,$c8,$0f,$e0,$07,$20,$07,$90,$07,$b0,$07,$90 - db $9f,$20,$9f,$20,$cf,$11,$e7,$0a,$f4,$06,$f5,$04,$f6,$04,$f5,$04 - db $f9,$7a,$de,$8f,$a9,$03,$55,$01,$a8,$02,$55,$00,$aa,$00,$55,$00 - db $fd,$42,$fd,$02,$3f,$c0,$0e,$31,$81,$9e,$8f,$f0,$8e,$71,$5e,$9e - db $07,$90,$07,$d0,$07,$90,$00,$90,$0f,$9f,$80,$55,$00,$d5,$90,$35 - db $ff,$00,$ff,$00,$ff,$00,$3f,$00,$be,$81,$5e,$41,$ec,$e2,$ec,$e2 - db $f6,$04,$75,$84,$77,$85,$36,$46,$35,$44,$13,$20,$1f,$20,$1f,$20 - db $aa,$00,$55,$01,$ff,$ff,$01,$01,$f9,$05,$fe,$02,$ff,$02,$fe,$02 - db $33,$ae,$ff,$47,$79,$47,$fb,$46,$7e,$44,$e5,$5c,$3e,$44,$b9,$46 - db $5b,$0f,$ac,$04,$56,$02,$ab,$81,$d5,$81,$ab,$81,$d5,$81,$ab,$81 - db $14,$10,$08,$08,$04,$04,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02 - db $ff,$02,$fe,$02,$ff,$02,$fe,$02,$ff,$02,$fe,$02,$ff,$02,$fe,$03 - 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,$aa,$82,$d6,$82,$aa,$02 - db $02,$02,$02,$02,$02,$02,$02,$02,$02,$06,$04,$04,$04,$0c,$08,$18 - db $01,$02,$00,$01,$00,$01,$00,$00,$00,$00,$00,$80,$80,$40,$c0,$23 - db $ff,$01,$ff,$01,$fc,$01,$70,$83,$40,$8c,$00,$30,$00,$c1,$00,$0f - db $4f,$11,$8f,$31,$e7,$f9,$03,$8d,$03,$3d,$01,$7f,$01,$ff,$01,$ff - db $56,$02,$aa,$02,$56,$02,$ad,$07,$54,$04,$ad,$04,$55,$04,$ac,$05 - db $00,$30,$20,$60,$40,$c0,$80,$80,$00,$80,$00,$80,$00,$80,$00,$00 - db $c0,$26,$e0,$08,$c0,$10,$80,$23,$80,$47,$00,$8f,$00,$1f,$00,$bf - db $00,$3f,$00,$7f,$00,$ff,$00,$ff,$00,$fe,$00,$fe,$00,$fc,$00,$f0 - db $01,$ff,$01,$ff,$01,$ff,$01,$bf,$00,$bf,$00,$ff,$00,$3f,$00,$3f - db $54,$05,$b8,$1d,$60,$2c,$c0,$66,$80,$e6,$00,$e6,$00,$e6,$00,$e4 - db $01,$1e,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$1c,$1c,$23,$3b - db $fe,$00,$1e,$e1,$02,$1d,$01,$02,$03,$04,$03,$04,$07,$08,$0f,$10 - db $00,$ff,$80,$7f,$80,$7f,$c0,$3e,$e0,$10,$e0,$18,$c0,$28,$80,$48 - db $00,$e0,$00,$c0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 - db $00,$1f,$00,$1f,$00,$1f,$00,$0f,$00,$0f,$00,$0f,$00,$0f,$00,$0f - db $00,$e4,$00,$e4,$00,$c4,$00,$e4,$00,$e4,$00,$e8,$00,$e8,$00,$e4 - db $20,$38,$10,$18,$08,$0c,$08,$0e,$04,$07,$02,$03,$01,$01,$01,$01 - db $ff,$f0,$3f,$20,$2e,$31,$1c,$12,$1e,$1e,$0e,$0e,$04,$84,$08,$c8 - db $80,$48,$00,$88,$00,$08,$00,$08,$00,$08,$00,$08,$00,$00,$7f,$00 - db $00,$0f,$00,$0f,$00,$0f,$00,$0f,$00,$0f,$00,$07,$00,$03,$f8,$03 - db $00,$e4,$00,$e4,$00,$f4,$00,$f6,$00,$f6,$00,$f6,$00,$fc,$1c,$e2 - db $91,$f0,$67,$60,$1f,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00 - db $3c,$c2,$7e,$81,$3f,$40,$9f,$20,$cf,$10,$e7,$08,$f3,$04,$f9,$02 - db $ff,$00,$7f,$00,$3f,$80,$3f,$80,$9f,$40,$8f,$40,$c7,$20,$e7,$10 - db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$f8,$07,$f8,$07,$f0,$0c - db $ff,$00,$ff,$00,$ff,$00,$f3,$0c,$00,$ff,$00,$00,$00,$fe,$00,$07 - db $ff,$00,$ff,$00,$ff,$00,$00,$ff,$00,$c0,$00,$00,$00,$00,$00,$80 - db $fc,$01,$fe,$00,$01,$ff,$06,$07,$38,$38,$40,$40,$40,$60,$40,$7f - db $e3,$18,$71,$8c,$fa,$c7,$7e,$fe,$02,$02,$02,$02,$02,$02,$02,$fe - db $f8,$04,$f8,$04,$f8,$04,$f8,$06,$fc,$02,$fc,$03,$fe,$01,$fe,$01 - db $00,$f0,$00,$1e,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 - db $00,$00,$00,$00,$00,$fc,$00,$03,$00,$00,$00,$00,$00,$00,$00,$00 - db $3f,$3f,$00,$00,$00,$00,$00,$ce,$00,$33,$00,$00,$00,$00,$00,$00 - db $fe,$fe,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$00,$00 - db $00,$00,$00,$00,$00,$00,$00,$00,$00,$bf,$00,$ef,$00,$00,$00,$00 - db $00,$80,$00,$80,$00,$80,$80,$40,$80,$40,$80,$40,$80,$40,$80,$40 - db $80,$40,$80,$60,$c0,$20,$c0,$20,$c0,$20,$c0,$20,$c0,$20,$c0,$20 - db $00,$10,$00,$10,$00,$10,$00,$10,$00,$10,$00,$10,$00,$00,$ff,$00 - db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$9f,$60 - db $3f,$80,$1f,$c0,$1f,$40,$0c,$63,$08,$24,$00,$30,$00,$10,$00,$10 - db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$40,$c0,$20,$e0,$10 - db $f0,$08,$f8,$04,$fc,$02,$fe,$01,$ff,$00,$ff,$00,$ff,$00,$ff,$00 - db $00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$80,$40,$c0,$20,$c0,$20 - db $e0,$10,$f0,$08,$f8,$04,$fc,$02,$fe,$01,$ff,$00,$ff,$00,$ff,$00 - db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$3f,$40,$3f,$40 - db $1f,$20,$1f,$20,$0f,$10,$0f,$10,$07,$08,$07,$08,$07,$08,$03,$04 - db $03,$04,$01,$02,$01,$02,$00,$01,$00,$01,$00,$01,$00,$00,$00,$00 - db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$7f,$80,$7f,$80 - db $3f,$40,$3f,$40,$1f,$20,$1f,$20,$1f,$20,$0f,$10,$0f,$10,$07,$08 - db $07,$08,$03,$04,$03,$04,$03,$04,$01,$02,$01,$02,$00,$01,$00,$01 - db $00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 - db $0f,$10,$0f,$10,$07,$08,$07,$08,$03,$04,$03,$04,$03,$04,$01,$02 - db $00,$00,$00,$00,$00,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00 - db $ff,$00,$ff,$00,$8c,$73,$00,$fe,$00,$00,$00,$00,$00,$00,$00,$00 - db $ff,$00,$ff,$00,$00,$ff,$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,$80,$00 - db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$fe,$01,$fe,$01 - db $fc,$02,$fc,$02,$fc,$02,$fe,$01,$fe,$01,$fe,$01,$fe,$00,$fe,$00 - 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,$00,$01,$00,$01,$00,$01 - db $ff,$00,$7f,$80,$7f,$80,$7f,$80,$7f,$80,$ff,$00,$ff,$00,$ff,$00 - db $00,$01,$00,$01,$00,$01,$01,$02,$01,$02,$01,$02,$01,$02,$01,$02 - db $ff,$00,$ff,$00,$fc,$02,$fc,$02,$f8,$04,$f8,$04,$f0,$08,$f0,$08 - db $f0,$08,$e0,$10,$e0,$10,$e0,$10,$c0,$20,$c0,$20,$80,$40,$80,$40 - db $80,$40,$00,$80,$00,$80,$00,$80,$00,$00,$00,$00,$00,$00,$00,$00 - db $fe,$00,$fe,$00,$fe,$00,$fe,$00,$fe,$00,$fe,$00,$fe,$00,$fc,$02 - db $f0,$0c,$c0,$30,$00,$c0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 - db $00,$01,$01,$02,$03,$04,$07,$08,$0f,$10,$1f,$20,$3f,$40,$3f,$00 - db $00,$00,$00,$02,$02,$04,$06,$08,$0e,$10,$1e,$20,$3e,$40,$7e,$80 - db $fe,$01,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00 - db $fc,$01,$fe,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00 -FoolTilesEnd: + db $00,$00,$01,$01,$01,$01,$01,$01,$0f,$0f,$1f,$10,$1f,$10,$0f,$0c + db $a0,$a0,$f8,$58,$fc,$04,$5e,$a2,$ff,$01,$ff,$00,$ff,$00,$ff,$00 + db $00,$00,$00,$00,$00,$00,$02,$02,$07,$05,$ff,$fd,$ff,$01,$ff,$01 + db $03,$03,$01,$01,$01,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 + db $ff,$00,$ff,$00,$ff,$00,$ff,$80,$ff,$93,$7e,$52,$3c,$34,$08,$08 + db $ff,$01,$ff,$01,$ff,$01,$ff,$01,$ff,$c9,$3f,$29,$1e,$1a,$04,$04 + db $00,$00,$00,$00,$00,$00,$04,$04,$0e,$0a,$ff,$fd,$ff,$01,$ff,$01 + db $ff,$00,$ff,$00,$ff,$00,$ff,$80,$ff,$93,$fc,$94,$78,$58,$20,$20 + db $ff,$01,$ff,$01,$ff,$01,$ff,$01,$ff,$c9,$7e,$4a,$3c,$2c,$10,$10 + db $00,$00,$03,$03,$0c,$0c,$10,$10,$20,$20,$20,$20,$40,$40,$40,$40 + db $00,$00,$c0,$c0,$30,$30,$08,$08,$04,$04,$04,$04,$02,$02,$02,$02 + db $40,$40,$40,$40,$20,$20,$20,$20,$10,$10,$0c,$0c,$03,$03,$00,$00 + db $02,$02,$02,$02,$04,$04,$04,$04,$08,$08,$30,$30,$c0,$c0,$00,$00 +.SpriteTilesEnd: -FoolMap: - db $61, $6f, $1b, $1c, $1d, $70, $71, $6f - db $62, $6f, $1e, $1f, $20, $72, $6f, $6f - db $63, $64, $6e, $21, $22, $23, $6f, $73 - db $1a, $65, $24, $25, $26, $27, $6f, $74 - db $1a, $66, $28, $29, $2a, $2b, $2c, $75 - db $5d, $67, $2d, $2e, $2f, $30, $31, $1a - db $5e, $5f, $68, $32, $33, $34, $35, $1a - db $6f, $60, $36, $37, $38, $39, $3a, $79 - db $5b, $6d, $3b, $3c, $3d, $3e, $78, $76 - db $3f, $40, $41, $42, $43, $44, $5c, $77 - db $45, $46, $47, $1a, $48, $49, $5a, $6c - db $69, $4a, $6f, $6f, $7b, $4b, $4c, $6f - db $6f, $4d, $4e, $4f, $6a, $50, $51, $6b - db $6f, $52, $1a, $53, $54, $55, $56, $57 - db $6f, $7a, $58, $1a, $1a, $1a, $1a, $1a - db $6f, $6f, $59, $1a, $1a, $1a, $1a, $1a -FoolMapEnd: \ No newline at end of file +.KeyArtTiles: + db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 + db $1f,$00,$0f,$00,$0f,$00,$0f,$00,$07,$00,$07,$00,$07,$00,$07,$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 $ff,$00,$ff,$00,$ff,$00,$ff,$fc,$e1,$1e,$ff,$3e,$e1,$1e,$90,$ff + db $f8,$00,$f8,$00,$f8,$00,$f8,$00,$f8,$00,$f8,$00,$70,$80,$30,$c0 + 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 $c0,$7f,$80,$7f,$00,$ff,$80,$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 $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 $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 $00,$00,$00,$00,$00,$00,$00,$00,$80,$80,$40,$c0,$e0,$e0,$e1,$e0 + 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 $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 $d1,$f0,$8f,$f8,$87,$fc,$87,$fe,$87,$fe,$87,$fe,$87,$fe,$87,$fe + db $1f,$02,$1e,$02,$1f,$02,$1e,$02,$1f,$02,$1e,$02,$0f,$02,$0e,$03 + 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 $87,$fe,$87,$fe,$87,$fe,$87,$fe,$87,$fe,$0f,$fc,$0f,$fc,$1f,$f8 + db $fc,$00,$fe,$00,$fe,$00,$ff,$00,$ff,$00,$7f,$00,$3f,$03,$1f,$07 + db $0f,$01,$0f,$01,$0f,$03,$0f,$0f,$3f,$3f,$ff,$ff,$ff,$ff,$ff,$ff + db $4f,$11,$8f,$31,$e7,$f9,$e3,$ed,$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 $3f,$f0,$7f,$e0,$ff,$c0,$ff,$80,$7f,$80,$7f,$80,$7f,$80,$ff,$00 + db $1f,$0f,$7f,$7f,$7f,$7f,$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,$fc,$fc + db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$bf,$ff,$1f,$3f,$1f,$3f + db $54,$05,$be,$1d,$7d,$3c,$ff,$7e,$ff,$fe,$ff,$fe,$ff,$fe,$ff,$fe + db $e0,$00,$f8,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$1c,$e3,$3b + db $00,$00,$00,$01,$c0,$01,$e1,$02,$e1,$06,$e3,$04,$c7,$08,$8f,$10 + db $ff,$ff,$7f,$ff,$ff,$7f,$ff,$3f,$fe,$1e,$e8,$18,$c0,$20,$88,$40 + db $f8,$f8,$c0,$c0,$80,$80,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 + db $1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f + db $fc,$fc,$fc,$fc,$fc,$fc,$fe,$fe,$fe,$fe,$fc,$fc,$fc,$fc,$fc,$fc + db $e0,$38,$f0,$18,$f8,$0c,$f8,$0e,$fc,$07,$fe,$03,$ff,$01,$ff,$01 + db $ff,$f0,$3f,$20,$3c,$23,$1c,$12,$1e,$1e,$0f,$0e,$07,$84,$0f,$c8 + db $18,$80,$38,$80,$3c,$00,$7c,$00,$fc,$00,$fc,$00,$fc,$00,$ff,$00 + db $1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$ff,$1f + db $fc,$fc,$fc,$fc,$fe,$fe,$fe,$fe,$ff,$ff,$ff,$ff,$f0,$fc,$bc,$c2 + db $9f,$f0,$fb,$64,$f5,$0a,$ee,$11,$55,$aa,$aa,$55,$55,$aa,$aa,$55 + db $7c,$82,$7e,$81,$3f,$40,$1f,$20,$0f,$90,$87,$48,$43,$a4,$a1,$52 + db $55,$2a,$3b,$04,$15,$8a,$8e,$11,$85,$4a,$c2,$05,$e1,$02,$e2,$11 + 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,$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 $f1,$08,$60,$9c,$d3,$ef,$7f,$ff,$01,$01,$01,$01,$01,$01,$01,$ff + db $16,$ef,$ae,$57,$46,$bf,$af,$57,$03,$ff,$ab,$57,$01,$ff,$ab,$55 + 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 $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 $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 $c0,$00,$c0,$00,$e0,$00,$e0,$00,$f0,$00,$f0,$00,$f0,$00,$f8,$00 + db $f8,$00,$fc,$00,$fc,$00,$fe,$00,$fe,$00,$fe,$00,$ff,$00,$ff,$00 +.KeyArtTilesEnd: + +.BackgroundCopy: ; tiles start at 26 + db $75, $1a, $1b, $61, $61, $64, $1a, $1a + db $76, $1a, $1c, $61, $61, $65, $1a, $1a + db $77, $1a, $63, $1d, $1e, $1f, $1a, $66 + db $61, $5a, $20, $21, $22, $23, $1a, $67 + db $61, $5b, $24, $25, $26, $27, $28, $68 + db $58, $5c, $29, $2a, $2b, $2c, $2d, $61 + db $59, $58, $5d, $2e, $2f, $30, $31, $61 + db $1a, $59, $32, $33, $34, $35, $36, $6c + db $1a, $62, $37, $38, $39, $3a, $6b, $69 + db $3b, $3c, $3d, $3e, $3f, $40, $57, $6a + db $41, $42, $43, $1a, $44, $45, $56, $61 + db $5e, $46, $71, $71, $6e, $47, $48, $71 + db $72, $49, $4a, $4b, $5f, $4c, $4d, $60 + db $73, $4e, $6f, $4f, $50, $51, $52, $53 + db $74, $6d, $54, $70, $70, $70, $70, $70 + db $70, $70, $55, $70, $70, $70, $70, $70 +.BackgroundCopyEnd: diff --git a/00thefool.aseprite b/00thefool.aseprite index e98e819..c313d4a 100644 Binary files a/00thefool.aseprite and b/00thefool.aseprite differ diff --git a/00thefool.asm b/00thefool.asm index ae727cd..69b87ad 100644 --- a/00thefool.asm +++ b/00thefool.asm @@ -1,123 +1,40 @@ ; original export script by gabriel reis, modified by shoofle -KeyArtTiles: - +.SpriteTiles: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 - db $e0,$00,$e0,$10,$e0,$10,$e0,$10,$f0,$08,$f0,$08,$f0,$08,$f0,$09 - db $00,$00,$00,$00,$00,$0f,$00,$30,$00,$40,$00,$80,$00,$80,$00,$00 - db $00,$00,$00,$00,$00,$80,$00,$60,$00,$10,$00,$08,$00,$08,$00,$04 - db $f0,$09,$f8,$05,$f8,$05,$f8,$04,$f8,$04,$f8,$04,$fc,$02,$fc,$02 - db $00,$00,$00,$00,$00,$00,$00,$80,$00,$80,$00,$40,$00,$30,$00,$0f - db $00,$04,$00,$04,$00,$04,$00,$08,$00,$08,$00,$10,$00,$60,$00,$80 - db $00,$00,$00,$00,$00,$00,$00,$00,$07,$1f,$0f,$30,$1f,$62,$7f,$81 - db $00,$00,$00,$00,$00,$00,$fc,$fc,$e0,$1e,$fe,$3e,$e0,$1c,$f0,$90 - db $01,$02,$03,$04,$03,$04,$03,$04,$03,$04,$03,$04,$03,$04,$07,$88 - db $fc,$00,$fc,$01,$fc,$01,$f9,$02,$f3,$04,$e7,$08,$cf,$10,$cf,$10 - db $78,$86,$f0,$08,$f0,$08,$e0,$10,$e0,$10,$c0,$21,$c0,$21,$81,$42 - db $78,$7f,$10,$15,$08,$29,$7c,$75,$7e,$c7,$7f,$a1,$ff,$00,$fe,$81 - db $07,$08,$07,$88,$07,$c8,$0f,$e0,$07,$20,$07,$90,$07,$b0,$07,$90 - db $9f,$20,$9f,$20,$cf,$11,$e7,$0a,$f4,$06,$f5,$04,$f6,$04,$f5,$04 - db $f9,$7a,$de,$8f,$a9,$03,$55,$01,$a8,$02,$55,$00,$aa,$00,$55,$00 - db $fd,$42,$fd,$02,$3f,$c0,$0e,$31,$81,$9e,$8f,$f0,$8e,$71,$5e,$9e - db $07,$90,$07,$d0,$07,$90,$00,$90,$0f,$9f,$80,$55,$00,$d5,$90,$35 - db $ff,$00,$ff,$00,$ff,$00,$3f,$00,$be,$81,$5e,$41,$ec,$e2,$ec,$e2 - db $f6,$04,$75,$84,$77,$85,$36,$46,$35,$44,$13,$20,$1f,$20,$1f,$20 - db $aa,$00,$55,$01,$ff,$ff,$01,$01,$f9,$05,$fe,$02,$ff,$02,$fe,$02 - db $33,$ae,$ff,$47,$79,$47,$fb,$46,$7e,$44,$e5,$5c,$3e,$44,$b9,$46 - db $5b,$0f,$ac,$04,$56,$02,$ab,$81,$d5,$81,$ab,$81,$d5,$81,$ab,$81 - db $14,$10,$08,$08,$04,$04,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02 - db $ff,$02,$fe,$02,$ff,$02,$fe,$02,$ff,$02,$fe,$02,$ff,$02,$fe,$03 - 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,$aa,$82,$d6,$82,$aa,$02 - db $02,$02,$02,$02,$02,$02,$02,$02,$02,$06,$04,$04,$04,$0c,$08,$18 - db $01,$02,$00,$01,$00,$01,$00,$00,$00,$00,$00,$80,$80,$40,$c0,$23 - db $ff,$01,$ff,$01,$fc,$01,$70,$83,$40,$8c,$00,$30,$00,$c1,$00,$0f - db $4f,$11,$8f,$31,$e7,$f9,$03,$8d,$03,$3d,$01,$7f,$01,$ff,$01,$ff - db $56,$02,$aa,$02,$56,$02,$ad,$07,$54,$04,$ad,$04,$55,$04,$ac,$05 - db $00,$30,$20,$60,$40,$c0,$80,$80,$00,$80,$00,$80,$00,$80,$00,$00 - db $c0,$26,$e0,$08,$c0,$10,$80,$23,$80,$47,$00,$8f,$00,$1f,$00,$bf - db $00,$3f,$00,$7f,$00,$ff,$00,$ff,$00,$fe,$00,$fe,$00,$fc,$00,$f0 - db $01,$ff,$01,$ff,$01,$ff,$01,$bf,$00,$bf,$00,$ff,$00,$3f,$00,$3f - db $54,$05,$b8,$1d,$60,$2c,$c0,$66,$80,$e6,$00,$e6,$00,$e6,$00,$e4 - db $01,$1e,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$1c,$1c,$23,$3b - db $fe,$00,$1e,$e1,$02,$1d,$01,$02,$03,$04,$03,$04,$07,$08,$0f,$10 - db $00,$ff,$80,$7f,$80,$7f,$c0,$3e,$e0,$10,$e0,$18,$c0,$28,$80,$48 - db $00,$e0,$00,$c0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 - db $00,$1f,$00,$1f,$00,$1f,$00,$0f,$00,$0f,$00,$0f,$00,$0f,$00,$0f - db $00,$e4,$00,$e4,$00,$c4,$00,$e4,$00,$e4,$00,$e8,$00,$e8,$00,$e4 - db $20,$38,$10,$18,$08,$0c,$08,$0e,$04,$07,$02,$03,$01,$01,$01,$01 - db $ff,$f0,$3f,$20,$2e,$31,$1c,$12,$1e,$1e,$0e,$0e,$04,$84,$08,$c8 - db $80,$48,$00,$88,$00,$08,$00,$08,$00,$08,$00,$08,$00,$00,$7f,$00 - db $00,$0f,$00,$0f,$00,$0f,$00,$0f,$00,$0f,$00,$07,$00,$03,$f8,$03 - db $00,$e4,$00,$e4,$00,$f4,$00,$f6,$00,$f6,$00,$f6,$00,$fc,$1c,$e2 - db $91,$f0,$67,$60,$1f,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00 - db $3c,$c2,$7e,$81,$3f,$40,$9f,$20,$cf,$10,$e7,$08,$f3,$04,$f9,$02 - db $ff,$00,$7f,$00,$3f,$80,$3f,$80,$9f,$40,$8f,$40,$c7,$20,$e7,$10 - db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$f8,$07,$f8,$07,$f0,$0c - db $ff,$00,$ff,$00,$ff,$00,$f3,$0c,$00,$ff,$00,$00,$00,$fe,$00,$07 - db $ff,$00,$ff,$00,$ff,$00,$00,$ff,$00,$c0,$00,$00,$00,$00,$00,$80 - db $fc,$01,$fe,$00,$01,$ff,$06,$07,$38,$38,$40,$40,$40,$60,$40,$7f - db $e3,$18,$71,$8c,$fa,$c7,$7e,$fe,$02,$02,$02,$02,$02,$02,$02,$fe - db $f8,$04,$f8,$04,$f8,$04,$f8,$06,$fc,$02,$fc,$03,$fe,$01,$fe,$01 - db $00,$f0,$00,$1e,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 - db $00,$00,$00,$00,$00,$fc,$00,$03,$00,$00,$00,$00,$00,$00,$00,$00 - db $3f,$3f,$00,$00,$00,$00,$00,$ce,$00,$33,$00,$00,$00,$00,$00,$00 - db $fe,$fe,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$00,$00 - db $00,$00,$00,$00,$00,$00,$00,$00,$00,$bf,$00,$ef,$00,$00,$00,$00 - db $00,$80,$00,$80,$00,$80,$80,$40,$80,$40,$80,$40,$80,$40,$80,$40 - db $80,$40,$80,$60,$c0,$20,$c0,$20,$c0,$20,$c0,$20,$c0,$20,$c0,$20 - db $00,$10,$00,$10,$00,$10,$00,$10,$00,$10,$00,$10,$00,$00,$ff,$00 - db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$9f,$60 - db $3f,$80,$1f,$c0,$1f,$40,$0c,$63,$08,$24,$00,$30,$00,$10,$00,$10 - db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$40,$c0,$20,$e0,$10 - db $f0,$08,$f8,$04,$fc,$02,$fe,$01,$ff,$00,$ff,$00,$ff,$00,$ff,$00 - db $00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$80,$40,$c0,$20,$c0,$20 - db $e0,$10,$f0,$08,$f8,$04,$fc,$02,$fe,$01,$ff,$00,$ff,$00,$ff,$00 - db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$3f,$40,$3f,$40 - db $1f,$20,$1f,$20,$0f,$10,$0f,$10,$07,$08,$07,$08,$07,$08,$03,$04 - db $03,$04,$01,$02,$01,$02,$00,$01,$00,$01,$00,$01,$00,$00,$00,$00 - db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$7f,$80,$7f,$80 - db $3f,$40,$3f,$40,$1f,$20,$1f,$20,$1f,$20,$0f,$10,$0f,$10,$07,$08 - db $07,$08,$03,$04,$03,$04,$03,$04,$01,$02,$01,$02,$00,$01,$00,$01 - db $00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 - db $0f,$10,$0f,$10,$07,$08,$07,$08,$03,$04,$03,$04,$03,$04,$01,$02 - db $00,$00,$00,$00,$00,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00 - db $ff,$00,$ff,$00,$8c,$73,$00,$fe,$00,$00,$00,$00,$00,$00,$00,$00 - db $ff,$00,$ff,$00,$00,$ff,$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,$80,$00 - db $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$fe,$01,$fe,$01 - db $fc,$02,$fc,$02,$fc,$02,$fe,$01,$fe,$01,$fe,$01,$fe,$00,$fe,$00 - 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,$00,$01,$00,$01,$00,$01 - db $ff,$00,$7f,$80,$7f,$80,$7f,$80,$7f,$80,$ff,$00,$ff,$00,$ff,$00 - db $00,$01,$00,$01,$00,$01,$01,$02,$01,$02,$01,$02,$01,$02,$01,$02 - db $ff,$00,$ff,$00,$fc,$02,$fc,$02,$f8,$04,$f8,$04,$f0,$08,$f0,$08 - db $f0,$08,$e0,$10,$e0,$10,$e0,$10,$c0,$20,$c0,$20,$80,$40,$80,$40 - db $80,$40,$00,$80,$00,$80,$00,$80,$00,$00,$00,$00,$00,$00,$00,$00 - db $fe,$00,$fe,$00,$fe,$00,$fe,$00,$fe,$00,$fe,$00,$fe,$00,$fc,$02 - db $f0,$0c,$c0,$30,$00,$c0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 - db $00,$01,$01,$02,$03,$04,$07,$08,$0f,$10,$1f,$20,$3f,$40,$3f,$00 - db $00,$00,$00,$02,$02,$04,$06,$08,$0e,$10,$1e,$20,$3e,$40,$7e,$80 - db $fe,$01,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00 - db $fc,$01,$fe,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00 + db $00,$00,$01,$01,$01,$01,$01,$01,$0f,$0f,$1f,$10,$1f,$10,$0f,$0c + db $a0,$a0,$f8,$58,$fc,$04,$5e,$a2,$ff,$01,$ff,$00,$ff,$00,$ff,$00 + db $00,$00,$00,$00,$00,$00,$02,$02,$07,$05,$ff,$fd,$ff,$01,$ff,$01 + db $03,$03,$01,$01,$01,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 + db $ff,$00,$ff,$00,$ff,$00,$ff,$80,$ff,$93,$7e,$52,$3c,$34,$08,$08 + db $ff,$01,$ff,$01,$ff,$01,$ff,$01,$ff,$c9,$3f,$29,$1e,$1a,$04,$04 + db $00,$00,$00,$00,$00,$00,$04,$04,$0e,$0a,$ff,$fd,$ff,$01,$ff,$01 + db $ff,$00,$ff,$00,$ff,$00,$ff,$80,$ff,$93,$fc,$94,$78,$58,$20,$20 + db $ff,$01,$ff,$01,$ff,$01,$ff,$01,$ff,$c9,$7e,$4a,$3c,$2c,$10,$10 + db $00,$00,$03,$03,$0c,$0c,$10,$10,$20,$20,$20,$20,$40,$40,$40,$40 + db $00,$00,$c0,$c0,$30,$30,$08,$08,$04,$04,$04,$04,$02,$02,$02,$02 + db $40,$40,$40,$40,$20,$20,$20,$20,$10,$10,$0c,$0c,$03,$03,$00,$00 + db $02,$02,$02,$02,$04,$04,$04,$04,$08,$08,$30,$30,$c0,$c0,$00,$00 +.SpriteTilesEnd: - - -BackgroundCopy: ; tiles start at 26 - db $61, $6f, $1b, $1c, $1d, $70, $71, $6f - db $62, $6f, $1e, $1f, $20, $72, $6f, $6f - db $63, $64, $6e, $21, $22, $23, $6f, $73 - db $1a, $65, $24, $25, $26, $27, $6f, $74 - db $1a, $66, $28, $29, $2a, $2b, $2c, $75 - db $5d, $67, $2d, $2e, $2f, $30, $31, $1a - db $5e, $5f, $68, $32, $33, $34, $35, $1a - db $6f, $60, $36, $37, $38, $39, $3a, $79 - db $5b, $6d, $3b, $3c, $3d, $3e, $78, $76 - db $3f, $40, $41, $42, $43, $44, $5c, $77 - db $45, $46, $47, $1a, $48, $49, $5a, $6c - db $69, $4a, $6f, $6f, $7b, $4b, $4c, $6f - db $6f, $4d, $4e, $4f, $6a, $50, $51, $6b - db $6f, $52, $1a, $53, $54, $55, $56, $57 - db $6f, $7a, $58, $1a, $1a, $1a, $1a, $1a - db $6f, $6f, $59, $1a, $1a, $1a, $1a, $1a +.Sprites: ; tiles start at 0 + db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $0a, $0b, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $0c, $0d, $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, $00, $00, $00, $00 + db $00, $00, $00, $00, $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, $00, $00, $00, $00 + db $00, $00, $00, $00, $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, $00, $00, $00, $00 + db $00, $00, $00, $00, $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, $00, $00, $00, $00 + db $00, $00, $00, $00, $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, $00, $00, $00, $00 + db $00, $00, $00, $00, $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, $00, $00, $00, $00 + db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $01, $02, $03, $01, $02, $07, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $04, $08, $06, $04, $05, $09, $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, $00, $00, $00, $00 +.SpritesEnd: diff --git a/20judgement.aseprite b/20judgement.aseprite index 024c517..ada5ad5 100644 Binary files a/20judgement.aseprite and b/20judgement.aseprite differ diff --git a/CardHelpers.inc b/CardHelpers.inc new file mode 100644 index 0000000..91aea69 --- /dev/null +++ b/CardHelpers.inc @@ -0,0 +1,161 @@ +LoadCardDataAsync: ; to be called as async + ei + ld a, 1 + ldh [vBlocked], a + ldh a, [vSelectedCardIndex] + ldh [vPreviousCardIndex], a + + ld b, 0 + ld c, a ; load bc from a, the number of the card in the cards list + ld hl, Cards + 1 ; skip the length prefix + add hl, bc + add hl, bc + add hl, bc ; triple add bc entries are bank, addr, addr + + ld a, [hl+] + ld [rROMB0], a ; select the specified bank + ; follow the pointer we're looking at + ld a, [hl+] + ld c, a + ld a, [hl+] + ld b, a + + ld h, b + ld l, c ; hl now contains the address of the card data. + + ld a, LOW(.duringDraw) + ld [vAsyncNext], a + ld a, HIGH(.duringDraw) + ld [vAsyncNext+1], a + ld a, 0 + ld [vAsyncAfter], a + ld [vAsyncAfter+1], a + di + nop + nop + ret +.duringDraw + di ; these function calls should be fast so we'll disable interrupts and do them + nop + ; synchronously + + ; hl points to a card struct. + ; card struct starts with a sequence of length-prefixed strings in memory + ; 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 + ; so all we have to set is the destination for each + ld de, $9800 + 32*11 + 10 + call PrintString + ld de, $9800 + 32*12 + 10 + call PrintString + ld de, $9800 + 32*14 + 10 + call PrintString + ld de, $9800 + 32*15 + 10 + call PrintString + ld de, $9800 + 32*16 + 10 + call PrintString + + ei + + ; hl now contains the address after all the strings. + ; [hl+] and [hl+] read the length first, into bc + ld a, [hl+] + ld c, a + ld a, [hl+] + ld b, a ; bc has length + ld a, [hl+] + ld e, a + ld a, [hl+] + ld d, a ; de has source of tile range copy + + ld h, d + ld l, e ; source + ld de, $9800 + 32 + 1 ; destination + ld b, 16 ; height + ld c, 8 ; width + + ld a, LOW(CopyTilesToMapThreadsafe) + ld [vAsyncNext], a + ld a, HIGH(CopyTilesToMapThreadsafe) + ld [vAsyncNext+1], a + ld a, LOW(.afterCopyTiles) + ld [vAsyncAfter], a + ld a, HIGH(.afterCopyTiles) + ld [vAsyncAfter+1], a + di + nop + nop + ret +.afterCopyTiles + ei + ldh a, [vSelectedCardIndex] + ldh [vPreviousCardIndex], a + + ld b, 0 + ld c, a ; load bc from a, the number of the card in the cards list + ld hl, Cards + 1 ; skip the length prefix + add hl, bc + add hl, bc + add hl, bc ; triple add bc entries are bank, addr, addr + + ld a, [hl+] + ld [rROMB0], a ; select the specified bank + ; follow the pointer we're looking at + ld a, [hl+] + ld c, a + ld a, [hl+] + ld b, a + + ld h, b + ld l, c ; hl now contains the address of the card data. + di + call PassList + call PassList + call PassList + call PassList + call PassList ; skip the strings + ei + inc hl + inc hl ; skip tile map width + inc hl + inc hl ; skip tile map pointer + ld a, [hl+] + ld c, a + ld a, [hl+] + ld b, a ; bc has length of tile data + ld a, [hl+] + ld e, a + ld a, [hl+] + ld d, a ; de has source of tile range copy + + ld h, d + 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 a, LOW(CopyRangeUnsafe) + ld [vAsyncNext], a + ld a, HIGH(CopyRangeUnsafe) + ld [vAsyncNext+1], a + ld a, LOW(.afterLoadingTiles) + ld [vAsyncAfter], a + ld a, HIGH(.afterLoadingTiles) + ld [vAsyncAfter+1], a + di + nop + nop + ret +.afterLoadingTiles + ei + ld a, 0 + ldh [vBlocked], a + + ld a, 0 + ld [vAsyncNext], a + ld [vAsyncNext+1], a + ld [vAsyncAfter], a + ld [vAsyncAfter+1], a + di + nop + nop + + ret diff --git a/ScreenCardBrowse.inc b/ScreenCardBrowse.inc index bc763c0..4f044fb 100644 --- a/ScreenCardBrowse.inc +++ b/ScreenCardBrowse.inc @@ -151,7 +151,7 @@ DrawDeckMinimap: .loop inc b ld a, b - cp a, 2 + cp a, 5 jp nz, .noNewLine ld [hl], $13 ld hl, $9800 + 32*2 + 11 @@ -185,167 +185,6 @@ DrawDeckMinimap: CardBrowseTeardown: ret -LoadCardDataAsync: ; to be called as async - ei - ld a, 1 - ldh [vBlocked], a - ldh a, [vSelectedCardIndex] - ldh [vPreviousCardIndex], a - - ld b, 0 - ld c, a ; load bc from a, the number of the card in the cards list - ld hl, Cards + 1 ; skip the length prefix - add hl, bc - add hl, bc - add hl, bc ; triple add bc entries are bank, addr, addr - - ld a, [hl+] - ld [rROMB0], a ; select the specified bank - ; follow the pointer we're looking at - ld a, [hl+] - ld c, a - ld a, [hl+] - ld b, a - - ld h, b - ld l, c ; hl now contains the address of the card data. - - ld a, LOW(.duringDraw) - ld [vAsyncNext], a - ld a, HIGH(.duringDraw) - ld [vAsyncNext+1], a - ld a, 0 - ld [vAsyncAfter], a - ld [vAsyncAfter+1], a - di - nop - nop - ret -.duringDraw - di ; these function calls should be fast so we'll disable interrupts and do them - nop - ; synchronously - - ; hl points to a card struct. - ; card struct starts with a sequence of length-prefixed strings in memory - ; 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 - ; so all we have to set is the destination for each - ld de, $9800 + 32*11 + 10 - call PrintString - ld de, $9800 + 32*12 + 10 - call PrintString - ld de, $9800 + 32*14 + 10 - call PrintString - ld de, $9800 + 32*15 + 10 - call PrintString - ld de, $9800 + 32*16 + 10 - call PrintString - - ei - - ; hl now contains the address after all the strings. - ; [hl+] and [hl+] read the length first, into bc - ld a, [hl+] - ld c, a - ld a, [hl+] - ld b, a ; bc has length - ld a, [hl+] - ld e, a - ld a, [hl+] - ld d, a ; de has source of tile range copy - - ld h, d - ld l, e ; source - ld de, $9800 + 32 + 1 ; destination - ld b, 16 ; height - ld c, 8 ; width - - ld a, LOW(CopyTilesToMapThreadsafe) - ld [vAsyncNext], a - ld a, HIGH(CopyTilesToMapThreadsafe) - ld [vAsyncNext+1], a - ld a, LOW(.afterCopyTiles) - ld [vAsyncAfter], a - ld a, HIGH(.afterCopyTiles) - ld [vAsyncAfter+1], a - di - nop - nop - ret -.afterCopyTiles - ei - ldh a, [vSelectedCardIndex] - ldh [vPreviousCardIndex], a - - ld b, 0 - ld c, a ; load bc from a, the number of the card in the cards list - ld hl, Cards + 1 ; skip the length prefix - add hl, bc - add hl, bc - add hl, bc ; triple add bc entries are bank, addr, addr - - ld a, [hl+] - ld [rROMB0], a ; select the specified bank - ; follow the pointer we're looking at - ld a, [hl+] - ld c, a - ld a, [hl+] - ld b, a - - ld h, b - ld l, c ; hl now contains the address of the card data. - di - call PassList - call PassList - call PassList - call PassList - call PassList ; skip the strings - ei - inc hl - inc hl ; skip tile map width - inc hl - inc hl ; skip tile map pointer - ld a, [hl+] - ld c, a - ld a, [hl+] - ld b, a ; bc has length of tile data - ld a, [hl+] - ld e, a - ld a, [hl+] - ld d, a ; de has source of tile range copy - - ld h, d - 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 a, LOW(CopyRangeUnsafe) - ld [vAsyncNext], a - ld a, HIGH(CopyRangeUnsafe) - ld [vAsyncNext+1], a - ld a, LOW(.afterLoadingTiles) - ld [vAsyncAfter], a - ld a, HIGH(.afterLoadingTiles) - ld [vAsyncAfter+1], a - di - nop - nop - ret -.afterLoadingTiles - ei - ld a, 0 - ldh [vBlocked], a - - ld a, 0 - ld [vAsyncNext], a - ld [vAsyncNext+1], a - ld [vAsyncAfter], a - ld [vAsyncAfter+1], a - di - nop - nop - - ret CardBrowse.UITilemap: diff --git a/ScreenMainMenu.inc b/ScreenMainMenu.inc index 8114ad7..f635f16 100644 --- a/ScreenMainMenu.inc +++ b/ScreenMainMenu.inc @@ -40,8 +40,9 @@ MainMenuSetup_ScreenOff: ld de, $8010 + $80*16 ld bc, (SquaresTilesetEnd - SquaresTileset8) call CopyRangeUnsafe + def spacing equ $12 - + ld hl, CardBackSprites24 ; source def TileStartCardBackSprites24 equ 0 ld de, $8000 + TileStartCardBackSprites24*$10; destination of copy @@ -245,7 +246,6 @@ MainMenuUpdate: ret .doneWithMenuSelect - ld hl, vTime ldh a, [rDELTAT] ld b, a ldh a, [vTime] diff --git a/ScreenSpreadSelect.inc b/ScreenSpreadSelect.inc index 69ef836..e363eae 100644 --- a/ScreenSpreadSelect.inc +++ b/ScreenSpreadSelect.inc @@ -260,6 +260,8 @@ DrawSpreadAsync: ld [vAsyncAfter], a ld a, HIGH(.afterClear) ld [vAsyncAfter+1], a + di + nop ret ; return from async execution now that we've registered desire ; to call copytilestomapthreadsafe ; and then drawspread @@ -293,6 +295,8 @@ DrawSpreadAsync: ld [vAsyncAfter], a ld a, HIGH(.afterTitle) ld [vAsyncAfter+1], a + di + nop ret .afterTitle @@ -305,6 +309,8 @@ DrawSpreadAsync: ld [vAsyncAfter], a ld a, HIGH(DrawSpreadALittleAsync) ld [vAsyncAfter+1], a + di + nop ret DrawSpreadALittleAsync: @@ -322,6 +328,8 @@ DrawSpreadALittleAsync: ld [vAsyncAfter], a ld a, HIGH(.drawSpreadPositionDescription) ld [vAsyncAfter+1], a + di + nop ret .drawSpreadPositionDescription @@ -354,6 +362,8 @@ DrawSpreadALittleAsync: ld [vAsyncAfter], a ld a, HIGH(.drawSecondDescription) ld [vAsyncAfter+1], a + di + nop ret .drawSecondDescription @@ -365,11 +375,13 @@ DrawSpreadALittleAsync: ld a, 0 ld [vAsyncAfter], a ld [vAsyncAfter+1], a + di + nop ret SpreadSelectDraw: - di - ld hl, SquaresTiles + 1 + ld hl, SquaresTiles + inc hl ld b, 0 ldh a, [vFrameCountSquares] ld c, a @@ -380,55 +392,11 @@ SpreadSelectDraw: ld b, [hl] ld h, b ld l, c - ld de, $8000 + $1000 + $10 - 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 - 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 - 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 - reti + ld de, $8000+$100*16 + 1*16 + ld bc, (SquaresTileset8 - SquaresTileset7) / 8 + call CopyRangeUnsafeBy8s + + ret SpreadSelectTeardown: ret @@ -491,7 +459,7 @@ DrawSpreadBigAndThreadsafe: call DrawBigCardSelected .doneDrawingSpread - ei + di nop nop ret diff --git a/main.asm b/main.asm index dc5538e..94c174d 100644 --- a/main.asm +++ b/main.asm @@ -17,6 +17,7 @@ DEF SCENE_TEARDOWN EQU SCENE_DRAW + 4 DEF INTERRUPT_LCD EQU $c111 def SHUFFLED_DECK equ $c200 ; location for the shuffled deck +def CARD_VARIABLES equ $c300 def ZEROES equ $D000 def ONES equ $D200 @@ -26,7 +27,7 @@ DEF SYSTEM_VARS_START equ ASYNC_VARS_START + $10 ; allocating $8 spaces for system variables, currently only using $3 bytes DEF rMYBTN EQU SYSTEM_VARS_START DEF rMYBTNP EQU rMYBTN + 1 -DEF rDELTAT EQU rMYBTNP + 1 +DEF rDELTAT EQU rMYBTNP + 1 ; delta_t where $1000 = 1 second def rLFSR equ rDELTAT + 1 ; 16 bit DEF GLOBAL_VARS_START EQU SYSTEM_VARS_START + $8 ; global app-wide variables go after GLOBAL_VARS_START. allocated $10 for them @@ -35,7 +36,11 @@ def VARIABLES_START equ GLOBAL_VARS_START + $10 ; WRAM Layout looks like this: ; $c000 - $c100 OAM DMA source -; $c101 - $c113 self-modifying code interrupts +; $c100 - $c114 self-modifying code interrupts +; $c200 - $c21a shuffled deck +; $c300 - $c400 card display variables +; $c300-$c30f timers +; $c300 - $c400 card display variables ; $d000 - $d400 zeroes and ones, just because they're handy! def VARIABLE_TILES_START equ 26 @@ -480,6 +485,7 @@ INCLUDE "CopyRangeSafe.inc" INCLUDE "CopyTilesSafe.inc" INCLUDE "ScreenMainMenu.inc" INCLUDE "ScreenSpreadSelect.inc" +INCLUDE "CardHelpers.inc" INCLUDE "ScreenCardRead.inc" INCLUDE "ScreenCardBrowse.inc" INCLUDE "ScreenShuffle.inc" diff --git a/source.zip b/source.zip index 46504a3..adec502 100644 Binary files a/source.zip and b/source.zip differ