trogdor: update countryside load

This commit is contained in:
Vince Weaver 2024-01-21 16:04:25 -05:00
parent bcd68fd7ed
commit 10316bbfad
7 changed files with 126 additions and 13 deletions

View File

@ -9,7 +9,7 @@ LINKER_SCRIPTS = ../../linker_scripts/
all: trogdor.dsk
trogdor.dsk: QBOOT QLOAD music.inc qload.inc \
MUSIC TROGDOR TITLE FLAMES
MUSIC TROGDOR TITLE FLAMES COUNTRYSIDE
cp $(EMPTY_DISK) trogdor.dsk
$(DOS33_RAW) trogdor.dsk 0 0 QBOOT 0 1
$(DOS33_RAW) trogdor.dsk 0 2 QBOOT 1 1
@ -17,6 +17,7 @@ trogdor.dsk: QBOOT QLOAD music.inc qload.inc \
$(DOS33_RAW) trogdor.dsk 1 0 QLOAD 0 0
$(DOS33_RAW) trogdor.dsk 4 0 MUSIC 0 0
$(DOS33_RAW) trogdor.dsk 6 0 FLAMES 0 0
$(DOS33_RAW) trogdor.dsk 8 0 COUNTRYSIDE 0 0
$(DOS33_RAW) trogdor.dsk 11 0 TITLE 0 0
$(DOS33_RAW) trogdor.dsk 12 0 TROGDOR 0 0
@ -136,7 +137,7 @@ flames.inc: generate_common FLAMES
./generate_common -a 0xe300 -s left_flame_big_mask flames.lst >> flames.inc
./generate_common -a 0xe300 -s right_flame_big_mask flames.lst >> flames.inc
####
FLAMES: flames.o
ld65 -o FLAMES flames.o -C $(LINKER_SCRIPTS)/apple2_e300.inc
@ -145,6 +146,15 @@ flames.o: flames.s \
graphics/flame_sprites.inc
ca65 -o flames.o flames.s -l flames.lst
####
COUNTRYSIDE: countryside.o
ld65 -o COUNTRYSIDE countryside.o -C $(LINKER_SCRIPTS)/apple2_fa00.inc
countryside.o: countryside.s \
graphics/flame_sprites.inc
ca65 -o countryside.o countryside.s -l countryside.lst
###
TITLE: title.o

View File

@ -127,8 +127,30 @@ Space:
2680 trog11_cottage.hgr.zx02
=====
28281 = 28k or so
$0000-$00ff = zero page
$0100-$01ff = stack
$0200-$02ff = group table
$0300-$0369 = preshift table
$0400-$07FF = text/lores PAGE1
$0800-$08ff = QBOOT (can be over-written)
$0900-$0BFF = text/lores PAGE2 (empty)
$0C00-$0FFF = appears empty?
$1000-$11FF = QBOOT_STAGE2
$1200-$188A = QLOAD ($68A, 1676)
$1C00-$1CFF = mod7_table
$1D00-$1DFF = div7_table
$1E00-$1EFF = hposn_low
$1F00-$2000 = hposn_high
$2000-$3FFF = page1 (8k)
$4000-$5fff = page2 (8k)
$6000-$7fff = off-screen draw (8k)
$8000-$BFFF = 16k for TROGDOR
$C000-$CFFF = I/O
$D000 - $E2FF = MUSIC ($12DF in size) 4831
$E300 - $FA00 = FLAMES ($1650 in size) 5712
$E300 - $F9FF = FLAMES ($1650 in size) 5712
$FA00 - $FEFF = COUNTRYSIDE ($498 in side) 1176

View File

@ -0,0 +1,2 @@
countryside2_data:
.incbin "graphics/trog02_countryside.hgr.zx02"

View File

@ -164,21 +164,27 @@ error_string:
which_disk_array:
.byte 1,1,1,1 ; MUSIC, TROGDOR, TITLE, FLAMES
.byte 1 ; COUNTRYSIDE
load_address_array:
.byte $D0,$80,$40,$E3 ; MUSIC, TROGDOR, TITLE, FLAMES
.byte $FA ; COUNTRYSIDE
start_address:
.byte $D0,$80,$40,$E3 ; MUSIC, TROGDOR, TITLE, FLAMES
.byte $FA ; COUNTRYSIDE
track_array:
.byte 4,12,11,6 ; MUSIC, TROGDOR, TITLE, FLAMES
.byte 8 ; COUNTRYSIDE
sector_array:
.byte 0,0,0,0 ; MUSIC, TROGDOR, TITLE, FLAMES
.byte 0 ; COUNTRYSIDE
length_array:
.byte 32,64,32,24 ; MUSIC, TROGDOR, TITLE, FLAMES
.byte 5 ; COUNTRYSIDE
PT3_ENABLE_APPLE_IIC = 1

View File

@ -189,6 +189,20 @@ load_flames:
sta WHICH_LOAD
jsr load_file
;=======================
;=======================
; Load COUNTRYSIDE
;=======================
;=======================
load_countryside:
; load from disk
lda #4 ; COUNTRYSIDE
sta WHICH_LOAD
jsr load_file
;=======================
;=======================

View File

@ -256,7 +256,7 @@ left_flame_animate2:
;======================================
; draw SCENE 2
; draw SCENE 3
;======================================
; scroll trogdor intro place
@ -293,6 +293,50 @@ scroll_in_loop:
jsr wait_ticks
;======================================
; draw SCENE 4
;======================================
; countrside scrolls in
; roughly 45 frames? 1.5s?
; only 9 bytes wide
; decompress countryside to $2000
lda #<trog01_graphics
sta zx_src_l+1
lda #>trog01_graphics
sta zx_src_h+1
lda #$20
jsr zx02_full_decomp
lda #9
sta ANIMATE_COUNT
countryside_pan_loop:
jsr horiz_pan_skip
dec ANIMATE_COUNT
bne countryside_pan_loop
;======================================
; draw SCENE 5
;======================================
; trogdor man: 42 frames
; flames: left: llll1122
; flames: bb
; flames: right 22112211ss
; flames: left ss11221122ss
; flames gone: 30 frames (roughly 1s)
; dragon man: 160 frames (roughly 5s)
; dragon: 150 frames (roughly 5s)
; dragon zoom: 5 frames
; dragon: 5 frames \
; dragon zoom: 5 frames / repeat 6 times
; dragon zoom scroll off screen: 30 frames
; white screen: 20 frames
; 916
;=======================================
@ -300,12 +344,12 @@ scroll_in_loop:
; second
lda #<trog03_graphics
sta zx_src_l+1
lda #>trog03_graphics
sta zx_src_h+1
lda #$20
jsr zx02_full_decomp
; lda #<trog03_graphics
; sta zx_src_l+1
; lda #>trog03_graphics
; sta zx_src_h+1
; lda #$20
; jsr zx02_full_decomp
@ -336,8 +380,11 @@ finished:
trog00_graphics:
.incbin "graphics/actual00_trog_cottage.hgr.zx02"
trog03_graphics:
.incbin "graphics/trog03_man.hgr.zx02"
trog01_graphics:
.incbin "graphics/trog01_countryside.hgr.zx02"
;trog03_graphics:
;.incbin "graphics/trog03_man.hgr.zx02"
.include "wait_keypress.s"
.include "irq_wait.s"

View File

@ -0,0 +1,12 @@
MEMORY {
ZP: start = $00, size = $1A, type = rw;
RAM: start = $FA00, size = $500, file = %O;
}
SEGMENTS {
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
}