diff --git a/games/riven_hgr/Makefile b/games/riven_hgr/Makefile index 22db6cb3..658938ea 100644 --- a/games/riven_hgr/Makefile +++ b/games/riven_hgr/Makefile @@ -2,17 +2,18 @@ include ../../Makefile.inc DOS33 = ../../utils/dos33fs-utils/dos33 DOS33_RAW = ../../utils/dos33fs-utils/dos33_raw -B2D = ../../utils/bmp2dhr/b2d -PNG2GR = ../../utils/gr-utils/png2gr -LZSA = ~/research/lzsa/lzsa/lzsa +#B2D = ../../utils/bmp2dhr/b2d +#PNG2GR = ../../utils/gr-utils/png2gr +#LZSA = ~/research/lzsa/lzsa/lzsa TOKENIZE = ../../utils/asoft_basic-utils/tokenize_asoft EMPTY_DISK = ../../empty_disk/empty.dsk +LINKER_SCRIPTS = ../../linker_scripts/ all: riven_hgr.dsk riven_hgr.dsk: HELLO LOADER TITLE \ - LEVEL_PROJECTOR LEVEL_MAGSTEPS LEVEL_MAGLEV DOME + LEVEL_PROJECTOR LEVEL_MAGSTEPS LEVEL_MAGLEV DOME MOVIE1 cp $(EMPTY_DISK) riven_hgr.dsk $(DOS33) -y riven_hgr.dsk SAVE A HELLO $(DOS33) -y riven_hgr.dsk BSAVE -a 0x1000 LOADER @@ -21,6 +22,7 @@ riven_hgr.dsk: HELLO LOADER TITLE \ $(DOS33) -y riven_hgr.dsk BSAVE -a 0x4000 LEVEL_MAGSTEPS $(DOS33) -y riven_hgr.dsk BSAVE -a 0x4000 LEVEL_MAGLEV $(DOS33) -y riven_hgr.dsk BSAVE -a 0x4000 DOME + $(DOS33) -y riven_hgr.dsk BSAVE -a 0x4000 MOVIE1 ### @@ -30,7 +32,7 @@ HELLO: hello.bas #### LOADER: loader.o - ld65 -o LOADER loader.o -C ../../linker_scripts/apple2_1000.inc + ld65 -o LOADER loader.o -C $(LINKER_SCRIPTS)/apple2_1000.inc loader.o: loader.s hardware_detect.s ca65 -o loader.o loader.s -l loader.lst @@ -38,7 +40,7 @@ loader.o: loader.s hardware_detect.s #### TITLE: title.o - ld65 -o TITLE title.o -C ../../linker_scripts/apple2_4000.inc + ld65 -o TITLE title.o -C $(LINKER_SCRIPTS)/apple2_4000.inc title.o: title.s zp.inc hardware.inc \ zx02_optim.s wait_a_bit.s \ @@ -49,7 +51,7 @@ title.o: title.s zp.inc hardware.inc \ #### DOME: dome.o - ld65 -o DOME dome.o -C ../../linker_scripts/apple2_4000.inc + ld65 -o DOME dome.o -C $(LINKER_SCRIPTS)/apple2_4000.inc dome.o: dome.s zp.inc hardware.inc \ zx02_optim.s \ @@ -64,7 +66,7 @@ dome.o: dome.s zp.inc hardware.inc \ #### LEVEL_PROJECTOR: level_projector.o - ld65 -o LEVEL_PROJECTOR level_projector.o -C ../../linker_scripts/apple2_4000.inc + ld65 -o LEVEL_PROJECTOR level_projector.o -C $(LINKER_SCRIPTS)/apple2_4000.inc level_projector.o: level_projector.s zp.inc hardware.inc \ zx02_optim.s \ @@ -79,7 +81,7 @@ level_projector.o: level_projector.s zp.inc hardware.inc \ #### LEVEL_MAGSTEPS: level_magsteps.o - ld65 -o LEVEL_MAGSTEPS level_magsteps.o -C ../../linker_scripts/apple2_4000.inc + ld65 -o LEVEL_MAGSTEPS level_magsteps.o -C $(LINKER_SCRIPTS)/apple2_4000.inc level_magsteps.o: level_magsteps.s zp.inc hardware.inc \ zx02_optim.s \ @@ -94,7 +96,7 @@ level_magsteps.o: level_magsteps.s zp.inc hardware.inc \ #### LEVEL_MAGLEV: level_maglev.o - ld65 -o LEVEL_MAGLEV level_maglev.o -C ../../linker_scripts/apple2_4000.inc + ld65 -o LEVEL_MAGLEV level_maglev.o -C $(LINKER_SCRIPTS)/apple2_4000.inc level_maglev.o: level_maglev.s zp.inc hardware.inc \ zx02_optim.s \ @@ -106,6 +108,17 @@ level_maglev.o: level_maglev.s zp.inc hardware.inc \ graphics_maglev/maglev_graphics.inc ca65 -o level_maglev.o level_maglev.s -l level_maglev.lst +#### + +MOVIE1: movie1.o + ld65 -o MOVIE1 movie1.o -C $(LINKER_SCRIPTS)/apple2_4000.inc + +movie1.o: movie1.s \ + movie1/movie1.inc + ca65 -o movie1.o movie1.s -l movie1.lst + + + diff --git a/games/riven_hgr/movie1.s b/games/riven_hgr/movie1.s new file mode 100644 index 00000000..9557b849 --- /dev/null +++ b/games/riven_hgr/movie1.s @@ -0,0 +1,98 @@ +; Lo-res movie player of sorts + +; by deater (Vince Weaver) + +.include "zp.inc" +.include "hardware.inc" + + +movie1_start: + + + ;=================== + ; Setup graphics + ;=================== + + bit SET_GR + bit LORES + bit FULLGR + bit PAGE1 + + lda #0 + sta DRAW_PAGE + + bit KEYRESET + + lda #img025_bg_zx02 + sta ZX0_src+1 + + lda #$04 ; decompress page1 (dangerous? holes?) + + jsr full_decomp + + + +.if 0 + lda #num_scenes + sta SCENE_COUNT + + lda #frame15 + sta INH +.endif + + +.if 0 + + +scene_loop: + jsr draw_scene + + ;============================ + ; flip pages + ;============================ + lda DRAW_PAGE ; 3 + beq was_page1 ; 2/3 +was_page2: + bit PAGE2 ; 4 + lda #$0 ; 2 + beq done_pageflip ; 2/3 +was_page1: + bit PAGE1 ; 4 + lda #$4 ; 2 +done_pageflip: + sta DRAW_PAGE ; 3 + + lda #12 + sta IRQ_COUNTDOWN + +wait_for_irq: + lda IRQ_COUNTDOWN + bne wait_for_irq + + lda KEYPRESS + bmi done_threed + + dec SCENE_COUNT + bne scene_loop +.endif + +done_movie1: + bit KEYRESET + + jmp done_movie1 + + rts + + +;=================================== + +; .include "../wait_keypress.s" + +; .include "draw_boxes.s" + .include "movie1/movie1.inc" + + .include "zx02_optim.s" diff --git a/games/riven_hgr/movie1/Makefile b/games/riven_hgr/movie1/Makefile new file mode 100644 index 00000000..a726ec8a --- /dev/null +++ b/games/riven_hgr/movie1/Makefile @@ -0,0 +1,25 @@ +include ../../../Makefile.inc + +ZX02 = ~/research/6502_compression/zx02.git/build/zx02 +PNG2GR = ../../../utils/gr-utils/png2gr + +all: movie1.inc + +movie1.inc: \ + img025_bg.gr.zx02 + echo "img025_bg_zx02: .incbin \"img025_bg.gr.zx02\"" > movie1.inc + + +#### + +%.gr: %.png + $(PNG2GR) $< $@ + +%.gr.zx02: %.gr + $(ZX02) -f $< $@ + +#### + +clean: + rm -f *~ *.o *.lst *.zx02 *.gr + diff --git a/games/riven_hgr/movie1/img025_gr.png b/games/riven_hgr/movie1/done/img025_gr.png similarity index 100% rename from games/riven_hgr/movie1/img025_gr.png rename to games/riven_hgr/movie1/done/img025_gr.png diff --git a/games/riven_hgr/movie1/img025_bg.png b/games/riven_hgr/movie1/img025_bg.png new file mode 100644 index 00000000..f4c84aec Binary files /dev/null and b/games/riven_hgr/movie1/img025_bg.png differ diff --git a/games/riven_hgr/movie1/maglev_overlay.png b/games/riven_hgr/movie1/overlays/maglev_overlay.png similarity index 100% rename from games/riven_hgr/movie1/maglev_overlay.png rename to games/riven_hgr/movie1/overlays/maglev_overlay.png