From c0b5a36af161aa0a44d34640812c0a32cce71df9 Mon Sep 17 00:00:00 2001 From: nino-porcino Date: Wed, 15 Dec 2021 17:13:21 +0100 Subject: [PATCH] add KickC target configuration files --- kickc/apple1.ld | 6 ++++++ kickc/apple1.tgt | 11 +++++++++++ kickc/vic20_8k.ld | 8 ++++++++ kickc/vic20_8k.tgt | 12 ++++++++++++ tools/build.bat | 4 ++-- 5 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 kickc/apple1.ld create mode 100644 kickc/apple1.tgt create mode 100644 kickc/vic20_8k.ld create mode 100644 kickc/vic20_8k.tgt diff --git a/kickc/apple1.ld b/kickc/apple1.ld new file mode 100644 index 0000000..ed73a93 --- /dev/null +++ b/kickc/apple1.ld @@ -0,0 +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"] + diff --git a/kickc/apple1.tgt b/kickc/apple1.tgt new file mode 100644 index 0000000..2c4e65e --- /dev/null +++ b/kickc/apple1.tgt @@ -0,0 +1,11 @@ +{ + "extension": "prg", + "link": "apple1.ld", + "start_address": "0x2000", + "cpu": "MOS6502X", + "interrupt": "hardware_all", + "emulator": "x64sc" +} + + + diff --git a/kickc/vic20_8k.ld b/kickc/vic20_8k.ld new file mode 100644 index 0000000..e523323 --- /dev/null +++ b/kickc/vic20_8k.ld @@ -0,0 +1,8 @@ +// Commodore VIC 20 8k executable PRG file +.file [name="%O", type="prg", segments="Program"] +.segmentdef Program [segments="Basic, Code, Data"] +.segmentdef Basic [start=$1201] +.segmentdef Code [start=%P] +.segmentdef Data [startAfter="Code"] +.segment Basic +:BasicUpstart(%E) \ No newline at end of file diff --git a/kickc/vic20_8k.tgt b/kickc/vic20_8k.tgt new file mode 100644 index 0000000..eca4740 --- /dev/null +++ b/kickc/vic20_8k.tgt @@ -0,0 +1,12 @@ +{ + "description": "Commodore VIC 20 8K executable PRG file", + "extension": "prg", + "link": "vic20_8k.ld", + "start_address": "0x120d", + "cpu": "MOS6502X", + "interrupt": "rom_min_vic20", + "emulator": "xvic", + "defines": { + "__VIC20__": 1 + } +} \ No newline at end of file diff --git a/tools/build.bat b/tools/build.bat index f44fb3d..5558513 100644 --- a/tools/build.bat +++ b/tools/build.bat @@ -3,11 +3,11 @@ @SET TARGET=%1 @echo ======================== VIC20 =================================================== -call kickc -t VIC20_8K -D=VIC20 %TARGET%.c -o out\%TARGET%_vic20.prg -e +call kickc -t ..\kickc\VIC20_8K -D=VIC20 %TARGET%.c -o out\%TARGET%_vic20.prg -e copy out\%TARGET%.prg out\%TARGET%_vic20.prg @echo ======================== APPLE 1 ================================================= -call kickc -t apple1 -D=APPLE1 %TARGET%.c -o out\%TARGET%_apple1.prg -e +call kickc -t ..\kickc\apple1 -D=APPLE1 %TARGET%.c -o out\%TARGET%_apple1.prg -e @rem builds the apple1 eprom file call node ..\tools\mkeprom out out\%TARGET%_apple1.bin