We are used to seeing Linux running on almost everything, but we were a bit taken aback to see [semu-c64] running Linux on a Commodore 64. But between the checked-out user name and the caveat that: “it runs extremely slowly and it needs a RAM Expansion Unit”, one can already start piecing together what’s happening here.
The machine running Linux is really a RISC-V32. It just so happens that the CPU is virtual, with the C64 pretending it is a bigger machine. The boot-up appears to take hours, so this is in no way practical, even though the comment is that optimization might be able to get a 10X speed up. It would still be about as slow as you can imagine.
To further add a layer of abstraction, the code hasn’t run yet on real Commodore hardware. Instead, it is running on an emulator. The emulator has “warp” mode to run faster than a real machine, and it is still slow. So think about that before you rush out to volunteer to boot this on your real hardware.
Tricks like this fall into the talking dog category. If a dog can talk, it isn’t that you think it will have something important to say. You just marvel that it can do it at all. Still, we get it. We spend a lot of time doing things at least as pointless. But at least it is fun!
Maybe emulate the whole thing in VR? Or maybe write some virtualization code for the C64 so you can emulate a Linux box and a quantum computer simultaneously.
Could have done it on a ‘555.
Make it a 556 dual core
… running a 555 emulator emulating 64x 555. timerripper.
Why wouldn’t you just run serial terminal to external machine running Linux? Because that is basically the same as in this article: linux is not ran on actual Commodore 64.
The C64 is running the RISCV emulator.
The RISCV emulator (semu) is running inside the VICE emulator.
Not on actual hardware, but if someone wants to do it the code should run. Eventually.
“If a dog can talk […] [y]ou just marvel that it can do it at all”
Deep insight, indeed. Sounds quite like the ChatGPT, but I disgress…
https://en.wikipedia.org/wiki/LUnix for a real unix like experience on a C64
LUnix looks like fun, thanks for the link
Why not just run a REAL unix-like OS called OS9 on another 8bit computer, the TRS-80 Color Computer.
Because OS9 is no more UNIX-like than DOS. To be fair they are alike in that they all run on computers.
Just as popcorn and lasagna are alike, as both will power a human.
Interestingly enough the relationship between DOS and Unix is closer than most people know.
Around the time Microsoft developed DOS 2.x (Which is arguably the first version of DOS that MS developed themselves) Things like NT or Windows where far into the future, but Microsoft DID have a ‘bigger iron’ OS they sold for larger commercial use, and it was a version of Xenox or a licensed flavor of Unix.
At that time, Microsoft’s marketing was selling Xenox as the Commerical Multi User OS and DOS would be the ‘Single User’ entry OS.
So for a short period of Time, DOS acquired a number Unix like features, which DOS 1.x did not have, examples were the ANSI.SYS driver, the use a ‘>’ and ‘<' for file redirection and Directory structures. (DOS 1.x had a flat filesystem)
But then MS hired from Digital Equipment Corporation a new VP and he was already on record of 'disliking' Unix in favor or DEC's VMS so most of these efforts to bring DOS and Unix together were abandoned.
Had they not hired him, I suspect that by the time of DOS 3.x or maybe 4.x there would have been at least at the text mode applications some sort of multitasking and some type of Unix like shell in DOS. It WOULD NOT have been as Unix like as Linux, but I suspect with 286 and 386's it would have acted more Unix like than DOS ever did.
It was really called “Xenix”, anyway. I have ran it :-)
Your dream “with 286 and 386 it would have acted more Unix like than DOS” does not need any imagination. It existed for real : it was MICROSOFT OS/2
Preemptive multitasking, MMU, long filenames (not “8.3”), multithreaded window manager, top-notch DOS emulation, Win3.1 emulation. Even MSExcel and MSWord were ported to OS/2 officially.
Therefore, Gates had not 2 but 3 operating systems in the market at the same time, and 2 of those were preemptive multitasking from day one. However, when Jobs presented the first NextStep beta at the end of the 1980s, Gates hired Dave Cutler as you said, because he feared not owning a multiuser multitasking OS. Indeed, Xenix legally belonged to AT&T and OS/2 legally belonged to IBM. Therefore he got rid of both OS/2 and Xenix and pushed for NT that officially belonged to MSFT instead.
Because OS9 was written in assembly language for the 6809 CPU, and has to my knowledge never been available in a Z80 version.
Just read the CoCo had a 6809, and OS9 was indeed ported to it, so ignore my comment above.
Not ported; it was developed specifically for the 6809, which many considered to be the ultimate 8-bit microprocessor. Quickly eclipsed by 16-bit processors like the 68000, which OS9 was ported to.
I can see that many are going to miss the point here. It’s an impressive feat because the C64 is not only running Linux, but it’s doing so by emulating a RISC CPU. No, there’s no physical RISC CPU tacked-on to produce an illusion such as we see with the endless stream of [antique machine] runs ChatGPT stories. The RISC CPU is emulated on the 6502 (6510). And, for those aching to get in a comment about alternative *nix operating systems that have long existed, double check your address bar. Sometimes the stories are interesting because of the subject’s utility. As often, they’re fascinating because of the (sometimes arbitrary) obstacles overcome.
Running Unix on a virtual RISC-V running in a 6502 emulation in this simulation that we call the Universe, in an xterm window on a Unix machine… It’s turtles all the way down.
Minix 1.0 could have been made run on this, maybe, considering that it once ran on a weak 8086.
Minix was partially written in 8086 assembly, so you’d need quite some work to make it run, apart from things like lack of memory.
RISC-V on a C64 is already pretty impressive. Great news!
“extremely slowly” = “… a real C64 should be able to boot Linux within a week or so.”
Alright then. That’s a lot of popcorn.
This amuses me greatly but if you think about it, it’s like how modern microcoded CPU’s like a Core i9 or Ryzen are implemented: a simpler processor running software to implement a much more complex CPU. Of course, microcode engines are much, much faster and efficient and don’t emulate the entire system.
It also reminds me of XKCD 505: https://xkcd.com/505/
I don’t think that’s a faithful representation of what modern CPUs do. They do not actual simulate a more complex CPU, they just pre-process incoming instructions and split them into more manageable parts.
You can have a Linux like OS on old computes.
An example is https://github.com/ghaerr/elks
It can boot on 256 kb of RAM. But ELKS is 8086 based.
…and a 8086 is way more powerful than a 6502.
I have started a Youtube Livestream showing a real C64 booting Linux in realtime. The RAD expansion unit is used to emulate a 16 MB REU.
Something will crash at some point. It will all end in tears… ;-)
What makes you think a dog doesn’t have something valuable to say.
In fact, they have and they do, we’re just not smart and patient enough to understand their language.