CP/M on the X16
-
- Posts: 7
- Joined: Fri Sep 27, 2024 6:38 pm
CP/M on the X16
I'm not sure if this feature is even necessary, but can (in theory, with a expansion card) the Commander X16 run CP/M, in order to run some business software for CP/M, or even write new software for CP/M? This question seems stupid, but I'm just asking.
- ahenry3068
- Posts: 1134
- Joined: Tue Apr 04, 2023 9:57 pm
Re: CP/M on the X16
It probably could if some creates the expansion card. I don't know of anyone working on such a thing though.ZeroCool32 wrote: ↑Fri Sep 27, 2024 6:58 pm I'm not sure if this feature is even necessary, but can (in theory, with a expansion card) the Commander X16 run CP/M, in order to run some business software for CP/M, or even write new software for CP/M? This question seems stupid, but I'm just asking.
Re: CP/M on the X16
I post-date the CPM era, never having to use or understand it. Given it was ported to many different hardware platforms, I don't see a requirement for an expansion card. From my limited knowledge, it should be portable to the X16 hardware, but might encounter/require some adaptations because the basic OS for the X16 is baked in. Others may have more insight on the hardware & OS side and hopefully chime in.
I started to poke around the net and this seems to be a good starting point - http://www.cpm.z80.de
This topic doesn't seem stupid to me, the X16 is a retro system and CP/M to me seems to be even more retro (ancient?) than the Commodore Basic OS.
I started to poke around the net and this seems to be a good starting point - http://www.cpm.z80.de
This topic doesn't seem stupid to me, the X16 is a retro system and CP/M to me seems to be even more retro (ancient?) than the Commodore Basic OS.
Re: CP/M on the X16
As the URL indicates, CP/M was written for the Z80 (originally the 8080) CPU. It was since ported to the 8086, but as with other operating systems that can run under different CPU architectures (Linux, Windows), all software needs to be compiled to support every architecture.Edmond D wrote: ↑Fri Sep 27, 2024 9:23 pmI started to poke around the net and this seems to be a good starting point - http://www.cpm.z80.de
On modern computers you can get away with running non-native software using emulation, but that's not really feasible on 8-bit or even 16-bit systems. In order to run native CP/M 2.2 or 3.0 on the Commander X16, a Z80 CPU would be required. Hence the need for an expansion card.
And someone seems to agree with you, as a 6502 port of CP/M already exists: CP/M-65
The Commander X16 is even officially supported, but as mentioned you'd still have to obtain the source code for any CP/M programs you'd like to run in order to recompile them.
Re: CP/M on the X16
We've been talking about that there, on and off.ZeroCool32 wrote: ↑Fri Sep 27, 2024 6:58 pm I'm not sure if this feature is even necessary, but can (in theory, with a expansion card) the Commander X16 run CP/M, in order to run some business software for CP/M, or even write new software for CP/M? This question seems stupid, but I'm just asking.
Since the Z80 is no longer in production, the way to do so would be a Z80 based microcontroller, which runs Z80 instructions and provides multiple I/O interfaces and GPIO connections.
Essentially, the X16 would end up being a terminal for the Z80, and you would not have much benefit doing it this way over simply using the X16 as a serial terminal, via the serial/network card.
You can also emulate an 8080 or Z80 environment, or a complete CP/M computer, on an Arduino Due, Grand Central, ESP32, or several of the Teensy series of microcontrollers.
- RunCPM runs on just about anything with enough CPU horsepower and an SD card.
- Z80Pack runs on the ESP32 as part of the IMSAI 8080 Replica project. It could likely be modified to run standalone, but you'd want to reach out to Udo Monk about that.
- The Altair-Duino is a complete, stand-alone Altair emulator, with 8080 and Z80 emulation. It would take some minor modifications to run the AD firmware without a front panel, but the changes are actually very minor - mostly, it involves having 3 momentary switches accessible to the user.
-
- Posts: 7
- Joined: Fri Sep 27, 2024 6:38 pm
Re: CP/M on the X16
The reason that I wanted to use a expansion card is to run CP/M software, without the need to port them or reverse engineer them (the vast majority of the software targeted for it). Without a Z80, even if there is a port of CP/M for the Commander X16, porting is a crucial task, if you don't want your project to be taken as a proof of concept.Ser Olmy wrote: ↑Fri Sep 27, 2024 11:45 pmAs the URL indicates, CP/M was written for the Z80 (originally the 8080) CPU. It was since ported to the 8086, but as with other operating systems that can run under different CPU architectures (Linux, Windows), all software needs to be compiled to support every architecture.Edmond D wrote: ↑Fri Sep 27, 2024 9:23 pmI started to poke around the net and this seems to be a good starting point - http://www.cpm.z80.de
On modern computers you can get away with running non-native software using emulation, but that's not really feasible on 8-bit or even 16-bit systems. In order to run native CP/M 2.2 or 3.0 on the Commander X16, a Z80 CPU would be required. Hence the need for an expansion card.And someone seems to agree with you, as a 6502 port of CP/M already exists: CP/M-65
The Commander X16 is even officially supported, but as mentioned you'd still have to obtain the source code for any CP/M programs you'd like to run in order to recompile them.
Re: CP/M on the X16
Well, wiser and more informed community members have spoken with more depth than I can provide. However, as a Canadian I'll put in my two (more) cents, since the penny has been eliminated here....
While the Zilog Site https://zilog.com/index.php?option=com_ ... &Itemid=59 states that all Z80 devices are End of Life now and no longer supported, the Z180 processors look like they may be a solution. Now someone designing and developing a Z180 card would be a task/challenge. There are many hardware and software projects here done by various talented people, perhaps one of them pines for a X16 CP/M capable machine.
As a side note, I actually own a couple new-old stock Z8 and Z80 support chips. I really should move them on, as someday I'll be dead and the chips most likely will go to a dumpster
Avoiding having to find source code and being able to run existing binaries makes sense, and probably be less of an uphill battle.ZeroCool32 wrote: ↑Sat Sep 28, 2024 4:34 pm The reason that I wanted to use a expansion card is to run CP/M software, without the need to port them or reverse engineer them (the vast majority of the software targeted for it). Without a Z80, even if there is a port of CP/M for the Commander X16, porting is a crucial task, if you don't want your project to be taken as a proof of concept.
While the Zilog Site https://zilog.com/index.php?option=com_ ... &Itemid=59 states that all Z80 devices are End of Life now and no longer supported, the Z180 processors look like they may be a solution. Now someone designing and developing a Z180 card would be a task/challenge. There are many hardware and software projects here done by various talented people, perhaps one of them pines for a X16 CP/M capable machine.
As a side note, I actually own a couple new-old stock Z8 and Z80 support chips. I really should move them on, as someday I'll be dead and the chips most likely will go to a dumpster
-
- Posts: 7
- Joined: Fri Sep 27, 2024 6:38 pm
Re: CP/M on the X16
Here is a screenshot of a very primitive CP/M bootloader that I wrote:
The bootloader should work on release builds of the ROM too, I tested from the latest commit (c921a17).
If anyone is intrested for the source code for this program, (it currently doesn't work) here it is: https://github.com/calmsacibis995/x16-cpm
Right now, it performs a placeholder comparison at address $9F60 (first expansion card slot).The bootloader should work on release builds of the ROM too, I tested from the latest commit (c921a17).
If anyone is intrested for the source code for this program, (it currently doesn't work) here it is: https://github.com/calmsacibis995/x16-cpm
Last edited by ZeroCool32 on Mon Sep 30, 2024 7:23 pm, edited 1 time in total.
Re: CP/M on the X16
An informative video on the Z80 microprocessor - https://www.youtube.com/watch?v=cbMdq8Dsz6Y