diff --git a/games/peasant/Makefile b/games/peasant/Makefile index b94185ac..f4ccad71 100644 --- a/games/peasant/Makefile +++ b/games/peasant/Makefile @@ -38,7 +38,7 @@ qboot_sector.o: qboot_sector.s qboot_stage2.s ### QLOAD: qload.o - ld65 -o QLOAD qload.o -C $(LINKER_SCRIPTS)/apple2_e00.inc + ld65 -o QLOAD qload.o -C $(LINKER_SCRIPTS)/apple2_b00.inc qload.o: qload.s qboot.inc ca65 -o qload.o qload.s -l qload.lst diff --git a/games/peasant/intro.s b/games/peasant/intro.s index d300e61f..dd166cc8 100644 --- a/games/peasant/intro.s +++ b/games/peasant/intro.s @@ -7,6 +7,7 @@ .include "hardware.inc" .include "zp.inc" +.include "qload.inc" @@ -24,10 +25,6 @@ peasant_quest: ; hack! modify the PT3 file to ignore the latter half - PT3_LOC=$E00+$E00 - pt3_init_song=$e00+$A56 - pt3_clear_ay_both=$e00+$CDF - lda #$ff ; end after 4 patterns sta PT3_LOC+$C9+$4 diff --git a/games/peasant/intro_knight.s b/games/peasant/intro_knight.s index f915bf93..5f2897fc 100644 --- a/games/peasant/intro_knight.s +++ b/games/peasant/intro_knight.s @@ -116,7 +116,7 @@ done_knight: ; after OK stuff goes on here sei ; turn off music - jsr pt3_clear_ay_both + jsr clear_ay_both jsr draw_peasant diff --git a/games/peasant/qboot_sector.s b/games/peasant/qboot_sector.s index 0bf23128..95432061 100644 --- a/games/peasant/qboot_sector.s +++ b/games/peasant/qboot_sector.s @@ -3,11 +3,11 @@ ; Paramaters for loading QLOAD - sectors = 18 ; user-defined + sectors = 21 ; user-defined firsttrk = 1 ; user-defined, first track to read firstsec = 0 ; user-defined, first sector to read - address = $0E ; user-defined - entry = $E00 ; user-defined + address = $0B ; user-defined + entry = $B00 ; user-defined version = 1 ;memory usage: diff --git a/games/peasant/qload.inc b/games/peasant/qload.inc new file mode 100644 index 00000000..650222ff --- /dev/null +++ b/games/peasant/qload.inc @@ -0,0 +1,13 @@ +; Danger: if you mess with QLOAD you'll have to update these + +QLOAD_LOC=$B00 +pt3_init_song=QLOAD_LOC+$BF9 +clear_ay_both=QLOAD_LOC+$E82 +reset_ay_both=QLOAD_LOC+$E40 +mockingboard_setup_interrupt=QLOAD_LOC+$E8F +mockingboard_init=QLOAD_LOC+$E31 +mockingboard_patch=QLOAD_LOC+$F67 +mockingboard_detect=QLOAD_LOC+$F38 + +PT3_LOC=QLOAD_LOC+$1000 + diff --git a/games/peasant/qload.s b/games/peasant/qload.s index 590013d8..89eb1181 100644 --- a/games/peasant/qload.s +++ b/games/peasant/qload.s @@ -1,4 +1,4 @@ -; Loader for MIST +; Loader for Peasant's Quest .include "zp.inc" @@ -20,8 +20,8 @@ tmpsec = $3C qload_start: ; init the write code -; lda WHICH_SLOT -; jsr popwr_init + lda WHICH_SLOT + jsr popwr_init ; first time entry ; start by loading text title @@ -233,7 +233,7 @@ length_array: .byte 1,1,1,1,1 ; .byte 1 ; -;.include "qkumba_popwr.s" +.include "qkumba_popwr.s" ; pt3 player .include "pt3_lib_detect_model.s" @@ -256,4 +256,4 @@ peasant_pt3: qload_end: ;.assert (>qload_end - >qload_start) < $e , error, "loader too big" -.assert (>qload_end - >qload_start) < $12 , error, "loader too big" +.assert (>qload_end - >qload_start) < $15 , error, "loader too big" diff --git a/games/peasant/title.s b/games/peasant/title.s index ab3bd214..b3be353e 100644 --- a/games/peasant/title.s +++ b/games/peasant/title.s @@ -5,6 +5,7 @@ .include "hardware.inc" .include "zp.inc" +.include "qload.inc" title: jsr HGR2 ; Hi-res graphics, no text at bottom @@ -14,13 +15,6 @@ title: ; Music ;======================== -pt3_init_song=$e00+$A56 -clear_ay_both=$e00+$CDF -reset_ay_both=$e00+$C9D -mockingboard_setup_interrupt=$e00+$CEC -mockingboard_init=$e00+$C8E -mockingboard_patch=$e00+$DC4 -mockingboard_detect=$e00+$D95 ;=================================== ; Setup Mockingboard diff --git a/games/peasant/zp.inc b/games/peasant/zp.inc index fb32b474..130a4aec 100644 --- a/games/peasant/zp.inc +++ b/games/peasant/zp.inc @@ -109,3 +109,4 @@ VGI_RXRUN = P3 VGI_RYRUN = P4 VGI_RCOLOR2 = P5 ; only for dither COUNT = TEMP5 + diff --git a/linker_scripts/apple2_b00.inc b/linker_scripts/apple2_b00.inc new file mode 100644 index 00000000..0280f942 --- /dev/null +++ b/linker_scripts/apple2_b00.inc @@ -0,0 +1,12 @@ +MEMORY { + ZP: start = $00, size = $1A, type = rw; + RAM: start = $B00, size = $8E00, file = %O; +} + +SEGMENTS { +CODE: load = RAM, type = ro, align = $100; +RODATA: load = RAM, type = ro; +DATA: load = RAM, type = rw; +BSS: load = RAM, type = bss, define = yes; +ZEROPAGE: load = ZP, type = zp; +}