driven: add some graphics

This commit is contained in:
Vince Weaver 2024-11-04 01:00:12 -05:00
parent c5d609298b
commit 571dbc325a
8 changed files with 127 additions and 10 deletions

View File

@ -14,6 +14,7 @@ driven.dsk: QBOOT QLOAD \
./part00_intro/INTRO \
./part01_dni/DNI \
./part05_atrus/ATRUS \
./part10_graphics/GRAPHICS \
./part20_credits/CREDITS
cp $(EMPTY_DISK) driven.dsk
$(DOS33_RAW) driven.dsk 0 0 QBOOT 0 1
@ -25,6 +26,7 @@ driven.dsk: QBOOT QLOAD \
$(DOS33_RAW) driven.dsk 13 0 ./part20_credits/CREDITS 0 0
$(DOS33_RAW) driven.dsk 17 0 ./part01_dni/DNI 0 0
$(DOS33_RAW) driven.dsk 21 0 ./part05_atrus/ATRUS 0 0
$(DOS33_RAW) driven.dsk 25 0 ./part10_graphics/GRAPHICS 0 0
#second_d1.dsk: QBOOT QLOAD \
# music.inc qload.inc \

View File

@ -9,7 +9,7 @@ T 9 = INTRO ? bytes 4T (16384) 3k free
T 13 = CREDITS ? bytes 4T (16384) 1k free
T 17 = DNI ? bytes 4T (16384)
T 21 = SCROLL ? bytes 4T (16384)
T 25 = GRAPHICS ? bytes 4T
note: below is not accurate

View File

@ -0,0 +1,26 @@
include ../../../Makefile.inc
LINKER_SCRIPTS = ../../../linker_scripts/
all: GRAPHICS
###
GRAPHICS: graphics.o
ld65 -o GRAPHICS graphics.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
graphics.o: graphics.s \
../zp.inc ../hardware.inc \
graphics/floater_wide_steffest.hgr.zx02
ca65 -o graphics.o graphics.s -l graphics.lst
###
graphics/floater_wide_steffest.hgr.zx02:
cd graphics && make
###
clean:
rm -f *~ *.o *.lst GRAPHICS

View File

@ -0,0 +1,38 @@
.include "../zp.inc"
.include "../hardware.inc"
.include "../qload.inc"
.include "../music.inc"
;=============================
; draw some graphics
;=============================
graphics:
lda #0
bit SET_GR
bit HIRES
bit FULLGR
bit PAGE1
;=================================
; intro
;=================================
lda #<floater_graphics
sta zx_src_l+1
lda #>floater_graphics
sta zx_src_h+1
lda #$20
jsr zx02_full_decomp
jsr wait_until_keypress
rts
floater_graphics:
.incbin "graphics/floater_wide_steffest.hgr.zx02"
.include "../wait_keypress.s"

View File

@ -0,0 +1,21 @@
include ../../../../Makefile.inc
ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f
PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr
PNG2GR = ../../../../utils/gr-utils/png2gr
HGR_SPRITE = ../../../../utils/hgr-utils/hgr_make_sprite
all: floater_wide_steffest.hgr.zx02
####
floater_wide_steffest.hgr.zx02: floater_wide_steffest.hgr
$(ZX02) floater_wide_steffest.hgr floater_wide_steffest.hgr.zx02
floater_wide_steffest.hgr: floater_wide_steffest.png
$(PNG_TO_HGR) floater_wide_steffest.png > floater_wide_steffest.hgr
####
clean:
rm -f *~ *.zx02

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -164,43 +164,43 @@ error_string:
which_disk_array:
.byte 1,1,1,1 ; MUSIC_INTRO, MUSIC_MAIN, INTRO, CREDITS
.byte 1,1,1,1 ; DNI, SCROLL
.byte 1,1,1,1 ; DNI, SCROLL, GRAPHICS
.byte 1,1,1,1 ;
.byte 1,1 ;
load_address_array:
.byte $D0,$D0,$80,$80 ; MUSIC_INTRO, MUSIC_MAIN, INTRO, CREDITS
.byte $40,$80,$60,$60 ; DNI, SCROLL
.byte $40,$80,$60,$60 ; DNI, SCROLL, GRAPHICS
.byte $60,$60,$60,$60 ;
.byte $60,$80 ;
start_address:
.byte $D0,$D0,$80,$80 ; MUSIC_INTRO, MUSIC_MAIN, INTRO, CREDITS
.byte $40,$80,$60,$80 ; DNI, SCROLL
.byte $40,$80,$60,$80 ; DNI, SCROLL, GRAPHICS
.byte $80,$80,$80,$60 ;
.byte $80,$80 ;
aux_dest:
.byte $D0,$D0,$A0,$A0 ; MUSIC_INTRO, MUSIC_MAIN, INTRO, CREDITS
.byte $70,$50,$40,$30 ; DNI, SCROLL
.byte $70,$50,$40,$30 ; DNI, SCROLL, GRAPHICS
.byte $20,$10,$80,$20 ;
.byte $10,$A0 ;
track_array:
.byte 2,4,9,13 ; MUSIC_INTRO, MUSIC_MAIN, INTRO, CREDITS
.byte 17,21,23,24 ; DNI, SCROLL
.byte 17,21,25,24 ; DNI, SCROLL, GRAPHICS
.byte 25,26,27,28 ;
.byte 34,9 ;
sector_array:
.byte 0,0,0,0 ; MUSIC_INTRO, MUSIC_MAIN, INTRO, CREDITS
.byte 0,0,0,0 ; DNI, SCROLL
.byte 0,0,0,0 ; DNI, SCROLL, GRAPHICS
.byte 0,0,0,0 ;
.byte 0,0 ;
length_array:
.byte 32,48,48,64 ; MUSIC_INTRO, MUSIC_MAIN, INTRO, CREDITS
.byte 32,64,16,16 ; DNI, SCROLL
.byte 32,64,64,16 ; DNI, SCROLL, GRAPHICS
.byte 16,16,16,96 ;
.byte 16,16 ;

View File

@ -175,7 +175,7 @@ load_program_loop:
; load dni
lda #5 ; SCROLL
lda #6 ; SCROLL
sta WHICH_LOAD
jsr load_file
@ -190,7 +190,37 @@ load_program_loop:
;=======================
;=======================
jsr $8000
jsr $6000
;=======================
;=======================
; Load graphics
;=======================
;=======================
sei ; stop music interrupts
jsr mute_ay_both
jsr clear_ay_both ; stop from making noise
; load dni
lda #6 ; SCROLL
sta WHICH_LOAD
jsr load_file
; restart music
cli ; start interrupts (music)
;=======================
;=======================
; Run Graphics
;=======================
;=======================
jsr $6000
;=======================
;=======================