Posted Thu Nov 11, 2010 2:42 PM
Posted Thu Nov 11, 2010 2:59 PM
Posted Fri Nov 12, 2010 4:26 AM
lucifershalo, on Fri Nov 12, 2010 4:19 AM, said:
Posted Fri Nov 12, 2010 4:55 AM
Posted Fri Nov 12, 2010 9:36 AM
Posted Fri Nov 12, 2010 10:27 AM
Posted Fri Nov 12, 2010 6:55 PM
Posted Sun Nov 14, 2010 10:51 AM
batari, on Sun Nov 14, 2010 2:03 AM, said:
; This routine waits for the vertical blanking period to start
WaitVBLANK:
WaitVBoff:
bit MSTAT ;Vblank?
bmi WaitVBoff ;wait while it is on...
WaitVBon:
bit MSTAT ;Vblank?
bpl WaitVBon ;wait until it comes back...
rts
...
; Do this during your init routine to test for PAL/NTSC
jsr WaitVBLANK ;
WaitVBover: bit MSTAT ;
bmi WaitVBover ;wait for the VBLANK to end
lda #$09 ;prepare NTSC setup here
ldx #$00
CountLines: bit MSTAT ;if not back in VBLANK
bmi CompareCounter ;
sta WSYNC ; then wait 2 scanlines,
sta WSYNC ;
dex ; decrease the counter
bne CountLines ; and keep counting
CompareCounter: cpx #$78 ;if less than 274 lines have passed
bcs noPALsetup ; we are on NTSC
lda #$00 ;
noPALsetup
Posted Sun Nov 14, 2010 4:14 PM
Posted Sun Nov 14, 2010 4:34 PM
Posted Sun Nov 14, 2010 8:18 PM
0 members, 0 guests, 0 anonymous users