buildsna : bankset 0
org #100 : run #100
ld sp,#100 : ld hl,#C9FB : ld (#38),hl : ei ; init pile+INT
ld bc,#BC06 : out (c),c : ld bc,#BD00+19 : out (c),c
ld bc,#7F00 : out (c),c : ld a,#54 : out (c),a
ld bc,#7F01 : out (c),c : ld a,#4E : out (c),a
ld bc,#7F02 : out (c),c : ld a,#43 : out (c),a
ld bc,#7F03 : out (c),c : ld a,#4B : out (c),a
ld bc,0 : ld a,10
unepause djnz $ : dec c : jr nz,unepause : dec a : jr nz,unepause
novbl ld b,#F5
.vbl in a,(c) : rra : jr nc,.vbl
.novbl in a,(c) : rra : jr c,.novbl
ld b,0 : djnz $
mainLoop
halt : halt
ld bc,#BC07 : out (c),c : ld bc,#BD00+255 : out (c),c ; desactiver la VBL
ld bc,#BC06 : out (c),c : ld bc,#BD00+19 : out (c),c ; notre écran visible fait 19 blocs
ld bc,#BC04 : out (c),c : ld bc,#BD00+18 : out (c),c ; notre écran "complet" fait 19 blocs (R4=19-1)
halt : halt
; changer l'adresse de l'écran suivant AVANT qu'il arrive!
ld bc,#BC00+12 : out (c),c : ld bc,#BD20 : out (c),c ; écran suivant en #8000
; attendre 16 lignes soit 16x64 nops ou 4x256 nops, le DJNZ qui saute prend 4 nops
ld b,0 : djnz $
ld bc,#7F02 : out (c),c : ld a,#47 : out (c),a ; petit changement de couleur
ld bc,#BC07 : out (c),c : ld bc,#BD00+11 : out (c),c
ld bc,#BC06 : out (c),c : ld bc,#BD00+8 : out (c),c ; on raccourci le deuxième écran visible
ld bc,#BC04 : out (c),c : ld bc,#BD00+19 : out (c),c ; le deuxième écran "complet" fait 20 blocs pour avoir 39 au total
halt : halt
ld bc,#7F02 : out (c),c : ld a,#43 : out (c),a ; petit changement de couleur pendant la VBL :)
ld bc,#BC00+12 : out (c),c : ld bc,#BD30 : out (c),c ; écran du haut en #C000
jr mainLoop
teucha defb #54,#4E,#43,#4B
org #8000 : incbin 'iench.bin'
org #C000 : incbin 'teucha.bin' ; petite image
|