driven: get atrus code going a bit better

This commit is contained in:
Vince Weaver 2024-11-13 21:39:03 -05:00
parent 2005ddd94e
commit a5547b5c5f
10 changed files with 142 additions and 41 deletions

View File

@ -28,9 +28,6 @@ driven.dsk: QBOOT QLOAD \
$(DOS33_RAW) driven.dsk 20 0 ./part10_graphics/GRAPHICS 0 0
$(DOS33_RAW) driven.dsk 26 0 ./part20_credits/CREDITS 0 0
####
part00_intro/INTRO:

View File

@ -17,7 +17,21 @@ QLOAD: can be up to 4k, have room
GRAPHICS = 16k
CREDITS = 8k or so
Timing: Pattern Going-on
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0,1,2,3 Intro
4 Start of Atrus
5 (rough) Start of Scroll
C (rough) End of Scroll
D (rough) Holds up book
D Plasma starts
F Load maglev image
10 Maglev start
16 Graphics Load
18 Roughly Atrus
1B Roughly falling guy
1C Roughly credits start
1D = end of music
Mem usage plan:
QLOAD at $1200..$1FFF (3.5k)

View File

@ -23,6 +23,7 @@
atrus_opener:
lda #0
sta PLASMA_GROW
bit SET_GR
bit HIRES
@ -100,7 +101,7 @@ atrus_opener:
lda #$20
jsr zx02_full_decomp
lda #2
lda #1
jsr wait_seconds
; jsr wait_until_keypress
@ -129,20 +130,20 @@ atrus_opener:
; jsr wait_until_keypress
bit PAGE1
;=================================
; plasma
; go to overlook graphics
;=================================
lda #<overlook_graphics
bit PAGE1 ; show page 1
lda #<overlook_graphics ; load to page2
sta zx_src_l+1
lda #>overlook_graphics
sta zx_src_h+1
lda #$40
jsr zx02_full_decomp
jsr do_wipe_fizzle
jsr do_wipe_fizzle ; wipe
rts

View File

@ -168,10 +168,16 @@ was_page1:
done_pageflip:
sta DRAW_PAGE ; 3
plasma_end_smc:
lda #52
;plasma_end_smc:
lda #$E
jsr wait_for_pattern
bcc no_grow_yet ; carry set = done
inc PLASMA_GROW
no_grow_yet:
lda #$F
jsr wait_for_pattern
bcc wasnt_keypress
jmp done_plasma
@ -181,6 +187,8 @@ wasnt_keypress:
;====================
; make size bigger
lda PLASMA_GROW
beq skip_plasma_grow
lda top_smc+1
; cmp #0
bmi top_good
@ -202,7 +210,7 @@ left_good:
beq right_good
inc right_smc+1
right_good:
skip_plasma_grow:
; 15?

View File

@ -210,7 +210,7 @@ no_ticker:
jsr hgr_page_flip
lda SCROLL_OFFSET
cmp #193
cmp #164
beq done_pan
jmp pan_outer_outer_loop
@ -346,9 +346,10 @@ draw_text_page3:
scroll_text:
;0123456789012345678901234567890123456789
; .byte "@@@@@@@@@@@@@@@@@@@@"
.byte "\]^_@I@HAVE@FOUND@A@W"
.byte "@\]^_@I@HAVE@FOUND@A@W"
.byte "AY@TO@GET@YOU@HOME[@YOU@MUST@TRAVEL@TO@R"
.byte "IVENQ@FREE@THE@PEOPLEQ@SAVE@MY@WIFEQ@AND"
.byte "@TRAP@MY@DAD[@OH@ALSO@RIVEN@IS@IMPLODING"
.byte "[@SIGNAL@ME@WHEN@YOU@ARE@DONE[@@@@@@@@@@"
.byte "@@@@@@@@@@@@@@"
.byte "[@@@@@@@@@@@@@@@@@@@@"
; .byte "[@SIGNAL@ME@WHEN@YOU@ARE@DONE[@@@@@@@@@@"
; .byte "@@@@@@@@@@@@@@"

View File

@ -61,8 +61,8 @@ div8_loop:
;=============================
; do blue/orange
lda #49
sta plasma_end_smc+1
; lda #49
; sta plasma_end_smc+1
jsr init_plasma_colors
jsr do_plasma
@ -132,11 +132,11 @@ change_mono:
sta DRAW_PAGE
jsr scroll_off
.endif
lda #0
jsr hgr_page1_clearscreen
jsr hgr_page2_clearscreen
.endif
rts
.include "init_plasma.s"

View File

@ -17,7 +17,8 @@ graphics.o: graphics.s \
graphics/riven_233.aux.zx02 \
graphics/riven_233.bin.zx02 \
../wipes/fx.hgr.center.by.pixel.s \
../wipes/fx.hgr.fizzle.s
../wipes/fx.hgr.fizzle.s \
../wipes/fx.hgr.2pass.lr.s
ca65 -o graphics.o graphics.s -l graphics.lst
###

View File

@ -264,5 +264,6 @@ atrus_message2:
.byte 0,23,"time before the submission deadline.",0
.include "../wipes/fx.hgr.center.by.pixel.s"
;.include "../wipes/fx.hgr.2pass.lr.s"
;.include "../wipes/fx.hgr.fizzle.s"

View File

@ -0,0 +1,79 @@
;license:MIT
;(c) 2018 by 4am
;
; vmw -- Convert to ca65 and de-macroed
WROW = $D0
do_wipe_lr:
lda #$00
sta h1_smc+1
sta h2_smc+1
outerloop1:
lda #$BF
sta WROW
loop1:
jsr hgr_calc
h1_smc:
ldy #$00
lda (WIPEL),Y
sta (GBASL),Y
dec WROW
dec WROW
lda WROW
cmp #$FF
bne loop1
lda #$10
jsr WaitForKeyWithTimeout
bmi lrexit
inc h1_smc+1
lda h1_smc+1
cmp #$28
bne outerloop1
outerloop2:
lda #$BE
sta WROW
loop2:
jsr hgr_calc
h2_smc:
ldy #$00
lda (WIPEL),Y
sta (GBASL),Y
dec WROW
dec WROW
lda WROW
cmp #$FE
bne loop2
lda #$10
jsr WaitForKeyWithTimeout
bmi lrexit
inc h2_smc+1
lda h2_smc+1
cmp #$28
bne outerloop2
lrexit:
rts
WaitForKeyWithTimeout:
; in: A = timeout length (like standard $FCA8 wait routine)
; out: A clobbered (not always 0 if key is pressed, but also not the key pressed)
; X/Y preserved
sec
wait1: pha
wait2: sbc #1
bne wait2
pla
bit KEYPRESS
bmi wfk_exit
sbc #1
bne wait1
wfk_exit:
rts

View File

@ -183,12 +183,21 @@ SPRITE_LIST = $F9
SCROLL_OFFSET = $F0
SCROLL_START = $F1
SCROLL_ODD = $F2
SCROLL_SUBSCROLL= $F3
FONT1 = $F4
FONT2 = $F5
SCROLL_ROW = $F6
SCROLL_COL = $F7
P2_OFFSET = $F8
PLASMA_GROW = $F3
SCROLL_SUBSCROLL= $F4
FONT1 = $F5
FONT2 = $F6
SCROLL_ROW = $F7
SCROLL_COL = $F8
; PLASMA
COMPT1 = $F4
COMPT2 = $F5
PARAM1 = $F6
PARAM2 = $F7
PARAM3 = $F8
PARAM4 = $F9
; Maglev
@ -196,19 +205,9 @@ TEMP = $F0
LEVEL_OVER = $F1
WHICH_OVERLAY = $F2
; PLASMACUBE
;OUT1 = $F0
;OUT1H = $F1
;OUT2 = $F2
;OUT2H = $F3
COMPT1 = $F4
COMPT2 = $F5
PARAM1 = $F6
PARAM2 = $F7
PARAM3 = $F8
PARAM4 = $F9
;GRLINE = $FA
;GRLINEH = $FB
; PLASMA