a2d/desktop/ovl3.s

1557 lines
32 KiB
ArmAsm
Raw Normal View History

2018-02-24 04:54:37 +00:00
.setcpu "6502"
2018-02-26 03:02:34 +00:00
;;; NB: Compiled as part of ovl34567.s
2018-02-24 04:54:37 +00:00
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-25 21:19:11 +00:00
;;; Overlay for Selector (part of it, anyway)
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-24 04:54:37 +00:00
.org $9000
2018-02-25 23:19:38 +00:00
.proc selector_overlay2
2018-02-24 04:54:37 +00:00
2018-02-25 21:19:11 +00:00
;;; Entry points in desktop_main
launch_dialog := $A500
set_cursor_watch := $B3E7
set_cursor_pointer := $B403
LB445 := $B445 ; ???
draw_text1 := $B708
set_port_from_window_id := $B7B9
2018-02-24 04:54:37 +00:00
sta L938E
ldx #$FF
stx L938F
cmp #$01
beq L903C
jmp L9105
L900F: pha
lda L938F
bpl L9017
L9015: pla
L9016: rts
L9017: lda $0C00
clc
adc $0C01
sta $D343
lda #$00
sta $D344
jsr L9DED
cmp #$80
bne L9015
2018-02-25 07:19:29 +00:00
jsr JUMP_TABLE_REDRAW_ALL
2018-02-24 04:54:37 +00:00
lda #$06
jsr L9C09
bne L9015
jsr L9C26
pla
rts
L903C: ldx #$01
2018-02-26 03:20:43 +00:00
copy16 $DB1C, load
load := *+1
lda dummy1234
2018-02-24 04:54:37 +00:00
cmp #$0D
bcc L9052
inx
L9052: lda #$00
sta $D402
sta $D443
ldy #$03
lda #$02
2018-02-26 03:20:43 +00:00
jsr common_overlay_L5000
2018-02-24 04:54:37 +00:00
pha
txa
pha
tya
pha
lda #$07
2018-02-25 07:19:29 +00:00
jsr JUMP_TABLE_RESTORE_SEG
jsr JUMP_TABLE_REDRAW_ALL
2018-02-24 04:54:37 +00:00
pla
tay
pla
tax
pla
bne L900F
inc L938F
stx L9103
sty L9104
lda #$00
L9080: dey
beq L9088
sec
ror a
jmp L9080
L9088: sta L9104
jsr L9CBA
bpl L9093
jmp L9016
2018-02-26 03:05:59 +00:00
L9093: copy16 $0C00, L938B
2018-02-24 04:54:37 +00:00
lda L9103
cmp #$01
bne L90D3
lda L938B
cmp #$08
beq L90F4
ldy L9104
lda L938B
jsr L9A0A
inc $0C00
2018-02-26 03:40:53 +00:00
copy16 $DB1C, @addr
@addr := *+1
inc dummy1234
2018-02-24 04:54:37 +00:00
jsr L9CEA
bpl L90D0
jmp L9016
L90D0: jmp L900F
L90D3: lda L938C
cmp #$10
beq L90FF
ldy L9104
lda L938C
clc
adc #$08
jsr L9A61
inc $0C01
jsr L9CEA
bpl L90F1
jmp L9016
L90F1: jmp L900F
L90F4: lda #$01
L90F6: jsr L9C09
dec L938F
jmp L9016
L90FF: lda #$02
bne L90F6
2018-02-24 05:07:11 +00:00
L9103: .byte 0
L9104: .byte 0
2018-02-24 04:54:37 +00:00
L9105: lda #$00
sta L938B
sta L938C
lda #$FF
sta L938D
jsr L9390
jsr L9D22
bpl L911D
jmp L936E
L911D: jsr L99B3
L9120: jsr L9646
bmi L9120
beq L912A
jmp L933F
L912A: lda L938D
bmi L9120
lda L938E
cmp #$02
bne L9139
jmp L9174
L9139: cmp #$03
bne L913F
beq L9146
L913F: cmp #$04
bne L9120
jmp L9282
L9146: lda L938D
jsr L979D
2018-02-25 21:19:11 +00:00
jsr set_cursor_watch
2018-02-24 04:54:37 +00:00
lda L938D
jsr L9A97
beq L915D
2018-02-25 21:19:11 +00:00
jsr set_cursor_pointer
2018-02-24 04:54:37 +00:00
jmp L933F
2018-02-25 21:19:11 +00:00
L915D: jsr set_cursor_pointer
2018-02-24 04:54:37 +00:00
lda #$FF
sta L938D
jsr L99F5
jsr L9D28
jsr L99B3
inc L938F
jmp L9120
L9174: lda L938D
jsr L979D
jsr L936E
lda L938D
jsr L9BD5
2018-02-26 00:10:27 +00:00
stax $06
2018-02-24 04:54:37 +00:00
ldy #$00
lda ($06),y
tay
L918C: lda ($06),y
sta $D443,y
dey
bpl L918C
ldy #$0F
lda ($06),y
sta L9281
lda L938D
jsr L9BE2
2018-02-26 00:10:27 +00:00
stax $06
2018-02-24 04:54:37 +00:00
ldy #$00
lda ($06),y
tay
L91AA: lda ($06),y
sta $D402,y
dey
bpl L91AA
ldx #$01
lda L938D
cmp #$09
bcc L91BC
inx
L91BC: clc
lda L9281
rol a
rol a
adc #$01
tay
lda #$02
2018-02-26 03:20:43 +00:00
jsr common_overlay_L5000
2018-02-24 04:54:37 +00:00
pha
txa
pha
tya
pha
lda #$07
2018-02-25 07:19:29 +00:00
jsr JUMP_TABLE_RESTORE_SEG
jsr JUMP_TABLE_REDRAW_ALL
2018-02-24 04:54:37 +00:00
pla
tay
pla
tax
pla
beq L91DF
rts
L91DF: inc L938F
stx L9103
sty L9104
lda #$00
L91EA: dey
beq L91F2
sec
ror a
jmp L91EA
L91F2: sta L9104
jsr L9CBA
bpl L91FD
jmp L936E
L91FD: lda L938D
cmp #$09
bcc L923C
lda L9103
cmp #$02
beq L926A
lda L938B
cmp #$08
bne L9215
jmp L90F4
L9215: lda L938D
jsr L9A97
beq L9220
jmp L936E
L9220: ldx L938B
inc L938B
inc $0C00
2018-02-26 03:40:53 +00:00
copy16 $DB1C, @addr
@addr := *+1
inc dummy1234
2018-02-24 04:54:37 +00:00
txa
jmp L926D
L923C: lda L9103
cmp #$01
beq L926A
lda L938C
cmp #$10
bne L924D
jmp L9105
L924D: lda L938D
jsr L9A97
beq L9258
jmp L936E
L9258: ldx L938C
inc L938C
inc $0C01
lda L938C
clc
adc #$07
jmp L926D
L926A: lda L938D
L926D: ldy L9104
jsr L9A0A
jsr L9CEA
beq L927B
jmp L936E
2018-02-25 21:19:11 +00:00
L927B: jsr set_cursor_pointer
2018-02-24 04:54:37 +00:00
jmp L900F
2018-02-24 05:07:11 +00:00
L9281: .byte 0
2018-02-24 04:54:37 +00:00
L9282: lda L938D
jsr L979D
2018-02-25 21:19:11 +00:00
jsr set_cursor_watch
2018-02-24 04:54:37 +00:00
lda L938D
jsr L9BD5
2018-02-26 00:10:27 +00:00
stax $06
2018-02-24 04:54:37 +00:00
ldy #$0F
lda ($06),y
cmp #$C0
beq L92F0
sta L938A
jsr L9DED
beq L92F0
lda L938A
beq L92CE
lda L938D
jsr L9E61
beq L92D6
lda L938D
jsr L9BE2
2018-02-26 00:10:27 +00:00
stax $06
2018-02-24 04:54:37 +00:00
ldy #$00
lda ($06),y
tay
L92C1: lda ($06),y
sta $D355,y
dey
bpl L92C1
lda #$FF
jmp L933F
L92CE: lda L938D
jsr L9E61
bne L92F0
L92D6: lda L938D
jsr L9E74
2018-02-26 00:10:27 +00:00
stax $06
2018-02-24 04:54:37 +00:00
ldy #$00
lda ($06),y
tay
L92E5: lda ($06),y
sta $D355,y
dey
bpl L92E5
jmp L9307
L92F0: lda L938D
jsr L9BE2
2018-02-26 00:10:27 +00:00
stax $06
2018-02-24 04:54:37 +00:00
ldy #$00
lda ($06),y
tay
L92FF: lda ($06),y
sta $D355,y
dey
bpl L92FF
L9307: ldy $D355
L930A: lda $D355,y
cmp #$2F
beq L9314
dey
bne L930A
L9314: dey
sty L938A
iny
ldx #$00
L931B: iny
inx
lda $D355,y
sta $D345,x
cpy $D355
bne L931B
stx $D345
lda L938A
sta $D355
2018-02-25 07:19:29 +00:00
jsr JUMP_TABLE_LAUNCH_FILE
2018-02-25 21:19:11 +00:00
jsr set_cursor_pointer
2018-02-24 04:54:37 +00:00
lda #$FF
sta L938D
jmp L936E
L933F: pha
lda L938E
cmp #$02
bne L934F
lda #$07
2018-02-25 07:19:29 +00:00
jsr JUMP_TABLE_RESTORE_SEG
jsr JUMP_TABLE_REDRAW_ALL
L934F: MGTK_RELAY_CALL MGTK::InitPort, $D239
MGTK_RELAY_CALL MGTK::SetPort, $D239
2018-03-15 04:10:08 +00:00
MGTK_RELAY_CALL MGTK::CloseWindow, winfo_entry_picker
2018-02-24 04:54:37 +00:00
pla
jmp L900F
L936E: MGTK_RELAY_CALL MGTK::InitPort, $D239
MGTK_RELAY_CALL MGTK::SetPort, $D239
2018-03-15 04:10:08 +00:00
MGTK_RELAY_CALL MGTK::CloseWindow, winfo_entry_picker
2018-02-24 04:54:37 +00:00
rts
2018-02-24 05:07:11 +00:00
L938A: .byte 0
L938B: .byte 0
L938C: .byte 0
L938D: .byte 0
L938E: .byte 0
L938F: .byte 0
2018-02-26 03:40:53 +00:00
2018-03-15 04:10:08 +00:00
L9390: MGTK_RELAY_CALL MGTK::OpenWindow, winfo_entry_picker
lda winfo_entry_picker
2018-02-25 21:19:11 +00:00
jsr set_port_from_window_id
2018-03-02 02:25:42 +00:00
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL MGTK::FrameRect, $D6D8
MGTK_RELAY_CALL MGTK::FrameRect, $D6E0
MGTK_RELAY_CALL MGTK::MoveTo, $D6E8
MGTK_RELAY_CALL MGTK::LineTo, $D6EC
MGTK_RELAY_CALL MGTK::MoveTo, $D6F0
MGTK_RELAY_CALL MGTK::LineTo, $D6F4
2018-03-02 02:25:42 +00:00
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL MGTK::FrameRect, $D6F8
MGTK_RELAY_CALL MGTK::FrameRect, $D700
2018-02-24 04:54:37 +00:00
jsr L94A9
jsr L94BA
lda L938E
cmp #$02
bne L9417
addr_call L94F0, $D729
2018-02-24 04:54:37 +00:00
rts
L9417: cmp #$03
bne L9423
addr_call L94F0, $D73B
2018-02-24 04:54:37 +00:00
rts
L9423: addr_call L94F0, $D74F
2018-02-24 04:54:37 +00:00
rts
L942B: stx $07
sta $06
lda $D6C3
sta L94A8
tya
pha
cmp #$10
bcc L9441
sec
sbc #$10
jmp L9448
L9441: cmp #$08
bcc L9448
sec
sbc #$08
L9448: ldx #$00
stx L94A7
asl a
rol L94A7
asl a
rol L94A7
asl a
rol L94A7
clc
adc #$20
sta $D6C5
lda L94A7
adc #$00
sta $D6C6
pla
cmp #$08
bcs L9471
lda #$00
tax
beq L947F
L9471: cmp #$10
bcs L947B
ldx #$00
lda #$73
bne L947F
L947B: ldax #$00DC
2018-02-24 04:54:37 +00:00
L947F: clc
adc #$0A
sta $D6C3
txa
adc #$00
sta $D6C4
MGTK_RELAY_CALL MGTK::MoveTo, $D6C3
2018-02-24 04:54:37 +00:00
lda $06
ldx $07
jsr L94CB
lda L94A8
sta $D6C3
lda #$00
sta $D6C4
rts
2018-02-24 05:07:11 +00:00
L94A7: .byte 0
L94A8: .byte 0
2018-02-26 03:40:53 +00:00
L94A9: MGTK_RELAY_CALL MGTK::MoveTo, $D708
2018-02-25 21:19:11 +00:00
addr_call draw_text1, $AE40
2018-02-24 04:54:37 +00:00
rts
L94BA: MGTK_RELAY_CALL MGTK::MoveTo, $D70C
2018-02-25 21:19:11 +00:00
addr_call draw_text1, $AE96
2018-02-24 04:54:37 +00:00
rts
2018-02-26 00:10:27 +00:00
L94CB: stax $06
2018-02-24 04:54:37 +00:00
ldy #$00
lda ($06),y
tay
L94D4: lda ($06),y
sta $D486,y
dey
bpl L94D4
copy16 #$D487, $D484
MGTK_RELAY_CALL MGTK::DrawText, $D484
2018-02-24 04:54:37 +00:00
rts
2018-02-26 00:10:27 +00:00
L94F0: stax $06
2018-02-24 04:54:37 +00:00
ldy #$00
lda ($06),y
sta $08
2018-02-26 00:06:17 +00:00
inc16 $06
2018-02-26 03:40:53 +00:00
MGTK_RELAY_CALL MGTK::TextWidth, $06
2018-02-26 00:10:27 +00:00
lsr16 $09
2018-02-24 04:54:37 +00:00
lda #$01
sta L9539
lda #$5E
lsr L9539
ror a
sec
sbc $09
sta $D6B7
lda L9539
sbc $0A
sta $D6B8
MGTK_RELAY_CALL MGTK::MoveTo, $D6B7
2018-02-26 03:40:53 +00:00
MGTK_RELAY_CALL MGTK::DrawText, $06
2018-02-24 04:54:37 +00:00
rts
2018-02-24 05:07:11 +00:00
L9539: .byte 0
2018-02-24 04:54:37 +00:00
L953A: lda #$00
sta L95BF
2018-03-02 02:25:42 +00:00
L953F: MGTK_RELAY_CALL MGTK::GetEvent, event_params
lda event_kind
cmp #MGTK::event_kind_button_up
2018-02-24 04:54:37 +00:00
beq L95A2
2018-03-15 04:10:08 +00:00
lda winfo_entry_picker
2018-03-02 02:25:42 +00:00
sta screentowindow_window_id
MGTK_RELAY_CALL MGTK::ScreenToWindow, screentowindow_params
MGTK_RELAY_CALL MGTK::MoveTo, screentowindow_windowx
MGTK_RELAY_CALL MGTK::InRect, $D6F8
2018-02-25 21:47:06 +00:00
cmp #MGTK::inrect_inside
2018-02-24 04:54:37 +00:00
beq L957C
lda L95BF
beq L9584
jmp L953F
L957C: lda L95BF
bne L9584
jmp L953F
2018-03-02 02:25:42 +00:00
L9584: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL MGTK::PaintRect, $D6F8
2018-02-24 04:54:37 +00:00
lda L95BF
clc
adc #$80
sta L95BF
jmp L953F
L95A2: lda L95BF
beq L95AA
return #$FF
2018-02-24 04:54:37 +00:00
2018-03-02 02:25:42 +00:00
L95AA: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL MGTK::PaintRect, $D6F8
return #$00
2018-02-24 04:54:37 +00:00
2018-02-24 05:07:11 +00:00
L95BF: .byte 0
2018-02-24 04:54:37 +00:00
L95C0: lda #$00
sta L9645
2018-03-02 02:25:42 +00:00
L95C5: MGTK_RELAY_CALL MGTK::GetEvent, event_params
lda event_kind
cmp #MGTK::event_kind_button_up
2018-02-24 04:54:37 +00:00
beq L9628
2018-03-15 04:10:08 +00:00
lda winfo_entry_picker
2018-03-02 02:25:42 +00:00
sta screentowindow_window_id
MGTK_RELAY_CALL MGTK::ScreenToWindow, screentowindow_params
MGTK_RELAY_CALL MGTK::MoveTo, screentowindow_windowx
MGTK_RELAY_CALL MGTK::InRect, $D700
2018-02-25 21:47:06 +00:00
cmp #MGTK::inrect_inside
2018-02-24 04:54:37 +00:00
beq L9602
lda L9645
beq L960A
jmp L95C5
L9602: lda L9645
bne L960A
jmp L95C5
2018-03-02 02:25:42 +00:00
L960A: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL MGTK::PaintRect, $D700
2018-02-24 04:54:37 +00:00
lda L9645
clc
adc #$80
sta L9645
jmp L95C5
L9628: lda L9645
beq L9630
return #$FF
2018-02-24 04:54:37 +00:00
2018-03-02 02:25:42 +00:00
L9630: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL MGTK::PaintRect, $D700
return #$01
2018-02-24 04:54:37 +00:00
2018-02-24 05:07:11 +00:00
L9645: .byte 0
2018-03-02 02:25:42 +00:00
L9646: MGTK_RELAY_CALL MGTK::GetEvent, event_params
lda event_kind
cmp #MGTK::event_kind_button_down
2018-02-24 04:54:37 +00:00
bne L9659
jmp L9660
2018-03-02 02:25:42 +00:00
L9659: cmp #MGTK::event_kind_key_down
2018-02-24 04:54:37 +00:00
bne L9646
jmp L9822
2018-03-02 02:25:42 +00:00
L9660: MGTK_RELAY_CALL MGTK::FindWindow, findwindow_params
lda findwindow_which_area
2018-02-24 04:54:37 +00:00
bne L9671
return #$FF
2018-02-24 04:54:37 +00:00
2018-03-02 02:25:42 +00:00
L9671: cmp #MGTK::area_content
2018-02-24 04:54:37 +00:00
beq L9678
return #$FF
2018-02-24 04:54:37 +00:00
2018-03-02 02:25:42 +00:00
L9678: lda findwindow_window_id
2018-03-15 04:10:08 +00:00
cmp winfo_entry_picker
2018-02-24 04:54:37 +00:00
beq L9683
return #$FF
2018-02-24 04:54:37 +00:00
2018-03-15 04:10:08 +00:00
L9683: lda winfo_entry_picker
2018-02-25 21:19:11 +00:00
jsr set_port_from_window_id
2018-03-15 04:10:08 +00:00
lda winfo_entry_picker
2018-03-02 02:25:42 +00:00
sta screentowindow_window_id
MGTK_RELAY_CALL MGTK::ScreenToWindow, screentowindow_params
MGTK_RELAY_CALL MGTK::MoveTo, screentowindow_windowx
MGTK_RELAY_CALL MGTK::InRect, $D6F8
2018-02-25 21:47:06 +00:00
cmp #MGTK::inrect_inside
2018-02-24 04:54:37 +00:00
bne L96C8
2018-03-02 02:25:42 +00:00
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL MGTK::PaintRect, $D6F8
2018-02-24 04:54:37 +00:00
jsr L953A
bmi L96C7
lda #$00
L96C7: rts
L96C8: MGTK_RELAY_CALL MGTK::InRect, $D700
2018-02-25 21:47:06 +00:00
cmp #MGTK::inrect_inside
2018-02-24 04:54:37 +00:00
bne L96EF
2018-03-02 02:25:42 +00:00
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL MGTK::PaintRect, $D700
2018-02-24 04:54:37 +00:00
jsr L95C0
bmi L96EE
lda #$01
L96EE: rts
L96EF: lda $D20D
sec
sbc #$0A
sta $D20D
lda $D20E
sbc #$00
sta $D20E
lda $D20F
sec
sbc #$19
sta $D20F
lda $D210
sbc #$00
sta $D210
bpl L9716
return #$FF
2018-02-24 04:54:37 +00:00
2018-02-26 00:20:20 +00:00
L9716: cmp16 $D20D, #$006E
2018-02-24 04:54:37 +00:00
bmi L9736
2018-02-26 00:20:20 +00:00
cmp16 $D20D, #$00DC
2018-02-24 04:54:37 +00:00
bmi L9732
lda #$02
bne L9738
L9732: lda #$01
bne L9738
L9736: lda #$00
L9738: pha
lsr16 $D20F
lsr16 $D20F
lsr16 $D20F
2018-02-24 04:54:37 +00:00
lda $D20F
cmp #$08
bcc L9756
pla
return #$FF
2018-02-24 04:54:37 +00:00
L9756: pla
asl a
asl a
asl a
clc
adc $D20F
sta L979C
cmp #$08
bcs L9782
cmp L938B
bcs L9790
L976A: cmp L938D
beq L977E
lda L938D
jsr L979D
lda L979C
sta L938D
jsr L979D
L977E: jsr LB445
rts
L9782: sec
sbc #$08
cmp L938C
bcs L9790
clc
adc #$08
jmp L976A
L9790: lda L938D
jsr L979D
lda #$FF
sta L938D
rts
2018-02-24 05:07:11 +00:00
L979C: .byte 0
2018-02-24 04:54:37 +00:00
L979D: bpl L97A0
rts
L97A0: pha
lsr a
lsr a
lsr a
tax
beq L97B6
cmp #$01
bne L97B2
addr_jump L97B6, $0069
2018-02-24 04:54:37 +00:00
L97B2: ldax #$00D2
2018-02-24 04:54:37 +00:00
L97B6: clc
adc #$09
sta $D877
txa
adc #$00
sta $D878
pla
cmp #$08
bcc L97D4
cmp #$10
bcs L97D1
sec
sbc #$08
jmp L97D4
L97D1: sec
sbc #$10
L97D4: asl a
asl a
asl a
clc
adc #$18
sta $D879
lda #$00
adc #$00
sta $D87A
add16 $D877, #$006A, $D87B
add16 $D879, #$0007, $D87D
2018-03-02 02:25:42 +00:00
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL MGTK::PaintRect, $D877
2018-03-02 02:25:42 +00:00
MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
2018-02-24 04:54:37 +00:00
rts
2018-03-15 03:38:47 +00:00
;; key down handler
L9822: lda event_modifiers
cmp #MGTK::event_modifier_solid_apple
bne :+
return #$FF
2018-03-15 03:38:47 +00:00
: lda event_key
2018-02-24 04:54:37 +00:00
and #$7F
2018-03-15 03:38:47 +00:00
cmp #CHAR_LEFT
bne :+
2018-02-24 04:54:37 +00:00
jmp L98F8
2018-03-15 03:38:47 +00:00
: cmp #CHAR_RIGHT
bne :+
2018-02-24 04:54:37 +00:00
jmp L98AC
2018-03-15 03:38:47 +00:00
: cmp #CHAR_RETURN
bne :+
2018-02-24 04:54:37 +00:00
jmp L985E
2018-03-15 03:38:47 +00:00
: cmp #CHAR_ESCAPE
bne :+
2018-02-24 04:54:37 +00:00
jmp L9885
2018-03-15 03:38:47 +00:00
: cmp #CHAR_DOWN
bne :+
2018-02-24 04:54:37 +00:00
jmp L9978
2018-03-15 03:38:47 +00:00
: cmp #CHAR_UP
bne :+
2018-02-24 04:54:37 +00:00
jmp L993F
2018-03-15 03:38:47 +00:00
: return #$FF
2018-02-24 04:54:37 +00:00
2018-03-02 02:25:42 +00:00
L985E: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL MGTK::PaintRect, $D6F8
2018-03-02 02:25:42 +00:00
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL MGTK::PaintRect, $D6F8
return #$00
2018-02-24 04:54:37 +00:00
2018-03-02 02:25:42 +00:00
L9885: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL MGTK::PaintRect, $D700
2018-03-02 02:25:42 +00:00
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL MGTK::PaintRect, $D700
return #$01
2018-02-24 04:54:37 +00:00
L98AC: lda L938B
ora L938C
beq L98F5
lda L938D
bpl L98CE
ldx #$00
lda L99DD
bpl L98EE
ldx #$08
lda L99E5
bpl L98EE
ldx #$10
lda L99ED
bpl L98EE
L98CE: lda L938D
jsr L979D
lda L938D
L98D7: clc
adc #$08
cmp #$18
bcc L98E4
sec
sbc #$20
jmp L98D7
L98E4: tax
lda L99DD,x
bpl L98EE
txa
jmp L98D7
L98EE: txa
sta L938D
jsr L979D
L98F5: return #$FF
2018-02-24 04:54:37 +00:00
L98F8: lda L938B
ora L938C
beq L993C
lda L938D
bpl L9917
ldx #$10
lda L99ED
bpl L9935
ldx #$08
lda L99E5
bpl L9935
lda #$00
beq L9936
L9917: lda L938D
jsr L979D
lda L938D
L9920: sec
sbc #$08
bpl L992B
clc
adc #$20
jmp L9920
L992B: tax
lda L99DD,x
bpl L9935
txa
jmp L9920
L9935: txa
L9936: sta L938D
jsr L979D
L993C: return #$FF
2018-02-24 04:54:37 +00:00
L993F: lda L938B
ora L938C
beq L9975
lda L938D
bpl L9956
ldx #$17
L994E: lda L99DD,x
bpl L996F
dex
bpl L994E
L9956: lda L938D
jsr L979D
ldx L938D
L995F: dex
bmi L996A
lda L99DD,x
bpl L996F
jmp L995F
L996A: ldx #$18
jmp L995F
L996F: sta L938D
jsr L979D
L9975: return #$FF
2018-02-24 04:54:37 +00:00
L9978: lda L938B
ora L938C
beq L99B0
lda L938D
bpl L998F
ldx #$00
L9987: lda L99DD,x
bpl L99AA
inx
bne L9987
L998F: lda L938D
jsr L979D
ldx L938D
L9998: inx
cpx #$18
bcs L99A5
lda L99DD,x
bpl L99AA
jmp L9998
L99A5: ldx #$FF
jmp L9998
L99AA: sta L938D
jsr L979D
L99B0: return #$FF
2018-02-24 04:54:37 +00:00
L99B3: ldx #$17
lda #$FF
L99B7: sta L99DD,x
dex
bpl L99B7
ldx #$00
L99BF: cpx L938B
beq L99CB
txa
sta L99DD,x
inx
bne L99BF
L99CB: ldx #$00
L99CD: cpx L938C
beq L99DC
txa
clc
adc #$08
sta L99E5,x
inx
bne L99CD
L99DC: rts
2018-02-24 05:07:11 +00:00
L99DD: .byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
L99E5: .byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
L99ED: .byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
2018-03-02 02:25:42 +00:00
L99F5: MGTK_RELAY_CALL MGTK::SetPenMode, pencopy
MGTK_RELAY_CALL MGTK::PaintRect, $D87F
2018-02-24 04:54:37 +00:00
rts
rts
rts
L9A0A: cmp #$08
bcc L9A11
jmp L9A61
L9A11: sta L9A60
tya
pha
lda L9A60
jsr L9BD5
2018-02-26 00:10:27 +00:00
stax $06
2018-02-24 04:54:37 +00:00
lda L9A60
jsr L9BEF
2018-02-26 00:10:27 +00:00
stax $08
2018-02-24 04:54:37 +00:00
ldy $D443
L9A2D: lda $D443,y
sta ($06),y
sta ($08),y
dey
bpl L9A2D
ldy #$0F
pla
sta ($06),y
sta ($08),y
lda L9A60
jsr L9BE2
2018-02-26 00:10:27 +00:00
stax $06
2018-02-24 04:54:37 +00:00
lda L9A60
jsr L9BFC
2018-02-26 00:10:27 +00:00
stax $08
2018-02-24 04:54:37 +00:00
ldy $D402
L9A55: lda $D402,y
sta ($06),y
sta ($08),y
dey
bpl L9A55
rts
2018-02-24 05:07:11 +00:00
L9A60: .byte 0
2018-02-24 04:54:37 +00:00
L9A61: sta L9A96
tya
pha
lda L9A96
jsr L9BD5
2018-02-26 00:10:27 +00:00
stax $06
2018-02-24 04:54:37 +00:00
ldy $D443
L9A73: lda $D443,y
sta ($06),y
dey
bpl L9A73
ldy #$0F
pla
sta ($06),y
lda L9A96
jsr L9BE2
2018-02-26 00:10:27 +00:00
stax $06
2018-02-24 04:54:37 +00:00
ldy $D402
L9A8D: lda $D402,y
sta ($06),y
dey
bpl L9A8D
rts
2018-02-24 05:07:11 +00:00
L9A96: .byte 0
2018-02-24 04:54:37 +00:00
L9A97: sta L9BD4
cmp #$08
bcc L9AA1
jmp L9B5F
L9AA1: tax
inx
cpx L938B
bne L9AC0
L9AA8: dec $0C00
dec L938B
2018-02-26 03:40:53 +00:00
copy16 $DB1C, @addr
@addr := *+1
dec dummy1234
2018-02-24 04:54:37 +00:00
jmp L9CEA
L9AC0: lda L9BD4
cmp L938B
beq L9AA8
jsr L9BD5
2018-02-26 00:10:27 +00:00
stax $06
2018-02-24 04:54:37 +00:00
lda $06
adc #$10
sta $08
lda $07
adc #$00
sta $09
ldy #$00
lda ($08),y
tay
L9AE0: lda ($08),y
sta ($06),y
dey
bpl L9AE0
ldy #$0F
lda ($08),y
sta ($06),y
lda L9BD4
jsr L9BEF
2018-02-26 00:10:27 +00:00
stax $06
2018-02-24 04:54:37 +00:00
lda $06
adc #$10
sta $08
lda $07
adc #$00
sta $09
ldy #$00
lda ($08),y
tay
L9B08: lda ($08),y
sta ($06),y
dey
bpl L9B08
ldy #$0F
lda ($08),y
sta ($06),y
lda L9BD4
jsr L9BE2
2018-02-26 00:10:27 +00:00
stax $06
2018-02-24 04:54:37 +00:00
lda $06
adc #$40
sta $08
lda $07
adc #$00
sta $09
ldy #$00
lda ($08),y
tay
L9B30: lda ($08),y
sta ($06),y
dey
bpl L9B30
lda L9BD4
jsr L9BFC
2018-02-26 00:10:27 +00:00
stax $06
2018-02-24 04:54:37 +00:00
lda $06
adc #$40
sta $08
lda $07
adc #$00
sta $09
ldy #$00
lda ($08),y
tay
L9B52: lda ($08),y
sta ($06),y
dey
bpl L9B52
inc L9BD4
jmp L9AC0
L9B5F: sec
sbc #$07
cmp L938C
bne L9B70
dec $0C01
dec L938C
jmp L9CEA
L9B70: lda L9BD4
sec
sbc #$08
cmp L938C
bne L9B84
dec $0C01
dec L938C
jmp L9CEA
L9B84: lda L9BD4
jsr L9BD5
2018-02-26 00:10:27 +00:00
stax $06
2018-02-24 04:54:37 +00:00
lda $06
adc #$10
sta $08
lda $07
adc #$00
sta $09
ldy #$00
lda ($08),y
tay
L9B9F: lda ($08),y
sta ($06),y
dey
bpl L9B9F
lda L9BD4
jsr L9BE2
2018-02-26 00:10:27 +00:00
stax $06
2018-02-24 04:54:37 +00:00
lda $06
adc #$40
sta $08
lda $07
adc #$00
sta $09
ldy #$00
lda ($08),y
tay
L9BC1: lda ($08),y
sta ($06),y
dey
bpl L9BC1
ldy #$0F
lda ($08),y
sta ($06),y
inc L9BD4
jmp L9B70
2018-02-24 05:07:11 +00:00
L9BD4: .byte 0
2018-02-24 04:54:37 +00:00
L9BD5: jsr L9D8D
clc
adc #$02
tay
txa
adc #$0C
tax
tya
rts
L9BE2: jsr L9DA7
clc
adc #$82
tay
txa
adc #$0D
tax
tya
rts
L9BEF: jsr L9D8D
clc
adc #$1E
tay
txa
adc #$DB
tax
tya
rts
L9BFC: jsr L9DA7
clc
adc #$9E
tay
txa
adc #$DB
tax
tya
rts
L9C09: sta $D2AC
2018-02-25 21:19:11 +00:00
yax_call launch_dialog, $0C, $D2AC
2018-02-24 04:54:37 +00:00
rts
2018-02-26 04:28:23 +00:00
DEFINE_OPEN_PARAMS open_params, $1C00, $800
DEFINE_WRITE_PARAMS write_params, $C00, $800
DEFINE_CLOSE_PARAMS flush_close_params
2018-02-26 03:40:53 +00:00
L9C26: addr_call L9E2A, $1C00
2018-02-24 04:54:37 +00:00
inc $1C00
ldx $1C00
lda #$2F
sta $1C00,x
ldx #$00
ldy $1C00
L9C3D: inx
iny
lda L9C9A,x
sta $1C00,y
cpx L9C9A
bne L9C3D
sty $1C00
2018-02-26 03:40:53 +00:00
L9C4D: yax_call MLI_RELAY, OPEN, open_params
2018-02-24 04:54:37 +00:00
beq L9C60
lda #$00
jsr L9C09
beq L9C4D
L9C5F: rts
2018-02-26 03:40:53 +00:00
L9C60: lda open_params::ref_num
sta write_params::ref_num
sta flush_close_params::ref_num
L9C69: yax_call MLI_RELAY, WRITE, write_params
2018-02-24 04:54:37 +00:00
beq L9C81
pha
2018-02-25 07:19:29 +00:00
jsr JUMP_TABLE_REDRAW_ALL
2018-02-24 04:54:37 +00:00
pla
2018-02-25 07:19:29 +00:00
jsr JUMP_TABLE_ALERT_0
2018-02-24 04:54:37 +00:00
beq L9C69
jmp L9C5F
2018-02-26 03:40:53 +00:00
L9C81: yax_call MLI_RELAY, FLUSH, flush_close_params
yax_call MLI_RELAY, CLOSE, flush_close_params
2018-02-24 04:54:37 +00:00
rts
2018-02-26 04:28:23 +00:00
DEFINE_OPEN_PARAMS open_params2, $9C9A, $800
2018-02-26 03:40:53 +00:00
2018-02-24 05:07:11 +00:00
L9C9A: PASCAL_STRING "Selector.List"
2018-02-26 04:28:23 +00:00
DEFINE_READ_PARAMS read_params2, $C00, $800
DEFINE_WRITE_PARAMS write_params2, $C00, $800
DEFINE_CLOSE_PARAMS close_params2
2018-02-26 03:40:53 +00:00
L9CBA: yax_call MLI_RELAY, OPEN, open_params2
2018-02-24 04:54:37 +00:00
beq L9CCF
lda #$00
jsr L9C09
beq L9CBA
return #$FF
2018-02-24 04:54:37 +00:00
2018-02-26 03:40:53 +00:00
L9CCF: lda open_params2::ref_num
sta read_params2::ref_num
yax_call MLI_RELAY, READ, read_params2
2018-02-24 04:54:37 +00:00
bne L9CE9
2018-02-26 03:40:53 +00:00
yax_call MLI_RELAY, CLOSE, close_params2
2018-02-24 04:54:37 +00:00
L9CE9: rts
2018-02-26 03:40:53 +00:00
L9CEA: yax_call MLI_RELAY, OPEN, open_params2
2018-02-24 04:54:37 +00:00
beq L9CFF
2018-02-26 03:40:53 +00:00
lda #0
2018-02-24 04:54:37 +00:00
jsr L9C09
beq L9CBA
return #$FF
2018-02-24 04:54:37 +00:00
2018-02-26 03:40:53 +00:00
L9CFF: lda open_params2::ref_num
sta write_params2::ref_num
L9D05: yax_call MLI_RELAY, WRITE, write_params2
2018-02-24 04:54:37 +00:00
beq L9D18
2018-02-25 07:19:29 +00:00
jsr JUMP_TABLE_ALERT_0
2018-02-24 04:54:37 +00:00
beq L9D05
jmp L9D21
2018-02-26 03:40:53 +00:00
L9D18: yax_call MLI_RELAY, CLOSE, close_params2
2018-02-24 04:54:37 +00:00
L9D21: rts
L9D22: jsr L9CBA
bpl L9D28
rts
L9D28: lda $0C00
sta L938B
beq L9D55
lda #$00
sta L9D8C
L9D35: lda L9D8C
cmp L938B
beq L9D55
jsr L9D8D
clc
adc #$02
pha
txa
adc #$0C
tax
pla
ldy L9D8C
jsr L942B
inc L9D8C
jmp L9D35
L9D55: lda $0C01
sta L938C
beq L9D89
lda #$00
sta L9D8C
L9D62: lda L9D8C
cmp L938C
beq L9D89
clc
adc #$08
jsr L9D8D
clc
adc #$02
pha
txa
adc #$0C
tax
lda L9D8C
clc
adc #$08
tay
pla
jsr L942B
inc L9D8C
jmp L9D62
L9D89: return #$00
2018-02-24 04:54:37 +00:00
2018-02-24 05:07:11 +00:00
L9D8C: .byte 0
2018-02-24 04:54:37 +00:00
L9D8D: ldx #$00
stx L9DA6
asl a
rol L9DA6
asl a
rol L9DA6
asl a
rol L9DA6
asl a
rol L9DA6
ldx L9DA6
rts
2018-02-24 05:07:11 +00:00
L9DA6: .byte 0
2018-02-24 04:54:37 +00:00
L9DA7: ldx #$00
stx L9DC8
asl a
rol L9DC8
asl a
rol L9DC8
asl a
rol L9DC8
asl a
rol L9DC8
asl a
rol L9DC8
asl a
rol L9DC8
ldx L9DC8
rts
2018-02-24 05:07:11 +00:00
L9DC8: .byte 0
2018-02-25 21:52:16 +00:00
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-26 03:40:53 +00:00
2018-02-25 21:52:16 +00:00
.proc MLI_RELAY
sty call
stax params
2018-02-24 04:54:37 +00:00
php
sei
sta ALTZPOFF
2018-02-25 21:47:06 +00:00
sta ROMIN2
2018-02-24 04:54:37 +00:00
jsr MLI
2018-02-25 21:52:16 +00:00
call: .byte 0
params: .addr 0
2018-02-24 04:54:37 +00:00
sta ALTZPON
tax
lda LCBANK1
lda LCBANK1
plp
txa
rts
2018-02-25 21:52:16 +00:00
.endproc
2018-02-24 04:54:37 +00:00
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-26 03:40:53 +00:00
2018-02-24 04:54:37 +00:00
L9DED: sta ALTZPOFF
lda $C083
lda $C083
lda $D3FF
tax
sta ALTZPON
lda LCBANK1
lda LCBANK1
txa
rts
L9E05: stax L9E1B
2018-02-24 04:54:37 +00:00
sta ALTZPOFF
lda $C083
lda $C083
ldx $D3EE
L9E17: lda $D3EE,x
.byte $9D
2018-02-25 21:47:06 +00:00
L9E1B: .addr $1234
2018-02-24 04:54:37 +00:00
dex
bpl L9E17
sta ALTZPON
lda LCBANK1
lda LCBANK1
rts
L9E2A: stax L9E40
2018-02-24 04:54:37 +00:00
sta ALTZPOFF
lda $C083
lda $C083
ldx $D3AD
L9E3C: lda $D3AD,x
.byte $9D
2018-02-25 21:47:06 +00:00
L9E40: .addr $1234
2018-02-24 04:54:37 +00:00
dex
bpl L9E3C
sta ALTZPON
lda LCBANK1
lda LCBANK1
rts
2018-02-26 05:03:58 +00:00
DEFINE_GET_FILE_INFO_PARAMS get_file_info_params, 0
2018-02-26 03:40:53 +00:00
2018-02-24 04:54:37 +00:00
L9E61: jsr L9E74
2018-02-26 03:40:53 +00:00
stax get_file_info_params::pathname
yax_call MLI_RELAY, GET_FILE_INFO, get_file_info_params
2018-02-24 04:54:37 +00:00
rts
L9E74: sta L9EBF
addr_call L9E05, $9EC1
2018-02-24 04:54:37 +00:00
lda L9EBF
jsr L9BE2
2018-02-26 00:10:27 +00:00
stax $06
2018-02-24 04:54:37 +00:00
ldy #$00
lda ($06),y
sta L9EC0
tay
L9E90: lda ($06),y
and #$7F
cmp #$2F
beq L9E9B
dey
bne L9E90
L9E9B: dey
L9E9C: lda ($06),y
and #$7F
cmp #$2F
beq L9EA7
dey
bne L9E9C
L9EA7: dey
ldx L9EC1
L9EAB: inx
iny
lda ($06),y
sta L9EC1,x
cpy L9EC0
bne L9EAB
stx L9EC1
ldax #$9EC1
2018-02-24 04:54:37 +00:00
rts
2018-02-24 05:07:11 +00:00
L9EBF: .byte 0
L9EC0: .byte 0
L9EC1: .byte 0
;; how much is buffer, how much is padding?
2018-03-05 05:36:00 +00:00
;;; ============================================================
2018-02-25 23:19:38 +00:00
2018-02-24 05:07:11 +00:00
PAD_TO $A000
2018-02-25 23:19:38 +00:00
.endproc ; selector_overlay2