2019-06-13 19:54:03 -07:00
|
|
|
!cpu 6502
|
|
|
|
*=$2000
|
|
|
|
!to "../build/PASSPORT.SYSTEM",plain
|
|
|
|
|
2019-06-15 12:23:02 -07:00
|
|
|
!source "../build/vars.a"
|
|
|
|
|
2021-04-18 11:19:14 -04:00
|
|
|
lda $BF98 ; ProDOS MachineID
|
|
|
|
and #$20 ; at least 64K?
|
2021-04-19 10:44:51 -04:00
|
|
|
bne OneTimeSetup
|
2021-04-18 11:19:14 -04:00
|
|
|
jsr $BF00 ; immediately quit on 48K machine
|
|
|
|
!byte $65 ; (but congratulations on launching Passport at all)
|
2019-08-27 10:53:01 -07:00
|
|
|
!word quit
|
|
|
|
quit !byte 4
|
|
|
|
|
2021-04-19 10:44:51 -04:00
|
|
|
OneTimeSetup
|
2021-04-18 11:19:14 -04:00
|
|
|
jsr $FE89 ; PR#0
|
|
|
|
jsr $FE93 ; IN#0
|
|
|
|
jsr $FB2F ; TEXT
|
|
|
|
jsr $FC58 ; HOME
|
2021-04-19 10:44:51 -04:00
|
|
|
jsr decrunch ; decompress main Passport code
|
|
|
|
sty $fe ;;zp_dest_lo = low byte of Passport entry point
|
2021-04-19 10:38:28 -04:00
|
|
|
ldy #0 ; save a copy of ProDOS system global page
|
|
|
|
- lda $BF00, y ; (will be copied back and forth by SwapProDOS later)
|
|
|
|
sta $0F00, y
|
|
|
|
iny
|
|
|
|
bne -
|
2021-04-18 11:19:14 -04:00
|
|
|
lda $FBB3 ; ROM MachineID
|
|
|
|
cmp #$EA ; ][+?
|
|
|
|
bne +
|
|
|
|
lda #$DF ; AND mask to force characters to uppercase on ][+
|
2019-06-13 19:54:03 -07:00
|
|
|
sta kForceLower
|
2021-04-18 11:19:14 -04:00
|
|
|
+
|
|
|
|
jsr ScanForDiskII ; scan slots for Disk II drives
|
2019-06-13 19:54:03 -07:00
|
|
|
lda DiskIIArray+5
|
2021-04-18 11:19:14 -04:00
|
|
|
bne +
|
|
|
|
lda #s_noslot6 ; no Disk II in slot 6, this is fatal
|
2019-06-13 19:54:03 -07:00
|
|
|
jsr PrintByID
|
|
|
|
jsr WaitForKey
|
|
|
|
jmp CleanExit
|
2021-04-18 11:19:14 -04:00
|
|
|
+
|
|
|
|
jsr ScanForRAMAndHardDisks; scan for things that look like RAM disks or hard disks
|
|
|
|
jsr LoadPrefs ; load preferences (if available)
|
|
|
|
jmp ($fe) ; jump to decompressed code (FirstMover)
|
2019-06-13 19:54:03 -07:00
|
|
|
|
|
|
|
!source "apidefs.a"
|
|
|
|
!source "strings/enid.a"
|
|
|
|
!source "initscan.a"
|
2021-04-19 10:28:08 -04:00
|
|
|
|
|
|
|
SHOW_PROGRESS_DURING_DECRUNCH = 1 ; activates optional UI code in exodecrunch
|
|
|
|
|
2019-06-13 19:54:03 -07:00
|
|
|
!source "exodecrunch.s"
|
|
|
|
|
2021-04-18 11:19:14 -04:00
|
|
|
get_crunched_byte
|
|
|
|
lda _byte_lo
|
|
|
|
bne _byte_skip_hi
|
|
|
|
dec _byte_hi
|
|
|
|
_byte_skip_hi
|
|
|
|
dec _byte_lo
|
2019-06-13 19:54:03 -07:00
|
|
|
_byte_lo = * + 1
|
|
|
|
_byte_hi = * + 2
|
2021-04-18 11:19:14 -04:00
|
|
|
lda packend ; needs to be set correctly before decrunch_file is called
|
|
|
|
rts
|
2019-06-13 19:54:03 -07:00
|
|
|
|
|
|
|
!bin "../build/passport.pak"
|
|
|
|
!word HIGHPOINT
|
|
|
|
packend
|