Monday, January 24, 2011

Tape mastering.

I'm currently coding a C64 tape mastering tool that runs on PC. Pretty sure there isn't currently any such thing as they all run natively on the C64 which seems kind of counter productive if you've got a full cross development thing going on.

Some folk think I'm crazy for doing this and whyyyyyyyyyy would you want to load games from tapes (or emulated tap files)?!? Well, it's all part of the nostalgia to me and seeing my games loading the way they would've back in the 80s (I actually wrote a tape turbo for ESP in 87 or so, think it was used on Lunari???) just seems right :)

Anyway, it creates tap files atm but will do WAV too for real mastering. The Kernal save routine is done which has been the hardest part to suss, then after reverse engineering some tap files to work out just wtf the Kernal was saving and finally getting a tap converted to a hex dump of bytes that were being saved I found a site that explained it all...... grr! waste of an afternoon!

So now it'll save a file you give it in Kernal "SLOW" mode then switches to my chosen pulse speeds for the turbo bit. The loader is relatively easy. I say that, it's not coded yet, but the accuracy of creating pulses in a tap rather than via the C64 means the loader doesn't have to worry too much, just trigger an interrupt when it gets a pulse, set a timer going and if the next interrupt from the pulse triggers before the timer runs out it's a 0, if not it's a 1....

There will be flags and things for turning bitmaps on and off, playing music, etc etc all the stuff you'd expect from a loader plus the possibility to have it run game code or something (like Invadeaload or whatever it was called).

"Interrupts" for the main loop, I've seen some people make the terrible mistake of waiting on $D012 (the raster counter) and it sometimes missing the check.. Easiest thing to do is turn off raster interrupts but still set $D012 to where you want to trigger then just check $D019 to see if the interrupt "would" have happened. It'll stay pending till you clear it so no chance of missing it :)

When it's done and I've made a tap of Taipan I'll post a vid :)


Pete

2 comments:

  1. Can't wait for a game loader. Paper, stone and sissors would be cool!

    ReplyDelete
  2. haha good idea :P You draw gfx??

    ReplyDelete