Slashdot Mirror


1200-Baud Archeology

jamie found this singularly geeky article on reconstructing Apple I BASIC from a cassette tape. It claims to offer the first confirmed perfect dump (BIN) of the 4096 bytes of this venerable interpreter. Terrific fun for the whole family. "The Apple I is extremely rare. Only 200 were built, and less than 100 are believed to be in existence. Neither Steve nor Woz own an Apple I any more, and neither does Apple Inc. The cassettes are even rarer, as not every Apple I came with one... So here is how to decode the signal. Let us first open the audio file in Audacity and look at the waveform... It is now time to write a small program to measure and dump the width of the pulses."

11 of 211 comments (clear)

  1. Alternative tools by stryyker · · Score: 5, Interesting

    Probably would have been useful for the person to look at how C64 emulators and people handle transfer C64 tapes to PC.

    1. Re:Alternative tools by Alioth · · Score: 5, Interesting

      Yes - I thought this too - the article's slashdotted at the moment but the summary makes me think he made a mountain from a molehill. In the Sinclair Spectrum world, loading Speccy tapes on to a PC, and encoding them in a useful format (TZX) has been a solved problem for years.

      All these tape formats were physically pretty similar when it comes to how they were encoded, and the same techniques could have been used by looking at any home computer emulator that loaded stuff from tape even if the details were different.

    2. Re:Alternative tools by daBass · · Score: 5, Interesting

      There used to be a Dutch radio program in the 80s called "NOS Hobbyscoop" that had their own basic interpreter for many computers of the day. (MSX, Acorn, Sharp MZ, etc.)

      They actually broadcast computer programs every week on medium wave AM. They'd count down, you start the cassette recorder and you had some new programs.

      Fun for the whole family, even if a bit painful on the ears!

    3. Re:Alternative tools by linhux · · Score: 5, Insightful

      When I was a teenager, I used to decode FAT tables and directory structures by hand, using pen and paper and printouts from a raw hex dump of a hard disk. I didn't do this because there was a problem needed to be solved; I knew what was on the disk and there sure were plenty of tools to read the data (like MS-DOS). But it was a fun challenge and I learned how FAT worked.

      I can see how this is a similar challenge. It's nothing more than a geeky sudoku.

  2. Re:Doing it the hard way by Hal_Porter · · Score: 5, Interesting

    Yes. But a few people did some very magical things with tapes before the became obsolete. I saw a demo of a turbo tape system on an Atari 800XL which could load games "faster than a disk drive". Actually it about tied, but that was still impressive. The disk drive could probably managed 9600 baud sustained.

    The modulator / demodulator was lump of potted electronics I could easily fit in my hand. Potting compound was a blank gunk you applied to electronics you didn't want people to tamper with, in this case to stop people seeing the components used. But whatever they were they could modulate and demodulate data at around 9600 baud. This was in the 80's back before DSPs too, so whatever circuit was used must have been made of Op Amps, transistors and passive components.

    I never worked out how it worked. Though I can imagine exploiting the stereo nature of the tapes to send one carrier and phase shifted signal might work. Phase modulation is easy and demodulation is too if you have the carrier. Still phase modulation at 9kbaud+ would be a tight fit on an audio tape. I don't think things like QAM would be possible given the size of the package, the selling price (about twenty English pounds, or $40), and the primitive nature of 80's technology.

    --
    echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
  3. Electron ROM Ripping, ol' school by ga5p0d3 · · Score: 5, Interesting

    Reminds me of my housemate and I at university ('92-'95) using the tape control relay on an Acorn Electron wired to a PC serial port to rip the ROM so we could start writing an emulator. A small BASIC program PWM encoded the whole ROM in about an hour IIRC. Was a great start to the project, we got as far as CPU emulator, multi-window debugger, VGA display driver, and had it running basic no problems. He got it reading WAV's of games recorded from tape too. Got as far as the in-game screen of Chuckie Egg before we ran out of knowledge and became stuck trying to fathom the hardware keyboard input. (for the BASIC interpreter we just injected characters into the key buffer). Ahh, happy days. :o)

  4. Uhh... by consonant · · Score: 5, Funny

    Terrific fun for the whole family.

    That must be one weird family...

  5. Re:Teach it! by QuantumG · · Score: 5, Insightful

    If Apple tried to sue, Woz would likely pay for your defense.

    --
    How we know is more important than what we know.
  6. Re:Doing it the hard way by Hal_Porter · · Score: 5, Interesting

    The computer I designed and built around 1981 did 9600 bps with some TTL logic i designed myself. The format used was Manchester II, very simple to encode and decode if the clock can be recovered (the difficult part) for the decode phase. I think I used less PCB space than what was needed for the common 300 bps Kansas City format.

    When the Atari sent data to the tape it had an internal modulator. But IIRC the demodulator was in the tape deck. And in any case you could output data to the disk drive, when it was a selectable baud 0-19200 rate and not modulated. So it seems like the turbo tape interface could use custom software to get 9600 baud TTL data to or from the tape and do its 9600 modem baud magic internally with a handful of components.

    Tapes are stereo, so you could send the clock one one channel and the phase shifted clock (the signal) on the other.

    You need an oscillator and a phase shifter made out of an XOR gate to modulate. Shifted single goes on one channel say left, unshifted one on the other, say right

    To demodulate you use a phase detector made out of an XOR gate to compare the phase of the two channels.

    This would be analogous to Manchester BPSK coding, except that you use one of the two audio channels to store the carrier so you don't need to spend expensive electronics regenerating it.

    So something like this seems plausible. Unfortunately I didn't know enough about electronics back in the Atari days to try it.

    --
    echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
  7. There is a MUCH Easier Way... by macs4all · · Score: 5, Informative

    I own an Apple 1. ...And a copy of Apple 1 BASIC on cassette, and Woz's Mini-Assembler that is "origin-ed" for the Apple 1. (This is the same Mini-Assembler that was in the Apple ][ ROMs, at $F666). And a few other Apple 1 goodies.

    Do you realize that the cassette interface for the Apple 1 and the Apple ][ are identical?

    Yep, you can read an Apple 1 audio cassette with any old, easy-to-find Apple ][. And from there, you can use any one of a million methods to get the data out of memory and onto another medium.

    Also, you can simply use the Apple ][ to create a NEW cassette for your Apple 1 (if you happen to be lucky enough to have one).

    BTW, I think mine is "serial number" 0064. At least that's what I think the "0064 that is written in Sharpie on the PC board means...

  8. Re:Teach it! by Anonymous Coward · · Score: 5, Interesting

    Of course I would! But this gets sticky. I gave away the Apple I schematics and monitor ROM (256 bytes to replace a front panel with a keyboard) but only a couple of copies of the BASIC, which I also intended to be in the open domain. I don't know if I ever gave away the completed Apple I BASIC because by then it was virtually the same for the Apple ][ (now completed) as well. We took the steps to retain the copyright for BASIC on the Apple ][. Any steps we took for the Apple I would be in the gray. I can't believe that it matters to Apple at all anyway.