riven: add some more steps

This commit is contained in:
Vince Weaver 2024-07-26 23:03:32 -04:00
parent 5def0952d4
commit d61a9e0ff8
18 changed files with 261 additions and 33 deletions

View File

@ -68,6 +68,7 @@ riven_disk01.dsk: QBOOT QLOAD TITLE_01 \
riven_disk02.dsk: QBOOT QLOAD TITLE_02 \
disk02_files/DISK02 \
disk02_files/LEVEL_STEPS1 \
disk02_files/LEVEL_STEPS3 \
disk02_files/LEVEL_TOP
cp $(EMPTY_DISK)/empty.dsk riven_disk02.dsk
$(DOS33_RAW) riven_disk02.dsk 0 0 QBOOT 0 1
@ -77,7 +78,8 @@ riven_disk02.dsk: QBOOT QLOAD TITLE_02 \
$(DOS33_RAW) riven_disk02.dsk 0 8 TITLE_02 0 0
$(DOS33_RAW) riven_disk02.dsk 1 0 QLOAD 0 0
$(DOS33_RAW) riven_disk02.dsk 2 0 disk02_files/LEVEL_STEPS1 0 0
$(DOS33_RAW) riven_disk02.dsk 22 0 disk02_files/LEVEL_TOP 0 0
$(DOS33_RAW) riven_disk02.dsk 8 0 disk02_files/LEVEL_STEPS3 0 0
$(DOS33_RAW) riven_disk02.dsk 14 0 disk02_files/LEVEL_TOP 0 0
###
@ -502,6 +504,9 @@ disk01_files/LEVEL_PATH:
disk02_files/LEVEL_STEPS1:
cd disk02_files && make
disk02_files/LEVEL_STEPS3:
cd disk02_files && make
disk02_files/LEVEL_TOP:
cd disk02_files && make
@ -695,6 +700,7 @@ riven_hgr.2mg: dts_block PROBOOTHD QLOAD_HD \
disk01_files/LEVEL_PATH \
disk02_files/DISK02 \
disk02_files/LEVEL_STEPS1 \
disk02_files/LEVEL_STEPS3 \
disk02_files/LEVEL_TOP \
disk03_files/DISK03 \
disk03_files/LEVEL_DOWNSTEPS \
@ -753,7 +759,8 @@ riven_hgr.2mg: dts_block PROBOOTHD QLOAD_HD \
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 1 27 0` disk01_files/LEVEL_PATH 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 2 0 2` disk02_files/DISK02 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 2 2 0` disk02_files/LEVEL_STEPS1 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 2 22 0` disk02_files/LEVEL_TOP 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 2 8 0` disk02_files/LEVEL_STEPS3 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 2 14 0` disk02_files/LEVEL_TOP 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 3 0 2` disk03_files/DISK03 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 3 2 0` disk03_files/LEVEL_DOWNSTEPS 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 3 16 0` disk03_files/LEVEL_OUTSIDE 0 0

View File

@ -85,10 +85,9 @@ Disk02 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 = STEPS1 9172 bytes = 6T0S (24576) 15k free
T 9 = STEPS3 ???? bytes = 6T0S (24576) ?? free
T 16 = STEPS5 ???? bytes = 6T0S (24576) ?? free
T 22 = TOP 15658 bytes = 5T0S (20480) 5k free
T 2 = STEPS1 17611 bytes = 6T0S (24576) 7k free
T 8 = STEPS3 ???? bytes = 6T0S (24576) ?? free
T 14 = TOP 15658 bytes = 6T0S (24576) 9k free
Disk03 Map (disk has 35 tracks, each 4k in size)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -1,17 +1,14 @@
disk01:
east (NEW)
east again (NEW) (can look down)
base of steps (note both e and n go here)
look down
disk02: (steps)
one (nse)
two (nse)
one E
two E
three (nse)
four (ns only)
three E
four E
five (top, nsew)
five
bridge1 (nsew)

View File

@ -2,7 +2,7 @@ include ../../../Makefile.inc
LINKER_SCRIPTS = ../../../linker_scripts/
all: DISK02 LEVEL_STEPS1 LEVEL_TOP
all: DISK02 LEVEL_STEPS1 LEVEL_STEPS3 LEVEL_TOP
####
@ -26,6 +26,19 @@ level_steps1.o: level_steps1.s \
####
LEVEL_STEPS3: level_steps3.o
ld65 -o LEVEL_STEPS3 level_steps3.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
level_steps3.o: level_steps3.s \
../zp.inc ../hardware.inc ../qload.inc \
../common_defines.inc disk02_defines.inc \
leveldata_steps3.inc \
graphics_steps3/steps3_graphics.inc
ca65 -o level_steps3.o level_steps3.s -l level_steps3.lst
####
LEVEL_TOP: level_top.o
ld65 -o LEVEL_TOP level_top.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
@ -41,6 +54,9 @@ level_top.o: level_top.s \
graphics_steps1/steps1_graphics.inc:
cd graphics_steps1 && make
graphics_steps3/steps3_graphics.inc:
cd graphics_steps3 && make
graphics_top/top_graphics.inc:
cd graphics_top && make
@ -48,14 +64,15 @@ graphics_top/top_graphics.inc:
clean:
rm -f *~ *.o *.lst \
LEVEL_STEPS1 LEVEL_TOP
LEVEL_STEPS1 LEVEL_STEPS3 LEVEL_TOP
####
distclean:
rm -f *~ *.o *.lst \
LEVEL_STEPS1 LEVEL_TOP
LEVEL_STEPS1 LEVEL_STEPS3 LEVEL_TOP
cd graphics_steps1 && make clean
cd graphics_steps3 && make clean
cd graphics_top && make clean

View File

@ -11,20 +11,20 @@ which_disk_bin:
.byte 2
load_address_array:
.byte $40,$40,$40,$40 ; TITLE, STEPS1, STEPS3, STEPS5
.byte $40,$00,$00,$00 ; TOP
.byte $40,$40,$40,$40 ; TITLE, STEPS1, STEPS3, TOP
.byte $40,$40,$40,$40 ;
track_array:
.byte 0, 2, 9,16 ; TITLE, STEPS1, STEPS3, STEPS5
.byte 22,0,0,0 ; TOP
.byte 0, 2, 8,14 ; TITLE, STEPS1, STEPS3, TOP
.byte 20,0,0,0 ;
sector_array:
.byte 8, 0, 0, 0 ; TITLE, STEPS1, STEPS3, STEPS5
.byte 0,0,0,0 ; TOP
.byte 8, 0, 0, 0 ; TITLE, STEPS1, STEPS3, TOP
.byte 0,0,0,0 ;
length_array:
.byte 8, 96,84, 96 ; TITLE, STEPS1, STEPS3, STEPS5
.byte 80,0,0,0 ; TOP
.byte 8, 96,96,96 ; TITLE, STEPS1, STEPS3, TOP
.byte 80,0,0,0 ;
; disk 1

View File

@ -1,8 +1,7 @@
LOAD_TITLE_02 = 0
LOAD_STEPS1 = 1
LOAD_STEPS3 = 2
LOAD_STEPS5 = 3
LOAD_TOP = 4
LOAD_TOP = 3
;================================
; Level definitions
@ -10,6 +9,12 @@ LOAD_TOP = 4
; STEPS1
RIVEN_STEPS1 = 0
RIVEN_STEPS2 = 1
; STEPS3
RIVEN_STEPS3 = 0
RIVEN_STEPS4 = 1
; TOP

View File

@ -6,9 +6,12 @@ PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr
all: steps1_graphics.inc
steps1_graphics.inc: \
steps1_n.hgr.zx02 steps1_s.hgr.zx02
steps1_n.hgr.zx02 steps1_s.hgr.zx02 \
steps2_n.hgr.zx02 steps2_s.hgr.zx02
echo "steps1_n_zx02: .incbin \"steps1_n.hgr.zx02\"" > steps1_graphics.inc
echo "steps1_s_zx02: .incbin \"steps1_s.hgr.zx02\"" >> steps1_graphics.inc
echo "steps2_n_zx02: .incbin \"steps2_n.hgr.zx02\"" >> steps1_graphics.inc
echo "steps2_s_zx02: .incbin \"steps2_s.hgr.zx02\"" >> steps1_graphics.inc
####

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

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: steps3_graphics.inc
steps3_graphics.inc: \
steps3_n.hgr.zx02 steps3_s.hgr.zx02 \
steps4_n.hgr.zx02 steps4_s.hgr.zx02
echo "steps3_n_zx02: .incbin \"steps3_n.hgr.zx02\"" > steps3_graphics.inc
echo "steps3_s_zx02: .incbin \"steps3_s.hgr.zx02\"" >> steps3_graphics.inc
echo "steps4_n_zx02: .incbin \"steps4_n.hgr.zx02\"" >> steps3_graphics.inc
echo "steps4_s_zx02: .incbin \"steps4_s.hgr.zx02\"" >> steps3_graphics.inc
####
%.hgr: %.png
$(PNG_TO_HGR) $< > $@
%.hgr.zx02: %.hgr
$(ZX02) -f $< $@
####
clean:
rm -f *~ *.o *.lst *.zx02 *.hgr steps3_graphics.inc

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -0,0 +1,113 @@
; Riven -- Middle of Steps
; by deater (Vince Weaver) <vince@deater.net>
; Zero Page
.include "../zp.inc"
.include "../hardware.inc"
.include "../common_defines.inc"
.include "../qload.inc"
.include "disk02_defines.inc"
steps1_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_steps3/steps3_graphics.inc"
.include "leveldata_steps3.inc"

View File

@ -3,11 +3,11 @@
;===============================================
locations:
.word location0
.word location0,location1
; RIVEN_CHIPPER -- just arrived by cart
; RIVEN_STEPS1 -- first level of steps
location0:
.byte LOAD_TOP<<4|RIVEN_TOP ; north exit
.byte RIVEN_STEPS2 ; north exit
.byte $E0 ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
@ -21,3 +21,21 @@ location0:
.word $0000 ; west bg
.byte BG_NORTH|BG_SOUTH ; all bgs
.byte $ff ; special exit
; RIVEN_STEPS2 -- second level of steps
location1:
.byte LOAD_STEPS3<<4|RIVEN_STEPS3 ; north exit
.byte RIVEN_STEPS1 ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte DIRECTION_N ; north exit_dir
.byte DIRECTION_S ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word steps2_n_zx02 ; north bg
.word steps2_s_zx02 ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH|BG_SOUTH ; all bgs
.byte $ff ; special exit

View File

@ -0,0 +1,41 @@
;===============================================
; level data for Steps3
;===============================================
locations:
.word location0,location1
; RIVEN_STEPS3 -- first level of steps
location0:
.byte RIVEN_STEPS4 ; north exit
.byte LOAD_STEPS1<<4|RIVEN_STEPS2 ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte DIRECTION_N ; north exit_dir
.byte DIRECTION_S ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word steps3_n_zx02 ; north bg
.word steps3_s_zx02 ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH|BG_SOUTH ; all bgs
.byte $ff ; special exit
; RIVEN_STEPS2 -- second level of steps
location1:
.byte LOAD_TOP<<4|RIVEN_TOP ; north exit
.byte RIVEN_STEPS3 ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte DIRECTION_N ; north exit_dir
.byte DIRECTION_S ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word steps4_n_zx02 ; north bg
.word steps4_s_zx02 ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH|BG_SOUTH ; all bgs
.byte $ff ; special exit

View File

@ -8,7 +8,7 @@ locations:
; RIVEN_TOP -- top of steps
location0:
.byte $E1 ; north exit
.byte LOAD_STEPS1<<4|RIVEN_STEPS1 ; south exit
.byte LOAD_STEPS3<<4|RIVEN_STEPS4 ; south exit
.byte $E2 ; east exit
.byte $ff ; west exit
.byte DIRECTION_N ; north exit_dir