Author Topic: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem  (Read 22845 times)

0 Members and 1 Guest are viewing this topic.

Offline jlv

  • A few posts under my belt.
  • *
  • Posts: 21
I originally posted this solution in the original thread where I did some investigation, 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

Offline VorTechS

  • Administrator
  • Veteran.
  • *****
  • Posts: 1651
  • PhatHack Media Manager & DMS Tools Wizard Author
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!
Kenwood KDC-W7031 | Kenwood KHD-CX910 | 250GB DMS | PhatHack Media Manager v1.1.4 (Alpha) | VIOT

Catch me weekdays 8am-4pm GMT on IRC @ irc.freenode.net on channel #phathack (aka the chat link!!)

Offline sbingner

  • Administrator
  • Veteran.
  • *****
  • Posts: 1299
That seems backwards... you're saying if it IS in the list it doesn't work?

Offline markbowen

  • Global Moderator
  • Veteran.
  • *****
  • Posts: 438
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....)
Kenwood DNX7200/Kenwood KHD-C710 Keg/320GB DMS

Offline VorTechS

  • Administrator
  • Veteran.
  • *****
  • Posts: 1651
  • PhatHack Media Manager & DMS Tools Wizard Author
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.
Kenwood KDC-W7031 | Kenwood KHD-CX910 | 250GB DMS | PhatHack Media Manager v1.1.4 (Alpha) | VIOT

Catch me weekdays 8am-4pm GMT on IRC @ irc.freenode.net on channel #phathack (aka the chat link!!)

Offline sbingner

  • Administrator
  • Veteran.
  • *****
  • Posts: 1299
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...

Offline VorTechS

  • Administrator
  • Veteran.
  • *****
  • Posts: 1651
  • PhatHack Media Manager & DMS Tools Wizard Author
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...
Kenwood KDC-W7031 | Kenwood KHD-CX910 | 250GB DMS | PhatHack Media Manager v1.1.4 (Alpha) | VIOT

Catch me weekdays 8am-4pm GMT on IRC @ irc.freenode.net on channel #phathack (aka the chat link!!)

Offline markbowen

  • Global Moderator
  • Veteran.
  • *****
  • Posts: 438
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.)
Kenwood DNX7200/Kenwood KHD-C710 Keg/320GB DMS

Offline sbingner

  • Administrator
  • Veteran.
  • *****
  • Posts: 1299
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
« Last Edit: May 21, 2008, 11:38:55 pm by sbingner »

Offline jlv

  • A few posts under my belt.
  • *
  • Posts: 21
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).

Offline sbingner

  • Administrator
  • Veteran.
  • *****
  • Posts: 1299
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

Offline jlv

  • A few posts under my belt.
  • *
  • Posts: 21
I thought he was trying to see if it would stop working...

Offline markbowen

  • Global Moderator
  • Veteran.
  • *****
  • Posts: 438
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'...
Kenwood DNX7200/Kenwood KHD-C710 Keg/320GB DMS

Offline sbingner

  • Administrator
  • Veteran.
  • *****
  • Posts: 1299
you can use xvi32 to edit it - you can find it on google easily

Offline jlv

  • A few posts under my belt.
  • *
  • Posts: 21
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.

Offline jg123

  • Newbie
  • Posts: 14
  • I love my Keg!
Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
« Reply #15 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.
« Last Edit: July 19, 2008, 03:42:28 pm by jg123 »

Offline kapper

  • Newbie
  • Posts: 3
Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
« Reply #16 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!!!


Offline Steveo369

  • A few posts under my belt.
  • *
  • Posts: 22
Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
« Reply #17 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. 

Offline zoltar

  • A few posts under my belt.
  • *
  • Posts: 15
Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
« Reply #18 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?

Offline Terry_Kennedy

  • Moderator
  • Veteran.
  • *****
  • Posts: 249
  • There and back again
Re: Hack to fix the "Error retrieving DMS drive id" with PMM 3.92 problem
« Reply #19 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.