Is this different from Lunix? https://en.wikipedia.org/wiki/LUnix
LUnix is an actual C64-native operating system that you can write apps for and run on C64 hardware directly. This is a RISC-V emulator running on C64 emulating a Linux boot up.
Linux on a Commodore 64
91–97 of 97 posts
Re: Linux on a Commodore 64
#92Earlier quoted context omitted.
The mighty KERNAL is how us mere mortals can JSR FFD2. (I think that's right)
> JSR [$]FFD2. (I think that's right) Yes, that is the "print char in A and inc screen pos" in the lookup table for the actual subroutine.
Re: Linux on a Commodore 64
#93Very nice, but my first thought was "surely this will not fit in 64k of ram!". And it doesn't. It requires a 16MB REU! To explain for the uninitiated how rare this bit of hardware is. The REU available for the c64 back in the day were 256kB and 512kB. These are most commonly built replicas as there are schematics available for them. Sometime in the late 90s there was also an "expansion" for c64 that contained a compl…
> but my 386 is actually a pci card in a modern pc... Now I want one of those. I guess these days you could easily fit a 386, 486, Pentium and who knows what other SoCs on a single PCIe card, passively cooled…
Re: Linux on a Commodore 64
#94So, I like Linux and I love my C64, but.. Linux are for computers too primitive to come with their own kernel and.... the C64 comes with a kernel and shell right from the factory :P
The Commodore 64 doesn't come with a mere kernel, it comes with a mighty KERNAL https://en.wikipedia.org/wiki/KERNAL > The KERNAL was known as kernel[6] inside of Commodore since the PET days, but in 1980 Robert Russell misspelled the word as kernal in his notebooks. When Commodore technical writers Neil Harris and Andy Finkel collected Russell's notes and used them as the basis for the VIC-20 programmer's manual, th…
Re: Linux on a Commodore 64
#95Earlier quoted context omitted.
> but my 386 is actually a pci card in a modern pc... Now I want one of those. I guess these days you could easily fit a 386, 486, Pentium and who knows what other SoCs on a single PCIe card, passively cooled…
This is exactly how some SPARC workstations offered x86 compatibility back in the day IIRC.
Re: Linux on a Commodore 64
#96Earlier quoted context omitted.
I think that was partially his point - on 6502, typical-looking C code will be horrifically inefficient, at least when compared to other architectures more suitable for C. For 6502, to get the optimum assembly you'd have to structure your data in structure-of-arrays instead of arrays-of-structures and use indices instead of pointers as much as possible (at least when amount of Ball objects would be < 256).
Yes, exactly. Were I hand-writing the assembly for the 6502, I'd make all sorts of decisions that the C code doesn't - and that a compiler can't - to make it more efficient. Instead of passing in a pointer to two separate functions, I'd write a single UpdateBalls procedure that operated on global data. This data is going to be core to my game logic and physics, so I'd put it all on the ZP. As you suggested, "structur…
Now that this has come up again as the stock reason "you can't do C well on the 6502", replacing the stack, the zero page, and the register set, I'm probably going to reprioritize it and put the register allocator on pause.
Re: Linux on a Commodore 64
#97So, I like Linux and I love my C64, but.. Linux are for computers too primitive to come with their own kernel and.... the C64 comes with a kernel and shell right from the factory :P
The Commodore 64 doesn't come with a mere kernel, it comes with a mighty KERNAL https://en.wikipedia.org/wiki/KERNAL > The KERNAL was known as kernel[6] inside of Commodore since the PET days, but in 1980 Robert Russell misspelled the word as kernal in his notebooks. When Commodore technical writers Neil Harris and Andy Finkel collected Russell's notes and used them as the basis for the VIC-20 programmer's manual, th…