08 December 2017, 11:07 | #1 |
Amiga user
Join Date: Nov 2008
Location: Sofia / Bulgaria
Posts: 477
|
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). |
08 December 2017, 12:10 | #2 |
Registered User
Join Date: Jan 2005
Location: Umeå
Age: 44
Posts: 962
|
Would it be possible to do an implementation which runs under AmigaOS?
|
08 December 2017, 12:37 | #3 | |
Coder/webmaster/gamer
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,713
|
Quote:
|
|
08 December 2017, 12:48 | #4 |
Registered User
Join Date: Nov 2010
Location: South Wales
Age: 47
Posts: 947
|
There are cpm games
|
08 December 2017, 12:50 | #5 | |
Amiga user
Join Date: Nov 2008
Location: Sofia / Bulgaria
Posts: 477
|
Quote:
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. |
|
08 December 2017, 12:51 | #6 |
Amiga user
Join Date: Nov 2008
Location: Sofia / Bulgaria
Posts: 477
|
|
08 December 2017, 13:39 | #7 |
Registered User
Join Date: Dec 2013
Location: GR
Age: 47
Posts: 1,416
|
[ Show youtube player ]
|
08 December 2017, 14:04 | #8 |
Amiga user
Join Date: Nov 2008
Location: Sofia / Bulgaria
Posts: 477
|
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). |
09 December 2017, 10:55 | #9 |
Registered User
Join Date: Jun 2008
Location: somewhere else
Posts: 549
|
Porting CP/M to Amiga is no trivial task.
|
09 December 2017, 21:06 | #10 |
Registered User
Join Date: Jul 2014
Location: Finland
Posts: 1,207
|
In a round about way it kiiiiinda exists inside of EmuTOS.
|
25 January 2018, 14:04 | #11 |
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. |
15 February 2018, 21:57 | #12 |
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,502
|
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 |
16 February 2018, 16:25 | #13 | |
Amiga user
Join Date: Nov 2008
Location: Sofia / Bulgaria
Posts: 477
|
Quote:
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. |
|
16 February 2018, 17:59 | #14 | |
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,502
|
Quote:
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. |
|
16 February 2018, 18:54 | #15 |
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,502
|
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. |
04 June 2023, 03:06 | #16 |
Registered User
Join Date: May 2023
Location: UK
Posts: 2
|
Already ported: https://github.com/juollila/cpm68k-a...ree/main/amiga
|
12 June 2024, 13:27 | #17 | |
Amiga user
Join Date: Nov 2008
Location: Sofia / Bulgaria
Posts: 477
|
Quote:
[ Show youtube player ] I also managed to run the UEMACS. CP/M boots on A4000 with 68040, but shows empty directory listing and some other bugs. The Operating System seems to be running in Supervisor mode, does that mean that it can't be made to work with WHDLoad? Now, if I can manage to get CPM-68K C compiler working on CPM-Amiga, or find some crosscompiler for 68K, I can port my game MazezaM for CPM68K, which got some updates since my previous posts, including VT100 adaption (C) 2020 Anna Christina Naß with some additional levels. MazezaM is also part of Z88DK Z80 development suite. Or another route is to get the Z80 emulator for CPM-68K working. Then I can bundle my games as ADF, even if native Amiga version with colourful graphics and music exists. |
|
12 June 2024, 16:39 | #18 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,309
|
Supervisor mode is no problem for WHDLoad (nearly everything requires it). The disk functions in the bios need to be replaced but that's very easy.
A bit more effort would be required if you wanted to support an arbitrary number of disk images (WDHLoad usually works with a fixed set of disks), but a simple menu interface or something could be created. EDIT: In fact very simple. Attached example (no disk swapping/writing though). Just rename cpm-boot.adf to disk.1 and run attached slave from same directory. Last edited by paraj; 12 June 2024 at 18:19. |
12 June 2024, 19:01 | #19 | |
Registered User
Join Date: May 2023
Location: UK
Posts: 2
|
Quote:
|
|
13 June 2024, 13:01 | #20 | |
Amiga user
Join Date: Nov 2008
Location: Sofia / Bulgaria
Posts: 477
|
Quote:
Either I need to recompile my game for 8080 CPU or try different emulator (Z80). But then I tested the more popular CP/M game Ladder, configured it for VT52 terminal and it worked fine on Amiga 500 config with 7.14 MHz 68000 CPU: [ Show youtube player ] As seen in the video it is playable with difficulty 1. When set to difficulty 5, it is fast. Game is written for slower 8080 CPUs and CP/M doesn't provide good speed measures for slowing down the game. On faster 68K processors it is even faster and unplayable on 68030 or 68040 speeds. Probably this can be throttled with WHDLoad? CPM-68K for Amiga seems to not emulate the CP/M sound - Ctrl+G (0x07 - bell), so Ladder doesn't feature sound. If someone is interested I can create bootable CP/M adf image with the game Ladder for people to test on different configs, or make WHDLoad slave? Then, finally, only 41 years after its release, Amigans can enjoy the legendary CP/M game Ladder, natively on Amiga. |
|
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 |
|
|