From 525681931fd6986052bbe0072cee9d02156ab530 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Sun, 20 Jan 2019 11:41:49 -0800 Subject: [PATCH] Use common bell routine (from main/overlays) --- desktop/desktop_aux.s | 4 ---- desktop/desktop_main.s | 24 ++++++++++++------------ desktop/ovl2.s | 14 +++----------- 3 files changed, 15 insertions(+), 27 deletions(-) diff --git a/desktop/desktop_aux.s b/desktop/desktop_aux.s index 9725530..8fd8d6c 100644 --- a/desktop/desktop_aux.s +++ b/desktop/desktop_aux.s @@ -1582,8 +1582,6 @@ start: lda has_highlight return #0 .endproc - rts ; unused - ;;; ============================================================ ;;; ICON_IN_RECT IMPL @@ -3297,8 +3295,6 @@ cancel_rect: cancel_pos: DEFINE_POINT 305,47 - .word $BE,$10 ; ??? - pos_prompt: DEFINE_POINT 75,29, pos_prompt alert_action: .byte $00 diff --git a/desktop/desktop_main.s b/desktop/desktop_main.s index d12b17e..a22547b 100644 --- a/desktop/desktop_main.s +++ b/desktop/desktop_main.s @@ -12939,18 +12939,6 @@ do4: jsr bell rts .endproc -;;; ============================================================ - -.proc bell - sta ALTZPOFF - sta ROMIN2 - jsr BELL1 - sta ALTZPON - lda LCBANK1 - lda LCBANK1 - rts -.endproc - ;;; ============================================================ ;;; "DownLoad" dialog @@ -13772,6 +13760,18 @@ cursor_ip_flag: ; high bit set if IP, clear if pointer ;;; ;;; ============================================================ + .assert * >= $A000, error, "Routine used by overlays in overlay zone" + +.proc bell + sta ALTZPOFF + sta ROMIN2 + jsr BELL1 + sta ALTZPON + lda LCBANK1 + lda LCBANK1 + rts +.endproc + .proc set_cursor_watch MGTK_RELAY_CALL MGTK::HideCursor MGTK_RELAY_CALL MGTK::SetCursor, watch_cursor diff --git a/desktop/ovl2.s b/desktop/ovl2.s index 053cdc0..831fa5e 100644 --- a/desktop/ovl2.s +++ b/desktop/ovl2.s @@ -118,7 +118,7 @@ L0980: cmp #$2B bne L09C2 jmp L090C -L098C: jsr L191B +L098C: jsr desktop_main::bell axy_call desktop_main::draw_dialog_label, 6, desktop_aux::str_erasing_error jmp L09B8 @@ -131,7 +131,7 @@ L099B: pha bne L09C2 jmp L090C -L09AC: jsr L191B +L09AC: jsr desktop_main::bell axy_call desktop_main::draw_dialog_label, 6, desktop_aux::str_formatting_error L09B8: jsr desktop_main::prompt_input_loop bmi L09B8 @@ -237,7 +237,7 @@ L0B12: cmp #$2B bne L0B31 jmp L0AD1 -L0B1E: jsr L191B +L0B1E: jsr desktop_main::bell axy_call desktop_main::draw_dialog_label, 6, desktop_aux::str_erasing_error L0B2A: jsr desktop_main::prompt_input_loop bmi L0B2A @@ -1380,14 +1380,6 @@ loop: lda (ptr),y rts .endproc -L191B: sta ALTZPOFF - lda ROMIN2 - jsr BELL1 - sta ALTZPON - lda LCBANK1 - lda LCBANK1 - rts - L192E: sta read_block_params::unit_num lda #0 sta read_block_params::block_num