News for hackers. Stuff that matters.
Re:C64 OS: make a Commodore 64 feel fast and useful by amelius on Friday December 10, 2021 @04:14PM (#29515528)
Uh... watching 4k video, for example?
Re:C64 OS: make a Commodore 64 feel fast and useful by badsectoracula on Friday December 10, 2021 @04:23PM (#29515602)
You certainly don't need modern PC power even for 4k video, though you may need it for doing realtime decompression of some very high compression codecs (but that isn't "watching 4k video", it is "doing realtime h265 decompression for 4k video" or something along these lines).

Though codecs are one of the few cases where you see hardware being taken advantage of because that is basically their entire purpose.

Re:C64 OS: make a Commodore 64 feel fast and useful by codedokode on Friday December 10, 2021 @04:49PM (#29515858)
Playing video is very expensive task. Just updating 4K screen at 60 frames per second requires transferring of 3840×2160×60 ~ 497 million pixels or 1,49 Gbytes per second (if you skip every fourth byte). It will take at least several instructions (in the best case) to calculate value of every byte so the CPU should be able to perform billions of instructions per second.

I doubt you can do it without a "modern PC" with hardware graphic accelerator.

Also modern codecs require lot of computations and lot of memory. For example, codecs like VP9 require to buffer up to 8 frames for reference. That would take 8×3840×2160×4 ~ 265 Megabytes of RAM. The program will need to extract bits, decode arithmetic coding and calculate lots of IDCTs.

I did some research to see if it is possible to play Youtube video on 8-bit CPUs. What I found is that there is little hope for this. It's better to develop your own video compression format.

Re:C64 OS: make a Commodore 64 feel fast and useful by rbanffy on Friday December 10, 2021 @05:05PM (#29516018)
> Playing video is very expensive task. Just updating 4K screen at 60 frames per second requires transferring of 3840×2160×60 ~ 497 million pixels or 1,49 Gbytes per second

Or an analog signal and you do it the way TVs used to do. There were analog HDTV standards before we all moved to digital.

Re:C64 OS: make a Commodore 64 feel fast and useful by ddingus on Friday December 10, 2021 @11:29PM (#29518425)
Analog is a whole lot more lean.

Modern digital transfer protocols are generally 10x the pixel clock in analog terms. For a given clock speed, analog video can be several multiples of effective resolution delivered on time.

Analog standards seem to have stopped at 1080p. Nothing prevents signalling faster, but there are no capable displays to read it. I suppose that might be a neat FPGA project. Take 4K analog signals and stream them to a digital display. Really would only need a scanline or two of buffer for the simpler "just push all the pixels" use case. Frame buffer.

Re:C64 OS: make a Commodore 64 feel fast and useful by setpatchaddress on Friday December 10, 2021 @07:41PM (#29517267)
> There were analog HDTV standards before we all moved to digital

8-bit computers likely wouldn't be able to keep up with the bandwidth requirements of those systems either.

Re:C64 OS: make a Commodore 64 feel fast and useful by rbanffy on Saturday December 11, 2021 @12:44PM (#29522724)
Not the original 6510, but there are some very fast 8-bit processors out there. If you compress the color space, they may be able to flip every pixel 30 times per second.

Also, nothing stops you from implementing an 8-bit CPU with a modern process and push it into the multi gigahertz range except perhaps the fact it’ll be too small for current machinery to manipulate.

Re:C64 OS: make a Commodore 64 feel fast and useful by badsectoracula on Friday December 10, 2021 @05:48PM (#29516425)
> Playing video is very expensive task. Just updating 4K screen at 60 frames per second

Nobody mentioned anything about 60 fps. A ton of video is at 24 or 30 fps.

> requires transferring of 3840×2160×60 ~ 497 million pixels or 1,49 Gbytes per second (if you skip every fourth byte).

You do not need to update the entire screen all the time, you can do partial updates (since very frequently not 100% of the screen changes - it is the most basic fact on which video codecs rely on) and you can "heal" the output over time after partial updates (also important for video playback where you can't guarantee a fast stream).

> I doubt you can do it without a "modern PC" with hardware graphic accelerator.

Why the limitation for hardware graphics accelerators? Hardware accelerators exist for decades now and even hardware video decoders exist for more than a decade. If anything not using those is "not taking advantage of the hardware" that i mentioned.

> Also modern codecs require lot of computations and lot of memory. For example, codecs like VP9 require to buffer up to 8 frames for reference. That would take 8×3840×2160×4 ~ 265 Megabytes of RAM.

Sure, but that is RAM computers also had for more than a decade now - the PC i used in the early/mid-2000s had 2GB of RAM - hell, even the cheapo EeePC netbook from the late 2000s had 1GB of RAM.

> I did some research to see if it is possible to play Youtube video on 8-bit CPUs. What I found is that there is little hope for this. It's better to develop your own video compression format.

Sure, but i never mentioned anything about 8-bit CPUs, YouTube or even existing video compression (or specific framerate for that matter). What i wrote is that you do not need "modern PC power" to do 4K video. You do need more processing power than what would be found in 8-bit CPUs (or at least common 8-bit CPUs you'd find in 80s home computers), but i'm certain you can have a 10 year old PC play 4K video without trying that much. Perhaps even a 15 year old PC with a bit of effort.

FWIW what i had in mind when i wrote that comment was the "8088 Domination" demo which used a custom codec and player to do fullscreen video and audio playback on an original IBM PC and honestly i do not for one second buy the notion that if you can do that on a 40 year old PC you wont be able to have 4K video on a 15 year old PC - if anything i might be too generous here.

Re:C64 OS: make a Commodore 64 feel fast and useful by codedokode on Friday December 10, 2021 @06:32PM (#29516791)
> You do not need to update the entire screen all the time, you can do partial updates

You forget that you are expected to keep up to 8 reference frames. And you need to update them too.

> You do not need to update the entire screen all the time, you can do partial updates

This would work only until first keyframe.

Re:C64 OS: make a Commodore 64 feel fast and useful by badsectoracula on Saturday December 11, 2021 @08:40AM (#29520758)
> You forget that you are expected to keep up to 8 reference frames. And you need to update them too.

You refer to VP9, i explicitly mentioned i do not refer to any specific codec but just to playing back "4k video". The rest were never something that i referred to, implied or even mentioned in the message i replied to.

> This would work only until first keyframe.

This depends heavily on how the video is encoded and that is only assuming you can't find a way to occasionally update the full screen.

Re:C64 OS: make a Commodore 64 feel fast and useful by jazzyjackson on Friday December 10, 2021 @06:03PM (#29516550)
that’s why laserdisc players have serial control :)
Re:C64 OS: make a Commodore 64 feel fast and useful by kazinator on Friday December 10, 2021 @08:47PM (#29517631)
jazzyjackson may be referring to effects such as, oh, that your multi-gigabyte-and-gigahertz computer is less responsive to your keystrokes than a C64 while merely enter some text into a field.