get CIA IRQ running.

This commit is contained in:
Paul Gardner-Stephen committed 2019-04-19 23:26:49 +09:30
1 parent b551bc7827
commit c46a4aa1dd
2 files changed
+24

No files matched your search

+21
View File
@@ -14,5 +14,26 @@ ioinit:
sta $D020
lda #$06
sta $D021
;; Enable CIA1 IRQ and ~50Hz timer
;; (https://csdb.dk/forums/?roomid=11&topicid=69037)
lda #$7f
sta $DC0D ; First disable all
;; Set timer interval to ~1/50th of a second
lda #<20000
sta $dc04
lda #>20000
sta $dc05
;; Enable timer interrupt
lda #$81
sta $dc0d
;; Enable timer A to run continuously
;; (http://codebase64.org/doku.php?id=base:timerinterrupts)
lda #$11
sta $dc0e
lda $dc0d
rts
+3
View File
@@ -14,6 +14,9 @@ irq_handler:
tya
pha
;; Acknowledge CIA interrupt
lda $dc0d
;; Call interrupt routine
;; (but only if initialised)
lda $0314