add DGR mode and action screenshots for DGR games

fixes https://github.com/a2-4am/4cade/issues/326
This commit is contained in:
4am 2021-12-10 21:50:10 -05:00
parent c9f54f0f5f
commit c48469ec80
54 changed files with 265 additions and 45 deletions

View File

@ -141,10 +141,11 @@ index: md asmfx asmprelaunch compress
[ -f build/index ] || ((for f in res/ACTION.HGR/[YZ]*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.HGR > build/HGR6.IDX) [ -f build/index ] || ((for f in res/ACTION.HGR/[YZ]*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.HGR > build/HGR6.IDX)
[ -f build/index ] || ((for f in res/ACTION.DHGR/*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.DHGR > build/DHGR.IDX) [ -f build/index ] || ((for f in res/ACTION.DHGR/*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.DHGR > build/DHGR.IDX)
# #
# precompute indexed files for GR action screenshots # precompute indexed files for GR and DGR action screenshots
# note: these can be padded because they are not compressed # note: these can be padded because they are not compressed
# #
[ -f build/index ] || ((for f in res/ACTION.GR/*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a -p build/TOTAL.DATA res/ACTION.GR > build/GR.IDX) [ -f build/index ] || ((for f in res/ACTION.GR/*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a -p build/TOTAL.DATA res/ACTION.GR > build/GR.IDX)
[ -f build/index ] || ((for f in res/ACTION.DGR/*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a -p build/TOTAL.DATA res/ACTION.DGR > build/DGR.IDX)
# #
# precompute indexed files for SHR artwork # precompute indexed files for SHR artwork
# note: these can not be padded because they are compressed and the decompressor needs the exact size # note: these can not be padded because they are compressed and the decompressor needs the exact size
@ -190,12 +191,14 @@ index: md asmfx asmprelaunch compress
[ -f build/index ] || bin/addfile.sh build/HGR6.IDX build/TOTAL.DATA > src/index/hgr6.idx.a [ -f build/index ] || bin/addfile.sh build/HGR6.IDX build/TOTAL.DATA > src/index/hgr6.idx.a
[ -f build/index ] || bin/addfile.sh build/DHGR.IDX build/TOTAL.DATA > src/index/dhgr.idx.a [ -f build/index ] || bin/addfile.sh build/DHGR.IDX build/TOTAL.DATA > src/index/dhgr.idx.a
[ -f build/index ] || bin/addfile.sh build/GR.IDX build/TOTAL.DATA > src/index/gr.idx.a [ -f build/index ] || bin/addfile.sh build/GR.IDX build/TOTAL.DATA > src/index/gr.idx.a
[ -f build/index ] || bin/addfile.sh build/DGR.IDX build/TOTAL.DATA > src/index/dgr.idx.a
[ -f build/index ] || bin/addfile.sh build/ARTWORK.IDX build/TOTAL.DATA > src/index/artwork.idx.a [ -f build/index ] || bin/addfile.sh build/ARTWORK.IDX build/TOTAL.DATA > src/index/artwork.idx.a
# #
# add additional miscellaneous files # add additional miscellaneous files
# #
[ -f build/index ] || bin/addfile.sh build/COVERFADE build/TOTAL.DATA > src/index/coverfade.idx.a [ -f build/index ] || bin/addfile.sh build/COVERFADE build/TOTAL.DATA > src/index/coverfade.idx.a
[ -f build/index ] || bin/addfile.sh build/GR.FIZZLE build/TOTAL.DATA > src/index/gr.fizzle.idx.a [ -f build/index ] || bin/addfile.sh build/GR.FIZZLE build/TOTAL.DATA > src/index/gr.fizzle.idx.a
[ -f build/index ] || bin/addfile.sh build/DGR.FIZZLE build/TOTAL.DATA > src/index/dgr.fizzle.idx.a
[ -f build/index ] || bin/addfile.sh build/HELPTEXT build/TOTAL.DATA > src/index/helptext.idx.a [ -f build/index ] || bin/addfile.sh build/HELPTEXT build/TOTAL.DATA > src/index/helptext.idx.a
[ -f build/index ] || bin/addfile.sh build/CREDITS build/TOTAL.DATA > src/index/credits.idx.a [ -f build/index ] || bin/addfile.sh build/CREDITS build/TOTAL.DATA > src/index/credits.idx.a
[ -f build/index ] || bin/addfile.sh res/DECRUNCH build/TOTAL.DATA > src/index/decrunch.idx.a [ -f build/index ] || bin/addfile.sh res/DECRUNCH build/TOTAL.DATA > src/index/decrunch.idx.a

View File

@ -81,6 +81,8 @@ cat res/ATTRACT.CONF |
check_slideshow res/SS/"$module_name" res/ARTWORK.SHR/ check_slideshow res/SS/"$module_name" res/ARTWORK.SHR/
elif [ "$module_type" = "6" ]; then elif [ "$module_type" = "6" ]; then
check_slideshow res/SS/"$module_name" res/ACTION.GR/ check_slideshow res/SS/"$module_name" res/ACTION.GR/
elif [ "$module_type" = "7" ]; then
check_slideshow res/SS/"$module_name" res/ACTION.DGR/
else else
fatal_error "Unknown module type" $module_type fatal_error "Unknown module type" $module_type
fi fi

View File

@ -43,6 +43,14 @@ cat res/GAMES.CONF |
sort | sort |
uniq >> /tmp/g uniq >> /tmp/g
# add DGR action screenshots, if any
cat res/SS/ACTDGR*.CONF |
egrep "(^|=)""$game""$" |
cut -d"=" -f1 |
sed -e "s/$/=E/g" |
sort |
uniq >> /tmp/g
# add self-running demo, if any # add self-running demo, if any
cat res/ATTRACT.CONF | cat res/ATTRACT.CONF |
grep "^$game=0" >> /tmp/g grep "^$game=0" >> /tmp/g

BIN
res/ACTION.DGR/BEJEWELED Normal file

Binary file not shown.

BIN
res/ACTION.DGR/FLAPPLE.BIRD Normal file

Binary file not shown.

Binary file not shown.

View File

@ -25,10 +25,12 @@
# 4 = DHGR action slideshow (|key| is a file in /SS/ containing files in /ACTION.DHGR/) # 4 = DHGR action slideshow (|key| is a file in /SS/ containing files in /ACTION.DHGR/)
# 5 = SHR box art slideshow (|key| is a file in /SS/ containing files in /ARTWORK.SHR/) # 5 = SHR box art slideshow (|key| is a file in /SS/ containing files in /ARTWORK.SHR/)
# 6 = GR action slideshow (|key| is a file in /SS/ containing files in /ACTION.GR/) # 6 = GR action slideshow (|key| is a file in /SS/ containing files in /ACTION.GR/)
# 7 = DGR action slideshow (|key| is a file in /SS/ containing files in /ACTION.DGR/)
# A = single HGR file (|key| is a file in /ACTION.HGR/) # A = single HGR file (|key| is a file in /ACTION.HGR/)
# B = single DHGR file (|key| is a file in /ACTION.DHGR/) # B = single DHGR file (|key| is a file in /ACTION.DHGR/)
# C = single SHR file (|key| is a file in /ARTWORK.SHR/) # C = single SHR file (|key| is a file in /ARTWORK.SHR/)
# D = single GR file (|key| is a file in /ACTION.GR/) # D = single GR file (|key| is a file in /ACTION.GR/)
# E = single DGR file (|key| is a file in /ACTION.DGR/)
# #
# Blank lines and lines beginning with '#' are ignored (like this one!) # Blank lines and lines beginning with '#' are ignored (like this one!)
# A line beginning with '[' terminates the parsing # A line beginning with '[' terminates the parsing
@ -47,6 +49,7 @@ ACTIONPOP.CONF=2
SAMMY.LIGHTFOOT=0 SAMMY.LIGHTFOOT=0
ACTIONEFG6.CONF=2 ACTIONEFG6.CONF=2
ADVINT.CONF=1 ADVINT.CONF=1
ACTDGR1.CONF=7
SHR1.CONF=5 SHR1.CONF=5
# set 2 # set 2

View File

@ -3,5 +3,6 @@
# This file is automatically generated # This file is automatically generated
# #
BEJEWELED=E
[eof] [eof]

View File

@ -3,5 +3,7 @@
# This file is automatically generated # This file is automatically generated
# #
FLAPPLE.BIRD2=E
FLAPPLE.BIRD=E
[eof] [eof]

9
res/SS/ACTDGR1.CONF Normal file
View File

@ -0,0 +1,9 @@
#
# action shots slideshow of double lo-res games
#
FLAPPLE.BIRD
BEJEWELED
FLAPPLE.BIRD2=FLAPPLE.BIRD
[eof]

View File

@ -104,6 +104,7 @@ ResetVector ; 6 bytes, copied to $100
!source "src/ui.attract.dhgr.a" !source "src/ui.attract.dhgr.a"
!source "src/ui.attract.shr.a" !source "src/ui.attract.shr.a"
!source "src/ui.attract.gr.a" !source "src/ui.attract.gr.a"
!source "src/ui.attract.dgr.a"
!source "src/ui.offscreen.a" !source "src/ui.offscreen.a"
!source "src/ui.cheats.a" !source "src/ui.cheats.a"
!source "src/ui.credits.a" !source "src/ui.credits.a"

View File

@ -201,7 +201,7 @@ PRELAUNCH_STANDARD_SIZE = 61 ; LoadStandardPrelaunch, eventually to be d
iCurBlockLo = $D601 ; constant iCurBlockLo = $D601 ; constant
iCurBlockHi = $D603 ; constant iCurBlockHi = $D603 ; constant
launchpatch = $D853 ; glue.launch.a launchpatch = $D853 ; glue.launch.a
iAddToPath = $FECB ; Roger Rabbit, avoid, use Infiltrator 2 style instead iAddToPath = $FEBF ; Roger Rabbit, avoid, use Infiltrator 2 style instead
itraverse = $DB31 ; Roger Rabbit, avoid, use Infiltrator 2 style instead itraverse = $DB31 ; Roger Rabbit, avoid, use Infiltrator 2 style instead
ldrlo = $55 ; constant ldrlo = $55 ; constant
ldrhi = $56 ; constant ldrhi = $56 ; constant

36
src/fx/fx.dgr.fizzle.a Normal file
View File

@ -0,0 +1,36 @@
;license:MIT
;(c) 2017-2021 by qkumba/4am/John Brooks
;
!cpu 6502
!to "build/DGR.FIZZLE",plain
*=$6000
src = $FC
dst = $FE
ldy #0
sty src
sty dst
lda #$40
sta src+1
sta $C005
clv
-- ldx #4
stx dst+1
- tya
and #$78
cmp #$78
beq + ; skip screen holes
lda (src), y
sta (dst), y
+ iny
bne -
inc src+1
inc dst+1
dex
bne -
bvs exit
sta $C004
bit exit
bvs -- ; always branches
exit rts

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10925185 !be24 10931567
!le16 4244 !le16 4244

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10878065 !be24 10884353
!le16 5223 !le16 5239

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10820924 !be24 10827212
!le16 3586 !le16 3586

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10833294 !be24 10839582
!le16 3946 !le16 3946

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10848693 !be24 10854981
!le16 4998 !le16 4998

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10866345 !be24 10872633
!le16 5571 !le16 5571

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10929429 !be24 10935811
!le16 410 !le16 410

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10930147 !be24 10936579
!le16 448 !le16 448

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10930595 !be24 10937027
!le16 303 !le16 303

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10885434 !be24 10891738
!le16 1242 !le16 1242

View File

@ -0,0 +1,8 @@
;
; Index record for build/DGR.FIZZLE
;
; This file is automatically generated
;
!byte 0
!be24 10936328
!le16 50

8
src/index/dgr.idx.a Normal file
View File

@ -0,0 +1,8 @@
;
; Index record for build/DGR.IDX
;
; This file is automatically generated
;
!byte 0
!be24 10931508
!le16 59

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10923855 !be24 10930178
!le16 1249 !le16 1249

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10909845 !be24 10916168
!le16 464 !le16 464

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10883288 !be24 10889592
!le16 2146 !le16 2146

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10886907 !be24 10893211
!le16 6149 !le16 6149

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10929839 !be24 10936221
!le16 107 !le16 107

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10925104 !be24 10931427
!le16 81 !le16 81

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10929946 !be24 10936378
!le16 201 !le16 201

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10910309 !be24 10916632
!le16 4407 !le16 4407

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10914716 !be24 10921039
!le16 1533 !le16 1533

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10916249 !be24 10922572
!le16 1040 !le16 1040

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10917289 !be24 10923612
!le16 3237 !le16 3237

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10920526 !be24 10926849
!le16 2764 !le16 2764

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10923290 !be24 10929613
!le16 460 !le16 460

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10923750 !be24 10930073
!le16 105 !le16 105

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10930898 !be24 10937330
!le16 2370 !le16 2370

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10897950 !be24 10904273
!le16 6149 !le16 6149

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10871916 !be24 10878204
!le16 6149 !le16 6149

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10812892 !be24 10819180
!le16 8032 !le16 8032

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10824510 !be24 10830798
!le16 8784 !le16 8784

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10837240 !be24 10843528
!le16 11453 !le16 11453

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10853691 !be24 10859979
!le16 12654 !le16 12654

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10886676 !be24 10892980
!le16 231 !le16 231

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10893056 !be24 10899360
!le16 4894 !le16 4913

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 10904099 !be24 10910422
!le16 5746 !le16 5746

View File

@ -102,6 +102,9 @@ kDHGRActionIndexRecord
kGRActionIndexRecord kGRActionIndexRecord
!source "src/index/gr.idx.a" !source "src/index/gr.idx.a"
kDGRActionIndexRecord
!source "src/index/dgr.idx.a"
kHGRActionIndexLo kHGRActionIndexLo
!byte <kHGRActionIndexRecord0 !byte <kHGRActionIndexRecord0
!byte <kHGRActionIndexRecord1 !byte <kHGRActionIndexRecord1
@ -179,6 +182,9 @@ kCoverFadeRecord
kGRFizzleRecord kGRFizzleRecord
!source "src/index/gr.fizzle.idx.a" !source "src/index/gr.fizzle.idx.a"
kDGRFizzleRecord
!source "src/index/dgr.fizzle.idx.a"
kHelpBackgroundRecord kHelpBackgroundRecord
!source "src/index/res.help.idx.a" !source "src/index/res.help.idx.a"

106
src/ui.attract.dgr.a Normal file
View File

@ -0,0 +1,106 @@
;license:MIT
;(c) 2021 by 4am
;
; DGR action slideshows
;
; Public functions
; - DGRActionSlideshow
; - DGRSingle
;
;------------------------------------------------------------------------------
; DGRActionSlideshow
; display a slideshow of double lo-res action screenshots
;
; safe to call if machine only has 64K (does nothing and exits)
;
; in: none
; out: everything clobbered
; graphics mode set to display hi-res screen, which is blank
;------------------------------------------------------------------------------
DGRActionSlideshow
bit MachineStatus ; only run DGR slideshow if we have 128K
bvc DGRRTS
jsr LoadDGRTransition ; load transition effect code at $6000
jsr BlankDGR ; switch to DGR mode with initial blank screen
jsr okvs_iter ; cycle through all listed DGR files
!word gSlideshowStore
!word DGRActionCallback ; address of callback (called on each file)
jmp BlankHGR ; switch back to HGR mode with initial blank screen on exit
;------------------------------------------------------------------------------
; DGRSingle
; display a single lo-res screenshot, with transition effect
;
; in: none
; out: everything clobbered
; graphics mode set to display hi-res screen
;------------------------------------------------------------------------------
DGRSingle
+ST16 IndexedDGRFilename
jsr BlankDGR ; switch to DGR mode with initial blank screen
jsr LoadIndexedDGRFile ; load DGR screen at $4000
jsr LoadDGRTransition ; load transition effect code at $6000
jsr ExecuteTransitionAt6000AndWait
jmp BlankHGR ; switch back to HGR mode with initial blank screen on exit
;------------------------------------------------------------------------------
; LoadDGRTransition [private]
;
; in: none
; out: all registers and flags clobbered
; $6000..$BFFF/main contains transition effect code (probably not all
; of that, but no promises)
;------------------------------------------------------------------------------
LoadDGRTransition
jsr LoadIndexedFile
!word $6000
!word kDGRFizzleRecord
DGRRTS rts
;------------------------------------------------------------------------------
; DGRActionCallback [private]
; callback called by okvs_iter on gSlideshowStore
; to load and display a single DGR action screenshot
; in: A/Y contains address of filename (name only, path is always /ACTION.DGR/)
; $WINDEX contains 0-based index of the current record in gSlideshowStore (word)
; out: all registers and flags clobbered
; $0800..$1EFF preserved (this contains the gSlideshowStore OKVS data)
; $2000..$BFFF clobbered by graphics data and transition code
;------------------------------------------------------------------------------
DGRActionCallback
bit KBD
bmi DGRRTS
+ST16 IndexedDGRFilename
jsr FindGame
; if game name is not found (C will be set here), it means the game
; can't be played due to memory or joystick requirements, so we hide
; it from slideshows
bcs DGRRTS
jsr LoadIndexedDGRFile
jmp ExecuteTransitionAt6000AndWait
LoadIndexedDGRFile
; in: caller has set IndexedDGRFilename
; out: all flags & registers clobbered
jsr LoadIndexedFile ; load index file into $4A00
- !word $4A00
!word kDGRActionIndexRecord
jsr okvs_find
!word -
IndexedDGRFilename
!word $FDFD ; SMC
+ST16 @indexRecordPtr
jsr LoadIndexedFile ; load entire DGR screenshot at $4000..$47FF
!word $4000 ; because that's where the transition code expects to find it
; auxmem half is first ($4000..$43FF)
; mainmem half is second ($4400..$47FF)
@indexRecordPtr
!word $FDFD ; SMC
rts

View File

@ -211,11 +211,13 @@ RunAttractModule
!byte <DHGRActionSlideshow !byte <DHGRActionSlideshow
!byte <SHRSlideshow !byte <SHRSlideshow
!byte <GRActionSlideshow !byte <GRActionSlideshow
!byte <DGRActionSlideshow
@singleslo @singleslo
!byte <HGRSingle !byte <HGRSingle
!byte <DHGRSingle !byte <DHGRSingle
!byte <SHRSingle !byte <SHRSingle
!byte <GRSingle !byte <GRSingle
!byte <DGRSingle
@slideshowshi @slideshowshi
!byte >HGRTitleSlideshow !byte >HGRTitleSlideshow
!byte >HGRActionSlideshow !byte >HGRActionSlideshow
@ -223,11 +225,13 @@ RunAttractModule
!byte >DHGRActionSlideshow !byte >DHGRActionSlideshow
!byte >SHRSlideshow !byte >SHRSlideshow
!byte >GRActionSlideshow !byte >GRActionSlideshow
!byte >DGRActionSlideshow
@singleshi @singleshi
!byte >HGRSingle !byte >HGRSingle
!byte >DHGRSingle !byte >DHGRSingle
!byte >SHRSingle !byte >SHRSingle
!byte >GRSingle !byte >GRSingle
!byte >DGRSingle
DemoFilename DemoFilename
!byte 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 !byte 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15

View File

@ -54,6 +54,22 @@ Home
lda TEXTMODE lda TEXTMODE
jmp UnwaitForVBL jmp UnwaitForVBL
BlankDGR
jsr BlankDHGR
ldy #$2C ; BIT
sty PageFrom
ldx #$04
stx PageTo+2
jsr ClearToBlack
sta WRITEAUXMEM
ldx #$04
stx PageTo+2
jsr ClearToBlack
sta WRITEMAINMEM
lda #1
sta OffscreenPage
bne DGRMode ; always branches
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; BlankDHGR ; BlankDHGR
; clear and show DHGR page 1 without flickering ; clear and show DHGR page 1 without flickering
@ -73,13 +89,20 @@ BlankDHGR
; /!\ execution falls through here to DHGRMode ; /!\ execution falls through here to DHGRMode
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; DHGRMode ; DHGRMode / DGRMode
; switch to DHGR mode (HARDER THAN IT SOUNDS) ; switch to DHGR or DGR mode (HARDER THAN IT SOUNDS)
; ;
; in: none ; in: none
; out: none ; out: none
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
DHGRMode DHGRMode
jsr +
jmp HGRMode
DGRMode
jsr +
bit $C056
jmp GRMode
+
; magic sequence to set colour mode on an RGB card ; magic sequence to set colour mode on an RGB card
; SET80VID clears the RGB-card shift-register ; SET80VID clears the RGB-card shift-register
; DHIRESON/OFF shifts that bit into the mode register ; DHIRESON/OFF shifts that bit into the mode register
@ -98,8 +121,7 @@ DHGRMode
jsr ShowOtherPage jsr ShowOtherPage
lda #1 lda #1
sta gMachineInDHGRMode sta gMachineInDHGRMode
jsr UnwaitForVBL jmp UnwaitForVBL
jmp HGRMode
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; IsSearchKey ; IsSearchKey

View File

@ -233,14 +233,15 @@ ClearMem
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
CopyHGR CopyHGR
ldx #$20 ldx #$20
ldy #$B9 ; LDY ldy #$B9 ; LDA $0000,Y opcode
+ sty PageFrom + sty PageFrom
sta PageTo+2 sta PageTo+2
ClearToBlack
lda #$00 lda #$00
ClearGR ClearGR
ldy #0 ldy #0
PageFrom lda $FD00,y ; SMC PageFrom lda $FD00,y ; SMC address high byte, also SMC opcode (might be BIT)
PageTo sta $FD00,y ; SMC PageTo sta $FD00,y ; SMC address high byte
iny iny
bne PageFrom bne PageFrom
inc PageFrom+2 inc PageFrom+2