lda #$fb // Lower border starts here ldy #seconds ldx #$50/60 //PAL/NTSC cmp $d012 bne *-3 cmp $d012 beq *-3 dex bne *-11 dey bne *-16
ldx #60*4 ;60 fps * 4 seconds lda #128 loop1 cmp $d012 ;check if the raster has reached line 128 bne loop1 ;no, so keep checking loop2 cmp $d012 ;if it has you want to make sure you dont catch it more than once per frame beq loop2 ;so wait till it isn't 0 any more dex bne loop1 ;loop round 60*4 times
*=$5c00 hirescolmap .bin 8002,1000,"gfxfun/rooms2.ip64h" .dsb 24,0 hiresbitmap .bin 2,8000,"gfxfun/rooms2.ip64h" code_start init_gfx sei lda #$06 sta $d020 lda #%00000010 sta $dd00 lda $d011 ora #%00111000 ;enable hires + screen on sta $d011 lda #%01111000 sta $d018