6 ms·
A Minimal C64 Datasette Program Loader
- diydsp 8y agoI once put an audio cassette of The Cure into my Datasette. Then, I made a short assembly routine to copy that datasette output while playing to the SID. (I think I used the volume register?). it made a very badly sampled sounding version :) was fun :)
- kidsnow 8y agoI had a Datasette. It was expensive at the time, and it was amazing that it worked at all. You could put one of the C64 tapes into your boom box and play them, and hear a series of unpleasant screeches and whoops.
- weinzierl 8y ago>I had a Datasette. It was expensive at the time, and it was amazing that it worked at all. It was expensive in the beginning, but later on it was cheap, at least in comparison to the 1541 floppy disk drive which was in the same price region as the C64 itself. If you look at the hardware this is not surprising. The Datasette was basically a slightly modified cassette player. The Atari "Datasette" (410 Program Recorder) even looked like the typical portable cassette player of the time and could be used like one. It could play audio cassettes through an internal speaker. The 1541 and the 1541 II on the other hand were little 8-bit computers in their own right. They contained a 6502 (almost the same CPU as the C64) and there was software to use the floppy CPU as a co-processor. >You could put one of the C64 tapes into your boom box and play them, and hear a series of unpleasant screeches and whoops. You could not only play them, you could conveniently copy them with your boom box. This was the way software was pirated back then. A dual deck boom box with high speed dubbing - much faster than copying with the computer. In the Netherlands there were also experiments where software was sent on FM radio. You recorded it on a audio cassette which you could then use in your Datasette. While most people used regular 60 minutes audio cassettes for software there existed special 7 minute cassettes for some time. This saved you from a lot of winding and rewinding when you missed the program start. Good times, good times...
- GlenTheMachine 8y agoI’m curious, who wrote software to use the 1541 cpu as a coprocessor? I did, as a science fair project, but I wasn’t aware of anyone else doing it.
- tdeck 8y agoIn case anyone is curious about those radio experiments, OP is talking about Basicode: https://en.wikipedia.org/wiki/BASICODE?wprov=sfla1 https://en.wikipedia.org/wiki/BASICODE?wprov=sfla1 They also invented a kind of internal DSL within BASIC to get around inconsistencies in various BASIC dialects used by different platforms at the time.
- PhasmaFelis 8y agoThat is amazing. Different manufacturers' dialects of basic were barely the same language. I think the only things generally held in common were basic logic and control flow, very basic string manipulation, printing characters line-by-line, and prompting the user to enter a string. It sounds like these guys essentially created a shared function library (libraries and functions were completely alien to BASIC!) and successful ported that library to a couple of dozen different computers, some of them with only 16KB of RAM. (Technically functions were supported in some dialects at least, but they had to fit on one line and could only do mathematical operations, so they would be useless here.)
- feikal 8y agoi was never able to copy a C64 tape with a double-deck music player. i even tried on my friends dads highend philips dual deck but the copied tapes never worked on the c64.
- Luc 8y agoI wonder how the Kernal writers decided on the two-pulse-per-bit scheme. They must have been targetting some awful hardware (or low quality tape media, I suppose) The fastloaders that came after all worked fine using one pulse per bit.
- raphlinus 8y agoAnd modern alternatives (for example c2t, which is for Apple II) can achieve even much higher data rates. I prototyped an encoding that packs 4 bits per pulse, achieving 23kbps but not reliably. One difference, though, is that this is designed for output from a modern digital sound interface, not designed to withstand degradation from analog tape recorders. https://groups.google.com/forum/#!topic/comp.sys.apple2/qXZyIZ9hO3s https://groups.google.com/forum/#!topic/comp.sys.apple2/qXZy...
- jcmeyrignac 8y agoI read the source code, and here are 2 improvements: 1) in get_block, we can replace "dec count" with "cpy count" It should save one or 2 cycles, if I'm not mistaken 2) get_countdown can be rewritten as follows: ldy #$89 c4: cpy #$89 bne c1 c0: jsr get_byte c1: ldy #$89 bne c2 cx: jsr get_byte c2: sty tmp_cntdwn cmp tmp_cntdwn bne c4 dey cpy #$80 bne cx rts which saves probably 4 bytes
- Luc 8y ago> 1) in get_block, we can replace "dec count" with "cpy count" It should save one or 2 cycles, if I'm not mistaken It would, but wouldn't it also set the carry flag? Thus the routine would always return with carry flag set.
- tom_ 8y agoIt would, but the routine already modifies the carry flag, so no problem.
- jcmeyrignac 8y agoYou are completely right, I missed this carry. Thanks !
- Razengan 8y agoThis is why I love and cherish HN. :)
- melling 8y ago“The Commodore Datasette recording format is heavily optimized for data safety and can compensate for many typical issues of cassette tape, ” I used the tape for a few days when I got my C64. It didn’t take more than a week before I realized that it was too slow and unreliable and talked my mom into getting the 1540 drive.
- Luc 8y agoThis is really funny because that drive was so incredibly slow, and especially the 1540 was unreliable. A tape with fastloader would approximate the speed of the stock drive... Still, I did the same thing!
- radicalbyte 8y agoWell we eventually got the fast-loading cartridges which turned the 1541 into a speed beast.
- weinzierl 8y agoFloppy disks where also much more convenient to handle. If you had more than one program on your cassette you had to wind the cassette to the right spot manually. This was not to unusual, a typical 60 minutes cassette could hold about 100 KiB per side, enough room for two or three simple games.
- melling 8y agoThere were fastloaders for the 1540 too that boosted them 5-20x. https://www.c64-wiki.com/wiki/Fast_loader https://www.c64-wiki.com/wiki/Fast_loader
- kleiba 8y agoFun fact: one of the popular fast loaders for the 1541, called "Hypra Load", was co-written by an 18-year old guy who later became one of Germany's game magazine pioneers, was the translator of LucasArt's adventure games to German, only to shift jobs once again in the 1990's when he became the product manager responsible the full Xbox product catalog at Microsoft.
- myrandomcomment 8y agoThe Commodore Datasette was much more reliable than any of the other systems out there. The one on the Spectrum, Apple and Atari (all std. decks) pretty much gave you load issue 20% of the time. You had to mess with the volume level, etc. My Commodore one just worked.
- walshemj 8y agoMost cheap cassette recorders didn't have a gain control back then. I found my Atom (precursor to BBC B) worked well when I got a more expensive deck about £50-60 back in 1980.
- myrandomcomment 8y agoSo a great video on some of the HW emulation projects around this (datasette for 80s 8-bits) from the Nostalgia Nerd. https://youtu.be/DoMxl_RqQlQ https://youtu.be/DoMxl_RqQlQ Pretty cool stuff.