xmas24: more progress

This commit is contained in:
Vince Weaver 2024-12-21 10:56:03 -05:00
parent 3ccff47d58
commit 9cc5345061
6 changed files with 123 additions and 66 deletions

View File

@ -10,7 +10,7 @@ all: xmas_2024.dsk
xmas_2024.dsk: QBOOT QLOAD music.inc qload.inc \
MUSIC XMAS WIPE_STAR_DATA \
./graphics/MERRY_XMAS
./graphics/MERRY_XMAS ./graphics/GP
cp $(EMPTY_DISK) xmas_2024.dsk
$(DOS33_RAW) xmas_2024.dsk 0 0 QBOOT 0 1
$(DOS33_RAW) xmas_2024.dsk 0 2 QBOOT 1 1
@ -20,7 +20,7 @@ xmas_2024.dsk: QBOOT QLOAD music.inc qload.inc \
$(DOS33_RAW) xmas_2024.dsk 12 0 XMAS 0 0
$(DOS33_RAW) xmas_2024.dsk 16 0 WIPE_STAR_DATA 0 0
$(DOS33_RAW) xmas_2024.dsk 20 0 ./graphics/MERRY_XMAS 0 0
$(DOS33_RAW) xmas_2024.dsk 24 0 ./graphics/GP 0 0
####
@ -86,9 +86,10 @@ qload.inc: generate_common QLOAD
./generate_common -a 0x1200 -s clear_bottoms qload.lst >> qload.inc
./generate_common -a 0x1200 -s clear_screens qload.lst >> qload.inc
./generate_common -a 0x1200 -s clear_top qload.lst >> qload.inc
./generate_common -a 0x1200 -s zx02_full_decomp qload.lst >> qload.inc
./generate_common -a 0x1200 -s zx_src_h qload.lst >> qload.inc
./generate_common -a 0x1200 -s zx_src_l qload.lst >> qload.inc
./generate_common -a 0x1200 -s hgr_page1_clearscreen qload.lst >> qload.inc
# ./generate_common -a 0x1200 -s zx02_full_decomp qload.lst >> qload.inc
# ./generate_common -a 0x1200 -s zx_src_h qload.lst >> qload.inc
# ./generate_common -a 0x1200 -s zx_src_l qload.lst >> qload.inc
####

View File

@ -5,7 +5,12 @@ PNG_TO_HGR = ../../../utils/hgr-utils/png2hgr
PNG2GR = ../../../utils/gr-utils/png2gr
HGR_SPRITE = ../../../utils/hgr-utils/hgr_make_sprite
all: gp_hgr.zx02 merry_christmas.zx02 MERRY_XMAS
all: gp_hgr.zx02 merry_christmas.zx02 MERRY_XMAS GP
####
GP: gp_hgr.hgr
cp gp_hgr.hgr GP
####

View File

@ -0,0 +1,89 @@
hgr_clear_screen:
lda DRAW_PAGE
beq hgr_page1_clearscreen
lda #0
beq hgr_page2_clearscreen
hgr_page1_clearscreen:
ldy #0
hgr_page1_cls_loop:
sta $2000,Y
sta $2100,Y
sta $2200,Y
sta $2300,Y
sta $2400,Y
sta $2500,Y
sta $2600,Y
sta $2700,Y
sta $2800,Y
sta $2900,Y
sta $2A00,Y
sta $2B00,Y
sta $2C00,Y
sta $2D00,Y
sta $2E00,Y
sta $2F00,Y
sta $3000,Y
sta $3100,Y
sta $3200,Y
sta $3300,Y
sta $3400,Y
sta $3500,Y
sta $3600,Y
sta $3700,Y
sta $3800,Y
sta $3900,Y
sta $3A00,Y
sta $3B00,Y
sta $3C00,Y
sta $3D00,Y
sta $3E00,Y
sta $3F00,Y
iny
bne hgr_page1_cls_loop
rts
hgr_page2_clearscreen:
ldy #0
hgr_page2_cls_loop:
sta $4000,Y
sta $4100,Y
sta $4200,Y
sta $4300,Y
sta $4400,Y
sta $4500,Y
sta $4600,Y
sta $4700,Y
sta $4800,Y
sta $4900,Y
sta $4A00,Y
sta $4B00,Y
sta $4C00,Y
sta $4D00,Y
sta $4E00,Y
sta $4F00,Y
sta $5000,Y
sta $5100,Y
sta $5200,Y
sta $5300,Y
sta $5400,Y
sta $5500,Y
sta $5600,Y
sta $5700,Y
sta $5800,Y
sta $5900,Y
sta $5A00,Y
sta $5B00,Y
sta $5C00,Y
sta $5D00,Y
sta $5E00,Y
sta $5F00,Y
iny
bne hgr_page2_cls_loop
rts

View File

@ -164,21 +164,27 @@ error_string:
which_disk_array:
.byte 1,1,1,1 ; MUSIC, XMAS, WIPE_STAR_DATA, MERRY_XMAS
.byte 1 ; GP
load_address_array:
.byte $D0,$60,$81,$40 ; MUSIC, XMAS, WIPE_STAR_DATA, MERRY_XMAS
.byte $40 ; GP
start_address:
.byte $D0,$60,$81,$40 ; MUSIC, XMAS, WIPE_STAR_DATA, MERRY_XMAS
.byte $40 ; GP
track_array:
.byte 4,12,16,20 ; MUSIC, XMAS, WIPE_STAR_DATA, MERRY_XMAS
.byte 24 ; GP
sector_array:
.byte 0,0,0,0 ; MUSIC, XMAS, WIPE_STAR_DATA, MERRY_XMAS
.byte 0 ; GP
length_array:
.byte 32,32,60,32 ; MUSIC, XMAS, WIPE_STAR_DATA, MERRY_XMAS
.byte 32 ; GP
PT3_ENABLE_APPLE_IIC = 1
@ -197,6 +203,7 @@ PT3_ENABLE_APPLE_IIC = 1
.include "pt3_lib_mockingboard_detect.s"
.include "hgr_table.s"
.include "hgr_clear_screen.s"
qload_end:

View File

@ -143,7 +143,7 @@ done_set_message:
;=======================
;=======================
; Load xmas
; Load xmas code
;=======================
;=======================
load_xmas:
@ -162,53 +162,16 @@ load_xmas:
sta WHICH_LOAD
jsr load_file
;=======================
;=======================
; Run intro
;=======================
;=======================
; cli ; start music
; start code
jsr $6000
; bit PAGE1 ; be sure we're on PAGE1
; clear text screen
; lda #$A0
; sta clear_all_color+1
; jsr clear_all
; switch to text/gr
; bit TEXTGR
; print non-inverse
; jsr set_normal
; print messages
; lda #<disk_change_string
; sta OUTL
; lda #>disk_change_string
; sta OUTH
; print the text
; jsr move_and_print
; bit KEYRESET ; just to be safe
; jsr wait_until_keypress
forever:
jmp forever
.include "wait_keypress.s"
.include "zx02_optim.s"
; .include "zx02_optim.s"
.include "gs_interrupt.s"

View File

@ -8,37 +8,29 @@
xmas_main:
; clear extraneous keypresses
bit KEYRESET
;======================================
; init
;======================================
lda #$00
sta DRAW_PAGE
sta clear_all_color+1
lda #$04
sta DRAW_PAGE
jsr clear_all
;======================================
; draw opening scene
;======================================
jsr hgr_page1_clearscreen
bit SET_GR
bit HIRES
bit PAGE1
lda #<gp_hat_graphics
sta zx_src_l+1
lda #>gp_hat_graphics
sta zx_src_h+1
lda #$20
jsr zx02_full_decomp
;======================================
; draw opening scene
;======================================
; start music
cli
bit KEYRESET
jsr wipe_star
jsr do_scroll
@ -59,5 +51,5 @@ finished:
.include "hgr_page_flip.s"
.include "vblank.s"
gp_hat_graphics:
.incbin "graphics/gp_hgr.zx02"
;gp_hat_graphics:
;.incbin "graphics/gp_hgr.zx02"