mirror of
https://github.com/mi57730/a2d.git
synced 2024-12-01 05:50:24 +00:00
overlay 6
This commit is contained in:
parent
6225082ec6
commit
8ac6630bcf
23
desktop.inc
23
desktop.inc
@ -79,6 +79,29 @@ label := *
|
||||
.endmacro
|
||||
|
||||
|
||||
;;; ==================================================
|
||||
;;; Relays from Main to Aux (params must be in ZP or LC)
|
||||
|
||||
MGTK_RELAY := $D000
|
||||
DESKTOP_RELAY := $D040
|
||||
|
||||
.macro MGTK_RELAY_CALL call, addr
|
||||
.if .paramcount > 1
|
||||
yax_call MGTK_RELAY, (call), (addr)
|
||||
.else
|
||||
yax_call MGTK_RELAY, (call), 0
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
.macro DESKTOP_RELAY_CALL call, addr
|
||||
.if .paramcount > 1
|
||||
yax_call DESKTOP_RELAY, (call), (addr)
|
||||
.else
|
||||
yax_call DESKTOP_RELAY, (call), 0
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
|
||||
;;; ==================================================
|
||||
;;; Internals - Windows (paths) and Icons (files)
|
||||
|
||||
|
@ -4,7 +4,7 @@ CAFLAGS = --target apple2enh --list-bytes 0
|
||||
CCFLAGS = --config asm.cfg
|
||||
|
||||
TARGETS = loader.built mgtk.built desktop.built invoker.built \
|
||||
ovl1.built ovl5.built
|
||||
ovl1.built ovl5.built ovl6.built
|
||||
|
||||
.PHONY: clean all
|
||||
all: $(TARGETS)
|
||||
|
@ -18,13 +18,6 @@ INVOKER_FILENAME := $280 ; File to invoke (PREFIX must be set)
|
||||
dummy0000 := $0000 ; overwritten by self-modified code
|
||||
dummy1234 := $1234 ; overwritten by self-modified code
|
||||
|
||||
.macro MGTK_RELAY_CALL call, addr
|
||||
.if .paramcount > 1
|
||||
yax_call MGTK_RELAY, (call), (addr)
|
||||
.else
|
||||
yax_call MGTK_RELAY, (call), 0
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
;;; ==================================================
|
||||
;;; Segment loaded into AUX $851F-$BFFF (follows MGTK)
|
||||
@ -4111,8 +4104,9 @@ addr: .addr 0
|
||||
|
||||
;;; ==================================================
|
||||
;;; MGTK call from main>aux, call in Y, params at (X,A)
|
||||
.proc MGTK_RELAY
|
||||
.assert * = $D000, error, "Entry point mismatch"
|
||||
|
||||
.proc MGTK_RELAY_IMPL
|
||||
.assert * = MGTK_RELAY, error, "Entry point mismatch"
|
||||
sty addr-1
|
||||
stax addr
|
||||
sta RAMRDON
|
||||
@ -4142,7 +4136,8 @@ addr: .addr 0
|
||||
;;; ==================================================
|
||||
;;; DESKTOP call from main>aux, call in Y params at (X,A)
|
||||
|
||||
.proc DESKTOP_RELAY
|
||||
.proc DESKTOP_RELAY_IMPL
|
||||
.assert * = DESKTOP_RELAY, error, "Entry point mismatch"
|
||||
sty addr-1
|
||||
stax addr
|
||||
sta RAMRDON
|
||||
@ -4155,16 +4150,6 @@ addr: .addr 0
|
||||
rts
|
||||
.endproc
|
||||
|
||||
.macro DESKTOP_RELAY_CALL call, addr
|
||||
ldy #(call)
|
||||
.if .paramcount > 1
|
||||
ldax #(addr)
|
||||
.else
|
||||
ldax #0
|
||||
.endif
|
||||
jsr DESKTOP_RELAY
|
||||
.endmacro
|
||||
|
||||
;;; ==================================================
|
||||
;;; Used/Free icon map (Aux $1F80 - $1FFF)
|
||||
|
||||
|
BIN
desktop/orig/DESKTOP2_ovl6
Normal file
BIN
desktop/orig/DESKTOP2_ovl6
Normal file
Binary file not shown.
@ -9,9 +9,6 @@
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
|
||||
MGTK_RELAY := $D000
|
||||
DESKTOP_RELAY := $D040
|
||||
|
||||
;;; ==================================================
|
||||
;;; Overlay for Disk Copy
|
||||
;;; ==================================================
|
||||
@ -78,9 +75,9 @@ str_desktop2:
|
||||
|
||||
start: lda #$80
|
||||
sta ptr
|
||||
yax_call DESKTOP_RELAY, $6, $0
|
||||
yax_call MGTK_RELAY, MGTK::CloseAll, $0
|
||||
yax_call MGTK_RELAY, MGTK::SetZP1, ptr
|
||||
DESKTOP_RELAY_CALL $6, $0
|
||||
MGTK_RELAY_CALL MGTK::CloseAll, $0
|
||||
MGTK_RELAY_CALL MGTK::SetZP1, ptr
|
||||
|
||||
;; Copy menu bar up to language card, and use it.
|
||||
ldx #.sizeof(menu_bar)
|
||||
@ -88,7 +85,7 @@ start: lda #$80
|
||||
sta $D400,x
|
||||
dex
|
||||
bpl :-
|
||||
yax_call MGTK_RELAY, MGTK::SetMenu, menu_target
|
||||
MGTK_RELAY_CALL MGTK::SetMenu, menu_target
|
||||
|
||||
;; Clear most of the system bitmap
|
||||
ldx #BITMAP_SIZE - 3
|
||||
|
@ -8,9 +8,6 @@
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
|
||||
MGTK_RELAY := $D000
|
||||
DESKTOP_RELAY := $D040
|
||||
|
||||
;;; ==================================================
|
||||
;;; Overlay for File Copy
|
||||
;;; ==================================================
|
||||
@ -87,11 +84,11 @@ L7052: lda winfo12
|
||||
addr_call L5E0A, $DA67 ; "Copy a File ..."
|
||||
addr_call L5E57, $DA77 ; "Source filename:"
|
||||
addr_call L5E6F, $DA88 ; "Destination filename:"
|
||||
yax_call MGTK_RELAY, MGTK::SetPenMode, $D202 ; penXOR
|
||||
yax_call MGTK_RELAY, MGTK::FrameRect, $DA9E
|
||||
yax_call MGTK_RELAY, MGTK::FrameRect, $DAAA
|
||||
yax_call MGTK_RELAY, MGTK::InitPort, $D239 ; grafport3
|
||||
yax_call MGTK_RELAY, MGTK::SetPort, $D239
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, $D202 ; penXOR
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, $DA9E
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, $DAAA
|
||||
MGTK_RELAY_CALL MGTK::InitPort, $D239 ; grafport3
|
||||
MGTK_RELAY_CALL MGTK::SetPort, $D239
|
||||
rts
|
||||
|
||||
.macro entry arg1, arg2
|
||||
@ -182,7 +179,7 @@ L7156: lda path_buf0,x
|
||||
beq L7162
|
||||
dex
|
||||
bne L7156
|
||||
L7162: ldy #$02
|
||||
L7162: ldy #2
|
||||
dex
|
||||
L7165: cpx path_buf0
|
||||
beq L7178
|
||||
@ -212,8 +209,8 @@ L7192: lda #$40
|
||||
|
||||
L7198: addr_call L647C, path_buf1
|
||||
bne L7192
|
||||
yax_call MGTK_RELAY, MGTK::CloseWindow, winfo15
|
||||
yax_call MGTK_RELAY, MGTK::CloseWindow, winfo12
|
||||
MGTK_RELAY_CALL MGTK::CloseWindow, winfo15
|
||||
MGTK_RELAY_CALL MGTK::CloseWindow, winfo12
|
||||
lda #0
|
||||
sta $50A8
|
||||
lda #0
|
||||
@ -231,8 +228,8 @@ L71C0: copy16 #path_buf0, $6
|
||||
|
||||
;;; ==================================================
|
||||
|
||||
L71D8: yax_call MGTK_RELAY, MGTK::CloseWindow, winfo15
|
||||
yax_call MGTK_RELAY, MGTK::CloseWindow, winfo12
|
||||
L71D8: MGTK_RELAY_CALL MGTK::CloseWindow, winfo15
|
||||
MGTK_RELAY_CALL MGTK::CloseWindow, winfo12
|
||||
lda #0
|
||||
sta $D8EC
|
||||
jsr L55BA
|
||||
@ -282,7 +279,7 @@ L7209: lda L709B+1,x
|
||||
bit $D8F0
|
||||
bpl L726D
|
||||
jsr L5E87
|
||||
lda #$00
|
||||
lda #0
|
||||
jsr L6227
|
||||
jsr L5F5B
|
||||
jsr L6161
|
||||
|
139
desktop/ovl6.s
Normal file
139
desktop/ovl6.s
Normal file
@ -0,0 +1,139 @@
|
||||
.setcpu "6502"
|
||||
|
||||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/auxmem.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
|
||||
;;; ==================================================
|
||||
;;; Overlay for File Delete
|
||||
;;; ==================================================
|
||||
|
||||
.proc file_delete_overlay
|
||||
.org $7000
|
||||
|
||||
winfo12 := $D5B7
|
||||
winfo15 := $D5F1
|
||||
|
||||
path_buf0 := $D402
|
||||
path_buf1 := $D443
|
||||
path_buf2 := $D484
|
||||
|
||||
grafport3 := $D239
|
||||
|
||||
L4030 := $4030
|
||||
|
||||
;;; Routines in common overlay segment ($5000-$6FFF)
|
||||
L5106 := $5106
|
||||
L55BA := $55BA
|
||||
L5CF7 := $5CF7
|
||||
L5E0A := $5E0A
|
||||
L5E57 := $5E57
|
||||
L5E87 := $5E87
|
||||
L5F5B := $5F5B
|
||||
L606D := $606D
|
||||
L6161 := $6161
|
||||
L61B1 := $61B1
|
||||
L62C8 := $62C8
|
||||
L647C := $647C
|
||||
L6D27 := $6D27
|
||||
L6D30 := $6D30
|
||||
|
||||
jsr L5CF7
|
||||
jsr L704D
|
||||
jsr L5E87
|
||||
jsr L5F5B
|
||||
jsr L6161
|
||||
jsr L61B1
|
||||
jsr L606D
|
||||
jsr L7026
|
||||
jsr L6D30
|
||||
jsr L6D27
|
||||
lda #$FF
|
||||
sta $D8EC
|
||||
jmp L5106
|
||||
|
||||
L7026: ldx L7086
|
||||
L7029: lda L7087,x
|
||||
sta $6D1E,x
|
||||
dex
|
||||
lda L7087,x
|
||||
sta $6D1E,x
|
||||
dex
|
||||
dex
|
||||
bpl L7029
|
||||
lda #$00
|
||||
sta path_buf0
|
||||
sta $51AE
|
||||
lda #$01
|
||||
sta path_buf2
|
||||
lda #$06
|
||||
sta path_buf2+1 ; ???
|
||||
rts
|
||||
|
||||
L704D: lda winfo12
|
||||
jsr L62C8
|
||||
addr_call L5E0A, $DAB6 ; "Delete a File ..."
|
||||
addr_call L5E57, $DAC8 ; "File to delete:"
|
||||
yax_call MGTK_RELAY, MGTK::SetPenMode, $D202 ; penXOR
|
||||
yax_call MGTK_RELAY, MGTK::FrameRect, $DA9E
|
||||
yax_call MGTK_RELAY, MGTK::InitPort, grafport3
|
||||
yax_call MGTK_RELAY, MGTK::SetPort, grafport3
|
||||
rts
|
||||
|
||||
.macro entry arg1, arg2
|
||||
.byte arg1
|
||||
.addr arg2
|
||||
.endmacro
|
||||
|
||||
L7086: .byte $29 ; length of the following data block
|
||||
L7087: entry 0, L70B1
|
||||
entry 0, L70EA
|
||||
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
|
||||
|
||||
|
||||
L70B1: addr_call L647C, path_buf0
|
||||
beq L70C0
|
||||
lda #$40
|
||||
jsr L4030
|
||||
rts
|
||||
|
||||
L70C0: yax_call MGTK_RELAY, MGTK::CloseWindow, winfo15
|
||||
yax_call MGTK_RELAY, MGTK::CloseWindow, winfo12
|
||||
lda #0
|
||||
sta $D8EC
|
||||
jsr L55BA
|
||||
copy16 #path_buf0, $6
|
||||
ldx $50AA
|
||||
txs
|
||||
lda #0
|
||||
rts
|
||||
|
||||
.byte 0
|
||||
|
||||
L70EA: yax_call MGTK_RELAY, MGTK::CloseWindow, winfo15
|
||||
yax_call MGTK_RELAY, MGTK::CloseWindow, winfo12
|
||||
lda #0
|
||||
sta $D8EC
|
||||
jsr L55BA
|
||||
ldx $50AA
|
||||
txs
|
||||
lda #$FF
|
||||
rts
|
||||
|
||||
PAD_TO $7800
|
||||
.endproc
|
@ -31,7 +31,7 @@ function stats {
|
||||
#do_make clean
|
||||
do_make all
|
||||
|
||||
TARGETS="loader mgtk desktop invoker ovl1 ovl5"
|
||||
TARGETS="loader mgtk desktop invoker ovl1 ovl5 ovl6"
|
||||
|
||||
# Verify original and output match
|
||||
echo "Verifying diffs:"
|
||||
|
Loading…
Reference in New Issue
Block a user