mirror of
https://github.com/mi57730/a2d.git
synced 2025-08-10 08:25:15 +00:00
DeskTop: More overlay noodling
This commit is contained in:
216
desktop/ovl4.s
216
desktop/ovl4.s
@@ -47,8 +47,8 @@ routine_table: .addr $7000, $7000, $7000
|
|||||||
sta L5104
|
sta L5104
|
||||||
sta L5103
|
sta L5103
|
||||||
sta L5105
|
sta L5105
|
||||||
lda #$14
|
lda #prompt_insertion_point_blink_count
|
||||||
sta $D8E9
|
sta prompt_ip_counter
|
||||||
lda #$FF
|
lda #$FF
|
||||||
sta $D920
|
sta $D920
|
||||||
pla
|
pla
|
||||||
@@ -66,20 +66,21 @@ stash_y: .byte 0
|
|||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
|
;;; Flags set by invoker to alter behavior
|
||||||
|
|
||||||
L5103: .byte 0
|
L5103: .byte 0 ; ??? something before jt_13 invoked
|
||||||
L5104: .byte 0
|
L5104: .byte 0 ; ??? something about inputs
|
||||||
L5105: .byte 0
|
L5105: .byte 0 ; ??? something about the picker
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
|
|
||||||
L5106: bit LD8EC
|
L5106: bit LD8EC
|
||||||
bpl :+
|
bpl :+
|
||||||
dec $D8E9
|
dec prompt_ip_counter
|
||||||
bne :+
|
bne :+
|
||||||
jsr jt_02
|
jsr jt_02
|
||||||
lda #$14
|
lda #prompt_insertion_point_blink_count
|
||||||
sta $D8E9
|
sta prompt_ip_counter
|
||||||
: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::event_kind_button_down
|
||||||
@@ -123,17 +124,17 @@ L5199: MGTK_RELAY_CALL MGTK::InitPort, grafport3
|
|||||||
jmp L5106
|
jmp L5106
|
||||||
|
|
||||||
L51AE: .byte 0
|
L51AE: .byte 0
|
||||||
|
|
||||||
|
;;; ============================================================
|
||||||
|
|
||||||
L51AF: MGTK_RELAY_CALL MGTK::FindWindow, findwindow_params
|
L51AF: MGTK_RELAY_CALL MGTK::FindWindow, findwindow_params
|
||||||
lda findwindow_which_area
|
lda findwindow_which_area
|
||||||
bne L51BE
|
bne :+
|
||||||
rts
|
rts
|
||||||
|
: cmp #MGTK::area_content
|
||||||
L51BE: cmp #MGTK::area_content
|
|
||||||
bne :+
|
bne :+
|
||||||
jmp L51C7
|
jmp L51C7
|
||||||
|
|
||||||
rts ; ???
|
rts ; ???
|
||||||
|
|
||||||
: rts
|
: rts
|
||||||
|
|
||||||
L51C7: lda findwindow_window_id
|
L51C7: lda findwindow_window_id
|
||||||
@@ -147,21 +148,25 @@ L51D2: lda winfo_entrydlg
|
|||||||
sta screentowindow_window_id
|
sta screentowindow_window_id
|
||||||
MGTK_RELAY_CALL MGTK::ScreenToWindow, screentowindow_params
|
MGTK_RELAY_CALL MGTK::ScreenToWindow, screentowindow_params
|
||||||
MGTK_RELAY_CALL MGTK::MoveTo, screentowindow_windowx
|
MGTK_RELAY_CALL MGTK::MoveTo, screentowindow_windowx
|
||||||
|
|
||||||
|
;; In open button?
|
||||||
|
.proc check_open_button
|
||||||
MGTK_RELAY_CALL MGTK::InRect, common_open_button_rect
|
MGTK_RELAY_CALL MGTK::InRect, common_open_button_rect
|
||||||
cmp #MGTK::inrect_inside
|
cmp #MGTK::inrect_inside
|
||||||
beq L5200
|
beq clicked
|
||||||
jmp L5239
|
jmp check_change_drive_button
|
||||||
|
|
||||||
L5200: bit L5105
|
clicked:
|
||||||
|
bit L5105
|
||||||
bmi L520A
|
bmi L520A
|
||||||
lda $D920
|
lda $D920
|
||||||
bpl L520D
|
bpl L520D
|
||||||
L520A: jmp L5308
|
L520A: jmp set_up_ports
|
||||||
|
|
||||||
L520D: tax
|
L520D: tax
|
||||||
lda $1780,x
|
lda $1780,x
|
||||||
bmi L5216
|
bmi L5216
|
||||||
L5213: jmp L5308
|
L5213: jmp set_up_ports
|
||||||
|
|
||||||
L5216: lda winfo_entrydlg
|
L5216: lda winfo_entrydlg
|
||||||
jsr set_port_for_window
|
jsr set_port_for_window
|
||||||
@@ -170,69 +175,77 @@ L5216: lda winfo_entrydlg
|
|||||||
jsr track_open_button_click
|
jsr track_open_button_click
|
||||||
bmi L5213
|
bmi L5213
|
||||||
jsr L5607
|
jsr L5607
|
||||||
jmp L5308
|
jmp set_up_ports
|
||||||
|
.endproc
|
||||||
|
|
||||||
L5239: MGTK_RELAY_CALL MGTK::InRect, common_change_drive_button_rect
|
.proc check_change_drive_button
|
||||||
|
MGTK_RELAY_CALL MGTK::InRect, common_change_drive_button_rect
|
||||||
cmp #MGTK::inrect_inside
|
cmp #MGTK::inrect_inside
|
||||||
beq L5249
|
beq :+
|
||||||
jmp L526B
|
jmp check_close_button
|
||||||
|
: bit L5105
|
||||||
L5249: bit L5105
|
|
||||||
bmi L5268
|
bmi L5268
|
||||||
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||||
MGTK_RELAY_CALL MGTK::PaintRect, common_change_drive_button_rect
|
MGTK_RELAY_CALL MGTK::PaintRect, common_change_drive_button_rect
|
||||||
jsr track_change_drive_button_click
|
jsr track_change_drive_button_click
|
||||||
bmi L5268
|
bmi L5268
|
||||||
jsr L565C
|
jsr L565C
|
||||||
L5268: jmp L5308
|
L5268: jmp set_up_ports
|
||||||
|
.endproc
|
||||||
|
|
||||||
L526B: MGTK_RELAY_CALL MGTK::InRect, common_close_button_rect
|
.proc check_close_button
|
||||||
|
MGTK_RELAY_CALL MGTK::InRect, common_close_button_rect
|
||||||
cmp #MGTK::inrect_inside
|
cmp #MGTK::inrect_inside
|
||||||
beq L527B
|
beq :+
|
||||||
jmp L529D
|
jmp check_ok_button
|
||||||
|
: bit L5105
|
||||||
L527B: bit L5105
|
|
||||||
bmi L529A
|
bmi L529A
|
||||||
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||||
MGTK_RELAY_CALL MGTK::PaintRect, common_close_button_rect
|
MGTK_RELAY_CALL MGTK::PaintRect, common_close_button_rect
|
||||||
jsr track_close_button_click
|
jsr track_close_button_click
|
||||||
bmi L529A
|
bmi L529A
|
||||||
jsr L567F
|
jsr L567F
|
||||||
L529A: jmp L5308
|
L529A: jmp set_up_ports
|
||||||
|
.endproc
|
||||||
|
|
||||||
L529D: MGTK_RELAY_CALL MGTK::InRect, common_ok_button_rect
|
.proc check_ok_button
|
||||||
|
MGTK_RELAY_CALL MGTK::InRect, common_ok_button_rect
|
||||||
cmp #MGTK::inrect_inside
|
cmp #MGTK::inrect_inside
|
||||||
beq L52AD
|
beq :+
|
||||||
jmp L52CD
|
jmp check_cancel_button
|
||||||
|
: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||||
L52AD: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
|
||||||
MGTK_RELAY_CALL MGTK::PaintRect, common_ok_button_rect
|
MGTK_RELAY_CALL MGTK::PaintRect, common_ok_button_rect
|
||||||
jsr track_ok_button_click
|
jsr track_ok_button_click
|
||||||
bmi L52CA
|
bmi L52CA
|
||||||
jsr jt_12
|
jsr jt_12
|
||||||
jsr jt_00
|
jsr jt_00
|
||||||
L52CA: jmp L5308
|
L52CA: jmp set_up_ports
|
||||||
|
.endproc
|
||||||
|
|
||||||
L52CD: MGTK_RELAY_CALL MGTK::InRect, common_cancel_button_rect
|
.proc check_cancel_button
|
||||||
|
MGTK_RELAY_CALL MGTK::InRect, common_cancel_button_rect
|
||||||
cmp #MGTK::inrect_inside
|
cmp #MGTK::inrect_inside
|
||||||
beq L52DD
|
beq :+
|
||||||
jmp L52FA
|
jmp check_other_click
|
||||||
|
: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||||
L52DD: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
|
||||||
MGTK_RELAY_CALL MGTK::PaintRect, common_cancel_button_rect
|
MGTK_RELAY_CALL MGTK::PaintRect, common_cancel_button_rect
|
||||||
jsr track_cancel_button_click
|
jsr track_cancel_button_click
|
||||||
bmi L52F7
|
bmi L52F7
|
||||||
jsr jt_01
|
jsr jt_01
|
||||||
L52F7: jmp L5308
|
L52F7: jmp set_up_ports
|
||||||
|
.endproc
|
||||||
|
|
||||||
L52FA: bit L5103
|
.proc check_other_click
|
||||||
bpl L5304
|
bit L5103
|
||||||
|
bpl :+
|
||||||
jsr L531B
|
jsr L531B
|
||||||
bmi L5308
|
bmi set_up_ports
|
||||||
L5304: jsr jt_13
|
: jsr jt_13
|
||||||
rts
|
rts
|
||||||
|
.endproc
|
||||||
|
|
||||||
L5308: MGTK_RELAY_CALL MGTK::InitPort, grafport3
|
set_up_ports:
|
||||||
|
MGTK_RELAY_CALL MGTK::InitPort, grafport3
|
||||||
MGTK_RELAY_CALL MGTK::SetPort, grafport2
|
MGTK_RELAY_CALL MGTK::SetPort, grafport2
|
||||||
rts
|
rts
|
||||||
|
|
||||||
@@ -571,7 +584,7 @@ L567F: lda #$00
|
|||||||
|
|
||||||
L568C: lda path_buf,x
|
L568C: lda path_buf,x
|
||||||
and #$7F
|
and #$7F
|
||||||
cmp #$2F
|
cmp #'/'
|
||||||
beq L569B
|
beq L569B
|
||||||
dex
|
dex
|
||||||
bpl L568C
|
bpl L568C
|
||||||
@@ -1468,7 +1481,7 @@ L5F49: ldx path_buf
|
|||||||
beq L5F5A
|
beq L5F5A
|
||||||
dec path_buf
|
dec path_buf
|
||||||
lda path_buf,x
|
lda path_buf,x
|
||||||
cmp #$2F
|
cmp #'/'
|
||||||
bne L5F49
|
bne L5F49
|
||||||
L5F5A: rts
|
L5F5A: rts
|
||||||
|
|
||||||
@@ -1652,40 +1665,41 @@ L6128: .byte 0
|
|||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
|
|
||||||
L6129: stx $0B
|
.proc adjust_filename_case
|
||||||
|
stx $0A+1
|
||||||
sta $0A
|
sta $0A
|
||||||
ldy #$00
|
ldy #0
|
||||||
lda ($0A),y
|
lda ($0A),y
|
||||||
tay
|
tay
|
||||||
bne L6135
|
bne loop
|
||||||
rts
|
rts
|
||||||
|
|
||||||
L6135: dey
|
loop: dey
|
||||||
beq L613A
|
beq done
|
||||||
bpl L613B
|
bpl :+
|
||||||
L613A: rts
|
done: rts
|
||||||
|
: lda ($0A),y
|
||||||
|
and #$7F ; convert to ASCII
|
||||||
|
cmp #'/'
|
||||||
|
beq next
|
||||||
|
cmp #'.'
|
||||||
|
bne check
|
||||||
|
next: dey
|
||||||
|
jmp loop
|
||||||
|
|
||||||
L613B: lda ($0A),y
|
check: iny
|
||||||
and #$7F
|
|
||||||
cmp #$2F
|
|
||||||
beq L6147
|
|
||||||
cmp #$2E
|
|
||||||
bne L614B
|
|
||||||
L6147: dey
|
|
||||||
jmp L6135
|
|
||||||
|
|
||||||
L614B: iny
|
|
||||||
lda ($0A),y
|
lda ($0A),y
|
||||||
and #$7F
|
and #$7F
|
||||||
cmp #$41
|
cmp #'A'
|
||||||
bcc L615D
|
bcc L615D
|
||||||
cmp #$5B
|
cmp #'Z'+1
|
||||||
bcs L615D
|
bcs L615D
|
||||||
clc
|
clc
|
||||||
adc #$20
|
adc #$20 ; convert to lower case
|
||||||
sta ($0A),y
|
sta ($0A),y
|
||||||
L615D: dey
|
L615D: dey
|
||||||
jmp L6135
|
jmp loop
|
||||||
|
.endproc
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
|
|
||||||
@@ -1730,7 +1744,7 @@ L61B1: lda winfo_entrydlg
|
|||||||
iny
|
iny
|
||||||
L61D0: iny
|
L61D0: iny
|
||||||
lda ($06),y
|
lda ($06),y
|
||||||
cmp #$2F
|
cmp #'/'
|
||||||
beq L61DE
|
beq L61DE
|
||||||
cpy L6226
|
cpy L6226
|
||||||
bne L61D0
|
bne L61D0
|
||||||
@@ -1746,7 +1760,7 @@ L61E6: inx
|
|||||||
cpy L6226
|
cpy L6226
|
||||||
bne L61E6
|
bne L61E6
|
||||||
stx $0220
|
stx $0220
|
||||||
addr_call L6129, $0220
|
addr_call adjust_filename_case, $0220
|
||||||
MGTK_RELAY_CALL MGTK::MoveTo, disk_label_pos
|
MGTK_RELAY_CALL MGTK::MoveTo, disk_label_pos
|
||||||
addr_call draw_string, disk_label
|
addr_call draw_string, disk_label
|
||||||
addr_call draw_string, $0220
|
addr_call draw_string, $0220
|
||||||
@@ -1971,7 +1985,7 @@ L647B: .byte 0
|
|||||||
L647C: stax $06
|
L647C: stax $06
|
||||||
ldy #$01
|
ldy #$01
|
||||||
lda ($06),y
|
lda ($06),y
|
||||||
cmp #$2F
|
cmp #'/'
|
||||||
bne L64DE
|
bne L64DE
|
||||||
dey
|
dey
|
||||||
lda ($06),y
|
lda ($06),y
|
||||||
@@ -1979,12 +1993,12 @@ L647C: stax $06
|
|||||||
bcc L64DE
|
bcc L64DE
|
||||||
tay
|
tay
|
||||||
lda ($06),y
|
lda ($06),y
|
||||||
cmp #$2F
|
cmp #'/'
|
||||||
beq L64DE
|
beq L64DE
|
||||||
ldx #$00
|
ldx #$00
|
||||||
stx L64E1
|
stx L64E1
|
||||||
L649B: lda ($06),y
|
L649B: lda ($06),y
|
||||||
cmp #$2F
|
cmp #'/'
|
||||||
beq L64AB
|
beq L64AB
|
||||||
inx
|
inx
|
||||||
cpx #$10
|
cpx #$10
|
||||||
@@ -2001,19 +2015,19 @@ L64B3: ldy #$00
|
|||||||
tay
|
tay
|
||||||
L64B8: lda ($06),y
|
L64B8: lda ($06),y
|
||||||
and #$7F
|
and #$7F
|
||||||
cmp #$2E
|
cmp #'.'
|
||||||
beq L64D8
|
beq L64D8
|
||||||
cmp #$2F
|
cmp #'/'
|
||||||
bcc L64DE
|
bcc L64DE
|
||||||
cmp #$3A
|
cmp #'9'+1
|
||||||
bcc L64D8
|
bcc L64D8
|
||||||
cmp #$41
|
cmp #'A'
|
||||||
bcc L64DE
|
bcc L64DE
|
||||||
cmp #$5B
|
cmp #'Z'+1
|
||||||
bcc L64D8
|
bcc L64D8
|
||||||
cmp #$61
|
cmp #'a'
|
||||||
bcc L64DE
|
bcc L64DE
|
||||||
cmp #$7B
|
cmp #'z'+1
|
||||||
bcs L64DE
|
bcs L64DE
|
||||||
L64D8: dey
|
L64D8: dey
|
||||||
bne L64B8
|
bne L64B8
|
||||||
@@ -2034,7 +2048,7 @@ L64F5: lda L6515
|
|||||||
beq L64E7
|
beq L64E7
|
||||||
lda $06
|
lda $06
|
||||||
ldx $07
|
ldx $07
|
||||||
jsr L6129
|
jsr adjust_filename_case
|
||||||
inc L6515
|
inc L6515
|
||||||
lda $06
|
lda $06
|
||||||
clc
|
clc
|
||||||
@@ -2737,24 +2751,24 @@ L6CFD: inx
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
jump_table:
|
jump_table:
|
||||||
jt_00: jmp 0
|
jt_00: jmp 0 ; ok button ???
|
||||||
jt_01: jmp 0
|
jt_01: jmp 0 ; cancel button ???
|
||||||
jt_02: jmp 0
|
jt_02: jmp 0 ; input loop
|
||||||
jt_03: jmp 0
|
jt_03: jmp 0
|
||||||
jt_04: jmp 0
|
jt_04: jmp 0
|
||||||
jt_05: jmp 0
|
jt_05: jmp 0
|
||||||
jt_06: jmp 0
|
jt_06: jmp 0
|
||||||
jt_07: jmp 0
|
jt_07: jmp 0
|
||||||
jt_08: jmp 0
|
jt_08: jmp 0 ; delete key ???
|
||||||
jt_09: jmp 0
|
jt_09: jmp 0 ; left key ???
|
||||||
jt_10: jmp 0
|
jt_10: jmp 0 ; right key ???
|
||||||
jt_11: jmp 0
|
jt_11: jmp 0 ; meta-left key ???
|
||||||
jt_12: jmp 0
|
jt_12: jmp 0 ; meta-right key ???
|
||||||
jt_13: jmp 0
|
jt_13: jmp 0 ; click handler ???
|
||||||
|
|
||||||
L6D48: stax $06
|
L6D48: stax $06
|
||||||
ldx path_buf0
|
ldx path_buf0
|
||||||
lda #$2F
|
lda #'/'
|
||||||
sta path_buf0+1,x
|
sta path_buf0+1,x
|
||||||
inc path_buf0
|
inc path_buf0
|
||||||
ldy #$00
|
ldy #$00
|
||||||
@@ -2776,7 +2790,7 @@ L6D62: lda ($06),y
|
|||||||
|
|
||||||
L6D73: stax $06
|
L6D73: stax $06
|
||||||
ldx path_buf1
|
ldx path_buf1
|
||||||
lda #$2F
|
lda #'/'
|
||||||
sta path_buf1+1,x
|
sta path_buf1+1,x
|
||||||
inc path_buf1
|
inc path_buf1
|
||||||
ldy #$00
|
ldy #$00
|
||||||
@@ -2801,7 +2815,7 @@ L6D9E: ldx path_buf0
|
|||||||
beq L6DAF
|
beq L6DAF
|
||||||
dec path_buf0
|
dec path_buf0
|
||||||
lda path_buf0,x
|
lda path_buf0,x
|
||||||
cmp #$2F
|
cmp #'/'
|
||||||
bne L6D9E
|
bne L6D9E
|
||||||
L6DAF: rts
|
L6DAF: rts
|
||||||
|
|
||||||
@@ -2810,7 +2824,7 @@ L6DB0: ldx path_buf1
|
|||||||
beq L6DC1
|
beq L6DC1
|
||||||
dec path_buf1
|
dec path_buf1
|
||||||
lda path_buf1,x
|
lda path_buf1,x
|
||||||
cmp #$2F
|
cmp #'/'
|
||||||
bne L6DB0
|
bne L6DB0
|
||||||
L6DC1: rts
|
L6DC1: rts
|
||||||
|
|
||||||
@@ -2863,7 +2877,7 @@ L6E20: lda path_buf,x
|
|||||||
sta path_buf0,x
|
sta path_buf0,x
|
||||||
dex
|
dex
|
||||||
bpl L6E20
|
bpl L6E20
|
||||||
addr_call L6129, path_buf0
|
addr_call adjust_filename_case, path_buf0
|
||||||
rts
|
rts
|
||||||
|
|
||||||
ldx path_buf
|
ldx path_buf
|
||||||
@@ -2871,7 +2885,7 @@ L6E34: lda path_buf,x
|
|||||||
sta path_buf1,x
|
sta path_buf1,x
|
||||||
dex
|
dex
|
||||||
bpl L6E34
|
bpl L6E34
|
||||||
addr_call L6129, path_buf1
|
addr_call adjust_filename_case, path_buf1
|
||||||
rts
|
rts
|
||||||
|
|
||||||
L6E45: lda #$00
|
L6E45: lda #$00
|
||||||
@@ -2954,8 +2968,8 @@ L6EC2: lda $D920
|
|||||||
tax
|
tax
|
||||||
tya
|
tya
|
||||||
jsr L5F0D
|
jsr L5F0D
|
||||||
L6EFB: addr_call L6129, $D3C1
|
L6EFB: addr_call adjust_filename_case, $D3C1
|
||||||
addr_call L6129, path_buf
|
addr_call adjust_filename_case, path_buf
|
||||||
lda $D3C1
|
lda $D3C1
|
||||||
cmp path_buf
|
cmp path_buf
|
||||||
bne L6F26
|
bne L6F26
|
||||||
|
@@ -125,7 +125,7 @@ L7137: lda $5028,x
|
|||||||
sta path_buf1,x
|
sta path_buf1,x
|
||||||
dex
|
dex
|
||||||
bpl L7137
|
bpl L7137
|
||||||
addr_call common_overlay::L6129, path_buf1 ; path_buf1
|
addr_call common_overlay::adjust_filename_case, path_buf1 ; path_buf1
|
||||||
lda #$01
|
lda #$01
|
||||||
sta path_buf2 ; path_buf2
|
sta path_buf2 ; path_buf2
|
||||||
lda #$06
|
lda #$06
|
||||||
|
@@ -17,7 +17,7 @@ L7000: stx L73A9
|
|||||||
jsr common_overlay::device_on_line
|
jsr common_overlay::device_on_line
|
||||||
lda path_buf0
|
lda path_buf0
|
||||||
beq L7056
|
beq L7056
|
||||||
addr_call common_overlay::L6129, path_buf0
|
addr_call common_overlay::adjust_filename_case, path_buf0
|
||||||
ldy path_buf0
|
ldy path_buf0
|
||||||
L7021: lda path_buf0,y
|
L7021: lda path_buf0,y
|
||||||
sta $5028,y
|
sta $5028,y
|
||||||
|
Reference in New Issue
Block a user