[Bug 8653] Desperados v1.01 fails to start, reports 'ADPCM sound codec is missing' (Wine's MS-ADPCM needs to report as Pid = 1, Mid = 33)

wine-bugs at winehq.org wine-bugs at winehq.org
Sat May 23 07:28:46 CDT 2015


https://bugs.winehq.org/show_bug.cgi?id=8653

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |focht at gmx.net
            Summary|Desperados v1.01 won't run: |Desperados v1.01 fails to
                   |ADPCM sound codec is        |start, reports 'ADPCM sound
                   |missing                     |codec is missing' (Wine's
                   |                            |MS-ADPCM needs to report as
                   |                            |Pid = 1, Mid = 33)

--- Comment #28 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

a user in #winehq asked about this.

Unfortunately comment #24 didn't provide the required detail to help people
further here.

Multiple solutions (could have been solved many years ago).

--- snip ---
...
0031:Call msacm32.acmDriverEnum(00401060,00000000,c0000000) ret=0040101f
0031:Call msacm32.acmDriverDetailsA(006a0138,0033f684,00000000) ret=00401083 
...
0031:Ret  msacm32.acmDriverDetailsA() retval=00000000 ret=00401083
0031:Ret  msacm32.acmDriverEnum() retval=00000000 ret=0040101f
0031:Call user32.MessageBoxA(00000000,00682d60 "ADPCM sound codec is missing
!\n Please install it and restart Desperados.",00682dac "Fatal error",00000010)
ret=0059ff50
0031:Call
winex11.drv.GetDC(0006002a,00010020,00010020,0033f398,0033f388,00000013)
ret=7ec9acf0
--- snip ---

The code in question, a filter in application supplied callback:

--- snip ---
00401060  81EC 98030000        SUB ESP,398
00401066  56                   PUSH ESI
00401067  8BB424 A0030000      MOV ESI,DWORD PTR SS:[ESP+3A0]
0040106E  6A 00                PUSH 0
00401070  8D4424 08            LEA EAX,DWORD PTR SS:[ESP+8]
00401074  50                   PUSH EAX
00401075  56                   PUSH ESI
00401076  C74424 10 98030000   MOV DWORD PTR SS:[ESP+10],398
0040107E  E8 BB4B1A00          CALL <JMP.&MSACM32.acmDriverDetailsA>
00401083  85C0                 TEST EAX,EAX
00401085  75 31                JNZ SHORT game.004010B8
00401087  B8 01000000          MOV EAX,1
0040108C  66:394424 10         CMP WORD PTR SS:[ESP+10],AX ; wPid
00401091  75 27                JNZ SHORT game.004010BA
00401093  66:837C24 12 21      CMP WORD PTR SS:[ESP+12],21 ; wMid
00401099  75 1F                JNZ SHORT game.004010BA
0040109B  F78424 A8030000 ...  TEST DWORD PTR SS:[ESP+3A8],80000000
004010A6  A2 65166900          MOV BYTE PTR DS:[691665],AL
004010AB  8935 60166900        MOV DWORD PTR DS:[691660],ESI
004010B1  75 05                JNZ SHORT game.004010B8
004010B3  A2 64166900          MOV BYTE PTR DS:[691664],AL
004010B8  33C0                 XOR EAX,EAX
004010BA  5E                   POP ESI
004010BB  81C4 98030000        ADD ESP,398
004010C1  C2 0C00              RETN 0C
--- snip ---

Wine source:
https://source.winehq.org/git/wine.git/blob/5e7416e5c8610dd362af2d8934ded3d63fcbb1d3:/dlls/msadp32.acm/msadp32.c#l371

Another option is to apply a 1-byte patch to the executable without the need to
modify/rebuild Wine (cond -> uncond. jmp). The exact location depends on the
game flavour/version though.

$ wine --version
wine-1.7.43-123-g90ed96a

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list