support Jungle Hunt

This commit is contained in:
Peter Ferrie 2018-11-17 09:16:55 -08:00
parent a130581c17
commit 3ca6a4bdbc
2 changed files with 44 additions and 29 deletions

View File

@ -286,6 +286,7 @@ ProDOS_enter
} else { ;PASS2 } else { ;PASS2
!set PASS2=1 !set PASS2=1
} }
jsr @swap_zp
pla pla
sta @fetchaddr+1 sta @fetchaddr+1
pla pla
@ -304,12 +305,6 @@ ProDOS_enter
pha pha
tya tya
pha pha
ldx #(last_zp - first_zp) - 1
@save_zp
lda first_zp,x
pha
dex
bpl @save_zp
@request @request
lda #$d1 lda #$d1
cmp #$c4 cmp #$c4
@ -399,11 +394,9 @@ ProDOS_enter
sta sizehi sta sizehi
sta sizelo sta sizelo
jsr hddopendir jsr hddopendir
ldx encbufpatch1+1
inx
stx @block_index2+2
lda #0 lda #0
beq @block_index2 ;always sta blkidx
beq @jmp_zp ;always
@imp_seek @imp_seek
lda #cmdseek lda #cmdseek
@ -423,18 +416,8 @@ ProDOS_enter
lda ldrlo lda ldrlo
sta sizelo sta sizelo
@set_blocks @set_blocks
ldx encbufpatch1+1
inx
stx @block_index1+2
stx @block_index2+2
@block_index1
lda $d1ff
sta blkidx
clc ;not a subdirectory
jsr hddrdwrpart jsr hddrdwrpart
lda blkidx @jmp_zp
@block_index2
sta $d1ff
jmp @restore_zp jmp @restore_zp
@imp_close @imp_close
@ -496,13 +479,19 @@ ProDOS_enter
sta $1,x sta $1,x
rts rts
@restore_zp @swap_zp
ldx #(last_zp - first_zp) - 1 ldx #last_zp-first_zp
@store_zp @save_zp
pla lda first_zp,x
sta first_zp,x ldy @saved_zp,x
sta @saved_zp,x
sty first_zp,x
dex dex
bpl @store_zp bpl @save_zp
rts
@restore_zp
jsr @swap_zp
pla ;saved inside ProDOS_enter pla ;saved inside ProDOS_enter
tay tay
pla pla
@ -513,3 +502,6 @@ ProDOS_enter
@handle @handle
!byte 0, 0 ;only up to two handles at a time !byte 0, 0 ;only up to two handles at a time
@saved_zp
!fill (last_zp - first_zp) + 1

View File

@ -196,7 +196,7 @@ ver_02 = 1
SETAUXZP = $c009 SETAUXZP = $c009
first_zp = $40 ;lowest address to save if swap_zp enabled first_zp = $40 ;lowest address to save if swap_zp enabled
last_zp = $60 ;highest address to save if swap_zp enabled (max 127 entries later) last_zp = $5f ;highest address to save if swap_zp enabled (max 127 entries later)
D1S1 = 1 ;disk 1 side 1 volume ID if rwts_mode enabled D1S1 = 1 ;disk 1 side 1 volume ID if rwts_mode enabled
@ -942,10 +942,15 @@ foundname iny
rdwrfile rdwrfile
unrdrvon2 = unrelocdsk + (* - reloc) unrdrvon2 = unrelocdsk + (* - reloc)
lda MOTORON lda MOTORON
!if allow_subdir = 1 {
clc
} ;allow_subdir
!if no_interrupts = 1 { !if no_interrupts = 1 {
!if detect_err = 1 { !if detect_err = 1 {
!if allow_subdir = 0 {
clc clc
} ;allow_subdir
} ;detect_err } ;detect_err
php php
sei sei
@ -1069,6 +1074,9 @@ unrdrvon3 = unrelocdsk + (* - reloc)
sbc sizehi sbc sizehi
sta sizehi sta sizehi
ora sizelo ora sizelo
!if allow_subdir = 1 {
clc
} ;allow_subdir
bne rdwrfilei bne rdwrfilei
!if allow_aux = 0 { !if allow_aux = 0 {
unrdrvoff3 = unrelocdsk + (* - reloc) unrdrvoff3 = unrelocdsk + (* - reloc)
@ -2259,15 +2267,21 @@ attribpatch
!if allow_subdir = 1 { !if allow_subdir = 1 {
plp plp
!byte $24 ;mask the clc that follows
} ;allow_subdir } ;allow_subdir
++ ++
} ;rwts_mode } ;rwts_mode
hddrdfile hddrdfile
hddrdwrfile hddrdwrfile
!if allow_subdir = 1 {
clc
} ;allow_subdir
!if no_interrupts = 1 { !if no_interrupts = 1 {
!if detect_err = 1 { !if detect_err = 1 {
!if allow_subdir = 0 {
clc clc
} ;allow_subdir
} ;detect_err } ;detect_err
php php
sei sei
@ -2398,7 +2412,16 @@ encbufpatch1
sbc sizehi sbc sizehi
sta sizehi sta sizehi
ora sizelo ora sizelo
!if allow_subdir = 1 {
!if no_interrupts = 1 {
clc
bne hddrdwrfilei bne hddrdwrfilei
} else { ;no_interrupts = 0
bne hddrdwrfile
} ;no_interrupts
} else { ;allow_subdir = 0
bne hddrdwrfilei
} ;allow_subdir
!if allow_aux = 0 { !if allow_aux = 0 {
rts rts
} else { ;allow_aux } else { ;allow_aux