diff --git a/games/riven_hgr/Makefile b/games/riven_hgr/Makefile index 46caab55..f304e500 100644 --- a/games/riven_hgr/Makefile +++ b/games/riven_hgr/Makefile @@ -69,7 +69,9 @@ riven_disk40.dsk: QBOOT QLOAD TITLE_40 \ riven_disk41.dsk: QBOOT QLOAD TITLE_41 \ disk41_files/DISK41 \ - disk41_files/LEVEL_TUNNEL + disk41_files/LEVEL_TUNNEL \ + disk41_files/LEVEL_STAIRS \ + disk41_files/LEVEL_COVE cp $(EMPTY_DISK)/empty.dsk riven_disk41.dsk $(DOS33_RAW) riven_disk41.dsk 0 0 QBOOT 0 1 $(DOS33_RAW) riven_disk41.dsk 0 2 QBOOT 1 1 @@ -78,6 +80,9 @@ riven_disk41.dsk: QBOOT QLOAD TITLE_41 \ $(DOS33_RAW) riven_disk41.dsk 1 0 QLOAD 0 0 $(DOS33_RAW) riven_disk41.dsk 1 9 TITLE_41 0 0 $(DOS33_RAW) riven_disk41.dsk 2 0 disk41_files/LEVEL_TUNNEL 0 0 + $(DOS33_RAW) riven_disk41.dsk 10 0 disk41_files/LEVEL_STAIRS 0 0 + $(DOS33_RAW) riven_disk41.dsk 17 0 disk41_files/LEVEL_COVE 0 0 + riven_disk43.dsk: QBOOT QLOAD TITLE_43 \ disk43_files/DISK43 \ diff --git a/games/riven_hgr/NOTES b/games/riven_hgr/NOTES index 5537206c..0cf31da1 100644 --- a/games/riven_hgr/NOTES +++ b/games/riven_hgr/NOTES @@ -71,7 +71,8 @@ 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 = TUNNEL 30609 bytes = 8T (32768) 2k free - +T 10 = STAIRS 25533 100S= 6T4S (28672) 3k free +T 17 = COVE 9139 = 8T (32768) Disk43 Map (disk has 35 tracks, each 4k in size) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/games/riven_hgr/disk41_files/Makefile b/games/riven_hgr/disk41_files/Makefile index fd041a96..06380d69 100644 --- a/games/riven_hgr/disk41_files/Makefile +++ b/games/riven_hgr/disk41_files/Makefile @@ -3,7 +3,7 @@ include ../../../Makefile.inc LINKER_SCRIPTS = ../../../linker_scripts/ -all: DISK41 LEVEL_TUNNEL +all: DISK41 LEVEL_TUNNEL LEVEL_STAIRS LEVEL_COVE ### @@ -25,21 +25,56 @@ level_tunnel.o: level_tunnel.s \ graphics_tunnel/tunnel_graphics.inc ca65 -o level_tunnel.o level_tunnel.s -l level_tunnel.lst +#### + +LEVEL_STAIRS: level_stairs.o + ld65 -o LEVEL_STAIRS level_stairs.o -C $(LINKER_SCRIPTS)/apple2_4000.inc + +level_stairs.o: level_stairs.s \ + ../zp.inc ../hardware.inc ../qload.inc \ + ../common_defines.inc disk41_defines.inc \ + leveldata_stairs.inc \ + graphics_stairs/stairs_graphics.inc + ca65 -o level_stairs.o level_stairs.s -l level_stairs.lst + +#### + +LEVEL_COVE: level_cove.o + ld65 -o LEVEL_COVE level_cove.o -C $(LINKER_SCRIPTS)/apple2_4000.inc + +level_cove.o: level_cove.s \ + ../zp.inc ../hardware.inc ../qload.inc \ + ../common_defines.inc disk41_defines.inc \ + leveldata_cove.inc \ + graphics_cove/cove_graphics.inc + ca65 -o level_cove.o level_cove.s -l level_cove.lst + + + #### graphics_tunnel/tunnel_graphics.inc: cd graphics_tunnel && make + +graphics_stairs/stairs_graphics.inc: + cd graphics_stairs && make + +graphics_cove/cove_graphics.inc: + cd graphics_cove && make + #### clean: rm -f *~ *.o *.lst \ - DISK41 LEVEL_TUNNEL + DISK41 LEVEL_TUNNEL LEVEL_STAIRS LEVEL_COVE #### distclean: rm -f *~ *.o *.lst \ - DISK41 LEVEL_TUNNEL + DISK41 LEVEL_TUNNEL LEVEL_STAIRS LEVEL_COVE cd graphics_tunnel && make clean + cd graphics_stairs && make clean + cd graphics_cove && make clean diff --git a/games/riven_hgr/disk41_files/graphics_cove/Makefile b/games/riven_hgr/disk41_files/graphics_cove/Makefile new file mode 100644 index 00000000..ac48e778 --- /dev/null +++ b/games/riven_hgr/disk41_files/graphics_cove/Makefile @@ -0,0 +1,28 @@ +include ../../../../Makefile.inc + +ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f +PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr + +all: cove_graphics.inc + +cove_graphics.inc: \ + stairs_down2_e.hgr.zx02 stairs_down2_w.hgr.zx02 + echo "stairs_down2_e_zx02: .incbin \"stairs_down2_e.hgr.zx02\"" > cove_graphics.inc + echo "stairs_down2_w_zx02: .incbin \"stairs_down2_w.hgr.zx02\"" >> cove_graphics.inc + + + + +#### + +%.hgr: %.png + $(PNG_TO_HGR) $< > $@ + +%.hgr.zx02: %.hgr + $(ZX02) -f $< $@ + +#### + +clean: + rm -f *~ *.o *.lst *.zx02 *.hgr stairs_cove.inc + diff --git a/games/riven_hgr/disk41_files/graphics_cove/stairs_down2_e.png b/games/riven_hgr/disk41_files/graphics_cove/stairs_down2_e.png new file mode 100644 index 00000000..0bdd5a96 Binary files /dev/null and b/games/riven_hgr/disk41_files/graphics_cove/stairs_down2_e.png differ diff --git a/games/riven_hgr/disk41_files/graphics_cove/stairs_down2_w.png b/games/riven_hgr/disk41_files/graphics_cove/stairs_down2_w.png new file mode 100644 index 00000000..8987af21 Binary files /dev/null and b/games/riven_hgr/disk41_files/graphics_cove/stairs_down2_w.png differ diff --git a/games/riven_hgr/disk41_files/graphics_stairs/Makefile b/games/riven_hgr/disk41_files/graphics_stairs/Makefile new file mode 100644 index 00000000..5d6739f8 --- /dev/null +++ b/games/riven_hgr/disk41_files/graphics_stairs/Makefile @@ -0,0 +1,32 @@ +include ../../../../Makefile.inc + +ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f +PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr + +all: stairs_graphics.inc + +stairs_graphics.inc: \ + stairs_s.hgr.zx02 stairs_n.hgr.zx02 \ + stairs_e.hgr.zx02 stairs_w.hgr.zx02 \ + stairs_down1_e.hgr.zx02 stairs_down1_w.hgr.zx02 + echo "stairs_s_zx02: .incbin \"stairs_s.hgr.zx02\"" > stairs_graphics.inc + echo "stairs_n_zx02: .incbin \"stairs_n.hgr.zx02\"" >> stairs_graphics.inc + echo "stairs_e_zx02: .incbin \"stairs_e.hgr.zx02\"" >> stairs_graphics.inc + echo "stairs_w_zx02: .incbin \"stairs_w.hgr.zx02\"" >> stairs_graphics.inc + echo "stairs_down1_e_zx02: .incbin \"stairs_down1_e.hgr.zx02\"" >> stairs_graphics.inc + echo "stairs_down1_w_zx02: .incbin \"stairs_down1_w.hgr.zx02\"" >> stairs_graphics.inc + + +#### + +%.hgr: %.png + $(PNG_TO_HGR) $< > $@ + +%.hgr.zx02: %.hgr + $(ZX02) -f $< $@ + +#### + +clean: + rm -f *~ *.o *.lst *.zx02 *.hgr stairs_graphics.inc + diff --git a/games/riven_hgr/disk41_files/graphics_stairs/stairs_down1_e.png b/games/riven_hgr/disk41_files/graphics_stairs/stairs_down1_e.png new file mode 100644 index 00000000..37b2880d Binary files /dev/null and b/games/riven_hgr/disk41_files/graphics_stairs/stairs_down1_e.png differ diff --git a/games/riven_hgr/disk41_files/graphics_stairs/stairs_down1_w.png b/games/riven_hgr/disk41_files/graphics_stairs/stairs_down1_w.png new file mode 100644 index 00000000..7f26bf05 Binary files /dev/null and b/games/riven_hgr/disk41_files/graphics_stairs/stairs_down1_w.png differ diff --git a/games/riven_hgr/disk41_files/graphics_stairs/stairs_e.png b/games/riven_hgr/disk41_files/graphics_stairs/stairs_e.png new file mode 100644 index 00000000..15392af7 Binary files /dev/null and b/games/riven_hgr/disk41_files/graphics_stairs/stairs_e.png differ diff --git a/games/riven_hgr/disk41_files/graphics_stairs/stairs_n.png b/games/riven_hgr/disk41_files/graphics_stairs/stairs_n.png new file mode 100644 index 00000000..6cef41c2 Binary files /dev/null and b/games/riven_hgr/disk41_files/graphics_stairs/stairs_n.png differ diff --git a/games/riven_hgr/disk41_files/graphics_stairs/stairs_s.png b/games/riven_hgr/disk41_files/graphics_stairs/stairs_s.png new file mode 100644 index 00000000..0e87db93 Binary files /dev/null and b/games/riven_hgr/disk41_files/graphics_stairs/stairs_s.png differ diff --git a/games/riven_hgr/disk41_files/graphics_stairs/stairs_w.png b/games/riven_hgr/disk41_files/graphics_stairs/stairs_w.png new file mode 100644 index 00000000..2f9418e7 Binary files /dev/null and b/games/riven_hgr/disk41_files/graphics_stairs/stairs_w.png differ diff --git a/games/riven_hgr/disk41_files/level_cove.s b/games/riven_hgr/disk41_files/level_cove.s new file mode 100644 index 00000000..4fa62f3f --- /dev/null +++ b/games/riven_hgr/disk41_files/level_cove.s @@ -0,0 +1,107 @@ +; Riven -- Jungle Island -- Cove + +; by deater (Vince Weaver) + +; Zero Page + .include "../zp.inc" + .include "../hardware.inc" + .include "../common_defines.inc" + .include "../qload.inc" + .include "disk41_defines.inc" + +riven_jungle_cove: + + ;=================== + ; init screen + ;=================== + +; jsr TEXT +; jsr HOME + bit KEYRESET + + bit SET_GR + bit PAGE1 + bit HIRES + bit FULLGR + + ;======================== + ; set up location + ;======================== + + 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 + ;=================================== + + 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_cove/cove_graphics.inc" + +.include "leveldata_cove.inc" diff --git a/games/riven_hgr/disk41_files/level_stairs.s b/games/riven_hgr/disk41_files/level_stairs.s new file mode 100644 index 00000000..df9774a4 --- /dev/null +++ b/games/riven_hgr/disk41_files/level_stairs.s @@ -0,0 +1,107 @@ +; Riven -- Jungle Island -- Stairs + +; by deater (Vince Weaver) + +; Zero Page + .include "../zp.inc" + .include "../hardware.inc" + .include "../common_defines.inc" + .include "../qload.inc" + .include "disk41_defines.inc" + +riven_jungle_tunnel2: + + ;=================== + ; init screen + ;=================== + +; jsr TEXT +; jsr HOME + bit KEYRESET + + bit SET_GR + bit PAGE1 + bit HIRES + bit FULLGR + + ;======================== + ; set up location + ;======================== + + 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 + ;=================================== + + 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_stairs/stairs_graphics.inc" + +.include "leveldata_stairs.inc" diff --git a/games/riven_hgr/disk41_files/leveldata_cove.inc b/games/riven_hgr/disk41_files/leveldata_cove.inc new file mode 100644 index 00000000..11939e97 --- /dev/null +++ b/games/riven_hgr/disk41_files/leveldata_cove.inc @@ -0,0 +1,23 @@ +;=============================================== +; level data for Jungle Cove +;=============================================== + +locations: + .word location0 + +; RIVEN_DOWN2 -- down two flights of stairs +location0: + .byte $ff ; north exit + .byte $ff ; south exit + .byte $ff ; east exit + .byte LOAD_STAIRS<<4|RIVEN_DOWN1 ; 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 stairs_down2_e_zx02 ; east bg + .word stairs_down2_w_zx02 ; west bg + .byte BG_EAST|BG_WEST + .byte $ff ; special exit diff --git a/games/riven_hgr/disk41_files/leveldata_stairs.inc b/games/riven_hgr/disk41_files/leveldata_stairs.inc new file mode 100644 index 00000000..5860323a --- /dev/null +++ b/games/riven_hgr/disk41_files/leveldata_stairs.inc @@ -0,0 +1,40 @@ +;=============================================== +; level data for Jungle stair +;=============================================== + +locations: + .word location0,location1 + +; RIVEN_STAIRS -- mid-stairs +location0: + .byte LOAD_TUNNEL2<<4|RIVEN_TUNNEL8; north exit + .byte $FF ; south exit + .byte RIVEN_DOWN1 ; east exit + .byte $FF ; west exit + .byte DIRECTION_N ; north exit_dir + .byte $ff ; south exit_dir + .byte DIRECTION_E ; east exit_dir + .byte DIRECTION_W ; west exit_dir + .word stairs_n_zx02 ; north bg + .word stairs_s_zx02 ; south bg + .word stairs_e_zx02 ; east bg + .word stairs_w_zx02 ; west bg + .byte BG_NORTH|BG_SOUTH|BG_EAST|BG_WEST + .byte $ff ; special exit + +; RIVEN_DOWN1 -- down one flight of stairs +location1: + .byte $ff ; north exit + .byte $ff ; south exit + .byte LOAD_COVE<<4|RIVEN_DOWN2 ; east exit + .byte RIVEN_STAIRS ; 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 stairs_down1_e_zx02 ; east bg + .word stairs_down1_w_zx02 ; west bg + .byte BG_EAST|BG_WEST + .byte $ff ; special exit