English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 08 December 2017, 11:07   #1
drHirudo
Amiga user
 
drHirudo's Avatar
 
Join Date: Nov 2008
Location: Sofia / Bulgaria
Posts: 455
Porting CP/M to Amiga?

The sources of CP/M 68K were released long time ago - http://www.cpm.z80.de/source.html

As a long time fan of CP/M (since 1991) it will be nice having it on the Amiga How feasible it is to port it to Amiga? I know there is not much software for it, and apparently no games, only productivity software, but it will be another alternative OS on the Amiga, along with the Atari TOS and Sinclair QL QDOS. And there is a Z80 simulator/emulator for CPM 68K that will make more software possible on standard A500/A1000 configuration.

The source code is from 1981-1983 and uses lots of old style C syntax. And probably a Z80 CP/M compiler will be needed for building it, unless rewriting part of it for modern compilers. The Amiga specific parts will be the disk IO and the screen output (Text mode simulation with VT control codes).
drHirudo is offline  
Old 08 December 2017, 12:10   #2
patrik
Registered User
 
patrik's Avatar
 
Join Date: Jan 2005
Location: UmeƄ
Age: 43
Posts: 922
Would it be possible to do an implementation which runs under AmigaOS?
patrik is offline  
Old 08 December 2017, 12:37   #3
Minuous
Coder/webmaster/gamer
 
Minuous's Avatar
 
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,629
Quote:
And there is a Z80 simulator/emulator for CPM 68K that will make more software possible on standard A500/A1000 configuration.
Z80 CP/M software can already be run on Amiga via the uBee512 emulator.
Minuous is offline  
Old 08 December 2017, 12:48   #4
S0ulA55a551n
Registered User
 
S0ulA55a551n's Avatar
 
Join Date: Nov 2010
Location: South Wales
Age: 46
Posts: 934
There are cpm games
S0ulA55a551n is offline  
Old 08 December 2017, 12:50   #5
drHirudo
Amiga user
 
drHirudo's Avatar
 
Join Date: Nov 2008
Location: Sofia / Bulgaria
Posts: 455
Quote:
Originally Posted by patrik View Post
Would it be possible to do an implementation which runs under AmigaOS?
That's what I was thinking too. Use the AmigaOS for the Disk I/O and the Amiga shell for the console output. There are already VT52 emulators available for Amiga - http://aminet.net/package/comm/term/NiftyTerm but it is easy to write anyway.
All the 68K CPM software will use the AmigaOS routines for disk access, which will make it media independent - i.e. it won't matter if you write to RAM: disk, hard drive or floppy. And no need to rewrite the low level access routines.
drHirudo is offline  
Old 08 December 2017, 12:51   #6
drHirudo
Amiga user
 
drHirudo's Avatar
 
Join Date: Nov 2008
Location: Sofia / Bulgaria
Posts: 455
Quote:
Originally Posted by S0ulA55a551n View Post
There are cpm games
CP/M 68K games? Please give me
drHirudo is offline  
Old 08 December 2017, 13:39   #7
nobody
Registered User
 
nobody's Avatar
 
Join Date: Dec 2013
Location: GR
Age: 46
Posts: 1,416
[ Show youtube player ]
nobody is offline  
Old 08 December 2017, 14:04   #8
drHirudo
Amiga user
 
drHirudo's Avatar
 
Join Date: Nov 2008
Location: Sofia / Bulgaria
Posts: 455
Quote:
Originally Posted by nobody View Post
Re: Ladder
Yes, CP/M (Z80) games exist. But 68K CP/M games are another story. I am not sure if you can find many. On this note, here is a game that I wrote many years ago for CP/M:

[ Show youtube player ]

That was easily ported to Amstrad CPC:
[ Show youtube player ]
and UNIX (VT100)
[ Show youtube player ]

Ports not done by me.
And I am sure it will be easy to play on Apple III, Apple II (with Applicards and all other Z80 machines that can run CP/M out there).
drHirudo is offline  
Old 09 December 2017, 10:55   #9
hitchhikr
Registered User
 
Join Date: Jun 2008
Location: somewhere else
Posts: 511
Porting CP/M to Amiga is no trivial task.
hitchhikr is offline  
Old 09 December 2017, 21:06   #10
Locutus
Registered User
 
Join Date: Jul 2014
Location: Finland
Posts: 1,175
In a round about way it kiiiiinda exists inside of EmuTOS.
Locutus is offline  
Old 25 January 2018, 14:04   #11
bdk6
 
Posts: n/a
Hi.
I'm new here. I found this site and this thread because I am seriously contemplating implementing cpm-68k on the Amiga. I've never used CP/M-68K and the Amiga is the only 68K hardware I have that could run it. I think it would be neat, which is reason enough to do it.
A couple of notes:
I don't think it needs to be "ported" in the traditional sense. CP/M, pretty much all versions, were written to be easily implemented on any hardware WITHOUT source code. Only the BIOS needs to be written for specific hardware.
CP/M is a pretty simple OS. Pretty much all you have to implement in the BIOS is text/terminal I/O and disk read/write routines. CP/M 68K is mostly the same as the CP/M-80 but slightly more complex.
There are emulators that can run CP/M 68K and it comes with an appropriate assembler and C compiler, so that solves having a develoopment machine.
If you are interested in discussing this further, let me know.
 
Old 15 February 2018, 21:57   #12
Gorf
Registered User
 
Gorf's Avatar
 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,294
Just some links

Page with a portable version in C and some CM/P 68k in Pascal:

http://retrotechnology.com/dri/pcpm.html

CP/M for the Motorola MEX68KECB board.

http://home.earthlink.net/~schultdw/cpm68/

There is a CM/P Z80 simulator on Aminet with assembler source. It provides a virtual H19 Terminal, that could come handy for your idea.

http://aminet.net/package/misc/emu/SimCPM
Gorf is offline  
Old 16 February 2018, 16:25   #13
drHirudo
Amiga user
 
drHirudo's Avatar
 
Join Date: Nov 2008
Location: Sofia / Bulgaria
Posts: 455
Quote:
Originally Posted by Gorf View Post
Page with a portable version in C and some CM/P 68k in Pascal:

http://retrotechnology.com/dri/pcpm.html

CP/M for the Motorola MEX68KECB board.

http://home.earthlink.net/~schultdw/cpm68/

There is a CM/P Z80 simulator on Aminet with assembler source. It provides a virtual H19 Terminal, that could come handy for your idea.

http://aminet.net/package/misc/emu/SimCPM
Thanks for the links. I used Pascal only on 8-bits, but can try to compile it on Amiga. I hope HiSoft Pascal would do the job.

If CP/M is ported naively to Amiga, it would mean all 68K CP/M software shall work without the need of recompilation or adaptation.


I used SimCPM a lot in the past. Sometimes I used CP/M emulator for PC-DOS under PC-Task, just to be sure that my software works around different CP/M incarcerations.
drHirudo is offline  
Old 16 February 2018, 17:59   #14
Gorf
Registered User
 
Gorf's Avatar
 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,294
Quote:
Originally Posted by drHirudo View Post
Thanks for the links. I used Pascal only on 8-bits, but can try to compile it on Amiga. I hope HiSoft Pascal would do the job.

If CP/M is ported naively to Amiga, it would mean all 68K CP/M software shall work without the need of recompilation or adaptation.

The "deluxe" implementation would be a API-wrapper like Wine for CP/M to AmigaOS....

Here is an other highly portable emulator: It provides nice disk-tools to create images and compiles on 68K machines.
https://github.com/jhallen/cpm

The Z80 emulation is encapsulated and could probably be removed:
"This code has been designed so that the z80 emulator proper should be thread-safe and runs independently of CP/M."

Also a wrapper-like use-case is somewhat mentioned:

"The CP/M layer may be built so that the fake BIOS is turned into real Z80 code with all I/O occurring through fake devices using either INPUT/OUTPUT or the memory-mapped I/O hooks. Conversely, it's also possible to turn then entire BDOS/CCP into C code much as the BIOS is currently coded with magic hooks that trigger the appropriate actions."

Last edited by Gorf; 16 February 2018 at 19:35.
Gorf is offline  
Old 16 February 2018, 18:54   #15
Gorf
Registered User
 
Gorf's Avatar
 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,294
Here an other nice tool how to create character-mapped screens on Amiga:

http://aminet.net/package/dev/misc/CharMode

next idea would be to communicate with such a "terminal" via Amiga typical message passing/ports.
That would also open the door for e.g. a MUI-based "gui-task" instead, that provides a nicer way to interact with a certain program. It would than look like a native Amiga app, while still being unmodified cp/m.

Last edited by Gorf; 16 February 2018 at 19:36.
Gorf is offline  
Old 04 June 2023, 03:06   #16
SEGStriker
Registered User
 
Join Date: May 2023
Location: UK
Posts: 1
Already ported: https://github.com/juollila/cpm68k-a...ree/main/amiga
SEGStriker is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Porting SDL2 to Amiga copse request.Other 3 30 November 2017 17:46
Porting an Amiga game to PC CYBER_SLUNK Coders. General 4 31 January 2017 19:14
Porting Photoshop to Amiga KONEY Coders. General 25 29 December 2016 23:49
Porting PhotoChrome ST/e to Amiga. pandy71 request.Other 0 09 February 2015 15:12
Porting Qt Framework to Amiga OS enviroments Pyromania Coders. General 2 24 July 2013 06:42

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:51.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.19269 seconds with 15 queries