Menu

#2 Listing or reading (writing to file) memory cards hangs

open
nobody
None
5
2013-02-17
2013-02-17
No

uname -a: Linux omega1 3.2.0-4-amd64 #1 SMP Debian 3.2.35-2 x86_64 GNU/Linux
Debian Testing (Wheezy)

Sometimes listing cards hangs, and pretty much any attempt to read a block or whole card fails.

Debugging this shows that libdexux/libdexuxgetframe.c: dexuxgetframe loops permanently waiting on available bytes if <132B are available. I have had multiple instances of 4B remaining, 128B remaining permanently etc - I have hacked the function to detect such failures and restart the frame fetch.

This does appear to work - a third party memory card was 'successfully' imaged twice with identical results even with a few frame fetch failures. However most of my original Sony memory cards aren't properly listable and dont image properly at all (dump keeps changing its hash). Its almost like they use a different format and dexdrive cant deal with them properly (product code at least shows up etc).

I will post my patch after I've finished working with the cards - I'm a C n00b and dont know hardware, so it may need extra work...

Heres hoping the original programmers even monitor their mail :p

Discussion

  • Omega Weapon

    Omega Weapon - 2013-02-17

    Make frame fetching more tolerant of error

     
  • Omega Weapon

    Omega Weapon - 2013-02-17

    I have finished my testing of the 11 PlayStation cards (1 third party) - the newest official card from 2003 is apparently imagable, but all other cards (1997-) are corrupt. The following is an example of the listing of the working official card:

    ==================================================================================

    # ./dex -d /dev/ttyS0 l

    # Title Size Del Product Code ID Frames
    1 FF6 SYSTEM FILE 1 N BE-SCES-03828 SYSTEM 1
    2 FF6 FILE01 LV34 37:31 1 N BE-SCES-03828 -00000 1
    3 METALSLUG X 1 N BE-SLES-03575 3
    4 Broken Sword 2: Upper floor 1 N BE-SCES-00798 A 1
    5 RE2 1.ClaireB/09/Train 1 N BE-SLES-00972 00 1
    6 RE2 2.LeonA /00/Scenario 1st 1 N BE-SLES-00972 01 1
    Frame fetch failure: 4 out of 132B available data detected after 500 waits - failure count (give up on 5): 1
    7 RE2 3.ClaireA/00/Scenario 1st 1 N BE-SLES-00972 02 1
    8 RETALIATION : SOVIETkestoksovi 1 N BE-SLES-01343 SOV 3
    9 COLONY WARS:Rerun 1 N BE-SLES-00860 Rerun 1
    10 RETALIATION : ALLIEDerrunalli 1 N BE-SLES-01343 ALL 3
    Frame fetch failure: 4 out of 132B available data detected after 500 waits - failure count (give up on 5): 1
    14 Broken Sword 2: Oubier.s House 1 Y BE-SCES-00798 A 1
    Blocks in use: 10 Blocks available: 5

    ==================================================================================

    The frame fetch failure notices are from my patch recovering from the stall - shouldn't affect the listing.

    The following is an example of the next youngest official card listing (2001):

    ==================================================================================

    # Title Size Del Product Code ID Frames
    1 FF9/FILE01/50:35^ 1 N BE-SLES-02965 00000-00 1
    2 1 N BE-SCES-02776 TCTITAN 3
    3 1 N BE-SLES-02965 00000-01 3
    4 1 N BE-SLES-02965 00000-02 3
    5 1 N BE-SLES-03425 3
    6 0 Y 9PANZER 3
    7 ????????????? 0 Y 0
    Frame fetch failure: 4 out of 132B available data detected after 500 waits - failure count (give up on 5): 1
    8 1 N BE-SCES-02009 IQFD 3
    9 1 N BE-SCES-01625 3
    10 1 N BE-SLES-02068 STARTREK 3
    11 1 N BE-SCES-03828 -00001 3
    12 1 N BE-SCES-03828 -00002 3
    13 1 N BE-SLES-00278 3
    14 1 N BE-SCES-03828 -00000 3
    15 1 N BE-SCES-03828 -00003 3
    Blocks in use: 13 Blocks available: 0

    ==================================================================================

    Here it looks like the Final Fantasy IX save is usable, in other cards no blocks have useful titles.

    If someone who knows what they are doing can help me work through this that would be awesome (all the card failures are similar - is this really a case of card corruption?), although I'm not holding my breath after 13 years ;)

     
  • Omega Weapon

    Omega Weapon - 2013-03-01

    I have since found that the 'corrupt' cards are infact fine - can copy the blocks from a 'bad' card to a working one. Presumably my DexDrive is defective then?

    Either way, this will allow me to get at all my saves.

     

Log in to post a comment.