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

View File

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