diff --git a/games/riven_hgr/disk03_files/Makefile b/games/riven_hgr/disk03_files/Makefile index 8aedd81a..81a0b09d 100644 --- a/games/riven_hgr/disk03_files/Makefile +++ b/games/riven_hgr/disk03_files/Makefile @@ -33,13 +33,13 @@ graphics_outside/outside_graphics.inc: #### clean: - rm -f *~ *.o *.lst \ + rm -f *~ *.o *.lst DISK03 \ LEVEL_OUTSIDE #### distclean: - rm -f *~ *.o *.lst \ + rm -f *~ *.o *.lst DISK03 \ LEVEL_OUTSIDE cd graphics_outside && make clean diff --git a/games/riven_hgr/disk03_files/disk03_defines.inc b/games/riven_hgr/disk03_files/disk03_defines.inc new file mode 100644 index 00000000..4ac74ad1 --- /dev/null +++ b/games/riven_hgr/disk03_files/disk03_defines.inc @@ -0,0 +1,12 @@ +LOAD_TITLE_03 = 0 +LOAD_STEPS1 = 1 +LOAD_STPES3 = 2 +LOAD_OUTSIDE = 3 + +;================================ +; Level definitions + +; OUTSIDE + +RIVEN_OUTSIDE = 0 + diff --git a/games/riven_hgr/disk04_files/Makefile b/games/riven_hgr/disk04_files/Makefile new file mode 100644 index 00000000..aaa2c6c9 --- /dev/null +++ b/games/riven_hgr/disk04_files/Makefile @@ -0,0 +1,47 @@ +include ../../../Makefile.inc + +LINKER_SCRIPTS = ../../../linker_scripts/ + + +all: DISK04 LEVEL_TUNNEL3 + +#### + +DISK04: disk04.o + ld65 -o DISK04 disk04.o -C $(LINKER_SCRIPTS)/apple2_4000.inc + +disk04.o: disk04.s ../zp.inc + ca65 -o disk04.o disk04.s -l disk04.lst + +#### + +LEVEL_TUNNEL3: level_tunnel3.o + ld65 -o LEVEL_TUNNEL3 level_tunnel3.o -C $(LINKER_SCRIPTS)/apple2_4000.inc + +level_tunnel3.o: level_tunnel3.s \ + ../zp.inc ../hardware.inc ../qload.inc \ + ../common_defines.inc disk04_defines.inc \ + leveldata_tunnel3.inc \ + graphics_tunnel3/tunnel3_graphics.inc + ca65 -o level_tunnel3.o level_tunnel3.s -l level_tunnel3.lst + +#### + +graphics_tunnel3/tunnel3_graphics.inc: + cd graphics_tunnel3 && make + +#### + +clean: + rm -f *~ *.o *.lst DISK04 \ + LEVEL_TUNNEL3 + +#### + +distclean: + rm -f *~ *.o *.lst DISK04 \ + LEVEL_TUNNEL3 + cd graphics_tunnel3 && make clean + + + diff --git a/games/riven_hgr/disk04_files/disk04.s b/games/riven_hgr/disk04_files/disk04.s new file mode 100644 index 00000000..430948e1 --- /dev/null +++ b/games/riven_hgr/disk04_files/disk04.s @@ -0,0 +1,69 @@ +.include "../zp.inc" +.include "../disk02_files/disk02_defines.inc" +.include "../disk05_files/disk05_defines.inc" +.include "../disk38_files/disk38_defines.inc" +.include "../disk00_files/disk00_defines.inc" + +which_disk_bcd: + .byte $04 ; BCD + +which_disk_bin: + .byte 4 + +load_address_array: + .byte $40,$40,$40,$40 ; TITLE, BRIDGE2, BRIDGE3, BRIDGE4 + .byte $40,$40,$40,$00 ; TUNNEL1, TUNNEL2, TUNNEL3 + +track_array: + .byte 0, 2, 7,12 ; TITLE, BRIDGE2, BRIDGE3, BRIDGE4 + .byte 17,22,27,0 ; TUNNEL1, TUNNEL1, TUNNEL3 + +sector_array: + .byte 8, 0, 0, 0 ; TITLE, BRIDGE2, BRIDGE3, BRIDGE4 + .byte 0,0,0,0 ; TUNNEL1, TUNNEL1, TUNNEL3 + +length_array: + .byte 8, 80,80,80 ; TITLE, BRIDGE2, BRIDGE3, BRIDGE4 + .byte 80,80,80,0 ; TUNNEL1, TUNNEL1, TUNNEL3 + + +disk_exit_disk: ; note: not BCD anymore + .byte 2 + .byte 38 + .byte 5 + .byte 0 + +disk_exit_disk_bcd: + .byte $02 + .byte $38 + .byte $05 + .byte 0 + + +disk_exit_dni_h: + .byte 0 + .byte 1 ; 1*25 + 2*5 + 3*1 + .byte 0 + .byte 0 +disk_exit_dni_l: + .byte $02 + .byte $23 + .byte $10 + .byte 0 + + ; +disk_exit_load: + .byte LOAD_TOP + .byte LOAD_PROJECTOR + .byte LOAD_CHAIR + .byte LOAD_CYAN +disk_exit_level: + .byte RIVEN_TOP + .byte RIVEN_PROJECTOR + .byte RIVEN_CHAIR + .byte 0 +disk_exit_direction: + .byte DIRECTION_W + .byte DIRECTION_W + .byte DIRECTION_N + .byte 0 diff --git a/games/riven_hgr/disk04_files/disk04_defines.inc b/games/riven_hgr/disk04_files/disk04_defines.inc new file mode 100644 index 00000000..86d848a3 --- /dev/null +++ b/games/riven_hgr/disk04_files/disk04_defines.inc @@ -0,0 +1,16 @@ +LOAD_TITLE_04 = 0 +LOAD_BRIDGE2 = 1 +LOAD_BRIDGE3 = 2 +LOAD_BRIDGE4 = 3 +LOAD_TUNNEL1 = 4 +LOAD_TUNNEL2 = 5 +LOAD_TUNNEL3 = 6 + +;================================ +; Level definitions + +; TUNNEL3 + +RIVEN_TUNNEL3 = 0 +RIVEN_TUNNEL3_OPEN = 1 + diff --git a/games/riven_hgr/disk04_files/level_tunnel3.s b/games/riven_hgr/disk04_files/level_tunnel3.s new file mode 100644 index 00000000..72b1312b --- /dev/null +++ b/games/riven_hgr/disk04_files/level_tunnel3.s @@ -0,0 +1,113 @@ +; Riven -- Tunnel3 + +; by deater (Vince Weaver) + +; Zero Page + .include "../zp.inc" + .include "../hardware.inc" + .include "../common_defines.inc" + .include "../qload.inc" + .include "disk04_defines.inc" + +tunnel3_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_tunnel3/tunnel3_graphics.inc" + +.include "leveldata_tunnel3.inc" diff --git a/games/riven_hgr/disk04_files/leveldata_tunnel3.inc b/games/riven_hgr/disk04_files/leveldata_tunnel3.inc new file mode 100644 index 00000000..f17d42fe --- /dev/null +++ b/games/riven_hgr/disk04_files/leveldata_tunnel3.inc @@ -0,0 +1,41 @@ +;=============================================== +; level data for Start level +;=============================================== + +locations: + .word location0,location1 + +; RIVEN_TUNNEL3 -- outside the door +location0: + .byte RIVEN_TUNNEL3_OPEN ; north exit + .byte $ff ; south exit + .byte $E1 ; east exit + .byte $E0 ; 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 tunnel3_n_zx02 ; north bg + .word $0000 ; south bg + .word tunnel3_e_zx02 ; east bg + .word tunnel3_w_zx02 ; west bg + .byte BG_EAST|BG_NORTH|BG_WEST + .byte $ff ; special exit + +; RIVEN_TUNNEL3_OPEN -- outside the door, open +location1: + .byte $E2 ; north exit + .byte $ff ; south exit + .byte $E1 ; east exit + .byte $E0 ; 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 tunnel3_open_n_zx02 ; north bg + .word $0000 ; south bg + .word tunnel3_e_zx02 ; east bg + .word tunnel3_w_zx02 ; west bg + .byte BG_EAST|BG_NORTH|BG_WEST + .byte $ff ; special exit +