diff --git a/games/riven_hgr/Makefile b/games/riven_hgr/Makefile index e383bc3d..2f0c4041 100644 --- a/games/riven_hgr/Makefile +++ b/games/riven_hgr/Makefile @@ -69,7 +69,8 @@ riven_disk02.dsk: QBOOT QLOAD TITLE_02 \ disk02_files/DISK02 \ disk02_files/LEVEL_STEPS1 \ disk02_files/LEVEL_STEPS3 \ - disk02_files/LEVEL_TOP + disk02_files/LEVEL_TOP \ + disk02_files/LEVEL_BRIDGE cp $(EMPTY_DISK)/empty.dsk riven_disk02.dsk $(DOS33_RAW) riven_disk02.dsk 0 0 QBOOT 0 1 $(DOS33_RAW) riven_disk02.dsk 0 2 QBOOT 1 1 @@ -80,6 +81,8 @@ riven_disk02.dsk: QBOOT QLOAD TITLE_02 \ $(DOS33_RAW) riven_disk02.dsk 2 0 disk02_files/LEVEL_STEPS1 0 0 $(DOS33_RAW) riven_disk02.dsk 8 0 disk02_files/LEVEL_STEPS3 0 0 $(DOS33_RAW) riven_disk02.dsk 14 0 disk02_files/LEVEL_TOP 0 0 + $(DOS33_RAW) riven_disk02.dsk 20 0 disk02_files/LEVEL_BRIDGE 0 0 + ### @@ -524,6 +527,9 @@ disk02_files/LEVEL_STEPS3: disk02_files/LEVEL_TOP: cd disk02_files && make +disk02_files/LEVEL_BRIDGE: + cd disk02_files && make + #### disk03_files/LEVEL_DOWNSTEPS: @@ -734,6 +740,7 @@ riven_hgr.2mg: dts_block PROBOOTHD QLOAD_HD \ disk02_files/LEVEL_STEPS1 \ disk02_files/LEVEL_STEPS3 \ disk02_files/LEVEL_TOP \ + disk02_files/LEVEL_BRIDGE \ disk03_files/DISK03 \ disk03_files/LEVEL_DOWNSTEPS \ disk03_files/LEVEL_DOWNSTEPS3 \ @@ -799,6 +806,7 @@ riven_hgr.2mg: dts_block PROBOOTHD QLOAD_HD \ $(PRODOS_RAW) riven_hgr.2mg `./dts_block 2 2 0` disk02_files/LEVEL_STEPS1 0 0 $(PRODOS_RAW) riven_hgr.2mg `./dts_block 2 8 0` disk02_files/LEVEL_STEPS3 0 0 $(PRODOS_RAW) riven_hgr.2mg `./dts_block 2 14 0` disk02_files/LEVEL_TOP 0 0 + $(PRODOS_RAW) riven_hgr.2mg `./dts_block 2 20 0` disk02_files/LEVEL_BRIDGE 0 0 $(PRODOS_RAW) riven_hgr.2mg `./dts_block 3 0 2` disk03_files/DISK03 0 0 $(PRODOS_RAW) riven_hgr.2mg `./dts_block 3 2 0` disk03_files/LEVEL_DOWNSTEPS 0 0 $(PRODOS_RAW) riven_hgr.2mg `./dts_block 3 8 0` disk03_files/LEVEL_DOWNSTEPS3 0 0 diff --git a/games/riven_hgr/NOTES b/games/riven_hgr/NOTES index 94a26744..b74c0ac7 100644 --- a/games/riven_hgr/NOTES +++ b/games/riven_hgr/NOTES @@ -88,6 +88,7 @@ T 1 = QLOAD 2314 bytes 16S= 1T0S (4096) 2k free T 2 = STEPS1 21647 bytes = 6T0S (24576) 3k free T 8 = STEPS3 15872 bytes = 6T0S (24576) 9k free T 14 = TOP 15658 bytes = 6T0S (24576) 9k free +T 20 = BRIDGE 15021 bytes = 6T0S (24575) 9k free Disk03 Map (disk has 35 tracks, each 4k in size) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/games/riven_hgr/disk02_files/Makefile b/games/riven_hgr/disk02_files/Makefile index 696971ba..6214944a 100644 --- a/games/riven_hgr/disk02_files/Makefile +++ b/games/riven_hgr/disk02_files/Makefile @@ -2,7 +2,7 @@ include ../../../Makefile.inc LINKER_SCRIPTS = ../../../linker_scripts/ -all: DISK02 LEVEL_STEPS1 LEVEL_STEPS3 LEVEL_TOP +all: DISK02 LEVEL_STEPS1 LEVEL_STEPS3 LEVEL_TOP LEVEL_BRIDGE #### @@ -51,6 +51,19 @@ level_top.o: level_top.s \ #### +LEVEL_BRIDGE: level_bridge.o + ld65 -o LEVEL_BRIDGE level_bridge.o -C $(LINKER_SCRIPTS)/apple2_4000.inc + +level_bridge.o: level_bridge.s \ + ../zp.inc ../hardware.inc ../qload.inc \ + ../common_defines.inc disk02_defines.inc \ + leveldata_bridge.inc \ + graphics_bridge/bridge_graphics.inc + ca65 -o level_bridge.o level_bridge.s -l level_bridge.lst + + +#### + graphics_steps1/steps1_graphics.inc: cd graphics_steps1 && make @@ -60,20 +73,24 @@ graphics_steps3/steps3_graphics.inc: graphics_top/top_graphics.inc: cd graphics_top && make +graphics_bridge/bridge_graphics.inc: + cd graphics_bridge && make + #### clean: rm -f *~ *.o *.lst \ - LEVEL_STEPS1 LEVEL_STEPS3 LEVEL_TOP + LEVEL_STEPS1 LEVEL_STEPS3 LEVEL_TOP LEVEL_BRIDGE #### distclean: rm -f *~ *.o *.lst \ - LEVEL_STEPS1 LEVEL_STEPS3 LEVEL_TOP + LEVEL_STEPS1 LEVEL_STEPS3 LEVEL_TOP LEVEL_BRIDGE cd graphics_steps1 && make clean cd graphics_steps3 && make clean cd graphics_top && make clean + cd graphics_bridge && make clean diff --git a/games/riven_hgr/disk02_files/disk02.s b/games/riven_hgr/disk02_files/disk02.s index 9e630607..08c3c447 100644 --- a/games/riven_hgr/disk02_files/disk02.s +++ b/games/riven_hgr/disk02_files/disk02.s @@ -12,19 +12,19 @@ which_disk_bin: load_address_array: .byte $40,$40,$40,$40 ; TITLE, STEPS1, STEPS3, TOP - .byte $40,$40,$40,$40 ; + .byte $40,$40,$40,$40 ; BRIDGE track_array: .byte 0, 2, 8,14 ; TITLE, STEPS1, STEPS3, TOP - .byte 20,0,0,0 ; + .byte 20,0,0,0 ; BRIDGE sector_array: .byte 8, 0, 0, 0 ; TITLE, STEPS1, STEPS3, TOP - .byte 0,0,0,0 ; + .byte 0,0,0,0 ; BRIDGE length_array: .byte 8, 96,96,96 ; TITLE, STEPS1, STEPS3, TOP - .byte 80,0,0,0 ; + .byte 96,0,0,0 ; ; disk 1 diff --git a/games/riven_hgr/disk02_files/disk02_defines.inc b/games/riven_hgr/disk02_files/disk02_defines.inc index 65a87a79..d79491a0 100644 --- a/games/riven_hgr/disk02_files/disk02_defines.inc +++ b/games/riven_hgr/disk02_files/disk02_defines.inc @@ -2,6 +2,7 @@ LOAD_TITLE_02 = 0 LOAD_STEPS1 = 1 LOAD_STEPS3 = 2 LOAD_TOP = 3 +LOAD_BRIDGE = 4 ;================================ ; Level definitions @@ -21,3 +22,6 @@ RIVEN_STEPS4 = 1 RIVEN_TOP = 0 RIVEN_ALCOVE = 1 +; BRIDGE +RIVEN_BRIDGE = 0 + diff --git a/games/riven_hgr/disk02_files/graphics_bridge/Makefile b/games/riven_hgr/disk02_files/graphics_bridge/Makefile new file mode 100644 index 00000000..e44da17d --- /dev/null +++ b/games/riven_hgr/disk02_files/graphics_bridge/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: bridge_graphics.inc + +bridge_graphics.inc: \ + bridge_n.hgr.zx02 bridge_s.hgr.zx02 bridge_e.hgr.zx02 bridge_w.hgr.zx02 + echo "bridge_n_zx02: .incbin \"bridge_n.hgr.zx02\"" > bridge_graphics.inc + echo "bridge_s_zx02: .incbin \"bridge_s.hgr.zx02\"" >> bridge_graphics.inc + echo "bridge_e_zx02: .incbin \"bridge_e.hgr.zx02\"" >> bridge_graphics.inc + echo "bridge_w_zx02: .incbin \"bridge_w.hgr.zx02\"" >> bridge_graphics.inc + + +#### + +%.hgr: %.png + $(PNG_TO_HGR) $< > $@ + +%.hgr.zx02: %.hgr + $(ZX02) -f $< $@ + +#### + +clean: + rm -f *~ *.o *.lst *.zx02 *.hgr bridge_graphics.inc + diff --git a/games/riven_hgr/disk02_files/graphics_bridge/bridge_e.png b/games/riven_hgr/disk02_files/graphics_bridge/bridge_e.png new file mode 100644 index 00000000..a06d437b Binary files /dev/null and b/games/riven_hgr/disk02_files/graphics_bridge/bridge_e.png differ diff --git a/games/riven_hgr/disk02_files/graphics_bridge/bridge_n.png b/games/riven_hgr/disk02_files/graphics_bridge/bridge_n.png new file mode 100644 index 00000000..89a458d6 Binary files /dev/null and b/games/riven_hgr/disk02_files/graphics_bridge/bridge_n.png differ diff --git a/games/riven_hgr/disk02_files/graphics_bridge/bridge_s.png b/games/riven_hgr/disk02_files/graphics_bridge/bridge_s.png new file mode 100644 index 00000000..223055a8 Binary files /dev/null and b/games/riven_hgr/disk02_files/graphics_bridge/bridge_s.png differ diff --git a/games/riven_hgr/disk02_files/graphics_bridge/bridge_w.png b/games/riven_hgr/disk02_files/graphics_bridge/bridge_w.png new file mode 100644 index 00000000..cc19bfaf Binary files /dev/null and b/games/riven_hgr/disk02_files/graphics_bridge/bridge_w.png differ diff --git a/games/riven_hgr/disk02_files/level_bridge.s b/games/riven_hgr/disk02_files/level_bridge.s new file mode 100644 index 00000000..5f5dfee2 --- /dev/null +++ b/games/riven_hgr/disk02_files/level_bridge.s @@ -0,0 +1,113 @@ +; Riven -- First segment of bridge + +; by deater (Vince Weaver) + +; Zero Page + .include "../zp.inc" + .include "../hardware.inc" + .include "../common_defines.inc" + .include "../qload.inc" + .include "disk02_defines.inc" + +bridge_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_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_bridge/bridge_graphics.inc" + +.include "leveldata_bridge.inc" diff --git a/games/riven_hgr/disk02_files/leveldata_bridge.inc b/games/riven_hgr/disk02_files/leveldata_bridge.inc new file mode 100644 index 00000000..806fab53 --- /dev/null +++ b/games/riven_hgr/disk02_files/leveldata_bridge.inc @@ -0,0 +1,23 @@ +;=============================================== +; level data for top of steps +;=============================================== + +locations: + .word location0 + +; RIVEN_BRIDGE -- first part of bridge +location0: + .byte $ff ; north exit + .byte LOAD_STEPS3<<4|RIVEN_STEPS4 ; south exit + .byte $E2 ; east exit + .byte LOAD_TOP<<4|RIVEN_TOP ; west exit + .byte $00 ; north exit_dir + .byte $00 ; south exit_dir + .byte DIRECTION_E ; east exit_dir + .byte DIRECTION_W ; west exit_dir + .word bridge_n_zx02 ; north bg + .word bridge_s_zx02 ; south bg + .word bridge_e_zx02 ; east bg + .word bridge_w_zx02 ; west bg + .byte BG_NORTH|BG_SOUTH|BG_EAST|BG_WEST ; all bgs + .byte $ff ; special exit diff --git a/games/riven_hgr/disk02_files/leveldata_top.inc b/games/riven_hgr/disk02_files/leveldata_top.inc index b4bfc675..f4b42cfb 100644 --- a/games/riven_hgr/disk02_files/leveldata_top.inc +++ b/games/riven_hgr/disk02_files/leveldata_top.inc @@ -9,7 +9,7 @@ locations: location0: .byte $E1 ; north exit .byte LOAD_STEPS3<<4|RIVEN_STEPS4 ; south exit - .byte $E2 ; east exit + .byte LOAD_BRIDGE<<4|RIVEN_BRIDGE ; east exit .byte RIVEN_ALCOVE ; west exit .byte DIRECTION_N ; north exit_dir .byte DIRECTION_S ; south exit_dir diff --git a/games/riven_hgr/disk04_files/disk04.s b/games/riven_hgr/disk04_files/disk04.s index e5797749..8a5ef660 100644 --- a/games/riven_hgr/disk04_files/disk04.s +++ b/games/riven_hgr/disk04_files/disk04.s @@ -53,12 +53,12 @@ disk_exit_dni_l: ; disk_exit_load: - .byte LOAD_TOP + .byte LOAD_BRIDGE .byte LOAD_PROJECTOR .byte LOAD_CHAIR .byte LOAD_CYAN disk_exit_level: - .byte RIVEN_TOP + .byte RIVEN_BRIDGE .byte RIVEN_PROJECTOR .byte RIVEN_CHAIR .byte 0