Disk Copy Overlay disasm

This commit is contained in:
Joshua Bell 2018-11-21 21:00:49 -08:00
parent 1d6a8208c9
commit 6454d5fae0
2 changed files with 114 additions and 102 deletions

View File

@ -6,6 +6,21 @@
.org $D000 .org $D000
.scope disk_copy_overlay4 .scope disk_copy_overlay4
.scope on_line_params2
unit_num := $0C42
.endscope
.scope on_line_params
unit_num := $0C46
.endscope
on_line_buffer := $0C49
.scope block_params
unit_num := $0C5A
data_buffer := $0C5B
block_num := $0C5D
.endscope
just_rts := $0C83
quit := $0C84
L0CAF := $0CAF L0CAF := $0CAF
eject_disk := $0CED eject_disk := $0CED
L0D26 := $0D26 L0D26 := $0D26
@ -22,10 +37,6 @@ L12A5 := $12A5
L12AF := $12AF L12AF := $12AF
.endscope .endscope
;; Where is this coming from ???
L51ED := $51ED
.macro MGTK_RELAY_CALL2 call, params .macro MGTK_RELAY_CALL2 call, params
.if .paramcount > 1 .if .paramcount > 1
yax_call MGTK_RELAY2, call, params yax_call MGTK_RELAY2, call, params
@ -340,16 +351,13 @@ str_d: PASCAL_STRING 0
str_s: PASCAL_STRING 0 str_s: PASCAL_STRING 0
LD41D: .byte 0 LD41D: .byte 0
LD41E: .byte 0 LD41E: .byte 0
.byte 0 LD41F: .byte 0
.byte 0 LD420: .byte 0
LD421: .byte 0 LD421: .word 0
LD422: .byte 0
LD423: .byte 0 LD423: .byte 0
.byte 0 LD424: .word 0
.byte 0 LD426: .byte 0
.byte 0 LD427: .word 0
.byte 0
.byte 0
LD429: .byte 0 LD429: .byte 0
rect_D42A: DEFINE_RECT 18, 20, 490, 88 rect_D42A: DEFINE_RECT 18, 20, 490, 88
@ -571,7 +579,7 @@ LD740: lda #$00
sta LD44D sta LD44D
ldx LD417 ldx LD417
lda LD3F7,x lda LD3F7,x
sta $0C42 sta disk_copy_overlay4::on_line_params2::unit_num
jsr disk_copy_overlay4::L1291 jsr disk_copy_overlay4::L1291
beq LD77E beq LD77E
cmp #$52 cmp #$52
@ -619,7 +627,7 @@ LD7AD: lda LD417
LD7CC: ldx LD418 LD7CC: ldx LD418
lda LD3F7,x lda LD3F7,x
sta $0C42 sta disk_copy_overlay4::on_line_params2::unit_num
jsr disk_copy_overlay4::L1291 jsr disk_copy_overlay4::L1291
beq LD7E1 beq LD7E1
cmp #$52 cmp #$52
@ -734,7 +742,7 @@ LD8A9: lda winfo_dialog::window_id
LD8DF: jsr disk_copy_overlay4::L0DB5 LD8DF: jsr disk_copy_overlay4::L0DB5
lda #$00 lda #$00
sta LD421 sta LD421
sta LD422 sta LD421+1
lda #$07 lda #$07
sta LD423 sta LD423
jsr LE4BF jsr LE4BF
@ -821,12 +829,12 @@ LD9BA: cmp #MGTK::EventKind::key_down
bne LD998 bne LD998
jmp LD9D5 jmp LD9D5
LD9C1: .addr $0C83 LD9C1: .addr disk_copy_overlay4::just_rts
.addr $0C83 .addr disk_copy_overlay4::just_rts
.addr $0C83 .addr disk_copy_overlay4::just_rts
.addr $0C83 .addr disk_copy_overlay4::just_rts
.addr $0C83 .addr disk_copy_overlay4::just_rts
.addr $0C84 .addr disk_copy_overlay4::quit
.addr LDA3C .addr LDA3C
.addr LDA77 .addr LDA77
@ -1173,11 +1181,11 @@ LDDC3: .byte 0
;;; ============================================================ ;;; ============================================================
LDDFC: sta $0C5A LDDFC: sta disk_copy_overlay4::block_params::unit_num
lda #$00 lda #$00
sta $0C5D sta disk_copy_overlay4::block_params::block_num
sta $0C5E sta disk_copy_overlay4::block_params::block_num+1
copy16 #$1C00, $0C5B copy16 #$1C00, disk_copy_overlay4::block_params::data_buffer
jsr disk_copy_overlay4::L12AF jsr disk_copy_overlay4::L12AF
beq LDE19 beq LDE19
return #$FF return #$FF
@ -1216,7 +1224,7 @@ LDE4D: cmp #$A5
lda $1C02 lda $1C02
cmp #$27 cmp #$27
bne LDE2E bne LDE2E
lda $0C5A lda disk_copy_overlay4::block_params::unit_num
and #$70 and #$70
lsr a lsr a
lsr a lsr a
@ -1226,7 +1234,7 @@ LDE4D: cmp #$A5
adc #'0' adc #'0'
ldx slot_char ldx slot_char
sta str_dos33_s_d,x sta str_dos33_s_d,x
lda $0C5A lda disk_copy_overlay4::block_params::unit_num
and #$80 and #$80
asl a asl a
rol a rol a
@ -1254,7 +1262,7 @@ LDE83: lda str_dos33_s_d,x
.byte 0 .byte 0
LDE9F: stax $06 LDE9F: stax $06
copy16 #$0002, $0C5D copy16 #$0002, disk_copy_overlay4::block_params::block_num
jsr disk_copy_overlay4::L12AF jsr disk_copy_overlay4::L12AF
beq LDEBE beq LDEBE
ldy #$00 ldy #$00
@ -1527,7 +1535,7 @@ LE14D: asl a ; * 8
LE16C: lda #$00 LE16C: lda #$00
sta LD44E sta LD44E
sta $0C42 sta disk_copy_overlay4::on_line_params2::unit_num
jsr disk_copy_overlay4::L1291 jsr disk_copy_overlay4::L1291
beq LE17A beq LE17A
.byte 0 .byte 0
@ -1970,7 +1978,7 @@ LE507: jsr LE522
LE522: lda winfo_dialog::window_id LE522: lda winfo_dialog::window_id
jsr LE137 jsr LE137
lda LD422 lda LD421+1
sta LE558 sta LE558
lda LD421 lda LD421
asl a asl a
@ -2138,8 +2146,8 @@ LE714: jsr disk_copy_overlay4::L10FB
LE71A: jsr disk_copy_overlay4::L127E LE71A: jsr disk_copy_overlay4::L127E
lda winfo_dialog::window_id lda winfo_dialog::window_id
jsr LE137 jsr LE137
lda $0C5D lda disk_copy_overlay4::block_params::block_num
ldx $0C5E ldx disk_copy_overlay4::block_params::block_num+1
jsr LDEEB jsr LDEEB
lda LE765 lda LE765
bne LE74B bne LE74B
@ -2159,7 +2167,7 @@ LE766: sta $06
stx $07 stx $07
stx $09 stx $09
inc $09 inc $09
copy16 #$1C00, $0C5B copy16 #$1C00, disk_copy_overlay4::block_params::data_buffer
LE77A: jsr disk_copy_overlay4::L12AF LE77A: jsr disk_copy_overlay4::L12AF
beq LE789 beq LE789
ldx #$00 ldx #$00
@ -2188,7 +2196,7 @@ LE7A8: sta $06
stx $07 stx $07
stx $09 stx $09
inc $09 inc $09
copy16 #$1C00, $0C5B copy16 #$1C00, disk_copy_overlay4::block_params::data_buffer
.byte $8D .byte $8D
.byte $03 .byte $03
cpy #$8D cpy #$8D
@ -2882,15 +2890,15 @@ LF185: sty LD41D
LF191: rts LF191: rts
LF192: lda LD41D LF192: lda LD41D
sta $0C46 sta disk_copy_overlay4::on_line_params::unit_num
jsr disk_copy_overlay4::L129B jsr disk_copy_overlay4::L129B
beq LF1C9 beq LF1C9
cmp #$52 cmp #$52
beq LF1C9 beq LF1C9
lda $0C49 lda disk_copy_overlay4::on_line_buffer
and #$0F and #$0F
bne LF1C9 bne LF1C9
lda $0C4A lda disk_copy_overlay4::on_line_buffer+1
cmp #$52 cmp #$52
beq LF1C9 beq LF1C9
MGTK_RELAY_CALL2 MGTK::GetEvent, event_params MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
@ -2930,7 +2938,7 @@ LF1D7: rts
sta ($28),y sta ($28),y
lda $C000 lda $C000
bmi :+ bmi :+
jmp L51ED jmp $51ED
: pla : pla
sta ($28),y sta ($28),y

View File

@ -648,10 +648,13 @@ params: .addr 0
;;; ============================================================ ;;; ============================================================
just_rts:
rts rts
;;; ============================================================ ;;; ============================================================
;;; Quit back to ProDOS (which will launch DeskTop)
.proc quit
jsr disk_copy_overlay3::LDF94 jsr disk_copy_overlay3::LDF94
sta ALTZPOFF sta ALTZPOFF
lda ROMIN2 lda ROMIN2
@ -666,15 +669,16 @@ params: .addr 0
jsr HOME jsr HOME
MLI_CALL QUIT, quit_params MLI_CALL QUIT, quit_params
rts rts
.endproc
;;; ============================================================ ;;; ============================================================
ldx $D418 ldx disk_copy_overlay3::LD418
lda $D3F7,x lda disk_copy_overlay3::LD3F7,x
sta L0CEC sta L0CEC
and #$0F and #$0F
beq L0CCC beq L0CCC
lda $D3F7,x lda disk_copy_overlay3::LD3F7,x
jsr L0D26 jsr L0D26
ldy #$FF ldy #$FF
lda ($06),y lda ($06),y
@ -769,7 +773,7 @@ L0D34: stx load_addr
sta load_addr sta load_addr
load_addr := * + 1 load_addr := * + 1
lda $BF00 ; self-modified lda MLI ; self-modified
sta $07 sta $07
lda #$00 lda #$00
sta $06 sta $06
@ -794,15 +798,15 @@ L0D51: pha
;;; ============================================================ ;;; ============================================================
L0D5F: ldx $D417 L0D5F: ldx disk_copy_overlay3::LD417
lda $D3F7,x lda disk_copy_overlay3::LD3F7,x
sta block_params::unit_num sta block_params::unit_num
lda #$00 lda #$00
sta block_params::block_num sta block_params::block_num
sta block_params::block_num+1 sta block_params::block_num+1
jsr L12AF jsr L12AF
bne L0D8A bne L0D8A
lda $1C01 lda $1C00+1
cmp #$E0 cmp #$E0
beq L0D7F beq L0D7F
jmp L0DA4 jmp L0DA4
@ -813,13 +817,13 @@ L0D7F: lda $1C02
cmp #$60 cmp #$60
beq L0D90 beq L0D90
L0D8A: lda #$81 L0D8A: lda #$81
sta $D44D sta disk_copy_overlay3::LD44D
rts rts
L0D90: addr_call disk_copy_overlay3::LDE9F, $1300 L0D90: addr_call disk_copy_overlay3::LDE9F, $1300
addr_call disk_copy_overlay3::adjust_case, $1300 addr_call disk_copy_overlay3::adjust_case, $1300
lda #$C0 lda #$C0
sta $D44D sta disk_copy_overlay3::LD44D
rts rts
L0DA4: cmp #$A5 L0DA4: cmp #$A5
@ -828,36 +832,36 @@ L0DA4: cmp #$A5
cmp #$27 cmp #$27
bne L0D8A bne L0D8A
lda #$80 lda #$80
sta $D44D sta disk_copy_overlay3::LD44D
rts rts
;;; ============================================================ ;;; ============================================================
L0DB5: lda #$14 L0DB5: lda #$14
jsr L1133 jsr L1133
lda $D417 lda disk_copy_overlay3::LD417
asl a asl a
tax tax
lda $D407,x lda disk_copy_overlay3::LD407,x
sta L0EB0 sta L0EB0
lda $D408,x lda disk_copy_overlay3::LD407+1,x
sta L0EB1 sta L0EB1
lsr16 L0EB0 lsr16 L0EB0
lsr16 L0EB0 lsr16 L0EB0
lsr16 L0EB0 lsr16 L0EB0
copy16 L0EB0, $D427 copy16 L0EB0, disk_copy_overlay3::LD427
bit $D44D bit disk_copy_overlay3::LD44D
bmi L0DF6 bmi L0DF6
lda $D451 lda disk_copy_overlay3::LD451
bne L0DF6 bne L0DF6
jmp L0E4D jmp L0E4D
L0DF6: lda #$FF L0DF6: lda #$FF
clc clc
adc $D427 adc disk_copy_overlay3::LD427
sta $06 sta $06
lda #$13 lda #$13
adc $D428 adc disk_copy_overlay3::LD427+1
sta $07 sta $07
ldy #$00 ldy #$00
L0E07: lda #$00 L0E07: lda #$00
@ -875,14 +879,14 @@ L0E15: lda $07
bne L0E07 bne L0E07
lda #$00 lda #$00
sta ($06),y sta ($06),y
lda $D428 lda disk_copy_overlay3::LD427+1
cmp #$02 cmp #$02
bcs L0E2D bcs L0E2D
rts rts
L0E2D: lda #$14 L0E2D: lda #$14
sta $06 sta $06
lda $D428 lda disk_copy_overlay3::LD427+1
pha pha
L0E35: inc $06 L0E35: inc $06
inc $06 inc $06
@ -899,9 +903,9 @@ L0E47: lda $06
jsr L1133 jsr L1133
rts rts
L0E4D: copy16 #$0006, block_params::block_num L0E4D: copy16 #6, block_params::block_num
ldx $D417 ldx disk_copy_overlay3::LD417
lda $D3F7,x lda disk_copy_overlay3::LD3F7,x
sta block_params::unit_num sta block_params::unit_num
copy16 #$1400, block_params::data_buffer copy16 #$1400, block_params::data_buffer
jsr L12AF jsr L12AF
@ -959,32 +963,32 @@ L0ED6: .byte 0
;;; ============================================================ ;;; ============================================================
L0ED7: bit $C010 L0ED7: bit KBDSTRB
sta L0FE6 sta L0FE6
and #$FF and #$FF
bpl L0EFF bpl L0EFF
copy16 $D424, $D421 copy16 disk_copy_overlay3::LD424, disk_copy_overlay3::LD421
lda $D426 lda disk_copy_overlay3::LD426
sta $D423 sta disk_copy_overlay3::LD423
ldx $D418 ldx disk_copy_overlay3::LD418
lda $D3F7,x lda disk_copy_overlay3::LD3F7,x
sta block_params::unit_num sta block_params::unit_num
jmp L0F1A jmp L0F1A
L0EFF: copy16 $D421, $D424 L0EFF: copy16 disk_copy_overlay3::LD421, disk_copy_overlay3::LD424
lda $D423 lda disk_copy_overlay3::LD423
sta $D426 sta disk_copy_overlay3::LD426
ldx $D417 ldx disk_copy_overlay3::LD417
lda $D3F7,x lda disk_copy_overlay3::LD3F7,x
sta block_params::unit_num sta block_params::unit_num
L0F1A: lda #$07 L0F1A: lda #$07
sta $D420 sta disk_copy_overlay3::LD420
lda #$00 lda #$00
sta $D41F sta disk_copy_overlay3::LD41F
sta L0FE4 sta L0FE4
sta L0FE5 sta L0FE5
L0F2A: lda $C000 L0F2A: lda KBD
cmp #$9B cmp #(CHAR_ESCAPE | $80)
bne L0F37 bne L0F37
jsr disk_copy_overlay3::LE6AB jsr disk_copy_overlay3::LE6AB
jmp L0F6F jmp L0F6F
@ -1018,7 +1022,7 @@ L0F6F: return #$01
L0F72: stax block_params::block_num L0F72: stax block_params::block_num
ldx L0FE8 ldx L0FE8
lda L0FE7 lda L0FE7
ldy $D41F ldy disk_copy_overlay3::LD41F
cpy #$10 cpy #$10
bcs L0F9A bcs L0F9A
bit L0FE6 bit L0FE6
@ -1086,35 +1090,35 @@ L0FF6: jsr L0FFF
tax tax
rts rts
L0FFF: dec $D423 L0FFF: dec disk_copy_overlay3::LD423
lda $D423 lda disk_copy_overlay3::LD423
cmp #$FF cmp #$FF
beq L100B beq L100B
L1009: clc L1009: clc
rts rts
L100B: lda #$07 L100B: lda #$07
sta $D423 sta disk_copy_overlay3::LD423
inc16 $D421 inc16 disk_copy_overlay3::LD421
L1018: lda $D422 L1018: lda disk_copy_overlay3::LD421+1
cmp $D428 cmp disk_copy_overlay3::LD427+1
bne L1009 bne L1009
lda $D421 lda disk_copy_overlay3::LD421
cmp $D427 cmp disk_copy_overlay3::LD427
bne L1009 bne L1009
sec sec
rts rts
L102A: lda #$00 L102A: lda #$00
clc clc
adc $D421 adc disk_copy_overlay3::LD421
sta $06 sta $06
lda #$14 lda #$14
adc $D422 adc disk_copy_overlay3::LD421+1
sta $07 sta $07
ldy #$00 ldy #$00
lda ($06),y lda ($06),y
ldx $D423 ldx disk_copy_overlay3::LD423
cpx #$00 cpx #$00
beq L1048 beq L1048
L1044: lsr a L1044: lsr a
@ -1125,16 +1129,16 @@ L1048: and #$01
tay tay
beq L1051 beq L1051
L104F: ldy #$FF L104F: ldy #$FF
L1051: lda $D422 L1051: lda disk_copy_overlay3::LD421+1
sta L1076 sta L1076
lda $D421 lda disk_copy_overlay3::LD421
asl a asl a
rol L1076 rol L1076
asl a asl a
rol L1076 rol L1076
asl a asl a
rol L1076 rol L1076
ldx $D423 ldx disk_copy_overlay3::LD423
clc clc
adc L1077,x adc L1077,x
pha pha
@ -1165,25 +1169,25 @@ L108C: jsr L1095
tax tax
rts rts
L1095: dec $D420 L1095: dec disk_copy_overlay3::LD420
lda $D420 lda disk_copy_overlay3::LD420
cmp #$FF cmp #$FF
beq L10A1 beq L10A1
L109F: clc L109F: clc
rts rts
L10A1: lda #$07 L10A1: lda #$07
sta $D420 sta disk_copy_overlay3::LD420
inc $D41F inc disk_copy_overlay3::LD41F
lda $D41F lda disk_copy_overlay3::LD41F
cmp #$21 cmp #$21
bcc L109F bcc L109F
sec sec
rts rts
L10B2: ldx $D41F L10B2: ldx disk_copy_overlay3::LD41F
lda L12B9,x lda L12B9,x
ldx $D420 ldx disk_copy_overlay3::LD420
cpx #$00 cpx #$00
beq L10C3 beq L10C3
L10BF: lsr a L10BF: lsr a
@ -1194,14 +1198,14 @@ L10C3: and #$01
ldy #$00 ldy #$00
beq L10CD beq L10CD
L10CB: ldy #$FF L10CB: ldy #$FF
L10CD: lda $D41F L10CD: lda disk_copy_overlay3::LD41F
cmp #$10 cmp #$10
bcs L10E3 bcs L10E3
L10D4: asl a L10D4: asl a
asl a asl a
asl a asl a
asl a asl a
ldx $D420 ldx disk_copy_overlay3::LD420
clc clc
adc L10F3,x adc L10F3,x
tax tax
@ -1233,7 +1237,7 @@ L1104: lda $06
inc L111E inc L111E
inc L111E inc L111E
lda L111E lda L111E
cmp $D428 cmp disk_copy_overlay3::LD427+1
beq L1104 beq L1104
bcc L1104 bcc L1104
rts rts