Page 1 of 2
SJLOAD-20 source code anybody?
Posted: Fri Nov 20, 2015 7:30 am
by pixel
Had a sleepless night trying to figure out how to implement a (open source) tape mastering program which converts TAP files to datassette on the real thing. If somebody has the source of SJLOAD-20 I'd try to make it non–interrupt driven. Want to coerce it into transmitting more than 4kB/s.
Re: SJLOAD-20 source code anybody?
Posted: Fri Nov 20, 2015 7:45 am
by groepaz
why not just disassemble it? its just a few blocks of code afterall

Re: SJLOAD-20 source code anybody?
Posted: Fri Nov 20, 2015 7:50 am
by tokra
Or go here:
http://sleepingelephant.com/ipw-web/bul ... php?t=4309
Source code is included.
EDIT: Oops, link is dead, found the file on Forum64.de and attached it to this post.
Re: SJLOAD-20 source code anybody?
Posted: Fri Nov 20, 2015 7:56 am
by pixel
groepaz wrote:why not just disassemble it? its just a few blocks of code afterall

You're scary.
Ah! Mike mirrored it here
https://onedrive.live.com/?cid=05EF0A8E ... ion=locate. Was too sleepy…
Re: SJLOAD-20 source code anybody?
Posted: Fri Nov 20, 2015 8:24 am
by pixel
It ain't interrupt driven after all. Sorted out as far as I'm concerned.
Re: SJLOAD-20 source code anybody?
Posted: Fri Nov 20, 2015 11:55 am
by groepaz
You're scary
uhm, why? its what i normally do for anything i do patches for.... i have also completely disassembled eg a bunch of games i made trainers for, or the vic20 games i PAL fixed (posted into another thread here...) for that matter

Re: SJLOAD-20 source code anybody?
Posted: Fri Nov 20, 2015 12:49 pm
by pixel
groepaz wrote:You're scary
uhm, why? its what i normally do for anything i do patches for.... i have also completely disassembled eg a bunch of games i made trainers for, or the vic20 games i PAL fixed (posted into another thread here...) for that matter

Thing is that I'm "new" to the VIC. Only 22 months passed since I finally got my ass up and do something on a 6502 platform. And there's enough on my plate already: the Pulse tape release (will be done with a regular tape recorder instead) as well as Arukanoido. VIA programming tortured me too much already – nobody seems to understand how the tape audio player works, including myself. Equivalent to when I pull out a £20 note: everybody is surprised including me. I would just waste too much time. Could code a fancy disassembler though.
Re: SJLOAD-20 source code anybody?
Posted: Fri Nov 20, 2015 12:54 pm
by groepaz

yeah time is always a problem.... other than that - disassembling other peoples code is an excellent exercise

(i'm pretty new to vic20 myself, btw - those PAL fixes were the first non trivial things i did on it)
Re: SJLOAD-20 source code anybody?
Posted: Fri Nov 20, 2015 12:57 pm
by Mike
pixel,
aren't you barking up the wrong tree anyhow? SJLOAD is a soft-loaded implementation of JiffyDOS, suitable only for use with JiffyDOS-enabled drives (including SD2IEC). It has nothing to do with tapes.
Neither (as you've already found out) does it require interrupts for its operation. Quite the contrary: the transfer code is synchronised only every byte, and every interrupt (most evidently, a NMI) occuring during the transfer of a byte acts like a wrench thrown into a gear.
Re: SJLOAD-20 source code anybody?
Posted: Fri Nov 20, 2015 1:53 pm
by pixel
Mike wrote:aren't you barking up the wrong tree anyhow? SJLOAD is a soft-loaded implementation of JiffyDOS, suitable only for use with JiffyDOS-enabled drives (including SD2IEC). It has nothing to do with tapes.
Neither (as you've already found out) does it require interrupts for its operation. Quite the contrary: the transfer code is synchronised only every byte, and every interrupt (most evidently, a NMI) occuring during the transfer of a byte acts like a wrench thrown into a gear.
Well, I was actually thinking about reading them TAP files from an SD2IEC. Sorry, that it slipped through. When I read about people trying to read ~4kb/s from it I had the impression it was interrupt–driven. Seeing just the SEIs in the source code brought me to the same conclusion as yours. I rest my case, dug and run.
Re: SJLOAD-20 source code anybody?
Posted: Fri Nov 20, 2015 1:54 pm
by pixel
Ermh… how do the C64 folks pull out 8kb/s exactly?
Re: SJLOAD-20 source code anybody?
Posted: Fri Nov 20, 2015 2:18 pm
by Mike
With JiffyDOS? Under which circumstances?
Of course there exist other fast loaders with their own protocols. Some of them share the GCR decoding between drive and computer, others read in the sectors which appear regardless of position in file, and 'puzzle' together the file in RAM.
Ideally, an entire track could be read in one or two revolutions. On the lower numbered tracks of a 1541, there are 21 sectors with 254 bytes of payload each, i.e. 5334 bytes/track. The floppy spins at 300 rpm. Transfer rates exceeding 12 KB/s, and up to 25 KB/s are thus possible.
See
Spindle 2.1, and the demo '
Shards of Fancy', which utilises an earlier version of this track loader.
P.S. compared to the original drives, a SD2IEC also has the advantage of no moving parts - so there are no seek times on track changes, and you don't waste half a revolution on average until the next sector of the file comes under the head (for a newly changed-to track with a non-track-loader, that is).
Re: SJLOAD-20 source code anybody?
Posted: Sat Nov 21, 2015 11:43 am
by pixel
[quote="Mike"]With JiffyDOS? Under which circumstances?[/url]
Yes. That's the very question.

Due to the slow mechanics of disk drives I assumed that it's not a very good idea to try to drag the TAP data off them.
Re: SJLOAD-20 source code anybody?
Posted: Sat Nov 21, 2015 2:30 pm
by tlr
Also tape writing and disk reading are very timing sensitive operations. It's tricky to do both asynchronously at the same time. Especially if we are talking fast disk reading.
How much memory do you have for this?
There's this:
tapmaster 0.4 which could be adapted to the vic-20 I guess.
Re: SJLOAD-20 source code anybody?
Posted: Sun Nov 22, 2015 5:16 am
by Mike
What's wrong with using a tool like TAPWAV and then mastering the tapes with PC/soundcard/tapedeck?