From 755bc7b075cd75c014584e78e6236598498455b2 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sat, 22 Jun 2024 00:28:30 -0400 Subject: [PATCH] riven: re-arrange disk40 files to make room --- games/riven_hgr/Makefile | 5 ++- games/riven_hgr/NOTES | 6 ++- games/riven_hgr/disk40_files/disk40.s | 16 +++---- .../riven_hgr/disk40_files/disk40_defines.inc | 13 +++--- .../disk40_files/graphics_maglev/Makefile | 3 ++ .../out_path_e.png | Bin .../out_path_w.png | Bin .../disk40_files/graphics_outside/Makefile | 8 ++-- games/riven_hgr/disk40_files/level_orb.s | 26 +++++++++++ .../disk40_files/leveldata_maglev.inc | 21 ++++++++- .../disk40_files/leveldata_outside.inc | 42 +++++++++--------- 11 files changed, 94 insertions(+), 46 deletions(-) rename games/riven_hgr/disk40_files/{graphics_outside => graphics_maglev}/out_path_e.png (100%) rename games/riven_hgr/disk40_files/{graphics_outside => graphics_maglev}/out_path_w.png (100%) diff --git a/games/riven_hgr/Makefile b/games/riven_hgr/Makefile index ee3bd5f2..d6e0adab 100644 --- a/games/riven_hgr/Makefile +++ b/games/riven_hgr/Makefile @@ -61,8 +61,9 @@ riven_disk40.dsk: QBOOT QLOAD TITLE_40 \ $(DOS33_RAW) riven_disk40.dsk 1 0 QLOAD 0 0 $(DOS33_RAW) riven_disk40.dsk 1 9 TITLE_40 0 0 $(DOS33_RAW) riven_disk40.dsk 2 0 disk40_files/LEVEL_MAGLEV 0 0 - $(DOS33_RAW) riven_disk40.dsk 9 0 disk40_files/LEVEL_OUTSIDE 0 0 - $(DOS33_RAW) riven_disk40.dsk 17 0 disk40_files/LEVEL_ORB 0 0 + $(DOS33_RAW) riven_disk40.dsk 10 0 disk40_files/LEVEL_OUTSIDE 0 0 +# $(DOS33_RAW) riven_disk40.dsk 15 0 disk40_files/LEVEL_TUNNEL 0 0 + $(DOS33_RAW) riven_disk40.dsk 21 0 disk40_files/LEVEL_ORB 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 d37081dd..42b5c6af 100644 --- a/games/riven_hgr/NOTES +++ b/games/riven_hgr/NOTES @@ -58,8 +58,10 @@ Disk40 Map (disk has 35 tracks, each 4k in size) 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 = MAGLEV 15200 bytes 112S = 7T0S (28672) 13k free -T 9 = OUTSIDE +T 2 = MAGLEV 30502 bytes = 8T11S (32768) 2k free +T 10 = OUTSIDE 18917 bytes = 5T (20480) 2k free +T 15 = TUNNEL = 6T +T 21 = ORB 13710 bytes 54S= 3T6S (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 diff --git a/games/riven_hgr/disk40_files/disk40.s b/games/riven_hgr/disk40_files/disk40.s index 6ce41907..8ae71768 100644 --- a/games/riven_hgr/disk40_files/disk40.s +++ b/games/riven_hgr/disk40_files/disk40.s @@ -4,20 +4,20 @@ which_disk: .byte $40 ; BCD load_address_array: - .byte $40,$40,$40,$40 ; TITLE, MAGLEV, OUTSIDE, ORB - .byte $00,$00,$00,$00 + .byte $40,$40,$40,$40 ; TITLE, MAGLEV, OUTSIDE, TUNNEL + .byte $40,$00,$00,$00 ; ORB track_array: - .byte 1, 2, 9,17 ; TITLE, MAGLEV, OUTSIDE, ORB - .byte 0, 0, 0, 0 + .byte 1, 2,10,15 ; TITLE, MAGLEV, OUTSIDE, TUNNEL + .byte 21, 0, 0, 0 ; ORB sector_array: - .byte 9, 0, 0, 0 ; TITLE, MAGLEV, OUTSIDE, ORB - .byte 0,0,0,0 + .byte 9, 0, 0, 0 ; TITLE, MAGLEV, OUTSIDE, TUNNEL + .byte 0,0,0,0 ; ORB length_array: - .byte 8, 96,112, 64 ; TITLE, MAGLEV, OUTSIDE, ORB - .byte 0,0,0,0 + .byte 8, 128, 80, 64 ; TITLE, MAGLEV, OUTSIDE, TUNNEL + .byte 64,0,0,0 ; ORB disk_exit_disk: ; note: BCD (yes I'm lazy) .byte $43 ; CART (DISK43) diff --git a/games/riven_hgr/disk40_files/disk40_defines.inc b/games/riven_hgr/disk40_files/disk40_defines.inc index 0119e292..4c35189c 100644 --- a/games/riven_hgr/disk40_files/disk40_defines.inc +++ b/games/riven_hgr/disk40_files/disk40_defines.inc @@ -1,9 +1,10 @@ LOAD_TITLE = 0 LOAD_MAGLEV = 1 LOAD_OUTSIDE = 2 -LOAD_ORB = 3 -LOAD_MOVIE1 = 4 -LOAD_MOVIE2 = 5 +LOAD_TUNNEL = 3 +LOAD_ORB = 4 +LOAD_MOVIE1 = 5 +LOAD_MOVIE2 = 6 ;================================ ; Level definitions @@ -14,12 +15,12 @@ RIVEN_LOOKIN = 0 RIVEN_INSEAT = 1 RIVEN_READYTOGO = 2 RIVEN_OUTSIDE = 3 +RIVEN_OUTSIDE_PATH = 4 ; Outside -RIVEN_OUTSIDE_PATH = 0 -RIVEN_OUTSIDE_PLAZA = 1 -RIVEN_CAVE_ENTRANCE = 2 +RIVEN_OUTSIDE_PLAZA = 0 +RIVEN_CAVE_ENTRANCE = 1 ; Orb diff --git a/games/riven_hgr/disk40_files/graphics_maglev/Makefile b/games/riven_hgr/disk40_files/graphics_maglev/Makefile index c3163b46..d1518cb2 100644 --- a/games/riven_hgr/disk40_files/graphics_maglev/Makefile +++ b/games/riven_hgr/disk40_files/graphics_maglev/Makefile @@ -8,11 +8,14 @@ all: maglev_graphics.inc maglev_graphics.inc: \ inseat_s.hgr.zx02 inseat_w.hgr.zx02 inseat_e.hgr.zx02 \ lookin_w.hgr.zx02 \ + out_path_e.hgr.zx02 out_path_w.hgr.zx02 \ outside_w.hgr.zx02 outside_n.hgr.zx02 echo "inseat_s_zx02: .incbin \"inseat_s.hgr.zx02\"" > maglev_graphics.inc echo "inseat_w_zx02: .incbin \"inseat_w.hgr.zx02\"" >> maglev_graphics.inc echo "inseat_e_zx02: .incbin \"inseat_e.hgr.zx02\"" >> maglev_graphics.inc echo "lookin_w_zx02: .incbin \"lookin_w.hgr.zx02\"" >> maglev_graphics.inc + echo "out_path_w_zx02: .incbin \"out_path_w.hgr.zx02\"" >> maglev_graphics.inc + echo "out_path_e_zx02: .incbin \"out_path_e.hgr.zx02\"" >> maglev_graphics.inc echo "outside_w_zx02: .incbin \"outside_w.hgr.zx02\"" >> maglev_graphics.inc echo "outside_n_zx02: .incbin \"outside_n.hgr.zx02\"" >> maglev_graphics.inc diff --git a/games/riven_hgr/disk40_files/graphics_outside/out_path_e.png b/games/riven_hgr/disk40_files/graphics_maglev/out_path_e.png similarity index 100% rename from games/riven_hgr/disk40_files/graphics_outside/out_path_e.png rename to games/riven_hgr/disk40_files/graphics_maglev/out_path_e.png diff --git a/games/riven_hgr/disk40_files/graphics_outside/out_path_w.png b/games/riven_hgr/disk40_files/graphics_maglev/out_path_w.png similarity index 100% rename from games/riven_hgr/disk40_files/graphics_outside/out_path_w.png rename to games/riven_hgr/disk40_files/graphics_maglev/out_path_w.png diff --git a/games/riven_hgr/disk40_files/graphics_outside/Makefile b/games/riven_hgr/disk40_files/graphics_outside/Makefile index 960f93a4..f957e68c 100644 --- a/games/riven_hgr/disk40_files/graphics_outside/Makefile +++ b/games/riven_hgr/disk40_files/graphics_outside/Makefile @@ -6,17 +6,17 @@ PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr all: outside_graphics.inc outside_graphics.inc: \ - out_path_e.hgr.zx02 out_path_w.hgr.zx02 \ out_plaza_n.hgr.zx02 out_plaza_s.hgr.zx02 out_plaza_e.hgr.zx02 out_plaza_w.hgr.zx02 \ cave_s.hgr.zx02 cave_n.hgr.zx02 - echo "out_path_e_zx02: .incbin \"out_path_e.hgr.zx02\"" > outside_graphics.inc - echo "out_path_w_zx02: .incbin \"out_path_w.hgr.zx02\"" >> outside_graphics.inc - echo "out_plaza_n_zx02: .incbin \"out_plaza_n.hgr.zx02\"" >> outside_graphics.inc + echo "out_plaza_n_zx02: .incbin \"out_plaza_n.hgr.zx02\"" > outside_graphics.inc echo "out_plaza_s_zx02: .incbin \"out_plaza_s.hgr.zx02\"" >> outside_graphics.inc echo "out_plaza_e_zx02: .incbin \"out_plaza_e.hgr.zx02\"" >> outside_graphics.inc echo "out_plaza_w_zx02: .incbin \"out_plaza_w.hgr.zx02\"" >> outside_graphics.inc echo "cave_s_zx02: .incbin \"cave_s.hgr.zx02\"" >> outside_graphics.inc echo "cave_n_zx02: .incbin \"cave_n.hgr.zx02\"" >> outside_graphics.inc +# echo "out_path_e_zx02: .incbin \"out_path_e.hgr.zx02\"" >> outside_graphics.inc +# echo "out_path_w_zx02: .incbin \"out_path_w.hgr.zx02\"" >> outside_graphics.inc +# out_path_e.hgr.zx02 out_path_w.hgr.zx02 \ #### diff --git a/games/riven_hgr/disk40_files/level_orb.s b/games/riven_hgr/disk40_files/level_orb.s index cb394824..9e2b32b9 100644 --- a/games/riven_hgr/disk40_files/level_orb.s +++ b/games/riven_hgr/disk40_files/level_orb.s @@ -132,6 +132,19 @@ really_exit: orb_clicked: + ; display number graphic + + lda #orb2_n_zx02 + sta ZX0_src+1 + + lda #$20 + + jsr full_decomp + + + ; only play sound if language card lda SOUND_STATUS @@ -168,6 +181,19 @@ do_play_audio: done_play_audio: + + ; re-display original graphic + + lda #orb_n_zx02 + sta ZX0_src+1 + + lda #$20 + + jsr full_decomp + + rts diff --git a/games/riven_hgr/disk40_files/leveldata_maglev.inc b/games/riven_hgr/disk40_files/leveldata_maglev.inc index f8aa12a7..ae99460e 100644 --- a/games/riven_hgr/disk40_files/leveldata_maglev.inc +++ b/games/riven_hgr/disk40_files/leveldata_maglev.inc @@ -3,7 +3,7 @@ ;=============================================== locations: - .word location0,location1,location2,location3 + .word location0,location1,location2,location3,location4 ; RIVEN_LOOKIN -- looking into the maglev @@ -70,7 +70,7 @@ location3: .byte RIVEN_LOOKIN ; north exit .byte $FF ; south exit .byte $FF ; east exit - .byte LOAD_OUTSIDE<<4|RIVEN_OUTSIDE_PATH ; west exit + .byte RIVEN_OUTSIDE_PATH ; west exit .byte DIRECTION_W ; north exit_dir .byte $ff ; south exit_dir .byte $ff ; east exit_dir @@ -81,3 +81,20 @@ location3: .word outside_w_zx02 ; west bg .byte BG_WEST|BG_NORTH .byte $ff ; special exit + +; RIVEN_OUTSIDE_PATH -- path away from maglev +location4: + .byte $FF ; north exit + .byte $FF ; south exit + .byte RIVEN_OUTSIDE ; east exit + .byte LOAD_OUTSIDE<<4|RIVEN_OUTSIDE_PLAZA ; west exit + .byte $FF ; north exit_dir + .byte $ff ; south exit_dir + .byte DIRECTION_N ; east exit_dir + .byte DIRECTION_W ; west exit_dir + .word $0000 ; north bg + .word $0000 ; south bg + .word out_path_e_zx02 ; east bg + .word out_path_w_zx02 ; west bg + .byte BG_WEST|BG_EAST + .byte $ff ; special exit diff --git a/games/riven_hgr/disk40_files/leveldata_outside.inc b/games/riven_hgr/disk40_files/leveldata_outside.inc index 3b5f7d32..948e7d7c 100644 --- a/games/riven_hgr/disk40_files/leveldata_outside.inc +++ b/games/riven_hgr/disk40_files/leveldata_outside.inc @@ -3,31 +3,13 @@ ;=============================================== locations: - .word location0,location1,location2 - - -; RIVEN_OUTSIDE_PATH -- path away from maglev -location0: - .byte $FF ; north exit - .byte $FF ; south exit - .byte LOAD_MAGLEV<<4|RIVEN_OUTSIDE ; east exit - .byte RIVEN_OUTSIDE_PLAZA ; west exit - .byte $FF ; north exit_dir - .byte $ff ; south exit_dir - .byte DIRECTION_N ; east exit_dir - .byte DIRECTION_W ; west exit_dir - .word $0000 ; north bg - .word $0000 ; south bg - .word out_path_e_zx02 ; east bg - .word out_path_w_zx02 ; west bg - .byte BG_WEST|BG_EAST - .byte $ff ; special exit + .word location0,location1 ; RIVEN_OUTSIDE_PLAZA -- plaza near maglev -location1: +location0: .byte LOAD_ORB<<4|RIVEN_ORB1 ; north exit .byte RIVEN_CAVE_ENTRANCE ; south exit - .byte RIVEN_OUTSIDE_PATH ; east exit + .byte LOAD_MAGLEV<<4|RIVEN_OUTSIDE_PATH ; east exit .byte $FF ; west exit .byte DIRECTION_N ; north exit_dir .byte DIRECTION_S ; south exit_dir @@ -41,7 +23,7 @@ location1: .byte $ff ; special exit ; RIVEN_CAVE_ENTRANCE -- plaza near maglev -location2: +location1: .byte RIVEN_OUTSIDE_PLAZA ; north exit .byte $E0|0 ; change disk, exit 0 ; south exit .byte $FF ; east exit @@ -58,3 +40,19 @@ location2: .byte $ff ; special exit +; RIVEN_OUTSIDE_PATH -- path away from maglev +;location0: +; .byte $FF ; north exit +; .byte $FF ; south exit +; .byte LOAD_MAGLEV<<4|RIVEN_OUTSIDE ; east exit +; .byte RIVEN_OUTSIDE_PLAZA ; west exit +; .byte $FF ; north exit_dir +; .byte $ff ; south exit_dir +; .byte DIRECTION_N ; east exit_dir +; .byte DIRECTION_W ; west exit_dir +; .word $0000 ; north bg +; .word $0000 ; south bg +; .word out_path_e_zx02 ; east bg +; .word out_path_w_zx02 ; west bg +; .byte BG_WEST|BG_EAST +; .byte $ff ; special exit