ovl2 wrangling

This commit is contained in:
Joshua Bell 2018-02-24 23:19:29 -08:00
parent 59b0489c0a
commit 981224920d
8 changed files with 400 additions and 673 deletions

View File

@ -26,8 +26,8 @@ JUMP_TABLE_COPY_TO_BUF := $4024 ; Copy to buffer
JUMP_TABLE_COPY_FROM_BUF:= $4027 ; Copy from buffer JUMP_TABLE_COPY_FROM_BUF:= $4027 ; Copy from buffer
JUMP_TABLE_NOOP := $402A ; No-Op command (RTS) JUMP_TABLE_NOOP := $402A ; No-Op command (RTS)
JUMP_TABLE_2D := $402D ; ??? (Draw type/size/date in non-icon views?) JUMP_TABLE_2D := $402D ; ??? (Draw type/size/date in non-icon views?)
JUMP_TABLE_30 := $4030 ; Show alert 0 JUMP_TABLE_ALERT_0 := $4030 ; Show alert 0
JUMP_TABLE_33 := $4033 ; Show alert X JUMP_TABLE_ALERT_X := $4033 ; Show alert X
JUMP_TABLE_LAUNCH_FILE := $4036 ; Launch file JUMP_TABLE_LAUNCH_FILE := $4036 ; Launch file
JUMP_TABLE_CUR_POINTER := $4039 ; Changes mouse cursor to pointer * JUMP_TABLE_CUR_POINTER := $4039 ; Changes mouse cursor to pointer *
JUMP_TABLE_CUR_WATCH := $403C ; Changes mouse cursor to watch JUMP_TABLE_CUR_WATCH := $403C ; Changes mouse cursor to watch

View File

@ -8,10 +8,10 @@ the rest to a RAM card (if available), then invoking the main app.
## DESKTOP2.$F1 ## DESKTOP2.$F1
This is large - 111k. It includes a loader, the DeskTop app (with both This is large - 111k. It includes a loader and the DeskTop app with
main memory and aux memory segments, filling everything from $4000 to both main memory and aux memory segments, filling everything from
$FFFF (except for I/O space and ProDOS), and still having more code $4000 to $FFFF (except for I/O space and ProDOS), and still having
segments swapped in dynamically. more code segments swapped in dynamically.
The file is broken down into multiple segments: The file is broken down into multiple segments:

View File

@ -19343,40 +19343,50 @@ LB76C: stax $06
addr_call_indirect draw_text1, $06 addr_call_indirect draw_text1, $06
rts rts
LB781: stx $0B ;;; ==================================================
sta $0A ;;; Adjust case in a filename (input buf A,X, output buf $A)
ldy #$00 ;;; Called from ovl2
lda ($0A),y
.proc adjust_case
ptr := $A
stx ptr+1
sta ptr
ldy #0
lda (ptr),y
tay tay
bne LB78D bne loop
rts rts
loop: dey
beq done
bpl :+
done: rts
LB78D: dey : lda (ptr),y
beq LB792
bpl LB793
LB792: rts
LB793: lda ($0A),y
and #$7F and #$7F
cmp #$2F cmp #'/'
beq LB79F beq :+
cmp #$2E cmp #'.'
bne LB7A3 bne check_alpha
LB79F: dey : dey
jmp LB78D jmp loop
LB7A3: iny check_alpha:
lda ($0A),y iny
lda (ptr),y
and #$7F and #$7F
cmp #$41 cmp #'A'
bcc LB7B5 bcc :+
cmp #$5B cmp #'Z'+1
bcs LB7B5 bcs :+
clc clc
adc #$20 adc #('a' - 'A') ; Lowercase
sta ($0A),y sta (ptr),y
LB7B5: dey : dey
jmp LB78D jmp loop
.endproc
;;; ==================================================
.proc set_port_from_window_id .proc set_port_from_window_id
sta getwinport_params2::window_id sta getwinport_params2::window_id
@ -20123,7 +20133,7 @@ LBE68: lda ($06),y
sta path_buf0,y sta path_buf0,y
dey dey
bpl LBE68 bpl LBE68
addr_call LB781, path_buf0 addr_call adjust_case, path_buf0
rts rts
LBE78: ldy #$00 LBE78: ldy #$00
@ -20133,7 +20143,7 @@ LBE7D: lda ($06),y
sta path_buf1,y sta path_buf1,y
dey dey
bpl LBE7D bpl LBE7D
addr_call LB781, path_buf1 addr_call adjust_case, path_buf1
rts rts
LBE8D: jsr set_fill_white LBE8D: jsr set_fill_white

File diff suppressed because it is too large Load Diff

View File

@ -15,10 +15,6 @@
.org $9000 .org $9000
L4015 := $4015
L4030 := $4030
L4036 := $4036
L403F := $403F
L5000 := $5000 L5000 := $5000
L6365 := $6365 L6365 := $6365
LA500 := $A500 LA500 := $A500
@ -50,7 +46,7 @@ L9017: lda $0C00
jsr L9DED jsr L9DED
cmp #$80 cmp #$80
bne L9015 bne L9015
jsr L4015 jsr JUMP_TABLE_REDRAW_ALL
lda #$06 lda #$06
jsr L9C09 jsr L9C09
bne L9015 bne L9015
@ -81,8 +77,8 @@ L9052: lda #$00
tya tya
pha pha
lda #$07 lda #$07
jsr L403F jsr JUMP_TABLE_RESTORE_SEG
jsr L4015 jsr JUMP_TABLE_REDRAW_ALL
pla pla
tay tay
pla pla
@ -250,8 +246,8 @@ L91BC: clc
tya tya
pha pha
lda #$07 lda #$07
jsr L403F jsr JUMP_TABLE_RESTORE_SEG
jsr L4015 jsr JUMP_TABLE_REDRAW_ALL
pla pla
tay tay
pla pla
@ -415,7 +411,7 @@ L931B: iny
stx $D345 stx $D345
lda L938A lda L938A
sta $D355 sta $D355
jsr L4036 jsr JUMP_TABLE_LAUNCH_FILE
jsr LB403 jsr LB403
lda #$FF lda #$FF
sta L938D sta L938D
@ -426,8 +422,8 @@ L933F: pha
cmp #$02 cmp #$02
bne L934F bne L934F
lda #$07 lda #$07
jsr L403F jsr JUMP_TABLE_RESTORE_SEG
jsr L4015 jsr JUMP_TABLE_REDRAW_ALL
L934F: MGTK_RELAY_CALL MGTK::InitPort, $D239 L934F: MGTK_RELAY_CALL MGTK::InitPort, $D239
MGTK_RELAY_CALL MGTK::SetPort, $D239 MGTK_RELAY_CALL MGTK::SetPort, $D239
MGTK_RELAY_CALL MGTK::CloseWindow, $D665 MGTK_RELAY_CALL MGTK::CloseWindow, $D665
@ -1370,9 +1366,9 @@ L9C60: lda L9C1B
L9C69: yax_call L9DC9, $CB, $9C1C L9C69: yax_call L9DC9, $CB, $9C1C
beq L9C81 beq L9C81
pha pha
jsr L4015 jsr JUMP_TABLE_REDRAW_ALL
pla pla
jsr L4030 jsr JUMP_TABLE_ALERT_0
beq L9C69 beq L9C69
jmp L9C5F jmp L9C5F
@ -1428,7 +1424,7 @@ L9CFF: lda L9C99
sta L9CB1 sta L9CB1
L9D05: yax_call L9DC9, $CB, $9CB0 L9D05: yax_call L9DC9, $CB, $9CB0
beq L9D18 beq L9D18
jsr L4030 jsr JUMP_TABLE_ALERT_0
beq L9D05 beq L9D05
jmp L9D21 jmp L9D21

View File

@ -27,8 +27,6 @@
dialog_rect1 := $DA9E dialog_rect1 := $DA9E
dialog_rect2 := $DAAA dialog_rect2 := $DAAA
L4030 := $4030
;;; Routines in common overlay segment ($5000-$6FFF) ;;; Routines in common overlay segment ($5000-$6FFF)
L5106 := $5106 L5106 := $5106
L55BA := $55BA L55BA := $55BA
@ -209,7 +207,7 @@ L7178: jsr L6D27
L7189: addr_call L647C, path_buf0 L7189: addr_call L647C, path_buf0
beq L7198 beq L7198
L7192: lda #$40 L7192: lda #$40
jsr L4030 jsr JUMP_TABLE_ALERT_0
rts rts
L7198: addr_call L647C, path_buf1 L7198: addr_call L647C, path_buf1

View File

@ -27,8 +27,6 @@
dialog_rect1 := $DA9E dialog_rect1 := $DA9E
dialog_rect2 := $DAAA dialog_rect2 := $DAAA
L4030 := $4030
;;; Routines in common overlay segment ($5000-$6FFF) ;;; Routines in common overlay segment ($5000-$6FFF)
L5106 := $5106 L5106 := $5106
L55BA := $55BA L55BA := $55BA
@ -112,7 +110,7 @@ L7087: entry 0, L70B1
L70B1: addr_call L647C, path_buf0 L70B1: addr_call L647C, path_buf0
beq L70C0 beq L70C0
lda #$40 lda #$40
jsr L4030 jsr JUMP_TABLE_ALERT_0
rts rts
L70C0: MGTK_RELAY_CALL MGTK::CloseWindow, winfo15 L70C0: MGTK_RELAY_CALL MGTK::CloseWindow, winfo15

View File

@ -27,8 +27,6 @@
dialog_rect1 := $DA9E dialog_rect1 := $DA9E
dialog_rect2 := $DAAA dialog_rect2 := $DAAA
L4030 := $4030
L5106 := $5106 L5106 := $5106
L55BA := $55BA L55BA := $55BA
L5CF7 := $5CF7 L5CF7 := $5CF7
@ -279,11 +277,11 @@ L72BF: copy16 #$0601, $D484
jmp L72EE jmp L72EE
L72E2: lda #$40 L72E2: lda #$40
jsr L4030 jsr JUMP_TABLE_ALERT_0
L72E7: rts L72E7: rts
L72E8: lda #$FB L72E8: lda #$FB
jsr L4030 jsr JUMP_TABLE_ALERT_0
rts rts
L72EE: MGTK_RELAY_CALL MGTK::InitPort, grafport3 L72EE: MGTK_RELAY_CALL MGTK::InitPort, grafport3