I am looking to add support for a CPM Subtype for the Johns Basement Z80 Retro!. (https://github.com/Z80-Retro)
I figured i would start simple by getting it's unique disk layout sorted.
The cpmtools diskdefs file we are using is:
Code: Select all
diskdef z80-retro-8k-8m
seclen 128
tracks 16384
sectrk 4
blocksize 8192
maxdir 512
skew 1
boottrk 32
os 2.2
end
This is what I have put into appmake:
I guess I am missing something in the translation, because when I attempt to cpmls the image I get I just get garbage on the output. If I use something like NSHD8 it works fine with the appropriate diskdefs config. (IE: I can compile in Z88dk and then list the contents with cpmls) Unfortuantely the Z80-Retro! BIOS is configured for this 8k/8m setup.
Code: Select all
...
...
...
{ "z80retro", "Z80 Retro (8mb)", &z80retro_spec, 0, NULL, 1 },
...
...
...
static disc_spec z80retro_spec = {
.name = "Z80Retro",
.sectors_per_track = 4,
.tracks = 16384,
.sides = 1,
.sector_size = 128,
.gap3_length = 0x2a, //?
.filler_byte = 0xe5, //?
.boottracks = 32,
.directory_entries = 512,
.alternate_sides = 0,
.extent_size = 8192,
.byte_size_extents = 0,
.first_sector_offset = 0,
.has_skew = 1,
};
Code: Select all
TOP=.
BASEDIR = $(TOP)
Z88DIR = $(TOP)/../z88dk-dev
ZCC = $(Z88DIR)/bin/zcc
export PATH := $(Z88DIR)/bin/:$(PATH)
export ZCCCFG := $(Z88DIR)/lib/config
CFLAGS = +cpm -subtype z80retro --list -compiler=sdcc -create-app -O3 --opt-code-speed
all:
$(ZCC) $(CFLAGS) -o hello.com main.c
clean:
rm -f *.lis *.a *.bin *.o *.img *.com
Code: Select all
#include <stdio.h>
void main(void) {
printf("Hello, World!");
}
For the custom stuff that I will eventually want to add support for, is there a serial console only CPM subtype I can copy to learn how to set it all up? Most of the targets have consoles on VDP. The Z80 Retro does not have a GFX console, It does have a VDP, but it's not programmed to function as a console. Only as an on demand peripheral. IE: A CPM program might init the VDP and the use it. But CPM itself is serial only.
Hope my questions make sense.
Thanks!