Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
It's funny.  Laugh.

Streaming RealAudio From a Commodore 64 332

An anonymous reader submits: "This just came in on comp.sys.cbm and I think it will be of general interest here at Slashdot as well. Two Commodore hackers, Adam Dunkels and Peter Eliasson, have built an Ethernet card for their C64 and have connected one to the Internet. But they aren't 'just' running a TCP/IP stack and a web server on it - they are also running a RealAudio server which streams audio from the C64's cassette player and apparently, it sounds awful! They have the full source code avaliable and pictures of the C64 server."
This discussion has been archived. No new comments can be posted.

Streaming RealAudio From a Commodore 64

Comments Filter:
    • Well, you could if it wasn't aready slashdotted.

      you can't get there from here
    • by beertopia ( 165024 ) on Monday April 15, 2002 @02:43AM (#3341814)
      Well, this is what you would've seen if you were one of the first 10 people to click the link... poor lil' webserver...

      Real-time streaming audio from the C64

      This C64 server is not only running a web server, but is also running
      a very simplistic RTSP/RTP (Real-Time Streaming Protocol/Real-Time
      Protocol) server that is compatible with RealPlayer
      version 8. This makes it possible to send real-time streaming audio
      over the Internet directly from the Commodore 64.

      The cassette port on the C64 is capable of sampling 1-bit samples at a
      maximum rate of approximately 8000 Hz. We are sampling 1-bit audio
      from the cassette player and sending it out over the Internet using
      the TFE Ethernet cartridge. To reduce the load on the C64, we only
      allow one listener to listen at a time and only for about 20 seconds.


      In order to listen, you'll need to have the free RealPlayer 8 Basic [real.com] (click on the "RealPlayer 8
      Basic" link at the bottom left of the page). While the streaming audio
      server might work with other players, we haven't tested it with
      anything but RealPlayer 8 Basic.

      When RealPlayer is installed, click here [slashdot.org]. If
      RealPlayer says that it is experiencing network problems, this is
      because someone else is already listening. Beware! It sounds


      We are playing remixes of famous C64 SID music taken from the
      faboulous C64 mp3 remix site remix.kwed.org [kwed.org]. Because of the bad sound quality of
      the real-time audio stream, it is impossible to tell which tunes we are

    • Not half bad (Score:2, Insightful)

      by cscx ( 541332 )
      Currently active TCP connections
      Local Remote State Retransmissions Timer Flags
      6510 SYN-RCVD 0 3 *
      6510 SYN-RCVD 4 8 *
      6510 ESTABLISHED 0 3 *
      6510 SYN-RCVD 1 3 *
      6510 ESTABLISHED 7 38 *
      6510 ESTABLISHED 6 24 *
      6510 LAST-ACK 6 35 *
      6510 FIN-WAIT-1 0 2 *
      6510 SYN-RCVD 7 1 *

      Maybe it's just that time of night...
    • Nope. Shouldn't happen. Says there that the streaming audio server could theoretically handle 5 simultaneous users, but then the web server would die, so they only allow one TCP connection on the poor thing.

      Umm, wait, I think it *is* down...
    • You'll kill the server. Aperantly they have some special optimization on port 80 to keep it from being overloaded, but not on port 6510.
  • by tuxzone ( 64722 ) on Monday April 15, 2002 @02:36AM (#3341784)
    A note for youngsters... The C64 is not a fancy new 64 bit machine, it is an 8 bit machine (vintage 1982) with 64Kbyte memory.
    • Your point is well-made (perhaps even funny), but I think you don't give younger readers enough credit. Just because something is before one's time doesn't mean that one is completely (or even partially) blind to what it is.

      I'm 23 - born in '78 - and I know what a MITS Altair is (I was -3 then), a TRS-80 (-1), and yes, a TI-99/4A (a toddling 1 year old).

      Long live dorks who know their history!

    • Don't worry. Bill Gates said 64K is all anyone would ever need! :)
  • Finally I have something I can do with all the cassettes I collected through the 80s, and judging by the colors of the wires and circuit board, somewhere I can use all my day-glo clothes!
  • Listen... (Score:5, Funny)

    by soulsteal ( 104635 ) <soulsteal@[ ]37.org ['3l3' in gap]> on Monday April 15, 2002 @02:41AM (#3341806) Homepage

    and you might hear the crackle of a flaming C64...

    • by Frank T. Lofaro Jr. ( 142215 ) on Monday April 15, 2002 @11:41AM (#3343490) Homepage
      Well if you want to cook a C64, there is a BASIC command that may do it:

      WARNING: Use of this is at your own risk! May destroy hardware! Not recommended for any machine you'd like to keep! I WILL NOT BE HELD LIABLE FOR ANY DAMAGE WHATSOEVER

      POKE 53270, PEEK(53270) OR 32

      I did it and I could feel heat coming up from the keyboard and a smell like thermal paste overheating or something.

      I turned it off very quickly and it did survive.

      It was responsive and with a normal display right until I cut the power.

      Some C64 docs say bit 5 of register 53270 is the reset bit for the VIC controller.

      Some just say, ominously:


      Why a reset bit would cause an overheat is beyond me. Anyone have a clue? I'd really like to know what is so bad about setting that bit. I was hoping it would just be a reset bit.

  • by Ezubaric ( 464724 ) on Monday April 15, 2002 @02:41AM (#3341807) Homepage
    Some people see things as they are and say why. I see things that never were and say why not.

    Then again, some people say "why not," get drunk, and and hook a piece of crap up to the internet.

    $50 bucks to the first person that builds a C64 emulator out of legos that streams video of a coffeepot and runs BSD.
  • This is definately going to be the first time a Commodore 64 has been /.ed, and will probably set the record for how long it takes to get /.ed.

    Of course, rebooting a C64 is pretty fast.
    • wrong... there have been a couple C64 webservers in the past. All of which, to my knowledge, were shown on slashdot, and all of which died after a few seconds. just check the archives :)


  • Hopefully it doesnt run on same c64's also..
  • I've got most of his personal webpage backed up, which has info on the project, so if you have somewhere to put it, reply with a place to upload.
  • Mirror (Score:4, Informative)

    by ink ( 4325 ) on Monday April 15, 2002 @02:45AM (#3341821) Homepage
    Well, I managed to mirror the front page before the machine went down (hopefully others can mirror my copy before my machine goes down!) http://inconnu.isu.edu/~ink/c64 [isu.edu]
    • Re:Mirror (Score:3, Informative)

      by ender81b ( 520454 )
      I mirrored the pictures here (let time warner take some of the bandwith costs =):

      http://home.neb.rr.com/pubhtml/c64/c64.html [rr.com]
  • Here's a pic [psy-co.net] i took of it when there were still 0 comments, and it wasn't /.'ed yet.
    Yeah, i know the gray sucks, but i had to do this quick.
  • Hrm... (Score:5, Funny)

    by autopr0n ( 534291 ) on Monday April 15, 2002 @02:47AM (#3341829) Homepage Journal
    I bet that ethernet card probably has more CPU power then the rest of the machine.
    • Powerful peripherals (Score:5, Informative)

      by Novus ( 182265 ) on Monday April 15, 2002 @03:10AM (#3341873) Homepage
      On the whole, lots of peripherals and expansion cards back then had ridiculous amounts of processing power. For example, the floppy drive usually used on the C64, the 1541, had a 6502 processor (a slightly older version of the 6510 used in the C64 itself). C64 facts from here. [ic.ac.uk] The floppy drive was connected to the machine with an insanely slow serial port, so it had to work more or less autonomously.

      The silliest example of over-powerful peripherals has to be the General Sound card for the ZX Spectrum. The General Sound contains a 12 MHz Z80 and 128 K RAM, upgradable to 512. The Spectrum contains 48 or 128 K RAM (256 or 512 on some clones) and has a 3.5 MHz Z80 (7 MHz or more in some clones). In other words, the sound card (which is fully programmable) is more than 3 times as powerful as the machine it's connected to. General Sound info here [mek.iif.hu].

      For today, ponder the latest 3D graphics accelerator.
      • by vidarh ( 309115 ) <vidar@hokstad.com> on Monday April 15, 2002 @04:41AM (#3342028) Homepage Journal
        Actually, the 6502 is close enough to the 6510 that your C64 most likely will keep running if you exchange the two. The difference is primarily 8 extra IO lines on the 6510. On the C64 some of those were, I believe (but it's been about 15 years :-) used to access the tapedeck.

        For an even more extreme example of extra CPU's (though not necessarily much more powerful, and two of them not in use :-), I at one point had an Amiga 2000 with a 68000 CPU. I got a used 68020 accelerator board for it. In addition it had one of those PC cards that let you run DOS in a window, with an 8086, and an 286 accelerator for it. To top it off my SCSI card had a Z80 on it.

        But one CPU is missing....

        Guess what is used as a keyboard controller on many of the Amigas? An embedded version of the 6510, running at 2MHz and with onboard RAM and ROM..

        So to sum it up, the CPUs in use: 68020, 286, Z-80 and some chip with an 6510 core. Now that's multiprocessing :-)

        • I think it most likely won't. The main problem is the first two bytes in zero page, which are connected up to those IO lines. On the C64 they are connected to memory mapping and various hardware. On the 1541 they are used by the ROM.
          • You'd have to jumper the default memory mapping by hand, and not use any programs which make use of bank-switching code. (Whoops, there goes everything interesting).

            The only concern I'd have is the VIC chip in that scenario; it might not be able to get at screen ram with the memory layout hard-coded.

            Hmm, now where is my C64 PRG with the schematics at the back...
            • The VIC chip always reads from RAM, that is the only way to read the contents of bytes $0000 and $0001. You stick a sprite in collision detection mode and read it one pixel/bit at a time.
              • That sounds right (remember, it's been fifteen years!! :-)

                Now that I think about it, it *should* work. The VIC reads/writes RAM, which IIRC is under ROM. Except for the character set, of course.

                I was thinking that jumping the address bus decoders (74138s?) into the right "shape" for the 6502 to use the default config might screw with the VICs access to chipset select lines. IIRC, the VIC puts the 6510 to "sleep", diddles the CS/A lines, and tells the 6510 to wake up when its done. There must be another bit of glue logic on the board that we could mess with (maybe adding a gate or two) that would allow the VIC chip to do what it wanted to. Hmm.

                Again, I wish I had the schematics in front of me, it's SOO hard to remember stuff that long gone by. Anybody know if they're available online anywhere?
      • by petis ( 139263 )
        I believe that in some (or most?) of the better demos produced on the C64, the coders used the floppy-drive processor to help calculate the vectors. I never coded for the C64, so I don't know for sure though.

        Anyway, the demo coders from the C64-scene are definitely impressing. Talk about using the resources you have to a maximum.
    • Actually, ethernet cards don't have a CPU by themselves. Ethernet ports are just serial ports with delusions of grandeur. However, the PDP-11 minicomputer had a serial port with an 8MHz 68000 and about 512k of RAM - considerably more than the machine itself, in most configurations. The idea was to integrate the venerable PDP's with more modern machines on networks, like the MicroVAXen, to ease the pain of transferring old data.
  • well duh! (Score:5, Funny)

    by binarybum ( 468664 ) on Monday April 15, 2002 @02:59AM (#3341855) Homepage

    C'mon now, Real Audio(TM) always sounds awful. This isn't news!
  • by supernova87a ( 532540 ) <kepler1@nOSpAm.hotmail.com> on Monday April 15, 2002 @03:00AM (#3341857)
    I think they got confused... They just plugged their headphones into the cassette tape drive, and thought they were hearing RealAudio!
  • by Peridriga ( 308995 ) on Monday April 15, 2002 @03:02AM (#3341862)

    I don't even believe a Beuowolf cluster of these could survive serving streaming media to /.
  • I knew I should have saved my C128. Dangnabit
    • Amen! I miss mine right now. Put that baby into fast mode and it would have lasted maybe a full millisecond longer than that poor c-64...

      The only other insane thing I could think of is replicating this with a vic-20...
      • I've actually got a few - in my parents house. Mostly C-128, parts/chips, service manuals, drives, cables, and I probably have about 9 fast load cartridges - and maybe still have one infinity machine (real gamers know what this is). Somewhere I've got a user port to serial port adapter - its pretty rare.

        I've actually thrown systems out - I just have too many :( - usually yank the important chips for parts though.
  • Still up! (Score:5, Interesting)

    by autopr0n ( 534291 ) on Monday April 15, 2002 @03:09AM (#3341871) Homepage Journal
    Holy shit! This thing is still standing! I was able to get through with just two tries (the first time I just got the frameset). According to the docs they had put in quite a few optimizations to their TCP/IP stack to allow for a lot of connections (they said they encoded the state data in TCP sequence field, allowing them to have unlimited connections, or something like that)

    The thing is, they haven't got the optimization on port 6510, so if you try to go to the 'tcp status page' you'll overload it.

    Building a C64 web server is impressive. Building one that can stand up to the Slashdot effect is, well, wow :P
  • Are there open source real audio servers?

  • by Alsee ( 515537 )
    We've seen C64 servers before. I want to see VIC-20.

    **** CBM BASIC V2 ****

    3583 BYTES FREE




    • Re:Bah (Score:2, Informative)

      by MagerValp ( 246718 )
      Acutally, it's not a problem, all you need is a 32K ram expansion and an RS-232 interface. The VIC-20 has got just as much CPU power as the C64, and it runs an earlier version of the same operating system, so a port is actually possible.
  • How long... (Score:3, Funny)

    by MisterBlister ( 539957 ) on Monday April 15, 2002 @03:24AM (#3341896) Homepage
    Until they get slapped with a lawsuit from Real due to using their streaming format without permission? .. Sigh!
  • The possibility of connecting the Commodore 64 to an Ethernet local area network has been a collective dream in the Commodore community for decades. A C64 Ethernet adapter would make it possible to connect the C64 directly to the Internet, making it possible to download software, transfer data to and from the C64, play network games over the Internet; the possibilities are endless.

    Meanwhile, the rest of us have been running C64 emulators on our already Internet-connected Pentiums...

    This has a very high hack value, but I really don't think that a practical application is going to be networked C64 games over the Internet. If you're going to write a networked game, you're not going to write it for the C64, I mean come on! Even if you were, an emulator would be a much cheaper and easier solution than actual hardware.

    • Re:hack value (Score:2, Insightful)

      by MagerValp ( 246718 )
      Umm, well, actually, some of us are working on networked games running on the C64... As for emulators being cheaper, I don't there's much of a difference: C64s and disk drives can be had for less than the cost of an internet connection. Hacking the old hardware is immensely more satisfying than playing around in an emulator.

      Just because newer computers are more capable doesn't mean that they are more fun. 8 bits is all you need.
  • by adadun ( 267785 ) on Monday April 15, 2002 @03:31AM (#3341906) Homepage
    As one of the guys who made this, I must say that I am amazed to see how well our C64 server is handling the Slashdot-effect. With a little more than 50 comments, I still can load parts of the first page.

    The web server that runs on port 80-84 actually implements a simple form of overload protection and during testing, we managed to serve 8000 pages over a period of 30 minutes. That makes 4 pages per second! Note that it is only the first page that is overload protected, so the other pages will still load very slow (if they will have a chance to load at all!).

    The real-time streaming audio server is running on the same machine as the web server so nobody will probably have a chance to hear the audio stream.

    Furthermore, the headline is wrong - we are not streaming RealAudio. We are streaming audio using the open RTSP/RTP formats that RealPlayer and other players can handle. The RealAudio file format is secret so we would probably have been sued if we had been streaming that.

    Finally, here [google.com] is Google's cache of our newsgroup announcement.
    • by adadun ( 267785 ) on Monday April 15, 2002 @07:14AM (#3342270) Homepage
      It has now been four and a half hours since this appeared on the front page, and our C64 server is still up and running.

      I was just able to reach the access statistics page. There has been a total of 32000 accesses (of which 8000 came before the Slashdot attack). 25% of the accesses have been for the /index.html page and only 1% have been for the RealPlayer description file /c64.ram.

      24000 hits in 4.5 hours, thats nearly 1.5 hits per second.
  • by Anonymous Coward on Monday April 15, 2002 @03:39AM (#3341919)
    Maybe Jon Katz's friend, Junis [slashdot.org] can now send us live streaming audio from Afghanistan using his Commodore! That is, if he can spare the bandwidth and disk space that he uses to download all those DivX ;-) movies.
  • ... some people have far too much free time on their hands.
  • Hey cut it out with that Slashdot-ing, poor Junis [slashdot.org] is trying to look at some movies.
  • I don`t believe this web server is really running on a C64. Its been over an hour and the server is still survivoring the slashdot effect. I think this is a prank.
  • MIRROR MIRROR (Score:3, Informative)

    by jsimon12 ( 207119 ) <tzzhc4@yahoo. c o m> on Monday April 15, 2002 @04:21AM (#3341996) Homepage
    Went ahead and mirrored the site since it is a little slow:

    http://www.xemu.org/mirrors/adam/ [xemu.org]

  • It's not how well the dog speaks, but the fact that the dog can speak at all...

  • And, quite possibly the coolest thing I've seen all year.
  • load "linux",8,1
  • by mrselfdestrukt ( 149193 ) <nollie_A7_firstcounsel_com> on Monday April 15, 2002 @05:27AM (#3342096) Homepage Journal
    Is it just me or does that little C64 perform better than a NT server running IIS?
    I'm sure it will stay up for longer as well...
    Let's count the security holes...
    This is really funny!
    Then again: The OS on my mobile phone is more reliable than NT.
    Oh, ok, we are talking about the C64 right? Wow, it's smaller than a NT server! Oops, here I go again.
  • Ingenuity (Score:2, Troll)

    by JimPooley ( 150814 )
    Every time I hear about something like this, I can't help thinking that these people are wasting their ingenuity on something completly worthless.
    If they brought that ingenuity to doing something worthwhile, who knows what they could do...
    • Re:Ingenuity (Score:4, Insightful)

      by tomlouie ( 264519 ) on Monday April 15, 2002 @07:35AM (#3342304) Homepage
      Who's to say that their ingenuity wasn't spent doing something worthwhile? They had a blast, I bet, they overcame technical problems, and they learned a lot. And, they furthered the knowledge and realm of possiblility. (Who would have thought that a C=64 could handle a /. load?!?)

      Now, if you were talking about the millions of dollars that goes into sports every year that could have been going to something worthwhile, I would agree with you.

    • by sckeener ( 137243 )
      If they brought that ingenuity to doing something worthwhile, who knows what they could do...

      exactly, so they should put in their resumes that they had their hacked c64 /.'ed to death. I'm sure someone would pick them up for their creativeness.
    • Every time I hear about something like this, I can't help thinking that these people are wasting their ingenuity on something completly worthless.
      If they brought that ingenuity to doing something worthwhile, who knows what they could do...

      And every time I read a comment like this, I can't help thinking DO YOU UNDERSTAND THE CONCEPT OF A FUCKING HOBBY?!
  • Thay've been doing this in Afghanistan [slashdot.org] for years...
  • Warez??? (Score:2, Funny)

    Couldn't they just chuck the audio-cassette and insert one with some cool new c64 gamez?
  • c64/tcp (Score:3, Interesting)

    by devonbowen ( 231626 ) on Monday April 15, 2002 @06:11AM (#3342145) Homepage
    Ah, memories. Back when C64's were actually modern, I attached a hardware UART to the bus and used it to drive a ham radio packet modem (at a whopping 1200 baud). I wrote enough of the IP layer in hand coded 6502 assembly language to get ping and basic routing working. Then I pinged our BSD 4.3 Tahoe machine at the university five miles away. This was in the mid-80s or so. Unfortunately, I never had time to continue up the TCP/IP stack. Glad to see these guys pushing the limits of that little box.

  • No, really.

    Actually, assuming it's real, it's holding up pretty well so far. The C64 was one heck of a versatile machine. A friend of mine used to use them as a controller for his house back in the '80s - he wired up an expansion bus for them, wrote his own OS, and had it interfaced to a ham radio for control functions (delivered via DTMF).

    Now that I think back on it, he probably single-handedly kept the C64 hardware market alive a few extra years. Because every three months or so, all the stresses would blow out the C64 power supply, and it was generally easier for him to just buy another one than it would have been to fix it.
  • a bit of nostalgia (Score:2, Interesting)

    by psyklopz ( 412711 )
    This reminded me of something I used to do when I owned a C64 myself.

    There used to be a program that could take an audio recording and digitize it using the cassette reader. (It was called the Digitizer?)

    And the sound really was really awful.

    I believe the program simply read the audio track as if it were data, and saved the data. Then on playback it just pumped the audio frequencies through the sound unit.

    The cassette player was only intended to be sensitive within certain high frequencies (If you've ever played a C64 data tape in a tape recorder, you know what I'm talking about), which is why actual audio didn't read very well.

    But it's a really brilliant idea for sampling sound.
    • The 1520 datasette isn't "intended to be sensitive within certain high frequencies" -- it's basically an on-off device. Is there sound? On. Is there no sound? Off.

      The reason it sounded like high-frequency shrieking is because that's how your ears perceived the rapid transition from sound-to-no-sound.

      Okay, so it sounds like we're talking about the same thing, but the subtle difference explains a lot.

      The digitizer program you're talking about was published in Compute's Gazette, I believe. Basically, it sampled the data from the tape player as the tape moved over the head. If there was sound, it jotted down a one; if there was no sound, it jotted down a zero. So, we've got a _one_bit_sample_rate_ -- nothing to do with frequency ranges at all!

      The faster you can sample (and the CPU limits that quite effectively!), the better resolution you can get, but it is still one-bit sound, so it'll still sound like crap.

      The playback program used a bug in the 6561 SID chip to replay one bit sounds quickly. Transitioning the volume from min to max or back was a fast operation (STA, XOR, STA -- 8 cycles, maybe?) and produced a side-effect "click". Not all C=64s had this side effect though, so some people couldn't play the music! Hahahaha. You poor bastards with the C64cs! :-)
  • This one is running a httpd on a C64, but is slip connected to a Linux box for its connectivity rather than having its own ethernet. http://c64.cc65.org/ [cc65.org]
  • by hyrdra ( 260687 )
    The dunkels.com web site is now unaccessible, giving 403 Forbidden errors...why?
  • Netcraft? (Score:2, Funny)

    by zeptic ( 323902 )
    I would have loved to see what Netcraft would report [netcraft.com], unfortunately it can't find the server.
  • I wonder if they overclocked it. Don't laugh, I'm completely serious. We use to do that to C64's back then. All you had to do was throw a slightly faster chystal in there and the system ran faster (although we would actually mount the old and new crystals on a toggle switch since fast-mode would break some things).

  • Check out this other C64 web server, running on the same server setup, just no streaming audio: http://c64.cc65.org/ [cc65.org]

    • Why do people think they can link to things like Commodores, their Grandmother's computer, a Yugo, Paul Reubens himself, and think the webserving capability is going to hold up to hundreds of timewasting /.ers thinking "oh, this may actually be cool", despite the fact no one really honestly cares (ok I did enough to click on all the links, they didn't work, hence my bitterness).
  • These guys should cut a deal with Unisys to host www.wehavethewayout.com.
  • by Tony.Tang ( 164961 ) <(slashdot) (at) (sleek.hn.org)> on Monday April 15, 2002 @01:35PM (#3344277) Homepage Journal
    This is a cool project. /. should add a new category called, "Because You Can." You see, there are a lot of wicked projects that we cover here, but they're not so much funny as, "This is totally sweet." (e.g. linux on ____, webserver on _____, and now of course, real-audio streaming on _____).

    Invariably when we cover these, you get a few responses like this: "Why would you ever want to do this... blah blah."

    Invariably, the response is: "Because you can."

    The next step, of course, after creating such a category, is to make sure it's mirrored well before it's posted. (*wistful look*)

    Now, I haven't checked whether this story is a hoax or not, but if it is, then it should be in the "Funny" category. Otherwise, consider this post as a call for a new category called, "Because you can!"

If I had only known, I would have been a locksmith. -- Albert Einstein