| |
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? |
|
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
Quoting lftWe can has loadercompo?
Yassss!
Standard corpus, all segments loaded to $8000 to $ffff (writing under IO if needed), tested while displaying a FLI image (preloaded to bank 2) and calling a ten raster dummy music routine, count cycles using VICE, separate league tables depending on whether or not it fails more than one time in ten when loading from a real 1541 from a disk written with a different 1541. |
| |
mankeli
Registered: Oct 2010 Posts: 146 |
It doesn't really matter to me which one is the default, I'll probably use "robust mode" anyway and change to the "fast mode" only if absolutely necessary.
I haven't had any problems with the current mode, but I like compatibility. :)
Other feature suggestions: Support for kernel vectors (IDE64 & Vice without TDE) and API call for "seek to the beginning of file #". (disk drive could then perform the seeking while demo part is still running) |
| |
Fungus
Registered: Sep 2002 Posts: 686 |
I think groepaz has a drive with the weird CIA revision that can act up.
Maybe try a soak test for 24 hours just to be sure. |
| |
doynax Account closed
Registered: Oct 2004 Posts: 212 |
I, too, would be most interested to know how big of an issue this is in practice and the percentage of real drives affected.
In any event isn't this effectively the same timing bound on most modern IRQ loaders? That is to say the host waits 14-cycles from toggling ATN to reading the result, while the drive-side waiting loop with 13-cycles of worst-case latency. Or is more subtle than that?
I gather that it is well-known that the 1571DCR can't quite manage this in 1 MHz mode. Presumably the same applies to some other set-ups as well though.
Of course the timing on the open-drain bus isn't symmetrical so perhaps it might be sufficient to delay only the sampling after the rising ATN flanks.
There is also the additional headache of supporting multiple drives on the bus where the additional capacitance surely can't help, unless perhaps balanced out by the stronger pull-ups.
Currently I attempt to detect the reliability of the faster timing at start-up but that's mostly a workaround to a CCS64 bug and seems unlikely to prove reliable given temperature variations and whatever other surprises the real world may have to offer. |
| |
soci
Registered: Sep 2003 Posts: 480 |
These three timings are from Bitfire:
Bitfire 0.5 is just as tight as Spindle. Does it fail on Chameleon in standalone mode too? |
| |
Hoogo
Registered: Jun 2002 Posts: 105 |
I guess it will be difficult to find such a "bad" drive and someone willing to perform all those tests at the same time.
What about these ideas?
-Increase the length of the serial cable until it fails.
-Create a test program that measures the ratio of the clock speeds of C64 and drive? Not sure if there is really much variation in it. |
| |
lft
Registered: Jul 2007 Posts: 369 |
Quoting doynaxCurrently I attempt to detect the reliability of the faster timing at start-up
...
I considered that too, but I think it could lead coders astray, especially since Spindle is aimed specifically at trackmos. There is a risk that the coder is timing the demo under perfect conditions, but with a real drive the loader suddenly decides to degrade and run at a lower speed throughout the entire demo because of a single bit error at the wrong moment.
I think it's a better idea to use fixed timing, and give the coder some influence over the risk/speed tradeoff. |
| |
doynax Account closed
Registered: Oct 2004 Posts: 212 |
Quoting HoogoI guess it will be difficult to find such a "bad" drive and someone willing to perform all those tests at the same time. That may admittedly be asking a bit much but hooking up a logic analyzer+oscilloscope to the C64 CIA and 1541 VIA along side the IEC bus on _one_ system while loading down the signal with a decade capacitor/inductor, and playing with a hot air gun/freezer spray and the like to determine the margins ought to be doable. Not that I'm volunteering mind you ;)
Quoting lftI considered that too, but I think it could lead coders astray, especially since Spindle is aimed specifically at trackmos. Plus probably get lynched for wasting all of those precious bytes in the resident code.. |
| |
Fungus
Registered: Sep 2002 Posts: 686 |
When we had this issue with n0sd0s it seemed to be limited to 1571 drives, just to note. |
| |
Bitbreaker
Registered: Oct 2002 Posts: 508 |
Quoting sociThese three timings are from Bitfire:
Bitfire 0.5 is just as tight as Spindle. Does it fail on Chameleon in standalone mode too?
Thanks for the test and numbers! So far i have not noticed any drive having problems in the transfer, but due to too strict timing when reading a sector or sector header. This is finally fixed in the next version, even THCM's floppy that is known to be very very picky managed to do a 24h test without any error. I suspect, that this drive is changing clock speed when getting warm in a noticeable way, while rotation speed stays stable. With the three floppys i have at home i never experienced any problems, no matter what i did, so it is about finding those not so in spec drives.
As for chamaeleon i don't know, Groepaz did not rant so far, so guess it is fine :-D |
... 19 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 | 3 - Next |