Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
A C64 MP3 Player (lyonsden.net)
73 points by ibobev on Feb 18, 2023 | hide | past | favorite | 38 comments


As other commenters have pointed out, this is a C64 controlling an MP3 player.

People old enough to remember the late 1990s / early 2000s might recall that back then it was popular, too, to hook up an external MP3 decoder, e.g., to the parallel port; so that the PC's CPU would not be at 100% just for playing MP3 music.


Wait, was that popular? Now, I was mostly into the C64 and later Atari ST, with some insight into other platforms, but I don't think I've ever heard about an external MP3 decoder. On what's platform was this available?

The closest I can think of is the external clock chip for the Atari Falcon that allowed you to decode 44.1 kHz MP2.


I do remember being about 12 and having to download music from Napster at a crap bitrate of 32kbps because our Pentium 100 struggled over that.


mp3 on a stock C64 was showcased by Mahoney in 2010:

https://csdb.dk/release/?id=87985

https://youtu.be/0mF9kXZAjsI

tbf, it is ”mp3” but still really impressive.


sound lit bit like codec 2 on noisy rf


Spoiler: it's hardware.

And the opening line sounds like a challenge:

> Given that the much more powerful 16-bit Amiga 500 is unable to play MP3’s,


> Spoiler: it's hardware.

Yeah, this isn't MP3 on a C64. It's a C64 controlling an external MP3 player.


I think mp3 playback requires a reasonably fast multiply instruction, and the original 68000's 70 cycles per mul @ 7MHz, or 100000 muls per second doesn't qualify.


Some info here, claims a 68020 at 50Mhz (@10 MIPS) can just pull it off:

https://eab.abime.net/showthread.php?t=78994

Might mean an A500 (@1.4 MIPS) could do it if you were happy waiting 10-15 minutes for the audio of a 3 min mp3 to begin.


I don’t think a stock A500 could do that, having 1MB RAM, max.

Where would you store 3 minutes of uncompressed audio? At CD quality, that’s about 30MB.


Given the likely output quality you'd probably choose something like 32Kbps encoding for the mp3, which should fit 3 mins in 720KB. (Not sure how it'd affect CPU requirements?)

It's not that bad-sounding:

http://www.knowzy.com/Computers/Audio/Digital_Audio_Files/au...


But that machine cannot decompress that at real time. The comment I replied to said that would be solvable by adding a few minutes of buffering, but that requires a buffer to hold uncompressed audio.


Wow, how far we have come.

MOD is superior to MP3 anyway :)


I think a stock Atari Falcon is capable of playing mp3 thanks to the DSP (56001), but it still isn't a walk in the park even with that (in combination with a 68030 as the main CPU).


It took many years until MP3 decoding on a stock Falcon was possible. While the machine was generally available, there was no MP3 implementation, and the belief was that it was impossible.


The C64 didn't have any kind of PCM output, so it basically has to be. Early SID chips had a voltage glitch you could use for 1-bit ("speaker-style") output, and a few games used it for some effects. But you couldn't get music out of it in any real sense.


Four-bit (the amplitude of the "click" caused by the SID's voltage leak is proportional to the volume, which is four-bit). There are many demos that used it for digitized music, and Rob Hubbard's Skate or Die! intro tune used it as a practical fourth voice. See also the original Covox Voice Master.


There are also other techniques (found after the computer's heyday), up to 8 bits 44.1 KHz:

https://www.livet.se/mahoney/c64-files/Musik_RunStop_Technic...

PS. it might not really be 8 bits, but only 93 or 107 different values (6..7 bits). More details: https://csdb.dk/forums/?roomid=11&topicid=103092&showallpost...


> in any real sense

I would be sure that if Tim Follin decided to just use that, he would have "made full sense" (cpr. "Agent X" and "Chronos", ZX Spectrum).


As fully signed up C64/SID fanboy, Chronos on the Speccy is probably my favourite piece of music in any game.. Absolute 1-bit sheer heaven..


Now, only if it could play music from a casette…


You can use the tape sense pin as a 1 bit sampler, and toggle the volume for playback, so you can do that. Badly.


The SID chip has an audio in that lets you use the filter, so it should be possible.


Can a 386SX play an mp3 ? Or any CPU without a FPU for that matter ?


From memory a 486DX4-100 or an overclocked 486DX2-66 (to 80MHz) could just about handle 128kbit MP3s


Interesting. My Amiga with a 68030 @42Mhz could just about pull off mono 128Kbps decoding (as long as you didn't multitask too much). That would suggest the 486 was almost clock comparable to a 68030 at least for lossy decompression, perhaps the 486 was around ~110% had their been a 68030 series 80Mhz equivalent.


Yeah, I seem to remember there was that brief time period where my PC could barely play MP3s and I used to treat them like zip archives -- rendering them back out to WAV files to play them back.

I think you're right and that was around the 486 DX2, DX4, Pentium transitional time period.


I wonder if that was also an I/O limitation rather than just a CPU thing. Old floppies probably would not handle 128kbit. Hard drives were slow too, so was memory and bus.


I remember I could play 128kbit MP3s in full quality using mpg123 running under Windows for Workgroups 3.11 ONLY when I overclocked my 486DX4-100 to 120Mhz.


Ah nostalgia... This was my first PC processor. I remember my CPU came with some sort of a bug that prevented me running windows 3.11 on it.


I know a 486 can just barely play them (while doing absolutely nothing else)


Doubtful. Back in the day when my 'work computer' was a Pentium (Pentium 200MMX to be exact) playing a MP3 consumed 50% CPU. Note, I no longer remember if mpg123 was using MMX instructions or not.

Given how much faster a Pentium 200MMX was than any 386 CPU, I very much doubt a 386 (even a DX) would have had enough power to decode in real time a MP3.


Found this (cubic player on a 386DX at 40MHz) https://www.youtube.com/watch?v=6Jj97NXgHw4 and I'm wondering how much a 32bit ISA is better than a 16bit one for integer decoding.


I remember using winamp on a Pentium 90 and it was up to the job single tasking. I couldn't say the same about the one time I tried to encode.

I can't recall what hardware I first used an MMX-optimized encoder. I remember it making a huge difference though.


I used to listen to mp3s on my FPU-less Sharp Zaurus clamshell using madplay [0] with cycles to spare.

Linked from [0] is a page claiming to use MAD for mp3 playback on a Newton [1].

Not sure how those compare to a 386SX, but it's probably a good place to start.

[0] https://www.underbit.com/products/mad/

[1] https://40hz.org/Pages/newton/packages/madnewton/


Even Pentium class CPUs had problems handling MP3s depending on the encoding


Resource Limit Is Reached

The website is temporarily unable to service your request as it exceeded resource limit. Please try again later.

Apparently it's a C64 web server, too.


Limit exceeded by what?

Is that really supposed to be some sort of standard response, or is it something idiosyncratic to this server?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: