2019-06-13 19:54:03 -07:00
|
|
|
!cpu 6502
|
|
|
|
*=$2000
|
|
|
|
!to "../build/PASSPORT.SYSTEM",plain
|
|
|
|
|
2021-06-18 20:15:15 -04:00
|
|
|
; no code in these
|
|
|
|
!source "apidefs.a"
|
|
|
|
!source "strings/enid.a"
|
|
|
|
!source "prefs.load.a"
|
2021-07-11 11:56:35 -04:00
|
|
|
!source "hw.diskii.a"
|
2021-06-18 20:15:15 -04:00
|
|
|
!source "../build/vars.a"
|
2019-06-15 12:23:02 -07:00
|
|
|
|
2021-06-16 13:57:30 -04:00
|
|
|
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
|
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
|
|
|
|
jsr decrunch ; decompress main Passport code
|
2021-04-19 20:53:33 -04:00
|
|
|
sty $FE ;;zp_dest_lo = low byte of Passport entry point
|
2021-06-19 13:07:09 -04:00
|
|
|
ldx #$0D ; copy t00only.pak to $3200
|
|
|
|
ldy #$32
|
|
|
|
sty $F1
|
|
|
|
ldy #$00
|
|
|
|
sty $F0
|
|
|
|
- lda ($FE), y
|
|
|
|
sta ($F0), y
|
|
|
|
iny
|
|
|
|
bne -
|
|
|
|
inc $FF
|
|
|
|
inc $F1
|
|
|
|
dex
|
|
|
|
bne -
|
2021-07-11 11:56:35 -04:00
|
|
|
;X=0,Y=0
|
2021-06-19 13:07:09 -04:00
|
|
|
|
2021-07-11 11:56:35 -04:00
|
|
|
- lda $BF00, y ; save a copy of ProDOS system global page
|
|
|
|
sta $0F00, y ; (will be copied back and forth by SwapProDOS later)
|
2021-04-19 10:38:28 -04:00
|
|
|
iny
|
|
|
|
bne -
|
2021-07-11 11:56:35 -04:00
|
|
|
;X=0,Y=0
|
2021-06-19 13:07:09 -04:00
|
|
|
|
2021-04-18 11:19:14 -04:00
|
|
|
lda $FBB3 ; ROM MachineID
|
|
|
|
cmp #$EA ; ][+?
|
|
|
|
bne +
|
2021-06-19 13:07:09 -04:00
|
|
|
lda #$DF ; AND mask to force characters to uppercase on ][+
|
|
|
|
sta kForceLower
|
2021-04-18 11:19:14 -04:00
|
|
|
+
|
2021-07-11 11:56:35 -04:00
|
|
|
;X=0,Y=0
|
|
|
|
+ScanForDiskII ; scan slots for Disk II drives
|
|
|
|
;X=0
|
2019-06-13 19:54:03 -07:00
|
|
|
lda DiskIIArray+5
|
2021-04-18 11:19:14 -04:00
|
|
|
bne +
|
2021-06-12 22:07:26 -04:00
|
|
|
jsr PrintByID ; no Disk II in slot 6, this is fatal
|
|
|
|
!byte s_noslot6
|
2019-06-13 19:54:03 -07:00
|
|
|
jsr WaitForKey
|
|
|
|
jmp CleanExit
|
2021-04-18 11:19:14 -04:00
|
|
|
+
|
2021-07-11 11:56:35 -04:00
|
|
|
;X=0
|
2021-04-18 11:19:14 -04:00
|
|
|
jsr ScanForRAMAndHardDisks; scan for things that look like RAM disks or hard disks
|
2021-06-18 20:15:15 -04:00
|
|
|
+LoadPrefs ; load preferences (if available)
|
2021-06-16 13:57:30 -04:00
|
|
|
jsr ThisSlot ; get information about selected drive and set gTargetType for main menu
|
2021-06-19 13:07:09 -04:00
|
|
|
|
2021-06-18 21:13:59 -04:00
|
|
|
lda #<MainMenu ; set reset vector
|
|
|
|
sta $03F2
|
|
|
|
lda #>MainMenu
|
|
|
|
sta $03F3
|
2021-06-19 13:07:09 -04:00
|
|
|
jsr $FB6F
|
|
|
|
|
2021-06-18 21:13:59 -04:00
|
|
|
lda #<CheckCache ; set up output hook used to store log messages before they scroll off
|
|
|
|
sta $36
|
|
|
|
lda #>CheckCache
|
|
|
|
sta $37
|
2021-06-19 13:07:09 -04:00
|
|
|
|
2021-06-18 21:13:59 -04:00
|
|
|
jmp MainMenu
|
2019-06-13 19:54:03 -07:00
|
|
|
|
2021-07-11 11:56:35 -04:00
|
|
|
!source "hw.harddisk.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
|