English Amiga Board    


Go Back   English Amiga Board > » Support > support.Hardware

Reply
 
Thread Tools
Old 16 June 2009, 14:49   #1
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 10,514
IDE & Max Transfer

I was replying to someone over at Amiga.org about MAX TRANSFER settings for IDE controllers (such as A1200/A600 Gayle IDE) giving them the standard "try 0x1FE00 and if that doesnt work try 0xFE00".

While writing I accidentally worked out the logical reason behind these "Magic numbers".
  • IDE commands (ATA5 or lower) have "sector count" field which is 8-bits.
  • SCSI commands (SCSI10) have a "transfer size" field which is 16-bits.
For those who do not know, a sector is the smallest individual amount you can access on a Hard drive and has always been (until recently) 512 bytes. And "sector count / transfer size" is the amount to be transferred in a single command.

I noticed that "0x1FE00" is 255 * 512, and that 255 is the largest value that can be represented by 8-bits. So by using "0x1FE00" it prevents the driver (scsi.device) creating malformed IDE commands with sector counts larger than 8-bit.

I am positive this is the logical answer as to why MAX TRANSFER should be "0x1FE00" for IDE devices.

------------

Now while the IDE (ATA5 and lower) command set supports an 8-bit sector count, very few operating systems use the maximum value. Windows (and most other operating systems) tend to use 64 or 128 sector commands. I know this because I discovered at work several years ago that PATA hard drives have their cache optimised for 64 sectors while SATA were optimised for 128 sector commands.

Back to the plot:

The second magic number touted for MAX transfer "0xFE00" is 127 * 512. I am not sure exactly why this value would be more compatible than 0x1FE00, but I imagine it has to do with the fact poor quality IDE devices do not expect sector counts above 128 sectors.

You pretty much guarantee "sector count" compatibility with any IDE device with 0xFE00 and I cannot believe that it is slower.

Anyhow, hope that has explained things, rather than confused things.
__________________
Thalion Webshrine
alexh is offline   Reply With Quote
Old 16 June 2009, 21:30   #2
prowler
Global Moderator
 
prowler's Avatar
 
Join Date: Aug 2008
Location: Sidcup, England
Posts: 8,700
That's a useful display of detective work, alexh!

Thanks for sharing your thoughts on this with us.
prowler is offline   Reply With Quote
Old 16 June 2009, 22:19   #3
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 10,514
I dunno if my explanation is dumb enough.

You still have to be reasonably computer literate (at a low level) to get it.
__________________
Thalion Webshrine
alexh is offline   Reply With Quote
Old 17 June 2009, 01:59   #4
Eclipse
Turpentine
 
Eclipse's Avatar
 
Join Date: Oct 2007
Location: Kent, United Kingdom
Posts: 739
That's very clear and actually explains a lot.
Eclipse is offline   Reply With Quote
Old 17 June 2009, 05:09   #5
Zetr0
Ya' like it Retr0?
 
Zetr0's Avatar
 
Join Date: Jul 2005
Location: United Kingdom
Age: 38
Posts: 9,185
I think it should be added to the CF-IDE for the Amiga Wiki...... if we have one....
__________________
Luscious Linkie Time:-

Zetr0 is offline   Reply With Quote
Old 04 December 2010, 03:07   #6
Leandro Jardim
I like potato ;)
 
Leandro Jardim's Avatar
 
Join Date: Nov 2009
Location: Dont try to ask this to a drunken guy.
Age: 34
Posts: 593
Thanks alexh ! I put the magic number in the RDB of my hardfile, and now it works much better!
__________________
Quote from Mr. Burns, from the tv-show "The Simpsons":
"Hmm, Simpson, hein..."
Leandro Jardim is offline   Reply With Quote
Old 04 December 2010, 05:19   #7
mech
Registered User
 
mech's Avatar
 
Join Date: Mar 2009
Location: texas,usa
Posts: 83
Nice one alex,
another good reason to use SCSI on amiga also
mech is offline   Reply With Quote
Old 04 December 2010, 10:18   #8
Jope
-
 
Jope's Avatar
 
Join Date: Jul 2003
Location: Helsinki / Finland
Age: 32
Posts: 4,061
Send a message via MSN to Jope Send a message via Skype™ to Jope
Added Alexh's post to Amiga Problems.
__________________
The X-Copy shrine!
Jope is offline   Reply With Quote
Old 06 December 2010, 11:46   #9
Rixa
Registered User
 
Join Date: Sep 2007
Location: Tampere / Finland
Posts: 118
Nicely reasoned, and makes sense.

However, when I was setting up my CF card, I went with what looked like the most reliable-looking advice I could find at the time and set the Max Transfers value as high as 0x1FE0000. At 256 times more than reasoned above, it seems quite absurd.

The magic is it has worked just fine, and apparently also in some cases where 0x1FE00 hasn't. I would like to know why it works, whether it is just waiting to cause trouble, or if there is any other reason to change it. I was thinking perhaps it is not taking the entire 32-bit value into account, but the less significant word is all zeroes so wouldn't it likely result in a MaxTransfer of 0 then?
Rixa is offline   Reply With Quote
Old 06 December 2010, 13:01   #10
Loedown
Precious & fragile things
 
Join Date: Feb 2009
Location: Victoria, Australia
Posts: 1,590
Quote:
Originally Posted by Rixa View Post
Nicely reasoned, and makes sense.

However, when I was setting up my CF card, I went with what looked like the most reliable-looking advice I could find at the time and set the Max Transfers value as high as 0x1FE0000. At 256 times more than reasoned above, it seems quite absurd.

The magic is it has worked just fine, and apparently also in some cases where 0x1FE00 hasn't. I would like to know why it works, whether it is just waiting to cause trouble, or if there is any other reason to change it. I was thinking perhaps it is not taking the entire 32-bit value into account, but the less significant word is all zeroes so wouldn't it likely result in a MaxTransfer of 0 then?
If I understand correctly CF cards have a block transfer mode and as long as you stay under the maximum limit for their block transfer and your Amiga has enough ram to accomodate the block before writing then all should be good. 256 bytes and 512 bytes are older block sizes, C64 disks use a 256 byte sector for example, keep in mind when the hardware came out 512 byte sector size was fine and now we have legacy keeping it alive.
Loedown is offline   Reply With Quote
Old 06 December 2010, 13:53   #11
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 3,908
Actually there shouldn't be a problem with MaxTransfer. The device driver should know the hardware limitations and automatically split large packets into smaller ones. Just like ping and MTU in TCP/IP world.

But scsi.device does not do this. If you specify a MaxTransfer value larger than 0x1fe00, it will send a mangled command to the device, resulting in corrupted data. So it is important to set MaxTransfer to a reasonable value when using scsi.device.

However, it also depends on the version of scsi.device which is used. For example when using IDEfix, a new scsi.device is used which does automatically split large packets. So with IDEfix MaxTransfer should not be an issue.

Finally MaxTransfer issues only arise when using files larger than the critical limit. Files smaller than 127.5K are not affected at all. Similarly large files might not be affected if a copy program is used which does not attempt to write more than 127.5K at a time.
__________________
Home: thomas-rapp.homepage.t-online.de
Email: thomas-rapp@web.de
thomas is offline   Reply With Quote
Old 02 June 2011, 20:01   #12
Gordon
Settler
 
Gordon's Avatar
 
Join Date: Feb 2007
Location: Amigastan
Posts: 885
Where can I set the max transfers properly? I have tried HD tool box but it doesnt save my changes? im trying to put 0x1fe00 but it kees changeing. Do i need to change the mask as well?
__________________


Gordon is offline   Reply With Quote
Old 02 June 2011, 20:09   #13
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 41
Posts: 8,379
You have to press the enter button after typing 1fe00, then save the settings.
Retro-Nerd is online now   Reply With Quote
Old 02 June 2011, 20:15   #14
Jope
-
 
Jope's Avatar
 
Join Date: Jul 2003
Location: Helsinki / Finland
Age: 32
Posts: 4,061
Send a message via MSN to Jope Send a message via Skype™ to Jope
No need to adjust the mask.
__________________
The X-Copy shrine!
Jope is offline   Reply With Quote
Old 02 June 2011, 20:20   #15
Gordon
Settler
 
Gordon's Avatar
 
Join Date: Feb 2007
Location: Amigastan
Posts: 885
Thank you Retro-Nerd for the very quick response, that worked. I cant believe thats what I was missing!

Ok Jope thanks.
__________________


Gordon is offline   Reply With Quote
Old 03 June 2011, 15:16   #16
AmigTart
 
Posts: n/a
Quote:
Originally Posted by alexh View Post
I was replying to someone over at Amiga.org about MAX TRANSFER settings for IDE controllers (such as A1200/A600 Gayle IDE) giving them the standard "try 0x1FE00 and if that doesnt work try 0xFE00".

While writing I accidentally worked out the logical reason behind these "Magic numbers".
  • IDE commands (ATA5 or lower) have "sector count" field which is 8-bits.
  • SCSI commands (SCSI10) have a "transfer size" field which is 16-bits.
For those who do not know, a sector is the smallest individual amount you can access on a Hard drive and has always been (until recently) 512 bytes. And "sector count / transfer size" is the amount to be transferred in a single command.

I noticed that "0x1FE00" is 255 * 512, and that 255 is the largest value that can be represented by 8-bits. So by using "0x1FE00" it prevents the driver (scsi.device) creating malformed IDE commands with sector counts larger than 8-bit.

I am positive this is the logical answer as to why MAX TRANSFER should be "0x1FE00" for IDE devices.------------
Actually, max sector count by IDE (ATA) is 256 sectors, because 0 in sector count registers means not 0 (nonsense) but 256 .

With 48-bit LBA (what is necessary with drives over 128GB) max count is 65536 as sector count is given as 16-bit value.
  Reply With Quote
Old 03 June 2011, 16:05   #17
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 10,514
Quote:
Originally Posted by AmigTart View Post
Actually, max sector count by IDE (ATA) is 256 sectors, because 0 in sector count registers means not 0 (nonsense) but 256 .
Agreed, but I didn't want to confuse people. The largest number of sectors possible in a non zero 8-bit number is still 255 which corresponds to MAX TRANSFER of 0x1FE00 bytes.

Quote:
Originally Posted by AmigTart View Post
With 48-bit LBA (what is necessary with drives over 128GB) max count is 65536 as sector count is given as 16-bit value.
The recent patches to the Amiga IDE scsi.device which adds ATA-6 command set (48-bit LBA) may have increased the sector count to 16-bit but I don't know. Can anyone confirm?

You would need this version of scsi.device in your Kickstart ROM or eFlash/Kickflash/Deneb to be able to boot from a device with a the MAX TRANSFER set to larger than 0x1FE00. This is going to be a VERY small set of people.

I thought that I had used the scsi.device (45.45) with 48-bit LBA support using a MAX TRANSFER larger than 0x1FE00 with a SanDisk CF card and had data corruption. I will be able to confirm soon as I'm making my own KS3.9 EPROMs for my A4000
__________________
Thalion Webshrine

Last edited by alexh; 03 June 2011 at 16:11.
alexh is offline   Reply With Quote
Old 05 June 2011, 00:12   #18
rkauer
I hate potatos and shirts
 
rkauer's Avatar
 
Join Date: Oct 2007
Location: Sao Leopoldo / Brazil
Age: 47
Posts: 3,477
Send a message via MSN to rkauer Send a message via Yahoo to rkauer
The real problem is not the sector count, but the fact compact flash & microdrives doesn't have a built-in buffer .

Notice that real HD doesn't suffer from this issue, from the old IDE to SCSI drives.

So anything over 255 will choke in the Amiga IDE bus (read "Gayle"), who will still try to put more data than the slow IDE channel can really cope.
__________________
Amigan since 1989
Known drunk since 1982 (don't know quite well, I was drunk)

13 Amigas at home
Finally a Z3 one!
I'll stick with 'Cachaça do Inter' for this week: Chivas gives headaches! :D
rkauer is offline   Reply With Quote
Old 05 June 2011, 00:41   #19
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 10,514
???? How did you work that out? I was sure the problem is about malformed commands. The Amiga tries to transfer more data on the bus than the drive is expecting.

AmigaOS tries to send a command for say 131584 bytes (257 sectors). It made sense that scsi.device can only send ATA commands with an 8-bit sector count (and it doesn't check the incoming request size) which gets converted into an ATA command of 1 sector.

Quote:
Originally Posted by rkauer View Post
Notice that real HD doesn't suffer from this issue
With a MAX TRANSFER above 0x1FE00 I get data corruption on Gayle IDE using 2.5" PATA IDE disks just as I do with CF cards.

I imagined it was not a problem for SCSI drives because SCSI commands have a bigger (32-bit?) sector count field.
__________________
Thalion Webshrine

Last edited by alexh; 05 June 2011 at 01:01.
alexh is offline   Reply With Quote
Old 05 June 2011, 00:44   #20
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 41
Posts: 8,379
Really? I never had any issues with standard MaxTransfer settings and PC hard drives. Pure luck?
Retro-Nerd is online now   Reply With Quote
Old 05 June 2011, 00:59   #21
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 10,514
Using the onboard IDE?
__________________
Thalion Webshrine
alexh is offline   Reply With Quote
Old 05 June 2011, 01:00   #22
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 41
Posts: 8,379
Yes.
Retro-Nerd is online now   Reply With Quote
Old 05 June 2011, 01:05   #23
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 10,514
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.
__________________
Thalion Webshrine
alexh is offline   Reply With Quote
Old 05 June 2011, 14:17   #24
Jope
-
 
Jope's Avatar
 
Join Date: Jul 2003
Location: Helsinki / Finland
Age: 32
Posts: 4,061
Send a message via MSN to Jope Send a message via Skype™ to Jope
I can verify that 1fe00 is needed with many real hard disks too.
__________________
The X-Copy shrine!
Jope is offline   Reply With Quote
Old 05 June 2011, 14:56   #25
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,944
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.
Toni Wilen is online now   Reply With Quote
Old 05 June 2011, 14:56   #26
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 10,514
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!
__________________
Thalion Webshrine
alexh is offline   Reply With Quote
Old 05 June 2011, 15:34   #27
Hewitson
Registered User
 
Hewitson's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 30
Posts: 1,390
Quote:
Originally Posted by Retro-Nerd View Post
Really? I never had any issues with standard MaxTransfer settings and PC hard drives. Pure luck?
Me either..
__________________
"The sad thing is that today's computers totally abuse their memory - totally wasteful, you have to wait for the damn things to boot up, just appalling designs." -Sir Clive Sinclair
Hewitson is offline   Reply With Quote
Old 05 June 2011, 17:15   #28
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 41
Posts: 8,379
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?
Retro-Nerd is online now   Reply With Quote
Old 05 June 2011, 17:16   #29
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 10,514
All my hard drives are very modern PC laptop hard drives. Dunno if that makes any difference?
__________________
Thalion Webshrine
alexh is offline   Reply With Quote
Old 05 June 2011, 17:25   #30
Gordon
Settler
 
Gordon's Avatar
 
Join Date: Feb 2007
Location: Amigastan
Posts: 885
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.
__________________


Gordon is offline   Reply With Quote
Old 05 June 2011, 17:32   #31
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 41
Posts: 8,379
I've never used 2.5 HDs, only 3.5. Could this really make a difference?
Retro-Nerd is online now   Reply With Quote
Old 05 June 2011, 19:20   #32
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 10,514
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)
__________________
Thalion Webshrine
alexh is offline   Reply With Quote
Old 06 June 2011, 07:10   #33
rkauer
I hate potatos and shirts
 
rkauer's Avatar
 
Join Date: Oct 2007
Location: Sao Leopoldo / Brazil
Age: 47
Posts: 3,477
Send a message via MSN to rkauer Send a message via Yahoo to rkauer
@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.
__________________
Amigan since 1989
Known drunk since 1982 (don't know quite well, I was drunk)

13 Amigas at home
Finally a Z3 one!
I'll stick with 'Cachaça do Inter' for this week: Chivas gives headaches! :D
rkauer is offline   Reply With Quote
Old 09 June 2011, 15:51   #34
AmigTart
 
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.
  Reply With Quote
Old 10 June 2011, 00:22   #35
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 10,514
Quote:
Originally Posted by AmigTart View Post
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.
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.
__________________
Thalion Webshrine
alexh is offline   Reply With Quote
Old 10 June 2011, 07:58   #36
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,944
Quote:
Originally Posted by alexh View Post
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.
Max transfer is filesystem parameter, filesystem (if it cares about the parameter) splits the request in less than max transfer pieces before sending it to device driver.

Device driver does not know nothing about max transfer parameter.

(and check also post 25)
Toni Wilen is online now   Reply With Quote
Old 10 June 2011, 08:06   #37
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 3,908
Quote:
Originally Posted by Toni Wilen View Post
Device driver does not know nothing about max transfer parameter.
Yes, but the device driver should know the limitations of the hardware it drives. In this case, the ATA driver should know about the 256 sector limit of ATA commands and if a larger amount of sectors is to be transferred, it should split it automatically into multiple ATA commands or use another ATA command which can transfer more than 256 sectors.

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.
__________________
Home: thomas-rapp.homepage.t-online.de
Email: thomas-rapp@web.de
thomas is offline   Reply With Quote
Old 10 June 2011, 08:12   #38
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 3,908
Quote:
Originally Posted by Toni Wilen View Post
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!

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.
__________________
Home: thomas-rapp.homepage.t-online.de
Email: thomas-rapp@web.de
thomas is offline   Reply With Quote
Old 10 June 2011, 08:36   #39
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 10,514
Quote:
Originally Posted by Toni Wilen View Post
(and check also post 25)
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.
__________________
Thalion Webshrine
alexh is offline   Reply With Quote
Old 10 June 2011, 08:41   #40
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,944
Quote:
Originally Posted by thomas View Post
Yes, but the device driver should know the limitations of the hardware it drives. In this case, the ATA driver should know about the 256 sector limit of ATA commands and if a larger amount of sectors is to be transferred, it should split it automatically into multiple ATA commands or use another ATA command which can transfer more than 256 sectors.
It does split it properly but unfortunately splitting uses ATA feature that was removed in later ATA specs.

Quote:
Originally Posted by thomas View Post
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.
Thanks, this should confirm my theory.

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
Toni Wilen is online now   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Max transfer & mask for CF card? PowerPie5000 support.Hardware 7 29 November 2010 12:35
issues cf ide pcmcia cfs fat95 x4 ide jimmer78 support.Hardware 9 29 April 2010 00:15
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
SCSI-IDE bridge + IDE to CF adapter - How can I make a backup? Tuffy New to Emulation or Amiga scene 2 02 April 2008 21:14


All times are GMT +2. The time now is 21:33.

-->

Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Page generated in 0.50270 seconds with 9 queries