riven: add disk50

This commit is contained in:
Vince Weaver 2024-07-20 00:15:09 -04:00
parent 7af4f4776b
commit 0cfb2ddbfb
12 changed files with 349 additions and 6 deletions

View File

@ -14,6 +14,7 @@ all: riven_disk00.dsk \
riven_disk01.dsk \ riven_disk01.dsk \
riven_disk38.dsk riven_disk39.dsk \ riven_disk38.dsk riven_disk39.dsk \
riven_disk40.dsk riven_disk41.dsk riven_disk43.dsk \ riven_disk40.dsk riven_disk41.dsk riven_disk43.dsk \
riven_disk50.dsk \
riven_hgr.2mg riven_hgr.2mg
@ -157,7 +158,17 @@ riven_disk43.dsk: QBOOT QLOAD TITLE_43 \
$(DOS33_RAW) riven_disk43.dsk 16 0 disk43_files/LEVEL_LOGGED 0 0 $(DOS33_RAW) riven_disk43.dsk 16 0 disk43_files/LEVEL_LOGGED 0 0
$(DOS33_RAW) riven_disk43.dsk 22 0 disk43_files/LEVEL_LOGGED2 0 0 $(DOS33_RAW) riven_disk43.dsk 22 0 disk43_files/LEVEL_LOGGED2 0 0
riven_disk50.dsk: QBOOT QLOAD TITLE_50 \
disk50_files/DISK50 \
disk50_files/LEVEL_START
cp $(EMPTY_DISK)/empty.dsk riven_disk50.dsk
$(DOS33_RAW) riven_disk50.dsk 0 0 QBOOT 0 1
$(DOS33_RAW) riven_disk50.dsk 0 2 QBOOT 1 1
$(DOS33_RAW) riven_disk50.dsk 0 4 QBOOT 2 1
$(DOS33_RAW) riven_disk50.dsk 0 1 disk50_files/DISK50 0 0
$(DOS33_RAW) riven_disk50.dsk 0 8 TITLE_50 0 0
$(DOS33_RAW) riven_disk50.dsk 1 0 QLOAD 0 0
$(DOS33_RAW) riven_disk50.dsk 2 0 disk50_files/LEVEL_START 0 0
### ###
@ -277,6 +288,18 @@ title_43.o: title.s zp.inc hardware.inc \
graphics_title/riven_title.hgr.zx02 graphics_title/riven_title.hgr.zx02
ca65 -o title_43.o title.s -DDISK=43 -l title_43.lst ca65 -o title_43.o title.s -DDISK=43 -l title_43.lst
####
TITLE_50: title_50.o
ld65 -o TITLE_50 title_50.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
title_50.o: title.s zp.inc hardware.inc \
qload.inc \
hgr_tables.s \
graphics_title/riven_title.hgr.zx02
ca65 -o title_50.o title.s -DDISK=50 -l title_50.lst
#### ####
@ -308,6 +331,9 @@ disk41_files/DISK41:
disk43_files/DISK43: disk43_files/DISK43:
cd disk43_files && make cd disk43_files && make
disk50_files/DISK50:
cd disk50_files && make
#### ####
disk38_files/LEVEL_PROJECTOR: disk38_files/LEVEL_PROJECTOR:
@ -346,6 +372,11 @@ disk40_files/LEVEL_OUTSIDE:
disk43_files/LEVEL_CART: disk43_files/LEVEL_CART:
cd disk43_files && make cd disk43_files && make
####
disk50_files/LEVEL_START:
cd disk50_files && make
#### ####
@ -360,7 +391,7 @@ graphics_title/riven_title.hgr.zx02:
clean: clean:
rm -f *~ *.o *.lst dts_block generate_common \ rm -f *~ *.o *.lst dts_block generate_common \
QBOOT QLOAD QLOAD_HD \ QBOOT QLOAD QLOAD_HD \
TITLE_00 TITLE_01 TITLE_38 TITLE_39 TITLE_40 TITLE_41 TITLE_43 TITLE_00 TITLE_01 TITLE_38 TITLE_39 TITLE_40 TITLE_41 TITLE_43 TITLE_50
cd disk00_files && make clean cd disk00_files && make clean
cd disk01_files && make clean cd disk01_files && make clean
cd disk38_files && make clean cd disk38_files && make clean
@ -368,13 +399,14 @@ clean:
cd disk40_files && make clean cd disk40_files && make clean
cd disk41_files && make clean cd disk41_files && make clean
cd disk43_files && make clean cd disk43_files && make clean
cd disk50_files && make clean
#### ####
distclean: distclean:
rm -f *~ *.o *.lst generate_common \ rm -f *~ *.o *.lst generate_common \
QBOOT QLOAD QLOAD_HD \ QBOOT QLOAD QLOAD_HD \
TITLE_00 TITLE_01 TITLE_38 TITLE_39 TITLE_40 TITLE_41 TITLE_43 TITLE_00 TITLE_01 TITLE_38 TITLE_39 TITLE_40 TITLE_41 TITLE_43 TITLE_50
cd graphics_title && make clean cd graphics_title && make clean
cd graphics_sprites && make clean cd graphics_sprites && make clean
cd disk00_files && make distclean cd disk00_files && make distclean
@ -384,6 +416,7 @@ distclean:
cd disk40_files && make distclean cd disk40_files && make distclean
cd disk41_files && make distclean cd disk41_files && make distclean
cd disk43_files && make distclean cd disk43_files && make distclean
cd disk50_files && make distclean
### ###
@ -415,10 +448,12 @@ qload.inc: generate_common QLOAD
submit: riven_disk00.dsk riven_disk01.dsk \ submit: riven_disk00.dsk riven_disk01.dsk \
riven_disk38.dsk riven_disk39.dsk \ riven_disk38.dsk riven_disk39.dsk \
riven_disk40.dsk riven_disk41.dsk riven_disk43.dsk \ riven_disk40.dsk riven_disk41.dsk riven_disk43.dsk \
riven_disk50.dsk
riven_hgr.2mg riven_hgr.2mg
zip riven_hgr.zip riven_disk00.dsk riven_disk01.dsk \ zip riven_hgr.zip riven_disk00.dsk riven_disk01.dsk \
riven_disk38.dsk riven_disk39.dsk \ riven_disk38.dsk riven_disk39.dsk \
riven_disk40.dsk riven_disk41.dsk riven_disk43.dsk riven_disk40.dsk riven_disk41.dsk riven_disk43.dsk \
riven_disk50.dsk
zip riven_hgr.2mg.zip riven_hgr.2mg zip riven_hgr.2mg.zip riven_hgr.2mg
### ###
@ -469,7 +504,9 @@ riven_hgr.2mg: dts_block PROBOOTHD QLOAD_HD \
disk43_files/LEVEL_CART \ disk43_files/LEVEL_CART \
disk43_files/LEVEL_BRIDGE \ disk43_files/LEVEL_BRIDGE \
disk43_files/LEVEL_LOGGED \ disk43_files/LEVEL_LOGGED \
disk43_files/LEVEL_LOGGED2 disk43_files/LEVEL_LOGGED2 \
disk50_files/DISK50 \
disk50_files/LEVEL_START
$(PRODOSDIR)/mkprodosfs riven_hgr.2mg -n Riven -b 65535 -2 $(PRODOSDIR)/mkprodosfs riven_hgr.2mg -n Riven -b 65535 -2
$(PRODOS_RAW) riven_hgr.2mg 0 PROBOOTHD 0 0 $(PRODOS_RAW) riven_hgr.2mg 0 PROBOOTHD 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 0 1 0` QLOAD_HD 0 0 $(PRODOS_RAW) riven_hgr.2mg `./dts_block 0 1 0` QLOAD_HD 0 0
@ -511,6 +548,8 @@ riven_hgr.2mg: dts_block PROBOOTHD QLOAD_HD \
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 43 9 0` disk43_files/LEVEL_BRIDGE 0 0 $(PRODOS_RAW) riven_hgr.2mg `./dts_block 43 9 0` disk43_files/LEVEL_BRIDGE 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 43 16 0` disk43_files/LEVEL_LOGGED 0 0 $(PRODOS_RAW) riven_hgr.2mg `./dts_block 43 16 0` disk43_files/LEVEL_LOGGED 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 43 22 0` disk43_files/LEVEL_LOGGED2 0 0 $(PRODOS_RAW) riven_hgr.2mg `./dts_block 43 22 0` disk43_files/LEVEL_LOGGED2 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 50 0 2` disk50_files/DISK50 0 0
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 50 2 0` disk50_files/LEVEL_START 0 0
### ###

View File

@ -0,0 +1,47 @@
include ../../../Makefile.inc
LINKER_SCRIPTS = ../../../linker_scripts/
all: DISK50 LEVEL_START
####
DISK50: disk50.o
ld65 -o DISK50 disk50.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
disk50.o: disk50.s ../zp.inc
ca65 -o disk50.o disk50.s -l disk50.lst
####
LEVEL_START: level_start.o
ld65 -o LEVEL_START level_start.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
level_start.o: level_start.s \
../zp.inc ../hardware.inc ../qload.inc \
../common_defines.inc disk50_defines.inc \
leveldata_start.inc \
graphics_start/start_graphics.inc
ca65 -o level_start.o level_start.s -l level_start.lst
####
graphics_start/start_graphics.inc:
cd graphics_start && make
####
clean:
rm -f *~ *.o *.lst \
LEVEL_START
####
distclean:
rm -f *~ *.o *.lst \
LEVEL_START
cd graphics_start && make clean

View File

@ -0,0 +1,68 @@
.include "../zp.inc"
.include "../disk43_files/disk43_defines.inc"
.include "../disk00_files/disk00_defines.inc"
which_disk_bcd:
.byte $50 ; BCD
which_disk_bin:
.byte 50
load_address_array:
.byte $40,$40,$40,$40 ; TITLE, START
.byte $40,$00,$00,$00 ;
track_array:
.byte 0, 2, 9,16 ; TITLE, START
.byte 22,0,0,0 ;
sector_array:
.byte 8, 0, 0, 0 ; TITLE, START
.byte 0,0,0,0 ;
length_array:
.byte 8, 96,84, 96 ; TITLE, START
.byte 80,0,0,0
; disk 50
disk_exit_disk: ; note: not BCD anymore
.byte 0
.byte 0
.byte 0
.byte 0
disk_exit_disk_bcd: ; note: not BCD anymore
.byte 0
.byte 0
.byte 0
.byte 0
disk_exit_dni_h:
.byte 0 ; 41 = 1*25 + 3*5 + 1
.byte 0
.byte 0
.byte 0
disk_exit_dni_l:
.byte 0
.byte 0
.byte 0
.byte 0
;
disk_exit_load:
.byte 0
.byte 0
.byte 0
.byte LOAD_CYAN
disk_exit_level:
.byte 0
.byte 0
.byte 0
.byte 0
disk_exit_direction:
.byte 0
.byte 0
.byte 0
.byte 0

View File

@ -0,0 +1,10 @@
LOAD_TITLE_50 = 0
LOAD_START = 1
;================================
; Level definitions
; START
RIVEN_START_LOCATION = 0

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: start_graphics.inc
start_graphics.inc: \
start_n.hgr.zx02 start_w.hgr.zx02 start_e.hgr.zx02 start_s.hgr.zx02
echo "start_n_zx02: .incbin \"start_n.hgr.zx02\"" > start_graphics.inc
echo "start_w_zx02: .incbin \"start_w.hgr.zx02\"" >> start_graphics.inc
echo "start_e_zx02: .incbin \"start_e.hgr.zx02\"" >> start_graphics.inc
echo "start_s_zx02: .incbin \"start_s.hgr.zx02\"" >> start_graphics.inc
####
%.hgr: %.png
$(PNG_TO_HGR) $< > $@
%.hgr.zx02: %.hgr
$(ZX02) -f $< $@
####
clean:
rm -f *~ *.o *.lst *.zx02 *.hgr start_graphics.inc

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,113 @@
; Riven -- Book Island, Arrival
; by deater (Vince Weaver) <vince@deater.net>
; Zero Page
.include "../zp.inc"
.include "../hardware.inc"
.include "../common_defines.inc"
.include "../qload.inc"
.include "disk50_defines.inc"
riven_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_start/start_graphics.inc"
.include "leveldata_start.inc"

View File

@ -0,0 +1,23 @@
;===============================================
; level data for Start level
;===============================================
locations:
.word location0
; RIVEN_START_LOCATION -- just arrived by cart
location0:
.byte $FF ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte DIRECTION_E ; north exit_dir
.byte DIRECTION_E ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word start_n_zx02 ; north bg
.word start_s_zx02 ; south bg
.word start_e_zx02 ; east bg
.word start_w_zx02 ; west bg
.byte BG_EAST|BG_NORTH|BG_SOUTH|BG_WEST ; all bgs
.byte $ff ; special exit

View File

@ -36,6 +36,10 @@
.include "disk43_files/disk43_defines.inc" .include "disk43_files/disk43_defines.inc"
.endif .endif
.if DISK=50
.include "disk50_files/disk50_defines.inc"
.endif
riven_title: riven_title:
@ -501,6 +505,18 @@ game_continue:
sta DIRECTION sta DIRECTION
.endif .endif
.if DISK=50
lda #LOAD_START
sta WHICH_LOAD
lda #RIVEN_START_LOCATION
sta LOCATION
lda #DIRECTION_N
sta DIRECTION
.endif
rts rts