mirror of
https://github.com/a2-4am/4cade.git
synced 2025-08-05 05:24:33 +00:00
assemble transition effects to separate files and load them on demand
This commit is contained in:
10
Makefile
10
Makefile
@@ -21,6 +21,12 @@ CADIUS=cadius
|
|||||||
|
|
||||||
asm: md
|
asm: md
|
||||||
$(ACME) -r build/4cade.lst src/4cade.a
|
$(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.fizzle.a
|
||||||
|
|
||||||
dsk: md asm
|
dsk: md asm
|
||||||
$(CADIUS) CREATEVOLUME build/"$(DISK)" "${VOLUME}" 32766KB >>build/log
|
$(CADIUS) CREATEVOLUME build/"$(DISK)" "${VOLUME}" 32766KB >>build/log
|
||||||
@@ -30,6 +36,7 @@ dsk: md asm
|
|||||||
$(CADIUS) CREATEFOLDER build/"$(DISK)" "/${VOLUME}/X/" >>build/log
|
$(CADIUS) CREATEFOLDER build/"$(DISK)" "/${VOLUME}/X/" >>build/log
|
||||||
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/GAMES.CONF" >>build/log
|
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/GAMES.CONF" >>build/log
|
||||||
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/ATTRACT.CONF" >>build/log
|
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/ATTRACT.CONF" >>build/log
|
||||||
|
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/FX.CONF" >>build/log
|
||||||
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/COVER" >>build/log
|
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/COVER" >>build/log
|
||||||
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/COVER.A2FC" >>build/log
|
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/COVER.A2FC" >>build/log
|
||||||
rsync -aP res/hgr/* build/HGR >>build/log
|
rsync -aP res/hgr/* build/HGR >>build/log
|
||||||
@@ -42,6 +49,8 @@ dsk: md asm
|
|||||||
$(CADIUS) ADDFOLDER build/"$(DISK)" "/${VOLUME}/SS" "build/SS" >>build/log
|
$(CADIUS) ADDFOLDER build/"$(DISK)" "/${VOLUME}/SS" "build/SS" >>build/log
|
||||||
rsync -aP res/demo/* build/DEMO >>build/log
|
rsync -aP res/demo/* build/DEMO >>build/log
|
||||||
$(CADIUS) ADDFOLDER build/"$(DISK)" "/${VOLUME}/DEMO" "build/DEMO" >>build/log
|
$(CADIUS) ADDFOLDER build/"$(DISK)" "/${VOLUME}/DEMO" "build/DEMO" >>build/log
|
||||||
|
rsync -aP res/fx/* build/FX >>build/log
|
||||||
|
$(CADIUS) ADDFOLDER build/"$(DISK)" "/${VOLUME}/FX" "build/FX" >>build/log
|
||||||
# bin/do2po.py res/dsk/ build/po/
|
# bin/do2po.py res/dsk/ build/po/
|
||||||
# rsync -a res/dsk/*.po build/po/
|
# rsync -a res/dsk/*.po build/po/
|
||||||
# bin/extract.py build/po/ | sh >build/log
|
# bin/extract.py build/po/ | sh >build/log
|
||||||
@@ -65,6 +74,7 @@ md:
|
|||||||
mkdir -p build/DHGR
|
mkdir -p build/DHGR
|
||||||
mkdir -p build/SS
|
mkdir -p build/SS
|
||||||
mkdir -p build/DEMO
|
mkdir -p build/DEMO
|
||||||
|
mkdir -p build/FX
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf build/
|
rm -rf build/
|
||||||
|
@@ -4,3 +4,4 @@ COVER=Type(06),AuxType(2000),Access(C3)
|
|||||||
COVER.A2FC=Type(06),AuxType(2000),Access(C3)
|
COVER.A2FC=Type(06),AuxType(2000),Access(C3)
|
||||||
GAMES.CONF=Type(04),AuxType(4000),Access(C3)
|
GAMES.CONF=Type(04),AuxType(4000),Access(C3)
|
||||||
ATTRACT.CONF=Type(04),AuxType(4000),Access(C3)
|
ATTRACT.CONF=Type(04),AuxType(4000),Access(C3)
|
||||||
|
FX.CONF=Type(04),AuxType(4000),Access(C3)
|
||||||
|
@@ -1 +1 @@
|
|||||||
#
|
#
|
1
res/fx.conf
Normal file
1
res/fx.conf
Normal file
@@ -0,0 +1 @@
|
|||||||
|
#
|
6
res/fx/_FileInformation.txt
Normal file
6
res/fx/_FileInformation.txt
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
DIAGONAL=Type(06),AuxType(6000),Access(C3)
|
||||||
|
FIZZLE=Type(06),AuxType(6000),Access(C3)
|
||||||
|
INTERLOCK.UD=Type(06),AuxType(6000),Access(C3)
|
||||||
|
INTERLOCK.LR=Type(06),AuxType(6000),Access(C3)
|
||||||
|
IRIS=Type(06),AuxType(6000),Access(C3)
|
||||||
|
SPIRAL=Type(06),AuxType(6000),Access(C3)
|
219
src/4cade.a
219
src/4cade.a
@@ -35,7 +35,7 @@
|
|||||||
inc @FM+5
|
inc @FM+5
|
||||||
bne @FM
|
bne @FM
|
||||||
+
|
+
|
||||||
jmp Start
|
jmp OneTimeSetup
|
||||||
|
|
||||||
@no64K
|
@no64K
|
||||||
ldy #@no64Klen
|
ldy #@no64Klen
|
||||||
@@ -57,41 +57,56 @@ ProRWTSBuffer
|
|||||||
*=ProRWTSBuffer+512 ; ProRWTS needs a 512-byte buffer for its init function
|
*=ProRWTSBuffer+512 ; ProRWTS needs a 512-byte buffer for its init function
|
||||||
; so we reuse as much of the 1-time code as possible
|
; so we reuse as much of the 1-time code as possible
|
||||||
; and fill the rest with zeros
|
; and fill the rest with zeros
|
||||||
|
OneTimeSetup
|
||||||
|
lda hddopendir+1 ; save current directory as 'root'
|
||||||
|
ldy hddopendir+3
|
||||||
|
+STAY gRootDirectory
|
||||||
|
jsr LoadFile ; load games list
|
||||||
|
!word kGameListConfFile
|
||||||
|
jsr ParseGamesList ; parse games list
|
||||||
|
!word gGamesListStore
|
||||||
|
!word ldrlo2 ; (ldrlo2) points to load address
|
||||||
|
+LDAY SRC
|
||||||
|
+STAY gFXStore ; save pointer to free space for next store
|
||||||
|
jsr LoadFile ; load transition effects list
|
||||||
|
!word kFXConfFile
|
||||||
|
jsr ParseKeyValueList ; parse transition effects list
|
||||||
|
!word gFXStore
|
||||||
|
!word ldrlo2 ; (ldrlo2) points to load address
|
||||||
|
+LDAY SRC
|
||||||
|
+STAY gAttractModeStore ; save pointer to free space for next store
|
||||||
|
jsr LoadFile ; load attract-mode configuration
|
||||||
|
!word kAttractModeConfFile
|
||||||
|
jsr ParseKeyValueList ; parse attract-mode configuration
|
||||||
|
!word gAttractModeStore
|
||||||
|
!word ldrlo2 ; (ldrlo2) points to load address
|
||||||
|
+LDAY SRC
|
||||||
|
+STAY gSlideshowStore ; save pointer to free space for next store
|
||||||
|
jmp Main
|
||||||
|
kGameListConfFile
|
||||||
|
!byte @kGameListConfFile_e-@kGameListConfFile_b
|
||||||
|
@kGameListConfFile_b
|
||||||
|
!text "GAMES.CONF"
|
||||||
|
@kGameListConfFile_e
|
||||||
|
kFXConfFile
|
||||||
|
!byte @kFXConfFile_e-@kFXConfFile_b
|
||||||
|
@kFXConfFile_b
|
||||||
|
!text "FX.CONF"
|
||||||
|
@kFXConfFile_e
|
||||||
|
kAttractModeConfFile
|
||||||
|
!byte @kAttractModeConfFile_e-@kAttractModeConfFile_b
|
||||||
|
@kAttractModeConfFile_b
|
||||||
|
!text "ATTRACT.CONF"
|
||||||
|
@kAttractModeConfFile_e
|
||||||
|
|
||||||
FirstMover
|
FirstMover
|
||||||
!pseudopc $D000 {
|
!pseudopc $D000 {
|
||||||
!zone
|
!zone
|
||||||
Reenter ; self-running demos should call this to exit back to 4cade
|
Reenter ; self-running demos should call this to exit back to 4cade
|
||||||
|
+READ_RAM1_WRITE_RAM1
|
||||||
|
Main
|
||||||
ldx #$FF
|
ldx #$FF
|
||||||
txs
|
txs
|
||||||
+READ_RAM1_WRITE_RAM1
|
|
||||||
jmp Main
|
|
||||||
Start
|
|
||||||
lda hddopendir+1
|
|
||||||
ldy hddopendir+3
|
|
||||||
+STAY gRootDirectory ; save current directory as 'root'
|
|
||||||
|
|
||||||
jsr LoadFile ; load games list from file
|
|
||||||
!word kGameListConfFile
|
|
||||||
|
|
||||||
jsr ParseGamesList ; parse games list
|
|
||||||
!word gGamesListStore
|
|
||||||
!word ldrlo2 ; (ldrlo2) points to load address
|
|
||||||
|
|
||||||
+LDAY SRC
|
|
||||||
+STAY gAttractModeStore ; save pointer to free space for next store
|
|
||||||
|
|
||||||
jsr LoadFile ; load attract-mode configuration from file
|
|
||||||
!word kAttractModeConfFile
|
|
||||||
|
|
||||||
jsr ParseKeyValueList ; parse attract-mode configuration
|
|
||||||
!word gAttractModeStore
|
|
||||||
!word ldrlo2 ; (ldrlo2) points to load address
|
|
||||||
|
|
||||||
+LDAY SRC
|
|
||||||
+STAY gSlideshowStore ; save pointer to free space for next store
|
|
||||||
|
|
||||||
Main
|
|
||||||
bit $C010
|
bit $C010
|
||||||
jsr BlankHGR
|
jsr BlankHGR
|
||||||
jsr AttractMode
|
jsr AttractMode
|
||||||
@@ -124,69 +139,21 @@ AttractMode
|
|||||||
ldy #1
|
ldy #1
|
||||||
lda (PTR),y
|
lda (PTR),y
|
||||||
and #$0F
|
and #$0F
|
||||||
cmp #$01
|
|
||||||
clc
|
|
||||||
beq @Slideshow
|
|
||||||
cmp #$02
|
|
||||||
sec
|
|
||||||
beq @Slideshow
|
|
||||||
cmp #$03
|
cmp #$03
|
||||||
bne AttractMode
|
bne @Slideshow
|
||||||
beq @SelfRunningDemo
|
|
||||||
|
|
||||||
@Slideshow
|
+LOAD_FILE kDemoDirectory, @key
|
||||||
php
|
|
||||||
jsr ResetPath
|
|
||||||
+LDADDR kAttractModeSlideshowDirectory
|
|
||||||
jsr AddToPath
|
|
||||||
+LDADDR kPathSeparator
|
|
||||||
jsr AddToPath
|
|
||||||
+LDAY @key
|
|
||||||
jsr AddToPath
|
|
||||||
jsr LoadFile ; load attract module configuration file
|
|
||||||
!word gPathname
|
|
||||||
|
|
||||||
jsr ParseKeyValueList ; parse slideshow configuration
|
ldx #(@end_prelaunch-@prelaunch-1)
|
||||||
!word gSlideshowStore
|
- lda @prelaunch,x ; copy pre-launch code to main memory
|
||||||
!word ldrlo2 ; (ldrlo2) points to load address
|
|
||||||
|
|
||||||
plp ; carry clear = HGR, carry set = DHGR
|
|
||||||
bcs @DHGRSlideshow
|
|
||||||
|
|
||||||
;@HGRSlideshow
|
|
||||||
jsr okvs_iter
|
|
||||||
!word gSlideshowStore
|
|
||||||
!word HGRLoad
|
|
||||||
rts
|
|
||||||
|
|
||||||
@DHGRSlideshow
|
|
||||||
jsr BlankDHGR
|
|
||||||
jsr okvs_iter
|
|
||||||
!word gSlideshowStore
|
|
||||||
!word DHGRLoad
|
|
||||||
jmp BlankHGR
|
|
||||||
|
|
||||||
@SelfRunningDemo
|
|
||||||
jsr ResetPath
|
|
||||||
+LDADDR kDemoDirectory
|
|
||||||
jsr AddToPath
|
|
||||||
+LDADDR kPathSeparator
|
|
||||||
jsr AddToPath
|
|
||||||
+LDAY @key
|
|
||||||
jsr AddToPath
|
|
||||||
jsr LoadFile ; load attract module configuration file
|
|
||||||
!word gPathname
|
|
||||||
ldx #(@end-@start-1)
|
|
||||||
- lda @start,x
|
|
||||||
sta $100,x
|
sta $100,x
|
||||||
dex
|
dex
|
||||||
bpl -
|
bpl -
|
||||||
jmp $100
|
jmp $100 ; jump to pre-launch code
|
||||||
@start
|
@prelaunch ; this runs from main memory
|
||||||
; this runs from main memory
|
|
||||||
+READ_ROM_NO_WRITE
|
+READ_ROM_NO_WRITE
|
||||||
jsr $FE89
|
jsr $FE89 ; initialize machine like a cold boot
|
||||||
jsr $FE93
|
jsr $FE93 ; (many games assume a 'clean slate')
|
||||||
sta $C000
|
sta $C000
|
||||||
sta $C002
|
sta $C002
|
||||||
sta $C004
|
sta $C004
|
||||||
@@ -196,23 +163,60 @@ AttractMode
|
|||||||
jsr $FC58
|
jsr $FC58
|
||||||
ldx #$FF
|
ldx #$FF
|
||||||
txs
|
txs
|
||||||
jmp (ldrlo2)
|
jmp (ldrlo2) ; jump to entry point
|
||||||
@end
|
@end_prelaunch
|
||||||
|
|
||||||
|
@Slideshow
|
||||||
|
pha ; save module type
|
||||||
|
|
||||||
|
+LOAD_FILE kAttractModeSlideshowDirectory, @key
|
||||||
|
|
||||||
|
jsr ParseKeyValueList ; parse slideshow configuration
|
||||||
|
!word gSlideshowStore
|
||||||
|
!word ldrlo2 ; (ldrlo2) points to load address
|
||||||
|
pla ; restore module type
|
||||||
|
cmp #$01
|
||||||
|
beq @HGRSlideshow
|
||||||
|
|
||||||
|
;@DHGRSlideshow
|
||||||
|
jsr BlankDHGR
|
||||||
|
jsr okvs_iter
|
||||||
|
!word gSlideshowStore
|
||||||
|
!word DHGRLoad
|
||||||
|
jmp BlankHGR
|
||||||
|
|
||||||
|
@HGRSlideshow
|
||||||
|
jsr okvs_nth ; get filename of transition effect code
|
||||||
|
!word gFXStore
|
||||||
|
@fxindex !byte 0
|
||||||
|
+STAY @fxkey
|
||||||
|
|
||||||
|
inc @fxindex ; increment transition effect index for next time
|
||||||
|
jsr okvs_len
|
||||||
|
!word gFXStore
|
||||||
|
cmp @fxindex
|
||||||
|
bne +
|
||||||
|
lda #0
|
||||||
|
sta @fxindex
|
||||||
|
+
|
||||||
|
; load transition effect code at $6000
|
||||||
|
+LOAD_FILE kFXDirectory, @fxkey
|
||||||
|
|
||||||
|
jsr okvs_iter
|
||||||
|
!word gSlideshowStore
|
||||||
|
!word HGRLoad
|
||||||
|
rts
|
||||||
|
@fxkey !word $FDFD
|
||||||
|
|
||||||
HGRLoad
|
HGRLoad
|
||||||
ldx $C000
|
ldx $C000
|
||||||
bmi Exit
|
bmi Exit
|
||||||
+STAY PTR
|
+STAY PTR
|
||||||
jsr ResetPath
|
|
||||||
+LDADDR kHGRScreenshotDirectory
|
; load HGR screenshot at $4000
|
||||||
jsr AddToPath
|
+LOAD_FILE kHGRScreenshotDirectory, PTR
|
||||||
+LDADDR kPathSeparator
|
|
||||||
jsr AddToPath
|
jsr $6000 ; transition effect code was loaded here earlier
|
||||||
+LDAY PTR
|
|
||||||
jsr AddToPath
|
|
||||||
jsr LoadFile
|
|
||||||
!word gPathname
|
|
||||||
jsr IrisHGR;SpiralHGR;DiagonalHGR;InterlockingVerticalHGR;FizzleHGR;InterlockingHorizontalHGR;
|
|
||||||
jmp WaitOnScreenshot
|
jmp WaitOnScreenshot
|
||||||
|
|
||||||
DHGRLoad
|
DHGRLoad
|
||||||
@@ -308,31 +312,14 @@ ClearHGR1
|
|||||||
bne @a
|
bne @a
|
||||||
rts
|
rts
|
||||||
|
|
||||||
kGameListConfFile
|
|
||||||
!byte @kGameListConfFile_e-@kGameListConfFile_b
|
|
||||||
@kGameListConfFile_b
|
|
||||||
!text "GAMES.CONF"
|
|
||||||
@kGameListConfFile_e
|
|
||||||
kAttractModeConfFile
|
|
||||||
!byte @kAttractModeConfFile_e-@kAttractModeConfFile_b
|
|
||||||
@kAttractModeConfFile_b
|
|
||||||
!text "ATTRACT.CONF"
|
|
||||||
@kAttractModeConfFile_e
|
|
||||||
|
|
||||||
; these routines will only be called after relocating to language card
|
; these routines will only be called after relocating to language card
|
||||||
!source "src/prodos.path.a"
|
!source "src/prodos.path.a"
|
||||||
!source "src/glue.prorwts2.a"
|
!source "src/glue.prorwts2.a"
|
||||||
!source "src/okvs.a"
|
!source "src/okvs.a"
|
||||||
|
!source "src/wait.a"
|
||||||
!source "src/parse.common.a"
|
!source "src/parse.common.a"
|
||||||
!source "src/parse.games.a"
|
!source "src/parse.games.a"
|
||||||
!source "src/fx.hgr.common.a"
|
!source "src/fx/fx.dhgr.fizzle.a"
|
||||||
!source "src/fx.hgr.fizzle.a"
|
|
||||||
!source "src/fx.hgr.spiral.a"
|
|
||||||
!source "src/fx.hgr.diagonal.a"
|
|
||||||
!source "src/fx.hgr.iris.a"
|
|
||||||
!source "src/fx.hgr.interlockingvertical.a"
|
|
||||||
!source "src/fx.hgr.interlockinghorizontal.a"
|
|
||||||
!source "src/fx.dhgr.fizzle.a"
|
|
||||||
gGamesListStore
|
gGamesListStore
|
||||||
!word *+2 ; address of first okvs store
|
!word *+2 ; address of first okvs store
|
||||||
}
|
}
|
||||||
|
@@ -51,18 +51,3 @@ HGRBlockCopy
|
|||||||
dex
|
dex
|
||||||
bne @loop
|
bne @loop
|
||||||
rts
|
rts
|
||||||
|
|
||||||
WaitForKeyWithTimeout
|
|
||||||
; in: A = timeout length (like standard $FCA8 wait routine)
|
|
||||||
; out: A clobbered
|
|
||||||
; X/Y preserved
|
|
||||||
sec
|
|
||||||
@wait1 pha
|
|
||||||
@wait2 sbc #1
|
|
||||||
bne @wait2
|
|
||||||
pla
|
|
||||||
bit $C000
|
|
||||||
bmi @exit
|
|
||||||
sbc #1
|
|
||||||
bne @wait1
|
|
||||||
@exit rts
|
|
@@ -1,4 +1,7 @@
|
|||||||
DiagonalHGR
|
!cpu 6502
|
||||||
|
!to "build/FX/DIAGONAL",plain
|
||||||
|
*=$6000
|
||||||
|
|
||||||
lda #$27
|
lda #$27
|
||||||
sta $FB
|
sta $FB
|
||||||
lda #$17
|
lda #$17
|
||||||
@@ -35,3 +38,5 @@ DiagonalHGR
|
|||||||
sta $FB
|
sta $FB
|
||||||
bpl @loop
|
bpl @loop
|
||||||
@exit rts
|
@exit rts
|
||||||
|
|
||||||
|
!source "src/fx/fx.hgr.common.a"
|
@@ -1,7 +1,10 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2017-2018 by qkumba
|
;(c) 2017-2018 by qkumba
|
||||||
|
|
||||||
FizzleHGR
|
!cpu 6502
|
||||||
|
!to "build/FX/FIZZLE",plain
|
||||||
|
*=$6000
|
||||||
|
|
||||||
;init RNG
|
;init RNG
|
||||||
|
|
||||||
ldx #1
|
ldx #1
|
@@ -1,7 +1,10 @@
|
|||||||
|
!cpu 6502
|
||||||
|
!to "build/FX/INTERLOCK.LR",plain
|
||||||
|
*=$6000
|
||||||
|
|
||||||
index1 = $FE
|
index1 = $FE
|
||||||
index2 = $FF
|
index2 = $FF
|
||||||
|
|
||||||
InterlockingHorizontalHGR
|
|
||||||
lda #$27
|
lda #$27
|
||||||
sta index1
|
sta index1
|
||||||
lda #$00
|
lda #$00
|
||||||
@@ -66,3 +69,5 @@ InterlockingHorizontalHGR
|
|||||||
!hex A8A8A8A828282828A8A8A8A828282828
|
!hex A8A8A8A828282828A8A8A8A828282828
|
||||||
!hex 80808080000000008080808000000000
|
!hex 80808080000000008080808000000000
|
||||||
!hex 80808080000000008080808000000000
|
!hex 80808080000000008080808000000000
|
||||||
|
|
||||||
|
!source "src/wait.a"
|
@@ -1,8 +1,10 @@
|
|||||||
!zone {
|
!cpu 6502
|
||||||
|
!to "build/FX/INTERLOCK.UD",plain
|
||||||
|
*=$6000
|
||||||
|
|
||||||
row1 = $fe
|
row1 = $fe
|
||||||
row2 = $ff
|
row2 = $ff
|
||||||
|
|
||||||
InterlockingVerticalHGR
|
|
||||||
lda #$00
|
lda #$00
|
||||||
sta row1
|
sta row1
|
||||||
lda #$5F
|
lda #$5F
|
||||||
@@ -33,4 +35,6 @@ InterlockingVerticalHGR
|
|||||||
dec row2
|
dec row2
|
||||||
bpl @loop
|
bpl @loop
|
||||||
@exit rts
|
@exit rts
|
||||||
}
|
|
||||||
|
!source "src/wait.a"
|
||||||
|
!source "src/fx/fx.hgr.common.a"
|
@@ -1,8 +1,10 @@
|
|||||||
!zone {
|
!cpu 6502
|
||||||
round = $F0
|
!to "build/FX/IRIS",plain
|
||||||
block = $F1
|
*=$6000
|
||||||
|
|
||||||
|
round = $FC
|
||||||
|
block = $FD
|
||||||
|
|
||||||
IrisHGR
|
|
||||||
lda #$00
|
lda #$00
|
||||||
sta round
|
sta round
|
||||||
@outerloop
|
@outerloop
|
||||||
@@ -18,7 +20,7 @@ IrisHGR
|
|||||||
@innerloop
|
@innerloop
|
||||||
ldy block
|
ldy block
|
||||||
lda ($fe),y
|
lda ($fe),y
|
||||||
bmi @nextround
|
bmi @nextround ; exit condition
|
||||||
tax
|
tax
|
||||||
iny
|
iny
|
||||||
lda ($fe),y
|
lda ($fe),y
|
||||||
@@ -27,7 +29,7 @@ IrisHGR
|
|||||||
jsr HGRBlockCopy
|
jsr HGRBlockCopy
|
||||||
inc block
|
inc block
|
||||||
inc block
|
inc block
|
||||||
bne @innerloop ; always branches
|
bne @innerloop ; always branches (only exit condition is the BMI above)
|
||||||
@nextround
|
@nextround
|
||||||
lda #$40
|
lda #$40
|
||||||
jsr WaitForKeyWithTimeout
|
jsr WaitForKeyWithTimeout
|
||||||
@@ -93,4 +95,6 @@ IrisHGR
|
|||||||
@round25 !byte 0,2, 0,37, 1,1, 1,38, 2,0, 2,39, 21,0, 21,39, 22,1, 22,38, 23,2, 23,37, 255
|
@round25 !byte 0,2, 0,37, 1,1, 1,38, 2,0, 2,39, 21,0, 21,39, 22,1, 22,38, 23,2, 23,37, 255
|
||||||
@round26 !byte 0,1, 0,38, 1,0, 1,39, 22,0, 22,39, 23,1, 23,38, 255
|
@round26 !byte 0,1, 0,38, 1,0, 1,39, 22,0, 22,39, 23,1, 23,38, 255
|
||||||
@round27 !byte 0,0, 0,39, 23,0, 23,39, 255
|
@round27 !byte 0,0, 0,39, 23,0, 23,39, 255
|
||||||
}
|
|
||||||
|
!source "src/wait.a"
|
||||||
|
!source "src/fx/fx.hgr.common.a"
|
@@ -1,4 +1,7 @@
|
|||||||
SpiralHGR
|
!cpu 6502
|
||||||
|
!to "build/FX/SPIRAL",plain
|
||||||
|
*=$6000
|
||||||
|
|
||||||
lda #$27
|
lda #$27
|
||||||
sta $FB
|
sta $FB
|
||||||
lda #$17
|
lda #$17
|
||||||
@@ -67,3 +70,6 @@ SpiralHGR
|
|||||||
inc $FA
|
inc $FA
|
||||||
bne @outerloop ; always branches
|
bne @outerloop ; always branches
|
||||||
@exit rts
|
@exit rts
|
||||||
|
|
||||||
|
!source "src/wait.a"
|
||||||
|
!source "src/fx/fx.hgr.common.a"
|
@@ -133,8 +133,8 @@ traverse
|
|||||||
|
|
||||||
;read next directory block when we reach the end of this block
|
;read next directory block when we reach the end of this block
|
||||||
|
|
||||||
lda readbuff + NEXT_BLOCK_LO
|
lda hdddirbuf + NEXT_BLOCK_LO
|
||||||
ldx readbuff + NEXT_BLOCK_HI
|
ldx hdddirbuf + NEXT_BLOCK_HI
|
||||||
bcs +
|
bcs +
|
||||||
|
|
||||||
@myfoundname
|
@myfoundname
|
||||||
|
12
src/macros.a
12
src/macros.a
@@ -81,3 +81,15 @@
|
|||||||
!macro READ_ROM_NO_WRITE {
|
!macro READ_ROM_NO_WRITE {
|
||||||
bit $C082
|
bit $C082
|
||||||
}
|
}
|
||||||
|
|
||||||
|
!macro LOAD_FILE .subdirectory, .filename {
|
||||||
|
jsr ResetPath
|
||||||
|
+LDADDR .subdirectory
|
||||||
|
jsr AddToPath
|
||||||
|
+LDADDR kPathSeparator
|
||||||
|
jsr AddToPath
|
||||||
|
+LDAY .filename
|
||||||
|
jsr AddToPath
|
||||||
|
jsr LoadFile
|
||||||
|
!word gPathname
|
||||||
|
}
|
||||||
|
@@ -9,6 +9,8 @@
|
|||||||
|
|
||||||
gAttractModeStore
|
gAttractModeStore
|
||||||
!word $FDFD
|
!word $FDFD
|
||||||
|
gFXStore
|
||||||
|
!word $FDFD
|
||||||
gSlideshowStore
|
gSlideshowStore
|
||||||
!word $FDFD
|
!word $FDFD
|
||||||
|
|
||||||
@@ -59,7 +61,7 @@ ParseKeyValueList
|
|||||||
|
|
||||||
ldy #$00 ; index into ($FE) pointing to current character
|
ldy #$00 ; index into ($FE) pointing to current character
|
||||||
@newkey ldx #$00 ; X = index into current key
|
@newkey ldx #$00 ; X = index into current key
|
||||||
stx gVal ; initialize value length (in case this line has no value)
|
stx gValLen ; initialize value length (in case this line has no value)
|
||||||
jsr IncAndGetChar
|
jsr IncAndGetChar
|
||||||
cmp #$0D ; CR in first position (blank line) -> no key
|
cmp #$0D ; CR in first position (blank line) -> no key
|
||||||
beq @newkey
|
beq @newkey
|
||||||
|
@@ -30,6 +30,10 @@ kDemoDirectory
|
|||||||
!byte 4
|
!byte 4
|
||||||
!raw "DEMO"
|
!raw "DEMO"
|
||||||
|
|
||||||
|
kFXDirectory
|
||||||
|
!byte 2
|
||||||
|
!raw "FX"
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; ResetPath
|
; ResetPath
|
||||||
; reset gPathname to length 0
|
; reset gPathname to length 0
|
||||||
|
17
src/wait.a
Normal file
17
src/wait.a
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
; This file is included from multiple assembly targets,
|
||||||
|
; so it should only have 1 function.
|
||||||
|
;
|
||||||
|
WaitForKeyWithTimeout
|
||||||
|
; in: A = timeout length (like standard $FCA8 wait routine)
|
||||||
|
; out: A clobbered
|
||||||
|
; X/Y preserved
|
||||||
|
sec
|
||||||
|
@wait1 pha
|
||||||
|
@wait2 sbc #1
|
||||||
|
bne @wait2
|
||||||
|
pla
|
||||||
|
bit $C000
|
||||||
|
bmi @exit
|
||||||
|
sbc #1
|
||||||
|
bne @wait1
|
||||||
|
@exit rts
|
Reference in New Issue
Block a user