From efa6842ea922cf770a9ba7052dac821a65b235bc Mon Sep 17 00:00:00 2001 From: mgcaret Date: Sat, 23 Feb 2019 23:32:32 -0800 Subject: [PATCH] Fix IRQ handling for MLI calls. (#133) * remove all IRQ-disabling wrappeds to MLI calls --- desktop/desktop_main.s | 3 --- desktop/loader.s | 16 ---------------- desktop/ovl1.s | 3 --- desktop/ovl1a.s | 4 ---- desktop/ovl1c.s | 3 --- desktop/ovl2.s | 5 ++--- desktop/ovl3.s | 3 --- desktop/ovl4.s | 3 --- 8 files changed, 2 insertions(+), 38 deletions(-) diff --git a/desktop/desktop_main.s b/desktop/desktop_main.s index dbca50c..737dbb9 100644 --- a/desktop/desktop_main.s +++ b/desktop/desktop_main.s @@ -856,8 +856,6 @@ L46AE: jsr disable_eject_menu_item .proc MLI_RELAY sty call stax params - php - sei sta ALTZPOFF sta ROMIN2 jsr MLI @@ -867,7 +865,6 @@ params: .addr dummy0000 tax lda LCBANK1 lda LCBANK1 - plp txa rts .endproc diff --git a/desktop/loader.s b/desktop/loader.s index cc91b0f..1b7dec6 100644 --- a/desktop/loader.s +++ b/desktop/loader.s @@ -265,21 +265,13 @@ start: bpl :- ;; Open this system file - php - sei MLI_CALL OPEN, open_params - plp - and #$FF ; ??? beq :+ brk ; crash : lda open_params::ref_num sta set_mark_params::ref_num sta read_params::ref_num - php - sei MLI_CALL SET_MARK, set_mark_params - plp - and #$FF ; ??? beq :+ brk ; crash : lda #0 @@ -290,11 +282,7 @@ loop: lda segment_num bne continue ;; Close and invoke DeskTop init routine - php - sei MLI_CALL CLOSE, close_params - plp - and #$FF ; ??? beq :+ brk ; crash : jmp DESKTOP_INIT @@ -304,11 +292,7 @@ continue: tax copy16 segment_addr_table,x, read_params::data_buffer copy16 segment_size_table,x, read_params::request_count - php - sei MLI_CALL READ, read_params - plp - and #$FF ; ??? beq :+ brk ; crash : ldx segment_num diff --git a/desktop/ovl1.s b/desktop/ovl1.s index be87012..dffb084 100644 --- a/desktop/ovl1.s +++ b/desktop/ovl1.s @@ -81,8 +81,6 @@ start: lda #$80 sty call sta params stx params+1 - php - sei sta ALTZPOFF lda ROMIN2 jsr MLI @@ -92,7 +90,6 @@ params: .addr 0 sta ALTZPON lda LCBANK1 lda LCBANK1 - plp txa self: bne self ; hang on error? rts diff --git a/desktop/ovl1a.s b/desktop/ovl1a.s index 3219154..e97628d 100644 --- a/desktop/ovl1a.s +++ b/desktop/ovl1a.s @@ -120,13 +120,9 @@ loop: lda (src),y .proc MLI_RELAY sty call stax params - php - sei jsr MLI call: .byte 0 params: .addr 0 - plp - and #$FF self: bne self ; hang if fails rts .endproc diff --git a/desktop/ovl1c.s b/desktop/ovl1c.s index 581c755..641be17 100644 --- a/desktop/ovl1c.s +++ b/desktop/ovl1c.s @@ -630,8 +630,6 @@ on_line_buffer: .proc MLI_RELAY sty call stax params - php - sei sta ALTZPOFF lda ROMIN2 jsr MLI @@ -641,7 +639,6 @@ params: .addr 0 sta ALTZPON lda LCBANK1 lda LCBANK1 - plp txa rts .endproc diff --git a/desktop/ovl2.s b/desktop/ovl2.s index cc90d5e..758ebd9 100644 --- a/desktop/ovl2.s +++ b/desktop/ovl2.s @@ -516,6 +516,8 @@ L0D8D: .byte 0 PAD_TO $E00 +; This is (probably) a Disk II formatter routine + L0E00: php sei jsr L0E3A @@ -1063,8 +1065,6 @@ L124A: .byte $00 .proc MLI_RELAY sty call stax params - php - sei sta ALTZPOFF lda ROMIN2 jsr MLI @@ -1074,7 +1074,6 @@ params: .addr 0 sta ALTZPON lda LCBANK1 lda LCBANK1 - plp txa rts .endproc diff --git a/desktop/ovl3.s b/desktop/ovl3.s index 1fc2b7d..d155a67 100644 --- a/desktop/ovl3.s +++ b/desktop/ovl3.s @@ -1424,8 +1424,6 @@ L9DC8: .byte 0 .proc MLI_RELAY sty call stax params - php - sei sta ALTZPOFF sta ROMIN2 jsr MLI @@ -1435,7 +1433,6 @@ params: .addr 0 tax lda LCBANK1 lda LCBANK1 - plp txa rts .endproc diff --git a/desktop/ovl4.s b/desktop/ovl4.s index 2e788da..12c58b4 100644 --- a/desktop/ovl4.s +++ b/desktop/ovl4.s @@ -844,8 +844,6 @@ L5993: .byte 0 .proc MLI_RELAY sty call stax params - php - sei sta ALTZPOFF lda ROMIN2 jsr MLI @@ -855,7 +853,6 @@ params: .addr 0 tax lda LCBANK1 lda LCBANK1 - plp txa rts .endproc