CP/M 68k
Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team
-
rabindranath72
- Captain Atari

- Posts: 253
- Joined: Tue Feb 15, 2011 3:59 pm
CP/M 68k
Dear all,
I'd like to port CP/M 68k to the Atari ST. I have managed to get a full distribution of v1.1 disk images, and full documentation, including a system guide which shows which calls must be implemented to build a suitable BIOS.
I used cpmtools on Windows to export the CP/M disk images into folders, and put them on my Atari ST hard disk. I can read all the files, the ar utility correctly shows and extracts the contents of the archives, so everything is ready.
Now, before I embark on this project, has anyone already done something similar? (well, apart from the original plan at Atari to use CP/M 68k, but I haven't been able to find anything about this.)
Thanks,
Antonio
I'd like to port CP/M 68k to the Atari ST. I have managed to get a full distribution of v1.1 disk images, and full documentation, including a system guide which shows which calls must be implemented to build a suitable BIOS.
I used cpmtools on Windows to export the CP/M disk images into folders, and put them on my Atari ST hard disk. I can read all the files, the ar utility correctly shows and extracts the contents of the archives, so everything is ready.
Now, before I embark on this project, has anyone already done something similar? (well, apart from the original plan at Atari to use CP/M 68k, but I haven't been able to find anything about this.)
Thanks,
Antonio
- Eero Tamminen
- Fuji Shaped Bastard

- Posts: 3896
- Joined: Sun Jul 31, 2011 1:11 pm
Re: CP/M 68k
You could consider doing most of the development work in emulator like STeem or Hatari (STeem is nicer on Windows and has builtin GUI debugger, Hatari has other advantages like builtin profiler). Using an emulator has a lot of advantages when you're messing with lower level stuff and they have options to run faster than real machine.
Re: CP/M 68k
I remember that there was a fully workin CP/M 68K for the Atari ST back in 1985. Currently I search the disk images of it.
Power without the Price. It's not a bug. It's a feature. _/|\_ATARI
1040STFM in PC-Tower (PAK68/2, OvrScn, 4 MB, 1GB SCSI, CD-ROM...) * 3x Falcon 030 * 3x TT030 * many 260 /520/1040ST(F)(M)(+) * 520/1040STE * many Mega ST * 2x Mega STE * Stacy * STBook * 2x SLM605 * 3x SLM804 * SMM804 * SH 204/205 * Megafile 30/44/60 * SF314 * SF354 * 5x Pofo * PC2 * PC3 * PC4M * ABC286 * ...
1040STFM in PC-Tower (PAK68/2, OvrScn, 4 MB, 1GB SCSI, CD-ROM...) * 3x Falcon 030 * 3x TT030 * many 260 /520/1040ST(F)(M)(+) * 520/1040STE * many Mega ST * 2x Mega STE * Stacy * STBook * 2x SLM605 * 3x SLM804 * SMM804 * SH 204/205 * Megafile 30/44/60 * SF314 * SF354 * 5x Pofo * PC2 * PC3 * PC4M * ABC286 * ...
Re: CP/M 68k
CP/M 68k was in fact the first DOS for ST. First shows of ST, before commercial release had it running CP/M 68k. It was replaced by GEMDOS before ST was released.
Atari: FireBee, Falcon030 + CT60e + SuperVidel + SvEthlana, TT, 520ST + 4MB ST RAM + 8MB TT RAM + CosmosEx + SC1435, 1040STFM + UltraSatan + SM124, 1040STE 4MB ST RAM + 8MB TT RAM + CosmosEx + NetUSBee + SM144 + SC1224, 65XE + U1MB + VBXE + SIDE2, Jaguar, Lynx II, 2 x Portfolio (HPC-006)
Adam Klobukowski [adamklobukowski@gmail.com]
Adam Klobukowski [adamklobukowski@gmail.com]
Re: CP/M 68k
Have you seen the CP/M archives here:
http://www.retroarchive.org/cpm/archive ... ource.html
There is a cpm68k.zip there which is said to contain the sources for CP/M68k version 1.2.
http://www.retroarchive.org/cpm/archive ... ource.html
There is a cpm68k.zip there which is said to contain the sources for CP/M68k version 1.2.
Re: CP/M 68k
I have found the CP/M emulator (v2.2) on a disk here. I'm missing the Utilities disk, but I have successfully just run the emulator itself on a STacy.
STE: Desktopper case, IDE interface, UltraSatan (8GB + 512Mb) + HXC floppy emulator. Plus some STE's/STFM's
- rondc
- Obsessive compulsive Atari behavior

- Posts: 115
- Joined: Tue Apr 30, 2019 9:59 pm
- Location: Spain
- Contact:
Re: CP/M 68k
I would like to share that we already have a version of CP/M68K (V.1.2) working on all STs, mono and color.
We continue working on it, more details in:http://www.retrowiki.es/viewtopic.php?f ... p200175782
Regards, ron.
We continue working on it, more details in:http://www.retrowiki.es/viewtopic.php?f ... p200175782
Regards, ron.
You do not have the required permissions to view the files attached to this post.
- rondc
- Obsessive compulsive Atari behavior

- Posts: 115
- Joined: Tue Apr 30, 2019 9:59 pm
- Location: Spain
- Contact:
Re: CP/M 68k
First test release has been published:
BootLoader: 0.4
Bios: 0.4
http://retrowiki.es/viewtopic.php?f=4&t ... p200176189
Enjoy.
BootLoader: 0.4
Bios: 0.4
http://retrowiki.es/viewtopic.php?f=4&t ... p200176189
Enjoy.
- chronicthehedgehog
- Captain Atari

- Posts: 271
- Joined: Sun May 08, 2022 5:24 pm
- Location: The Midlands
Re: CP/M 68k
I just tried on my Atari TT and it works 
Now I need to try some software...
Now I need to try some software...
-
simonsunnyboy
- Moderator

- Posts: 5772
- Joined: Wed Oct 23, 2002 4:36 pm
- Location: Friedrichshafen, Germany
- Contact:
Re: CP/M 68k
I would really like to check this out. Is there a chance for documentation in English?rondc wrote: ↑Tue Oct 24, 2023 7:50 pm First test release has been published:
BootLoader: 0.4
Bios: 0.4
http://retrowiki.es/viewtopic.php?f=4&t ... p200176189
Enjoy.
Simon Sunnyboy/Paradize - http://paradize.atari.org/
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
Re: CP/M 68k
I remember there being an getting CP/M as part of a bundle with the machine (I think).
Falcon with CT60 in rack mountable case. Two STFMs, one upgraded lots. My original STE from when I was a teen with Switchable TOS, 1.44Mb drive, 4MB RAM, Supra Hard Drive and very very yellow case. Mega STE with (currently none working) Crazy Dots 2. Atari 2600 and a Jag. And a mountain of commercial software and lots of hardware addons.
- crashman
- Captain Atari

- Posts: 244
- Joined: Sat May 29, 2010 2:23 am
- Location: Vilanova i la Geltrú - Barcelona
- Contact:
Re: CP/M 68k
Here:simonsunnyboy wrote: ↑Wed Oct 25, 2023 3:26 pmI would really like to check this out. Is there a chance for documentation in English?rondc wrote: ↑Tue Oct 24, 2023 7:50 pm First test release has been published:
BootLoader: 0.4
Bios: 0.4
http://retrowiki.es/viewtopic.php?f=4&t ... p200176189
Enjoy.
https://github.com/teiram/atari-st-cpm
260ST, 520ST, 520ST+, 520STFM, 1040STE, 4160STE, STACY 2, MEGA ST2, MEGA ST4, MEGA STE, TT030, FALCON030, FALCON030 with Centurbo 2rB, Firebee
SH204, Megafile 30, Megafile 60, Megafile 44
SM124, SM125, SM146, SC1224, SC1435
Satandisk, Ultrasatan, HxC SD, Hxc SD Slim, NetUSBee, CosmosEX, Gotek HxC, MicroCosmos
2600VCS, LYNX, LYNX II, JAGUAR
SH204, Megafile 30, Megafile 60, Megafile 44
SM124, SM125, SM146, SC1224, SC1435
Satandisk, Ultrasatan, HxC SD, Hxc SD Slim, NetUSBee, CosmosEX, Gotek HxC, MicroCosmos
2600VCS, LYNX, LYNX II, JAGUAR
- rondc
- Obsessive compulsive Atari behavior

- Posts: 115
- Joined: Tue Apr 30, 2019 9:59 pm
- Location: Spain
- Contact:
Re: CP/M 68k
Hello !
I spent years looking for that specific disc. I knew of its existence but no one had it, no one kept it.
Could you please share an image of it to study it and check our version?
Re: CP/M 68k
Tested in MegaSTE and it works like a charm! good work guys!
・Falcon ct60e・Atari MegaSTE ・Atari STe ・
Re: CP/M 68k
(I know nothing about CP/M)Most of 68K executables you may find around won't work. Seems to be because they are expected to be loaded into a lower TPA than available (around $400 or $600) and BDOS fails to load them. REL executables may work or also 68K executables you generate after them using the RELOC utility (I normally relocate to $A900)
Is this a major issue such that it would be very beneficial to move TOS away from low mem? The other alternative, although not at all what the project has done, would be to not use TOS but to re-implement the functions needed from BDOS.
-
ThorstenOtto
- Fuji Shaped Bastard

- Posts: 3328
- Joined: Sun Aug 03, 2014 5:54 pm
Re: CP/M 68k
Where was that quote from? I can't see it here.
Anyway, just for info, TOS might need even more of the low memory. The reference values are:
Code: Select all
MEMBOT_TOS100 = 0x0000a100
MEMBOT_TOS102 = 0x0000ca00
MEMBOT_TOS104 = 0x0000a84e
MEMBOT_TOS162 = 0x0000a892
MEMBOT_TOS206 = 0x0000ccb2
MEMBOT_TOS306 = 0x0000e6fc
MEMBOT_TOS404 = 0x0000f99c
- rondc
- Obsessive compulsive Atari behavior

- Posts: 115
- Joined: Tue Apr 30, 2019 9:59 pm
- Location: Spain
- Contact:
Re: CP/M 68k
Anyway, keep in mind that CP/M68K does not start as a program under the control of the operating system ( at least not the TOS ), we take control from an executable bootloader and never return control to the TOS.
The idea is to correctly calculate a safe address to place the TPA, but it seems that the BIOS call getmpb gives a very high address, and it is not clear to us why it does not give access to memory between $600 and $a84e which at least with the TOS that we try is what brings we back.
The fact is that it is about supplanting the operating system. It would be required in a certain way to run CP/M68K as if it were a GEMDOS application (using a pexec call or similar).
CP/M68K is also not relocatable, its absolute position is defined when the binary is generated, so the idea is to steal as much memory as possible, without affecting the functionality offered by BIOS/XBIOS and being very clear that TOS does not is going to be executed.
We will continue to investigate a safe way to maximize the memory we can monopolize.
You may suffer some video problems running on machines with 512K RAM, TOS 1.0 does not work fine, the rest goes like a charm. Tested also with EmuTOS 1.2.1 working really nice. And tested with Slingshot's MiSTery ST core on fpga too.
And this is why it is important for us to locate a preserved working version of CP/M68K. We started researching in April 2018 and five years later we finally have a working BIOS. At least, something is something.
Best Regards
ron
The idea is to correctly calculate a safe address to place the TPA, but it seems that the BIOS call getmpb gives a very high address, and it is not clear to us why it does not give access to memory between $600 and $a84e which at least with the TOS that we try is what brings we back.
The fact is that it is about supplanting the operating system. It would be required in a certain way to run CP/M68K as if it were a GEMDOS application (using a pexec call or similar).
CP/M68K is also not relocatable, its absolute position is defined when the binary is generated, so the idea is to steal as much memory as possible, without affecting the functionality offered by BIOS/XBIOS and being very clear that TOS does not is going to be executed.
We will continue to investigate a safe way to maximize the memory we can monopolize.
You may suffer some video problems running on machines with 512K RAM, TOS 1.0 does not work fine, the rest goes like a charm. Tested also with EmuTOS 1.2.1 working really nice. And tested with Slingshot's MiSTery ST core on fpga too.
And this is why it is important for us to locate a preserved working version of CP/M68K. We started researching in April 2018 and five years later we finally have a working BIOS. At least, something is something.
Best Regards
ron
You do not have the required permissions to view the files attached to this post.
Re: CP/M 68k
The Github page.
Ok. Well. BIOS/XBIOS are part of TOS so what you're really saying is that you're not giving control to the GEM desktop, but you're still using TOS. Replacing TOS completely was what I meant with implementing the CP/M BIOS towards hardware instead of TOS BIOS.rondc wrote: ↑Thu Oct 26, 2023 5:10 pm CP/M68K is also not relocatable, its absolute position is defined when the binary is generated, so the idea is to steal as much memory as possible, without affecting the functionality offered by BIOS/XBIOS and being very clear that TOS does not is going to be executed.
As to how much of low mem those parts of TOS use is another question. Definitely the TPA is in low mem - but Thorsten knows this better than I do.
Re: CP/M 68k
Hi,
I'll try to look through the disc boxes that I have to hand over the weekend...if it's not in those then it will take a bit longer (I'll have to find the boxes in storage in my garage which hold the other disc boxes).
It's a very long time since I used it (and it was effectively a 'bonus' disc that came with my first ST) but let's hope it is what you are after.
Anyway, please leave it with me & I will report back once I find it...
Best regards,
Jez
-
ThorstenOtto
- Fuji Shaped Bastard

- Posts: 3328
- Joined: Sun Aug 03, 2014 5:54 pm
Re: CP/M 68k
You may not return to TOS, but you are using its BIOS functions, and those will use the memory up to memtop.
getmbp gives you the addresses that are later maintained by GEMDOS Malloc() call. That will be the same memory areas that are usable by CPM. Also remember that memory areas between $0-$800 are supervisor accessible only on Atari.call getmpb gives a very high address, and it is not clear to us why it does not give access to memory between $600 and $a84e which at least with the TOS that we try is what brings we back.
No, you could do the same as before and load CPM with your bootlader. Only the bootloader will be a GEMDOS application, but once it has loaded the CPM kernel, and that kernel does not call BIOS anymore,The fact is that it is about supplanting the operating system. It would be required in a certain way to run CP/M68K as if it were a GEMDOS application (using a pexec call or similar).
you have access to all remaining memory.
BTW. the C compiler that CP/M uses is practically identical to that what Atari calls "Alcyon-C" in their developer sdk. In https://github.com/th-otto/tos3x you will find binaries that can be used as a cross-compiler on linux/win32/atari. Maybe that will be useful during developing.
-
simonsunnyboy
- Moderator

- Posts: 5772
- Joined: Wed Oct 23, 2002 4:36 pm
- Location: Friedrichshafen, Germany
- Contact:
Re: CP/M 68k
Question: I found some CP/M68K user documentation online which tells us that BDOS is accessed via trap #2.
In the sources I saw trap #3, how is that meant to work?
Am I missing something?
In the sources I saw trap #3, how is that meant to work?
Am I missing something?
Simon Sunnyboy/Paradize - http://paradize.atari.org/
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
-
ThorstenOtto
- Fuji Shaped Bastard

- Posts: 3328
- Joined: Sun Aug 03, 2014 5:54 pm
Re: CP/M 68k
Trap #2 is used for BDOS calls (similar to GEMDOS). Trap #3 is used for BIOS calls.simonsunnyboy wrote: ↑Fri Oct 27, 2023 4:00 pm Question: I found some CP/M68K user documentation online which tells us that BDOS is accessed via trap #2.
In the sources I saw trap #3, how is that meant to work?
Am I missing something?
-
simonsunnyboy
- Moderator

- Posts: 5772
- Joined: Wed Oct 23, 2002 4:36 pm
- Location: Friedrichshafen, Germany
- Contact:
Re: CP/M 68k
Thank you for clarification!
Simon Sunnyboy/Paradize - http://paradize.atari.org/
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee



