Live data from Hacker News

Linux on a Commodore 64

github.com

91–97 of 97 posts

Re: Linux on a Commodore 64

#91
post #36

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.

thanks. had hit 'post' too soon, but diving in, i see the emulator aspect of this. looks like it can't run in just the standard 64k though, and needs (much?) more memory?

Re: Linux on a Commodore 64

#92
post #56

Earlier 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.

Yup! Crazy how you can remember the dumbest shit after years.

Re: Linux on a Commodore 64

#93
post #85
post #62

Very 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…

This is exactly how some SPARC workstations offered x86 compatibility back in the day IIRC.

Re: Linux on a Commodore 64

#94
post #8
post #4

So, 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…

Yeah, I should have figured that HN would probably be a place where it'd be okay to write kernal, but then again, someone might point out the spelling difference between the penguin one and the chicken lips one :P

Re: Linux on a Commodore 64

#95
post #85

Earlier 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.

And how Commodore Amiga 2000 provided PC compatible extension card, funnily enough

Re: Linux on a Commodore 64

#96
post #86
post #75

Earlier 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…

I'd actually like the llvm-mos to do an automated AoS to SoA analysis and rewrite, but haven't gotten around to it yet. There aren't any intrinsic theoretical obstacles I'm aware of though; it's just difficult code to write.

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

#97
post #8
post #4

So, 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…

I wonder what the "Network" part of that referred to? The C64 didn't have much networking capability built in.
Post reply on HN