| |
lft
Registered: Jul 2007 Posts: 369 |
Fastloaders & serial transfer timing
This is a continuation of an off-topic discussion in X2016 Competitions: Your Input Wanted!.
There was some concern about serial transfer routines that might fail due to small margins.
I tried adding one safety cycle per bit pair in the transfer routine of Spindle. This caused an average slowdown of 1.5% for my benchmark scenario.
Crosses are bitfire 0.3, just to get some perspective.
Hollow circles are the latest unreleased Spindle with the original (fast) transfer routine.
Green circles are the latest unreleased Spindle with the new (possibly more robust) transfer routine.
I'm thinking that perhaps the robust version should be default, and the fast version available as an option. But on the other hand, nobody has reported any actual issues with the fast code on real drives, so this decision would be based on fear, more or less. Spindle users, what do you say? |
|
... 20 posts hidden. Click here to view all posts.... |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1408 |
Intriguing. Are you able to obtain the 320 byte raw datastream from such an event? |
| |
Bitbreaker
Registered: Oct 2002 Posts: 504 |
I'm afraid, not yet, but it seems like the gcr decode/read misses some bytes or at least reads some with wrong value. Added the possibility to receive the checksum at least, c64 currently running and i am waiting for another fail :-) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11359 |
Quote:But i have no yet checked, thought of what the floppy is reading if there's no change in polarization, maybe 00000 all over?
it will randomly insert ones every 3 or 4 bits or so (the so called "weakbit" case) |
| |
Bitbreaker
Registered: Oct 2002 Posts: 504 |
Okay. seems like also spindle is stumbling over that problem. Krill seems to be safe. My fair guess, it is due to the extra revolution for scanning that it does, and that there, the checksum is going over 4 bytes only, thus less error prone. After that process the drive is at a good speed most likely. Working on a solution for that, that is a bit more intelligent than just dumb waiting :-) Tests currently running... |
| |
lft
Registered: Jul 2007 Posts: 369 |
Thanks for finding and reporting this! I'll fix it, but I'll try to come up with a better way than waiting for half a second on every track change. There may be just 34 of them, but that's still a whopping 17 seconds. |
| |
Fungus
Registered: Sep 2002 Posts: 680 |
Someone with an old white or longboard 1541 with an older alps mechanism that only goes to track 38 should test stepping, if it's done too fast on the older drives it will lock up without fail.
I'd be interested in a table of safe stepping delays for these old ones myself. |
| |
lft
Registered: Jul 2007 Posts: 369 |
I think those are separate issues. Minimum stepping delay is to prevent the stepper from missing a signal, and stopping half a track too early. This is about stopping at the right location, but then wobbling around due to inertia and reading parts of the sector from outside the track. Both are important to get right. |
| |
Kabuto Account closed
Registered: Sep 2004 Posts: 58 |
Randomly occurring read errors should come in 2 different flavours: those that desynchronise (i.e. the drive reading more/less bits than were written) and those that don't (and just report one or more adjacent/nearby bits incorrectly).
If there's just a single non-desyncing read error then the XOR checksum used is almost guaranteed to catch it, but anything that desynchronises has odds of 1/256 to incorrectly report the sector as valid. OTOH, rejecting invalid GCR codes (anything not in the table of commodore's 16 codes) will catch many of these errors, but I doubt that timing of fast loaders permits for that.
(And I'm wondering how many of each occur in practice.) |
| |
Bitbreaker
Registered: Oct 2002 Posts: 504 |
Okay, i let my test scrub for 474 times over night and it didn't have a single corrupt file after loading (i checksum stuff on c64 side again) It seem like it is enough to successfully read 2 arbitrary sectors while spinning up. One was still too less and caused sporadic errors after like 100 full disk reads. So no plain waiting needed as it seems :-)
One could of course take care for illegal gcr-codes upon checksumming, at least in my case, but that would give a heavy speed penalty. However, illegal gcr codes also lead to further problems when sending, as we would then also lookup illegal values during the gcr2ser lookup, what could lead to a ATN hi for both bit pairs and corrupt data further.
As for spindle it is a bit difficult to build a checksum over whole files, as the depacker would possibly choke on broken blocks. But one could compare the packed results when checksumming over a depack buffer.
Else things are really getting rock solid, due to endless checking (stopping upon errors does not make sense on a loader for demos) it survives removing of the disk and reinserting or also slowing it down by squeezing the disk by hand to slow it down, or pushing it around in the drive while reading where it would skew to other tracks. This makes turn disk so easy, by just letting it read the new dir sector with a magic number until there's success. |
Previous - 1 | 2 | 3 - Next |