riven: hook up disk5 and bump version number

This commit is contained in:
Vince Weaver 2024-07-24 01:16:56 -04:00
parent f3a5b19643
commit bdf67acea7
7 changed files with 298 additions and 4 deletions

View File

@ -12,7 +12,7 @@ PRODOS_RAW = ../../utils/prodos-utils/prodos_raw
all: riven_disk00.dsk \
riven_disk01.dsk riven_disk02.dsk riven_disk03.dsk \
riven_disk04.dsk \
riven_disk04.dsk riven_disk05.dsk \
riven_disk38.dsk riven_disk39.dsk \
riven_disk40.dsk riven_disk41.dsk riven_disk43.dsk riven_disk44.dsk \
riven_disk50.dsk \
@ -107,6 +107,21 @@ riven_disk04.dsk: QBOOT QLOAD TITLE_04 \
$(DOS33_RAW) riven_disk04.dsk 1 0 QLOAD 0 0
$(DOS33_RAW) riven_disk04.dsk 27 0 disk04_files/LEVEL_TUNNEL3 0 0
###
riven_disk05.dsk: QBOOT QLOAD TITLE_05 \
disk05_files/DISK05 \
disk05_files/LEVEL_CHAIR
cp $(EMPTY_DISK)/empty.dsk riven_disk05.dsk
$(DOS33_RAW) riven_disk05.dsk 0 0 QBOOT 0 1
$(DOS33_RAW) riven_disk05.dsk 0 2 QBOOT 1 1
$(DOS33_RAW) riven_disk05.dsk 0 4 QBOOT 2 1
$(DOS33_RAW) riven_disk05.dsk 0 1 disk05_files/DISK05 0 0
$(DOS33_RAW) riven_disk05.dsk 0 8 TITLE_05 0 0
$(DOS33_RAW) riven_disk05.dsk 1 0 QLOAD 0 0
$(DOS33_RAW) riven_disk05.dsk 2 0 disk05_files/LEVEL_CHAIR 0 0
###
@ -327,6 +342,17 @@ title_04.o: title.s zp.inc hardware.inc \
graphics_title/riven_title.hgr.zx02
ca65 -o title_04.o title.s -DDISK=04 -l title_04.lst
####
TITLE_05: title_05.o
ld65 -o TITLE_05 title_05.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
title_05.o: title.s zp.inc hardware.inc \
qload.inc \
hgr_tables.s \
graphics_title/riven_title.hgr.zx02
ca65 -o title_05.o title.s -DDISK=05 -l title_05.lst
@ -430,6 +456,9 @@ disk03_files/DISK03:
disk04_files/DISK04:
cd disk04_files && make
disk05_files/DISK05:
cd disk05_files && make
disk38_files/DISK38:
cd disk38_files && make
@ -486,6 +515,11 @@ disk04_files/LEVEL_TUNNEL3:
####
disk05_files/LEVEL_CHAIR:
cd disk05_files && make
####
disk38_files/LEVEL_PROJECTOR:
cd disk38_files && make
@ -555,6 +589,7 @@ clean:
cd disk02_files && make clean
cd disk03_files && make clean
cd disk04_files && make clean
cd disk05_files && make clean
cd disk38_files && make clean
cd disk39_files && make clean
cd disk40_files && make clean
@ -578,6 +613,7 @@ distclean:
cd disk02_files && make distclean
cd disk03_files && make distclean
cd disk04_files && make distclean
cd disk05_files && make distclean
cd disk38_files && make distclean
cd disk39_files && make distclean
cd disk40_files && make distclean
@ -614,13 +650,14 @@ qload.inc: generate_common QLOAD
./generate_common -a 0x1600 -s clear_gr_all qload.lst >> qload.inc
submit: riven_disk00.dsk riven_disk01.dsk riven_disk02.dsk riven_disk03.dsk \
riven_disk04.dsk \
riven_disk04.dsk riven_disk05.dsk \
riven_disk38.dsk riven_disk39.dsk \
riven_disk40.dsk riven_disk41.dsk riven_disk43.dsk riven_disk44.dsk \
riven_disk50.dsk
riven_disk50.dsk \
riven_hgr.2mg
zip riven_hgr.zip riven_disk00.dsk riven_disk01.dsk \
riven_disk02.dsk riven_disk03.dsk riven_disk04.dsk \
riven_disk05.dsk \
riven_disk38.dsk riven_disk39.dsk \
riven_disk40.dsk riven_disk41.dsk riven_disk43.dsk \
riven_disk44.dsk \
@ -658,6 +695,8 @@ riven_hgr.2mg: dts_block PROBOOTHD QLOAD_HD \
disk03_files/LEVEL_OUTSIDE \
disk04_files/DISK04 \
disk04_files/LEVEL_TUNNEL3 \
disk05_files/DISK05 \
disk05_files/LEVEL_CHAIR \
disk38_files/DISK38 \
disk38_files/LEVEL_PROJECTOR \
disk39_files/DISK39 \
@ -713,6 +752,8 @@ riven_hgr.2mg: dts_block PROBOOTHD QLOAD_HD \
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 3 16 0` disk03_files/LEVEL_OUTSIDE 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 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
$(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

@ -0,0 +1,67 @@
.include "../zp.inc"
.include "../disk04_files/disk04_defines.inc"
.include "../disk00_files/disk00_defines.inc"
which_disk_bcd:
.byte $05 ; BCD
which_disk_bin:
.byte 5
load_address_array:
.byte $40,$40,$40,$40 ; TITLE, CHAIR
.byte $40,$00,$00,$00 ;
track_array:
.byte 0, 2, 9,16 ; TITLE, CHAIR
.byte 22,0,0,0 ;
sector_array:
.byte 8, 0, 0, 0 ; TITLE, CHAIR
.byte 0,0,0,0 ;
length_array:
.byte 8, 96,84, 96 ; TITLE, CHAIR
.byte 80,0,0,0
disk_exit_disk: ; note: not BCD anymore
.byte 4
.byte 0
.byte 0
.byte 0
disk_exit_disk_bcd:
.byte $04
.byte 0
.byte 0
.byte 0
disk_exit_dni_h:
.byte 0
.byte 0
.byte 0
.byte 0
disk_exit_dni_l:
.byte $04
.byte 0
.byte 0
.byte 0
;
disk_exit_load:
.byte LOAD_TUNNEL3
.byte 0
.byte 0
.byte LOAD_CYAN
disk_exit_level:
.byte RIVEN_TUNNEL3
.byte 0
.byte 0
.byte 0
disk_exit_direction:
.byte DIRECTION_E
.byte 0
.byte 0
.byte 0

View File

@ -0,0 +1,10 @@
LOAD_TITLE_05 = 0
LOAD_CHAIR = 1
;================================
; Level definitions
; CHAIR
RIVEN_CHAIR = 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: chair_graphics.inc
chair_graphics.inc: \
chair_n.hgr.zx02
echo "chair_n_zx02: .incbin \"chair_n.hgr.zx02\"" > chair_graphics.inc
####
%.hgr: %.png
$(PNG_TO_HGR) $< > $@
%.hgr.zx02: %.hgr
$(ZX02) -f $< $@
####
clean:
rm -f *~ *.o *.lst *.zx02 *.hgr chair_graphics.inc

View File

@ -0,0 +1,113 @@
; Riven -- chair room
; by deater (Vince Weaver) <vince@deater.net>
; Zero Page
.include "../zp.inc"
.include "../hardware.inc"
.include "../common_defines.inc"
.include "../qload.inc"
.include "disk05_defines.inc"
chair_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_chair/chair_graphics.inc"
.include "leveldata_chair.inc"

View File

@ -0,0 +1,23 @@
;===============================================
; level data for chair level
;===============================================
locations:
.word location0
; RIVEN_CHAIR -- scary chair
location0:
.byte $E0 ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte DIRECTION_E ; north exit_dir
.byte $ff ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word chair_n_zx02 ; north bg
.word $0000 ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH ; all bgs
.byte $ff ; special exit

View File

@ -28,6 +28,10 @@
.include "disk04_files/disk04_defines.inc"
.endif
.if DISK=05
.include "disk05_files/disk05_defines.inc"
.endif
.if DISK=38
.include "disk38_files/disk38_defines.inc"
.endif
@ -498,6 +502,17 @@ game_continue:
sta DIRECTION
.endif
.if DISK=05
lda #LOAD_CHAIR
sta WHICH_LOAD
lda #RIVEN_CHAIR
sta LOCATION
lda #DIRECTION_N
sta DIRECTION
.endif
.if DISK=38
lda #LOAD_PROJECTOR
@ -601,7 +616,7 @@ riven_title_image:
;01234567890123456789012345678901234567890
title_text:
.byte 0, 0,"LOADING RIVEN SUBSET DISK 00 V0.07",0
.byte 0, 0,"LOADING RIVEN SUBSET DISK 00 V0.08",0
;
;