This commit is contained in:
4am 2018-11-06 21:18:20 -05:00
commit 6145de0581
4 changed files with 62 additions and 38 deletions

View File

@ -142,7 +142,21 @@ AttractMode
cmp #$03
bne @Slideshow
+LOAD_FILE kDemoDirectory, @key
+LOAD_PATH kDemoDirectory
ldy gPathname
iny
iny
sty ProDOS_prefix
- lda gPathname-2, y
sta ProDOS_prefix, y
dey
bne -
lda #'/'
sta ProDOS_prefix+1
lda #'X'
sta ProDOS_prefix+2
+LOAD_FILE_IMM @key
ldx #(@end_prelaunch-@prelaunch-1)
- lda @prelaunch,x ; copy pre-launch code to main memory
@ -155,6 +169,7 @@ AttractMode
dex
bpl -
jmp $106 ; jump to pre-launch code
@prelaunch ; this runs from main memory
lda $C088 ; entry point used by some self-running demos
jmp Reenter
@ -304,6 +319,8 @@ ProDOS_fatal ;only for debugging, will be removed
jsr $fe89
jsr $fe93
jmp $ff3a
ProDOS_prefix=$bfd0
; !fill $2e
}
end_promote

View File

@ -252,47 +252,15 @@ ProDOS_enter
jsr @imp_seek
jmp ProDOS_exit
PREV_BLOCK_LO = $0 ;ProDOS constant
PREV_BLOCK_HI = $1 ;ProDOS constant
@imp_prefix
ldx #buffer
jsr @setbuffer1
lda gPrefix
sta packet
lda gPrefix+1
sta packet+1
ldy #0
lda (packet), y
tax
inx
!byte $2c
ldy ProDOS_prefix
@copy_prefix
lda (packet), y
iny
iny
iny
cmp #$2e
bcs @skip_slash1
lda #'/'
@skip_slash1
lda ProDOS_prefix, y
sta (buffer), y
bcs @skip_slash2
tya
ldy #0
sta (buffer), y
tay
@skip_slash2
dey
dey
dex
bne @copy_prefix
ldy #1
lda #'/'
sta (buffer), y
iny
lda #'X'
sta (buffer), y
bpl @copy_prefix
rts
@imp_open

View File

@ -93,3 +93,19 @@
jsr LoadFile
!word gPathname
}
!macro LOAD_PATH .subdirectory {
jsr ResetPath
+LDADDR .subdirectory
jsr AddToPath
+LDADDR kPathSeparator
jsr AddToPath
}
!macro LOAD_FILE_IMM .filename {
+LDAY .filename
jsr AddToPath
jsr LoadFile
!word gPathname
}

View File

@ -29,16 +29,39 @@ if "%1" equ "asm" (
%ACME% -r build\4cade.lst src\4cade.a
%ACME% src\fx\fx.hgr.diagonal.a
%ACME% src\fx\fx.hgr.iris.a
%ACME% src\fx\fx.hgr.interlock.ud.a
%ACME% src\fx\fx.hgr.interlock.lr.a
%ACME% src\fx\fx.hgr.spiral.a
%ACME% src\fx\fx.hgr.fourspiral.a
%ACME% src\fx\fx.hgr.fizzle.a
%ACME% src\fx\fx.hgr.bar.dissolve.a
%ACME% src\fx\fx.hgr.block.fizzle.a
%ACME% src\fx\fx.hgr.block.mosaic.a
%ACME% src\fx\fx.hgr.block.fizzle.white.a
%ACME% src\fx\fx.hgr.2pass.lr.a
%ACME% src\fx\fx.hgr.crystal.a
%ACME% src\fx\fx.hgr.foursquare.white.a
%ACME% src\fx\fx.hgr.onesquare.white.a
%ACME% src\fx\fx.hgr.diamond.a
%ACME% src\fx\fx.hgr.checkerboard.white.a
%ACME% src\fx\fx.hgr.halfblock.fizzle.a
%ACME% src\fx\fx.hgr.halfblock.fizzle.white.a
%ACME% src\fx\fx.hgr.stagger.ud.a
%ACME% src\fx\fx.hgr.stagger.ud.white.a
%ACME% src\fx\fx.hgr.stagger.lr.a
%ACME% src\fx\fx.hgr.stagger.lr.white.a
%ACME% src\fx\fx.hgr.corner.circle.a
%ACME% src\fx\fx.hgr.sunrise.a
%ACME% src\fx\fx.hgr.sunset.a
%ACME% src\fx\fx.hgr.radial.a
%ACME% src\fx\fx.hgr.radial2.a
%ACME% src\fx\fx.hgr.radial3.a
%ACME% src\fx\fx.hgr.radial4.a
%ACME% src\fx\fx.hgr.radial5.a
%ACME% src\fx\fx.hgr.split.ud.intro.a
%ACME% src\fx\fx.hgr.iris.a
%ACME% src\fx\fx.hgr.ripple.a
%ACME% src\fx\fx.hgr.ripple2.a
%ACME% src\fx\fx.hgr.star.a
goto :EOF
)