mirror of
https://github.com/a2-4am/passport.git
synced 2024-09-27 01:55:27 +00:00
53f92388b0
also move globals back to program space for compatibility
93 lines
3.0 KiB
Plaintext
93 lines
3.0 KiB
Plaintext
!cpu 6502
|
|
*=$2000
|
|
!to "../build/PASSPORT.SYSTEM",plain
|
|
|
|
!source "../build/vars.a" ; no code in here
|
|
|
|
bit $C082 ; read ROM, no write
|
|
sta $C00E ; primary character set
|
|
sta $C00C ; 40 columns
|
|
sta $C000 ; 80STORE off
|
|
sta $C002 ; read main memory
|
|
jsr $FB2F ; TEXT
|
|
jsr $FC58 ; HOME
|
|
jsr $FE84 ; NORMAL
|
|
jsr $FE93 ; PR#0
|
|
jsr $FE89 ; IN#0
|
|
lda $BF98 ; ProDOS MachineID
|
|
and #$20 ; at least 64K?
|
|
bne OneTimeSetup
|
|
jsr $BF00 ; immediately quit on 48K machine
|
|
!byte $65 ; (but congratulations on launching Passport at all)
|
|
!word quit
|
|
quit !byte 4
|
|
|
|
OneTimeSetup
|
|
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
|
|
- lda $BF00, y ; (will be copied back and forth by SwapProDOS later)
|
|
sta $0F00, y
|
|
iny
|
|
bne -
|
|
ldx #$FF
|
|
lda $FBB3 ; ROM MachineID
|
|
cmp #$EA ; ][+?
|
|
bne +
|
|
ldx #$DF ; AND mask to force characters to uppercase on ][+
|
|
+
|
|
stx kForceLower
|
|
jsr ScanForDiskII ; scan slots for Disk II drives
|
|
lda DiskIIArray+5
|
|
bne +
|
|
jsr PrintByID ; no Disk II in slot 6, this is fatal
|
|
!byte s_noslot6
|
|
jsr WaitForKey
|
|
jmp CleanExit
|
|
+
|
|
jsr ScanForRAMAndHardDisks; scan for things that look like RAM disks or hard disks
|
|
jsr LoadPrefs ; load preferences (if available)
|
|
jsr ThisSlot ; get information about selected drive and set gTargetType for main menu
|
|
lda $FE
|
|
sta $F0
|
|
lda $FF
|
|
sta $F1
|
|
lda #$FD
|
|
sta $F2
|
|
lda #$31
|
|
sta $F3
|
|
ldx #$0D
|
|
ldy #$00
|
|
- lda ($F0), y
|
|
sta ($F2), y
|
|
iny
|
|
bne -
|
|
inc $F1
|
|
inc $F3
|
|
dex
|
|
bne -
|
|
jmp ($FE)
|
|
|
|
!source "apidefs.a"
|
|
!source "strings/enid.a"
|
|
!source "initscan.a"
|
|
|
|
SHOW_PROGRESS_DURING_DECRUNCH = 1 ; activates optional UI code in exodecrunch
|
|
|
|
!source "exodecrunch.s"
|
|
|
|
get_crunched_byte
|
|
lda _byte_lo
|
|
bne _byte_skip_hi
|
|
dec _byte_hi
|
|
_byte_skip_hi
|
|
dec _byte_lo
|
|
_byte_lo = * + 1
|
|
_byte_hi = * + 2
|
|
lda packend ; needs to be set correctly before decrunch_file is called
|
|
rts
|
|
|
|
!bin "../build/passport.pak"
|
|
!word HIGHPOINT
|
|
packend
|