attract mode HGR slideshows work

This commit is contained in:
4am
2018-10-28 11:44:26 -04:00
parent 2136ab3a62
commit b855481e69
21 changed files with 73 additions and 22 deletions

View File

@@ -1 +1 @@
#
#

1
res/hgr/PRINCEUNP Normal file

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
#
#

View File

@@ -1 +1 @@
#
#

View File

@@ -1 +1 @@
#
#

View File

@@ -1 +1 @@
#
#

View File

@@ -1 +1 @@
#
#

View File

@@ -1 +1 @@
#
#

View File

@@ -1 +1 @@
#
#

View File

@@ -1 +1 @@
#
#

View File

@@ -1 +1 @@
#
#

View File

@@ -1 +1 @@
#
#

View File

@@ -1 +1 @@
#
#

View File

@@ -1 +1 @@
#
#

View File

@@ -1 +1 @@
#
#

View File

@@ -1 +1 @@
#
#

View File

@@ -1 +1 @@
#
#

View File

@@ -1 +1 @@
#
#

View File

@@ -59,6 +59,10 @@ FirstMover
Reenter ; self-running demos should call this to exit back to 4cade
; TODO
Start
lda hddopendir+1
ldy hddopendir+3
+STAY gRootDirectory ; save current directory as 'root'
jsr LoadFile ; load games list from file
!word kGameListConfFile
@@ -79,14 +83,14 @@ Start
+LDAY SRC
+STAY gSlideshowStore ; save pointer to free space for next store
bit $C010
jsr AttractMode
jmp $FAA6
jmp Reboot
AttractMode
jsr okvs_nth ; get filename of next attract module
!word gAttractModeStore
!byte 0
@index !byte 0
+STAY PTR
jsr ResetPath
+LDADDR kAttractModeSlideshowDirectory
@@ -98,6 +102,14 @@ AttractMode
jsr LoadFile ; load attract module configuration file
!word gPathname
inc @index ; increment module index for next time
jsr okvs_len
!word gAttractModeStore
cmp @index
bne +
lda #0
sta @index
+
jsr ParseKeyValueList ; parse slideshow configuration
!word gSlideshowStore
!word ldrlo2 ; (ldrlo2) points to load address
@@ -105,6 +117,9 @@ AttractMode
jsr okvs_iter
!word gSlideshowStore
!word HGRLoad
lda $C000
bpl AttractMode
rts
HGRLoad
@@ -121,8 +136,33 @@ HGRLoad
jsr LoadFile
!word gPathname
jsr FizzleHGR
ldx #0
ldy #0
@wait lda $C000
bmi @exit
jsr @burn
dey
bne @wait
dex
bne @wait
rts
@burn jsr @burn2
@burn2 jsr @burn3
@burn3 jsr @exit
@exit rts
Reboot
ldx #(@end-@start-1)
- lda @start,x
sta $100,x
dex
bpl -
jmp $100
@start
+READ_ROM_NO_WRITE
jmp $FAA6
@end
kGameListConfFile
!byte @kGameListConfFile_e-@kGameListConfFile_b
@kGameListConfFile_b

View File

@@ -49,10 +49,13 @@ FizzleHGR
lda ($3c),y
sta ($26),y
;check for keypress
;wait while checking for keypress
lda $c000
ldx #8
@wait lda $c000
bmi @exit
dex
bne @wait
;and exit condition

View File

@@ -8,6 +8,9 @@
; - LoadDHRFile
;
gRootDirectory
!word $FDFD
;------------------------------------------------------------------------------
; LoadFile
; load a file into memory all at once, using ProRWTS2
@@ -25,6 +28,10 @@ LoadFile
+LDPARAM 1
+STAY namlo ; set filename
+LDAY gRootDirectory
sta @myreadblock+1
sty @myreadblock+3 ; reset 'root' directory (saved at program start)
;search for '/' character in filename
ldx #0