a2d/desktop/ovl7.s

449 lines
10 KiB
ArmAsm
Raw Normal View History

2018-02-22 03:20:13 +00:00
.setcpu "6502"
2018-02-26 03:02:34 +00:00
;;; NB: Compiled as part of ovl34567.s
2018-02-22 03:20:13 +00:00
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-22 03:20:13 +00:00
;;; Overlay for Selector (part of it, anyway)
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-22 03:20:13 +00:00
.org $7000
2018-02-25 23:19:38 +00:00
.proc selector_overlay
2018-02-22 03:20:13 +00:00
L7000: stx L73A9
sty L73AA
2018-02-26 03:02:34 +00:00
jsr common_overlay::L5CF7
2018-02-22 03:20:13 +00:00
jsr L7101
jsr L70AD
2018-02-26 03:02:34 +00:00
jsr common_overlay::L5E87
2018-02-22 05:28:13 +00:00
lda path_buf0
2018-02-22 03:20:13 +00:00
beq L7056
2018-02-26 03:02:34 +00:00
addr_call common_overlay::L6129, path_buf0
2018-02-22 05:28:13 +00:00
ldy path_buf0
L7021: lda path_buf0,y
2018-02-22 03:20:13 +00:00
sta $5028,y
dey
bpl L7021
2018-02-26 03:02:34 +00:00
jsr common_overlay::L5F49
2018-02-22 05:28:13 +00:00
ldy path_buf0
L7030: lda path_buf0,y
2018-02-22 03:20:13 +00:00
cmp #$2F
beq L7044
dey
cpy #$01
bne L7030
lda #$00
2018-02-22 05:28:13 +00:00
sta path_buf0
2018-02-22 03:20:13 +00:00
jmp L7056
L7044: ldx #$00
L7046: iny
inx
2018-02-22 05:28:13 +00:00
lda path_buf0,y
2018-02-22 03:20:13 +00:00
sta L709D,x
2018-02-22 05:28:13 +00:00
cpy path_buf0
2018-02-22 03:20:13 +00:00
bne L7046
stx L709D
2018-02-26 03:02:34 +00:00
L7056: jsr common_overlay::L5F5B
2018-02-22 03:20:13 +00:00
lda #$00
bcs L706A
2018-02-26 03:02:34 +00:00
addr_call common_overlay::L6516, $709D
2018-02-22 03:20:13 +00:00
sta $D920
2018-02-26 03:02:34 +00:00
jsr common_overlay::L6586
L706A: jsr common_overlay::L6163
jsr common_overlay::L61B1
jsr common_overlay::L606D
2018-02-22 05:28:13 +00:00
lda path_buf0
2018-02-22 03:20:13 +00:00
bne L707B
2018-02-26 03:02:34 +00:00
jsr common_overlay::L6D30
2018-02-24 05:11:20 +00:00
L707B: copy16 #$2001, $D484
2018-02-26 03:02:34 +00:00
jsr common_overlay::L6D27
jsr common_overlay::L6693
2018-02-24 05:11:20 +00:00
copy16 #$2001, $D484
2018-02-22 03:20:13 +00:00
lda #$FF
sta $D8EC
2018-02-26 03:02:34 +00:00
jmp common_overlay::L5106
2018-02-22 03:20:13 +00:00
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-22 03:20:13 +00:00
L709D: .res 16, 0
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-22 03:20:13 +00:00
L70AD: ldx L7207
L70B0: lda L7207+1,x
sta $6D1E,x
dex
lda L7207+1,x
sta $6D1E,x
dex
dex
bpl L70B0
lda #$00
sta $51AE
lda #$80
sta $5104
2018-02-24 05:11:20 +00:00
copy16 #$0601, $D484
2018-03-15 04:10:08 +00:00
lda winfo_entrydlg
2018-02-26 03:02:34 +00:00
jsr common_overlay::L62C8
2018-02-22 03:20:13 +00:00
lda L73A9
jsr L7467
lda L73AA
jsr L747B
lda #$80
sta $5103
lda #$AB
sta $531C
lda #$73
sta $531D
lda #$F4
sta $5B24
lda #$74
sta $5B25
rts
2018-03-15 04:10:08 +00:00
L7101: lda winfo_entrydlg
2018-02-26 03:02:34 +00:00
jsr common_overlay::L62C8
2018-02-22 05:28:13 +00:00
lda path_buf0
2018-02-22 03:20:13 +00:00
beq L7116
2018-02-26 03:02:34 +00:00
addr_call common_overlay::L5E0A, $D729
2018-02-22 03:20:13 +00:00
jmp L711D
2018-02-26 03:02:34 +00:00
L7116: addr_call common_overlay::L5E0A, $D718
L711D: addr_call common_overlay::L5E6F, $D849
2018-03-02 02:25:42 +00:00
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR ; penXOR
2018-02-22 05:28:13 +00:00
MGTK_RELAY_CALL MGTK::FrameRect, dialog_rect1
MGTK_RELAY_CALL MGTK::FrameRect, dialog_rect2
2018-02-26 03:02:34 +00:00
addr_call common_overlay::L5E57, $D769
addr_call common_overlay::L5E6F, $D797
2018-02-22 03:20:13 +00:00
MGTK_RELAY_CALL MGTK::MoveTo, $D922
2018-02-26 03:02:34 +00:00
addr_call common_overlay::L5DED, $D7DE
2018-02-22 03:20:13 +00:00
MGTK_RELAY_CALL MGTK::MoveTo, $D926
2018-02-26 03:02:34 +00:00
addr_call common_overlay::L5DED, $D7F6
2018-02-22 03:20:13 +00:00
MGTK_RELAY_CALL MGTK::MoveTo, $D92A
2018-02-26 03:02:34 +00:00
addr_call common_overlay::L5DED, $D802
2018-02-22 03:20:13 +00:00
MGTK_RELAY_CALL MGTK::MoveTo, $D92E
2018-02-26 03:02:34 +00:00
addr_call common_overlay::L5DED, $D814
2018-02-22 03:20:13 +00:00
MGTK_RELAY_CALL MGTK::MoveTo, $D932
2018-02-26 03:02:34 +00:00
addr_call common_overlay::L5DED, $D81F
2018-02-22 03:20:13 +00:00
MGTK_RELAY_CALL MGTK::MoveTo, $D936
2018-02-26 03:02:34 +00:00
addr_call common_overlay::L5DED, $D830
2018-02-22 03:20:13 +00:00
MGTK_RELAY_CALL MGTK::MoveTo, $D93A
2018-02-26 03:02:34 +00:00
addr_call common_overlay::L5DED, $D840
2018-03-02 02:25:42 +00:00
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
2018-02-22 03:20:13 +00:00
MGTK_RELAY_CALL MGTK::FrameRect, $D93E
MGTK_RELAY_CALL MGTK::FrameRect, $D946
MGTK_RELAY_CALL MGTK::FrameRect, $D94E
MGTK_RELAY_CALL MGTK::FrameRect, $D956
MGTK_RELAY_CALL MGTK::FrameRect, $D95E
2018-02-22 05:28:13 +00:00
MGTK_RELAY_CALL MGTK::InitPort, grafport3
MGTK_RELAY_CALL MGTK::SetPort, grafport3
2018-02-22 03:20:13 +00:00
rts
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-22 03:20:13 +00:00
.byte $00
L7207: .byte $29
entry 0, $725D
entry 0, $732F
entry 0, $6593
entry 0, $664E
entry 0, $6DC2
entry 0, $6DD0
entry 0, $6E1D
entry 0, $69C6
entry 0, $6A18
entry 0, $6A53
entry 0, $6AAC
entry 0, $6B01
entry 0, $6B44
entry 0, $66D8
L7232: .byte $29
2018-02-27 03:59:33 +00:00
entry 0, $72CD
2018-02-22 03:20:13 +00:00
entry 0, $736C
entry 0, $65F0
entry 0, $6693
entry 0, $6DC9
entry 0, $6DD4
entry 0, $6E31
entry 0, $6B72
entry 0, $6BC4
entry 0, $6BFF
entry 0, $6C58
entry 0, $6CAD
entry 0, $6CF0
entry 0, $684F
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-22 03:20:13 +00:00
2018-02-24 05:11:20 +00:00
copy16 #$2001, $D484
2018-02-26 03:02:34 +00:00
jsr common_overlay::L6D27
2018-02-22 03:20:13 +00:00
ldx L7232
L726D: lda L7232+1,x
sta $6D1E,x
dex
lda L7232+1,x
sta $6D1E,x
dex
dex
bpl L726D
lda #$80
sta $51AE
sta $5105
lda $D8F0
sta $D8F1
lda #$00
sta $D8F0
lda $D443
bne L72BF
lda #$00
sta $D443
2018-02-22 05:28:13 +00:00
ldx path_buf0
2018-02-22 03:20:13 +00:00
beq L72BF
2018-02-22 05:28:13 +00:00
L72A0: lda path_buf0,x
2018-02-22 03:20:13 +00:00
cmp #$2F
beq L72AD
dex
bne L72A0
jmp L72BF
L72AD: ldy #$00
L72AF: iny
inx
2018-02-22 05:28:13 +00:00
lda path_buf0,x
2018-02-22 03:20:13 +00:00
sta $D443,y
2018-02-22 05:28:13 +00:00
cpx path_buf0
2018-02-22 03:20:13 +00:00
bne L72AF
sty $D443
2018-02-24 05:11:20 +00:00
L72BF: copy16 #$0601, $D484
2018-02-26 03:02:34 +00:00
jsr common_overlay::L6D27
2018-02-22 03:20:13 +00:00
rts
2018-02-26 03:02:34 +00:00
addr_call common_overlay::L647C, path_buf0
2018-02-22 03:20:13 +00:00
bne L72E2
lda $D443
beq L72E7
cmp #$0F
bcs L72E8
jmp L72EE
L72E2: lda #$40
2018-02-25 07:19:29 +00:00
jsr JUMP_TABLE_ALERT_0
2018-02-22 03:20:13 +00:00
L72E7: rts
L72E8: lda #$FB
2018-02-25 07:19:29 +00:00
jsr JUMP_TABLE_ALERT_0
2018-02-22 03:20:13 +00:00
rts
2018-02-22 05:28:13 +00:00
L72EE: MGTK_RELAY_CALL MGTK::InitPort, grafport3
MGTK_RELAY_CALL MGTK::SetPort, grafport3
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-02-22 03:20:13 +00:00
sta $D8EC
2018-02-26 03:02:34 +00:00
jsr common_overlay::L55BA
2018-02-24 05:11:20 +00:00
copy16 #$59B8, $5B24
2018-02-22 03:20:13 +00:00
ldx $50AA
txs
ldx L73A9
ldy L73AA
2018-02-24 05:11:20 +00:00
return #$00
2018-02-22 03:20:13 +00:00
2018-02-22 05:28:13 +00:00
MGTK_RELAY_CALL MGTK::InitPort, grafport3
MGTK_RELAY_CALL MGTK::SetPort, grafport3
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-02-22 03:20:13 +00:00
lda #$00
sta $D8EC
2018-02-26 03:02:34 +00:00
jsr common_overlay::L55BA
2018-02-24 05:11:20 +00:00
copy16 #$59B8, $5B24
2018-02-22 03:20:13 +00:00
ldx $50AA
txs
2018-02-24 05:11:20 +00:00
return #$FF
2018-02-22 03:20:13 +00:00
2018-02-24 05:11:20 +00:00
copy16 #$2001, $D484
2018-02-26 03:02:34 +00:00
jsr common_overlay::L6D27
2018-02-22 03:20:13 +00:00
ldx L7207
L737C: lda L7207+1,x
sta $6D1E,x
dex
lda L7207+1,x
sta $6D1E,x
dex
dex
bpl L737C
2018-02-24 05:11:20 +00:00
copy16 #$0601, $D484
2018-02-26 03:02:34 +00:00
jsr common_overlay::L6D27
2018-02-22 03:20:13 +00:00
lda #$00
sta $5105
sta $51AE
lda $D8F1
sta $D8F0
rts
L73A9: .byte 0
L73AA: .byte 0
MGTK_RELAY_CALL MGTK::InRect, $D966
2018-02-25 21:47:06 +00:00
cmp #MGTK::inrect_inside
2018-02-22 03:20:13 +00:00
bne L73BB
jmp L73FE
L73BB: MGTK_RELAY_CALL MGTK::InRect, $D96E
2018-02-25 21:47:06 +00:00
cmp #MGTK::inrect_inside
2018-02-22 03:20:13 +00:00
bne L73CB
jmp L7413
L73CB: MGTK_RELAY_CALL MGTK::InRect, $D976
2018-02-25 21:47:06 +00:00
cmp #MGTK::inrect_inside
2018-02-22 03:20:13 +00:00
bne L73DB
jmp L7428
L73DB: MGTK_RELAY_CALL MGTK::InRect, $D97E
2018-02-25 21:47:06 +00:00
cmp #MGTK::inrect_inside
2018-02-22 03:20:13 +00:00
bne L73EB
jmp L743D
L73EB: MGTK_RELAY_CALL MGTK::InRect, $D986
2018-02-25 21:47:06 +00:00
cmp #MGTK::inrect_inside
2018-02-22 03:20:13 +00:00
bne L73FB
jmp L7452
2018-02-24 05:11:20 +00:00
L73FB: return #$00
2018-02-22 03:20:13 +00:00
L73FE: lda L73A9
cmp #1
beq L7410
jsr L7467
lda #1
sta L73A9
jsr L7467
2018-02-24 05:11:20 +00:00
L7410: return #$FF
2018-02-22 03:20:13 +00:00
L7413: lda L73A9
cmp #2
beq L7425
jsr L7467
lda #2
sta L73A9
jsr L7467
2018-02-24 05:11:20 +00:00
L7425: return #$FF
2018-02-22 03:20:13 +00:00
L7428: lda L73AA
cmp #1
beq L743A
jsr L747B
lda #1
sta L73AA
jsr L747B
2018-02-24 05:11:20 +00:00
L743A: return #$FF
2018-02-22 03:20:13 +00:00
L743D: lda L73AA
cmp #2
beq L744F
jsr L747B
lda #2
sta L73AA
jsr L747B
2018-02-24 05:11:20 +00:00
L744F: return #$FF
2018-02-22 03:20:13 +00:00
L7452: lda L73AA
cmp #3
beq L7464
jsr L747B
lda #3
sta L73AA
jsr L747B
2018-02-24 05:11:20 +00:00
L7464: return #$FF
2018-02-22 03:20:13 +00:00
L7467: cmp #1
bne L7473
addr_call L749B, $D93E
rts
L7473: addr_call L749B, $D946
rts
L747B: cmp #1
bne L7487
addr_call L749B, $D94E
rts
L7487: cmp #2
bne L7493
addr_call L749B, $D956
rts
L7493: addr_call L749B, $D95E
rts
L749B: stax $06
ldy #7
L74A1: lda ($06),y
sta $D98E,y
dey
bpl L74A1
lda $D98E
clc
adc #2
sta $D98E
bcc L74B7
inc $D98F
L74B7: lda $D990
clc
adc #2
sta $D990
bcc L74C5
inc $D991
L74C5: lda $D992
sec
sbc #2
sta $D992
bcs L74D3
dec $D993
L74D3: lda $D994
sec
sbc #2
sta $D994
bcs L74E1
dec $D995
2018-03-02 02:25:42 +00:00
L74E1: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
2018-02-22 03:20:13 +00:00
MGTK_RELAY_CALL MGTK::PaintRect, $D98E
rts
2018-03-15 04:10:08 +00:00
lda winfo_entrydlg
2018-02-26 03:02:34 +00:00
jsr common_overlay::L62C8
2018-02-22 03:20:13 +00:00
lda $D20A
bne L7500
rts
L7500: lda $D209
and #$7F
cmp #'1'
bne L750C
jmp L73FE
L750C: cmp #'2'
bne L7513
jmp L7413
L7513: cmp #'3'
bne L751A
jmp L7428
L751A: cmp #'4'
bne L7521
jmp L743D
L7521: cmp #'5'
bne L7528
jmp L7452
L7528: rts
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-25 23:19:38 +00:00
2018-02-22 03:20:13 +00:00
PAD_TO $7800
2018-02-25 23:19:38 +00:00
.endproc ; selector_overlay