peasant: move most hgr routines to qload

also, escaping a $ in a Makefile is trickier than you'd think
This commit is contained in:
Vince Weaver 2021-09-26 15:41:43 -04:00
parent 9d1c9edfb0
commit 601c6fafb4
16 changed files with 164 additions and 114 deletions

View File

@ -57,7 +57,19 @@ QLOAD: qload.o
ld65 -o QLOAD qload.o -C $(LINKER_SCRIPTS)/apple2_b00.inc
qload.o: qload.s qboot.inc \
decompress_fast_v2.s
decompress_fast_v2.s \
hgr_font.s \
draw_box.s \
hgr_rectangle.s \
hgr_7x28_sprite_mask.s \
hgr_1x5_sprite.s \
hgr_partial_save.s \
hgr_input.s \
hgr_tables.s \
hgr_text_box.s \
clear_bottom.s \
hgr_hgr2.s \
gr_offsets.s
ca65 -o qload.o qload.s -l qload.lst
###
@ -82,6 +94,27 @@ qload.inc: generate_common QLOAD
./generate_common -a 0xb00 -s load_file qload.lst > qload.inc
./generate_common -a 0xb00 -s decompress_lzsa2_fast qload.lst >> qload.inc
./generate_common -a 0xb00 -s getsrc_smc qload.lst >> qload.inc
./generate_common -a 0xb00 -s hgr2 qload.lst >> qload.inc
./generate_common -a 0xb00 -s hgr_make_tables qload.lst >> qload.inc
./generate_common -a 0xb00 -s hgr_put_string qload.lst >> qload.inc
./generate_common -a 0xb00 -s save_bg_7x28 qload.lst >> qload.inc
./generate_common -a 0xb00 -s restore_bg_7x28 qload.lst >> qload.inc
./generate_common -a 0xb00 -s hgr_draw_sprite_7x28 qload.lst >> qload.inc
./generate_common -a 0xb00 -s input_buffer qload.lst >> qload.inc
./generate_common -a 0xb00 -s hgr_text_box qload.lst >> qload.inc
./generate_common -a 0xb00 -s hgr_partial_restore qload.lst >> qload.inc
./generate_common -a 0xb00 -s clear_bottom qload.lst >> qload.inc
./generate_common -a 0xb00 -s hgr_input qload.lst >> qload.inc
./generate_common -a 0xb00 -s hgr_partial_save qload.lst >> qload.inc
./generate_common -a 0xb00 -s draw_box qload.lst >> qload.inc
./generate_common -a 0xb00 -s disp_put_string qload.lst >> qload.inc
./generate_common -a 0xb00 -s disp_one_line qload.lst >> qload.inc
./generate_common -a 0xb00 -s invert_smc1 qload.lst >> qload.inc
./generate_common -a 0xb00 -s disp_put_string_cursor qload.lst >> qload.inc
./generate_common -a 0xb00 -s hgr_put_char_cursor qload.lst >> qload.inc
./generate_common -a 0xb00 -s vgi_simple_rectangle qload.lst >> qload.inc
echo "hposn_high = \$$BA00" >> qload.inc
echo "hposn_low = \$$BB00" >> qload.inc
####
@ -100,7 +133,8 @@ music.inc: generate_common MUSIC
VID_LOGO: vid_logo.o
ld65 -o VID_LOGO vid_logo.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
vid_logo.o: vid_logo.s decompress_fast_v2.s hgr_overlay.s speaker_beeps.s \
vid_logo.o: vid_logo.s qload.inc \
decompress_fast_v2.s hgr_overlay.s speaker_beeps.s \
graphics_vid/vid_graphics.inc
ca65 -o vid_logo.o vid_logo.s -l vid_logo.lst

View File

@ -1,3 +1,7 @@
peasant2 18302
18043 (decompress fast moved)
15899 (much of hgr code moved to qload)
Notes
~~~~~
Some people would like actual S.A.M. support like the original game,

View File

@ -114,14 +114,14 @@ forever:
;.include "decompress_fast_v2.s"
.include "wait_keypress.s"
.include "hgr_font.s"
.include "draw_box.s"
.include "hgr_rectangle.s"
.include "hgr_input.s"
.include "hgr_tables.s"
.include "hgr_text_box.s"
.include "hgr_partial_save.s"
.include "hgr_hgr2.s"
;.include "hgr_font.s"
;.include "draw_box.s"
;.include "hgr_rectangle.s"
;.include "hgr_input.s"
;.include "hgr_tables.s"
;.include "hgr_text_box.s"
;.include "hgr_partial_save.s"
;.include "hgr_hgr2.s"
.include "graphics_copy/copy_graphics.inc"

View File

@ -1,3 +1,4 @@
; Peasant's Quest Ending
; The credits scenes
@ -538,26 +539,18 @@ peasant_text:
;.include "decompress_fast_v2.s"
.include "wait_keypress.s"
.include "hgr_font.s"
.include "draw_box.s"
.include "hgr_rectangle.s"
.include "hgr_1x5_sprite.s"
.include "hgr_partial_save.s"
.include "hgr_input.s"
.include "hgr_tables.s"
.include "hgr_text_box.s"
;.include "draw_peasant.s"
;.include "hgr_save_restore.s"
;.include "clear_bottom.s"
;.include "gr_offsets.s"
;.include "gr_copy.s"
;.include "version.inc"
;.include "hgr_font.s"
;.include "draw_box.s"
;.include "hgr_rectangle.s"
;.include "hgr_1x5_sprite.s"
;.include "hgr_partial_save.s"
;.include "hgr_input.s"
;.include "hgr_tables.s"
;.include "hgr_text_box.s"
.include "hgr_14x14_sprite_mask.s"
.include "hgr_sprite.s"
.include "hgr_hgr2.s"
;.include "hgr_hgr2.s"
.include "score.s"

View File

@ -67,7 +67,6 @@ int main(int argc, char **argv) {
}
find_address(symbol,routine_offset);
printf("\n");
fclose(fff);

View File

@ -162,17 +162,18 @@ escape_handler:
.include "draw_peasant.s"
.include "hgr_font.s"
.include "draw_box.s"
.include "hgr_rectangle.s"
.include "hgr_7x28_sprite.s"
;.include "hgr_font.s"
;.include "draw_box.s"
;.include "hgr_rectangle.s"
;.include "hgr_7x28_sprite.s"
;.include "hgr_partial_save.s"
;.include "hgr_input.s"
;.include "hgr_tables.s"
;.include "hgr_text_box.s"
;.include "hgr_hgr2.s"
.include "hgr_1x5_sprite.s"
;.include "hgr_save_restore.s"
.include "hgr_partial_save.s"
.include "hgr_input.s"
.include "hgr_tables.s"
.include "hgr_text_box.s"
.include "hgr_hgr2.s"
.include "wait.s"
.include "wait_a_bit.s"

View File

@ -1,16 +1,8 @@
pt3_init_song =$d8e9
mockingboard_init =$db21
reset_ay_both =$db30
clear_ay_both =$db72
mockingboard_setup_interrupt =$db7f
mockingboard_disable_interrupt =$dbb9
done_pt3_irq_handler =$dc31
PT3_LOC =$dd00

View File

@ -153,18 +153,17 @@ peasant_text:
.include "draw_peasant.s"
.include "hgr_font.s"
.include "draw_box.s"
.include "hgr_rectangle.s"
.include "hgr_7x28_sprite_mask.s"
.include "hgr_1x5_sprite.s"
;.include "hgr_save_restore.s"
.include "hgr_partial_save.s"
.include "hgr_input.s"
.include "hgr_tables.s"
.include "hgr_text_box.s"
.include "clear_bottom.s"
.include "hgr_hgr2.s"
;.include "hgr_font.s"
;.include "draw_box.s"
;.include "hgr_rectangle.s"
;.include "hgr_7x28_sprite_mask.s"
;.include "hgr_1x5_sprite.s"
;.include "hgr_partial_save.s"
;.include "hgr_input.s"
;.include "hgr_tables.s"
;.include "hgr_text_box.s"
;.include "clear_bottom.s"
;.include "hgr_hgr2.s"
.include "gr_copy.s"

View File

@ -147,25 +147,24 @@ peasant_text:
.byte 25,2,"Peasant's Quest",0
;.include "decompress_fast_v2.s"
.include "wait_keypress.s"
.include "draw_peasant.s"
.include "hgr_font.s"
.include "draw_box.s"
.include "hgr_rectangle.s"
.include "hgr_7x28_sprite_mask.s"
.include "hgr_1x5_sprite.s"
;.include "hgr_font.s"
;.include "draw_box.s"
;.include "hgr_rectangle.s"
;.include "hgr_7x28_sprite_mask.s"
;.include "hgr_1x5_sprite.s"
;.include "hgr_partial_save.s"
;.include "hgr_input.s"
;.include "hgr_tables.s"
;.include "hgr_text_box.s"
;.include "clear_bottom.s"
;.include "hgr_hgr2.s"
;.include "hgr_save_restore.s"
.include "hgr_partial_save.s"
.include "hgr_input.s"
.include "hgr_tables.s"
.include "hgr_text_box.s"
.include "clear_bottom.s"
.include "hgr_hgr2.s"
.include "gr_copy.s"

View File

@ -153,18 +153,17 @@ peasant_text:
.include "draw_peasant.s"
.include "hgr_font.s"
.include "draw_box.s"
.include "hgr_rectangle.s"
.include "hgr_7x28_sprite_mask.s"
.include "hgr_1x5_sprite.s"
;.include "hgr_save_restore.s"
.include "hgr_partial_save.s"
.include "hgr_input.s"
.include "hgr_tables.s"
.include "hgr_text_box.s"
.include "clear_bottom.s"
.include "hgr_hgr2.s"
;.include "hgr_font.s"
;.include "draw_box.s"
;.include "hgr_rectangle.s"
;.include "hgr_7x28_sprite_mask.s"
;.include "hgr_1x5_sprite.s"
;.include "hgr_partial_save.s"
;.include "hgr_input.s"
;.include "hgr_tables.s"
;.include "hgr_text_box.s"
;.include "clear_bottom.s"
;.include "hgr_hgr2.s"
.include "gr_copy.s"

View File

@ -156,18 +156,17 @@ peasant_text:
.include "draw_peasant.s"
.include "hgr_font.s"
.include "draw_box.s"
.include "hgr_rectangle.s"
.include "hgr_7x28_sprite_mask.s"
.include "hgr_1x5_sprite.s"
;.include "hgr_save_restore.s"
.include "hgr_partial_save.s"
.include "hgr_input.s"
.include "hgr_tables.s"
.include "hgr_text_box.s"
.include "clear_bottom.s"
.include "hgr_hgr2.s"
;.include "hgr_font.s"
;.include "draw_box.s"
;.include "hgr_rectangle.s"
;.include "hgr_7x28_sprite_mask.s"
;.include "hgr_1x5_sprite.s"
;.include "hgr_partial_save.s"
;.include "hgr_input.s"
;.include "hgr_tables.s"
;.include "hgr_text_box.s"
;.include "clear_bottom.s"
;.include "hgr_hgr2.s"
.include "gr_copy.s"

View File

@ -1,6 +1,24 @@
load_file =$0b20
decompress_lzsa2_fast =$0de6
getsrc_smc =$0edc
hgr2 =$16d1
hgr_make_tables =$15c0
hgr_put_string =$0ee9
save_bg_7x28 =$1417
restore_bg_7x28 =$1438
hgr_draw_sprite_7x28 =$13bd
input_buffer =$1598
hgr_text_box =$1636
hgr_partial_restore =$1516
clear_bottom =$16a6
hgr_input =$153e
hgr_partial_save =$14e7
draw_box =$126e
disp_put_string =$1668
disp_one_line =$167c
invert_smc1 =$0f64
disp_put_string_cursor =$1678
hgr_put_char_cursor =$0f15
vgi_simple_rectangle =$12ef
hposn_high = $BA00
hposn_low = $BB00

View File

@ -237,6 +237,18 @@ length_array:
.include "decompress_fast_v2.s"
.include "hgr_font.s"
.include "draw_box.s"
.include "hgr_rectangle.s"
.include "hgr_7x28_sprite_mask.s"
.include "hgr_1x5_sprite.s"
.include "hgr_partial_save.s"
.include "hgr_input.s"
.include "hgr_tables.s"
.include "hgr_text_box.s"
.include "clear_bottom.s"
.include "hgr_hgr2.s"
.include "gr_offsets.s"
qload_end:

View File

@ -246,10 +246,10 @@ altfire_good:
.include "directions.s"
.include "hgr_font.s"
.include "hgr_tables.s"
;.include "hgr_font.s"
;.include "hgr_tables.s"
.include "hgr_hgr2.s"
;.include "hgr_hgr2.s"
.include "pt3_lib_mockingboard_patch.s"

View File

@ -316,23 +316,23 @@ peasant_text:
.include "hgr_font.s"
.include "draw_box.s"
.include "hgr_rectangle.s"
;.include "hgr_font.s"
;.include "draw_box.s"
;.include "hgr_rectangle.s"
.include "hgr_1x5_sprite.s"
;.include "hgr_1x5_sprite.s"
;.include "draw_peasant.s"
;.include "hgr_7x28_sprite_mask.s"
;.include "hgr_save_restore.s"
.include "hgr_partial_save.s"
.include "hgr_input.s"
.include "hgr_tables.s"
.include "hgr_text_box.s"
.include "clear_bottom.s"
.include "gr_offsets.s"
.include "hgr_hgr2.s"
;.include "hgr_partial_save.s"
;.include "hgr_input.s"
;.include "hgr_tables.s"
;.include "hgr_text_box.s"
;.include "clear_bottom.s"
;.include "gr_offsets.s"
;.include "hgr_hgr2.s"
.include "gr_copy.s"

View File

@ -11,6 +11,7 @@
.include "hardware.inc"
.include "zp.inc"
.include "qload.inc"
intro_text:
@ -408,7 +409,7 @@ delays:
.include "decompress_fast_v2.s"
;.include "decompress_fast_v2.s"
.include "hgr_overlay.s"
.include "speaker_beeps.s"
@ -429,7 +430,7 @@ delays:
.include "wait.s"
.include "hgr_hgr2.s"
;.include "hgr_hgr2.s"
.include "graphics_vid/vid_graphics.inc"