From a028ac4140127cfec5f546f6cfc151f25cbaaf98 Mon Sep 17 00:00:00 2001 From: Colin Leroy-Mira Date: Thu, 26 Jun 2025 13:08:04 +0200 Subject: [PATCH] Apple2: Fix permanently disabled IRQ Regression introduced in 990d65e: Pushing status, initializing IRQ handler (which enables IRQ) then pulling status re-disables IRQ. --- libsrc/apple2/crt0.s | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libsrc/apple2/crt0.s b/libsrc/apple2/crt0.s index 47ac70a7e..44450b4b9 100644 --- a/libsrc/apple2/crt0.s +++ b/libsrc/apple2/crt0.s @@ -56,9 +56,10 @@ init: ldx #zpspace-1 bpl :- ; Check for ProDOS. - ldy $BF00 ; MLI call entry point - cpy #$4C ; Is MLI present? (JMP opcode) - php ; Remember whether we're running ProDOS + lda $BF00 ; MLI call entry point + sec + sbc #$4C ; Is MLI present? (JMP opcode) + pha ; Backup the result for later bne basic ; Check the ProDOS system bit map. @@ -100,8 +101,8 @@ basic: lda HIMEM bit $C081 bit $C081 - plp ; Are we running ProDOS? - beq :+ ; Yes, no need to patch vectors + pla ; If not running ProDOS, we need to patch 6502 vectors. + beq :+ lda #reset_6502