DHGR slideshows work

This commit is contained in:
4am 2018-10-28 14:04:52 -04:00
parent b855481e69
commit ddc906d3ca
10 changed files with 195 additions and 68 deletions

View File

@ -32,9 +32,12 @@ dsk: md asm
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/ATTRACT.CONF" >>build/log
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/COVER" >>build/log
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/COVER.A2FC" >>build/log
rsync -aP res/hgr/* build/I >>build/log
bin/buildfileinfo.py build/I >>build/log
$(CADIUS) ADDFOLDER build/"$(DISK)" "/${VOLUME}/I" "build/I" >>build/log
rsync -aP res/hgr/* build/HGR >>build/log
bin/buildfileinfo.py build/HGR >>build/log
$(CADIUS) ADDFOLDER build/"$(DISK)" "/${VOLUME}/HGR" "build/HGR" >>build/log
rsync -aP res/dhgr/* build/DHGR >>build/log
bin/buildfileinfo.py build/DHGR >>build/log
$(CADIUS) ADDFOLDER build/"$(DISK)" "/${VOLUME}/DHGR" "build/DHGR" >>build/log
rsync -aP res/ss/* build/SS >>build/log
$(CADIUS) ADDFOLDER build/"$(DISK)" "/${VOLUME}/SS" "build/SS" >>build/log
# bin/do2po.py res/dsk/ build/po/
@ -56,7 +59,8 @@ mount: dsk
md:
mkdir -p build/po
mkdir -p build/X
mkdir -p build/I
mkdir -p build/HGR
mkdir -p build/DHGR
mkdir -p build/SS
clean:

View File

@ -1 +1 @@
# # Mega-Attract-Mode configuration file # # Mega-Attract-Mode is split into modules. Each module can be a # short slideshow or a self-running demo (like a game's built-in # 'attract mode'). Modules are run in the order listed here, one # after the next, until interrupted by user input. The last-run # module is tracked in the master prefs file. # # Format: # key=value # # value must be one of # 1 for HGR slideshow (key is a file containing a list of HGR graphics) # 2 for DHGR slideshow (key is a file containing a list of DHGR graphics) # 3 for self-running demo (key is an executable binary file) # # Blank lines and lines beginning with '#' are ignored (like this one!) # A line beginning with '[' terminates the parsing # FAVORITES.CONF=1 AB.CONF=1 BRODERBUND.CONF=1 #DHGR.CONF=2 ACTIVISION.CONF=1 CD.CONF=1 ATARI.CONF=1 EFG.CONF=1 SIERRA.CONF=1 DATAMOST.CONF=1 HIJKL.CONF=1 DATASOFT.CONF=1 MNO.CONF=1 MICROFUN.CONF=1 PQR.CONF=1 PICCADILLY.CONF=1 S.CONF=1 SIRIUS.CONF=1 TUVWYXZ.CONF=1 [eof]
# # Mega-Attract-Mode configuration file # # Mega-Attract-Mode is split into modules. Each module can be a # short slideshow or a self-running demo (like a game's built-in # 'attract mode'). Modules are run in the order listed here, one # after the next, until interrupted by user input. The last-run # module is tracked in the master prefs file. # # Format: # key=value # # value must be one of # 1 for HGR slideshow (key is a file containing a list of HGR graphics) # 2 for DHGR slideshow (key is a file containing a list of DHGR graphics) # 3 for self-running demo (key is an executable binary file) # # Blank lines and lines beginning with '#' are ignored (like this one!) # A line beginning with '[' terminates the parsing # FAVORITES.CONF=1 AB.CONF=1 BRODERBUND.CONF=1 DHGR.CONF=2 ACTIVISION.CONF=1 CD.CONF=1 ATARI.CONF=1 EFG.CONF=1 SIERRA.CONF=1 DATAMOST.CONF=1 HIJKL.CONF=1 DATASOFT.CONF=1 MNO.CONF=1 MICROFUN.CONF=1 PQR.CONF=1 PICCADILLY.CONF=1 S.CONF=1 SIRIUS.CONF=1 TUVWYXZ.CONF=1 [eof]

BIN
res/dhgr/BRUCE.LEE Normal file

Binary file not shown.

BIN
res/dhgr/SPIDERBOT Normal file

Binary file not shown.

BIN
res/dhgr/TETRIS128K Normal file

Binary file not shown.

1
res/dhgr/VICTORY.ROAD Normal file

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
# # Broderbund Software slideshow # GALAXIAN SERPENTINE CHAMP.LODERUN LODE.RUNNER SNOGGLE PRINCEUNP DROL ALIEN.RAIN CHOPLIFTER RASTER.BLASTER DAVIDS.MAGIC GALAXIAN SERPENTINE APPLE.PANIC GALAXIAN LODE.RUNNER [eof]
# # Broderbund Software slideshow # DAVIDS.MAGIC GALAXIAN SERPENTINE LODE.RUNNER SNOGGLE PRINCEUNP DROL CHAMP.LODERUN CHOPLIFTER ALIEN.RAIN GALAXIAN SNOGGLE APPLE.PANIC GALAXIAN PRINCEUNP [eof]

View File

@ -5,6 +5,13 @@
!source "src/constants.a"
!source "src/macros.a"
sta $C00E
sta $C00C
sta $C004
sta $C002
sta $C000
jsr $FB2F
jsr $FC58
jsr Has64K ; check for 64K (required)
bcs @no64K
jsr DisableAccelerator ; set to 1 MHz
@ -31,8 +38,6 @@
jmp Start
@no64K
jsr $FB2F
jsr $FC58
ldy #@no64Klen
- lda @s_no64K,y
sta $6B6,y
@ -84,23 +89,15 @@ Start
+STAY gSlideshowStore ; save pointer to free space for next store
bit $C010
jsr BlankHGR
jsr AttractMode
jmp Reboot
AttractMode
jsr okvs_nth ; get filename of next attract module
!word gAttractModeStore
@index !byte 0
+STAY PTR
jsr ResetPath
+LDADDR kAttractModeSlideshowDirectory
jsr AddToPath
+LDADDR kPathSeparator
jsr AddToPath
+LDAY PTR
jsr AddToPath
jsr LoadFile ; load attract module configuration file
!word gPathname
@index !byte 2
+STAY @key
inc @index ; increment module index for next time
jsr okvs_len
@ -110,21 +107,66 @@ AttractMode
lda #0
sta @index
+
jsr okvs_get
!word gAttractModeStore
@key !word $FDFD
+STAY PTR
jsr +
lda $C000
bpl AttractMode
rts
+
ldy #1
lda (PTR),y
and #$0F
cmp #$01
clc
beq @Slideshow
cmp #$02
sec
beq @Slideshow
cmp #$03
bne AttractMode
beq @SelfRunningDemo
@Slideshow
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
!word gSlideshowStore
!word ldrlo2 ; (ldrlo2) points to load address
plp ; carry clear = HGR, carry set = DHGR
bcs @DHGRSlideshow
jsr okvs_iter
!word gSlideshowStore
!word HGRLoad
rts
@DHGRSlideshow
jsr BlankDHGR
jsr okvs_iter
!word gSlideshowStore
!word DHGRLoad
jmp BlankHGR
lda $C000
bpl AttractMode
@SelfRunningDemo
; TODO
rts
HGRLoad
ldx $C000
bmi @exit
bmi Exit
+STAY PTR
jsr ResetPath
+LDADDR kHGRScreenshotDirectory
@ -136,11 +178,28 @@ HGRLoad
jsr LoadFile
!word gPathname
jsr FizzleHGR
jmp WaitOnScreenshot
DHGRLoad
ldx $C000
bmi Exit
+STAY PTR
jsr ResetPath
+LDADDR kDHGRScreenshotDirectory
jsr AddToPath
+LDADDR kPathSeparator
jsr AddToPath
+LDAY PTR
jsr AddToPath
jsr LoadDHRFile
!word gPathname
jsr FizzleDHGR
WaitOnScreenshot
ldx #0
ldy #0
@wait lda $C000
bmi @exit
jsr @burn
bmi Exit
; jsr @burn
dey
bne @wait
dex
@ -148,21 +207,72 @@ HGRLoad
rts
@burn jsr @burn2
@burn2 jsr @burn3
@burn3 jsr @exit
@exit rts
@burn3 jsr Exit
Exit rts
Reboot
ldx #(@end-@start-1)
- lda @start,x
sta $100,x
sta $300,x
dex
bpl -
jmp $100
jmp $300
@start
+READ_ROM_NO_WRITE
jmp $FAA6
@end
Home
ldx #(@end-@start-1)
- lda @start,x
sta $300,x
dex
bpl -
jmp $300
@start
; this will be run from main memory
+READ_ROM_NO_WRITE
sta $C00C ; get out of DHGR mode
jsr $FB2F ; TEXT
jsr $FC58 ; HOME
+READ_RAM1_WRITE_RAM1
rts
@end
BlankHGR
jsr Home
jsr ClearHGR1 ; clear hi-res screen 1
lda $c057 ; show hi-res screen 1 (now blank)
lda $c054
lda $c052
lda $c050
rts
BlankDHGR
jsr Home
jsr ClearHGR1 ; clear hi-res screen 1
sta $C005
jsr ClearHGR1 ; clear hi-res screen 1 in auxmem
sta $C004
sta $c00d
sta $c057
sta $c054
sta $c052
sta $c050
sta $c05e
rts
ClearHGR1
ldx #$20 ; clear hi-res screen 1
stx @a+2
lda #0
tay
@a sta $2000,y
iny
bne @a
inc @a+2
dex
bne @a
rts
kGameListConfFile
!byte @kGameListConfFile_e-@kGameListConfFile_b
@kGameListConfFile_b

View File

@ -28,6 +28,51 @@ LoadFile
+LDPARAM 1
+STAY namlo ; set filename
jsr traverse ; go to subdirectory, set up filename for read
lda #cmdread ; read (instead of write)
sta reqcmd
lda #0 ; 0 = read into main memory
sta auxreq
lda #$FF ; read entire file (ProRWTS2 will figure out exact size)
sta sizehi
jmp hddopendir ; exit via ProRWTS2
;------------------------------------------------------------------------------
; LoadDHRFile
; load .A2FC file (uncompressed double hi-res graphics) into memory
; all at once, using ProRWTS2
; first $2000 bytes of file are loaded into auxiliary memory $2000..$3FFF
; second $2000 bytes of file are loaded into main memory $2000..$3FFF
;
; in: stack contains 2 bytes of parameters:
; +1 address of filename
; out: all flags clobbered
; all registers clobbered
; stack set to next instruction after parameters
;------------------------------------------------------------------------------
LoadDHRFile
+PARAMS_ON_STACK 2
+LDPARAM 1
+STAY namlo ; set filename
jsr traverse ; go to subdirectory, set up filename for read
lda #$00 ; read first $2000 bytes
sta sizelo
lda #$20
sta sizehi
lda #1 ; 1 = read into aux memory
sta auxreq
lda #cmdread ; read (instead of write)
sta reqcmd
jsr hddopendir ; call ProRWTS2
lda #$20 ; read next $2000 bytes
sta sizehi
dec auxreq ; 0 = read into main memory
jmp hddrdwrpart ; call ProRWTS2
traverse
+LDAY gRootDirectory
sta @myreadblock+1
sty @myreadblock+3 ; reset 'root' directory (saved at program start)
@ -133,41 +178,4 @@ LoadFile
pla
sta (namlo), y
@go
lda #cmdread ; read (instead of write)
sta reqcmd
lda #0 ; 0 = read into main memory
sta auxreq
lda #$FF ; read entire file (ProRWTS2 will figure out exact size)
sta sizehi
jmp hddopendir ; exit via ProRWTS2
;------------------------------------------------------------------------------
; LoadDHRFile
; load .A2FC file (uncompressed double hi-res graphics) into memory
; all at once, using ProRWTS2
; first $2000 bytes of file are loaded into auxiliary memory $2000..$3FFF
; second $2000 bytes of file are loaded into main memory $2000..$3FFF
;
; in: stack contains 2 bytes of parameters:
; +1 address of filename
; out: all flags clobbered
; all registers clobbered
; stack set to next instruction after parameters
;------------------------------------------------------------------------------
LoadDHRFile
+PARAMS_ON_STACK 2
+LDPARAM 1
+STAY namlo ; set filename
lda #$00 ; read first $2000 bytes
sta sizelo
lda #$20
sta sizehi
lda #1 ; 1 = read into aux memory
sta auxreq
lda #cmdread ; read (instead of write)
sta reqcmd
jsr hddopendir ; call ProRWTS2
lda #$20 ; read next $2000 bytes
sta sizehi
dec auxreq ; 0 = read into main memory
jmp hddrdwrpart ; call ProRWTS2
rts

View File

@ -15,8 +15,12 @@ kPathSeparator
!raw "/"
kHGRScreenshotDirectory
!byte 1
!raw "I"
!byte 3
!raw "HGR"
kDHGRScreenshotDirectory
!byte 4
!raw "DHGR"
kAttractModeSlideshowDirectory
!byte 2