riven: hook up some more graphics

This commit is contained in:
Vince Weaver 2024-08-03 15:12:45 -04:00
parent 18688980d2
commit 80a84fdd85
18 changed files with 400 additions and 16 deletions

View File

@ -108,6 +108,8 @@ riven_disk03.dsk: QBOOT QLOAD TITLE_03 \
riven_disk04.dsk: QBOOT QLOAD TITLE_04 \
disk04_files/DISK04 \
disk04_files/LEVEL_BRIDGE1 \
disk04_files/LEVEL_BRIDGE2 \
disk04_files/LEVEL_TUNNEL3
cp $(EMPTY_DISK)/empty.dsk riven_disk04.dsk
$(DOS33_RAW) riven_disk04.dsk 0 0 QBOOT 0 1
@ -116,8 +118,11 @@ riven_disk04.dsk: QBOOT QLOAD TITLE_04 \
$(DOS33_RAW) riven_disk04.dsk 0 1 disk04_files/DISK04 0 0
$(DOS33_RAW) riven_disk04.dsk 0 8 TITLE_04 0 0
$(DOS33_RAW) riven_disk04.dsk 1 0 QLOAD 0 0
$(DOS33_RAW) riven_disk04.dsk 2 0 disk04_files/LEVEL_BRIDGE1 0 0
$(DOS33_RAW) riven_disk04.dsk 7 0 disk04_files/LEVEL_BRIDGE2 0 0
$(DOS33_RAW) riven_disk04.dsk 27 0 disk04_files/LEVEL_TUNNEL3 0 0
###
riven_disk05.dsk: QBOOT QLOAD TITLE_05 \
@ -538,6 +543,12 @@ disk03_files/LEVEL_DOORWAY:
####
disk04_files/LEVEL_BRIDGE1:
cd disk04_files && make
disk04_files/LEVEL_BRIDGE2:
cd disk04_files && make
disk04_files/LEVEL_TUNNEL3:
cd disk04_files && make
@ -730,6 +741,8 @@ riven_hgr.2mg: dts_block PROBOOTHD QLOAD_HD \
disk03_files/LEVEL_CAVE \
disk03_files/LEVEL_DOORWAY \
disk04_files/DISK04 \
disk04_files/LEVEL_BRIDGE1 \
disk04_files/LEVEL_BRIDGE2 \
disk04_files/LEVEL_TUNNEL3 \
disk05_files/DISK05 \
disk05_files/LEVEL_CHAIR \
@ -793,6 +806,8 @@ riven_hgr.2mg: dts_block PROBOOTHD QLOAD_HD \
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 3 21 0` disk03_files/LEVEL_CAVE 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 3 27 0` disk03_files/LEVEL_DOORWAY 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 4 0 2` disk04_files/DISK04 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 4 2 0` disk04_files/LEVEL_BRIDGE1 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 4 7 0` disk04_files/LEVEL_BRIDGE2 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 4 27 0` disk04_files/LEVEL_TUNNEL3 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 5 0 2` disk05_files/DISK05 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 5 2 0` disk05_files/LEVEL_CHAIR 0 0

View File

@ -105,9 +105,9 @@ Disk04 Map (disk has 35 tracks, each 4k in size)
T 0 = Qboot
T 0.5 = TITLE 1805 bytes 8S = 0T8S (2048) 400B free
T 1 = QLOAD 2314 bytes 16S= 1T0S (4096) 2k free
T 2 = BRIDGE2 ???? bytes = 5T0S (20480) 15k free
T 7 = BRIDGE3 ???? bytes = 5T0S (20480) ?? free
T 12 = BRIDGE4 ???? bytes = 5T0S (20480) ?? free
T 2 = BRIDGE1 9027 bytes = 5T0S (20480) 11k free
T 7 = BRIDGE2 8982 bytes = 5T0S (20480) 11k free
T 12 = BRIDGE3 ???? bytes = 5T0S (20480) ?? free
T 17 = TUNNEL1 ???? bytes = 5T0S (20480) ?? free
T 22 = TUNNEL2 ???? bytes = 5T0S (20480) ?? free
T 27 = TUNNEL3 17217 bytes = 5T0S (20480) 3k free

View File

@ -56,12 +56,12 @@ disk_exit_dni_l:
disk_exit_load:
.byte LOAD_PATH
.byte LOAD_DSTEPS1
.byte LOAD_TUNNEL3
.byte LOAD_BRIDGE1
.byte LOAD_CYAN
disk_exit_level:
.byte RIVEN_STEPS_BASE
.byte RIVEN_DOWN1
.byte RIVEN_TUNNEL3
.byte RIVEN_BRIDGE1
.byte 0
disk_exit_direction:
.byte DIRECTION_W

View File

@ -3,7 +3,7 @@ include ../../../Makefile.inc
LINKER_SCRIPTS = ../../../linker_scripts/
all: DISK04 LEVEL_TUNNEL3
all: DISK04 LEVEL_BRIDGE1 LEVEL_BRIDGE2 LEVEL_TUNNEL3
####
@ -15,6 +15,31 @@ disk04.o: disk04.s ../zp.inc
####
LEVEL_BRIDGE1: level_bridge1.o
ld65 -o LEVEL_BRIDGE1 level_bridge1.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
level_bridge1.o: level_bridge1.s \
../zp.inc ../hardware.inc ../qload.inc \
../common_defines.inc disk04_defines.inc \
leveldata_bridge1.inc \
graphics_bridge1/bridge1_graphics.inc
ca65 -o level_bridge1.o level_bridge1.s -l level_bridge1.lst
####
LEVEL_BRIDGE2: level_bridge2.o
ld65 -o LEVEL_BRIDGE2 level_bridge2.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
level_bridge2.o: level_bridge2.s \
../zp.inc ../hardware.inc ../qload.inc \
../common_defines.inc disk04_defines.inc \
leveldata_bridge2.inc \
graphics_bridge2/bridge2_graphics.inc
ca65 -o level_bridge2.o level_bridge2.s -l level_bridge2.lst
####
LEVEL_TUNNEL3: level_tunnel3.o
ld65 -o LEVEL_TUNNEL3 level_tunnel3.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
@ -27,6 +52,12 @@ level_tunnel3.o: level_tunnel3.s \
####
graphics_bridge1/bridge1_graphics.inc:
cd graphics_bridge1 && make
graphics_bridge2/bridge2_graphics.inc:
cd graphics_bridge2 && make
graphics_tunnel3/tunnel3_graphics.inc:
cd graphics_tunnel3 && make
@ -34,13 +65,17 @@ graphics_tunnel3/tunnel3_graphics.inc:
clean:
rm -f *~ *.o *.lst DISK04 \
LEVEL_BRIDGE1 LEVEL_BRIDGE2 \
LEVEL_TUNNEL3
####
distclean:
rm -f *~ *.o *.lst DISK04 \
LEVEL_BRIDGE1 LEVEL_BRIDGE2 \
LEVEL_TUNNEL3
cd graphics_bridge1 && make clean
cd graphics_bridge2 && make clean
cd graphics_tunnel3 && make clean

View File

@ -11,19 +11,19 @@ which_disk_bin:
.byte 4
load_address_array:
.byte $40,$40,$40,$40 ; TITLE, BRIDGE2, BRIDGE3, BRIDGE4
.byte $40,$40,$40,$40 ; TITLE, BRIDGE1, BRIDGE2, BRIDGE3
.byte $40,$40,$40,$00 ; TUNNEL1, TUNNEL2, TUNNEL3
track_array:
.byte 0, 2, 7,12 ; TITLE, BRIDGE2, BRIDGE3, BRIDGE4
.byte 0, 2, 7,12 ; TITLE, BRIDGE1, BRIDGE2, BRIDGE3
.byte 17,22,27,0 ; TUNNEL1, TUNNEL1, TUNNEL3
sector_array:
.byte 8, 0, 0, 0 ; TITLE, BRIDGE2, BRIDGE3, BRIDGE4
.byte 8, 0, 0, 0 ; TITLE, BRIDGE1, BRIDGE2, BRIDGE3
.byte 0,0,0,0 ; TUNNEL1, TUNNEL1, TUNNEL3
length_array:
.byte 8, 80,80,80 ; TITLE, BRIDGE2, BRIDGE3, BRIDGE4
.byte 8, 80,80,80 ; TITLE, BRIDGE1, BRIDGE2, BRIDGE3
.byte 80,80,80,0 ; TUNNEL1, TUNNEL1, TUNNEL3

View File

@ -1,7 +1,7 @@
LOAD_TITLE_04 = 0
LOAD_BRIDGE2 = 1
LOAD_BRIDGE3 = 2
LOAD_BRIDGE4 = 3
LOAD_BRIDGE1 = 1
LOAD_BRIDGE2 = 2
LOAD_BRIDGE3 = 3
LOAD_TUNNEL1 = 4
LOAD_TUNNEL2 = 5
LOAD_TUNNEL3 = 6
@ -9,6 +9,14 @@ LOAD_TUNNEL3 = 6
;================================
; Level definitions
; BRIDGE1
RIVEN_BRIDGE1 = 0
; BRIDGE2
RIVEN_BRIDGE2 = 0
; TUNNEL3
RIVEN_TUNNEL3 = 0

View File

@ -0,0 +1,25 @@
include ../../../../Makefile.inc
ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f
PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr
all: bridge1_graphics.inc
bridge1_graphics.inc: \
bridge1_w.hgr.zx02 bridge1_e.hgr.zx02
echo "bridge1_w_zx02: .incbin \"bridge1_w.hgr.zx02\"" > bridge1_graphics.inc
echo "bridge1_e_zx02: .incbin \"bridge1_e.hgr.zx02\"" >> bridge1_graphics.inc
####
%.hgr: %.png
$(PNG_TO_HGR) $< > $@
%.hgr.zx02: %.hgr
$(ZX02) -f $< $@
####
clean:
rm -f *~ *.o *.lst *.zx02 *.hgr bridge1_graphics.inc

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -0,0 +1,25 @@
include ../../../../Makefile.inc
ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f
PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr
all: bridge2_graphics.inc
bridge2_graphics.inc: \
bridge2_w.hgr.zx02 bridge2_e.hgr.zx02
echo "bridge2_w_zx02: .incbin \"bridge2_w.hgr.zx02\"" > bridge2_graphics.inc
echo "bridge2_e_zx02: .incbin \"bridge2_e.hgr.zx02\"" >> bridge2_graphics.inc
####
%.hgr: %.png
$(PNG_TO_HGR) $< > $@
%.hgr.zx02: %.hgr
$(ZX02) -f $< $@
####
clean:
rm -f *~ *.o *.lst *.zx02 *.hgr bridge2_graphics.inc

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -0,0 +1,113 @@
; Riven -- Bridge1
; by deater (Vince Weaver) <vince@deater.net>
; Zero Page
.include "../zp.inc"
.include "../hardware.inc"
.include "../common_defines.inc"
.include "../qload.inc"
.include "disk04_defines.inc"
bridge1_start:
;===================
; init screen
;===================
; jsr TEXT
; jsr HOME
bit KEYRESET
bit SET_GR
bit PAGE1
bit HIRES
bit FULLGR
;========================
; set up location
;========================
lda #<locations
sta LOCATIONS_L
lda #>locations
sta LOCATIONS_H
lda #0
sta DRAW_PAGE
sta LEVEL_OVER
lda #0
sta JOYSTICK_ENABLED
sta UPDATE_POINTER
lda #1
sta CURSOR_VISIBLE
lda #20
sta CURSOR_X
sta CURSOR_Y
;===================================
; init
;===================================
; done in title
; lda #$20
; sta HGR_PAGE
; jsr hgr_make_tables
jsr change_location
jsr save_bg_14x14 ; save old bg
game_loop:
;===================================
; draw pointer
;===================================
jsr draw_pointer
;===================================
; handle keypress/joystick
;===================================
jsr handle_keypress
;===================================
; increment frame count
;===================================
inc FRAMEL
bne frame_no_oflo
inc FRAMEH
frame_no_oflo:
;====================================
; check level over
;====================================
lda LEVEL_OVER
bne really_exit
jmp game_loop
really_exit:
rts
;==========================
; includes
;==========================
.include "graphics_bridge1/bridge1_graphics.inc"
.include "leveldata_bridge1.inc"

View File

@ -0,0 +1,113 @@
; Riven -- Bridge2
; by deater (Vince Weaver) <vince@deater.net>
; Zero Page
.include "../zp.inc"
.include "../hardware.inc"
.include "../common_defines.inc"
.include "../qload.inc"
.include "disk04_defines.inc"
bridge2_start:
;===================
; init screen
;===================
; jsr TEXT
; jsr HOME
bit KEYRESET
bit SET_GR
bit PAGE1
bit HIRES
bit FULLGR
;========================
; set up location
;========================
lda #<locations
sta LOCATIONS_L
lda #>locations
sta LOCATIONS_H
lda #0
sta DRAW_PAGE
sta LEVEL_OVER
lda #0
sta JOYSTICK_ENABLED
sta UPDATE_POINTER
lda #1
sta CURSOR_VISIBLE
lda #20
sta CURSOR_X
sta CURSOR_Y
;===================================
; init
;===================================
; done in title
; lda #$20
; sta HGR_PAGE
; jsr hgr_make_tables
jsr change_location
jsr save_bg_14x14 ; save old bg
game_loop:
;===================================
; draw pointer
;===================================
jsr draw_pointer
;===================================
; handle keypress/joystick
;===================================
jsr handle_keypress
;===================================
; increment frame count
;===================================
inc FRAMEL
bne frame_no_oflo
inc FRAMEH
frame_no_oflo:
;====================================
; check level over
;====================================
lda LEVEL_OVER
bne really_exit
jmp game_loop
really_exit:
rts
;==========================
; includes
;==========================
.include "graphics_bridge2/bridge2_graphics.inc"
.include "leveldata_bridge2.inc"

View File

@ -0,0 +1,25 @@
;===============================================
; level data for Start level
;===============================================
locations:
.word location0
; RIVEN_BRIDGE1 -- part way across the bridge
location0:
.byte $ff ; north exit
.byte $ff ; south exit
.byte LOAD_BRIDGE2<<4|RIVEN_BRIDGE2 ; east exit
.byte $E0 ; west exit
.byte $FF ; north exit_dir
.byte $FF ; south exit_dir
.byte DIRECTION_E ; east exit_dir
.byte DIRECTION_W ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word bridge1_e_zx02 ; east bg
.word bridge1_w_zx02 ; west bg
.byte BG_EAST|BG_WEST
.byte $ff ; special exit

View File

@ -0,0 +1,25 @@
;===============================================
; level data for Start level
;===============================================
locations:
.word location0
; RIVEN_BRIDGE1 -- part way across the bridge
location0:
.byte $ff ; north exit
.byte $ff ; south exit
.byte LOAD_TUNNEL3<<4|RIVEN_TUNNEL3 ; east exit
.byte LOAD_BRIDGE1<<4|RIVEN_BRIDGE1 ; west exit
.byte $FF ; north exit_dir
.byte $FF ; south exit_dir
.byte DIRECTION_E ; east exit_dir
.byte DIRECTION_W ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word bridge2_e_zx02 ; east bg
.word bridge2_w_zx02 ; west bg
.byte BG_EAST|BG_WEST
.byte $ff ; special exit

View File

@ -10,7 +10,7 @@ location0:
.byte RIVEN_TUNNEL3_OPEN ; north exit
.byte $ff ; south exit
.byte $E1 ; east exit
.byte $E0 ; west exit
.byte LOAD_BRIDGE2<<4|RIVEN_BRIDGE2 ; west exit
.byte DIRECTION_N ; north exit_dir
.byte $FF ; south exit_dir
.byte DIRECTION_E ; east exit_dir

View File

@ -447,10 +447,10 @@ game_continue:
.endif
.if DISK=04
lda #LOAD_TUNNEL3
lda #LOAD_BRIDGE1
sta WHICH_LOAD
lda #RIVEN_TUNNEL3
lda #RIVEN_BRIDGE1
sta LOCATION
lda #DIRECTION_E