PhatHack

Phatbox / Keg software and support => Phatnoise Media Manager => Topic started by: jlv on May 18, 2008, 10:20:10 pm

Title: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: jlv on May 18, 2008, 10:20:10 pm
I originally posted this solution in the original thread where I did some investigation (http://forum.phathack.com/index.php/topic,1407.msg10277.html), but I thought this deserved it's own top-level thread.

I came up with a hack to eliminate the "Error retrieving DMS drive ID" problem!  8)

I've been using 3.76 since I put the 120G Samsung in my DMS, since 3.92 didn't work.  Today, I accidentally ran 3.92 - and it 'updated' my database before it got this error.  After that, running 3.76 told me my database was out of date... so I had a reason to try and fix this.

Going back to my original traces, I saw that 'DeviceDMS.dll' contained the code that was checking the device ID. I started with comparing the version in 3.76 and 3.92, and I saw that after the list of drive models in the data segment, there was a list of 'other' vendors.  In comparing the lists, I saw this difference between the two (at about offset 779936):
3.76                                3.92
Fujitsu MHT2020AT                   Fujitsu MHT2020AT
FUJITSU MHT2020AT                   FUJITSU MHT2020AT
Fujitsu MHS2020AT                   Fujitsu MHS2020AT
FUJITSU MHS2020AT                   FUJITSU MHS2020AT
PhatNois e DMS                      PhatNois e DMS
PHATNOIS E DMS                      PHATNOIS E DMS
PHATNOISE DMS                       PHATNOISE DMS
eUSB                                eUSB
Compact                             Compact
EPSON                               EPSON
Canon                               Canon
USB Drive                           USB Drive
USB DRIVE                           USB DRIVE
Card Reader                         Card Reader
Maxtor                              Maxtor
LEXAR                               LEXAR
Storage                             Storage
HITACHI                             HITACHI
Generic                             Generic
Sony                                SONY
SanDisk                             Sony
Samsung                             SanDisk
                                    SAMSUNG
                                    Samsung
                                    SigmaTelMSCN
Going back to the drive properties, I saw that the drive was listed as 'SAMSUNG HM121HC' - and then I noticed that there was no capital 'SAMSUNG' in 3.76 (which worked), but only 3.92 (which didn't work). So, I opened the 3.92 copy of DeviceDMS.dll in a binary editor (actually, I used VIM), and changed the new 'SAMSUNG' to read 'XAMSUNG' -- and now 3.92 starts and finds my DMS without a problem! ;D
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: VorTechS on May 19, 2008, 05:17:15 am
This looks interesting!  I personally haven't had the drive ID issue but others have.  Hopefully they are watching this.

If we can get further confirmation your approach works, I'll integrate it into the hack tools.

Nice find!
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: sbingner on May 19, 2008, 09:09:30 am
That seems backwards... you're saying if it IS in the list it doesn't work?
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: markbowen on May 19, 2008, 04:44:47 pm
Backwards or not, it works!

I also have a Samsung drive, 160GB in my case, that I could not previously use with 3.92.  Used VMI to change "SAMSUNG" to "XAMSUNG" exactly as jlv wrote, and can now use 3.92, no problem.

Kudos to jlv!

(Hmm...noticing Western Digital is not listed, and wondering if adding that as an entry would have any impact on the WD 250GB drive issues....)
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: VorTechS on May 19, 2008, 06:31:16 pm
If you can get it added, and get it working let me know.
I'll see what can be done to 'automate' things my end.
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: sbingner on May 20, 2008, 07:09:11 am
According to this, NOT being listed would be a GOOD thing...  perhaps those are the drives it tries to retrieve some ID from?  I should try screwing up ALL the entries to see if that works too...
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: VorTechS on May 20, 2008, 07:14:46 am
Well it does seem odd if this is an exclusion list, because it has the PhatNoise entries that get reported back as the drive IDs for my DMS and I don't get any problems with my original DMS.

Perhaps that list is split in two somehow...
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: markbowen on May 20, 2008, 09:19:16 am
I think this is both an inclusion and exclusion list.  Bearing in mind that I know nothing about dlls or hex/text editors, nonetheless in VIM one can see a difference between certain entries (not in the capitalization but in the ^@^@ thingies), suggesting that some are there to be included (e.g. Phatnoise DMS, Toshiba) and some are there to be excluded.  This would explain why changing SAMSUNG to XAMSUNG allows the drive to work.

(BTW I tried to add Western Digital or WDC to see if it had any effect, but all it did was corrupt the dll.  Again, I don't know what I am doing anyway.)
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: sbingner on May 21, 2008, 11:34:10 pm
You're right they are referenced in two different subroutines:

To include (probably):

Code: [Select]
.text:100409B0 sub_100409B0    proc near               ; CODE XREF: sub_1003FE80+72Dp
.text:100409B0
.text:100409B0 var_10          = dword ptr -10h
.text:100409B0 var_C           = dword ptr -0Ch
.text:100409B0 var_4           = dword ptr -4
.text:100409B0 arg_0           = byte ptr  4
.text:100409B0
.text:100409B0                 push    0FFFFFFFFh
.text:100409B2                 push    offset SEH_100409B0
.text:100409B7                 mov     eax, large fs:0
.text:100409BD                 push    eax
.text:100409BE                 mov     large fs:0, esp
.text:100409C5                 push    ecx
.text:100409C6                 mov     eax, dword_100CE4FC
.text:100409CB                 mov     [esp+10h+var_4], 0
.text:100409D3                 test    eax, eax
.text:100409D5                 jnz     loc_10040C83
.text:100409DB                 mov     ecx, offset unk_100CE4C0
.text:100409E0                 call    ?RemoveAll@CStringList@@QAEXXZ ; CStringList::RemoveAll(void)
.text:100409E5                 push    offset aPhatnoiseDms_1 ; "PHATNOISE DMS"
.text:100409EA                 mov     ecx, offset unk_100CE4C0
.text:100409EF                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:100409F4                 push    offset aPhatnoiseDms ; "PhatNoise DMS"
.text:100409F9                 mov     ecx, offset unk_100CE4C0
.text:100409FE                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040A03                 push    offset aPhatnoisEDms ; "PHATNOIS E DMS"
.text:10040A08                 mov     ecx, offset unk_100CE4C0
.text:10040A0D                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040A12                 push    offset aPhatnoisEDms_0 ; "PhatNois e DMS"
.text:10040A17                 mov     ecx, offset unk_100CE4C0
.text:10040A1C                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040A21                 push    offset aFujitsuMhs2020 ; "FUJITSU MHS2020AT"
.text:10040A26                 mov     ecx, offset unk_100CE4C0
.text:10040A2B                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040A30                 push    offset aFujitsuMhs20_0 ; "Fujitsu MHS2020AT"
.text:10040A35                 mov     ecx, offset unk_100CE4C0
.text:10040A3A                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040A3F                 push    offset aFujitsuMht2020 ; "FUJITSU MHT2020AT"
.text:10040A44                 mov     ecx, offset unk_100CE4C0
.text:10040A49                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040A4E                 push    offset aFujitsuMht20_0 ; "Fujitsu MHT2020AT"
.text:10040A53                 mov     ecx, offset unk_100CE4C0
.text:10040A58                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040A5D                 push    offset aFujitsuMht2020 ; "FUJITSU MHT2020AT"
.text:10040A62                 mov     ecx, offset unk_100CE4C0
.text:10040A67                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040A6C                 push    offset aFujitsuMht20_0 ; "Fujitsu MHT2020AT"
.text:10040A71                 mov     ecx, offset unk_100CE4C0
.text:10040A76                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040A7B                 push    offset aFujitsuMht2040 ; "FUJITSU MHT2040AT"
.text:10040A80                 mov     ecx, offset unk_100CE4C0
.text:10040A85                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040A8A                 push    offset aFujitsuMht20_1 ; "Fujitsu MHT2040AT"
.text:10040A8F                 mov     ecx, offset unk_100CE4C0
.text:10040A94                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040A99                 push    offset aFujitsuMhs2040 ; "FUJITSU MHS2040AT"
.text:10040A9E                 mov     ecx, offset unk_100CE4C0
.text:10040AA3                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040AA8                 push    offset aFujitsuMhs20_1 ; "Fujitsu MHS2040AT"
.text:10040AAD                 mov     ecx, offset unk_100CE4C0
.text:10040AB2                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040AB7                 push    offset aFujitsuMhv2040 ; "FUJITSU MHV2040AT"
.text:10040ABC                 mov     ecx, offset unk_100CE4C0
.text:10040AC1                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040AC6                 push    offset aFujitsuMhv20_0 ; "Fujitsu MHV2040AT"
.text:10040ACB                 mov     ecx, offset unk_100CE4C0
.text:10040AD0                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040AD5                 push    offset aFujitsuMht2060 ; "FUJITSU MHT2060AT"
.text:10040ADA                 mov     ecx, offset unk_100CE4C0
.text:10040ADF                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040AE4                 push    offset aFujitsuMht20_2 ; "Fujitsu MHT2060AT"
.text:10040AE9                 mov     ecx, offset unk_100CE4C0
.text:10040AEE                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040AF3                 push    offset aFujitsuMht2080 ; "FUJITSU MHT2080AT"
.text:10040AF8                 mov     ecx, offset unk_100CE4C0
.text:10040AFD                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040B02                 push    offset aFujitsuMht20_3 ; "Fujitsu MHT2080AT"
.text:10040B07                 mov     ecx, offset unk_100CE4C0
.text:10040B0C                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040B11                 push    offset aFujitsuMhv2120 ; "FUJITSU MHV2120AT"
.text:10040B16                 mov     ecx, offset unk_100CE4C0
.text:10040B1B                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040B20                 push    offset aFujitsuMhv21_0 ; "Fujitsu MHV2120AT"
.text:10040B25                 mov     ecx, offset unk_100CE4C0
.text:10040B2A                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040B2F                 push    offset aToshibaMk1017g ; "TOSHIBA MK1017GAP"
.text:10040B34                 mov     ecx, offset unk_100CE4C0
.text:10040B39                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040B3E                 push    offset aToshibaMk101_0 ; "Toshiba MK1017GAP"
.text:10040B43                 mov     ecx, offset unk_100CE4C0
.text:10040B48                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040B4D                 push    offset aToshibaMk2018g ; "TOSHIBA MK2018GAP"
.text:10040B52                 mov     ecx, offset unk_100CE4C0
.text:10040B57                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040B5C                 push    offset aToshibaMk201_0 ; "Toshiba MK2018GAP"
.text:10040B61                 mov     ecx, offset unk_100CE4C0
.text:10040B66                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040B6B                 push    offset aToshibaMk201_1 ; "TOSHIBA MK2018GAS"
.text:10040B70                 mov     ecx, offset unk_100CE4C0
.text:10040B75                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040B7A                 push    offset aToshibaMk201_2 ; "Toshiba MK2018GAS"
.text:10040B7F                 mov     ecx, offset unk_100CE4C0
.text:10040B84                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040B89                 push    offset aToshibaMk2018g ; "TOSHIBA MK2018GAP"
.text:10040B8E                 mov     ecx, offset unk_100CE4C0
.text:10040B93                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040B98                 push    offset aToshibaMk201_0 ; "Toshiba MK2018GAP"
.text:10040B9D                 mov     ecx, offset unk_100CE4C0
.text:10040BA2                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040BA7                 push    offset aToshibaMk2023g ; "TOSHIBA MK2023GAS"
.text:10040BAC                 mov     ecx, offset unk_100CE4C0
.text:10040BB1                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040BB6                 push    offset aToshibaMk202_0 ; "Toshiba MK2023GAS"
.text:10040BBB                 mov     ecx, offset unk_100CE4C0
.text:10040BC0                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040BC5                 push    offset aToshibaMk3017g ; "TOSHIBA MK3017GAP"
.text:10040BCA                 mov     ecx, offset unk_100CE4C0
.text:10040BCF                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040BD4                 push    offset aToshibaMk301_0 ; "Toshiba MK3017GAP"
.text:10040BD9                 mov     ecx, offset unk_100CE4C0
.text:10040BDE                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040BE3                 push    offset aToshibaMk4018g ; "TOSHIBA MK4018GAP"
.text:10040BE8                 mov     ecx, offset unk_100CE4C0
.text:10040BED                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040BF2                 push    offset aToshibaMk401_0 ; "Toshiba MK4018GAP"
.text:10040BF7                 mov     ecx, offset unk_100CE4C0
.text:10040BFC                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040C01                 push    offset aToshibaMk401_1 ; "TOSHIBA MK4018GAS"
.text:10040C06                 mov     ecx, offset unk_100CE4C0
.text:10040C0B                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040C10                 push    offset aToshibaMk401_2 ; "Toshiba MK4018GAS"
.text:10040C15                 mov     ecx, offset unk_100CE4C0
.text:10040C1A                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040C1F                 push    offset aToshibaMk4025g ; "TOSHIBA MK4025GAS"
.text:10040C24                 mov     ecx, offset unk_100CE4C0
.text:10040C29                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040C2E                 push    offset aToshibaMk402_0 ; "Toshiba MK4025GAS"
.text:10040C33                 mov     ecx, offset unk_100CE4C0
.text:10040C38                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040C3D                 push    offset aToshibaMk6015m ; "TOSHIBA MK6015MAP"
.text:10040C42                 mov     ecx, offset unk_100CE4C0
.text:10040C47                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040C4C                 push    offset aToshibaMk601_0 ; "Toshiba MK6015MAP"
.text:10040C51                 mov     ecx, offset unk_100CE4C0
.text:10040C56                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040C5B                 push    offset aToshibaMk6021g ; "TOSHIBA MK6021GAS"
.text:10040C60                 mov     ecx, offset unk_100CE4C0
.text:10040C65                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040C6A                 push    offset aToshibaMk602_0 ; "Toshiba MK6021GAS"
.text:10040C6F                 mov     ecx, offset unk_100CE4C0
.text:10040C74                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040C79                 mov     dword_100CE4FC, 1
.text:10040C83
.text:10040C83 loc_10040C83:                           ; CODE XREF: sub_100409B0+25j
.text:10040C83                 push    esi
.text:10040C84                 push    edi
.text:10040C85                 push    offset Caption  ; "PhatNoise"
.text:10040C8A                 lea     ecx, [esp+1Ch+arg_0]
.text:10040C8E                 xor     edi, edi
.text:10040C90                 call    ?Find@CString@@QBEHPBD@Z ; CString::Find(char const *)
.text:10040C95                 cmp     eax, 0FFFFFFFFh
.text:10040C98                 jz      short loc_10040CB2
.text:10040C9A                 push    offset aDms_0   ; "DMS"
.text:10040C9F                 lea     ecx, [esp+1Ch+arg_0]
.text:10040CA3                 call    ?Find@CString@@QBEHPBD@Z ; CString::Find(char const *)
.text:10040CA8                 cmp     eax, 0FFFFFFFFh
.text:10040CAB                 jz      short loc_10040CB2
.text:10040CAD                 mov     edi, 1
.text:10040CB2
.text:10040CB2 loc_10040CB2:                           ; CODE XREF: sub_100409B0+2E8j
.text:10040CB2                                         ; sub_100409B0+2FBj
.text:10040CB2                 mov     esi, dword_100CE4C4
.text:10040CB8                 test    esi, esi
.text:10040CBA                 jz      short loc_10040D10
.text:10040CBC
.text:10040CBC loc_10040CBC:                           ; CODE XREF: sub_100409B0+349j
.text:10040CBC                 test    edi, edi
.text:10040CBE                 jnz     short loc_10040D10
.text:10040CC0                 mov     eax, esi
.text:10040CC2                 mov     esi, [esi]
.text:10040CC4                 add     eax, 8
.text:10040CC7                 lea     ecx, [esp+18h+var_10]
.text:10040CCB                 push    eax
.text:10040CCC                 call    ??0CString@@QAE@ABV0@@Z ; CString::CString(CString const &)
.text:10040CD1                 mov     eax, [esp+18h+var_10]
.text:10040CD5                 lea     ecx, [esp+18h+arg_0]
.text:10040CD9                 push    eax
.text:10040CDA                 mov     byte ptr [esp+1Ch+var_4], 1
.text:10040CDF                 call    ?Find@CString@@QBEHPBD@Z ; CString::Find(char const *)
.text:10040CE4                 cmp     eax, 0FFFFFFFFh
.text:10040CE7                 jnz     short loc_10040CFD
.text:10040CE9                 lea     ecx, [esp+18h+var_10]
.text:10040CED                 mov     byte ptr [esp+18h+var_4], 0
.text:10040CF2                 call    ??1CString@@QAE@XZ ; CString::~CString(void)
.text:10040CF7                 test    esi, esi
.text:10040CF9                 jnz     short loc_10040CBC
.text:10040CFB                 jmp     short loc_10040D10
.text:10040CFD ; ---------------------------------------------------------------------------
.text:10040CFD
.text:10040CFD loc_10040CFD:                           ; CODE XREF: sub_100409B0+337j
.text:10040CFD                 lea     ecx, [esp+18h+var_10]
.text:10040D01                 mov     edi, 1
.text:10040D06                 mov     byte ptr [esp+18h+var_4], 0
.text:10040D0B                 call    ??1CString@@QAE@XZ ; CString::~CString(void)
.text:10040D10
.text:10040D10 loc_10040D10:                           ; CODE XREF: sub_100409B0+30Aj
.text:10040D10                                         ; sub_100409B0+30Ej ...
.text:10040D10                 lea     ecx, [esp+18h+arg_0]
.text:10040D14                 mov     [esp+18h+var_4], 0FFFFFFFFh
.text:10040D1C                 call    ??1CString@@QAE@XZ ; CString::~CString(void)
.text:10040D21                 mov     ecx, [esp+18h+var_C]
.text:10040D25                 mov     eax, edi
.text:10040D27                 pop     edi
.text:10040D28                 pop     esi
.text:10040D29                 mov     large fs:0, ecx
.text:10040D30                 add     esp, 10h
.text:10040D33                 retn
.text:10040D33 sub_100409B0    endp
.text:10040D33
.text:10040D33 ; ---------------------------------------------------------------------------
.text:10040D34                 align 10h

and to exclude (I assume):
Code: [Select]
.text:10040D80 sub_10040D80    proc near               ; CODE XREF: sub_1003FE80+75Bp
.text:10040D80
.text:10040D80 var_10          = dword ptr -10h
.text:10040D80 var_C           = dword ptr -0Ch
.text:10040D80 var_4           = dword ptr -4
.text:10040D80 arg_0           = byte ptr  4
.text:10040D80
.text:10040D80                 push    0FFFFFFFFh
.text:10040D82                 push    offset SEH_10040D80
.text:10040D87                 mov     eax, large fs:0
.text:10040D8D                 push    eax
.text:10040D8E                 mov     large fs:0, esp
.text:10040D95                 push    ecx
.text:10040D96                 push    esi
.text:10040D97                 push    edi
.text:10040D98                 mov     eax, dword_100CE500
.text:10040D9D                 xor     edi, edi
.text:10040D9F                 cmp     eax, edi
.text:10040DA1                 mov     [esp+18h+var_4], edi
.text:10040DA5                 jnz     loc_10040EFA
.text:10040DAB                 mov     ecx, offset unk_100CE4A0
.text:10040DB0                 call    ?RemoveAll@CStringList@@QAEXXZ ; CStringList::RemoveAll(void)
.text:10040DB5                 push    offset aSamsung ; "Samsung"
.text:10040DBA                 mov     ecx, offset unk_100CE4A0
.text:10040DBF                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040DC4                 push    offset aSamsung_0 ; "SAMSUNG"
.text:10040DC9                 mov     ecx, offset unk_100CE4A0
.text:10040DCE                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040DD3                 push    offset aSandisk ; "SanDisk"
.text:10040DD8                 mov     ecx, offset unk_100CE4A0
.text:10040DDD                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040DE2                 push    offset aSony    ; "Sony"
.text:10040DE7                 mov     ecx, offset unk_100CE4A0
.text:10040DEC                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040DF1                 push    offset aSony_0  ; "SONY"
.text:10040DF6                 mov     ecx, offset unk_100CE4A0
.text:10040DFB                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040E00                 push    offset aGeneric ; "Generic"
.text:10040E05                 mov     ecx, offset unk_100CE4A0
.text:10040E0A                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040E0F                 push    offset aCf      ; "CF"
.text:10040E14                 mov     ecx, offset unk_100CE4A0
.text:10040E19                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040E1E                 push    offset aSd      ; "SD"
.text:10040E23                 mov     ecx, offset unk_100CE4A0
.text:10040E28                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040E2D                 push    offset aHitachi ; "HITACHI"
.text:10040E32                 mov     ecx, offset unk_100CE4A0
.text:10040E37                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040E3C                 push    offset aHp      ; "HP"
.text:10040E41                 mov     ecx, offset unk_100CE4A0
.text:10040E46                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040E4B                 push    offset aIbm     ; "IBM"
.text:10040E50                 mov     ecx, offset unk_100CE4A0
.text:10040E55                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040E5A                 push    offset aStorage ; "Storage"
.text:10040E5F                 mov     ecx, offset unk_100CE4A0
.text:10040E64                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040E69                 push    offset aLexar   ; "LEXAR"
.text:10040E6E                 mov     ecx, offset unk_100CE4A0
.text:10040E73                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040E78                 push    offset aMaxtor  ; "Maxtor"
.text:10040E7D                 mov     ecx, offset unk_100CE4A0
.text:10040E82                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040E87                 push    offset aCardReader ; "Card Reader"
.text:10040E8C                 mov     ecx, offset unk_100CE4A0
.text:10040E91                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040E96                 push    offset aUsbDrive ; "USB DRIVE"
.text:10040E9B                 mov     ecx, offset unk_100CE4A0
.text:10040EA0                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040EA5                 push    offset aUsbDrive_0 ; "USB Drive"
.text:10040EAA                 mov     ecx, offset unk_100CE4A0
.text:10040EAF                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040EB4                 push    offset aCanon   ; "Canon"
.text:10040EB9                 mov     ecx, offset unk_100CE4A0
.text:10040EBE                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040EC3                 push    offset aEpson   ; "EPSON"
.text:10040EC8                 mov     ecx, offset unk_100CE4A0
.text:10040ECD                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040ED2                 push    offset aCompact ; "Compact"
.text:10040ED7                 mov     ecx, offset unk_100CE4A0
.text:10040EDC                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040EE1                 push    offset aEusb    ; "eUSB"
.text:10040EE6                 mov     ecx, offset unk_100CE4A0
.text:10040EEB                 call    ?AddTail@CStringList@@QAEPAU__POSITION@@PBD@Z ; CStringList::AddTail(char const *)
.text:10040EF0                 mov     dword_100CE500, 1
.text:10040EFA
.text:10040EFA loc_10040EFA:                           ; CODE XREF: sub_10040D80+25j
.text:10040EFA                 mov     esi, dword_100CE4A4
.text:10040F00                 cmp     esi, edi
.text:10040F02                 jz      short loc_10040F54
.text:10040F04
.text:10040F04 loc_10040F04:                           ; CODE XREF: sub_10040D80+1BDj
.text:10040F04                 mov     eax, esi
.text:10040F06                 mov     esi, [esi]
.text:10040F08                 add     eax, 8
.text:10040F0B                 lea     ecx, [esp+18h+var_10]
.text:10040F0F                 push    eax
.text:10040F10                 call    ??0CString@@QAE@ABV0@@Z ; CString::CString(CString const &)
.text:10040F15                 mov     eax, [esp+18h+var_10]
.text:10040F19                 lea     ecx, [esp+18h+arg_0]
.text:10040F1D                 push    eax
.text:10040F1E                 mov     byte ptr [esp+1Ch+var_4], 1
.text:10040F23                 call    ?Find@CString@@QBEHPBD@Z ; CString::Find(char const *)
.text:10040F28                 cmp     eax, 0FFFFFFFFh
.text:10040F2B                 jnz     short loc_10040F41
.text:10040F2D                 lea     ecx, [esp+18h+var_10]
.text:10040F31                 mov     byte ptr [esp+18h+var_4], 0
.text:10040F36                 call    ??1CString@@QAE@XZ ; CString::~CString(void)
.text:10040F3B                 cmp     esi, edi
.text:10040F3D                 jnz     short loc_10040F04
.text:10040F3F                 jmp     short loc_10040F54
.text:10040F41 ; ---------------------------------------------------------------------------
.text:10040F41
.text:10040F41 loc_10040F41:                           ; CODE XREF: sub_10040D80+1ABj
.text:10040F41                 lea     ecx, [esp+18h+var_10]
.text:10040F45                 mov     edi, 1
.text:10040F4A                 mov     byte ptr [esp+18h+var_4], 0
.text:10040F4F                 call    ??1CString@@QAE@XZ ; CString::~CString(void)
.text:10040F54
.text:10040F54 loc_10040F54:                           ; CODE XREF: sub_10040D80+182j
.text:10040F54                                         ; sub_10040D80+1BFj
.text:10040F54                 lea     ecx, [esp+18h+arg_0]
.text:10040F58                 mov     [esp+18h+var_4], 0FFFFFFFFh
.text:10040F60                 call    ??1CString@@QAE@XZ ; CString::~CString(void)
.text:10040F65                 mov     ecx, [esp+18h+var_C]
.text:10040F69                 mov     eax, edi
.text:10040F6B                 pop     edi
.text:10040F6C                 pop     esi
.text:10040F6D                 mov     large fs:0, ecx
.text:10040F74                 add     esp, 10h
.text:10040F77                 retn
.text:10040F77 sub_10040D80    endp
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: jlv on May 22, 2008, 04:03:51 am
I didn't include the whole list of strings. There are a number of specific disk models listed (like the "Fujitsu MHT2020AT"), followed by what would obviously be USB device names.  After that looks like the list of excluded drive vendors.

Yes, it become clear from sbingner's disassembly that this is what it is.  Thanks!

Quote
(BTW I tried to add Western Digital or WDC to see if it had any effect, but all it did was corrupt the dll.  Again, I don't know what I am doing anyway.)
If you want that to work, make sure leave a valid set of NUL terminators.  These strings are packed in the DLL's data segment, and they are padded to 8 bytes.  That's why 'SONY' has four NULs (0x00 or ^@) after it, while 'Generic' has only 1 NUL.  If you really want to try your test, try changing 'Storage' to Western' or 'IBM' to 'WDC'.  That makes it so you don't have to add/remove NULs.

(if you use VIM, make sure to do a ":set binary" before writing the file).
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: sbingner on May 22, 2008, 09:52:06 am
If you're trying to MAKE it work by adding it, I would suggest replacing one of the TOP strings, maybe one of the Fijitsu ones...

The lower ones it had to be removed for it to work, so I wouldn't expect changing "Storage" to "Western" or "IBM" to "WDC" would help
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: jlv on May 22, 2008, 12:59:46 pm
I thought he was trying to see if it would stop working...
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: markbowen on May 22, 2008, 01:59:02 pm
Yes, trying to make it work.  I know it should be one of the top strings, but don't know how to do it without screwing up other values.  Whatever, I don't think this dll is the root of the problem with the WD 250, other WD drives work fine.  Just wishful thinkin'...
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: sbingner on May 23, 2008, 02:32:24 am
you can use xvi32 to edit it - you can find it on google easily
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: jlv on May 25, 2008, 04:45:17 pm
Yes, trying to make it work.  I know it should be one of the top strings, but don't know how to do it without screwing up other values.  Whatever, I don't think this dll is the root of the problem with the WD 250, other WD drives work fine.  Just wishful thinkin'...
If you mean this problem:
Update for anyone else who might be interested in using a 250GB DMS:
...
3.92 gives the "error retrieving DMS ID" that also happens with some other drives, and just won't work.
...
3.76 seems to work at first, but then I get write delay errors and the phtsys partition disappears.
I would guess that the first problem could be overcome by the right change in this dll, but the later problem you still need to resolve. (did the update to the tools help?)

What is the model id string that is returned for the drive? I.e., from Device manager->Disk Drives.  I'm guessing it's something like "WDC WD2500BEVE-00WZT0".  If so, you would change the DLL like this:

Code: [Select]
Toshiba MK6021GAS...TOSHIBA MK6021GAS...Toshiba MK6015MAP...
Toshiba MK6021GAS...WDC WD2500BEVE-00WZT0.shiba MK6015MAP...
Where the .'s represent NUL characters.  Notice that this eats into the next string (to the code, the actual next string would become '0', which shouldn't matter).  The key thing is to keep the exact same overall length -thus, 3 NULs become just one, and you overwrite the next string.

In VIM (where a NUL is shown as a ^@ and entered by hitting either Ctrl-Q Ctrl-2 or Ctrl-V Ctrl-2) this would look like:
Code: [Select]
Toshiba MK6021GAS^@^@^@TOSHIBA MK6021GAS^@^@^@Toshiba MK6015MAP^@^@^@
Toshiba MK6021GAS^@^@^@WDC WD2500BEVE-00WZT0^@shiba MK6015MAP^@^@^@

But I also see that there is no exclusion entry for WD (or WDC) at all, so I wonder why it doesn't just work.
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: jg123 on July 04, 2008, 02:34:39 am
Can you post the modified dll? Good find!

Edit: Used VIM to change SAMSUNG to XAMSUNG and all is well. Love being able to modify the voice prompts in PMM.
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: kapper on August 06, 2008, 05:18:23 am
WOW!

I have a SAMSUNG 120GB Drive and had to use 3.76, but wished I could use 3.92

Using your info and absolutely no idea what I was doing...well maybe a little

I found and downloaded a VIM editor (had no idea what it was or how to use it)

Installed PMM 3.92 and before reboot...

Found the DeviceDMS.dll in the phatnoise program file and opened it with the VIM editor

Scrolled down about 95% of the way and found SAMSUNG...changed it to XAMSUNG (had to copy a capital "X" from my notepad, highlighted the "S" and then Pasted the "X" over it and then saved the change...didn't know how to change it otherwise since reading instructions takes too much time for me)

Rebooted and ran PMM 3.92 and then added the 120GB DMS storage unit and it worked like a charm

THANK YOU!!!

Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: Steveo369 on December 06, 2009, 03:13:24 am
I would like to indicate that the Hex Editing as mentioned above worked for me.  I was having the same error after hacking my Audi A4 Phatbox today.  The hack applied correctly to the PB, and I then removed my original 20GB drive from the cartridge and replaced it with a 40gb drive.

After formatting the new drive using DMS HackTools v2.12, the drive would not be recognized by Phatnoise Media Manager v3.92.  I would get the Error Retrieving Disk ID.  My new 40gb drive was a Hitachi, while the original 20gb drive was a Fujitsu.

I was able to use Hex Workshop to search for and replace the string "HITACHI" with "XITACHI" in the DeviceDMS.dll on two different PMediaA v3.92 installations, and they will both now recognize and load files to the new 40gb drive. 
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: zoltar on January 21, 2010, 04:48:57 pm
Well, this hack didn't work for me.  :(
I have to add that everything was working fine; my setup is a 120 Samsung and PMM 3.92 with USB 1 cradle.

So it was OK, but slow as hell. I decided to buy a USB 2 external housing and put my hard drive into that for large updates and use the slow one for small changes.

Then started this drive ID problem.
I thought easy; just change to XASMSUNG. -> No joy.
OK, found a list of USB storage adapter ID's in the DLL. Changed one of them to match mine. Didn't work. (but it does check the number. I erased my device id USB\VID_05AB&PID_0031, then tried the original cradle and PMM started with the drive ID problem)

I could use PMM 3.7, but it doesn't support AAC and the dynamic playlist creation is not working well.
Ended up using PMM 3.7 for just coping all the MP3 files to the DMS with USB 2. Install 3.92 and use USB 1 to fix playlists and copy the missing AAC files.

Anyone has a USB 2 cradle for sale in Europe?
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: Terry_Kennedy on January 21, 2010, 06:08:46 pm
Well, this hack didn't work for me.  :(

That's odd. I tried it with the forthcoming PhatHack Cradle and reported on it over here (http://forum.phathack.com/index.php/topic,2383.msg14483.html#msg14483).
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: zoltar on January 22, 2010, 03:39:48 pm
I guess it's just bad luck picking the Samsung drive and this Chieftech enclosure.
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: Death_Box on February 14, 2010, 04:30:14 pm
Thank you so much for the tip. Really a good community.
It'll be better in French for me  ;D. But  sometimes my son helps me when the post is too difficult to understand.
But never to write... :-[
bonne chance
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: hildeand on April 03, 2010, 03:30:18 pm
Hi, I have a Fujitsu 80 GB original PhatNoise drive that no longer gets detected by PMM 3.92 (but does by Phatnoise Music Manager). I have been looking at this thread and seeing if it applies to my problem, but the Fujitsu drives seem to be on the inclusion part of the dll list? I also tried a few dll editors, but I could not make heads or tales out of it, let alone find the drive entries and change them...

Anyone who had this issue with a Fujitsu drive and could offer some advice?

Hilde
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: Terry_Kennedy on April 04, 2010, 09:21:37 pm
Hi, I have a Fujitsu 80 GB original PhatNoise drive that no longer gets detected by PMM 3.92 (but does by Phatnoise Music Manager).

That's odd - I can't see them blacklisting their own drives.

It could also be from an unrecognized cradle. Are you using a real PhatNoise cradle? What, exactly, does it say on the bottom? Under which OS? And, did you need to install any drivers to make the cradle work?
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: hildeand on April 05, 2010, 07:20:49 am
I also find it strange - it does happen to two of their own, native drives as well as a hacked 160 GB drive. I run XP (in Parallels on a Mac system), using PMM 3.92, USB 2 cradle with no specific drivers installed. This has worked without problems before, but now I get the following message "Error retrieving DMS drive id" followed by something along the lines of "One or more files on the drive could be open (antivirus, explorer, etc. please make sure all files are closed".

Hilde
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: Terry_Kennedy on April 05, 2010, 07:39:48 am
I run XP (in Parallels on a Mac system), using PMM 3.92, USB 2 cradle with no specific drivers installed.

Have you upgraded either MacOS or Parallels since it worked reliably? Media Manager 3.92 checks both the USB vendor/product string and the disk drive IDENTIFY data.

Can you go into Device Manager (right-click My Computer, select Properties, Hardware tab, Device Manager button), double-click on the device, select Details, select Hardware IDs from the drop-down list, and post what you see here?

Likewise for the displayed name (in Device Manager) of the hard drive?

I posted a list of the supported USB IDs as well as the supported and blacklisted drive list over here (http://forum.phathack.com/index.php/topic,2407.msg14505.html#msg14505).
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: hildeand on April 08, 2010, 05:11:10 pm
Hi, thanks for trying to help with this!

I really cannot say when I last used PMM 3.92 and it worked, as I have used PhatMac for quite some time. It's only after I realize that PhatMac seems to mess up the DMS database and thus give poor library browsing performance that I have tried to see if using PMM would help. Thus, it is quite possible, in fact I am quite certain, that both Parallels and OS X have been updated since I can say for sure PMM worked with the DMS...

Anyway, I've checked Device Manager, and I attach two screen captures of the hardware id and device name. For sure, this is a supported drive as it is the orginal 20 GB DMS that came with my Audi PB years ago, so something is making PMM identify it as a "disk non-grata"...

If you can make something out of the screen shots, I'd appreciate any input!

Bjorn
Title: SOme more insight on a Mac
Post by: hildeand on April 17, 2010, 08:58:37 am
Hi,

Suddenly, Mac OS X is in a good mood and detects the DMSs using the cradle (as opposed to a USB caddy). And now the drives are identified by PMM 3.92!

I even tested running the exact same DMS through the USB caddy and then there is error retrieving the drive id. So it seems somehow being connected to Windows through the USB caddy causes this on my system.

Hilde
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: lee on July 09, 2010, 11:20:49 pm
Thanks for the hint. Almost one year with no access due this problem, I solved today. Open the DeviceDMS.DLL, use a Hex editor (find xvi32 on Google), open the file, search for SAMSUNG and change the S to X (will be XAMSUNG). Save and restart the PMM.

:)
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: amb on September 20, 2010, 12:50:31 am
To chime in on this thread.  I just got a WDC WD3200BEVE-00A0HT0 320GB drive to try.  So far I've run into several roadblocks on Windows XP Pro SP3 (didn't try Windows 7 yet, but I expect worse).

1. When installed in the DMS cartridge and using the Phatnoise USB 2.0 cradle, I was able to use DMS Tools 2.14 to initialize the drive and the PHTSYS/PHTDTA partitions (took a long time to format the PHTDTA!).
2. Phatnoise Media Manager 3.92 doesn't work with it -- it complains "An unknown error occurred while accessing G:\CurrentSetup.xml." (but the file is there and appears to be good).
3. Changed to using a USB-IDE adapter instead of the DMS and cradle, PMM 3.92 says "Error retrieving DMS drive id".  After clicking OK, the drive shows up in PMM as a generic USB drive instead of a DMS.
4. I backed up a copy of the DeviceDMS.dll and used a hex editor on it, but can't find any strings matching "WDC" at all.  Nevertheless I added this drive's ID into the data per jlv's post above (http://forum.phathack.com/index.php/topic,1581.msg10389.html#msg10389), but it didn't make any difference.  According to the discussions in this thread I shouldn't have to do this anyway.

Does anyone have PMM 3.92 working on Windows XP with a WD3200BEVE drive (for WD2500BEVE, for that matter)?  What did you have to do to make it work?  I really don't want to downgrade to PMM 3.76...
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: VorTechS on September 20, 2010, 07:05:09 am
2. Phatnoise Media Manager 3.92 doesn't work with it -- it complains "An unknown error occurred while accessing G:\CurrentSetup.xml." (but the file is there and appears to be good).

CurrentSetup.xml might have been generated by the DMS tools, which is an XML node fragment from the file host on the PhatHack.com servers for the firmware download.  Unfortunately we had to generate this file from what little knowledge we had of it, and therefore it's not likely to be exactly what PhatNoise MM expects of it.
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: amb on September 20, 2010, 09:29:18 am
CurrentSetup.xml might have been generated by the DMS tools, which is an XML node fragment from the file host on the PhatHack.com servers for the firmware download.  Unfortunately we had to generate this file from what little knowledge we had of it, and therefore it's not likely to be exactly what PhatNoise MM expects of it.
Actually, my CurrentSetup.xml is not the one that DMS Tools generated.  I overwrote that file and the *.ini files with copies from my old 80GB DMS.  I also copied the entire contents of the my DMS' PHTDTA partition to the new 320GB drive.

The new drive (in the DMS shell) actually works fine in my hacked Audi Phatbox.  I was pleasantly surprised.  I just can't get PMM 3.92 to work with it on the PC (WinXP Pro SP3), either with the PN USB 2.0 cradle or with the USB-IDE adapter.  Obviously the way I set it up is not a real solution because I have to sync new music to the old 80GB DMS first and then manually copy a bunch of files from there to the 320GB drive, which is not only a big hassle, but it also prevents me from using more than 80GB of the 320GB drive.

So, I'm still looking for a solution to make the new drive work with PMM 3.92.  Is there something else I should patch in DeviceDMS.dll?
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: Terry_Kennedy on September 20, 2010, 10:06:07 am
So, I'm still looking for a solution to make the new drive work with PMM 3.92.  Is there something else I should patch in DeviceDMS.dll?

The code in DeviceDMS.dll first looks for a supported USB adapter type. If it finds a supported adapter, it then checks the drive vendor/model info against a list of known supported and known blacklisted drives, and also apparently anything else is allowed. There's some info on this in a post I made over here (http://forum.phathack.com/index.php/topic,2407.msg14505.html#msg14505).

If you patch the DLL with the USB Vendor/Product ID's of your particular adapter (just replace one of the 4 entries in the table), then the drive should work, as long as it isn't in the blacklist. Note that most modern USB/IDE adapters use the USBSTOR\GenDisk framework, so things like "Generic" in the blacklist may be tripping you up. I'd suggest changing all of the blacklist strings by replacing any 2 characters in each entry with "XX" - so "Generic" would become "XXneric" and so forth. That should get you going just fine with an outboard USB/IDE adapter. Getting it to work in the DMS cradle will be a bit more problematic - if the DLL patched as I described above doesn't work, you likely have some sort of timing issue with the cradle's on-board firmware, and you should wait (and wait...) for my replacement cradle boards (which I'll be getting back to in the winter once racing season is over). I'll be shipping those boards with a modified DeviceDMS.dll that allows everything.
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: amb on September 20, 2010, 12:17:30 pm
Thanks Terry, my USB-IDE adapter shows up as USB\VID_05E3&PID_0718 in device manager, so I patched the 4th entry in the table from USB\VID_05AB&PID_0031 to the new ID, and XX-out all the entries in the blacklist as you suggested.

Unfortunately, PMM 3.92 still throws "Error retrieving DMS drive id".  :(

Here is a screen shot of my Device Manager > Universal Serial Bus controllers > USB Mass Storage device > Details window:

(http://www.amb.org/ti/audio/phatnoise/usb_mass_storage.png)

Here is a screenshot of XVI32 at the patched USB vendor/product IDs:

(http://www.amb.org/ti/audio/phatnoise/DeviceDMS_patch1.png)

Here is where the blacklist entries are XX'ed out:

(http://www.amb.org/ti/audio/phatnoise/DeviceDMS_patch2.png)

Is there something I'm doing wrong?  Any ideas why this is not enough to make PMM 3.92 work?
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: Terry_Kennedy on September 21, 2010, 03:25:05 am
Is there something I'm doing wrong?  Any ideas why this is not enough to make PMM 3.92 work?

Sorry, I'm still using the old Music Manager 2.35. Maybe somebody else can help?
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: amb on September 21, 2010, 07:39:13 am
Alright, hope someone else have a clue as to what's going on.
Anyway, I found a file "CradleError.txt" on the new DMS' PHTDTA partition that wasn't there before.  Its content is the string:

"Failed getIdentify.  @err = 50"

I think this file was probably created by PMM 3.92, and is related to the "Error retrieving DMA drive id" problem.  Maybe this is useful info to help figure this out?
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: InterMurph on November 14, 2010, 04:19:15 am
This hack just worked for me!  I have a Samsung drive, and I used XVI32 to edit SAMSUNG and Samsung to XAMSUNG and Xamsung, and it now works.

Thanks!
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: rhn on February 11, 2011, 03:44:36 am
Thanks jlv!

Worked like a charm for my 160GB SAMSUNG ahem...XAMSUNG drive.

One happy guy here

Rick
Title: Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
Post by: fayraz on August 25, 2012, 03:47:43 pm
I have got 3.92 installed apart from a registry error everything seems to be working OK but when I plug in my DMS it comes up with Error retreiving...., I have not hacked the drive just using a standard 20GB original drive, do I still need to make hex changes?