05 June 2011, 00:59 | #21 |
Global Moderator
Join Date: Jan 2004
Location: Oxford
Posts: 14,655
|
Using the onboard IDE?
|
05 June 2011, 01:00 | #22 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,479
|
Yes.
|
05 June 2011, 01:05 | #23 |
Global Moderator
Join Date: Jan 2004
Location: Oxford
Posts: 14,655
|
Well maybe rkauer is right that it is not a sector count problem.
I cannot imagine his description of what could be going wrong is the truth though. Pretty sure IDE is 100% flow controlled. CF cards even without a buffer are many, many times faster than the old 2.5" PATA hard drives of the time. |
05 June 2011, 14:17 | #24 |
-
Join Date: Jul 2003
Location: Helsinki / Finland
Age: 44
Posts: 9,964
|
I can verify that 1fe00 is needed with many real hard disks too.
|
05 June 2011, 14:56 | #25 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,611
|
I may have (finally) found the problem..
When AOS IDE driver gets transfer that is longer than 256 bytes, it splits it in two or more pieces (because max ATA transfer is 256 blocks). After first piece has finished, it reads IDE CHS/LBA registers, adds one to address and then writes it back as start address of second piece. (ATA spec says they contain last read/written address) So far so good but: ATA-1 spec says: At command completion, the Command Block Registers contain the cylinder, head, and sector number of the last sector read. ATA-2 spec says: This register shall be updated to reflect the media address of the error when a media access command is unsuccessfully completed. NOTE 9 - Prior to the development of this standard, this register was updated at the end of every media access command to reflect the current media address In other words ATA-2 or newer device does not need to update CHS/LBA address after command finishes normally, only in error situations. This will break AOS ATA driver logic, start address of second piece becomes invalid (I assume drive keeps old values unmodified, second piece of data overwrites beginning of first piece which also explains why filesystem structure corruption has never been reported, only data corruption) NOTE: This theory is not tested! (EDIT: it is now) Last edited by Toni Wilen; 14 August 2011 at 11:15. |
05 June 2011, 14:56 | #26 |
Global Moderator
Join Date: Jan 2004
Location: Oxford
Posts: 14,655
|
I tried it today with every 2.5" PATA drive I have and if I set the MAX TRANSFER above 0x1FE00 I get data corruption on a READ on all of them.
The file has to be larger than 255 sectors obviously! |
05 June 2011, 15:34 | #27 |
Registered User
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,773
|
|
05 June 2011, 17:15 | #28 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,479
|
I've used PC drives in the 90s on my A1200 and now since 2007 with the standard MaxTransfer settings. No problems at all. To be honest: never heard/read of this 1fe00 setting before the IDE-CF HD solution became popular, and there it's obviously needed. X-file?
|
05 June 2011, 17:16 | #29 |
Global Moderator
Join Date: Jan 2004
Location: Oxford
Posts: 14,655
|
All my hard drives are very modern PC laptop hard drives. Dunno if that makes any difference?
|
05 June 2011, 17:25 | #30 |
Settler
Join Date: Feb 2007
Location: Serf City
Posts: 1,760
|
I bumped this thread becuase when i installed classic wb on my 10.1gb 2.5 IDE hard drive(over 10 yeas old), some programs didnt open and some games came back with illegal expression errors. I reinstaled everything again after setting the drive to 0x1fe00 and it works fine.
|
05 June 2011, 17:32 | #31 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,479
|
I've never used 2.5 HDs, only 3.5. Could this really make a difference?
|
05 June 2011, 19:20 | #32 |
Global Moderator
Join Date: Jan 2004
Location: Oxford
Posts: 14,655
|
Not if it is malformed ATA commands as I suggested.
If I could be arsed I could easily prove it with our ATA analyser at work. I wonder if IDE emulation on WinUAE is closely tied closely enough to the hardware to show this problem? I know if you use the high-level UAE hard disk driver then it does not show up. (You can prep disks in WinUAE using the high level driver with MAX TRANSFER above 0x1FE00 which work fine in WinUAE but fail on Amiga) |
06 June 2011, 07:10 | #33 |
I hate potatos and shirts
|
@Alexh: I don't doubt your research, I just see the problem occurring mostly on CF & micro Drives (which doesn't have a cache memory between the inner "disk" controller and the outside IDE bus).
SCSI drives is another can of worms and they have their own behaviour. The problem is related to the Amiga IDE and the way it talks to the devices hooked in. But I never had a validation problem before the CF era. Now I had so much of those errors that I simply not use CF for anything but file transfers. |
09 June 2011, 15:51 | #34 |
Posts: n/a
|
I don't no much how Amiga OS works. But usually hard disk driver is responsible to take care about max sector counts possible with certain hard drives. So, if it exceeds it driver splits into several requests with allowed counts.
Considering buffering by CF cards: some may have it, some not. All it is pretty irrelevant on slow machines like Amiga. Modern CF cards are much faster. Buffer is needed mostly by slow mechanical hard disks. But by CF cards sector access times are much-much better, so buffer is not a must. I see other problems with CF cards and old micros without some advanced ATA compatible IDE IF : signal timing problems. It is worst in case of writing. Problem is that usual IDE logics activate and deactivate IDE SELP (CS0) signal together with RD and WR signals. By ATA spec it is not so (must activate RD and WR later and deactivate earlier) . Was OK with old hard drives, but after 20 years things are different. With Sandisk CF cards usually no timing problems, because they have better behaviour and different timing than usual CF cards (as Kingston). Of course, best is to design new IDE (ATA) adapters with better signal timing, according to new ATA specs. |
10 June 2011, 00:22 | #35 |
Global Moderator
Join Date: Jan 2004
Location: Oxford
Posts: 14,655
|
I thought that was what MAX TRANSFER was for. It tells some part of the OS/driver the limit at which a file system request of N bytes is split into multiple transfers.
|
10 June 2011, 07:58 | #36 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,611
|
Quote:
Device driver does not know nothing about max transfer parameter. (and check also post 25) |
|
10 June 2011, 08:06 | #37 | |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,051
|
Quote:
BTW, WinUAE emulates the MaxTransfer problem on the internal IDE port, too. So if this wasn't intentional, then it's really scsi.device which sends malformed ATA commands to the hardware and not some missing cache on the harddrive or something. |
|
10 June 2011, 08:12 | #38 | |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,051
|
Quote:
If you examine the data written by WinUAE to a HDF connected to IDE0, you'll see exactly this: if you transfer 257 sectors (0 - 256), sector 1 to 255 are written correctly, sector 0 contains the data of written sector 256 and sector 256 remains unchanged. |
|
10 June 2011, 08:36 | #39 |
Global Moderator
Join Date: Jan 2004
Location: Oxford
Posts: 14,655
|
I missed that post. That certainly explains why only some devices are affected. Seems dumb to read the tailgate status to form the next command but hey.
I know that our modern ATA8 hard drive controllers always update the tailgate status for all commands, not just errors. |
10 June 2011, 08:41 | #40 | ||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,611
|
Quote:
Quote:
Should WinUAE detect this situation and warn about it? It is easy to emulate this exactly as ATA-1 spec says which is technically right thing to do but may not the best choice from non-technical point of view |
||
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CF Hd Max Transfer Problem | flushentity | support.Hardware | 2 | 12 May 2012 22:15 |
IDE max transfer (CF, Hard disk, FAT95) | xraynorm | support.Hardware | 2 | 27 March 2011 20:58 |
Max transfer & mask for CF card? | PowerPie5000 | support.Hardware | 7 | 29 November 2010 12:35 |
IDE & Max Transfer-temp | prowler | support.Hardware | 0 | 16 June 2009 21:30 |
CF to IDE adapter - Max size card? | crispywotsits | support.Other | 11 | 19 February 2009 16:38 |
|
|