Don't monkey with ZP configuration when launching DA. Fixes #119

This commit is contained in:
Joshua Bell 2019-01-28 20:32:23 -08:00
parent 8ead691cf8
commit 30532c316d
3 changed files with 19 additions and 11 deletions

View File

@ -14,15 +14,23 @@
;;; ============================================================
yax_call JUMP_TABLE_MGTK_RELAY, MGTK::HideCursor, 0
yax_call JUMP_TABLE_MGTK_RELAY, MGTK::HiliteMenu, menu_click_params
jsr hilite_menu
jsr dump_screen
yax_call JUMP_TABLE_MGTK_RELAY, MGTK::HiliteMenu, menu_click_params
jsr hilite_menu
yax_call JUMP_TABLE_MGTK_RELAY, MGTK::ShowCursor, 0
rts
.proc menu_click_params
menu_id:.byte 1 ; ID of Apple menu
item_num:.byte 0
;;; ============================================================
.proc hilite_menu
;; Use zero page, which is visible from MGTK
menu_click_menu_id := $6
lda #1 ; ID of Apple menu
sta menu_click_menu_id
yax_call JUMP_TABLE_MGTK_RELAY, MGTK::HiliteMenu, menu_click_menu_id
rts
.endproc
;;; ============================================================

View File

@ -39,9 +39,9 @@ start: tsx
bne :+
rts
: lda #$40
: lda #>(JUMP_TABLE_SELECT_WINDOW-1)
pha
lda #$0B
lda #<(JUMP_TABLE_SELECT_WINDOW-1)
pha
lda a:$0A
rts
@ -309,7 +309,7 @@ L0A4B: jsr L0B16
jsr write_block
jmp L0A4B
L0A8E: pla
L0A8E: pla ; WTF ???
L0A8F: jmp exit
dev_num:

View File

@ -1587,10 +1587,10 @@ nope: dex
;; Invoke it
jsr set_pointer_cursor
jsr reset_grafport3
MGTK_RELAY_CALL MGTK::SetZP1, zp_use_flag0
MGTK_RELAY_CALL MGTK::SetZP1, zp_use_flag1
;; MGTK_RELAY_CALL MGTK::SetZP1, zp_use_flag0
;; MGTK_RELAY_CALL MGTK::SetZP1, zp_use_flag1
jsr DA_LOAD_ADDRESS
MGTK_RELAY_CALL MGTK::SetZP1, zp_use_flag0
;; MGTK_RELAY_CALL MGTK::SetZP1, zp_use_flag0
lda #0
sta running_da_flag