From ee893868cdcbb91be9be943e544f3ca927f83bb5 Mon Sep 17 00:00:00 2001 From: hkz Date: Wed, 20 Aug 2025 11:58:04 +0200 Subject: [PATCH] Update the Makefile to generate woz images --- Makefile | 8 ++++++-- linker-files/linker.scm | 5 ++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 7d73b8c..1cfcfb9 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ C_SRCS = main.c monitor_subroutines.c utility.c \ # Object files OBJS = $(ASM_SRCS:%.s=%.o) $(C_SRCS:%.c=%.o) -all: $(PRG).wav $(PRG).dsk +all: $(PRG).wav $(PRG).woz %.o: %.s as6502 --core=6502 --list-file=$(@:%.o=obj/%.lst) -o obj/$@ $< @@ -41,10 +41,14 @@ $(PRG).wav: $(PRG).bin $(PRG).dsk: $(PRG).bin (cd out ; cp ../dsk/TK2048_AUTO_BRUN.dsk ./$(PRG).dsk; cat $(PRG).bin | $(JAVA) -jar $(ACMD) -p $(PRG).dsk HELLO B 0x801) +$(PRG).woz: $(PRG).dsk + (cd out ; dsk2woz ./$(PRG).dsk ./$(PRG).woz) + clean: -(cd obj ; rm $(OBJS) $(OBJS:%.o=%.lst)) -rm obj/*.lst -rm out/*.hex -rm out/*.bin -rm out/*.wav - -rm out/*.dsk \ No newline at end of file + -rm out/*.dsk + -rm out/*.woz \ No newline at end of file diff --git a/linker-files/linker.scm b/linker-files/linker.scm index 6567025..1a74116 100644 --- a/linker-files/linker.scm +++ b/linker-files/linker.scm @@ -1,11 +1,10 @@ (define memories -;;; '((memory zeroPage (address (#x72 . #xdf)) (type ram) ;;; Should be starting at 0x56, ending at 0xff, but experiments in the monitor have shown doc is not to be trusted - '((memory zeroPage (address (#x56 . #xff)) (type ram) ;;; Should be starting at 0x56, ending at 0xff, but experiments in the monitor have shown doc is not to be trusted + '((memory zeroPage (address (#x56 . #xff)) (type ram) ;;; Should be starting at 0x56, ending at 0xff, but experiments in the monitor have shown doc is not to be trusted if monitor routines are used (section registers zpage zzpage)) (memory firstPage (address (#x100 . #x1ff)) (section stack)) (memory reserved (address (#x200 . #x7ff)) (type ram)) (memory program (address (#x801 . #x1fff)) (type ram) - (section (programStart #x801) startup code)) + (section (programStart #x801) (dii_critical_wr_code #x804) dii_critical_rd_code startup code)) (memory displayPage1 (address (#x2000 . #x3fff)) (type ram) (section loadscreen)) (memory upperData (address (#x4000 . #x85ff)) (type ram) (section switch idata cdata data_init_table)) ;;; usermem goes from 0x4000 to 0x9FFFF (included), we are splitting it (memory upperMem (address (#x8600 . #x95ff)) (type ram) (section cstack zdata data heap zpsave))