riven: hook up more tunnel

This commit is contained in:
Vince Weaver
2024-08-03 18:29:47 -04:00
parent eec04fdc92
commit e22d1cfd42
14 changed files with 227 additions and 27 deletions

View File

@@ -113,6 +113,7 @@ riven_disk04.dsk: QBOOT QLOAD TITLE_04 \
disk04_files/DISK04 \
disk04_files/LEVEL_BRIDGE1 \
disk04_files/LEVEL_BRIDGE2 \
disk04_files/LEVEL_TUNNEL1 \
disk04_files/LEVEL_TUNNEL3
cp $(EMPTY_DISK)/empty.dsk riven_disk04.dsk
$(DOS33_RAW) riven_disk04.dsk 0 0 QBOOT 0 1
@@ -123,8 +124,8 @@ riven_disk04.dsk: QBOOT QLOAD TITLE_04 \
$(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
$(DOS33_RAW) riven_disk04.dsk 12 0 disk04_files/LEVEL_TUNNEL1 0 0
$(DOS33_RAW) riven_disk04.dsk 17 0 disk04_files/LEVEL_TUNNEL3 0 0
###
@@ -555,6 +556,9 @@ disk04_files/LEVEL_BRIDGE1:
disk04_files/LEVEL_BRIDGE2:
cd disk04_files && make
disk04_files/LEVEL_TUNNEL1:
cd disk04_files && make
disk04_files/LEVEL_TUNNEL3:
cd disk04_files && make
@@ -750,6 +754,7 @@ riven_hgr.2mg: dts_block PROBOOTHD QLOAD_HD \
disk04_files/DISK04 \
disk04_files/LEVEL_BRIDGE1 \
disk04_files/LEVEL_BRIDGE2 \
disk04_files/LEVEL_TUNNEL1 \
disk04_files/LEVEL_TUNNEL3 \
disk05_files/DISK05 \
disk05_files/LEVEL_CHAIR \
@@ -816,7 +821,8 @@ riven_hgr.2mg: dts_block PROBOOTHD QLOAD_HD \
$(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 4 12 0` disk04_files/LEVEL_TUNNEL1 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 4 17 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
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 38 0 2` disk38_files/DISK38 0 0

View File

@@ -108,10 +108,8 @@ T 0.5 = TITLE 1805 bytes 8S = 0T8S (2048) 400B free
T 1 = QLOAD 2314 bytes 16S= 1T0S (4096) 2k 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
T 12 = TUNNEL1 12632 bytes = 5T0S (20480) 8k free
T 17 = TUNNEL3 17217 bytes = 5T0S (20480) 3k free
Disk05 Map (disk has 35 tracks, each 4k in size)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -3,7 +3,7 @@ include ../../../Makefile.inc
LINKER_SCRIPTS = ../../../linker_scripts/
all: DISK04 LEVEL_BRIDGE1 LEVEL_BRIDGE2 LEVEL_TUNNEL3
all: DISK04 LEVEL_BRIDGE1 LEVEL_BRIDGE2 LEVEL_TUNNEL1 LEVEL_TUNNEL3
####
@@ -40,6 +40,18 @@ level_bridge2.o: level_bridge2.s \
####
LEVEL_TUNNEL1: level_tunnel1.o
ld65 -o LEVEL_TUNNEL1 level_tunnel1.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
level_tunnel1.o: level_tunnel1.s \
../zp.inc ../hardware.inc ../qload.inc \
../common_defines.inc disk04_defines.inc \
leveldata_tunnel1.inc \
graphics_tunnel1/tunnel1_graphics.inc
ca65 -o level_tunnel1.o level_tunnel1.s -l level_tunnel1.lst
####
LEVEL_TUNNEL3: level_tunnel3.o
ld65 -o LEVEL_TUNNEL3 level_tunnel3.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
@@ -58,6 +70,9 @@ graphics_bridge1/bridge1_graphics.inc:
graphics_bridge2/bridge2_graphics.inc:
cd graphics_bridge2 && make
graphics_tunnel1/tunnel1_graphics.inc:
cd graphics_tunnel1 && make
graphics_tunnel3/tunnel3_graphics.inc:
cd graphics_tunnel3 && make
@@ -66,16 +81,17 @@ graphics_tunnel3/tunnel3_graphics.inc:
clean:
rm -f *~ *.o *.lst DISK04 \
LEVEL_BRIDGE1 LEVEL_BRIDGE2 \
LEVEL_TUNNEL3
LEVEL_TUNNEL1 LEVEL_TUNNEL3
####
distclean:
rm -f *~ *.o *.lst DISK04 \
LEVEL_BRIDGE1 LEVEL_BRIDGE2 \
LEVEL_TUNNEL3
LEVEN_TUNNEL1 LEVEL_TUNNEL3
cd graphics_bridge1 && make clean
cd graphics_bridge2 && make clean
cd graphics_tunnel1 && make clean
cd graphics_tunnel3 && make clean

View File

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

View File

@@ -1,10 +1,8 @@
LOAD_TITLE_04 = 0
LOAD_BRIDGE1 = 1
LOAD_BRIDGE2 = 2
LOAD_BRIDGE3 = 3
LOAD_TUNNEL1 = 4
LOAD_TUNNEL2 = 5
LOAD_TUNNEL3 = 6
LOAD_TUNNEL1 = 3
LOAD_TUNNEL3 = 4
;================================
; Level definitions
@@ -15,10 +13,10 @@ RIVEN_BRIDGE1 = 0
; BRIDGE2
RIVEN_BRIDGE2 = 0
; TUNNEL1
RIVEN_TUNNEL1 = 0
RIVEN_TUNNEL2 = 1
; TUNNEL3
RIVEN_TUNNEL3 = 0
RIVEN_TUNNEL3_OPEN = 1

View File

@@ -0,0 +1,28 @@
include ../../../../Makefile.inc
ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f
PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr
all: tunnel1_graphics.inc
tunnel1_graphics.inc: \
tunnel1_w.hgr.zx02 tunnel1_e.hgr.zx02 \
tunnel2_w.hgr.zx02 tunnel2_e.hgr.zx02
echo "tunnel1_w_zx02: .incbin \"tunnel1_w.hgr.zx02\"" > tunnel1_graphics.inc
echo "tunnel1_e_zx02: .incbin \"tunnel1_e.hgr.zx02\"" >> tunnel1_graphics.inc
echo "tunnel2_w_zx02: .incbin \"tunnel2_w.hgr.zx02\"" >> tunnel1_graphics.inc
echo "tunnel2_e_zx02: .incbin \"tunnel2_e.hgr.zx02\"" >> tunnel1_graphics.inc
####
%.hgr: %.png
$(PNG_TO_HGR) $< > $@
%.hgr.zx02: %.hgr
$(ZX02) -f $< $@
####
clean:
rm -f *~ *.o *.lst *.zx02 *.hgr tunnel1_graphics.inc

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,113 @@
; Riven -- First part of tunnel
; 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"
tunnel1_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_tunnel1/tunnel1_graphics.inc"
.include "leveldata_tunnel1.inc"

View File

@@ -10,7 +10,7 @@ locations:
location0:
.byte $ff ; north exit
.byte $ff ; south exit
.byte LOAD_TUNNEL3<<4|RIVEN_TUNNEL3 ; east exit
.byte LOAD_TUNNEL1<<4|RIVEN_TUNNEL1 ; east exit
.byte LOAD_BRIDGE1<<4|RIVEN_BRIDGE1 ; west exit
.byte $FF ; north exit_dir
.byte $FF ; south exit_dir

View File

@@ -0,0 +1,41 @@
;===============================================
; level data for Tunnel1
;===============================================
locations:
.word location0,location1
; RIVEN_TUNNEL1 -- just across bridge
location0:
.byte $ff ; north exit
.byte $ff ; south exit
.byte RIVEN_TUNNEL2 ; east exit
.byte LOAD_BRIDGE2<<4|RIVEN_BRIDGE2 ; 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 tunnel1_e_zx02 ; east bg
.word tunnel1_w_zx02 ; west bg
.byte BG_EAST|BG_WEST
.byte $ff ; special exit
; RIVEN_TUNNEL2 -- next tunnel segment
location1:
.byte $ff ; north exit
.byte $ff ; south exit
.byte LOAD_TUNNEL3<<4|RIVEN_TUNNEL3 ; east exit
.byte RIVEN_TUNNEL1 ; 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 tunnel2_e_zx02 ; east bg
.word tunnel2_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 LOAD_BRIDGE2<<4|RIVEN_BRIDGE2 ; west exit
.byte LOAD_TUNNEL1<<4|RIVEN_TUNNEL2 ; west exit
.byte DIRECTION_N ; north exit_dir
.byte $FF ; south exit_dir
.byte DIRECTION_E ; east exit_dir