finished IRQ handler, fixed cartridge startup

This commit is contained in:
FeralChild64 committed 2019-08-08 18:28:20 +02:00
1 parent b946675341
commit 69ea9abefd
7 files changed
+32 -9

No files matched your search

+13 -2
View File
@@ -15,9 +15,14 @@ irq_handler:
tya
pha
;; XXX check if caused by BRK, react accordingly
;; Check if caused by BRK
;; Call interrupt routine (only if initialised)
tsx
lda $0104, x ; get the pre-interrupt processor state
and #$10
bne irq_handler_brk
;; Not caused by BRK - call interrupt routine (only if initialised)
lda CINV
ora CINV+1
beq +
@@ -25,3 +30,9 @@ irq_handler:
*
;; Vector not initialized - call default interrupt routine
jmp default_irq_handler
irq_handler_brk:
;; Interrupt caused by BRK
jmp (CBINV)