Adapter and device that reliably produce Disc Error 23

wanted ads for hardware, software + literature (NOT for tape/disc image requests)
Forum rules
You're welcome to trade Acorn-related stuff with other forum members here - the rule of thumb to follow when trading, is that items or services offered should be of interest to our Acorn community. Do NOT use multiple accounts - please trade with your regular (and only) forum account. If you're giving items away, please make it clear if you would be unhappy with the recipient selling on some or all of the items. Similarly, please ensure that the giver is comfortable with you re-selling items you have accepted as a gift. We cannot be held responsible for what happens in these trading forums or for deals done via PM. This must be done at your own risk. If you aren't comfortable with this - make the trade via an alternative site which can apply safeguards of their own. Be sensible - if someone approaches you to trade via PM who is not posting in the public forums, this may be a sign that they are not entirely what they seem. Please report it to the moderators if you receive an unsolicited message from anyone suspicious, so that it can be investigated and hopefully stop anyone being taken advantage of.
sirbod
Posts: 737
Joined: Mon Apr 09, 2012 8:44 am
Location: Essex
Contact:

Adapter and device that reliably produce Disc Error 23

Postby sirbod » Sun Nov 12, 2017 6:08 am

In my quest to resolve all the IDE issues under RISCOS once and for all, I need a device that reliably produces Disc Error 23 to allow ADFS to be debugged. I've tested dozens of CF cards and all worked flawlessly with ADFS patched for Disc Error 20, so there's a possibility this issue needs a specific adapter/device combination.

Note, it's this specific error I need to reproduce, I have devices that fail with Disc Error 21 and am working on a solution for them currently.

steve3000
Posts: 1711
Joined: Sun Nov 25, 2012 12:43 am

Re: Adapter and device that reliably produce Disc Error 23

Postby steve3000 » Sun Nov 12, 2017 9:08 am

Hi Jon,
I have SD-> IDE adaptors which consistently produce disc error 23 when connected to an A5000. I don't know if they do the same on a RiscPC though (if this is what you're working on?).

The adaptors all have a single IC with ST368 and/or Sintechi written on them, and are currently what you receive if you buy a low cost SD -> IDE adaptor off ebay (eg. Item 282620333866).

Do any of your adaptors have ST368 on them?

I'm away from home until next weekend but could pop one to you in the post on my return.
Cheers,
Steve

sirbod
Posts: 737
Joined: Mon Apr 09, 2012 8:44 am
Location: Essex
Contact:

Re: Adapter and device that reliably produce Disc Error 23

Postby sirbod » Sun Nov 12, 2017 11:03 am

steve3000 wrote:I have SD-> IDE adaptors which consistently produce disc error 23 when connected to an A5000

I don't have any SD->IDE adapters. To date, I've tested CF/SATA adapters on an A4000, RiscPC and Iyonix, I've not tried the A5000 as I presumed the IDE is identical to the A4000.

It's certainly going to be quicker if someone could send me a known failing combination, as I've wasted the best part of two weeks testing device/card combinations trying to get the problem to occur, with no success.

User avatar
jgharston
Posts: 2756
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: Adapter and device that reliably produce Disc Error 23

Postby jgharston » Sun Nov 12, 2017 6:02 pm

What's disk error 23? IDE errors are a bitmap, so you would only ever expect a single bit to be set at any time:

Code: Select all

  Status                       Error
  &80  Busy                    &80  Bad block
  &40  Drive Ready             &40  Uncorrectable data error
  &20  Drive Write Fault       &20  Media changed
  &10  Drive Seek Complete     &10  Sector not found/ID mark not found
  &08  Data Request            &08  Media Change Requested
  &04  Error Corrected         &04  Abort
  &02  Index pulse             &02  Track 0 not found/No media present
  &01  Error in reg 1 ---->    &01  Address mark not found

If the low-level IDE result is translated to a high level result, there's only a dozen or so possible.

I know I could check the RISC OS sources to see what the IDE ADFS module does, but I've just put the kettle on. ;)

For instance, 8-bit ADFS does the following translation:

Code: Select all

IDE result code               SCSI result code
  &20xx Device Write Fault      &03 Write fault
  &x180 Bad data block          &19 Bad track read
  &x140 Data error              &11 Data CRC error
  &x120 Media changed           &28 Media changed
  &x110 Sector not found        &10 Sector not found
  &x108 Media change request    &02 Drive door open
  &x104 Abort                   &2F Abort
  &x102 Track 0 not found       &06 Track 0 not found
  &x101 Address mark not found  &12 Address mark not found
  &00xx OK                      &00 OK
                                &7F Unknown IDE result
                                &27 Unsupported SCSI command

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

User avatar
jgharston
Posts: 2756
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: Adapter and device that reliably produce Disc Error 23

Postby jgharston » Sun Nov 12, 2017 8:01 pm

Ok, I had that cup of tea and trawled through the ADFS sources. RISC OS does translate IDE controller results to higher level results, in this case to the equivalent ST506 results, adding to them where no equivalent ST506 result exists. Error 23 is WinIDEErrTimeout * &23 ; controller did not respond. It seems the case where it can occur is after sending a command to an IDE controller, and the controller does not respond with an IRQ within a certain time. It looks like you might be able to fake this by cutting/making connections to the IDE drive.

For reference, this is the IDE to ST506 result translation:

Code: Select all

IDE
---                                                             ST506 Result
Status:
&80 BSY  : Drive busy                                         - &21 Drive busy
&40 DRDY : Drive ready                                        - &08 Drive not ready
&20 DWF  : Drive Write Fault                                  - &07 Write fault
&10 DSC  : Drive Seek Complete - '1' when drive not seeking
&08 DRQ  : Data Request - '1' when drive ready to transfer data
&04 CORR : Correctable error has been corrected
&02 IDX  : Index pulse
&01 ERR  : Error in error register

Error:
&80 BBLK : Bad block mark detected in the sector ID field     - &17 Bad block mark detected
&80 BBLK : Interface CRC error                                - &26 Interface CRC error
&40 UNC  : Uncorrectable data error                           - &13 Uncorrected data error
&20 MC   : Media Changed - User has inserted a new disk
&10 IDNF : Requested sector's ID field not found              - &16 Sector UD field not found
&08 MCR  : Media Change Request - 'Eject' button pressed
&04 ABRT : Command aborted due to error or invalid command    - &02 Command aborted by controller
&02 T0NF : Track 0 not found or Drive Empty if MCR set        - &09 Track 0 not found
&01 AMNF : Data address mark not found after finding ID field - &18 No data address mark
                                                                &20 no DRQ when expected
                                                                &21 drive busy when commanded
                                                                &22 drive busy on command completion
                                                                &23 controller did not respond
                                                                &24 unknown code in error reg
                                                                &25 other error in Packet command
                                                                &26 interface CRC error


I'll add this to this list.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

User avatar
jgharston
Posts: 2756
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: Adapter and device that reliably produce Disc Error 23

Postby jgharston » Sun Nov 12, 2017 8:04 pm

Hardware error recovering code is definitiely the hardest to write, as to test it comprehensively you need a set of circumstances to consitantly and repeatedly exists that in real use you wish would never happen and manufacturers go to some lengths to prevent!

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

sirbod
Posts: 737
Joined: Mon Apr 09, 2012 8:44 am
Location: Essex
Contact:

Re: Adapter and device that reliably produce Disc Error 23

Postby sirbod » Mon Nov 13, 2017 11:31 am

Disc errors I'm attempting to resolve:

  • 20 No DRQ when expected
  • 21 Drive busy when commanded
  • 23 Controller did not respond within timeout
20 - is now resolved and was due to a revision in the timings in the ATA-2 standard. A fix is due to go into RISC OS 5 soon, although I've asked for it to be held back until I also resolve 23
21 - this is bus related and due to a change in the ATA-3 standard
23 - I know where in ADFS the error is triggered, but need to reproduce the issue with hardware so I can see what's happening with the drive leading up to the error

Although ADFS has been updated to support DMA on Iyonix and newer, the PIO code is still following the ATA-1 standard and the reason for the IDE issues with newer adapters/drives. At minimum it needs to support PIO3 and ATA-3 for the majority of devices to work, which will include SD adapters, CF's and SATA.

User avatar
danielj
Posts: 5345
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: Adapter and device that reliably produce Disc Error 23

Postby danielj » Sun Nov 19, 2017 11:03 am

Currently playing with this on my 3010 - format seems to work, but all I'm getting is broken directory - even with patched adfs loaded. I'm going to try and tie /IOCS16 to ground and see what happens...

d.

User avatar
danielj
Posts: 5345
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: Adapter and device that reliably produce Disc Error 23

Postby danielj » Sun Nov 19, 2017 12:24 pm

OK - I can now produce error 23 reliably with my A3010, formatting a particular CF card as soon as it's writing the map it gets grumpy.

d.

sirbod
Posts: 737
Joined: Mon Apr 09, 2012 8:44 am
Location: Essex
Contact:

Re: Adapter and device that reliably produce Disc Error 23

Postby sirbod » Sun Nov 19, 2017 12:43 pm

Great, what's the make/model of the adapter and CF? If you can attach some photos as well, even better.

User avatar
danielj
Posts: 5345
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: Adapter and device that reliably produce Disc Error 23

Postby danielj » Sun Nov 19, 2017 6:57 pm

So, I've got two on the go now (I've tied /IOCS16 in the A3010 to ground now). The CF adaptor is fairly irrelevant as they're just straight through, but it's one of these:

https://www.ebay.co.uk/itm/221077308288

The card that produces error 23 is a kingston 1GB - CF/1024FE, it does this when trying to initialise.

The other adaptor I've now got on the go is:
https://www.amazon.co.uk/gp/product/B071DXDYP8

This gives a broken directory when you try and access the drive after appearing to initialise properly.

sirbod
Posts: 737
Joined: Mon Apr 09, 2012 8:44 am
Location: Essex
Contact:

Re: Adapter and device that reliably produce Disc Error 23

Postby sirbod » Mon Nov 20, 2017 7:16 am

danielj wrote:The card that produces error 23 is a kingston 1GB - CF/1024FE, it does this when trying to initialise.

Annoyingly Kingston don't appear to have any data sheets, so I've no clue as to which standard it's following.
danielj wrote:The other adaptor I've now got on the go is:
https://www.amazon.co.uk/gp/product/B071DXDYP8

This gives a broken directory when you try and access the drive after appearing to initialise properly.

Is that with ADFS patched for Disc Error 20 before you run !HForm?

Steve also mentioned SD as a source for Disc Error 23, but we've yet to ascertain if it's specific to the adapter, SD or combination of the two. Do you have any other SD's you could test in that adapter?

User avatar
danielj
Posts: 5345
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: Adapter and device that reliably produce Disc Error 23

Postby danielj » Mon Nov 20, 2017 10:12 am

sirbod wrote:Annoyingly Kingston don't appear to have any data sheets, so I've no clue as to which standard it's following.


:(
Is that with ADFS patched for Disc Error 20 before you run !HForm?

Yes, this is patched for disc error 20 - it recognises the sd adaptor and its geometry, so the two things are obviously able to talk to each other. It initialises, writes everything, then as soon as you click on the drive: "Broken directory"...

Steve also mentioned SD as a source for Disc Error 23, but we've yet to ascertain if it's specific to the adapter, SD or combination of the two. Do you have any other SD's you could test in that adapter?


I would have thought it's specific to the adaptor as that's what implements the interface, however I have a few SD cards I can try over the next few days...

d.

steve3000
Posts: 1711
Joined: Sun Nov 25, 2012 12:43 am

Re: Adapter and device that reliably produce Disc Error 23

Postby steve3000 » Mon Nov 20, 2017 9:38 pm

danielj wrote:I would have thought it's specific to the adaptor as that's what implements the interface, however I have a few SD cards I can try over the next few days...

I've certainly seen this behaviour from some of the SD adaptors I have, as I've also seen Disc Error 23, but I can't be sure I ever carried out the experiment to check if symptoms changed with different SD cards.

I do remember the situation Daniel describes - being able to format the SD card apparently successfully, using !HForm, then it reports either 'Disc Error 23' after writing the catalogue from within !HForm, or gives a 'Bad directory' when returning to the desktop and clicking on the drive. I think it would even allow me to rename the disc successfully, just not catalogue it.

Unfortunately I'm hardly spending any time at home right not because of work, but my last assignment is next week, and I'll be back home for the foreseeable future from 1st December, so can happily carry out some testing then...if you guys haven't already solved everything! :)

sirbod
Posts: 737
Joined: Mon Apr 09, 2012 8:44 am
Location: Essex
Contact:

Re: Adapter and device that reliably produce Disc Error 23

Postby sirbod » Wed Nov 22, 2017 9:50 am

I now have a CF that reliably produces Disc Error 23 and will begin investigating :D


Return to “wanted”

Who is online

Users browsing this forum: No registered users and 2 guests