mirror of
https://github.com/mi57730/a2d.git
synced 2024-11-29 07:49:20 +00:00
Figured out $8E00 call - redraws desktop icons.
Also found a couple bugs: https://github.com/inexorabletash/a2d/issues/33 https://github.com/inexorabletash/a2d/issues/34
This commit is contained in:
parent
c1ece9ad71
commit
c39a8a5816
@ -3,17 +3,9 @@
|
||||
;;; ==================================================
|
||||
|
||||
;;; ==================================================
|
||||
;;; Entry Points
|
||||
;;; Direct Calls
|
||||
|
||||
A2D := $4000
|
||||
|
||||
UNKNOWN_CALL := $8E00
|
||||
;; MLI-style call (call, addr)
|
||||
;; Bounces to $93BC
|
||||
;; References jump table at 939E
|
||||
|
||||
|
||||
;; These must be called from main memory (RAMRDON/RAMWRTON)
|
||||
;; These must be called from main memory (RAMRDOFF/RAMWRTOFF)
|
||||
JUMP_TABLE_03 := $4003 ; ???
|
||||
JUMP_TABLE_06 := $4006 ; ???
|
||||
JUMP_TABLE_09 := $4009 ; ???
|
||||
@ -38,6 +30,11 @@ JUMP_TABLE_3F := $403F ; ???
|
||||
;;; ==================================================
|
||||
;;; A2D Calls
|
||||
|
||||
A2D := $4000
|
||||
;; MLI-style call (jsr A2D ; .byte call ; .addr params)
|
||||
;; Call from AUX (RAMRDON/RAMWRTON)
|
||||
|
||||
|
||||
;;; $40E5,(call*2) is the jump table used for processing these calls
|
||||
;;; $4184,(call*2) defines param blocks input length
|
||||
;;; if >=0, is length of param block
|
||||
@ -386,6 +383,18 @@ A2D_CWS_SCROLL_NORMAL := A2D_CWS_SCROLL_ENABLED | A2D_CWS_SCROLL_THUMB | A2D_CW
|
||||
A2D_DEFAULT_MSKAND := $FF
|
||||
A2D_DEFAULT_MSKOR := $00
|
||||
|
||||
;;; ==================================================
|
||||
|
||||
DESKTOP := $8E00
|
||||
;; MLI-style call (jsr A2D ; .byte call ; .addr params)
|
||||
;; Call from AUX (RAMRDON/RAMWRTON)
|
||||
|
||||
;; Implementation bounces to $93BC, uses jump table at $939E
|
||||
|
||||
;;; This is the only known call:
|
||||
|
||||
DESKTOP_REDRAW_ICONS := $0C ; Repaints desktop icons
|
||||
|
||||
;;; ==================================================
|
||||
;;; Macros
|
||||
|
||||
@ -409,6 +418,26 @@ A2D_DEFAULT_MSKOR := $00
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
;;; ------------------------------------
|
||||
;;; Same as above, but for DESKTOP
|
||||
|
||||
.macro DESKTOP_CALL op, addr, label
|
||||
jsr DESKTOP
|
||||
.byte op
|
||||
|
||||
.if .paramcount > 2
|
||||
label := *
|
||||
.endif
|
||||
|
||||
.if .paramcount > 1
|
||||
.addr addr
|
||||
.else
|
||||
.addr 0
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
;;; ------------------------------------
|
||||
|
||||
.macro A2D_DEFSTRING str, label ; String definition, for use with A2D_TEXT
|
||||
.local data ; Call as A2D_DEFSTRING "abc"
|
||||
.local end ; Can include control chars by using:
|
||||
|
@ -102,12 +102,10 @@ call_init:
|
||||
;; ???
|
||||
lda LCBANK1
|
||||
lda LCBANK1
|
||||
bit redraw_flag
|
||||
|
||||
bit redraw_flag ; BUG: https://github.com/inexorabletash/a2d/issues/33
|
||||
bmi skip
|
||||
jsr UNKNOWN_CALL
|
||||
.byte $0C
|
||||
.addr 0
|
||||
DESKTOP_CALL DESKTOP_REDRAW_ICONS
|
||||
|
||||
;; ???
|
||||
skip: lda #0
|
||||
@ -144,6 +142,8 @@ redraw_flag: .byte 0 ; ???
|
||||
sta redraw_flag
|
||||
rts
|
||||
|
||||
;; Is skipping this responsible for display redraw bug?
|
||||
;; https://github.com/inexorabletash/a2d/issues/34
|
||||
: A2D_CALL A2D_QUERY_STATE, query_state_params
|
||||
A2D_CALL A2D_SET_STATE, state_params
|
||||
lda query_state_params_id
|
||||
@ -891,9 +891,7 @@ ignore_click:
|
||||
exit: lda LCBANK1
|
||||
lda LCBANK1
|
||||
A2D_CALL A2D_DESTROY_WINDOW, destroy_window_params
|
||||
jsr UNKNOWN_CALL
|
||||
.byte $0C
|
||||
.addr 0
|
||||
DESKTOP_CALL DESKTOP_REDRAW_ICONS
|
||||
lda ROMIN2
|
||||
A2D_CALL $1A, L08D5 ; ??? one byte input value?
|
||||
|
||||
|
@ -658,9 +658,7 @@ dialog_result: .byte 0
|
||||
|
||||
.proc destroy
|
||||
A2D_CALL A2D_DESTROY_WINDOW, destroy_window_params
|
||||
jsr UNKNOWN_CALL
|
||||
.byte $0C
|
||||
.addr 0
|
||||
DESKTOP_CALL DESKTOP_REDRAW_ICONS
|
||||
|
||||
;; Copy the relay routine to the zero page
|
||||
dest := $20
|
||||
|
@ -99,9 +99,7 @@ loop: lda routine,x
|
||||
bit window_pos_flag
|
||||
bmi skip
|
||||
|
||||
jsr UNKNOWN_CALL ; update window pos?
|
||||
.byte $0C
|
||||
.addr 0
|
||||
DESKTOP_CALL DESKTOP_REDRAW_ICONS
|
||||
|
||||
skip: lda #0
|
||||
sta window_pos_flag
|
||||
@ -735,10 +733,7 @@ bail: rts
|
||||
beq bail
|
||||
destroy:
|
||||
A2D_CALL A2D_DESTROY_WINDOW, destroy_window_params
|
||||
|
||||
jsr UNKNOWN_CALL ; ???
|
||||
.byte $0C
|
||||
.addr 0
|
||||
DESKTOP_CALL DESKTOP_REDRAW_ICONS
|
||||
|
||||
target = $20 ; copy following to ZP and run it
|
||||
ldx #sizeof_routine
|
||||
|
@ -377,13 +377,9 @@ end: rts
|
||||
bne input_loop ; nope, keep waiting
|
||||
|
||||
A2D_CALL A2D_DESTROY_WINDOW, window_params
|
||||
|
||||
DESKTOP_CALL DESKTOP_REDRAW_ICONS
|
||||
jsr unstash_menu
|
||||
|
||||
jsr UNKNOWN_CALL ; ???
|
||||
.byte $0C
|
||||
.addr 0
|
||||
|
||||
rts ; exits input loop
|
||||
.endproc
|
||||
|
||||
|
@ -549,11 +549,7 @@ title: jsr on_title_bar_click
|
||||
beq input_loop ; nope
|
||||
jsr close_file
|
||||
A2D_CALL A2D_DESTROY_WINDOW, window_params
|
||||
|
||||
jsr UNKNOWN_CALL ; ???
|
||||
.byte $0C
|
||||
.addr 0
|
||||
|
||||
DESKTOP_CALL DESKTOP_REDRAW_ICONS
|
||||
rts ; exits input loop
|
||||
.endproc
|
||||
|
||||
@ -948,9 +944,7 @@ end: rts
|
||||
.endproc
|
||||
|
||||
.proc finish_resize ; only called from dead code
|
||||
jsr UNKNOWN_CALL
|
||||
.byte $0C
|
||||
.addr 0
|
||||
DESKTOP_CALL DESKTOP_REDRAW_ICONS
|
||||
A2D_CALL A2D_SET_STATE, window_params::box
|
||||
lda window_params::hscroll
|
||||
ror a ; check if low bit (track enabled) is set
|
||||
|
Loading…
Reference in New Issue
Block a user