Topic: Would a Linux(-like) OS on a C128 (Z80) be possible?  (Read 3439 times)

Author Message

0 Members and 1 Guest are viewing this topic.

Offline sunseeker2k

  • ZX80
  • *
  • Posts: 7
  • Kudos 0
    • View Profile
Would a Linux(-like) OS on a C128 (Z80) be possible?
« on: May 10, 2015, 01:12:56 PM »
Hi everyone,

since this is my first post, I'll use it as a short introduction as well. I'm from Germany, I got my first computer, a C64 when I was 12, and virtually the only stuff I did with it (but this to a quite extensive degree) was learning BASIC and 6502 machine code / assembler  programming by myself. A while ago I bought a used C128 and now I'm excited to get the converter which shall convert the audio and video signal to HDMI (according to reviews it really works).

The C128 has two CPUs, an 8502 @2 MHz and a Z80 @4 MHz. It can't make use of them simultaneously, and the 8502 runs on Commodore BASIC while the Z80 runs on CP/M.
Many people are surprised, when they hear that there were Linux(-like) systems developed which worked on the C64/C128. However, there are some, for example LUnix:
http://en.wikipedia.org/wiki/LUnix
Now the Z80 is a really powerful processor: It has more instructions (there are also negative points concerning the architecture though), but even it's clocking on the C128 (4 MHz) is quite high for that time. And I think it's just incredible that you can overclock it to 80 MHz with a lot and to around 20 MHz with relatively little effort (Sorry I can't find the links right now). The 80 MHz set-up involved a water-cooling, so that would not really fit to the C128. But I think 20 MHz could be realized, maybe one would have to use a little bit bigger cover so that a good cooler could fit.

Now my question is: Why was there never a Lunix(-like) OS coded for the C128 running on its 4 MHz? It's obvious that you can't do much with such an OS on a C64 with 64k RAM, but I think if clever coding is being done, then it would run quite smoothly on a C128 Z80 @20 MHz with upgraded RAM.
Did this http://www.vintage-computer.com/vcforum/showthread.php?27978-Unix-on-a-Z80-machine&p=203275#post203275 post really give any well-grounded reasons to say that it would not or only hardly possible?

I would be really curious what others think about this.


Thanks in advance!

Offline Womble

  • Amiga 4000
  • ******
  • Posts: 1190
  • Kudos 33
  • Gender: Male
    • View Profile
    • Aussie Arcade
Re: Would a Linux(-like) OS on a C128 (Z80) be possible?
« Reply #1 on: May 11, 2015, 11:16:55 PM »
Mainly timing and the fact the niche was already filled.

In that era CPM was king for serious work on a Z80, which had had a lot of success in early business systems. At the time UNIX was still considered a multi user mainframe OS on the heavy iron and was mostly confined to academic institutions and high end workstations. There was little point in having it on a single user system without a network or disc storage so concept of having a Unix like OS for the home computers of the day made no sense as the use case was so different.

By the time that the concept of putting a Unix like OS, ie Minix and Linux  on a home machine had come up the Z80 was dead, and even 68000 was already on the way out and as an architecture it was was massively hampered by the lack of virtual memory (as is the Z80). Later version of the 68000 did address that (68020 was the earliest I think) but it was too late and was steamrollered by the 286 and 386 architectures.

Basically no on has bothered to squeeze it onto a Z80 because by the time it was a worthwhile project the Z80 was a dinosaur, and suitably different to the x86 architecture (if not the instruction set) that porting it to the Z80 would be a huge job, with little gain and a rather unimpressive outcome.

CPM did see a brief resurgence on home Z80 based systems in the late 80s as a way to run native business applications and it was a selling point for machines that could run it. Some machines had Z80 expansion boards to enable them to run it, some machines could run it in their base configuration (Amstrad 6128 for example) but you needed a standard platform which supported a floppy drive and an 80 character display as minimum. The C128 has a Z80 built in solely so the machine could run CPM as it was seen as a major feature but I doubt it actually saw much action.

CPM filled the niche that would become Linux on later platforms and so there was no need for Linux on a Z80 other than as a cool project, so you would need someone insane enough to invest the time to do it.
« Last Edit: May 12, 2015, 12:31:47 AM by Womble »
Sic Transit Gloria Atari

Offline sunseeker2k

  • ZX80
  • *
  • Posts: 7
  • Kudos 0
    • View Profile
Re: Would a Linux(-like) OS on a C128 (Z80) be possible?
« Reply #2 on: May 16, 2015, 07:15:01 PM »
Thank you very much for your reply, which is quite an in-depth analysis!

Do you know if there are any PGP/GPG implementations available for CP/M? If not, I guess it would be not that difficult to port it? What about TOR regarding this question?

And how could the potential of manipulating CP/M in regards to security (up to the point of virtualizing the system) be compared to Linux/Minix/Unix?


Thanks in advance!
 

Offline sunseeker2k

  • ZX80
  • *
  • Posts: 7
  • Kudos 0
    • View Profile
Re: Would a Linux(-like) OS on a C128 (Z80) be possible?
« Reply #3 on: May 16, 2015, 07:21:57 PM »
A very important point is: There is no flashable component on a C128 and the same would probably apply for many 68000 (maybe even 68020 ) systems [I would be curious about this latter question]. And you don't need a floppy or cassette for the C128, you could put it all together on a non-flashable cartridge.

With the introduction of the x86 architecture you could forget security: Flashable PCI, BIOS, etc... I don't think that was being made used of in the first days, but it is surely the case now and it is fascinating to know what can be done by making usage of the ACPI tables...

Some people would say: Use QubesOS (with the latest Intel-VT). I would answer: Wasn't there something around 1975 between IBM and the developers of DES? Why should anyone trust any Intel-VT? That is totally crazy - A secure system is just impossible on x86 architecture.