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_NOOP := $402A ; No-Op command (RTS)
JUMP_TABLE_2D := $402D ; ??? (Draw type/size/date in non-icon views?)
JUMP_TABLE_30 := $4030 ; Show alert 0
JUMP_TABLE_33 := $4033 ; Show alert X
JUMP_TABLE_ALERT_0 := $4030 ; Show alert 0
JUMP_TABLE_ALERT_X := $4033 ; Show alert X
JUMP_TABLE_LAUNCH_FILE := $4036 ; Launch file
JUMP_TABLE_CUR_POINTER := $4039 ; Changes mouse cursor to pointer *
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
This is large - 111k. It includes a loader, the DeskTop app (with both
main memory and aux memory segments, filling everything from $4000 to
$FFFF (except for I/O space and ProDOS), and still having more code
segments swapped in dynamically.
This is large - 111k. It includes a loader and the DeskTop app with
both main memory and aux memory segments, filling everything from
$4000 to $FFFF (except for I/O space and ProDOS), and still having
more code segments swapped in dynamically.
The file is broken down into multiple segments:

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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