mirror of
https://github.com/cc65/cc65.git
synced 2025-08-13 08:25:28 +00:00
Add indication on the screen of occurring IRQs and NMIs (only for debug version).
NMI handler: set I status bit to original value before interrupt before chaining to ROM NMI handler.
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
; Christian Groessler, chris@groessler.org, 2013
|
; Christian Groessler, chris@groessler.org, 2013
|
||||||
;
|
;
|
||||||
|
|
||||||
|
DEBUG = 1
|
||||||
|
|
||||||
.if .defined(__ATARIXL__)
|
.if .defined(__ATARIXL__)
|
||||||
|
|
||||||
@@ -132,9 +133,50 @@ ret: disable_rom
|
|||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
my_IRQ_han:
|
my_IRQ_han:
|
||||||
|
.ifdef DEBUG
|
||||||
|
php
|
||||||
|
pha
|
||||||
|
tya
|
||||||
|
pha
|
||||||
|
ldy #0
|
||||||
|
lda (SAVMSC),y
|
||||||
|
clc
|
||||||
|
adc #1
|
||||||
|
sta (SAVMSC),y
|
||||||
|
pla
|
||||||
|
tay
|
||||||
|
pla
|
||||||
|
plp
|
||||||
|
.endif
|
||||||
int_wrap IRQ_save
|
int_wrap IRQ_save
|
||||||
|
|
||||||
my_NMI_han:
|
my_NMI_han:
|
||||||
|
.ifdef DEBUG
|
||||||
|
php
|
||||||
|
pha
|
||||||
|
tya
|
||||||
|
pha
|
||||||
|
ldy #39
|
||||||
|
lda (SAVMSC),y
|
||||||
|
clc
|
||||||
|
adc #1
|
||||||
|
sta (SAVMSC),y
|
||||||
|
pla
|
||||||
|
tay
|
||||||
|
pla
|
||||||
|
plp
|
||||||
|
.endif
|
||||||
|
; set I bit to interrupted value
|
||||||
|
pha
|
||||||
|
txa
|
||||||
|
pha
|
||||||
|
tsx
|
||||||
|
lda $103,x
|
||||||
|
pha
|
||||||
|
plp
|
||||||
|
pla
|
||||||
|
tax
|
||||||
|
pla
|
||||||
int_wrap NMI_save
|
int_wrap NMI_save
|
||||||
|
|
||||||
my_RESET_han:
|
my_RESET_han:
|
||||||
|
Reference in New Issue
Block a user