-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not ready error writing drive B - Amstrad PPC640/PPC512 #320
Comments
You expect both drives to turn their motor on at the same time as they share a motor enable signal. |
Ah, right, so the motor spinning and delay is a red herring. Excellent. The PPC640 is mentioned here in the wiki Testing some more, it seems coping files off the Gotek is OK, it's copying file to the Gotek is the issue. And even then, small files are copied OK, anything over about 6K fails with the Not Ready error. Seems like it's timing out maybe? I also have a parallel port SD adapter (that pretends to be a slow hard drive). This also has the same issues so it's not the physical floppy causing the problems, it seems like it's the Gotek. |
Large writes may be taking time to write to usb and then the host is timing out waiting for the gotek to respond again. What stick are you using? Can you try another? |
What happens if you copy a large file from the Gotek back to the Amstrad's floppy? |
The original USB stick was a 3 year old 256MB stick I got free at an event, using it on a PC works fine, as does fully formatting it, and H2Test. I get that this may be junk though. So I gathered 8 other USB sticks I have on hand, from 1GB to 16GB in capacity, and makes like Kingston/Intenso/Toshiba. Formatted them all and copied over the images. They all exhibit the same issues, though the 'best' 16GB Kingston did manage to copy one 12K file over before it errored. I wonder if this is a weird oddity that affects the Amstrad PPC's ? |
Another thing to try, then, is |
Ah! Now that seems to to have (almost) fixed the problem! I can now copy lots of files to/from the Gotek without the Not Ready error. Result! However, I've noticed that occasionally it now throws up a Sector Not Found error reading from the Gotek. Pressing R for Retry reads the sector correctly (I compare the copied file to the original). The error is completely repeatable, that file will Sector Not Found every time, with a single retry correcting the issue. Copying the same set of files off the floppy to another image on the Gotek, then copying them back to the floppy resulted in a different file have a repeatable SNF error. Now it was late, but I think cycling the power caused that initial SNF file to copy OK, but another one then had the SNF error. I'll try this again tonight and also with another of the USB sticks. |
Here's another recipe for you to try:
I'm not sure this will work but worth a try. Otherwise I could try making EDIT: To be honest I'm not sure it's index related at all. The schematic for PPC640 doesn't have anything fancy happening with the index signal. Perhaps it is to do with where track read restarts after a write is completed. We could investigate that with some test firmware builds. |
That worked too, but still have the same SNF error that worked after a retry. |
Well, I'm kind of surprised that fixed the write errors :) I will work on a test firmware for you to try, that just tweaks the index-suppression=yes, track-change=realtime behaviour. Meanwhile can you just double check no typos in your FF.CFG for the previous test: I'm that surprised it worked so well for you, I'm a little bit suspicious. EDIT: Another way to test your previous configuration, would be to modify the track-change line to |
Okay, here is a firmware to try. You should use it with the |
No typos, all cut & pasted from your messages. New firmware flashed from the .upd file (two buttons pressed at power up), it said "Upd" on the display? So my setting are currently -
But sadly it still gives Sector Not Found on copying stuff off the Gotek to the floppy drive. Another thing I tried was tried was to used DISKCOPY to create a physical boot disk (for DOS 5) from an image on the Gotek, this gave "Unrecoverable read errors" on three "tracks" in the image, which was repeatable. |
If you switch back to EDIT: Also what image type are you using? IMG files? EDIT: And yes, Upd on display means you are in update mode. Then you should automatically return to normal operation after the update is completed. |
OK, switched back to track-change=instant and the read errors and sector not found errors disappear (I can complete the diskcopy ok now!). However the "Drive Not Ready" errors when writing files TO the Gotek have reappeared. Seems the firmware change wasn't effective? :( Yes, I'm using 720K .img files (the floppy drive and controller are on Double Density) that I've found the net. The images seem OK in that I can open then up on my Linux PC, pull the files out of the them and the contents of the files seem OK. |
This is just super weird. I don't suppose you have two real drives you can test, as a control case for copying between two drives on the PPC? EDIT: Also, update to the latest v3.12a firmware for any further Gotek tests. That's the benchmark for debugging stuff, and we should drop the changes that I introduced in the ff_320_1 firmware above. |
I have another 3.5" floppy drive, but as it's a 1.44MB version I suspect it won't work with the PPC's 720K controller, but I'll give it go anyway this evening when I get home. Along with reverting to 3,12a. |
1.44M should work fine, the interface is the same, and the 1.44M switches automatically between DD and HD operation. I suppose one possoble problem is Shugart vs PC interface (affects pin 34 primarily, which I think PPC doesn't use, but also the drive might respond as S1 rather than S0 drive select: Usually that is changeable via a jumper or soldered resistor on the drive PCB). |
Urgh! What an evening. I found two 3.5" drives. The first just gives errors when the PPC boots (drive or interface error in the POST before DOS boots. The second drive, a Sony, which I found the jumper settings for, gets past the boot but the head stepper motor appears to have failed. There is a slight spin of the gear rod then it errors. If I push the drive head to the outside, then it can read the directory track but obviously goes no further and errors. I've messaged a local friend who may have another drive, but not heard back yet. |
Right then, my friend found a pair of old drives, the first of which works like charm! I can copy files to/from the drive and do DISKCOPY's just fine. I even wrote a batch file to copy a set of files from one to the other and back again, over and over, while logging the results. Hundreds of copies later, not a single error! So I guess that rules out errors with the Amstrad side of the hardware? |
Yes, clearly the Amstrad and cabling is all fine. So, I believe you have tried A: v3.12a with default config ( This above behaviour caused Not Ready errors on BBC B which uses regular index pulses to detect a disk is inserted: If you stall the disk (and hence produce no pulses) the BBC throws errors. Hence config B: So that above configuration caused Read Errors for you. It is quite an aggressive configuration setting, tailored to BBC B, hence C: Trying revert to But I'm struggling to see the pattern or what the underlying expectation is of the Amstrad. Or whether there's a bug or something in FlashFloppy non-default config. One thing we could try is just turning on the write-related index trickery. But then you have seen the write problem disappear in C above which doesn't (directly) affect write behaviour. Or we could try and knock a few edge bugs off of C, which I tried to do in the alt firmware posted earlier in this ticket, but I may have mucked up a bit. The bug in release firmware is: I may occasionally allow an index pulse when the read stream hasn't yet restarted: This is bad because the host usually times out a read after seeing two index pulses with no sector match (the idea being you've then seen at least one full revolution of the disk). It's a bit of a narrow window of a bug, and I'm not sure I would expect it to make the mess of reads that you are seeing.... |
It occurred to me that I may have been using the 2.14 version of the firmware in some of the testing above, so I've reflashed to 3.12a and run all the permutations above again, and subject to also having "nav-mode = indexed" & "interface = shugart" above them, the results are - a) "track-change=instant" and "index-suppression=yes" b) "index-suppression=no" c) "track-change=realtime" and "index-suppression=yes" *I was thinking that this may be a track change issue where the file spills over a single track? So, option (b) is almost there. Just some of the magic from (a) to cure its Diskcopy issues! :) |
Okay, I may need to unpack the hacks I did for BBC B a bit, and add some configurability there. I will think about a new test firmware for you. |
Ok here is one to try with default config, which is your (a) above: "track-change=instant" and "index-suppression=yes". It avoids stopping spinning the disk while draining a write to USB. I think it is better to try fixing writes based on the default config, than massively perturb things as in (b) and fix up the fallout that affects reads. Let's see how it goes! This may or may not be enough. |
:( Still exactly the same I'm afraid. Reads FROM the Gotek - all OK. |
Ok here's one with identical post-write behaviour to the BBC B hacks when index-suppression is disabled. Again, leave your config at the (a) defaults. If this doesn't help, we'll have to try a different tack. |
And we have a WINNER!! It could probably use some more testing, so I'll continue playing with the Gotek drive over the next week or so to give it a thorough workout. |
We're almost there, but now to see which bit of the BBC B post-write behaviour is needed. There are two parts: 1. fake index mark immediately the write ends, and 2. restart read at end of track after write is drained to USB stick. I'm guessing (2) is the bit we need. So here is another firmware to try, same (a) default config: If this works, then I will make it configurable via FF.CFG, have you test that, and then we're done (it will be in next 3.x release)! |
You're the boss. V3.12d works in all four of the test cases too! |
That's great, I will now sort out a firmware in which this behaviour is non-default but configurable. I will post it here soon. |
Here it is. You should find that, as is, your writes fail. But this should then be fixed when you add |
So just to confirm my understanding - I removed these params from FF.CFG and ran the tests again with v3.12d, all tests were successful. I updated to v3.12e (still without any extra params), the usual errors returned. I added the "write-drain=eot" param to FF.CFG and ran the tests again, all tests were successful !! Nice :) |
Excellent I will make sure this is in the next 3.x release! |
Hi,
I've got a small issue with FlashFloppy on my Amstrad PPC640 luggable.
I've installed it as Drive B: as the machine only had a single 720K DSDD floppy.
Using only jumper S1 and the current 2.14 firmware, the Gotek drive appears to work fine. I can copy disk images to the USB stick and they appear as B:. I can format them, copy/edit/delete files, the machine will even boot DOS off the Gotek. All good.
However, when I try to copy a file from A: to B: I get a
"Not ready error writing drive B"
I've tried swapping the drives to make the Gotek A: and the positions on the cable, but the result is the same. Also tried, M0 instead of S0 (general failure error). I've added "motor-delay=200" (no difference).
The only odd thing I've noticed is that the motor on the floppy drive spins up when I access files on the Gotek, which doesn't seem right.
Anyone else had this on a PPC? Any ideas on how to fix it? From the FAQ the Amstrad is supposed to be a 'standard Shugart' drive?
The text was updated successfully, but these errors were encountered: