mirror of
https://github.com/a2-4am/passport.git
synced 2024-10-15 05:24:46 +00:00
shave some bytes
This commit is contained in:
parent
80c2b93165
commit
62a9b63498
1
Makefile
1
Makefile
@ -35,6 +35,7 @@ asm:
|
||||
grep "kForceLower=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
||||
grep "DiskIIArray=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
||||
grep "HardDiskArray=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
||||
grep "ThisSlot=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
||||
grep "PrintByID=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
||||
grep "WaitForKey=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
||||
grep "CleanExit=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
||||
|
@ -30,6 +30,18 @@ ID_DISK_II = %00000000 ; BIT + BPL + BVC -> target is Disk II driv
|
||||
ID_CFFA_VIRTUAL_DISK = %01000000 ; BIT + BPL + BVS -> target is a CFFA3000-managed virtual disk drive
|
||||
ID_FILE_ON_HARD_DISK = %10000000 ; BIT + BMI -> target is a file on a hard disk
|
||||
|
||||
; Standard zero-page addresses
|
||||
TEXTTOP = $22
|
||||
VPOS = $25
|
||||
|
||||
; Standard addresses
|
||||
PRODOSMLI= $BF00
|
||||
TEXT = $FB2F
|
||||
HOME = $FC58
|
||||
WAIT = $FCA8
|
||||
PRBYTE = $FDDA
|
||||
COUT = $FDED
|
||||
|
||||
; Zero-page addresses we use for variables
|
||||
nibsrcindex = $EC ; byte
|
||||
nibdestindex = $ED ; byte
|
||||
@ -63,6 +75,14 @@ BASEPAGE = $10 ; high byte of $1000-byte buffer that
|
||||
; Special Delivery tracer assumes this
|
||||
; is $10, so don't change it!
|
||||
|
||||
; Universal RWTS-specific addresses
|
||||
UNIV_A1 = $B956 ; must LSR before setting
|
||||
UNIV_A2 = $B95F
|
||||
UNIV_A3 = $B968
|
||||
UNIV_D1 = $B8E7
|
||||
UNIV_D2 = $B8F1
|
||||
UNIV_D3 = $B8FC
|
||||
|
||||
;-------------------------------
|
||||
; globally-accessible variables
|
||||
; in fixed position to allow
|
||||
|
@ -26,9 +26,6 @@ PC_CLOSE = $01
|
||||
PC_SETMARK = $02
|
||||
PC_SETEOF = $02
|
||||
|
||||
; MLI addresses
|
||||
PRODOSMLI = $BF00 ; [callable] MLI entry point
|
||||
|
||||
; MLI constants
|
||||
FULL_ACCESS = $C3
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
;-------------------------------
|
||||
; Passport
|
||||
; a 4am hack
|
||||
; (c) 2016-2020 by 4am
|
||||
; (c) 2016-2021 by 4am
|
||||
;
|
||||
; Permission is hereby granted, free of charge, to any
|
||||
; person obtaining a copy of this software and associated
|
||||
@ -39,30 +39,7 @@ VERBOSE = $00 ; set to $01 to display API label addresses
|
||||
|
||||
!to "../build/PASSPORT.TMP",plain
|
||||
|
||||
;-------------------------------
|
||||
; Addresses we read/call
|
||||
TEXTTOP = $22
|
||||
VPOS = $25
|
||||
MLI = $BF00
|
||||
REBOOT = $FAA6
|
||||
TEXT = $FB2F
|
||||
MACHINEID = $FBB3
|
||||
HOME = $FC58
|
||||
WAIT = $FCA8
|
||||
PRBYTE = $FDDA
|
||||
COUT = $FDED
|
||||
PR0 = $FE89
|
||||
IN0 = $FE93
|
||||
|
||||
;Universal RWTS-specific values
|
||||
UNIV_A1 = $B956 ; must LSR before setting
|
||||
UNIV_A2 = $B95F
|
||||
UNIV_A3 = $B968
|
||||
UNIV_D1 = $B8E7
|
||||
UNIV_D2 = $B8F1
|
||||
UNIV_D3 = $B8FC
|
||||
|
||||
!source "apidefs.a"
|
||||
!source "apidefs.a" ; no code in here
|
||||
|
||||
FirstMover
|
||||
jmp ResetVector
|
||||
@ -123,14 +100,6 @@ ResetVector
|
||||
ldx #$FF
|
||||
txs
|
||||
lda $C0E8
|
||||
jsr PR0
|
||||
jsr IN0
|
||||
sta $C000
|
||||
sta $C002
|
||||
sta $C004
|
||||
sta $C00C
|
||||
sta $C00E
|
||||
jsr ThisSlot
|
||||
jsr CleanupFiles ; RAM/HD files might be left open after Ctrl-Reset
|
||||
; /!\ execution falls through here
|
||||
MainMenu
|
||||
@ -584,7 +553,8 @@ TheEnd
|
||||
; Cleans up open files (if any)
|
||||
;
|
||||
; in: ProDOS is NOT in memory
|
||||
; out: all registers and flags clobbered
|
||||
; out: ProDOS is NOT in memory
|
||||
; all registers and flags clobbered
|
||||
;-------------------------------
|
||||
CleanupFiles
|
||||
lda gHardDiskRef
|
||||
@ -593,7 +563,7 @@ CleanupFiles
|
||||
jsr SwapProDOS ; ProDOS out -> in
|
||||
jsr DeleteFileOnRAMDisk
|
||||
jsr CloseFileOnHardDisk
|
||||
jsr SwapProDOS ; ProDOS out -> in
|
||||
jsr SwapProDOS ; ProDOS in -> out
|
||||
+ rts
|
||||
|
||||
HandleRedoWithIgnore
|
||||
@ -639,7 +609,7 @@ CleanExit
|
||||
lda gChangedPrefs
|
||||
bne +
|
||||
jsr SavePrefs
|
||||
+ jsr MLI ; does not return
|
||||
+ jsr PRODOSMLI ; does not return
|
||||
!byte $65
|
||||
!word +
|
||||
+ !byte $04
|
||||
@ -908,4 +878,5 @@ LastMover
|
||||
!warn "PrintByID=",PrintByID
|
||||
!warn "DiskIIArray=",DiskIIArray
|
||||
!warn "HardDiskArray=",HardDiskArray
|
||||
!warn "ThisSlot=",ThisSlot
|
||||
}
|
||||
|
@ -4,6 +4,16 @@
|
||||
|
||||
!source "../build/vars.a"
|
||||
|
||||
bit $C082
|
||||
sta $C00E
|
||||
sta $C00C
|
||||
sta $C000
|
||||
sta $C002
|
||||
jsr $FB2F
|
||||
jsr $FC58
|
||||
jsr $FE84
|
||||
jsr $FE93
|
||||
jsr $FE89
|
||||
lda $BF98 ; ProDOS MachineID
|
||||
and #$20 ; at least 64K?
|
||||
bne OneTimeSetup
|
||||
@ -15,8 +25,6 @@ quit !byte 4
|
||||
OneTimeSetup
|
||||
jsr $FE89 ; PR#0
|
||||
jsr $FE93 ; IN#0
|
||||
jsr $FB2F ; TEXT
|
||||
jsr $FC58 ; HOME
|
||||
jsr decrunch ; decompress main Passport code
|
||||
sty $FE ;;zp_dest_lo = low byte of Passport entry point
|
||||
ldy #0 ; save a copy of ProDOS system global page
|
||||
@ -40,6 +48,7 @@ OneTimeSetup
|
||||
+
|
||||
jsr ScanForRAMAndHardDisks; scan for things that look like RAM disks or hard disks
|
||||
jsr LoadPrefs ; load preferences (if available)
|
||||
jsr ThisSlot
|
||||
lda $FE
|
||||
sta $03F2
|
||||
lda $FF
|
||||
|
@ -27,6 +27,7 @@ for /f "tokens=4,* delims=:(" %%q in ('find "SaveProDOS=" ..\build\out.txt') do
|
||||
for /f "tokens=4,* delims=:(" %%q in ('find "kForceLower=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
||||
for /f "tokens=4,* delims=:(" %%q in ('find "DiskIIArray=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
||||
for /f "tokens=4,* delims=:(" %%q in ('find "HardDiskArray=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
||||
for /f "tokens=4,* delims=:(" %%q in ('find "ThisSlot=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
||||
for /f "tokens=4,* delims=:(" %%q in ('find "PrintByID=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
||||
for /f "tokens=4,* delims=:(" %%q in ('find "WaitForKey=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
||||
for /f "tokens=4,* delims=:(" %%q in ('find "CleanExit=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
||||
|
Loading…
Reference in New Issue
Block a user