mirror of
https://github.com/mi57730/a2d.git
synced 2025-02-20 02:29:11 +00:00
DeskTop disasm: startup flow
This commit is contained in:
parent
418cd09cd6
commit
ae2938c58e
@ -967,7 +967,7 @@ L4755: DESKTOP_RELAY_CALL DT_UNHIGHLIGHT_ALL
|
|||||||
bpl :-
|
bpl :-
|
||||||
addr_call L4842, $280
|
addr_call L4842, $280
|
||||||
addr_call L4842, $220
|
addr_call L4842, $220
|
||||||
jsr L48BE
|
jsr restore_device_list
|
||||||
copy16 #INVOKER, reset_and_invoke_target
|
copy16 #INVOKER, reset_and_invoke_target
|
||||||
jmp reset_and_invoke
|
jmp reset_and_invoke
|
||||||
|
|
||||||
@ -1068,10 +1068,10 @@ show_cursor:
|
|||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
|
|
||||||
.proc L48BE
|
.proc restore_device_list
|
||||||
ldx DESKTOP_DEVICELIST
|
ldx devlst_backup
|
||||||
inx
|
inx
|
||||||
: lda DESKTOP_DEVICELIST,x
|
: lda devlst_backup,x
|
||||||
sta DEVLST-1,x
|
sta DEVLST-1,x
|
||||||
dex
|
dex
|
||||||
bpl :-
|
bpl :-
|
||||||
@ -3124,7 +3124,7 @@ L594A: ldy L599E
|
|||||||
inc cached_window_icon_count
|
inc cached_window_icon_count
|
||||||
inc LDD9E
|
inc LDD9E
|
||||||
lda #$00
|
lda #$00
|
||||||
sta devlst_copy,y
|
sta device_to_icon_map,y
|
||||||
lda DEVLST,y
|
lda DEVLST,y
|
||||||
jsr create_volume_icon
|
jsr create_volume_icon
|
||||||
cmp #ERR_DUPLICATE_VOLUME
|
cmp #ERR_DUPLICATE_VOLUME
|
||||||
@ -3183,7 +3183,7 @@ L59A8: lda #$C0
|
|||||||
bvc L59D2
|
bvc L59D2
|
||||||
lda L533F
|
lda L533F
|
||||||
ldy #$0F
|
ldy #$0F
|
||||||
L59C1: cmp devlst_copy,y
|
L59C1: cmp device_to_icon_map,y
|
||||||
beq L59C9
|
beq L59C9
|
||||||
dey
|
dey
|
||||||
bpl L59C1
|
bpl L59C1
|
||||||
@ -3207,7 +3207,7 @@ L59EA: lda menu_click_params::item_num
|
|||||||
sbc #$03
|
sbc #$03
|
||||||
sta menu_click_params::item_num
|
sta menu_click_params::item_num
|
||||||
L59F3: ldy menu_click_params::item_num
|
L59F3: ldy menu_click_params::item_num
|
||||||
lda devlst_copy,y
|
lda device_to_icon_map,y
|
||||||
bne L59FE
|
bne L59FE
|
||||||
jmp L5A4C
|
jmp L5A4C
|
||||||
|
|
||||||
@ -3248,7 +3248,7 @@ L5A4C: jsr redraw_windows_and_desktop
|
|||||||
lda menu_click_params::item_num
|
lda menu_click_params::item_num
|
||||||
tay
|
tay
|
||||||
pha
|
pha
|
||||||
lda devlst_copy,y
|
lda device_to_icon_map,y
|
||||||
sta icon_param
|
sta icon_param
|
||||||
beq L5A7F
|
beq L5A7F
|
||||||
jsr remove_icon_from_window
|
jsr remove_icon_from_window
|
||||||
@ -8371,7 +8371,7 @@ pos_win: .word 0, 0
|
|||||||
error: pha ; save error
|
error: pha ; save error
|
||||||
ldy device_num ; remove unit from list
|
ldy device_num ; remove unit from list
|
||||||
lda #0
|
lda #0
|
||||||
sta devlst_copy,y
|
sta device_to_icon_map,y
|
||||||
dec cached_window_icon_count
|
dec cached_window_icon_count
|
||||||
dec LDD9E
|
dec LDD9E
|
||||||
pla
|
pla
|
||||||
@ -8390,7 +8390,7 @@ create_icon:
|
|||||||
jsr push_zp_addrs
|
jsr push_zp_addrs
|
||||||
jsr DESKTOP_ALLOC_ICON
|
jsr DESKTOP_ALLOC_ICON
|
||||||
ldy device_num
|
ldy device_num
|
||||||
sta devlst_copy,y
|
sta device_to_icon_map,y
|
||||||
jsr icon_entry_lookup
|
jsr icon_entry_lookup
|
||||||
stax icon_ptr
|
stax icon_ptr
|
||||||
|
|
||||||
@ -9369,7 +9369,7 @@ index: .byte 0
|
|||||||
sta compare
|
sta compare
|
||||||
ldy #0
|
ldy #0
|
||||||
|
|
||||||
loop: lda devlst_copy,y
|
loop: lda device_to_icon_map,y
|
||||||
|
|
||||||
compare := *+1
|
compare := *+1
|
||||||
cmp #0
|
cmp #0
|
||||||
@ -9546,7 +9546,7 @@ L939D: jsr launch_get_info_dialog
|
|||||||
ldx L92E6
|
ldx L92E6
|
||||||
lda selected_icon_list,x
|
lda selected_icon_list,x
|
||||||
ldy #$0F
|
ldy #$0F
|
||||||
L93AD: cmp devlst_copy,y
|
L93AD: cmp device_to_icon_map,y
|
||||||
beq L93B8
|
beq L93B8
|
||||||
dey
|
dey
|
||||||
bpl L93AD
|
bpl L93AD
|
||||||
@ -14081,15 +14081,18 @@ end:
|
|||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
|
|
||||||
.proc detach_ramdisk
|
.proc backup_device_list
|
||||||
;; Make a copy of the original device list
|
;; Make a copy of the original device list
|
||||||
ldx DEVCNT
|
ldx DEVCNT
|
||||||
inx
|
inx
|
||||||
: lda DEVLST-1,x
|
: lda DEVLST-1,x
|
||||||
sta DESKTOP_DEVICELIST,x
|
sta devlst_backup,x
|
||||||
dex
|
dex
|
||||||
bpl :-
|
bpl :-
|
||||||
|
;; fall through
|
||||||
|
.endproc
|
||||||
|
|
||||||
|
.proc detach_ramdisk
|
||||||
;; Look for /RAM
|
;; Look for /RAM
|
||||||
ldx DEVCNT
|
ldx DEVCNT
|
||||||
: lda DEVLST,x
|
: lda DEVLST,x
|
||||||
@ -14128,7 +14131,7 @@ found_ram:
|
|||||||
loop: cpx #max_icon_count
|
loop: cpx #max_icon_count
|
||||||
bne :+
|
bne :+
|
||||||
jsr desktop_main::pop_zp_addrs
|
jsr desktop_main::pop_zp_addrs
|
||||||
jmp clear_window_icon_tables
|
jmp end
|
||||||
: txa
|
: txa
|
||||||
pha
|
pha
|
||||||
asl a
|
asl a
|
||||||
@ -14151,6 +14154,7 @@ loop: cpx #max_icon_count
|
|||||||
tax
|
tax
|
||||||
inx
|
inx
|
||||||
jmp loop
|
jmp loop
|
||||||
|
end:
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
@ -14283,7 +14287,7 @@ trash_name: PASCAL_STRING " Trash "
|
|||||||
cpx devcnt
|
cpx devcnt
|
||||||
bne :-
|
bne :-
|
||||||
dec DEVCNT
|
dec DEVCNT
|
||||||
done: jmp load_selector_list
|
done: jmp end
|
||||||
|
|
||||||
L09F8: .byte 0
|
L09F8: .byte 0
|
||||||
|
|
||||||
@ -14300,6 +14304,8 @@ smartport_params:
|
|||||||
|
|
||||||
devcnt: .byte 0
|
devcnt: .byte 0
|
||||||
L0A02: .byte 0
|
L0A02: .byte 0
|
||||||
|
|
||||||
|
end:
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
@ -14456,9 +14462,11 @@ read_selector_list:
|
|||||||
add16 width_items_label, #5, width_items_label_padded
|
add16 width_items_label, #5, width_items_label_padded
|
||||||
add16 width_items_label_padded, width_k_in_disk_label, width_left_labels
|
add16 width_items_label_padded, width_k_in_disk_label, width_left_labels
|
||||||
add16 width_left_labels, #3, width_left_labels
|
add16 width_left_labels, #3, width_left_labels
|
||||||
jmp enumerate_desk_accessories
|
jmp end
|
||||||
|
|
||||||
dx: .word 0
|
dx: .word 0
|
||||||
|
|
||||||
|
end:
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
@ -14602,7 +14610,7 @@ next_entry:
|
|||||||
|
|
||||||
close_dir:
|
close_dir:
|
||||||
MLI_RELAY_CALL CLOSE, close_params
|
MLI_RELAY_CALL CLOSE, close_params
|
||||||
jmp populate_volume_icons
|
jmp end
|
||||||
|
|
||||||
DEFINE_OPEN_PARAMS open_params, str_desk_acc, $1000
|
DEFINE_OPEN_PARAMS open_params, str_desk_acc, $1000
|
||||||
open_ref_num := open_params::ref_num
|
open_ref_num := open_params::ref_num
|
||||||
@ -14628,6 +14636,8 @@ entry_length: .byte 0
|
|||||||
entries_per_block: .byte 0
|
entries_per_block: .byte 0
|
||||||
entry_in_block: .byte 0
|
entry_in_block: .byte 0
|
||||||
ptr_calc_hi: .byte 0
|
ptr_calc_hi: .byte 0
|
||||||
|
|
||||||
|
end:
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
@ -14638,7 +14648,9 @@ ptr_calc_hi: .byte 0
|
|||||||
ldy #0
|
ldy #0
|
||||||
sty desktop_main::pending_alert
|
sty desktop_main::pending_alert
|
||||||
sty volume_num
|
sty volume_num
|
||||||
L0D12: lda volume_num
|
|
||||||
|
process_volume:
|
||||||
|
lda volume_num
|
||||||
asl a
|
asl a
|
||||||
tay
|
tay
|
||||||
copy16 slot_drive_string_table,y, $08
|
copy16 slot_drive_string_table,y, $08
|
||||||
@ -14695,8 +14707,8 @@ L0D7F: cmp #$0B
|
|||||||
lsr a
|
lsr a
|
||||||
lsr a
|
lsr a
|
||||||
ora #$C0
|
ora #$C0
|
||||||
sta L0D96
|
sta slot_msb
|
||||||
L0D96 := *+2
|
slot_msb := *+2
|
||||||
lda $C7FB ; self-modified
|
lda $C7FB ; self-modified
|
||||||
and #$01
|
and #$01
|
||||||
bne L0DA2
|
bne L0DA2
|
||||||
@ -14705,6 +14717,7 @@ L0D7F: cmp #$0B
|
|||||||
L0DA2: addr_jump L0DAD, str_ramcard_slot_x
|
L0DA2: addr_jump L0DAD, str_ramcard_slot_x
|
||||||
|
|
||||||
L0DA9: ldax #str_unidisk_xy
|
L0DA9: ldax #str_unidisk_xy
|
||||||
|
|
||||||
L0DAD: stax $06
|
L0DAD: stax $06
|
||||||
ldy #$00
|
ldy #$00
|
||||||
lda ($06),y
|
lda ($06),y
|
||||||
@ -14778,7 +14791,7 @@ next: lda volume_num
|
|||||||
cmp DEVCNT
|
cmp DEVCNT
|
||||||
beq L0E2F
|
beq L0E2F
|
||||||
bcs populate_startup_menu
|
bcs populate_startup_menu
|
||||||
L0E2F: jmp L0D12
|
L0E2F: jmp process_volume
|
||||||
|
|
||||||
L0E32: .byte 0
|
L0E32: .byte 0
|
||||||
volume_num: .byte 0
|
volume_num: .byte 0
|
||||||
@ -14793,8 +14806,8 @@ L0E34: .byte 0
|
|||||||
L0E36: inx
|
L0E36: inx
|
||||||
lda DEVLST+1,x
|
lda DEVLST+1,x
|
||||||
sta DEVLST,x
|
sta DEVLST,x
|
||||||
lda devlst_copy+1,x
|
lda device_to_icon_map+1,x
|
||||||
sta devlst_copy,x
|
sta device_to_icon_map,x
|
||||||
cpx DEVCNT
|
cpx DEVCNT
|
||||||
bne L0E36
|
bne L0E36
|
||||||
dec DEVCNT
|
dec DEVCNT
|
||||||
@ -14857,7 +14870,7 @@ prepare:
|
|||||||
jmp loop
|
jmp loop
|
||||||
|
|
||||||
done: stx startup_menu
|
done: stx startup_menu
|
||||||
jmp L0EE1
|
jmp final_setup
|
||||||
|
|
||||||
char: .byte 0
|
char: .byte 0
|
||||||
slot: .byte 0
|
slot: .byte 0
|
||||||
@ -14882,7 +14895,7 @@ slot_string_table:
|
|||||||
|
|
||||||
str_system_start: PASCAL_STRING "System/Start"
|
str_system_start: PASCAL_STRING "System/Start"
|
||||||
|
|
||||||
.proc L0EE1
|
.proc final_setup
|
||||||
lda #0
|
lda #0
|
||||||
sta desktop_main::sys_start_flag
|
sta desktop_main::sys_start_flag
|
||||||
jsr desktop_main::get_LD3FF
|
jsr desktop_main::get_LD3FF
|
||||||
|
@ -946,9 +946,12 @@ LE062: .res 170, 0
|
|||||||
LE10C: .byte 0
|
LE10C: .byte 0
|
||||||
LE10D: .res 137, 0
|
LE10D: .res 137, 0
|
||||||
|
|
||||||
DESKTOP_DEVICELIST:
|
;; Backup copy of DEVLST made before detaching ramdisk
|
||||||
|
devlst_backup:
|
||||||
.res 10, 0
|
.res 10, 0
|
||||||
devlst_copy:
|
|
||||||
|
;; index is device number (in DEVLST), value is icon number
|
||||||
|
device_to_icon_map:
|
||||||
.res 16, 0
|
.res 16, 0
|
||||||
|
|
||||||
LE1B0: .res 65, 0 ; path buffer?
|
LE1B0: .res 65, 0 ; path buffer?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user