finished IRQ handler, fixed cartridge startup
This commit is contained in:
1 parent
b946675341
commit
69ea9abefd
7 files changed
+32
-9
No files matched your search
@@ -13,7 +13,10 @@ default_nmi_handler:
|
||||
|
||||
;; XXX: RS-232 support is not implemented
|
||||
|
||||
;; XXX if cartridge present, enter it through warm start vector
|
||||
jsr cartridge_check
|
||||
bcc +
|
||||
jmp (ICART_WARM_START)
|
||||
*
|
||||
|
||||
;; According to C64 Wiki, if STOP key is pressed, the routine assumes warm start request
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user