SJLOAD-20 source code anybody?

Basic and Machine Language

Moderator: Moderators

User avatar
pixel
Vic 20 Scientist
Posts: 1330
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

SJLOAD-20 source code anybody?

Post 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.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: SJLOAD-20 source code anybody?

Post by groepaz »

why not just disassemble it? its just a few blocks of code afterall :)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
tokra
Vic 20 Scientist
Posts: 1120
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: SJLOAD-20 source code anybody?

Post 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.
Attachments
SJLoad07.zip
(8.92 KiB) Downloaded 85 times
User avatar
pixel
Vic 20 Scientist
Posts: 1330
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: SJLOAD-20 source code anybody?

Post 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…
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Scientist
Posts: 1330
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: SJLOAD-20 source code anybody?

Post by pixel »

It ain't interrupt driven after all. Sorted out as far as I'm concerned.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: SJLOAD-20 source code anybody?

Post 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 :)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
pixel
Vic 20 Scientist
Posts: 1330
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: SJLOAD-20 source code anybody?

Post 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.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: SJLOAD-20 source code anybody?

Post 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)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: SJLOAD-20 source code anybody?

Post 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.
User avatar
pixel
Vic 20 Scientist
Posts: 1330
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: SJLOAD-20 source code anybody?

Post 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.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Scientist
Posts: 1330
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: SJLOAD-20 source code anybody?

Post by pixel »

Ermh… how do the C64 folks pull out 8kb/s exactly?
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: SJLOAD-20 source code anybody?

Post 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).
User avatar
pixel
Vic 20 Scientist
Posts: 1330
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: SJLOAD-20 source code anybody?

Post 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.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
tlr
Vic 20 Nerd
Posts: 567
Joined: Mon Oct 04, 2004 10:53 am

Re: SJLOAD-20 source code anybody?

Post 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.
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: SJLOAD-20 source code anybody?

Post by Mike »

What's wrong with using a tool like TAPWAV and then mastering the tapes with PC/soundcard/tapedeck?
Post Reply