second: hook up dots

This commit is contained in:
Vince Weaver 2023-10-28 19:13:02 -04:00
parent aa96991f1d
commit 5126506b04
10 changed files with 249 additions and 56 deletions

View File

@ -11,6 +11,8 @@ all: second_d1.dsk second_d2.dsk
second_d1.dsk: QBOOT QLOAD MUSIC music.inc \
./part01_intropan/INTRO \
./part05_dot_tunnel/TUNNEL \
./part14_dotbounce/DOTS \
./part15_transmission/SPHERES \
./part16_ocean/OCEAN \
./part17_polar/POLAR
cp $(EMPTY_DISK) second_d1.dsk
@ -21,13 +23,17 @@ second_d1.dsk: QBOOT QLOAD MUSIC music.inc \
$(DOS33_RAW) second_d1.dsk 3 0 MUSIC 0 0
$(DOS33_RAW) second_d1.dsk 8 0 ./part01_intropan/INTRO 0 0
$(DOS33_RAW) second_d1.dsk 11 0 ./part05_dot_tunnel/TUNNEL 0 0
# $(DOS33_RAW) second_d1.dsk 13 0 ./part16_ocean/OCEAN 0 0
$(DOS33_RAW) second_d1.dsk 32 0 ./part14_dotbounce/DOTS 0 0
$(DOS33_RAW) second_d1.dsk 33 0 ./part15_transmission/SPHERES 0 0
# $(DOS33_RAW) second_d1.dsk 13 0 ./part16_ocean/OCEAN 0 0
$(DOS33_RAW) second_d1.dsk 34 0 ./part17_polar/POLAR 0 0
####
part14_dotbounce/DOTS:
cd part14_dotbounce && make
part15_transmission/SPHERES:
cd part15_transmission && make
@ -244,6 +250,7 @@ generate_common.o: generate_common.c
clean:
rm -f *~ *.o *.lst HELLO SECOND QBOOT QLOAD MUSIC START
cd part14_dotbounce && make clean
cd part15_transmission && make clean
cd part17_polar && make clean
cd part18_3d && make clean

View File

@ -12,7 +12,7 @@ leaves: 5k 25%
lens/rotozoom: 4k 50%
plasma: 4k? 25%
plasmacube: 4k? 10%
dotbounce: 4k? 0%
dotbounce: 4k 32 16 $3000-$3FFF
transmission: 4k? 0% 33 16 $2000-$2FFF
ocean: 24k XX 96 ???
polar: 4k 34 16 $1000-$1FFF

View File

@ -1,5 +1,23 @@
DISK I
+ Dot Bounce
- actually do something interesting
+ Transmission / Spheres
- the audio (put in language card of AUX?)
- the actual transmission
+ ocean / voxels
- probably too big, reduce the size
+ polar
- proper "bounce" as it scrolls in

View File

@ -0,0 +1,10 @@
gr_offsets_l:
.byte <$400,<$480,<$500,<$580,<$600,<$680,<$700,<$780
.byte <$428,<$4a8,<$528,<$5a8,<$628,<$6a8,<$728,<$7a8
.byte <$450,<$4d0,<$550,<$5d0,<$650,<$6d0,<$750,<$7d0
gr_offsets_h:
.byte >$400,>$480,>$500,>$580,>$600,>$680,>$700,>$780
.byte >$428,>$4a8,>$528,>$5a8,>$628,>$6a8,>$728,>$7a8
.byte >$450,>$4d0,>$550,>$5d0,>$650,>$6d0,>$750,>$7d0

View File

@ -0,0 +1,27 @@
include ../../../Makefile.inc
DOS33 = ../../../utils/dos33fs-utils/dos33
DOS33_RAW = ../../../utils/dos33fs-utils/dos33_raw
EMPTY_DISK = ../../../empty_disk/empty.dsk
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
LINKER_SCRIPTS = ../../../linker_scripts/
all: DOTS
####
DOTS: dots.o
ld65 -o DOTS dots.o -C $(LINKER_SCRIPTS)/apple2_8000.inc
dots.o: dots.s \
../zp.inc ../hardware.inc ../qload.inc
ca65 -o dots.o dots.s -l dots.lst
###
clean:
rm -f *~ *.o *.lst DOTS
cd graphics && make clean

View File

@ -0,0 +1,67 @@
; Dancing dots
; this one is a tough one
;
; by deater (Vince Weaver) <vince@deater.net>
.include "../zp.inc"
.include "../hardware.inc"
.include "../qload.inc"
spheres_start:
;=====================
; initializations
;=====================
;===================
; Load graphics
;===================
load_loop:
bit SET_GR
bit LORES
bit FULLGR
bit PAGE1
ldx #12
horizon_loop:
lda gr_offsets_l,X
sta OUTL
lda gr_offsets_h,X
sta OUTH
ldy #39
lda #$55
horizon_inner:
sta (OUTL),Y
dey
bpl horizon_inner
inx
cpx #24
bne horizon_loop
jsr wait_until_keypress
dots_done:
rts
.include "../gr_pageflip.s"
; .include "../gr_fast_clear.s"
.include "../gr_copy.s"
.include "../gr_offsets_split.s"
.include "../gr_offsets.s"
.include "../wait_keypress.s"
; .include "../zx02_optim.s"
; .include "../hgr_table.s"
; .include "../hgr_clear_screen.s"
; .include "../hgr_copy_fast.s"

View File

@ -1,6 +1,4 @@
; Polar Bear
; do the animated bounce if possible
; Transmission
;
; by deater (Vince Weaver) <vince@deater.net>
@ -14,7 +12,7 @@ div7_table = $1d00
hposn_low = $1e00
hposn_high = $1f00
polar_start:
spheres_start:
;=====================
; initializations
;=====================
@ -37,9 +35,9 @@ load_loop:
; load image offscreen $6000
lda #<polar_data
lda #<spheres_data
sta zx_src_l+1
lda #>polar_data
lda #>spheres_data
sta zx_src_h+1
lda #$60
jsr zx02_full_decomp
@ -49,7 +47,9 @@ load_loop:
sta COUNT
sta DRAW_PAGE
ship_sprite_loop:
; copy to main
lda #$60
jsr hgr_copy
@ -58,28 +58,16 @@ ship_sprite_loop:
jsr wait_until_keypress
polar_done:
spheres_done:
rts
.align $100
.include "../wait_keypress.s"
.include "../zx02_optim.s"
; .include "../hgr_table.s"
.include "../hgr_clear_screen.s"
.include "../hgr_copy_fast.s"
; wait A * 1/50s
wait_irq:
; lda #50
sta IRQ_COUNTDOWN
wait_irq_loop:
lda IRQ_COUNTDOWN
bne wait_irq_loop
rts
polar_data:
.incbin "graphics/polar2.hgr.zx02"
spheres_data:
.incbin "graphics/spheres.hgr.zx02"

View File

@ -69,8 +69,12 @@ ocean_loop:
sta COUNT
no_count_oflo:
jmp ocean_loop
lda KEYPRESS
bmi done_ocean
jmp ocean_loop
done_ocean:
rts
.include "../wait_keypress.s"
.include "../zx02_optim.s"

View File

@ -164,23 +164,33 @@ error_string:
which_disk_array:
.byte 1,1,1,1 ; MUSIC, INTRO, TUNNEL, OCEAN
.byte 1 ; POLAR
.byte 1,1,1 ; POLAR, SPHERES
load_address_array:
.byte $D0,$60,$60,$60 ; MUSIC, INTRO, TUNNEL, OCEAN
.byte $60 ; POLAR
.byte $60,$60,$60 ; POLAR, SPHERES, DOTS
start_address:
.byte $D0,$60,$60,$60 ; MUSIC, INTRO, TUNNEL, OCEAN
.byte $80,$80,$80 ; POLAR, SPHERES, DOTS
aux_dest: ;
.byte $D0,$FF,$60,$60 ; MUSIC, INTRO, TUNNEL, OCEAN
.byte $10,$20,$30 ; POLAR, SPHERES, DOTS
track_array:
.byte 3, 8, 11, 20 ; MUSIC, INTRO, TUNNEL, OCEAN
.byte 34 ; POLAR
.byte 34,33,32 ; POLAR, SPHERES, DOTS
sector_array:
.byte 0, 0, 0, 0 ; MUSIC, INTRO, TUNNEL, OCEAN
.byte 0 ; POLAR
.byte 0, 0, 0 ; POLAR, SPHERES, DOTS
length_array:
.byte 32, 84, 16, 96 ; MUSIC, INTRO, TUNNEL, OCEAN
.byte 16 ; POLAR
.byte 32, 84, 16, 16 ; MUSIC, INTRO, TUNNEL, OCEAN
.byte 16, 16, 16 ; POLAR, SPHERES, DOTS
.include "wait.s"

View File

@ -74,25 +74,50 @@ dont_enable_mc:
skip_all_checks:
;===================
; Load graphics
;===================
load_loop:
; jsr HGR
; bit SET_GR
; bit HIRES
; bit FULLGR
bit PAGE1
;=======================
; Load, copy to AUXMEM
;=======================
;============================
; Load programs into AUXMEM
;============================
sta $C008 ; use MAIN zero-page/stack/language card
;=============================
; want to load 2..MAX
; 0 = MUSIC, 1 = INTRO
lda #2
sta COUNT
load_program_loop:
;============================
; load next program to MAIN $6000
; load from disk
lda COUNT ; which one
sta WHICH_LOAD
jsr load_file
; copy to proper AUX location
ldx COUNT
lda aux_dest,X ; load AUX dest
pha
ldy #$60 ; MAIN src $6000
lda length_array,X ; number of pages
tax ; in X
pla ; restore AUX dest to A
jsr copy_main_aux
inc COUNT
lda COUNT
cmp #7
bne load_program_loop
.if 0
;====================
; load POLAR to $6000
@ -110,6 +135,49 @@ load_loop:
jsr copy_main_aux
;====================
; load SPHERES to $6000
lda #5 ; SPHERES
sta WHICH_LOAD
jsr load_file
;======================
; copy SPHERES to AUX $2000
lda #$20 ; AUX dest $1000
ldy #$60 ; MAIN src $6000
ldx #16 ; 16 pages
jsr copy_main_aux
.endif
; cli ; start music
;=======================
; run DOTS
;============================================
; copy DOTS from AUX $3000 to MAIN $8000
lda #$30 ; AUX src $1000
ldy #$80 ; MAIN dest $8000
ldx #16 ; 16 pages
jsr copy_aux_main
jsr $8000
;=======================
; run SPHERES
;============================================
; copy SPHERES from AUX $2000 to MAIN $8000
lda #$20 ; AUX src $1000
ldy #$80 ; MAIN dest $8000
ldx #16 ; 16 pages
jsr copy_aux_main
jsr $8000
;=======================
; run POLAR
;============================================
@ -120,17 +188,11 @@ load_loop:
ldx #16 ; 16 pages
jsr copy_aux_main
; setup music
; ocean=pattern24 (3:07) pattern#43
lda #43
sta current_pattern_smc+1
jsr pt3_set_pattern
cli
; setup music ocean=pattern24 (3:07) pattern#43
; lda #43
; sta current_pattern_smc+1
; jsr pt3_set_pattern
; run polar
jsr $8000
;=============================