From bb67042ebf97b1db64e5e2a2835b2dd1dbd17af6 Mon Sep 17 00:00:00 2001 From: nino-porcino Date: Thu, 16 Dec 2021 18:32:31 +0100 Subject: [PATCH] separate apple1 target files; include defines in target files --- kickc/apple1.ld | 4 ++-- kickc/apple1.tgt | 8 ++++++-- kickc/apple1_jukebox.ld | 6 ++++++ kickc/apple1_jukebox.tgt | 16 ++++++++++++++++ kickc/vic20_8k.tgt | 3 ++- tools/build.bat | 4 ++-- 6 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 kickc/apple1_jukebox.ld create mode 100644 kickc/apple1_jukebox.tgt diff --git a/kickc/apple1.ld b/kickc/apple1.ld index ed73a93..69b9717 100644 --- a/kickc/apple1.ld +++ b/kickc/apple1.ld @@ -1,6 +1,6 @@ // Apple 1 .file [name="%O", type="prg", segments="Program"] .segmentdef Program [segments="Code, Data"] -.segmentdef Code [start=%P,outBin="apple1_codeseg.bin"] -.segmentdef Data [start=$0280,min=$0280,max=$0fff,outBin="apple1_dataseg.bin"] +.segmentdef Code [start=%P] +.segmentdef Data [startAfter="Code"] diff --git a/kickc/apple1.tgt b/kickc/apple1.tgt index 2c4e65e..de6055d 100644 --- a/kickc/apple1.tgt +++ b/kickc/apple1.tgt @@ -1,10 +1,14 @@ { "extension": "prg", "link": "apple1.ld", - "start_address": "0x2000", + "start_address": "0x280", "cpu": "MOS6502X", "interrupt": "hardware_all", - "emulator": "x64sc" + "emulator": "x64sc", + "defines": { + "__APPLE1__": 1, + "APPLE1": 1 + } } diff --git a/kickc/apple1_jukebox.ld b/kickc/apple1_jukebox.ld new file mode 100644 index 0000000..c927331 --- /dev/null +++ b/kickc/apple1_jukebox.ld @@ -0,0 +1,6 @@ +// Apple 1 +.file [name="%O", type="prg", segments="Program"] +.segmentdef Program [segments="Code, Data"] +.segmentdef Code [start=$4000,min=$4000,max=$7fff,outBin="apple1_codeseg.bin"] +.segmentdef Data [start=$0280,min=$0280,max=$0fff,outBin="apple1_dataseg.bin"] + diff --git a/kickc/apple1_jukebox.tgt b/kickc/apple1_jukebox.tgt new file mode 100644 index 0000000..4267bb7 --- /dev/null +++ b/kickc/apple1_jukebox.tgt @@ -0,0 +1,16 @@ +{ + "extension": "prg", + "link": "apple1_jukebox.ld", + "start_address": "0x4000", + "cpu": "MOS6502X", + "interrupt": "hardware_all", + "emulator": "x64sc", + "defines": { + "__APPLE1__": 1, + "APPLE1": 1, + "APPLE1_JUKEBOX": 1 + } +} + + + diff --git a/kickc/vic20_8k.tgt b/kickc/vic20_8k.tgt index eca4740..0355e9e 100644 --- a/kickc/vic20_8k.tgt +++ b/kickc/vic20_8k.tgt @@ -7,6 +7,7 @@ "interrupt": "rom_min_vic20", "emulator": "xvic", "defines": { - "__VIC20__": 1 + "__VIC20__": 1, + "VIC20": 1 } } \ No newline at end of file diff --git a/tools/build.bat b/tools/build.bat index 0959a00..13009e8 100644 --- a/tools/build.bat +++ b/tools/build.bat @@ -3,11 +3,11 @@ @SET TARGET=%1 @echo ======================== VIC20 =================================================== -call kickc -targetdir ..\kickc\ -t VIC20_8K -D=VIC20 %TARGET%.c -o out\%TARGET%_vic20.prg -e +call kickc -targetdir ..\kickc\ -t VIC20_8K %TARGET%.c -o out\%TARGET%_vic20.prg -e copy out\%TARGET%.prg out\%TARGET%_vic20.prg @echo ======================== APPLE 1 ================================================= -call kickc -targetdir ..\kickc\ -t apple1 -D=APPLE1 %TARGET%.c -o out\%TARGET%_apple1.prg -e +call kickc -targetdir ..\kickc\ -t apple1_jukebox %TARGET%.c -o out\%TARGET%_apple1.prg -e @rem builds the apple1 eprom file call node ..\tools\mkeprom out out\%TARGET%_apple1.bin