diff --git a/CHANGELOG.md b/CHANGELOG.md index a5510aef..b3e08c88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ * Preliminary support for Tandy Color Computer running RS-DOS. +* Preliminary support for 16K cartridges for Tandy Color Computer. + * Added support for modifying large variables via pointers. * Added the ability to declare structure alignment. diff --git a/docs/api/coco-programming-guide.md b/docs/api/coco-programming-guide.md index ffe3710b..bae41602 100644 --- a/docs/api/coco-programming-guide.md +++ b/docs/api/coco-programming-guide.md @@ -2,6 +2,8 @@ ### A note about Color Computer +#### `coco_rsdos` target + The `coco_rsdos` target creates binary files that can run on Tandy Color Computer running RS-DOS. The compiler output is a raw machine code file with the `.bin` extension, which then has to be put on a disk. @@ -13,3 +15,12 @@ You can do it using `imgtool` from the [MAME project](https://www.mamedev.org/): The resulting file can then be loaded and ran using the following commands: LOADM"CO":EXEC + +#### `coco_crt` target + +The `coco_crt` target creates 16k cartridge images that can run on Tandy Color Computer or Dragon. + +The program is run directly from ROM; +typical ROM programming guidelines apply, see [the ROM vs RAM guide](./rom-vs-ram.md). + +The `main` function is not allowed to return. diff --git a/docs/api/target-platforms.md b/docs/api/target-platforms.md index 4212fa0b..97d84978 100644 --- a/docs/api/target-platforms.md +++ b/docs/api/target-platforms.md @@ -102,6 +102,9 @@ The compiler emits COM files. * `coco_rsdos` – Tandy Color Computer running RS-DOS. (very experimental) Read [the Color Computer programming guide](./coco-programming-guide.md) for more info. +* `coco_crt` – 16K cartridge for Tandy Color Computer. (very experimental) +Read [the Color Computer programming guide](./coco-programming-guide.md) for more info. + * `dos_com` – a COM file for DOS on IBM PC. (very experimental) * `x16_experimental` – Commander X16; very experimental, diff --git a/include/coco/crt.mfk b/include/coco/crt.mfk new file mode 100644 index 00000000..9fdaed01 --- /dev/null +++ b/include/coco/crt.mfk @@ -0,0 +1,5 @@ +asm void __init() @$c000 { + JSR main + __init__infinite_loop: + BRA __init__infinite_loop +} diff --git a/include/platform/coco_crt.ini b/include/platform/coco_crt.ini new file mode 100644 index 00000000..37391e7d --- /dev/null +++ b/include/platform/coco_crt.ini @@ -0,0 +1,32 @@ +; a cartridge program for Tandy Color Computer/Dragon +; VERY EXPERIMENTAL +[compilation] +arch=6809 +encoding=coco +screen_encoding=cocoscr +modules=default_panic,stdlib,coco/kernal,coco/crt +u_stack=true + +[allocation] +segments=default,prgrom +ram_init_segment=prgrom +default_code_segment=prgrom +segment_prgrom_start=$c000 +segment_prgrom_end=$ffff +segment_default_start=$3f00 +segment_default_end=$7fff + +[define] +COCO=1 +WIDESCREEN=0 +KEYBOARD=1 +; TODO: ? +JOYSTICKS=1 +HAS_BITMAP_MODE=1 + +[output] +style=single +format=prgrom:$c000:$ffff +extension=.rom + +