2018-03-05 05:36:00 +00:00
|
|
|
;;; ============================================================
|
2018-02-20 05:32:47 +00:00
|
|
|
;;; Overlay for File Copy
|
2018-03-05 05:36:00 +00:00
|
|
|
;;; ============================================================
|
2018-02-20 05:32:47 +00:00
|
|
|
|
2018-02-25 23:19:38 +00:00
|
|
|
.proc file_copy_overlay
|
2018-11-20 03:55:00 +00:00
|
|
|
.org $7000
|
2018-02-20 05:32:47 +00:00
|
|
|
|
2018-05-08 02:35:36 +00:00
|
|
|
L7000: jsr common_overlay::create_common_dialog
|
2018-02-20 05:32:47 +00:00
|
|
|
jsr L7052
|
2018-05-17 15:54:22 +00:00
|
|
|
jsr common_overlay::device_on_line
|
2018-02-26 03:02:34 +00:00
|
|
|
jsr common_overlay::L5F5B
|
|
|
|
jsr common_overlay::L6161
|
|
|
|
jsr common_overlay::L61B1
|
|
|
|
jsr common_overlay::L606D
|
2018-02-20 05:32:47 +00:00
|
|
|
jsr L7026
|
2018-12-18 15:43:47 +00:00
|
|
|
jsr common_overlay::jt_prep_path
|
|
|
|
jsr common_overlay::jt_redraw_input
|
|
|
|
copy #$FF, LD8EC
|
2018-02-26 03:02:34 +00:00
|
|
|
jmp common_overlay::L5106
|
2018-02-20 05:32:47 +00:00
|
|
|
|
2018-12-18 15:43:47 +00:00
|
|
|
L7026: ldx jt_source_filename
|
|
|
|
L7029: lda jt_source_filename+1,x
|
2018-05-17 15:54:22 +00:00
|
|
|
sta common_overlay::jump_table,x
|
2018-02-20 05:32:47 +00:00
|
|
|
dex
|
2018-12-18 15:43:47 +00:00
|
|
|
lda jt_source_filename+1,x
|
2018-05-17 15:54:22 +00:00
|
|
|
sta common_overlay::jump_table,x
|
2018-02-20 05:32:47 +00:00
|
|
|
dex
|
|
|
|
dex
|
|
|
|
bpl L7029
|
|
|
|
lda #$80
|
2018-11-23 17:56:53 +00:00
|
|
|
sta common_overlay::L5104
|
2018-02-20 05:32:47 +00:00
|
|
|
lda #$00
|
|
|
|
sta path_buf0
|
2018-11-23 17:56:53 +00:00
|
|
|
sta common_overlay::L51AE
|
2018-02-20 05:32:47 +00:00
|
|
|
lda #$01
|
|
|
|
sta path_buf2
|
|
|
|
lda #$06
|
2018-05-03 16:01:57 +00:00
|
|
|
sta path_buf2+1
|
2018-02-20 05:32:47 +00:00
|
|
|
rts
|
|
|
|
|
2018-03-15 04:10:08 +00:00
|
|
|
L7052: lda winfo_entrydlg
|
2018-05-18 06:54:10 +00:00
|
|
|
jsr common_overlay::set_port_for_window
|
2018-05-03 05:56:52 +00:00
|
|
|
addr_call common_overlay::L5E0A, copy_a_file_label
|
|
|
|
addr_call common_overlay::L5E57, source_filename_label
|
|
|
|
addr_call common_overlay::L5E6F, destination_filename_label
|
2018-03-02 02:25:42 +00:00
|
|
|
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR ; penXOR
|
2018-05-08 02:35:36 +00:00
|
|
|
MGTK_RELAY_CALL MGTK::FrameRect, common_input1_rect
|
|
|
|
MGTK_RELAY_CALL MGTK::FrameRect, common_input2_rect
|
2018-02-22 05:28:13 +00:00
|
|
|
MGTK_RELAY_CALL MGTK::InitPort, grafport3
|
|
|
|
MGTK_RELAY_CALL MGTK::SetPort, grafport3
|
2018-02-20 05:32:47 +00:00
|
|
|
rts
|
|
|
|
|
2018-12-18 15:43:47 +00:00
|
|
|
jt_source_filename:
|
2018-05-17 15:54:22 +00:00
|
|
|
.byte $29 ; length of following data block
|
|
|
|
jump_table_entry L70F1
|
|
|
|
jump_table_entry L71D8
|
2018-12-18 15:43:47 +00:00
|
|
|
jump_table_entry common_overlay::blink_f1_ip
|
|
|
|
jump_table_entry common_overlay::redraw_f1
|
|
|
|
jump_table_entry common_overlay::strip_f1_path_segment
|
|
|
|
jump_table_entry common_overlay::jt_handle_f1_tbd05
|
|
|
|
jump_table_entry common_overlay::prep_path_buf0
|
|
|
|
jump_table_entry common_overlay::handle_f1_other_key
|
|
|
|
jump_table_entry common_overlay::handle_f1_delete_key
|
|
|
|
jump_table_entry common_overlay::handle_f1_left_key
|
|
|
|
jump_table_entry common_overlay::handle_f1_right_key
|
|
|
|
jump_table_entry common_overlay::handle_f1_meta_left_key
|
|
|
|
jump_table_entry common_overlay::handle_f1_meta_right_key
|
|
|
|
jump_table_entry common_overlay::handle_f1_click
|
2018-02-20 05:32:47 +00:00
|
|
|
|
2018-12-18 15:43:47 +00:00
|
|
|
jt_destination_entries:
|
2018-05-17 15:54:22 +00:00
|
|
|
.byte $29 ; length of following data block
|
|
|
|
jump_table_entry L7189
|
|
|
|
jump_table_entry L71F9
|
2018-12-18 15:43:47 +00:00
|
|
|
jump_table_entry common_overlay::blink_f2_ip
|
|
|
|
jump_table_entry common_overlay::redraw_f2
|
|
|
|
jump_table_entry common_overlay::strip_f2_path_segment
|
|
|
|
jump_table_entry common_overlay::jt_handle_f2_tbd05
|
|
|
|
jump_table_entry common_overlay::prep_path_buf1
|
|
|
|
jump_table_entry common_overlay::handle_f2_other_key
|
|
|
|
jump_table_entry common_overlay::handle_f2_delete_key
|
|
|
|
jump_table_entry common_overlay::handle_f2_left_key
|
|
|
|
jump_table_entry common_overlay::handle_f2_right_key
|
|
|
|
jump_table_entry common_overlay::handle_f2_meta_left_key
|
|
|
|
jump_table_entry common_overlay::handle_f2_meta_right_key
|
|
|
|
jump_table_entry common_overlay::handle_f2_click
|
2018-02-20 05:32:47 +00:00
|
|
|
|
2018-03-05 05:36:00 +00:00
|
|
|
;;; ============================================================
|
2018-02-20 05:32:47 +00:00
|
|
|
|
|
|
|
L70F1: lda #1
|
|
|
|
sta path_buf2
|
|
|
|
lda #$20
|
2018-05-03 16:01:57 +00:00
|
|
|
sta path_buf2+1
|
2018-12-18 15:43:47 +00:00
|
|
|
jsr common_overlay::jt_redraw_input
|
2018-02-20 05:32:47 +00:00
|
|
|
|
2018-12-18 15:43:47 +00:00
|
|
|
ldx jt_destination_entries
|
|
|
|
: lda jt_destination_entries+1,x
|
2018-11-23 17:56:53 +00:00
|
|
|
sta common_overlay::jump_table,x
|
2018-02-20 05:32:47 +00:00
|
|
|
dex
|
2018-12-18 15:43:47 +00:00
|
|
|
lda jt_destination_entries+1,x
|
2018-11-23 17:56:53 +00:00
|
|
|
sta common_overlay::jump_table,x
|
2018-02-20 05:32:47 +00:00
|
|
|
dex
|
|
|
|
dex
|
|
|
|
bpl :-
|
|
|
|
|
|
|
|
lda #$80
|
2018-11-23 17:50:47 +00:00
|
|
|
sta common_overlay::L50A8
|
2018-11-23 17:56:53 +00:00
|
|
|
sta common_overlay::L51AE
|
|
|
|
lda LD920
|
|
|
|
sta LD921
|
2018-02-20 05:32:47 +00:00
|
|
|
lda #$FF
|
2018-11-23 17:56:53 +00:00
|
|
|
sta LD920
|
2018-05-17 15:54:22 +00:00
|
|
|
jsr common_overlay::device_on_line
|
2018-02-26 03:02:34 +00:00
|
|
|
jsr common_overlay::L5F5B
|
|
|
|
jsr common_overlay::L6161
|
|
|
|
jsr common_overlay::L61B1
|
2018-02-20 05:32:47 +00:00
|
|
|
|
2018-02-26 03:02:34 +00:00
|
|
|
jsr common_overlay::L606D
|
2018-11-23 17:50:47 +00:00
|
|
|
ldx common_overlay::path_buf
|
|
|
|
L7137: lda common_overlay::path_buf,x
|
2018-02-20 05:32:47 +00:00
|
|
|
sta path_buf1,x
|
|
|
|
dex
|
|
|
|
bpl L7137
|
2018-12-15 20:17:26 +00:00
|
|
|
addr_call desktop_main::adjust_case, path_buf1
|
2018-02-20 05:32:47 +00:00
|
|
|
lda #$01
|
2018-12-15 20:17:26 +00:00
|
|
|
sta path_buf2
|
2018-02-20 05:32:47 +00:00
|
|
|
lda #$06
|
2018-05-03 16:01:57 +00:00
|
|
|
sta path_buf2+1
|
2018-02-20 05:32:47 +00:00
|
|
|
ldx path_buf0
|
|
|
|
beq L7178
|
|
|
|
L7156: lda path_buf0,x
|
2018-06-02 01:52:26 +00:00
|
|
|
and #CHAR_MASK
|
2018-02-20 05:32:47 +00:00
|
|
|
cmp #'/'
|
|
|
|
beq L7162
|
|
|
|
dex
|
|
|
|
bne L7156
|
2018-02-21 04:36:46 +00:00
|
|
|
L7162: ldy #2
|
2018-02-20 05:32:47 +00:00
|
|
|
dex
|
|
|
|
L7165: cpx path_buf0
|
|
|
|
beq L7178
|
|
|
|
inx
|
|
|
|
lda path_buf0,x
|
|
|
|
sta path_buf2,y
|
|
|
|
inc path_buf2
|
|
|
|
iny
|
|
|
|
jmp L7165
|
|
|
|
|
2018-12-18 15:43:47 +00:00
|
|
|
L7178: jsr common_overlay::jt_redraw_input
|
2018-11-23 17:56:53 +00:00
|
|
|
lda LD8F0
|
|
|
|
sta LD8F1
|
|
|
|
lda LD8F2
|
|
|
|
sta LD8F0
|
2018-02-20 05:32:47 +00:00
|
|
|
rts
|
|
|
|
|
|
|
|
.byte 0
|
|
|
|
|
2018-03-05 05:36:00 +00:00
|
|
|
;;; ============================================================
|
2018-02-20 05:32:47 +00:00
|
|
|
|
2018-02-26 03:02:34 +00:00
|
|
|
L7189: addr_call common_overlay::L647C, path_buf0
|
2018-02-20 05:32:47 +00:00
|
|
|
beq L7198
|
2018-12-23 20:51:03 +00:00
|
|
|
L7192: lda #ERR_INVALID_PATHNAME
|
2018-02-25 07:19:29 +00:00
|
|
|
jsr JUMP_TABLE_ALERT_0
|
2018-02-20 05:32:47 +00:00
|
|
|
rts
|
|
|
|
|
2018-02-26 03:02:34 +00:00
|
|
|
L7198: addr_call common_overlay::L647C, path_buf1
|
2018-02-20 05:32:47 +00:00
|
|
|
bne L7192
|
2018-03-15 03:38:47 +00:00
|
|
|
MGTK_RELAY_CALL MGTK::CloseWindow, winfo_entrydlg_file_picker
|
2018-03-15 04:10:08 +00:00
|
|
|
MGTK_RELAY_CALL MGTK::CloseWindow, winfo_entrydlg
|
2018-12-18 15:43:47 +00:00
|
|
|
copy #0, common_overlay::L50A8
|
|
|
|
copy #0, LD8EC
|
2018-05-03 16:01:57 +00:00
|
|
|
jsr common_overlay::set_cursor_pointer
|
2018-02-25 21:47:06 +00:00
|
|
|
copy16 #path_buf0, $6
|
2018-02-20 05:32:47 +00:00
|
|
|
copy16 #path_buf1, $8
|
2018-11-23 17:56:53 +00:00
|
|
|
ldx common_overlay::stash_stack
|
2018-02-20 05:32:47 +00:00
|
|
|
txs
|
2018-02-24 05:11:20 +00:00
|
|
|
return #$00
|
2018-02-20 05:32:47 +00:00
|
|
|
|
|
|
|
.byte 0
|
|
|
|
|
2018-03-05 05:36:00 +00:00
|
|
|
;;; ============================================================
|
2018-02-20 05:32:47 +00:00
|
|
|
|
2018-03-15 03:38:47 +00:00
|
|
|
L71D8: MGTK_RELAY_CALL MGTK::CloseWindow, winfo_entrydlg_file_picker
|
2018-03-15 04:10:08 +00:00
|
|
|
MGTK_RELAY_CALL MGTK::CloseWindow, winfo_entrydlg
|
2018-02-20 05:32:47 +00:00
|
|
|
lda #0
|
2018-11-23 17:56:53 +00:00
|
|
|
sta LD8EC
|
2018-05-03 16:01:57 +00:00
|
|
|
jsr common_overlay::set_cursor_pointer
|
2018-11-23 17:56:53 +00:00
|
|
|
ldx common_overlay::stash_stack
|
2018-02-20 05:32:47 +00:00
|
|
|
txs
|
2018-02-24 05:11:20 +00:00
|
|
|
return #$FF
|
2018-02-20 05:32:47 +00:00
|
|
|
|
2018-03-05 05:36:00 +00:00
|
|
|
;;; ============================================================
|
2018-02-20 05:32:47 +00:00
|
|
|
|
|
|
|
L71F9: lda #1
|
|
|
|
sta path_buf2
|
|
|
|
lda #' '
|
2018-05-03 16:01:57 +00:00
|
|
|
sta path_buf2+1
|
2018-12-18 15:43:47 +00:00
|
|
|
jsr common_overlay::jt_redraw_input
|
|
|
|
ldx jt_source_filename
|
|
|
|
L7209: lda jt_source_filename+1,x
|
2018-11-23 17:56:53 +00:00
|
|
|
sta common_overlay::jump_table,x
|
2018-02-20 05:32:47 +00:00
|
|
|
dex
|
2018-12-18 15:43:47 +00:00
|
|
|
lda jt_source_filename+1,x
|
2018-11-23 17:56:53 +00:00
|
|
|
sta common_overlay::jump_table,x
|
2018-02-20 05:32:47 +00:00
|
|
|
dex
|
|
|
|
dex
|
|
|
|
bpl L7209
|
|
|
|
lda #$01
|
|
|
|
sta path_buf2
|
|
|
|
lda #$06
|
2018-05-03 16:01:57 +00:00
|
|
|
sta path_buf2+1
|
2018-02-20 05:32:47 +00:00
|
|
|
lda #$00
|
2018-11-23 17:50:47 +00:00
|
|
|
sta common_overlay::L50A8
|
2018-02-20 05:32:47 +00:00
|
|
|
lda #$FF
|
2018-11-23 17:56:53 +00:00
|
|
|
sta LD920
|
2018-02-20 05:32:47 +00:00
|
|
|
lda #$00
|
2018-11-23 17:56:53 +00:00
|
|
|
sta common_overlay::L51AE
|
|
|
|
lda LD8F0
|
|
|
|
sta LD8F2
|
|
|
|
lda LD8F1
|
|
|
|
sta LD8F0
|
2018-02-20 05:32:47 +00:00
|
|
|
|
|
|
|
ldx path_buf0
|
|
|
|
: lda path_buf0,x
|
2018-11-23 17:50:47 +00:00
|
|
|
sta common_overlay::path_buf,x
|
2018-02-20 05:32:47 +00:00
|
|
|
dex
|
|
|
|
bpl :-
|
|
|
|
|
2018-02-26 03:02:34 +00:00
|
|
|
jsr common_overlay::L5F49
|
2018-11-23 17:56:53 +00:00
|
|
|
bit LD8F0
|
2018-02-20 05:32:47 +00:00
|
|
|
bpl L726D
|
2018-05-17 15:54:22 +00:00
|
|
|
jsr common_overlay::device_on_line
|
2018-02-21 04:36:46 +00:00
|
|
|
lda #0
|
2018-02-26 03:02:34 +00:00
|
|
|
jsr common_overlay::L6227
|
|
|
|
jsr common_overlay::L5F5B
|
|
|
|
jsr common_overlay::L6161
|
|
|
|
jsr common_overlay::L61B1
|
|
|
|
jsr common_overlay::L606D
|
2018-12-18 15:43:47 +00:00
|
|
|
jsr common_overlay::jt_redraw_input
|
2018-02-20 05:32:47 +00:00
|
|
|
jmp L7295
|
|
|
|
|
2018-11-23 17:50:47 +00:00
|
|
|
L726D: lda common_overlay::path_buf
|
2018-02-20 05:32:47 +00:00
|
|
|
bne L7281
|
2018-05-17 15:54:22 +00:00
|
|
|
L7272: jsr common_overlay::device_on_line
|
2018-02-20 05:32:47 +00:00
|
|
|
lda #$00
|
2018-02-26 03:02:34 +00:00
|
|
|
jsr common_overlay::L6227
|
|
|
|
jsr common_overlay::L5F5B
|
2018-02-20 05:32:47 +00:00
|
|
|
lda #$FF
|
|
|
|
bne L7289
|
2018-02-26 03:02:34 +00:00
|
|
|
L7281: jsr common_overlay::L5F5B
|
2018-02-20 05:32:47 +00:00
|
|
|
bcs L7272
|
2018-11-23 17:56:53 +00:00
|
|
|
lda LD921
|
|
|
|
L7289: sta LD920
|
2018-02-26 03:02:34 +00:00
|
|
|
jsr common_overlay::L6163
|
|
|
|
jsr common_overlay::L61B1
|
|
|
|
jsr common_overlay::L606D
|
2018-02-20 05:32:47 +00:00
|
|
|
L7295: rts
|
|
|
|
|
2018-03-05 05:36:00 +00:00
|
|
|
;;; ============================================================
|
2018-02-25 23:19:38 +00:00
|
|
|
|
2018-02-20 05:32:47 +00:00
|
|
|
PAD_TO $7800
|
2018-11-22 04:24:30 +00:00
|
|
|
|
2018-02-25 23:19:38 +00:00
|
|
|
.endproc ; file_copy_overlay
|