Disk Copy Overlay disasm

This commit is contained in:
Joshua Bell 2018-11-21 12:11:35 -08:00
parent 27fd1d1677
commit 83e16b5ad8

View File

@ -252,25 +252,26 @@ fontptr: .addr DEFAULT_FONT
nextwinfo: .addr 0 nextwinfo: .addr 0
.endproc .endproc
rect_D201: DEFINE_RECT 4, 2, 496, 148 rect_outer_frame: DEFINE_RECT 4, 2, 496, 148
rect_D209: DEFINE_RECT 5, 3, 495, 147 rect_inner_frame: DEFINE_RECT 5, 3, 495, 147
rect_D211: DEFINE_RECT 6, 20, 494, 102 rect_D211: DEFINE_RECT 6, 20, 494, 102
rect_D219: DEFINE_RECT 6, 103, 494, 145 rect_D219: DEFINE_RECT 6, 103, 494, 145
rect_D221: DEFINE_RECT 350, 90, 450, 101 rect_D221: DEFINE_RECT 350, 90, 450, 101
rect_D229: DEFINE_RECT 210, 90, 310, 101 rect_D229: DEFINE_RECT 210, 90, 310, 101
point_D231: DEFINE_POINT 355, 100 point_ok_label: DEFINE_POINT 355, 100
str_ok_label: str_ok_label:
PASCAL_STRING {"OK ",CHAR_RETURN} PASCAL_STRING {"OK ",CHAR_RETURN}
point_D245: DEFINE_POINT 215, 100 ;;; Label positions
point_read_drive: DEFINE_POINT 215, 100
point_D249: DEFINE_POINT 0, 15 point_D249: DEFINE_POINT 0, 15
point_D24D: DEFINE_POINT 20, 28 point_slot_drive_name: DEFINE_POINT 20, 28
point_D251: DEFINE_POINT 270, 46 point_select_source: DEFINE_POINT 270, 46
rect_D255: DEFINE_RECT 270, 38, 420, 46 rect_D255: DEFINE_RECT 270, 38, 420, 46
point_D25D: DEFINE_POINT 210, 68 point_formatting: DEFINE_POINT 210, 68
point_D261: DEFINE_POINT 210, 68 point_writing: DEFINE_POINT 210, 68
point_D265: DEFINE_POINT 210, 68 point_reading: DEFINE_POINT 210, 68
str_read_drive: str_read_drive:
PASCAL_STRING "Read Drive D" PASCAL_STRING "Read Drive D"
@ -360,19 +361,20 @@ LD451: .byte 0, 1, 0
str_2_spaces: PASCAL_STRING " " str_2_spaces: PASCAL_STRING " "
str_7_spaces: PASCAL_STRING " " str_7_spaces: PASCAL_STRING " "
point_D45F: DEFINE_POINT 300, 125 ;;; Label positions
point_D463: DEFINE_POINT 300, 135 point_blocks_read: DEFINE_POINT 300, 125
point_D467: DEFINE_POINT 300, 115 point_blocks_written: DEFINE_POINT 300, 135
point_D46B: DEFINE_POINT 40, 125 point_source: DEFINE_POINT 300, 115
point_D46F: DEFINE_POINT 110, 125 point_source2: DEFINE_POINT 40, 125
point_D473: DEFINE_POINT 40, 135 point_slot_drive: DEFINE_POINT 110, 125
point_D477: DEFINE_POINT 110, 135 point_destination: DEFINE_POINT 40, 135
point_D47B: DEFINE_POINT 40, 115 point_slot_drive2: DEFINE_POINT 110, 135
point_D47F: DEFINE_POINT 20, 145 point_disk_copy: DEFINE_POINT 40, 115
point_select_quit: DEFINE_POINT 20, 145
rect_D483: DEFINE_RECT 20, 136, 400, 145 rect_D483: DEFINE_RECT 20, 136, 400, 145
point_D48B: DEFINE_POINT 300, 145 point_escape_stop_copy: DEFINE_POINT 300, 145
point_D48F: DEFINE_POINT 40, 100 point_error_writing: DEFINE_POINT 40, 100
point_D493: DEFINE_POINT 40, 90 point_error_reading: DEFINE_POINT 40, 90
slot_char: .byte 10 slot_char: .byte 10
drive_char: .byte 14 drive_char: .byte 14
@ -533,7 +535,7 @@ LD687: lda LD363
jsr LE137 jsr LE137
MGTK_RELAY_CALL2 MGTK::SetPenMode, pencopy MGTK_RELAY_CALL2 MGTK::SetPenMode, pencopy
MGTK_RELAY_CALL2 MGTK::PaintRect, rect_D255 MGTK_RELAY_CALL2 MGTK::PaintRect, rect_D255
MGTK_RELAY_CALL2 MGTK::MoveTo, point_D251 MGTK_RELAY_CALL2 MGTK::MoveTo, point_select_source
addr_call draw_text, str_select_destination addr_call draw_text, str_select_destination
jsr LE559 jsr LE559
jsr LE2B1 jsr LE2B1
@ -689,7 +691,7 @@ LD852: ldx LD418
jsr LEB84 jsr LEB84
jmp LD61C jmp LD61C
LD87C: MGTK_RELAY_CALL2 MGTK::MoveTo, point_D25D LD87C: MGTK_RELAY_CALL2 MGTK::MoveTo, point_formatting
addr_call draw_text, str_formatting addr_call draw_text, str_formatting
jsr L0CAF jsr L0CAF
bcc LD8A9 bcc LD8A9
@ -1378,8 +1380,8 @@ LDFA0: MGTK_RELAY_CALL2 MGTK::OpenWindow, winfo_dialog
lda winfo_dialog::window_id lda winfo_dialog::window_id
jsr LE137 jsr LE137
MGTK_RELAY_CALL2 MGTK::SetPenMode, penXOR MGTK_RELAY_CALL2 MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL2 MGTK::FrameRect, rect_D201 MGTK_RELAY_CALL2 MGTK::FrameRect, rect_outer_frame
MGTK_RELAY_CALL2 MGTK::FrameRect, rect_D209 MGTK_RELAY_CALL2 MGTK::FrameRect, rect_inner_frame
MGTK_RELAY_CALL2 MGTK::InitPort, grafport MGTK_RELAY_CALL2 MGTK::InitPort, grafport
MGTK_RELAY_CALL2 MGTK::SetPort, grafport MGTK_RELAY_CALL2 MGTK::SetPort, grafport
@ -1401,22 +1403,22 @@ LE014: MGTK_RELAY_CALL2 MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL2 MGTK::FrameRect, rect_D229 MGTK_RELAY_CALL2 MGTK::FrameRect, rect_D229
jsr LE078 jsr LE078
jsr LE089 jsr LE089
MGTK_RELAY_CALL2 MGTK::MoveTo, point_D24D MGTK_RELAY_CALL2 MGTK::MoveTo, point_slot_drive_name
addr_call draw_text, str_slot_drive_name addr_call draw_text, str_slot_drive_name
MGTK_RELAY_CALL2 MGTK::MoveTo, point_D251 MGTK_RELAY_CALL2 MGTK::MoveTo, point_select_source
addr_call draw_text, str_select_source addr_call draw_text, str_select_source
MGTK_RELAY_CALL2 MGTK::MoveTo, point_D47F MGTK_RELAY_CALL2 MGTK::MoveTo, point_select_quit
addr_call draw_text, str_select_quit addr_call draw_text, str_select_quit
MGTK_RELAY_CALL2 MGTK::InitPort, grafport MGTK_RELAY_CALL2 MGTK::InitPort, grafport
MGTK_RELAY_CALL2 MGTK::SetPort, grafport MGTK_RELAY_CALL2 MGTK::SetPort, grafport
rts rts
LE078: MGTK_RELAY_CALL2 MGTK::MoveTo, point_D231 LE078: MGTK_RELAY_CALL2 MGTK::MoveTo, point_ok_label
addr_call draw_text, str_ok_label addr_call draw_text, str_ok_label
rts rts
LE089: MGTK_RELAY_CALL2 MGTK::MoveTo, point_D245 LE089: MGTK_RELAY_CALL2 MGTK::MoveTo, point_read_drive
addr_call draw_text, str_read_drive addr_call draw_text, str_read_drive
rts rts
@ -1921,13 +1923,13 @@ LE483: .byte 0
LE491: lda winfo_dialog::window_id LE491: lda winfo_dialog::window_id
jsr LE137 jsr LE137
MGTK_RELAY_CALL2 MGTK::MoveTo, point_D261 MGTK_RELAY_CALL2 MGTK::MoveTo, point_writing
addr_call draw_text, str_writing addr_call draw_text, str_writing
rts rts
LE4A8: lda winfo_dialog::window_id LE4A8: lda winfo_dialog::window_id
jsr LE137 jsr LE137
MGTK_RELAY_CALL2 MGTK::MoveTo, point_D265 MGTK_RELAY_CALL2 MGTK::MoveTo, point_reading
addr_call draw_text, str_reading addr_call draw_text, str_reading
rts rts
@ -1940,13 +1942,13 @@ LE4BF: lda winfo_dialog::window_id
tax tax
lda LD407,y lda LD407,y
jsr LDEEB jsr LDEEB
MGTK_RELAY_CALL2 MGTK::MoveTo, point_D467 MGTK_RELAY_CALL2 MGTK::MoveTo, point_source
addr_call draw_text, str_blocks_to_transfer addr_call draw_text, str_blocks_to_transfer
addr_call draw_text, str_7_spaces addr_call draw_text, str_7_spaces
rts rts
LE4EC: jsr LE522 LE4EC: jsr LE522
MGTK_RELAY_CALL2 MGTK::MoveTo, point_D45F MGTK_RELAY_CALL2 MGTK::MoveTo, point_blocks_read
addr_call draw_text, str_blocks_read addr_call draw_text, str_blocks_read
.byte $A9 .byte $A9
LE500: .byte $57 LE500: .byte $57
@ -1955,7 +1957,7 @@ LE500: .byte $57
rts rts
LE507: jsr LE522 LE507: jsr LE522
MGTK_RELAY_CALL2 MGTK::MoveTo, point_D463 MGTK_RELAY_CALL2 MGTK::MoveTo, point_blocks_written
addr_call draw_text, str_blocks_written addr_call draw_text, str_blocks_written
addr_call draw_text, str_7_spaces addr_call draw_text, str_7_spaces
rts rts
@ -1991,7 +1993,7 @@ LE550: .byte $07
LE558: .byte 0 LE558: .byte 0
LE559: lda winfo_dialog::window_id LE559: lda winfo_dialog::window_id
jsr LE137 jsr LE137
MGTK_RELAY_CALL2 MGTK::MoveTo, point_D46B MGTK_RELAY_CALL2 MGTK::MoveTo, point_source2
addr_call draw_text, str_source addr_call draw_text, str_source
ldx LD417 ldx LD417
lda LD3F7,x lda LD3F7,x
@ -2012,7 +2014,7 @@ LE559: lda winfo_dialog::window_id
clc clc
adc #'1' adc #'1'
sta str_d + 1 sta str_d + 1
MGTK_RELAY_CALL2 MGTK::MoveTo, point_D46F MGTK_RELAY_CALL2 MGTK::MoveTo, point_slot_drive
addr_call draw_text, str_slot addr_call draw_text, str_slot
addr_call draw_text, str_s addr_call draw_text, str_s
addr_call draw_text, str_drive addr_call draw_text, str_drive
@ -2036,7 +2038,7 @@ LE5D0: lda $1300,x
LE5E1: lda winfo_dialog::window_id LE5E1: lda winfo_dialog::window_id
jsr LE137 jsr LE137
MGTK_RELAY_CALL2 MGTK::MoveTo, point_D473 MGTK_RELAY_CALL2 MGTK::MoveTo, point_destination
addr_call draw_text, str_destination addr_call draw_text, str_destination
ldx LD418 ldx LD418
lda LD3F7,x lda LD3F7,x
@ -2056,7 +2058,7 @@ LE5E1: lda winfo_dialog::window_id
clc clc
adc #'1' adc #'1'
sta str_d + 1 sta str_d + 1
MGTK_RELAY_CALL2 MGTK::MoveTo, point_D477 MGTK_RELAY_CALL2 MGTK::MoveTo, point_slot_drive2
addr_call draw_text, str_slot addr_call draw_text, str_slot
addr_call draw_text, str_s addr_call draw_text, str_s
addr_call draw_text, str_drive addr_call draw_text, str_drive
@ -2065,7 +2067,7 @@ LE5E1: lda winfo_dialog::window_id
LE63F: lda winfo_dialog::window_id LE63F: lda winfo_dialog::window_id
jsr LE137 jsr LE137
MGTK_RELAY_CALL2 MGTK::MoveTo, point_D47B MGTK_RELAY_CALL2 MGTK::MoveTo, point_disk_copy
bit LD44D bit LD44D
bmi LE65B bmi LE65B
addr_call draw_text, str_prodos_disk_copy addr_call draw_text, str_prodos_disk_copy
@ -2092,7 +2094,7 @@ LE693: rts
LE694: lda winfo_dialog::window_id LE694: lda winfo_dialog::window_id
jsr LE137 jsr LE137
MGTK_RELAY_CALL2 MGTK::MoveTo, point_D48B MGTK_RELAY_CALL2 MGTK::MoveTo, point_escape_stop_copy
addr_call draw_text, str_escape_stop_copy addr_call draw_text, str_escape_stop_copy
rts rts
@ -2108,7 +2110,7 @@ LE6BB: dec LE6FB
MGTK_RELAY_CALL2 MGTK::SetTextBG, bg_white MGTK_RELAY_CALL2 MGTK::SetTextBG, bg_white
beq LE6DE beq LE6DE
LE6D5: MGTK_RELAY_CALL2 MGTK::SetTextBG, bg_black LE6D5: MGTK_RELAY_CALL2 MGTK::SetTextBG, bg_black
LE6DE: MGTK_RELAY_CALL2 MGTK::MoveTo, point_D48B LE6DE: MGTK_RELAY_CALL2 MGTK::MoveTo, point_escape_stop_copy
addr_call draw_text, str_escape_stop_copy addr_call draw_text, str_escape_stop_copy
jmp LE6BB jmp LE6BB
@ -2139,12 +2141,12 @@ LE71A: jsr L127E
jsr LDEEB jsr LDEEB
lda LE765 lda LE765
bne LE74B bne LE74B
MGTK_RELAY_CALL2 MGTK::MoveTo, point_D493 MGTK_RELAY_CALL2 MGTK::MoveTo, point_error_reading
addr_call draw_text, str_error_reading addr_call draw_text, str_error_reading
addr_call draw_text, str_7_spaces addr_call draw_text, str_7_spaces
return #$00 return #$00
LE74B: MGTK_RELAY_CALL2 MGTK::MoveTo, point_D48F LE74B: MGTK_RELAY_CALL2 MGTK::MoveTo, point_error_writing
addr_call draw_text, str_error_writing addr_call draw_text, str_error_writing
addr_call draw_text, str_7_spaces addr_call draw_text, str_7_spaces
return #$00 return #$00
@ -2292,47 +2294,60 @@ cancel_pos: DEFINE_POINT 25, 47
LE93D: DEFINE_POINT 100, 24 LE93D: DEFINE_POINT 100, 24
LE941: .byte 0 LE941: .byte 0
LE942: .byte 0 LE942: .addr 0
LE943: .byte 0
LE944: PASCAL_STRING "Insert source disk and click OK." str_insert_source:
LE965: PASCAL_STRING "Insert destination disk and click OK." PASCAL_STRING "Insert source disk and click OK."
LE98B: PASCAL_STRING "Do you want to erase " str_insert_dest:
LE9A0 := *-1 PASCAL_STRING "Insert destination disk and click OK."
str_confirm_erase0:
PASCAL_STRING "Do you want to erase "
LE9A1: .res 18, 0
str_dest_format_fail:
PASCAL_STRING "The destination disk cannot be formated !"
str_format_error:
PASCAL_STRING "Error during formating."
str_dest_protected:
PASCAL_STRING "The destination volume is write protected !"
str_confirm_erase1:
PASCAL_STRING "Do you want to erase "
.res 18, 0 .res 18, 0
LE9B3: PASCAL_STRING "The destination disk cannot be formated !" str_confirm_erase2:
LE9DD: PASCAL_STRING "Error during formating." PASCAL_STRING "Do you want to erase the disk in slot drive ?"
LE9F5: PASCAL_STRING "The destination volume is write protected !" str_confirm_erase3:
LEA21: PASCAL_STRING "Do you want to erase " PASCAL_STRING "Do you want to erase the disk in slot drive ?"
.res 18, 0 str_copy_success:
LEA49: PASCAL_STRING "Do you want to erase the disk in slot drive ?" PASCAL_STRING "The copy was successful."
LEA7D: PASCAL_STRING "Do you want to erase the disk in slot drive ?" str_copy_fail:
LEAAF: PASCAL_STRING "The copy was successful." PASCAL_STRING "The copy was not completed."
LEAC8: PASCAL_STRING "The copy was not completed." str_insert_source_or_cancel:
LEAE4: PASCAL_STRING "Insert source disk or press Escape to cancel." PASCAL_STRING "Insert source disk or press Escape to cancel."
LEB12: PASCAL_STRING "Insert destination disk or press Escape to cancel." str_insert_dest_or_cancel:
PASCAL_STRING "Insert destination disk or press Escape to cancel."
LEB45: .byte $20 char_space:
LEB46: .byte $3F .byte ' '
char_question_mark:
.byte '?'
slot_char_LEA49: .byte $29 slot_char_str_confirm_erase2: .byte 41
drive_char_LEA49: .byte $31 drive_char_str_confirm_erase2: .byte 49
slot_char_LEA7D: .byte $27 slot_char_str_confirm_erase3: .byte 39
drive_char_LEA7D: .byte $2F drive_char_str_confirm_erase3: .byte 47
LEB4B: .byte $17 len_confirm_erase0: .byte 23
LEB4C: .byte $15 len_confirm_erase1: .byte 21
LEB4D: .byte 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 LEB4D: .byte 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
LEB5A: .addr LE944, LE965 LEB5A: .addr str_insert_source, str_insert_dest
.addr LE98B, LE9B3 .addr str_confirm_erase0, str_dest_format_fail
.addr LE9DD, LE9F5 .addr str_format_error, str_dest_protected
.addr LEA21, LEA49 .addr str_confirm_erase1, str_confirm_erase2
.addr LEA7D, LEAAF .addr str_confirm_erase3, str_copy_success
.addr LEAC8, LEAE4 .addr str_copy_fail, str_insert_source_or_cancel
.addr LEB12 .addr str_insert_dest_or_cancel
LEB74: .byte $C0, $C0, $81, $00, $80, $80, $81, $81 LEB74: .byte $C0, $C0, $81, $00, $80, $80, $81, $81
.byte $81, $00, $00, $00, $00 .byte $81, $00, $00, $00, $00
@ -2411,7 +2426,7 @@ LEC6C: tya
lda LEB5A,y lda LEB5A,y
sta LE942 sta LE942
lda LEB5A+1,y lda LEB5A+1,y
sta LE943 sta LE942+1
tya tya
lsr a lsr a
tay tay
@ -2456,14 +2471,14 @@ draw_ok_btn:
LED23: MGTK_RELAY_CALL2 MGTK::MoveTo, LE93D LED23: MGTK_RELAY_CALL2 MGTK::MoveTo, LE93D
addr_call_indirect draw_text, LE942 addr_call_indirect draw_text, LE942
LED35: bit LD41E LED35: bit LD41E
bpl $ED45 bpl LED45
jsr LF192 jsr LF192
bne LED42 bne LED42
jmp LEDF2 jmp LEDF2
LED42: jmp LED79 LED42: jmp LED79
MGTK_RELAY_CALL2 MGTK::GetEvent, event_params LED45: MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
lda event_kind lda event_kind
cmp #MGTK::EventKind::button_down cmp #MGTK::EventKind::button_down
bne LED58 bne LED58
@ -2776,22 +2791,22 @@ LF0E9: stx $06
pha pha
tay tay
LF0F3: lda ($06),y LF0F3: lda ($06),y
sta LE9A0,y sta LE9A1-1,y
dey dey
bne LF0F3 bne LF0F3
pla pla
clc clc
adc LEB4B adc len_confirm_erase0
sta LE98B sta str_confirm_erase0
tay tay
inc LE98B inc str_confirm_erase0
inc LE98B inc str_confirm_erase0
lda LEB45 lda char_space
iny iny
sta LE98B,y sta str_confirm_erase0,y
lda LEB46 lda char_question_mark
iny iny
sta LE98B,y sta str_confirm_erase0,y
rts rts
LF119: stx $06 LF119: stx $06
@ -2806,17 +2821,17 @@ LF123: lda ($06),y
bne LF123 bne LF123
pla pla
clc clc
adc LEB4C adc len_confirm_erase1
sta $EA21 sta str_confirm_erase1
tay tay
inc $EA21 inc str_confirm_erase1
inc $EA21 inc str_confirm_erase1
lda LEB45 lda char_space
iny iny
sta $EA21,y sta str_confirm_erase1,y
lda LEB46 lda char_question_mark
iny iny
sta $EA21,y sta str_confirm_erase1,y
rts rts
LF149: txa LF149: txa
@ -2827,15 +2842,15 @@ LF149: txa
lsr a lsr a
clc clc
adc #'0' adc #'0'
ldy slot_char_LEA49 ldy slot_char_str_confirm_erase2
sta LEA49,y sta str_confirm_erase2,y
txa txa
and #$80 and #$80
asl a asl a
rol a rol a
adc #$31 adc #$31
ldy drive_char_LEA49 ldy drive_char_str_confirm_erase2
sta LEA49,y sta str_confirm_erase2,y
rts rts
LF167: txa LF167: txa
@ -2846,15 +2861,15 @@ LF167: txa
lsr a lsr a
clc clc
adc #'0' adc #'0'
ldy slot_char_LEA7D ldy slot_char_str_confirm_erase3
sta LEA7D,y sta str_confirm_erase3,y
txa txa
and #$80 and #$80
asl a asl a
rol a rol a
adc #$31 adc #$31
ldy drive_char_LEA7D ldy drive_char_str_confirm_erase3
sta LEA7D,y sta str_confirm_erase3,y
rts rts
LF185: sty LD41D LF185: sty LD41D