Retrochallenge WW Wrapup

Well, the project is done, I’ve put down my soldering iron, I’ve stopped writing code, and I’m in the middle of editing a demo video (to be posted later, when I’m a little less tired).

I’m mostly happy with how things turned out this time around. I was successful with my project, I’ve met my goal of having usable tape storage. I should probably put the word usable in quotes, though, like this: “usable”. Because, to be honest, it is somewhat flakey. I have about a 70% success rate with saving programs that can be read back later. I think my main problem is just how much noise my circuit injects into the signal. I really did not use best engineering practices: I have no ground plane, my cables are unshielded, my leads are too long, I’m just begging for noise. So, really, I’d say 70% success is not so bad, all things considered.

I learned a lot, especially about how the Apple II did things. I pored through Woz’s code and really tried to understand what it was doing. I enjoyed the process.

But I confess I don’t know how much I’m actually going to use what I’ve built. The unreliability is a problem (as it was for the Apple I, incidentally. At least I’m not alone!). I think my next project will involve writing 6502 SPI code so I can use an SD card for mass storage. It should be perfectly reliable, and provide essentially limitless storage.

Anyway, for those interested, here’s the code I came up with. I include this into EhBASIC and point the SAVE and LOAD vectors at TSAVE and TLOAD, respectively. My code is not exactly elegant and I’m sure a seasoned 6502 veteran will sniff at it, but it gets the job done.

3 thoughts on “Retrochallenge WW Wrapup”

  1. An excellent explaination of how to do cassette tape loading and saving, of which I some of the ideas I will use for my own single board computer.
    You can use timer one to toggle pb7 every time it counts down to zero in free running mode, so by loading a particular value into the timer one latch, you can generate the tones without the effort of bit-banging. This can be done in combination with timer two to generate exact number of cycles for each mark and space tone (two cycles at 1 kHz, four cycles at 2 kHz). All the CPU has to do is examine the fifth bit of the 6522’s interrupt flag register to see if timer two has counted down to zero. Then you can write the next bit to tape.
    pb6 can be used with timer two to count pulses so frequencies can be measured. I am working on this part for loading data back to memory.
    I’m no master at 6502 assembly either, so there is probably an even better way of doing things.

Comments are closed.