- MCP server with stdio transport for local use - Search episodes, transcripts, hosts, and series - 4,511 episodes with metadata and transcripts - Data loader with in-memory JSON storage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
348 lines
17 KiB
Plaintext
348 lines
17 KiB
Plaintext
Episode: 2997
|
|
Title: HPR2997: World of Commodore 2019 Episode 7: Video Playback with 1541 Ultimate
|
|
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr2997/hpr2997.mp3
|
|
Transcribed: 2025-10-24 14:37:57
|
|
|
|
---
|
|
|
|
This is Hacker Public Radio Episode 2997 for Tuesday 28 January 2020.
|
|
Today's show is entitled World of Commodore 2019 Episode 7, video playback with 1541 Ultimate
|
|
and is part of the series, Hobby Electronics. It is hosted by Paul Quirk
|
|
and is about 19 minutes long
|
|
and carries a clean flag. The summer is. In this seventh episode,
|
|
Greg returns to tell us how he got full video playback on a Commodore 64.
|
|
This episode of HPR is brought to you by An Honesthost.com
|
|
Get 15% discount on all shared hosting with the offer code HPR15
|
|
that's HPR15
|
|
Better web hosting that's Honest and Fair at An Honesthost.com
|
|
Hello, good listeners of Hacker Public Radio.
|
|
Paul here with my seventh installment of my World of Commodore mini series.
|
|
I hope the new year has been good to you so far and I really hope you're enjoying this series.
|
|
If you are, then please stop by my personal, non-commercial blog at pquirk.com and leave me a note.
|
|
While you're there, you can see pictures I took of this presentation as well as some of the others from this series.
|
|
In this episode, Greg returns with a second presentation where he explains
|
|
how he got full screen video with audio to play on a Commodore 64,
|
|
which is a pretty impressive feat considering the limitations of this computer from 38 years ago.
|
|
I credit the open nature of the Commodore 64, which allowed it to surpass many of its contemporaries back in the day.
|
|
It really was a great machine for hackers both then and today.
|
|
Unlike the previous six episodes, I had to edit out the demonstration portions of this podcast
|
|
as Greg made use of commercial videos he had converted.
|
|
While this video itself is pretty grainy, the audio streams through crystal clear
|
|
and may present a copyright problem for hacker public radio, so I felt it best just to leave that part out.
|
|
It is possible that the Toronto Pet Users Group YouTube channel may decide to leave this part in,
|
|
but as of the date of this podcast, they have not yet uploaded anything to their channel from World of Commodore 2019.
|
|
Of course, your best bet is to just attend the World of Commodore yourself to enjoy the whole experience
|
|
if it returns for the year 2020.
|
|
But if you're really interested in hearing the portion that's been edited out for HPR,
|
|
send me an email and I'll see what I can do.
|
|
And so, with no further ado, I present to you video playback with 1541 Ultimate.
|
|
So, my second talk is video playback with the 1541 Ultimate 2.
|
|
Okay, so ever since I was a kid, I have wanted to have motion video on my Commodore 64.
|
|
The first video that I ever saw was on a 46, running Windows 3.1,
|
|
and it was this 3-second clip that was like the size of a poster stamp with no audio,
|
|
and it was actually a clip of the Enterprise from Next Generation jumping to warp.
|
|
I was amazed.
|
|
But I wanted it on my Commodore 64.
|
|
So, 64 graphics modes.
|
|
The C64 has two native bitmap graphic modes.
|
|
It's got high-res multi-color.
|
|
So, in these modes, bitmap data and color data are stored in different parts of the memory.
|
|
So, for either mode, a full-screen bitmap is 8,000 bytes, so just under 8K.
|
|
If you're in high-res mode, you have 1,000 bytes of color data.
|
|
And if you're in multi-color, it needs 2001 bytes of color.
|
|
And the one byte, by the way, is the background color for the whole screen.
|
|
So, that would mean that the smallest native frame size, if you put it in high-res mode,
|
|
and you said, well, let's just make it black and white and maybe divor it in order to get some tones.
|
|
You could just make the color data static, and you'd end up with only bitmap data.
|
|
So, the minimum frame size is around 8K.
|
|
So, several challenges.
|
|
Memory size.
|
|
C64 only has 64K RAM.
|
|
So, if we divide how many frames can we fit, it's a maximum of 8 frames.
|
|
But, of course, in practice, you need your code, you need IO space, so it's like 6 frames.
|
|
Very much video.
|
|
Okay, so what approach is, well, you know, we could stream the frames from disk.
|
|
We just stream into memory, and, well, the second problem is, discload speed.
|
|
I mean, the IEC bus, even with jiffy-doss, according to the jiffy-doss manual,
|
|
it's only 6K per second.
|
|
So, you know, do some division.
|
|
It's less than 1 frame per second.
|
|
Still don't have any audio.
|
|
And also, the harder you try and read the faster you try and read data from the bus,
|
|
it just completely taps the CPU.
|
|
Okay, so what about compression, right?
|
|
That's the obvious move, which is compressed the frames.
|
|
And the problem with compression is that decompression requires the CPU,
|
|
and that takes time away from load speed.
|
|
So, you know, if you did some really clever work, you know, well, maybe you could get two frames per second.
|
|
But, you're not going to get many frames per second.
|
|
So, you know, video just needs more memory, and it needs more CPU horsepower.
|
|
So, you know, sad face, you know, is my C64?
|
|
Is it hopeless to get a video on my C64 support?
|
|
Super CPU.
|
|
Creative micro designs released the Super CPU in the mid to late 1990s.
|
|
It's an accelerator with 20 megahertz, and it has a 16-bit mode, and it has up to 16 megs of ground.
|
|
You know, it's like, okay, now we're talking, right?
|
|
This is the thing.
|
|
Okay, so, I demoed a video player for the Wings operating system in Chicago on Commodore Expo in the early 2000s.
|
|
So, Wings was a Unix-like multitasking OS, which was written for the Super CPU.
|
|
It was written by Joel's McGinnis from Australia.
|
|
And it had the beginnings of a high-res GUI, and it also came with a JPEG renderer
|
|
that would convert JPEGs to four-color, dithered, high-res images.
|
|
And I started thinking, wow, you know, if I could export JPEG frames,
|
|
I could write tools to convert JPEG frames into pre-converted frames of a video on the C64.
|
|
You know, then I could pack them together with a raw PCM audio and only crap.
|
|
You know, that might actually work.
|
|
And it did work.
|
|
And it was very impressive.
|
|
But, you know, full-motion video with synchronized digital audio.
|
|
So, let me tell you how I created those videos for Wings.
|
|
I used QuickTime on a Mac and exported a set of frames as JPEGs.
|
|
So, let's say it's 1,000 frames.
|
|
And as JPEGs, there may be, you know, 2K each.
|
|
So, then, yeah, that's, you know, 2MX of data, right?
|
|
But in those days, it was actually kind of a pain to transfer data from a Mac to a C64.
|
|
And so, believe it or not, the most convenient way was to zip them up and transfer them over a modem to an ID64.
|
|
Now, I don't know if you remember what a 56K modem was like, but this is not a fast process.
|
|
This is also not a fast process.
|
|
Then, I had to unzip the multi-megabyte file on a Commodore 64.
|
|
Then, I had to decode and convert 1,000 or more JPEGs on a C64.
|
|
This took hours to finish, even at 20 MHz.
|
|
So, I'll file a video with Maxo at around 15 megabytes,
|
|
because the operating system needed about a meg.
|
|
And you'd get about two minutes of playback.
|
|
But it worked.
|
|
Okay, so playing back.
|
|
So, how was a Wings video playback?
|
|
I'm saying all this for context, okay?
|
|
So, you needed to, I would load from an ID64,
|
|
which is probably still to date the fastest native mass storage device on the 64.
|
|
Loaded in a super-round.
|
|
That took over a minute.
|
|
Once that was done, you had two areas of memory.
|
|
You had an area for audio, and you had an area of unpacked video frames.
|
|
So, audio playback.
|
|
The audio playback was done with a device called the Digimax,
|
|
which is a little plugs into the user port.
|
|
It's an 8-bit stereo DAC.
|
|
It was made by a friend, Vanessa Dandenberg.
|
|
And it's still actually commercially available.
|
|
A couple of lots of go from Sherwer Plus.
|
|
Okay, so there's something about the way that the brain works,
|
|
that if video stutters a little bit,
|
|
it's actually not really not annoying.
|
|
But if audio stutters, it's very annoying.
|
|
Now, I think this is actually for some sort of evolutionary reason.
|
|
Every time you blink, your vision gets disrupted.
|
|
Every time you look around it,
|
|
it's kind of used to your visuals getting disrupted,
|
|
but there's kind of a continuity to audio that we're used to.
|
|
So, for that reason, the progress of the audio drove the video frames.
|
|
So, wings was multi-threaded.
|
|
So, basically, I had one thread that was just dedicated to copying audio data consistently.
|
|
And then, ahead of time, it would calculate,
|
|
well, how many bytes of audio are there going to be per frame?
|
|
And after that many bytes of audio,
|
|
it would send a message to the other thread to tell it to push another frame.
|
|
So then, the other thread would copy the frame into a wings GUI view buffer.
|
|
And the OS would composite the buffers together onto the screen.
|
|
The SuperCPU was so fast that it could play three videos simultaneously
|
|
in overlapping windows.
|
|
It's very cool.
|
|
Okay, but the sad reality, right?
|
|
Sad reality.
|
|
So, the first problem is, of course, creating these videos is very hard work.
|
|
Like, I only made maybe four or five samples,
|
|
and I only know one other guy who climbed the mountain
|
|
and made a wings video.
|
|
It was like a clip of himself at some Euro double party drink in a beer.
|
|
Okay, the second problem.
|
|
SuperCPU is no longer available.
|
|
But not only that, many C64 die hearts kind of rejected the SuperCPU.
|
|
It's like, well, okay, you did it with the SuperCPU,
|
|
but it's not really a C64.
|
|
So, more problems.
|
|
You needed a lot of hardware.
|
|
You needed SuperCPU for playback,
|
|
but you also needed SuperRAM to be the memory storage.
|
|
And these are actually separate products.
|
|
You can want EVA.
|
|
You can spend a huge amount of money to get a SuperCPU,
|
|
a rare SuperCPU, and it might not even have SuperRAM.
|
|
And so, the SuperRAM is actually a separate product that was sold.
|
|
You needed the Digimax for half-decent audio,
|
|
and you needed an IDE 64 for reasonable load times.
|
|
Even with the IDE 64, though,
|
|
load time is almost as long as playback time.
|
|
So, the sad reality is,
|
|
very few people will ever see the Wings videos playing
|
|
on their very own C64.
|
|
Ah, no SuperCPU.
|
|
So, that means we're back to square one, right?
|
|
We've got, you know, we have all of our memory limitations, et cetera.
|
|
But there's a new piece of hardware in town.
|
|
Now, there's a 1541 Ultimate 2,
|
|
and I should say that whatever the 1541 Ultimate 2 can do,
|
|
can also be done with the Ultimate 64.
|
|
So, what is the 1541 Ultimate 2?
|
|
If you don't know, I wrote an epic review
|
|
of all sorts of stuff that it can do,
|
|
and you can find that on c64wise.com if you're interested.
|
|
But in a nutshell,
|
|
it is kind of a fat cartridge that plugs into the user port.
|
|
It is configurable as a standard RAU,
|
|
and it's configurable up to 16 megs of memory.
|
|
Let's see where this is going.
|
|
It also has access to USB-based storage devices.
|
|
Plus, it has something very interesting,
|
|
called the ultimate audio module.
|
|
A festival is commercially available today.
|
|
So, you know, when I show stuff like this,
|
|
it's encouragement for people.
|
|
The first thing I could do,
|
|
if I went up 1541 Ultimate 2.
|
|
So, once again,
|
|
when I got my 1541 Ultimate 2,
|
|
and I started reading about all the stuff I could do,
|
|
of course, I thought,
|
|
I can do a lot of video on my 64 game.
|
|
But this time,
|
|
the tools available on a Mac or PC are much better.
|
|
So, creating an ultimate video.
|
|
Here's what you do.
|
|
Create an ultimate video.
|
|
You find a video on YouTube that is under two minutes and 30 seconds.
|
|
Okay, we still do have some memory limitations.
|
|
My personal preference is Mootrellers,
|
|
because they're kind of punchy and they're like a little story.
|
|
You copy the URL of the video,
|
|
and you paste it into a PHP script.
|
|
At least this is what I do to make these videos.
|
|
And it's done.
|
|
The video is a video file,
|
|
totally transcoded and ready for the C64,
|
|
is ready and less than five minutes.
|
|
So, how does it do that?
|
|
Script uses several tools.
|
|
It uses YouTube DL to download the file from YouTube to a local file.
|
|
It uses FFNPIG to extract the audio to Rop ECM.
|
|
It uses FFNPIG again to extract a series of PNG images.
|
|
Frame rate is configurable from 6, 8, 10, 12, 15,
|
|
or 20 frames per second.
|
|
I usually use 10 frames.
|
|
If you want to get a little longer playback,
|
|
you can lower the frame rate.
|
|
And if the video itself is just shorter,
|
|
like it's only one minute clip,
|
|
you can raise the frame rate to get smoother playback.
|
|
Formatting options are dithered high-res black and white,
|
|
which I kind of had a demo of this running last year.
|
|
And now there's also dithered multi-color,
|
|
thanks to the C64 graphics library by Passe Albert O'Halla.
|
|
I think his name is Framist.
|
|
So, the result of the video file is,
|
|
it's similar in format to the wings movie file format.
|
|
It's basically packed, pre-converted frames
|
|
with a Rop ECM audio segment and a header.
|
|
And it's ready to transfer to your 64.
|
|
So, old drawbacks overcome.
|
|
You can create a video now in minutes, not hours.
|
|
And you can transfer them to your C64 in seconds,
|
|
because you just take the USB key out,
|
|
stick it in the side of the 54-tonult,
|
|
plus 64, right?
|
|
You don't have to transfer it over 56-tonult.
|
|
Okay, this is big.
|
|
You can load the video into the RAU in under five seconds.
|
|
Now, how's that possible?
|
|
So, the SuperCPU is an accelerator,
|
|
but it's not a storage device,
|
|
so you have to have your storage device,
|
|
and then you need a C64 program to read the data
|
|
off the storage device, read it through the CPU,
|
|
and put it into SuperRAM.
|
|
But the 1541 ultimate is a storage device,
|
|
and it's an ultimate audio module,
|
|
and it's an RAU, and it's all rolled into one device.
|
|
So, you can use the C64 to send a message to the 1541
|
|
and tell it, take this file,
|
|
and load it into the RAU.
|
|
And it will load it into the RAU in the back end very quickly.
|
|
Digital audio.
|
|
So, let's talk digital audio for just a moment.
|
|
Pushing digital audio on a stock C64
|
|
is actually very CPU-intensive.
|
|
So, let's say that the quality of audio
|
|
is something reasonably low,
|
|
like 11 kill hertz, 8 bit auto.
|
|
That's 11,025 bytes per second.
|
|
So, now let's say it takes maybe an average
|
|
of, say, 18 cycles per sample.
|
|
That's 18 times 11,025 samples per second.
|
|
That's darn near 200,000 cycles per second.
|
|
But on a one-megahertz machine,
|
|
that's like 20 percent of the CPU
|
|
just to push raw audio data out the Digimax on user board.
|
|
You can imagine that if you were to increase that sample rate
|
|
to, say, 22 kill hertz, 8 bit stereo,
|
|
all of a sudden it would take 80 percent of the CPU
|
|
just to push the audio.
|
|
Okay, the ultimate audio module.
|
|
The ultimate audio module is something you can enable
|
|
on the 1541, and it activates a small range of IO addresses.
|
|
And what it does is it plays audio samples
|
|
directly out of the RAU memory.
|
|
So, it has audio hardware with audio jack
|
|
and it just plays the samples out of the RAU.
|
|
So, the C64 specifies to it sample rate
|
|
and the bit rate and how many channels of audio there are
|
|
and where the sample starts and how fast to play it,
|
|
and what more even so on, and it plays it.
|
|
And while it's playing it,
|
|
it uses 0 percent of the C64 CPU.
|
|
So, in a nutshell, here's how the video player works.
|
|
The C64 commands, the ultimate dust,
|
|
load a file into the RAU, and it does that.
|
|
The C64 commands, the ultimate audio module,
|
|
to start playing the audio.
|
|
Then the Victus Rastriar Q is used for the simple counter
|
|
to divide the frame rate of the 64 down to the frame rate of the video.
|
|
And every time that a frame needs to be updated,
|
|
the C64 commands the RAU to copy the next frame's data
|
|
into main memory for the Victor render.
|
|
And then go.
|
|
You've got a full motion within the limit of the frame rate
|
|
that I specified, with synchronized digital audio on your C64.
|
|
So, we've got all these six minutes or so for a demo.
|
|
So, let's do that.
|
|
I hope you enjoyed Greg's second presentation.
|
|
It really goes to show that, all these years later,
|
|
there are still new things to do with a Commodore 64.
|
|
Well, that's it for presentations of World of Commodore,
|
|
and there is only one episode left.
|
|
That being the vote of thanks, as the members of T-Pug talk
|
|
about this being their 40th anniversary,
|
|
and also give out cake, which I cut.
|
|
If you enjoy my podcast and would like to hear more from me,
|
|
send me an email, or leave me a message at my personal blog.
|
|
You can also get in touch with me in the Fediverse at
|
|
paulatcloud.peakwork.com.
|
|
Until next time, drive safe and make sure to have fun.
|
|
You've been listening to Hecopublic Radio at HecopublicRadio.org.
|
|
We are a community podcast network that releases shows every weekday
|
|
Monday through Friday.
|
|
Today's show, like all our shows,
|
|
was contributed by an HBR listener like yourself.
|
|
If you ever thought of recording a podcast,
|
|
then click on our contributing to find out how easy it really is.
|
|
Hecopublic Radio was founded by the digital dog pound
|
|
and the Infonomicon Computer Club,
|
|
and is part of the binary revolution at binrev.com.
|
|
If you have comments on today's show,
|
|
please email the host directly,
|
|
leave a comment on the website,
|
|
or record a follow-up episode yourself.
|
|
Unless otherwise status,
|
|
today's show is released under creative comments,
|
|
attribution, share a life, 3.0 license.
|