safer NMI handling

This commit is contained in:
FeralChild64 committed 2020-06-04 22:19:10 +02:00
1 parent 1c118d9bc9
commit f8e57f1cf2
10 files changed
+114 -19

No files matched your search

+11 -6
View File
@@ -12,9 +12,7 @@
// XXX for Mega65 it can be done more easily, by just disabling the badlines
// XXX consider "PRESS PLAY ON TAPE" before start, with option to stop
// XXX document CONFIG_TAPE_HEAD_ALIGN option
// XXX block NMIs
// XXX fix Mega65 build compilation issues
@@ -50,12 +48,22 @@ tape_head_align:
#else
// Make sure user really wants to launch the tool
jsr tape_ask_play
// Disable interrupts, set proper I/O values
jsr CLALL
sei
jsr IOINIT
jsr cint_legacy
jsr CINT
jsr nmi_lock
// Prepare CIA timers
ldx #$02 // set timer A to 3 ticks
jsr tape_common_prepare_cia_by_x
@@ -111,8 +119,6 @@ tape_head_align:
dey
bne !-
// Set graphics mode
lda #$28 // graphics start at $2000, color at $0800
@@ -252,7 +258,6 @@ tape_head_align_drawn:
beq tape_head_align_loop_1
tape_head_align_quit:
// It makes no sense to return to system, as we already destroyed