riven: hooked up some more path

This commit is contained in:
Vince Weaver 2024-06-25 01:33:10 -04:00
parent d59c2c5632
commit b56e4f57c7
18 changed files with 466 additions and 26 deletions

View File

@ -90,7 +90,9 @@ riven_disk41.dsk: QBOOT QLOAD TITLE_41 \
riven_disk43.dsk: QBOOT QLOAD TITLE_43 \
disk43_files/DISK43 \
disk43_files/LEVEL_CART \
disk43_files/LEVEL_BRIDGE
disk43_files/LEVEL_BRIDGE \
disk43_files/LEVEL_LOGGED \
disk43_files/LEVEL_LOGGED2
cp $(EMPTY_DISK)/empty.dsk riven_disk43.dsk
$(DOS33_RAW) riven_disk43.dsk 0 0 QBOOT 0 1
$(DOS33_RAW) riven_disk43.dsk 0 2 QBOOT 1 1
@ -100,6 +102,10 @@ riven_disk43.dsk: QBOOT QLOAD TITLE_43 \
$(DOS33_RAW) riven_disk43.dsk 1 9 TITLE_43 0 0
$(DOS33_RAW) riven_disk43.dsk 2 0 disk43_files/LEVEL_CART 0 0
$(DOS33_RAW) riven_disk43.dsk 9 0 disk43_files/LEVEL_BRIDGE 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
###

View File

@ -47,11 +47,11 @@ T 0 = Qboot
T 1 = QLOAD 1762 bytes 8S = 0T8S (2048) 300B free
T 1.5 = TITLE 1531 bytes 8S = 0T8S (2048) 500B free
T 2 = PROJECTOR 26736 bytes 112S = 7T0S (28672) 2k free
T 9 = OUTSIDE 29355 bytes 128S = 8T0S (32768) 3k free
T 9 = OUTSIDE 29349 bytes 128S = 8T0S (32768) 3k free
T 17 = MAGSTEPS 11537 bytes 64S = 4T0S (16384) 5k free
T 21 = MAGLEV 13862 bytes 64S = 4T0S (16384) 3k free
T 25 = MOVIE_FLIP 7680 bytes 32S = 2T0S (8192) 500B free
T 27 = MOVIE_MAG 32275 bytes 128S = 8T0S (32768)500B free
T 21 = MAGLEV 13881 bytes 64S = 4T0S (16384) 3k free
T 25 = MOVIE_FLIP 7783 bytes 32S = 2T0S (8192) 500B free
T 27 = MOVIE_MAG 32177 bytes 128S = 8T0S (32768)500B free
Disk40 Map (disk has 35 tracks, each 4k in size)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -82,7 +82,9 @@ T 0 = Qboot
T 1 = QLOAD 1762 bytes 8S = 0T8S (2048) 300B free
T 1.5 = TITLE 1531 bytes 8S = 0T8S (2048) 500B free
T 2 = CART 23280 bytes = 7T0S (28672) 5k free
T 9 = BRIDGE 18609 bytes = 5T0S (20480) 2k free
T 9 = BRIDGE 18609 bytes = 7T0S (28672) 10k free
T 16 = LOGGED 11169 bytes = 6T0S (24576) 13k free
T 22 = LOGGED2 9191 bytes = 5T0S (20480)
T 27 = MOVIE_CART32275 bytes 128S = 8T0S (32768)500B free

View File

@ -20,14 +20,23 @@ length_array:
disk_exit_disk: ; note: BCD (yes I'm lazy)
.byte 0,0,0,0
.byte $39 ; zap to temple for now
.byte 0,0,0
disk_exit_dni_h:
.byte 0,0,0,0
.byte $01 ; 39 = 1*25 + 2*5 + 4
.byte 0,0,0
disk_exit_dni_l:
.byte 0,0,0,0
.byte $24
.byte 0,0,0
; want to go to disk39, LOAD_PROJECTOR, RIVEN_PROJECTOR, W
disk_exit_load:
.byte 0,0,0,0
.byte 2 ; LOAD_PROJECTOR
.byte 0,0,0
disk_exit_level:
.byte 0,0,0,0
.byte 0 ; RIVEN_PROJECTOR
.byte 0,0,0
disk_exit_direction:
.byte 0,0,0,0
.byte DIRECTION_W
.byte 0,0,0

View File

@ -27,11 +27,11 @@ location0:
location1:
.byte $ff ; north exit
.byte RIVEN_ARRIVAL ; south exit
.byte $ff ; east exit
.byte $E0 ; leave to disk39 ; east exit
.byte $ff ; west exit
.byte $ff ; north exit_dir
.byte DIRECTION_N ; south exit_dir
.byte $ff ; east exit_dir
.byte DIRECTION_W ; east exit_dir
.byte $ff ; west exit_dir
.word arrival_near_n_zx02 ; north bg
.word arrival_near_s_zx02 ; south bg

View File

@ -3,7 +3,7 @@ include ../../../Makefile.inc
LINKER_SCRIPTS = ../../../linker_scripts/
all: DISK43 LEVEL_CART LEVEL_BRIDGE
all: DISK43 LEVEL_CART LEVEL_BRIDGE LEVEL_LOGGED LEVEL_LOGGED2
####
@ -37,6 +37,32 @@ level_bridge.o: level_bridge.s \
graphics_bridge/bridge_graphics.inc
ca65 -o level_bridge.o level_bridge.s -l level_bridge.lst
####
LEVEL_LOGGED: level_logged.o
ld65 -o LEVEL_LOGGED level_logged.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
level_logged.o: level_logged.s \
../zp.inc ../hardware.inc ../qload.inc \
../common_defines.inc disk43_defines.inc \
leveldata_logged.inc \
graphics_logged/logged_graphics.inc
ca65 -o level_logged.o level_logged.s -l level_logged.lst
####
LEVEL_LOGGED2: level_logged2.o
ld65 -o LEVEL_LOGGED2 level_logged2.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
level_logged2.o: level_logged2.s \
../zp.inc ../hardware.inc ../qload.inc \
../common_defines.inc disk43_defines.inc \
leveldata_logged2.inc \
graphics_logged2/logged2_graphics.inc
ca65 -o level_logged2.o level_logged2.s -l level_logged2.lst
####
@ -60,18 +86,26 @@ graphics_cart/cart_graphics.inc:
graphics_bridge/bridge_graphics.inc:
cd graphics_bridge && make
graphics_logged/logged_graphics.inc:
cd graphics_logged && make
graphics_logged2/logged2_graphics.inc:
cd graphics_logged2 && make
####
clean:
rm -f *~ *.o *.lst \
LEVEL_CART LEVEL_BRIDGE
LEVEL_CART LEVEL_BRIDGE LEVEL_LOGGED
####
distclean:
rm -f *~ *.o *.lst \
LEVEL_CART LEVEL_BRIDGE
LEVEL_CART LEVEL_BRIDGE LEVEL_LOGGED
cd graphics_cart && make clean
cd graphics_bridge && make clean
cd graphics_logged && make clean
cd graphics_logged2 && make clean

View File

@ -5,20 +5,20 @@ which_disk:
load_address_array:
.byte $40,$40,$40,$40 ; TITLE, CART, BRIDGE
.byte $00,$00,$00,$00
.byte $40,$40,$40,$40 ; TITLE, CART, BRIDGE,LOGGED
.byte $40,$00,$00,$00 ; LOGGED2
track_array:
.byte 1, 2, 9,17 ; TITLE, CART, BRIDGE
.byte 0,0,0,0
.byte 1, 2, 9,16 ; TITLE, CART, BRIDGE,LOGGED
.byte 22,0,0,0 ; LOGGED2
sector_array:
.byte 9, 0, 0, 0 ; TITLE, CART, BRIDGE
.byte 0,0,0,0
.byte 9, 0, 0, 0 ; TITLE, CART, BRIDGE,LOGGED
.byte 0,0,0,0 ; LOGGED2
length_array:
.byte 8, 96,84, 64 ; TITLE, CART, BRIDGE
.byte 0,0,0,0
.byte 8, 96,84, 96 ; TITLE, CART, BRIDGE,LOGGED
.byte 64,0,0,0
; disk 41

View File

@ -1,6 +1,8 @@
LOAD_TITLE = 0
LOAD_CART = 1
LOAD_BRIDGE = 2
LOAD_LOGGED = 3
LOAD_LOGGED2 = 4
;================================
; Level definitions
@ -15,3 +17,12 @@ RIVEN_IN_CART = 1
RIVEN_MID_BRIDGE = 0
RIVEN_FAR_BRIDGE = 1
; LOGGED
RIVEN_LOGGED = 0
RIVEN_LOGGED2 = 1
; LOGGED2
RIVEN_LOGGED3 = 0
RIVEN_LOGGED4 = 1

View File

@ -0,0 +1,26 @@
include ../../../../Makefile.inc
ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f
PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr
all: logged_graphics.inc
logged_graphics.inc: \
logged_w.hgr.zx02 \
logged2_w.hgr.zx02
echo "logged_w_zx02: .incbin \"logged_w.hgr.zx02\"" > logged_graphics.inc
echo "logged2_w_zx02: .incbin \"logged2_w.hgr.zx02\"" >> logged_graphics.inc
####
%.hgr: %.png
$(PNG_TO_HGR) $< > $@
%.hgr.zx02: %.hgr
$(ZX02) -f $< $@
####
clean:
rm -f *~ *.o *.lst *.zx02 *.hgr logged_graphics.inc

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -0,0 +1,26 @@
include ../../../../Makefile.inc
ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f
PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr
all: logged2_graphics.inc
logged2_graphics.inc: \
logged3_w.hgr.zx02 \
logged4_w.hgr.zx02
echo "logged3_w_zx02: .incbin \"logged3_w.hgr.zx02\"" > logged2_graphics.inc
echo "logged4_w_zx02: .incbin \"logged4_w.hgr.zx02\"" >> logged2_graphics.inc
####
%.hgr: %.png
$(PNG_TO_HGR) $< > $@
%.hgr.zx02: %.hgr
$(ZX02) -f $< $@
####
clean:
rm -f *~ *.o *.lst *.zx02 *.hgr logged2_graphics.inc

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,122 @@
; Riven -- Jungle Island -- Logging area
; by deater (Vince Weaver) <vince@deater.net>
; Zero Page
.include "../zp.inc"
.include "../hardware.inc"
.include "../common_defines.inc"
.include "../qload.inc"
.include "disk43_defines.inc"
riven_logged:
;===================
; 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
;==================================
; cart button clicked
;==================================
; TODO: call cart code
cart_button_clicked:
bit SPEAKER
rts
;==========================
; includes
;==========================
.include "graphics_logged/logged_graphics.inc"
.include "leveldata_logged.inc"

View File

@ -0,0 +1,122 @@
; Riven -- Jungle Island -- Logging area 2
; by deater (Vince Weaver) <vince@deater.net>
; Zero Page
.include "../zp.inc"
.include "../hardware.inc"
.include "../common_defines.inc"
.include "../qload.inc"
.include "disk43_defines.inc"
riven_logged2:
;===================
; 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
;==================================
; cart button clicked
;==================================
; TODO: call cart code
cart_button_clicked:
bit SPEAKER
rts
;==========================
; includes
;==========================
.include "graphics_logged2/logged2_graphics.inc"
.include "leveldata_logged2.inc"

View File

@ -27,7 +27,7 @@ location1:
.byte $FF ; north exit
.byte $ff ; south exit
.byte RIVEN_MID_BRIDGE ; east exit
.byte $ff ; west exit
.byte LOAD_LOGGED<<4|RIVEN_LOGGED ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte DIRECTION_E ; east exit_dir

View File

@ -0,0 +1,42 @@
;===============================================
; level data for Logged Area
;===============================================
locations:
.word location0,location1
; RIVEN_LOGGED -- logged area
location0:
.byte $FF ; north exit
.byte $ff ; south exit
.byte LOAD_BRIDGE<<4|RIVEN_FAR_BRIDGE ; east exit
.byte RIVEN_LOGGED2 ; 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 $0000 ; east bg
.word logged_w_zx02 ; west bg
.byte BG_WEST ; bgs
.byte $ff ; special exit
; RIVEN_LOGGED2 -- second logged area
location1:
.byte $FF ; north exit
.byte $ff ; south exit
.byte RIVEN_LOGGED ; east exit
.byte LOAD_LOGGED2<<4|RIVEN_LOGGED3 ; 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 $0000 ; east bg
.word logged2_w_zx02 ; west bg
.byte BG_WEST ; bgs
.byte $ff ; special exit

View File

@ -0,0 +1,40 @@
;===============================================
; level data for Logged Area 2
;===============================================
locations:
.word location0,location1
; RIVEN_LOGGED3 -- more logging
location0:
.byte $FF ; north exit
.byte $ff ; south exit
.byte LOAD_LOGGED<<4|RIVEN_LOGGED2 ; east exit
.byte RIVEN_LOGGED4 ; 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 $0000 ; east bg
.word logged3_w_zx02 ; west bg
.byte BG_WEST ; bgs
.byte $ff ; special exit
; RIVEN_LOGGED4 -- fourth logged area
location1:
.byte $FF ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte LOAD_CART<<4|RIVEN_OUTSIDE_CART ; 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 $0000 ; east bg
.word logged4_w_zx02 ; west bg
.byte BG_WEST ; bgs
.byte $ff ; special exit