Paging basically works, i built DSTAR, It runs with no changes on the current z88dk set.
It crashes on exit though, probably trying to restore the default disk via a BDOS call.
CP/M on the spectrum clones
Re: CP/M on the spectrum clones
Back to the Dataputer DiskFace, it looks like my blind attempt to port MBASIC with graphics on it worked!
This means that the disk format is good and that I can use the paging logic on z88dk.
Ironically this one is the easier to work out adapting the existing code.
This means that the disk format is good and that I can use the paging logic on z88dk.
Ironically this one is the easier to work out adapting the existing code.
You do not have the required permissions to view the files attached to this post.
Re: CP/M on the spectrum clones
I prepared a simple hack for the +CPM target, now -subtype=diskface should build a dataputer compatible CP/M program.
In the meantime I've been warned that the MBASIC concept I've just announced is buggy and I noticed that also the plus3 mode looks weak. It could be for memory constraints, I'm investigating
In the meantime I've been warned that the MBASIC concept I've just announced is buggy and I noticed that also the plus3 mode looks weak. It could be for memory constraints, I'm investigating
Re: CP/M on the spectrum clones
The Timex FDD-3000 CP/M disk format is now supported by appmake.
It really is NOT strictly ZX Spectrum related, it runs the CP/M system on the internal Z80 and requires a remote terminal, which can be attached to the RS232 port or to a terminal emulation running on the Spectrum. In this second configuration, two different disks are required, the first one holding the terminal emulation to be loaded on the Spectrum and the actual CP/M boot disk.
The monitor (terminal) emulation working on the TS2068 is different than the 'ZEBRA' version, which makes sense.
I couldn't sort out a working boot procedure, for the CP/M but an emulator actually exists on SourceForge, it is surely good enough to get to the terminal emulation prompt or to use the TOS on the Spectrum.
While I'm on the TS2068, I'll try to understand if the disk interfaces mentioned here:
https://archive.org/details/TSHorizons/ ... ew=theater
..(Larken, Aerco, Oliger) evolved up to supporting CP/M.
See also page #7 here:
https://ia902707.us.archive.org/10/item ... 201988.pdf
EDIT:
Apparently the AERCO FD-68 evolved from a 32 column CP/M system into a better 80 columns one (licensed as RP/M), the historical DOS disk tools mention it as "Timex/Sinclair 2068+AERCO FD-68 RP/M - DSDD 48 tpi 5.25" -1024 x 5".
https://archive.org/details/family-comp ... up?q=Timex
https://worldofspectrum.net/timex/aerco.htm
It really is NOT strictly ZX Spectrum related, it runs the CP/M system on the internal Z80 and requires a remote terminal, which can be attached to the RS232 port or to a terminal emulation running on the Spectrum. In this second configuration, two different disks are required, the first one holding the terminal emulation to be loaded on the Spectrum and the actual CP/M boot disk.
The monitor (terminal) emulation working on the TS2068 is different than the 'ZEBRA' version, which makes sense.
I couldn't sort out a working boot procedure, for the CP/M but an emulator actually exists on SourceForge, it is surely good enough to get to the terminal emulation prompt or to use the TOS on the Spectrum.
While I'm on the TS2068, I'll try to understand if the disk interfaces mentioned here:
https://archive.org/details/TSHorizons/ ... ew=theater
..(Larken, Aerco, Oliger) evolved up to supporting CP/M.
See also page #7 here:
https://ia902707.us.archive.org/10/item ... 201988.pdf
EDIT:
Apparently the AERCO FD-68 evolved from a 32 column CP/M system into a better 80 columns one (licensed as RP/M), the historical DOS disk tools mention it as "Timex/Sinclair 2068+AERCO FD-68 RP/M - DSDD 48 tpi 5.25" -1024 x 5".
https://archive.org/details/family-comp ... up?q=Timex
https://worldofspectrum.net/timex/aerco.htm
Re: CP/M on the spectrum clones
The CS-Disk, (Nederlands)
This one, like the Dataputer DiskFace, had logic to overlap the ROM with a RAM page in the disk expansion.
The BIOS was in ROM (as on the ATM-TURBO) and didn't require a disk to boot.

So far i couldn't find the ROM and Disk images, this one stays pending.
Similarly, no disk image found for the KuB64 (east Germany)

But the ROM images are available !
The original version of this computer had a 2 Kbyte ROM bootloader with which the Spectrum operating system could be loaded from cassette (not available).
Later it was possible to accommodate the entire operating system in an enlarged ROM (16 Kbytes), which eliminated the hassle of loading cassettes (the 16 ROM image available online is a normal 48K ROM, though).
EDIT:
The "Spectral" clone (AKA EPR02, which means "single board computer #2) is also from the DDR. I suspect it is a close relative of the KUB64.
the "80K CP/M" document here..
http://felgentreu.spdns.org/dokuwiki/do ... l:software
..is a very interesting piece of history, telling the local effort in the universities to reach a technological independence: "For compatibility with the ZXS-128, the “switching” addresses commonly used there were also used here. In the realized circuit (see circuit diagram), which was already presented at the plenary event of the AG Mikrorechentechnik Berlin in December 1987, only GDR components are now used."
I couldn't find the CP/M related binaries (disk/tape images, eventual additional ROM sets, etc),
Someone here..
https://www-robotrontechnik-de.translat ... r_pto=wapp
..has something !
By the way but the mentioned document includes some technical hint:
By the way, if something existed, it wasn't surely wide spread:
To summarize, only from the late 1987 the clone could be built without using components from black market and yet the Operating System was missing.
This one, like the Dataputer DiskFace, had logic to overlap the ROM with a RAM page in the disk expansion.
The BIOS was in ROM (as on the ATM-TURBO) and didn't require a disk to boot.

So far i couldn't find the ROM and Disk images, this one stays pending.
Similarly, no disk image found for the KuB64 (east Germany)

But the ROM images are available !
The original version of this computer had a 2 Kbyte ROM bootloader with which the Spectrum operating system could be loaded from cassette (not available).
Later it was possible to accommodate the entire operating system in an enlarged ROM (16 Kbytes), which eliminated the hassle of loading cassettes (the 16 ROM image available online is a normal 48K ROM, though).
EDIT:
The "Spectral" clone (AKA EPR02, which means "single board computer #2) is also from the DDR. I suspect it is a close relative of the KUB64.
the "80K CP/M" document here..
http://felgentreu.spdns.org/dokuwiki/do ... l:software
..is a very interesting piece of history, telling the local effort in the universities to reach a technological independence: "For compatibility with the ZXS-128, the “switching” addresses commonly used there were also used here. In the realized circuit (see circuit diagram), which was already presented at the plenary event of the AG Mikrorechentechnik Berlin in December 1987, only GDR components are now used."
I couldn't find the CP/M related binaries (disk/tape images, eventual additional ROM sets, etc),
Someone here..
https://www-robotrontechnik-de.translat ... r_pto=wapp
..has something !
Code: Select all
- Hardware and software expansion to a CP/M -capable computer that is largely software compatible with PC1715 or BC5120. (was once developed by the Academy of Sciences of the GDR Central Institute for Electron Physics (ZIE) Dr.B.Pieper, Dipl.-Ing. J. Schönberg and sold through the patent office Tel.: 20770530) Cost 130.00 M
By the way but the mentioned document includes some technical hint:
Code: Select all
Software:
The circuit basically allows 2 operating modes:
1. 2x 32k RAM banks from 8000h, switchable
2. CP/M mode with 64k RAM from 0000h to FFFFh
The address used for memory management is FDh.
The corresponding memory modification command in Z80 mnemonics is therefore e.g.
OUT (FDh), 01xx xxxx
- Bit 0 to Bit 5 are occupied depending on the switching target
- Bit 6 = 1
- Bit 7 = 0, use of the BC register is therefore not necessary
Nevertheless, the following command sequence is also possible
LD BC, 7FFDh
OUT (C), A
The accumulator must of course be charged beforehand with a "switching byte",
Bit 3 controls the switching between ZXS and CP/M mode
Bit 3 = 0 -> ZXS mode
Bit 0 controls the switching of the RAM banks
Bit 0 = 0 -> RAM bank from 8000h in ZXS mode is equal to the
RAM bank from 8000h in CP/M with reset is one
(even lossless with ISO ROM)
Return to ZXS mode possibility, in CP/M mode bit 0 is ineffective as A15 forms the highest address bit.
This prevents possible bank switching under CP/M, which would result in a system crash
By the way, if something existed, it wasn't surely wide spread:
Code: Select all
BIOS Problem
To install CP/M, the hardware-dependent BIOS part must of course be adapted
or rewritten to the specific conditions of the ZXS.
To date (end of April 1988) this problem has not yet been resolved.
Maybe you are able to do this!?!
There are already ideas about implementing the Z1013 and KC85/x operating systems.
A ZXS operating system running in RAM is also conceivable with a new screen routine.
To summarize, only from the late 1987 the clone could be built without using components from black market and yet the Operating System was missing.
Re: CP/M on the spectrum clones
The ASC CP/M was yet another eastern (Ukraine ?) CP/M conversion to the ZX Spectrum developed by Andrew Strikes Code (ASC) and Alexander Shafir.
It was designed to work on a memory mod called LSY-256 (with two shadow RAM pages) and the Betadisk controller.
The disk format is basically the same 800K one used for the Quorum with a different interleave (I think), which perhaps can be ignored. At the moment I'd say the Quorum mode fits.
The boot part includes the trap at TRDOS level to load the BIOS, etc.
The disk images available online, together with a working emulator are here:
https://zx-pk.ru/threads/23565-asc-cp-m ... post716572
UnrealSpeccy has been hacked to simulate an OREL-BK08 with the LSY256 hack.
This particular BIOS was customized back in the days to work properly with the BK08 keyboard, I suppose no other changes were required.
The text console includes a 32/64 columns mode switching option (which was present on about 40% of the CP/M implementations).
To successfully run CP/M the "disk delay" speedup flag must be removed.
It was designed to work on a memory mod called LSY-256 (with two shadow RAM pages) and the Betadisk controller.
The disk format is basically the same 800K one used for the Quorum with a different interleave (I think), which perhaps can be ignored. At the moment I'd say the Quorum mode fits.
Code: Select all
IMD TD 1.5 5.25-96 LD MFM S-step, 2 sides
Assuming 1:1 for Binary output
0/0 250 kbps DD 5x1024
9 2 3 4 5
D D D D D
0/1 1 2 3 4 5
D D D D D
1/0 D D D D D
1/1 D D D D D
---------------------------- <-end of boot section
2/0 1 4 2 5 3
D DE5 D D D
2/1 D D D D D
3/0 D D D D D
3/1 D D D D D
4/0 D D D D D
4/1 D D D DE5 DE5
5/0 D D D D D
5/1 D D D D D
(...)
The boot part includes the trap at TRDOS level to load the BIOS, etc.
The disk images available online, together with a working emulator are here:
https://zx-pk.ru/threads/23565-asc-cp-m ... post716572
UnrealSpeccy has been hacked to simulate an OREL-BK08 with the LSY256 hack.
This particular BIOS was customized back in the days to work properly with the BK08 keyboard, I suppose no other changes were required.
The text console includes a 32/64 columns mode switching option (which was present on about 40% of the CP/M implementations).
To successfully run CP/M the "disk delay" speedup flag must be removed.
You do not have the required permissions to view the files attached to this post.
Re: CP/M on the spectrum clones
The way I found to page in and out the display is very glitchy but sort of works (the lower display at $4000 is shown while drawing).
I don't know if it is possible to avoid it, perbaps the CP/M was avoiding the glitches waiting the display raster retrace ?
The original console supports a 64 columns and a 32 columns font, no color (see the minor scrolling issue).
As you see, the prompt at boot is "B:". The disk drive letter association in ASC CP/M is:
A: - RAM disk. It uses all the extended memory, to which CP/M applications do not have access.
Due to the specifics of CP/M, it is “A:” that is preferable to use for a RAM disk.
B: - drive 0 in the original ASC CP/M format (5 sectors per track, 1Kb each),
the Quorum format and other 800K disk images seem to work too.
C: - drive 0, unknown format (some other common CP/M format)
D: - drive 0 in CP/M ATM format (16 sectors per track, 256b each).
Convenient to use for transferring files to CP/M ATM and back.
You can also use disk images in .trd format.
Disadvantage - not enough disk space (640Kb instead of ~800Kb)
E: - drive 1 ASC Music Show (AMS format) discs.
F: - drive 1 in original ASC CP/M format
G: - ???
H: - ???
I don't know if it is possible to avoid it, perbaps the CP/M was avoiding the glitches waiting the display raster retrace ?
The original console supports a 64 columns and a 32 columns font, no color (see the minor scrolling issue).
As you see, the prompt at boot is "B:". The disk drive letter association in ASC CP/M is:
A: - RAM disk. It uses all the extended memory, to which CP/M applications do not have access.
Due to the specifics of CP/M, it is “A:” that is preferable to use for a RAM disk.
B: - drive 0 in the original ASC CP/M format (5 sectors per track, 1Kb each),
the Quorum format and other 800K disk images seem to work too.
C: - drive 0, unknown format (some other common CP/M format)
D: - drive 0 in CP/M ATM format (16 sectors per track, 256b each).
Convenient to use for transferring files to CP/M ATM and back.
You can also use disk images in .trd format.
Disadvantage - not enough disk space (640Kb instead of ~800Kb)
E: - drive 1 ASC Music Show (AMS format) discs.
F: - drive 1 in original ASC CP/M format
G: - ???
H: - ???
You do not have the required permissions to view the files attached to this post.
Re: CP/M on the spectrum clones
The LEC-CP/M. It works even on Microdrives or in RAM Disk on any diskless ZX Spectrum with a modified RAM !
To transfer the programs I set up a specific tape conversion tool, it's in {z88dk}/support/zx/cpm2tap.c
This is one of the few requiring only a simple "startup=" personalization to have the existing z88dk libraries ready to run on in.
To transfer the programs I set up a specific tape conversion tool, it's in {z88dk}/support/zx/cpm2tap.c
This is one of the few requiring only a simple "startup=" personalization to have the existing z88dk libraries ready to run on in.
You do not have the required permissions to view the files attached to this post.
Re: CP/M on the spectrum clones
I finally got a reasonably clean merge of the LEC CP/M stuff in appmake, crt0 and config.
the new build option is +cpm -startup=zxlec
the new build option is +cpm -startup=zxlec
Re: CP/M on the spectrum clones
Allan Hoiberg is sharing information regarding the CS-DISK interface. There were two different CP/M versions, the CP/M v1 was ROM based, CP/M v2 was loaded from disk. I think it required different memory architecture and paging addresses
EDIT:
The original CS-DISK interface was a clever balance between costs and flexibility, it did not provide RAM expansions and managed to move the upper 32K RAM block at position '0' when it had to run CP/M commands. Most of the CP/M 1.2 system was in ROM, the page-in hook address being 15360.
For what I could understand the 56K CP/M 2.2 implementation required DIY improvements, including expanding the 64 RAM expansion. IMO some of the changes were optional, like the support for Kempston Joystick.
The paging as described by Allan:
===========================================
The table on page 4 quickly translated (my old incomplete pencil notes with the control bits should be readable without translation):
Tilstand (Tilstand meaning Mode) 1: Standard mode under CP/M 2.2, i.e. with 64k of RAM, where the lower 32k are unique from the upper 32k. Keyboard interrupts (the interface supports an IBM XT keyboard) and screen writes are done by paging back and using the BIOS calls already in the ROM version, and the ROM is used to boot CP/M 2.2 too.
Mode 2 is the standard Spectrum mapping. Mode 3 has the SDOS ROM paged in instead of the normal ROM, and is used during floppy access. I think I theorized earlier that A15 is high for that, but that might have been wrong if the floppy ROM (SDOS) has the interrupt routines etc paged in.
Mode 4 is the one where A15 is forced high (the "Soelberg bit"). It is used when you are in interactive CP/M mode where a loaded program needs to run in lower RAM..
EDIT:
The original CS-DISK interface was a clever balance between costs and flexibility, it did not provide RAM expansions and managed to move the upper 32K RAM block at position '0' when it had to run CP/M commands. Most of the CP/M 1.2 system was in ROM, the page-in hook address being 15360.
For what I could understand the 56K CP/M 2.2 implementation required DIY improvements, including expanding the 64 RAM expansion. IMO some of the changes were optional, like the support for Kempston Joystick.
The paging as described by Allan:
===========================================
The table on page 4 quickly translated (my old incomplete pencil notes with the control bits should be readable without translation):
Tilstand (Tilstand meaning Mode) 1: Standard mode under CP/M 2.2, i.e. with 64k of RAM, where the lower 32k are unique from the upper 32k. Keyboard interrupts (the interface supports an IBM XT keyboard) and screen writes are done by paging back and using the BIOS calls already in the ROM version, and the ROM is used to boot CP/M 2.2 too.
Mode 2 is the standard Spectrum mapping. Mode 3 has the SDOS ROM paged in instead of the normal ROM, and is used during floppy access. I think I theorized earlier that A15 is high for that, but that might have been wrong if the floppy ROM (SDOS) has the interrupt routines etc paged in.
Mode 4 is the one where A15 is forced high (the "Soelberg bit"). It is used when you are in interactive CP/M mode where a loaded program needs to run in lower RAM..