reenabled BRK handler, now prints BRK address

This commit is contained in:
FeralChild64 committed 2019-09-01 16:20:36 +02:00
1 parent 2d590f95c5
commit 180c88ef42
6 files changed
+40 -16

No files matched your search

+13 -6
View File
@@ -16,12 +16,10 @@ irq_handler:
pha
;; Check if caused by BRK
;; XXX disabled for now - resets Duotris game, unknown why
; tsx
; lda $0104, x ; get the pre-interrupt processor state
; and #$10
; bne irq_handler_brk
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
@@ -34,6 +32,15 @@ irq_handler:
irq_handler_brk:
;; Store BRK adddress, to be displayed
sec
lda $0105, x
sbc #$02
sta CMP0+0
lda $0106, x
sbc #$00
sta CMP0+1
;; Interrupt caused by BRK
jmp (CBINV)