set IRQ frequency depending on video system
This commit is contained in:
1 parent
c16b4cb4bc
commit
79c09d9793
7 files changed
+78
-51
No files matched your search
+1
-25
@@ -14,31 +14,7 @@ cint:
|
||||
cint_brk: ; entry for BRK and STOP+RESTORE - XXX, where should it start?
|
||||
|
||||
jsr setup_vicii
|
||||
|
||||
;; Detect video system (PAL/NTSC), use Graham's method, as it's short and reliable
|
||||
;; see here: https://codebase64.org/doku.php?id=base:detect_pal_ntsc
|
||||
|
||||
cint_w0:
|
||||
lda VIC_RASTER
|
||||
cint_w1:
|
||||
cmp VIC_RASTER
|
||||
beq cint_w1
|
||||
bmi cint_w0
|
||||
|
||||
;; Result in A, if no interrupt happened during the test:
|
||||
;; #$37 -> 312 rasterlines, PAL, VIC 6569
|
||||
;; #$06 -> 263 rasterlines, NTSC, VIC 6567R8
|
||||
;; #$05 -> 262 rasterlines, NTSC, VIC 6567R56A
|
||||
|
||||
cmp #$07
|
||||
bcs cint_pal
|
||||
cint_ntsc:
|
||||
lda #$00
|
||||
beq +
|
||||
cint_pal:
|
||||
lda #$01
|
||||
*
|
||||
sta PALNTSC
|
||||
jsr setup_pal_ntsc
|
||||
|
||||
;; Initialise cursor blink flags (Compute's Mapping the 64 p215)
|
||||
lda #$00
|
||||
|
||||
Reference in new issue
Block a user