restore support for partitions 3-4

This commit is contained in:
Peter Ferrie 2019-09-18 20:49:24 -07:00
parent c9d4110b98
commit 02d7d2be93
3 changed files with 67 additions and 11 deletions

View File

@ -20,11 +20,11 @@
ldy #@noHighPartlen
- lda @s_noHighPart,y
sta $6AB,y
sta $6B1,y
dey
bpl -
bmi @hang
@s_noHighPart !scrxor $80,"RUN FROM DRIVE 1 OR 2 OF BOOT SLOT"
@s_noHighPart !scrxor $80,"RUN FROM PARTITION 1-4"
@noHighPartlen=(*-@s_noHighPart)-1
+ jsr Has64K ; check for 64K (required)
@ -170,12 +170,7 @@ Loader128KAndJoystick
!byte 15
!text "joystick + 128K"
*=ProRWTSBuffer+512 ; ProRWTS needs a 512-byte buffer for its init function
; so we reuse as much of the 1-time code as possible
; and fill the rest with zeros
!source "src/parse.games.a" ; this needs to be outside the buffer because it's not used
; until after ProRWTS initialization
!source "src/parse.games.a"
OneTimeSetup
lda zpMachineStatus

View File

@ -13,6 +13,8 @@ DEVNUM = $bf30 ;ProDOS constant
IsLowPartition
lda DEVNUM
sta x80_parms + 1
sta unit
and #$70
lsr
lsr
@ -20,4 +22,65 @@ IsLowPartition
tay
lda DEVADR01HI, y
cmp #$c8
bcc @GoodPartition
;find the SmartPort device
ldx #$c8
- dex
stx ldrhi
ldy #0
sty ldrlo
iny
lda (ldrlo), y
cmp #$20
bne -
iny
iny
lda (ldrlo), y
bne -
iny
iny
lda (ldrlo), y
cmp #3
bne -
ldy #$ff
lda (ldrlo), y
beq -
sta ldrlo
;detect extended remapping
lda #<(readbuff + $200)
sta adrlo
lda #>(readbuff + $200)
sta adrhi
lda #2
sta x80_parms + 4
sta bloklo
lda #0
sta x80_parms + 5
sta blokhi
lda #cmdread
sta command
jsr @dispatch
jsr MLI
!byte $80
!word x80_parms
ldy #$0f
- lda readbuff + 4, y
cmp readbuff + $204, y
bne @BadPartition
dey
bpl -
clc
!byte $24
@BadPartition
sec
@GoodPartition
rts
@dispatch
jmp (ldrlo)

View File

@ -380,7 +380,6 @@ adjpath tya
lsr
tay
ldx DEVADR01HI, y
!if allow_extend = 1 {
cpx #$c8
bcc set_slot
ldx #$c8
@ -404,7 +403,6 @@ adjpath tya
ldy #$ff
lda (bloklo), y
beq -
}
set_slot stx slot + 2
!if allow_extend = 1 {
@ -3047,5 +3045,5 @@ hdddataend
} ;verbose_info
} ;PASS2
readbuff
readbuff = $800
!byte $D3,$C1,$CE,$A0,$C9,$CE,$C3,$AE