riven: hook up disk2

This commit is contained in:
Vince Weaver 2024-07-23 23:29:29 -04:00
parent 347b37b89a
commit 88bd5c3ed2
24 changed files with 562 additions and 24 deletions

View File

@ -11,7 +11,7 @@ PRODOS = ../../utils/prodos-utils/prodos
PRODOS_RAW = ../../utils/prodos-utils/prodos_raw
all: riven_disk00.dsk \
riven_disk01.dsk \
riven_disk01.dsk riven_disk02.dsk \
riven_disk38.dsk riven_disk39.dsk \
riven_disk40.dsk riven_disk41.dsk riven_disk43.dsk riven_disk44.dsk \
riven_disk50.dsk \
@ -62,6 +62,23 @@ riven_disk01.dsk: QBOOT QLOAD TITLE_01 \
$(DOS33_RAW) riven_disk01.dsk 19 0 disk01_files/LEVEL_ARRIVAL3 0 0
$(DOS33_RAW) riven_disk01.dsk 27 0 disk01_files/LEVEL_PATH 0 0
###
riven_disk02.dsk: QBOOT QLOAD TITLE_02 \
disk02_files/DISK02 \
disk02_files/LEVEL_STEPS1 \
disk02_files/LEVEL_TOP
cp $(EMPTY_DISK)/empty.dsk riven_disk02.dsk
$(DOS33_RAW) riven_disk02.dsk 0 0 QBOOT 0 1
$(DOS33_RAW) riven_disk02.dsk 0 2 QBOOT 1 1
$(DOS33_RAW) riven_disk02.dsk 0 4 QBOOT 2 1
$(DOS33_RAW) riven_disk02.dsk 0 1 disk02_files/DISK02 0 0
$(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
@ -253,6 +270,18 @@ title_01.o: title.s zp.inc hardware.inc \
####
TITLE_02: title_02.o
ld65 -o TITLE_02 title_02.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
title_02.o: title.s zp.inc hardware.inc \
qload.inc \
hgr_tables.s \
graphics_title/riven_title.hgr.zx02
ca65 -o title_02.o title.s -DDISK=02 -l title_02.lst
####
TITLE_38: title_38.o
ld65 -o TITLE_38 title_38.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
@ -333,27 +362,18 @@ title_50.o: title.s zp.inc hardware.inc \
####
disk01_files/LEVEL_ARRIVAL:
cd disk01_files && make
disk01_files/LEVEL_ARRIVAL2:
cd disk01_files && make
disk01_files/LEVEL_ARRIVAL3:
cd disk01_files && make
disk01_files/LEVEL_PATH:
cd disk01_files && make
####
disk00_files/DISK00:
cd disk00_files && make
disk01_files/DISK01:
cd disk01_files && make
disk02_files/DISK02:
cd disk02_files && make
disk38_files/DISK38:
cd disk38_files && make
@ -375,6 +395,29 @@ disk44_files/DISK44:
disk50_files/DISK50:
cd disk50_files && make
####
disk01_files/LEVEL_ARRIVAL:
cd disk01_files && make
disk01_files/LEVEL_ARRIVAL2:
cd disk01_files && make
disk01_files/LEVEL_ARRIVAL3:
cd disk01_files && make
disk01_files/LEVEL_PATH:
cd disk01_files && make
####
disk02_files/LEVEL_STEPS1:
cd disk02_files && make
disk02_files/LEVEL_TOP:
cd disk02_files && make
####
disk38_files/LEVEL_PROJECTOR:
@ -532,6 +575,9 @@ riven_hgr.2mg: dts_block PROBOOTHD QLOAD_HD \
disk01_files/LEVEL_TELESCOPE \
disk01_files/LEVEL_ARRIVAL3 \
disk01_files/LEVEL_PATH \
disk02_files/DISK02 \
disk02_files/LEVEL_STEPS1 \
disk02_files/LEVEL_TOP \
disk38_files/DISK38 \
disk38_files/LEVEL_PROJECTOR \
disk39_files/DISK39 \
@ -580,6 +626,9 @@ riven_hgr.2mg: dts_block PROBOOTHD QLOAD_HD \
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 1 13 0` disk01_files/LEVEL_TELESCOPE 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 1 19 0` disk01_files/LEVEL_ARRIVAL3 0 0
$(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 38 0 2` disk38_files/DISK38 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 38 2 0` disk38_files/LEVEL_PROJECTOR 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 39 0 2` disk39_files/DISK39 0 0

View File

@ -1,5 +1,5 @@
.include "../zp.inc"
.include "../disk38_files/disk38_defines.inc"
.include "../disk02_files/disk02_defines.inc"
.include "../disk00_files/disk00_defines.inc"
which_disk_bcd:
@ -25,40 +25,40 @@ length_array:
disk_exit_disk: ; note: not BCD anymore
.byte 38 ; zap to temple for now
.byte 2 ;
.byte 0
.byte 0
.byte 0 ; story
disk_exit_disk_bcd:
.byte $38 ; zap to temple for now
.byte $02 ;
.byte 0
.byte 0
.byte 0
disk_exit_dni_h:
.byte $01 ; 38 = 1*25 + 2*5 + 3
.byte $00
.byte 0
.byte 0
.byte 0
disk_exit_dni_l:
.byte $23
.byte $02
.byte 0
.byte 0
.byte 0
; want to go to disk38, LOAD_PROJECTOR, RIVEN_PROJECTOR, W
; want to go to disk02, LOAD_STEPS1, RIVEN_STEPS1, N
disk_exit_load:
.byte LOAD_PROJECTOR ; LOAD_PROJECTOR
.byte LOAD_STEPS1
.byte 0
.byte 0
.byte LOAD_CYAN
disk_exit_level:
.byte RIVEN_PROJECTOR ; RIVEN_PROJECTOR
.byte RIVEN_STEPS1
.byte 0
.byte 0
.byte 0
disk_exit_direction:
.byte DIRECTION_W
.byte DIRECTION_N
.byte 0
.byte 0
.byte 0

View File

@ -24,7 +24,7 @@ location0:
; RIVEN_STEPS_BASE
location1:
.byte $E0 ; disk1 ; north exit
.byte $E0 ; disk2 ; north exit
.byte $ff ; south exit
.byte RIVEN_CLIFF_BASE ; east exit
.byte RIVEN_PATH ; west exit

View File

@ -0,0 +1,62 @@
include ../../../Makefile.inc
LINKER_SCRIPTS = ../../../linker_scripts/
all: DISK02 LEVEL_STEPS1 LEVEL_TOP
####
DISK02: disk02.o
ld65 -o DISK02 disk02.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
disk02.o: disk02.s ../zp.inc
ca65 -o disk02.o disk02.s -l disk02.lst
####
LEVEL_STEPS1: level_steps1.o
ld65 -o LEVEL_STEPS1 level_steps1.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
level_steps1.o: level_steps1.s \
../zp.inc ../hardware.inc ../qload.inc \
../common_defines.inc disk02_defines.inc \
leveldata_steps1.inc \
graphics_steps1/steps1_graphics.inc
ca65 -o level_steps1.o level_steps1.s -l level_steps1.lst
####
LEVEL_TOP: level_top.o
ld65 -o LEVEL_TOP level_top.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
level_top.o: level_top.s \
../zp.inc ../hardware.inc ../qload.inc \
../common_defines.inc disk02_defines.inc \
leveldata_top.inc \
graphics_top/top_graphics.inc
ca65 -o level_top.o level_top.s -l level_top.lst
####
graphics_steps1/steps1_graphics.inc:
cd graphics_steps1 && make
graphics_top/top_graphics.inc:
cd graphics_top && make
####
clean:
rm -f *~ *.o *.lst \
LEVEL_STEPS1 LEVEL_TOP
####
distclean:
rm -f *~ *.o *.lst \
LEVEL_STEPS1 LEVEL_TOP
cd graphics_steps1 && make clean
cd graphics_top && make clean

View File

@ -0,0 +1,70 @@
.include "../zp.inc"
.include "../disk01_files/disk01_defines.inc"
;.include "../disk03_files/disk03_defines.inc"
;.include "../disk04_files/disk04_defines.inc"
.include "../disk00_files/disk00_defines.inc"
which_disk_bcd:
.byte $02 ; BCD
which_disk_bin:
.byte 2
load_address_array:
.byte $40,$40,$40,$40 ; TITLE, STEPS1, STEPS3, STEPS5
.byte $40,$00,$00,$00 ; TOP
track_array:
.byte 0, 2, 9,16 ; TITLE, STEPS1, STEPS3, STEPS5
.byte 22,0,0,0 ; TOP
sector_array:
.byte 8, 0, 0, 0 ; TITLE, STEPS1, STEPS3, STEPS5
.byte 0,0,0,0 ; TOP
length_array:
.byte 8, 96,84, 96 ; TITLE, STEPS1, STEPS3, STEPS5
.byte 80,0,0,0 ; TOP
; disk 1
disk_exit_disk: ; note: not BCD anymore
.byte 1
.byte 3
.byte 4
.byte 0
disk_exit_disk_bcd:
.byte $01
.byte $03
.byte $04
.byte 0
disk_exit_dni_h:
.byte $00
.byte $00
.byte $00
.byte $00
disk_exit_dni_l:
.byte $01
.byte $03
.byte $04
.byte 0
;
disk_exit_load:
.byte LOAD_PATH
.byte 0
.byte 0
.byte LOAD_CYAN
disk_exit_level:
.byte RIVEN_STEPS_BASE
.byte 0
.byte 0
.byte 0
disk_exit_direction:
.byte DIRECTION_W
.byte 0
.byte 0
.byte 0

View File

@ -0,0 +1,16 @@
LOAD_TITLE_02 = 0
LOAD_STEPS1 = 1
LOAD_STEPS3 = 2
LOAD_STEPS5 = 3
LOAD_TOP = 4
;================================
; Level definitions
; STEPS1
RIVEN_STEPS1 = 0
; TOP
RIVEN_TOP = 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: steps1_graphics.inc
steps1_graphics.inc: \
steps1_n.hgr.zx02 steps1_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
####
%.hgr: %.png
$(PNG_TO_HGR) $< > $@
%.hgr.zx02: %.hgr
$(ZX02) -f $< $@
####
clean:
rm -f *~ *.o *.lst *.zx02 *.hgr steps1_graphics.inc

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -0,0 +1,27 @@
include ../../../../Makefile.inc
ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f
PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr
all: top_graphics.inc
top_graphics.inc: \
top_n.hgr.zx02 top_s.hgr.zx02 top_e.hgr.zx02 top_w.hgr.zx02
echo "top_n_zx02: .incbin \"top_n.hgr.zx02\"" > top_graphics.inc
echo "top_s_zx02: .incbin \"top_s.hgr.zx02\"" >> top_graphics.inc
echo "top_e_zx02: .incbin \"top_e.hgr.zx02\"" >> top_graphics.inc
echo "top_w_zx02: .incbin \"top_w.hgr.zx02\"" >> top_graphics.inc
####
%.hgr: %.png
$(PNG_TO_HGR) $< > $@
%.hgr.zx02: %.hgr
$(ZX02) -f $< $@
####
clean:
rm -f *~ *.o *.lst *.zx02 *.hgr top_graphics.inc

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -0,0 +1,113 @@
; Riven -- Base 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_steps1/steps1_graphics.inc"
.include "leveldata_steps1.inc"

View File

@ -0,0 +1,113 @@
; Riven -- Top 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_top/top_graphics.inc"
.include "leveldata_top.inc"

View File

@ -0,0 +1,23 @@
;===============================================
; level data for Steps1
;===============================================
locations:
.word location0
; RIVEN_CHIPPER -- just arrived by cart
location0:
.byte LOAD_TOP<<4|RIVEN_TOP ; north exit
.byte $E0 ; 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 steps1_n_zx02 ; north bg
.word steps1_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,23 @@
;===============================================
; level data for top of steps
;===============================================
locations:
.word location0
; RIVEN_TOP -- top of steps
location0:
.byte $E1 ; north exit
.byte LOAD_STEPS1<<4|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 top_n_zx02 ; north bg
.word top_s_zx02 ; south bg
.word top_e_zx02 ; east bg
.word top_w_zx02 ; west bg
.byte BG_NORTH|BG_SOUTH|BG_EAST|BG_WEST ; all bgs
.byte $ff ; special exit

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -16,6 +16,11 @@
.include "disk01_files/disk01_defines.inc"
.endif
.if DISK=02
.include "disk02_files/disk02_defines.inc"
.endif
.if DISK=38
.include "disk38_files/disk38_defines.inc"
.endif
@ -453,6 +458,18 @@ game_continue:
sta DIRECTION
.endif
.if DISK=02
lda #LOAD_STEPS1
sta WHICH_LOAD
lda #RIVEN_STEPS1
sta LOCATION
lda #DIRECTION_N
sta DIRECTION
.endif
.if DISK=38
lda #LOAD_PROJECTOR
sta WHICH_LOAD