trogdor: try to make it all fit

This commit is contained in:
Vince Weaver 2024-01-29 00:15:32 -05:00
parent cf912b10e7
commit 1808c065df
6 changed files with 69 additions and 46 deletions

View File

@ -43,8 +43,8 @@ qload.o: zp.inc hardware.inc music.inc qload.s \
hgr_copy_magnify.s \
vertical_scroll.s \
hgr_copy_part.s \
gr_offsets.s \
wait.s wait_a_bit.s \
gr_offsets.s vertical_scroll_down.s \
wait.s wait_a_bit.s do_flames.s \
lc_detect.s \
hgr_clear_screen.s hgr_copy_fast.s \
text_print.s start.s \
@ -57,25 +57,6 @@ qload.o: zp.inc hardware.inc music.inc qload.s \
####
QLOAD2: qload2.o
ld65 -o QLOAD2 qload2.o -C $(LINKER_SCRIPTS)/apple2_1200.inc
qload2.o: qload2.s \
zp.inc hardware.inc music2.inc \
gr_offsets.s \
wait.s wait_a_bit.s \
lc_detect.s gr_fast_clear.s \
text_print.s start2.s \
hardware_detect.s \
hgr_table.s \
pt3_lib_detect_model.s pt3_lib_mockingboard_detect.s \
pt3_lib_mockingboard_setup.s interrupt_handler.s \
pt3_lib_mockingboard_patch.s
ca65 -o qload2.o qload2.s -l qload2.lst
####
qload.inc: generate_common QLOAD
./generate_common -a 0x1200 -s load_file qload.lst > qload.inc
./generate_common -a 0x1200 -s detect_appleii_model qload.lst >> qload.inc
@ -105,6 +86,16 @@ qload.inc: generate_common QLOAD
./generate_common -a 0x1200 -s hgr_vertical_scroll_left qload.lst >> qload.inc
./generate_common -a 0x1200 -s horiz_pan_skip qload.lst >> qload.inc
./generate_common -a 0x1200 -s hgr_copy_magnify qload.lst >> qload.inc
./generate_common -a 0x1200 -s hgr_vertical_scroll_down_left qload.lst >> qload.inc
./generate_common -a 0x1200 -s hgr_copy_right qload.lst >> qload.inc
./generate_common -a 0x1200 -s hgr_copy_left qload.lst >> qload.inc
./generate_common -a 0x1200 -s do_flames qload.lst >> qload.inc
./generate_common -a 0x1200 -s wait_ticks qload.lst >> qload.inc
./generate_common -a 0x1200 -s draw_twin_flames_tall_2 qload.lst >> qload.inc
./generate_common -a 0x1200 -s draw_twin_flames_tall_1 qload.lst >> qload.inc
./generate_common -a 0x1200 -s draw_twin_flames_low qload.lst >> qload.inc
./generate_common -a 0x1200 -s draw_flame_tall_1 qload.lst >> qload.inc
./generate_common -a 0x1200 -s draw_flame_tall_2 qload.lst >> qload.inc
####

View File

@ -138,7 +138,9 @@ Space:
$0C00-$0FFF = appears empty?
$1000-$11FF = QBOOT_STAGE2
$1200-$188A = QLOAD ($68A, 1676)
($b12, 2834)
$1200-$1D12 = QLOAD
; need 1623 for strongbad ($657)
$1C00-$1CFF = mod7_table
$1D00-$1DFF = div7_table
$1E00-$1EFF = hposn_low

View File

@ -46,3 +46,42 @@ hgr_copy_inner_loop:
rts ; 6
;=========================================
; hgr_copy_right
;=========================================
; copy right side of $6000 to current page
hgr_copy_right:
lda #0
sta COPY_Y1
sta SPRITE_Y
lda #10
sta SPRITE_X
lda #20
sta COPY_X1
lda #20
sta COPY_WIDTH
lda #191
sta COPY_Y2
jmp hgr_copy_part ; tail call
;=========================================
; hgr_copy_left
;=========================================
; copy left side of $6000 to current page
hgr_copy_left:
lda #0
sta COPY_X1
sta COPY_Y1
sta SPRITE_Y
lda #10
sta SPRITE_X
lda #20
sta COPY_WIDTH
lda #191
sta COPY_Y2
jmp hgr_copy_part ; tail call

View File

@ -1,11 +1,7 @@
;div7_table = $b800
;mod7_table = $b900
;hposn_high = $ba00
;hposn_low = $bb00
hgr_make_tables:
.if 0
;=====================
; make /7 %7 tables
;=====================
@ -42,7 +38,7 @@ mod7_loop:
mod7_not7:
iny
bne mod7_loop
.endif
; Hposn table

View File

@ -217,6 +217,11 @@ hposn_high = $1f00
.include "hgr_copy_magnify.s"
.include "vertical_scroll.s"
.include "hgr_copy_part.s"
.include "vertical_scroll_down.s"
.include "flames.inc"
.include "do_flames.s"
.include "irq_wait.s"
qload_end:

View File

@ -6,6 +6,9 @@
.include "music.inc"
.include "flames.inc"
hposn_low = $1e00
hposn_high = $1f00
trogdor_main:
;======================================
@ -77,7 +80,6 @@ trog_no_music:
jsr hgr_page_flip
.if 0
;======================================
; draw SCENE 2
;======================================
@ -741,7 +743,7 @@ scroll_in_loop2:
lda #10
jsr wait_ticks
.endif
;======================================
; draw SCENE 13
;======================================
@ -892,9 +894,6 @@ done_upside_down_flame:
jsr wait_ticks
; TODO
;======================================
; draw SCENE 15
;======================================
@ -1122,7 +1121,7 @@ trog04_graphics:
.include "wait_keypress.s"
.include "irq_wait.s"
;.include "irq_wait.s"
peasant_data_x1:
@ -1138,18 +1137,9 @@ peasant_data_sprite_x:
peasant_data_sprite_y:
.byte 92, 30, 91, 2, 8
hposn_low = $1e00
hposn_high = $1f00
; .include "do_flames.s"
;.include "hgr_sprite_big_mask.s"
;.include "horiz_scroll_simple.s"
;.include "horiz_scroll_skip.s"
;.include "hgr_copy_magnify.s"
;.include "vertical_scroll.s"
;.include "hgr_copy_part.s"
.include "vertical_scroll_down.s"
.include "do_flames.s"
.if 0
;=========================================
; hgr_copy_right
@ -1189,7 +1179,7 @@ hgr_copy_left:
jmp hgr_copy_part ; tail call
.endif
;==========================
; man flames