diff --git a/games/riven_hgr/Makefile b/games/riven_hgr/Makefile index f304e500..c94b9c3d 100644 --- a/games/riven_hgr/Makefile +++ b/games/riven_hgr/Makefile @@ -71,7 +71,8 @@ riven_disk41.dsk: QBOOT QLOAD TITLE_41 \ disk41_files/DISK41 \ disk41_files/LEVEL_TUNNEL \ disk41_files/LEVEL_STAIRS \ - disk41_files/LEVEL_COVE + disk41_files/LEVEL_COVE \ + disk41_files/LEVEL_STAIRS2 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 @@ -82,6 +83,7 @@ riven_disk41.dsk: QBOOT QLOAD TITLE_41 \ $(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 + $(DOS33_RAW) riven_disk41.dsk 25 0 disk41_files/LEVEL_STAIRS2 0 0 riven_disk43.dsk: QBOOT QLOAD TITLE_43 \ diff --git a/games/riven_hgr/NOTES b/games/riven_hgr/NOTES index 0cf31da1..abc2f4e8 100644 --- a/games/riven_hgr/NOTES +++ b/games/riven_hgr/NOTES @@ -72,7 +72,8 @@ 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) +T 17 = COVE 18337 = 8T (32768) +T 25 = STAIRS2 24965 = 7T (28672) Disk43 Map (disk has 35 tracks, each 4k in size) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/games/riven_hgr/disk39_files/movie_maglev_ride.s b/games/riven_hgr/disk39_files/movie_maglev_ride.s index 87c51fca..78f487b8 100644 --- a/games/riven_hgr/disk39_files/movie_maglev_ride.s +++ b/games/riven_hgr/disk39_files/movie_maglev_ride.s @@ -172,8 +172,6 @@ done_play_movie2: ; TODO: complex handle movement at end - ; TODO: end with message - ;=============================== ; wait 9 frames (1.8s?) @@ -181,27 +179,36 @@ done_play_movie2: jsr wait_50xms - lda #end_message - sta ZX0_src+1 - - lda #$04 - - jsr full_decomp + ;================================ + ; indicate level over and return + lda #$00 + sta DRAW_PAGE bit PAGE1 - bit SET_TEXT + + lda #$E0|$00 + sta LEVEL_OVER + rts -done_movie2: - bit KEYRESET +; lda #end_message +; sta ZX0_src+1 +; lda #$04 +; jsr full_decomp +; bit PAGE1 +; bit SET_TEXT -forever_and_ever: - jmp forever_and_ever +;done_movie2: +; bit KEYRESET +; +;forever_and_ever: +; jmp forever_and_ever ; jmp movie2_start - rts +; rts + @@ -614,5 +621,5 @@ overlays_combined_zx02: .incbin "movie_maglev_ride/overlays/overlay_combined.zx02" -end_message: - .incbin "end_message/end_message.gr.zx02" +;end_message: +; .incbin "end_message/end_message.gr.zx02" diff --git a/games/riven_hgr/disk41_files/Makefile b/games/riven_hgr/disk41_files/Makefile index 06380d69..e6271697 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 LEVEL_STAIRS LEVEL_COVE +all: DISK41 LEVEL_TUNNEL LEVEL_STAIRS LEVEL_COVE LEVEL_STAIRS2 ### @@ -39,6 +39,19 @@ level_stairs.o: level_stairs.s \ #### +LEVEL_STAIRS2: level_stairs2.o + ld65 -o LEVEL_STAIRS2 level_stairs2.o -C $(LINKER_SCRIPTS)/apple2_4000.inc + +level_stairs2.o: level_stairs2.s \ + ../zp.inc ../hardware.inc ../qload.inc \ + ../common_defines.inc disk41_defines.inc \ + leveldata_stairs2.inc \ + graphics_stairs2/stairs2_graphics.inc + ca65 -o level_stairs2.o level_stairs2.s -l level_stairs2.lst + + +#### + LEVEL_COVE: level_cove.o ld65 -o LEVEL_COVE level_cove.o -C $(LINKER_SCRIPTS)/apple2_4000.inc @@ -59,6 +72,9 @@ graphics_tunnel/tunnel_graphics.inc: graphics_stairs/stairs_graphics.inc: cd graphics_stairs && make +graphics_stairs2/stairs2_graphics.inc: + cd graphics_stairs2 && make + graphics_cove/cove_graphics.inc: cd graphics_cove && make @@ -66,15 +82,15 @@ graphics_cove/cove_graphics.inc: clean: rm -f *~ *.o *.lst \ - DISK41 LEVEL_TUNNEL LEVEL_STAIRS LEVEL_COVE + DISK41 LEVEL_TUNNEL LEVEL_STAIRS LEVEL_COVE LEVEL_STAIRS2 #### distclean: rm -f *~ *.o *.lst \ - DISK41 LEVEL_TUNNEL LEVEL_STAIRS LEVEL_COVE + DISK41 LEVEL_TUNNEL LEVEL_STAIRS LEVEL_COVE LEVEL_STAIRS2 cd graphics_tunnel && make clean cd graphics_stairs && make clean cd graphics_cove && make clean - + cd graphics_stairs2 && make clean diff --git a/games/riven_hgr/disk41_files/graphics_cove/Makefile b/games/riven_hgr/disk41_files/graphics_cove/Makefile index ac48e778..fb50b2fb 100644 --- a/games/riven_hgr/disk41_files/graphics_cove/Makefile +++ b/games/riven_hgr/disk41_files/graphics_cove/Makefile @@ -6,12 +6,12 @@ PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr all: cove_graphics.inc cove_graphics.inc: \ - stairs_down2_e.hgr.zx02 stairs_down2_w.hgr.zx02 + stairs_down2_e.hgr.zx02 stairs_down2_w.hgr.zx02 \ + cove_e.hgr.zx02 cove_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 - - - + echo "cove_e_zx02: .incbin \"cove_e.hgr.zx02\"" >> cove_graphics.inc + echo "cove_w_zx02: .incbin \"cove_w.hgr.zx02\"" >> cove_graphics.inc #### diff --git a/games/riven_hgr/disk41_files/graphics_cove/cove_e.png b/games/riven_hgr/disk41_files/graphics_cove/cove_e.png new file mode 100644 index 00000000..773c5c17 Binary files /dev/null and b/games/riven_hgr/disk41_files/graphics_cove/cove_e.png differ diff --git a/games/riven_hgr/disk41_files/graphics_cove/cove_w.png b/games/riven_hgr/disk41_files/graphics_cove/cove_w.png new file mode 100644 index 00000000..1cf10282 Binary files /dev/null and b/games/riven_hgr/disk41_files/graphics_cove/cove_w.png differ diff --git a/games/riven_hgr/disk41_files/graphics_stairs2/Makefile b/games/riven_hgr/disk41_files/graphics_stairs2/Makefile new file mode 100644 index 00000000..904bae9d --- /dev/null +++ b/games/riven_hgr/disk41_files/graphics_stairs2/Makefile @@ -0,0 +1,31 @@ +include ../../../../Makefile.inc + +ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f +PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr + +all: stairs2_graphics.inc + +stairs2_graphics.inc: \ + stairs_up1_e.hgr.zx02 stairs_up1_w.hgr.zx02 \ + stairs_up2_e.hgr.zx02 stairs_up2_w.hgr.zx02 \ + stairs_up3_e.hgr.zx02 stairs_up3_w.hgr.zx02 + echo "stairs_up1_e_zx02: .incbin \"stairs_up1_e.hgr.zx02\"" > stairs2_graphics.inc + echo "stairs_up1_w_zx02: .incbin \"stairs_up1_w.hgr.zx02\"" >> stairs2_graphics.inc + echo "stairs_up2_e_zx02: .incbin \"stairs_up2_e.hgr.zx02\"" >> stairs2_graphics.inc + echo "stairs_up2_w_zx02: .incbin \"stairs_up2_w.hgr.zx02\"" >> stairs2_graphics.inc + echo "stairs_up3_e_zx02: .incbin \"stairs_up3_e.hgr.zx02\"" >> stairs2_graphics.inc + echo "stairs_up3_w_zx02: .incbin \"stairs_up3_w.hgr.zx02\"" >> stairs2_graphics.inc + +#### + +%.hgr: %.png + $(PNG_TO_HGR) $< > $@ + +%.hgr.zx02: %.hgr + $(ZX02) -f $< $@ + +#### + +clean: + rm -f *~ *.o *.lst *.zx02 *.hgr stairs2_graphics.inc + diff --git a/games/riven_hgr/disk41_files/graphics_stairs2/stairs_up1_e.png b/games/riven_hgr/disk41_files/graphics_stairs2/stairs_up1_e.png new file mode 100644 index 00000000..0036e8b2 Binary files /dev/null and b/games/riven_hgr/disk41_files/graphics_stairs2/stairs_up1_e.png differ diff --git a/games/riven_hgr/disk41_files/graphics_stairs2/stairs_up1_w.png b/games/riven_hgr/disk41_files/graphics_stairs2/stairs_up1_w.png new file mode 100644 index 00000000..c838a755 Binary files /dev/null and b/games/riven_hgr/disk41_files/graphics_stairs2/stairs_up1_w.png differ diff --git a/games/riven_hgr/disk41_files/graphics_stairs2/stairs_up2_e.png b/games/riven_hgr/disk41_files/graphics_stairs2/stairs_up2_e.png new file mode 100644 index 00000000..f2505343 Binary files /dev/null and b/games/riven_hgr/disk41_files/graphics_stairs2/stairs_up2_e.png differ diff --git a/games/riven_hgr/disk41_files/graphics_stairs2/stairs_up2_w.png b/games/riven_hgr/disk41_files/graphics_stairs2/stairs_up2_w.png new file mode 100644 index 00000000..57fa77e9 Binary files /dev/null and b/games/riven_hgr/disk41_files/graphics_stairs2/stairs_up2_w.png differ diff --git a/games/riven_hgr/disk41_files/graphics_stairs2/stairs_up3_e.png b/games/riven_hgr/disk41_files/graphics_stairs2/stairs_up3_e.png new file mode 100644 index 00000000..c1c359fc Binary files /dev/null and b/games/riven_hgr/disk41_files/graphics_stairs2/stairs_up3_e.png differ diff --git a/games/riven_hgr/disk41_files/graphics_stairs2/stairs_up3_w.png b/games/riven_hgr/disk41_files/graphics_stairs2/stairs_up3_w.png new file mode 100644 index 00000000..39e633f8 Binary files /dev/null and b/games/riven_hgr/disk41_files/graphics_stairs2/stairs_up3_w.png differ diff --git a/games/riven_hgr/disk41_files/level_stairs2.s b/games/riven_hgr/disk41_files/level_stairs2.s new file mode 100644 index 00000000..667f01ed --- /dev/null +++ b/games/riven_hgr/disk41_files/level_stairs2.s @@ -0,0 +1,107 @@ +; Riven -- Jungle Island -- Stairs going up + +; 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_stairs2: + + ;=================== + ; 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_stairs2/stairs2_graphics.inc" + +.include "leveldata_stairs2.inc" diff --git a/games/riven_hgr/disk41_files/leveldata_cove.inc b/games/riven_hgr/disk41_files/leveldata_cove.inc index 11939e97..340701fb 100644 --- a/games/riven_hgr/disk41_files/leveldata_cove.inc +++ b/games/riven_hgr/disk41_files/leveldata_cove.inc @@ -3,13 +3,13 @@ ;=============================================== locations: - .word location0 + .word location0,location1 ; RIVEN_DOWN2 -- down two flights of stairs location0: .byte $ff ; north exit .byte $ff ; south exit - .byte $ff ; east exit + .byte RIVEN_COVE ; east exit .byte LOAD_STAIRS<<4|RIVEN_DOWN1 ; west exit .byte $ff ; north exit_dir .byte $ff ; south exit_dir @@ -21,3 +21,21 @@ location0: .word stairs_down2_w_zx02 ; west bg .byte BG_EAST|BG_WEST .byte $ff ; special exit + +; RIVEN_COVE -- down by the cove +location1: + .byte $ff ; north exit + .byte $ff ; south exit + .byte $ff ; east exit + .byte RIVEN_DOWN2 ; 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 cove_e_zx02 ; east bg + .word cove_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 index 5860323a..0472de9c 100644 --- a/games/riven_hgr/disk41_files/leveldata_stairs.inc +++ b/games/riven_hgr/disk41_files/leveldata_stairs.inc @@ -10,7 +10,7 @@ location0: .byte LOAD_TUNNEL2<<4|RIVEN_TUNNEL8; north exit .byte $FF ; south exit .byte RIVEN_DOWN1 ; east exit - .byte $FF ; west exit + .byte LOAD_STAIRS2<<4|RIVEN_UP1 ; west exit .byte DIRECTION_N ; north exit_dir .byte $ff ; south exit_dir .byte DIRECTION_E ; east exit_dir diff --git a/games/riven_hgr/disk41_files/leveldata_stairs2.inc b/games/riven_hgr/disk41_files/leveldata_stairs2.inc new file mode 100644 index 00000000..e215af9f --- /dev/null +++ b/games/riven_hgr/disk41_files/leveldata_stairs2.inc @@ -0,0 +1,58 @@ +;=============================================== +; level data for Jungle stair going up +;=============================================== + +locations: + .word location0,location1,location2 + +; RIVEN_UP1 -- going up +location0: + .byte $ff ; north exit + .byte $FF ; south exit + .byte LOAD_STAIRS<<4|RIVEN_STAIRS ; east exit + .byte RIVEN_UP2 ; 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_up1_e_zx02 ; east bg + .word stairs_up1_w_zx02 ; west bg + .byte BG_EAST|BG_WEST + .byte $ff ; special exit + +; RIVEN_UP2 -- going up +location1: + .byte $ff ; north exit + .byte $FF ; south exit + .byte RIVEN_UP1 ; east exit + .byte RIVEN_UP3 ; 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_up2_e_zx02 ; east bg + .word stairs_up2_w_zx02 ; west bg + .byte BG_EAST|BG_WEST + .byte $ff ; special exit + +; RIVEN_UP3 -- going up +location2: + .byte $ff ; north exit + .byte $FF ; south exit + .byte RIVEN_UP2 ; east exit + .byte $FF ; 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_up3_e_zx02 ; east bg + .word stairs_up3_w_zx02 ; west bg + .byte BG_EAST|BG_WEST + .byte $ff ; special exit +