VOGONS


New DirectMusic breakage in Windows 11

Topic actions

First post, by UCyborg

User metadata
Rank Oldbie
Rank
Oldbie

So back when Windows Vista was released, we realized DirectMusic scripting functionality was completely broken, which the game Unreal II: Awakening heavily depends on. From my limited testing, it was enough to just put the old dmscript.dll from Windows XP in its place. Full set of DLLs was posted back then, eg. https://greatemerald.eu/blog/solving-the-unre … i-intro-problem.

This new problem is even more interesting at it seems to have started at some point with Windows 11 and effects Drakan: Order of the Flame, where it breaks only specific tracks (menu music, the one that starts playing when you gain control of the character for the first time...). I don't know much about this game's music implementation, only that the music is stored in custom Music.rrc file and that from level editing tools, you specify the index which track you want to play, so pretty much like specifying track number for a CD player to play.

It seems only putting XP's dmusic.dll restores the missing tracks. Unsure how wise it is in general to mix DLLs in this case, so old dmsuic.dll and newer remaining DLLs, it doesn't crash and on one hand, you would think newer one would be better suited for a new OS, on another, parts of newer ones are definitely broken and fail to provide expected functionality, even though they're generally larger in size than XP ones.

You definitely can't use eg. Win10 20H2's dmusic.dll on Win11 23H2 or even Win7's dmusic.dll. I suspect it depends on some lower level APIs on NT 6.0+ systems (possibly related to sound) while the old one might always be using higher-level ones (from modern Windows' point of view).

I didn't dig deep into the matter, I'm a bit rusty anyway and analyzing Microsoft's DLLs is challenging as it is, I just noticed one of the support DirectMusic DLLs, so one that isn't dmusic.dll returned E_NOINTERFACE error code at some point and the game got back another code, which according to internal game's function linking error codes to human readable messages says "The method succeeded, but there was nothing to do.". Some error, huh? 😁

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.

Reply 1 of 26, by KainXVIII

User metadata
Rank Oldbie
Rank
Oldbie

Can i use this fix in Windows 10 (22H2)? Because i don't have music in Drakan on win10 too (except for one track)

Reply 2 of 26, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t

E NOINTERFACE seems like something I have seen with an unavailable ({EE123....-65ABH..} type thing) in the registry

previously known as Discrete_BOB_058

Reply 3 of 26, by KainXVIII

User metadata
Rank Oldbie
Rank
Oldbie

Anyway, i tried to run DM_FIX.cmd as admin and seems like its doesn't do the job, so you need to install dll manually and i'm too lazy for that.
PS - seems like some of the commands in *.cmd file (like cacls) are deprecated, so this fix need its own fix 🤣

Reply 4 of 26, by UCyborg

User metadata
Rank Oldbie
Rank
Oldbie

I didn't use anything from that ZIP specifically, I took DLL from my XP install, renamed original DLL in SysWOW64 and put the old one in its place. I like it manually so can't blame the script if something goes wrong. 😀

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.

Reply 5 of 26, by KainXVIII

User metadata
Rank Oldbie
Rank
Oldbie
UCyborg wrote on 2025-05-12, 13:11:

I didn't use anything from that ZIP specifically, I took DLL from my XP install, renamed original DLL in SysWOW64 and put the old one in its place. I like it manually so can't blame the script if something goes wrong. 😀

So you can just rename DLLs in System32/SysWoW64 folders and copy the old dmusic.dll? Oof, i wasted my time with takeown, icacls and then regsvr32 commands to replace it 🤣. But at least Drakan music is working now! (not that its particularly memorable but better than ambient sounds only)

Reply 6 of 26, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t

I recall there was a DMusic based MIDI synthesis too, how well does it work?

I recall using the DMusic method in Test Drive 6. Or was I mistaken?

KainXVIII wrote on 2025-05-12, 13:35:
UCyborg wrote on 2025-05-12, 13:11:

I didn't use anything from that ZIP specifically, I took DLL from my XP install, renamed original DLL in SysWOW64 and put the old one in its place. I like it manually so can't blame the script if something goes wrong. 😀

So you can just rename DLLs in System32/SysWoW64 folders and copy the old dmusic.dll? Oof, i wasted my time with takeown, icacls and then regsvr32 commands to replace it 🤣. But at least Drakan music is working now! (not that its particularly memorable but better than ambient sounds only)

A local dmusic dll doesn't work?

previously known as Discrete_BOB_058

Reply 7 of 26, by KainXVIII

User metadata
Rank Oldbie
Rank
Oldbie
BEEN_Nath_58 wrote on 2025-05-12, 13:37:
I recall there was a DMusic based MIDI synthesis too, how well does it work? […]
Show full quote

I recall there was a DMusic based MIDI synthesis too, how well does it work?

I recall using the DMusic method in Test Drive 6. Or was I mistaken?

KainXVIII wrote on 2025-05-12, 13:35:
UCyborg wrote on 2025-05-12, 13:11:

I didn't use anything from that ZIP specifically, I took DLL from my XP install, renamed original DLL in SysWOW64 and put the old one in its place. I like it manually so can't blame the script if something goes wrong. 😀

So you can just rename DLLs in System32/SysWoW64 folders and copy the old dmusic.dll? Oof, i wasted my time with takeown, icacls and then regsvr32 commands to replace it 🤣. But at least Drakan music is working now! (not that its particularly memorable but better than ambient sounds only)

A local dmusic dll doesn't work?

If you mean copying proper dmusic.dll to the game folder - then no.

Reply 8 of 26, by UCyborg

User metadata
Rank Oldbie
Rank
Oldbie

No idea about MIDI part, but default port acceleration on Windows XP with Sound Blaster Audigy Rx also makes music in Drakan not play.

@KainXVIII
You can either temporarily take ownership to be able to rename the DLL or launch CMD as TrustedInstaller (System Informer makes latter a breeze) and rename DLL from there.

Maybe you could have local dmusic.dll if you know what specific registry entries to add for COM registration, similarly that was described for DirectSound here.

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.

Reply 9 of 26, by KainXVIII

User metadata
Rank Oldbie
Rank
Oldbie
UCyborg wrote on 2025-05-12, 13:44:
No idea about MIDI part, but default port acceleration on Windows XP with Sound Blaster Audigy Rx also makes music in Drakan not […]
Show full quote

No idea about MIDI part, but default port acceleration on Windows XP with Sound Blaster Audigy Rx also makes music in Drakan not play.

@KainXVIII
You can either temporarily take ownership to be able to rename the DLL or launch CMD as TrustedInstaller (System Informer makes latter a breeze) and rename DLL from there.

Maybe you could have local dmusic.dll if you know what specific registry entries to add for COM registration, similarly that was described for DirectSound here.

Interesting, so there are several ways to fix it? Choose your poison, as they say!

Reply 10 of 26, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t

Interestingly Drakan just crashes on my Win11 on choosing a difficulty level

previously known as Discrete_BOB_058

Reply 11 of 26, by KainXVIII

User metadata
Rank Oldbie
Rank
Oldbie
BEEN_Nath_58 wrote on 2025-05-13, 18:28:

Interestingly Drakan just crashes on my Win11 on choosing a difficulty level

Even with latest unofficial AiO patch?

Reply 12 of 26, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
KainXVIII wrote on 2025-05-13, 18:53:
BEEN_Nath_58 wrote on 2025-05-13, 18:28:

Interestingly Drakan just crashes on my Win11 on choosing a difficulty level

Even with latest unofficial AiO patch?

Didn't use the AiO Patch for this test. The Drakan.exe from the AiO Patch works but I recall I got the original game working as well. Hopefully UCyborg remembers what's the issue

previously known as Discrete_BOB_058

Reply 13 of 26, by UCyborg

User metadata
Rank Oldbie
Rank
Oldbie

Probably with dgVoodoo2? As fair as I understood it tries to dump menu background to DirectDraw surface where it specifies the surface is a mipmap and the related DirectDraw surface creation call fails because surface's width and height are not sized power-of-2, but the same as used resolution. Why this ever worked at all?

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.

Reply 14 of 26, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
UCyborg wrote on 2025-05-13, 23:06:

DirectDraw surface creation call fails because surface's width and height are not sized power-of-2, but the same as used resolution. Why this ever worked at all?

That's correct, that setting allows the game to run.

As much I understood, earlier Direct3D specification didn't specify texture specifications and hence could be created with anything, probably it was DX7 that mandated power of 2 textures

UCyborg wrote on 2024-01-01, 10:04:
This new problem is even more interesting at it seems to have started at some point with Windows 11 and effects Drakan: Order of […]
Show full quote

This new problem is even more interesting at it seems to have started at some point with Windows 11 and effects Drakan: Order of the Flame, where it breaks only specific tracks (menu music, the one that starts playing when you gain control of the character for the first time...). I don't know much about this game's music implementation, only that the music is stored in custom Music.rrc file and that from level editing tools, you specify the index which track you want to play, so pretty much like specifying track number for a CD player to play.

It seems only putting XP's dmusic.dll restores the missing tracks. Unsure how wise it is in general to mix DLLs in this case, so old dmsuic.dll and newer remaining DLLs, it doesn't crash and on one hand, you would think newer one would be better suited for a new OS, on another, parts of newer ones are definitely broken and fail to provide expected functionality, even though they're generally larger in size than XP ones.

You definitely can't use eg. Win10 20H2's dmusic.dll on Win11 23H2 or even Win7's dmusic.dll. I suspect it depends on some lower level APIs on NT 6.0+ systems (possibly related to sound) while the old one might always be using higher-level ones (from modern Windows' point of view).

I didn't dig deep into the matter, I'm a bit rusty anyway and analyzing Microsoft's DLLs is challenging as it is, I just noticed one of the support DirectMusic DLLs, so one that isn't dmusic.dll returned E_NOINTERFACE error code at some point and the game got back another code, which according to internal game's function linking error codes to human readable messages says "The method succeeded, but there was nothing to do.". Some error, huh? 😁

Can you describe the problem a little more? I can definitely hear main menu and the music after gaining control of character, since I have the DMUSIC patch of U2 already installed. What's the next issue?

previously known as Discrete_BOB_058

Reply 15 of 26, by KainXVIII

User metadata
Rank Oldbie
Rank
Oldbie

Maybe offtop, but there one section in readme to the AiO patch that confuses me:
"-Updated most of the levels' visibility data, with exception of Ruined Village and Volcano (Max Fog Distance at 200% is effective now).
-Tweaked ballista and dragon NPCs to detect player sooner to compensate for larger viewing distance."
If i set max fog distance as 100% (i want to play as devs intended) will enemies still detect me from 200% away or not?

Reply 16 of 26, by UCyborg

User metadata
Rank Oldbie
Rank
Oldbie

@KainXVII
Maybe I went a bit overboard and should clearly separate those parts. If I remember right, they shouldn't detect you from beyond viewable distance, but if you want to be 100%, you can simply skip copying folders Common, Mountain World, Islands World, Volcanic World, Multiplayer, Rift World and leave original files in place.

@BEEN_Nath_58
If I remember right, music menu and the music at the start of first level doesn't play with original DLLs on new Windows. If you went with U2 fix as described on that web site, then you already have old dmusic.dll from XP era, which works. Until this new breakage, I only used dmscript.dll to fix U2, but left other as is, in this case, Drakan would remain broken.

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.

Reply 17 of 26, by KainXVIII

User metadata
Rank Oldbie
Rank
Oldbie
UCyborg wrote on 2025-05-14, 08:39:

@KainXVII
Maybe I went a bit overboard and should clearly separate those parts. If I remember right, they shouldn't detect you from beyond viewable distance, but if you want to be 100%, you can simply skip copying folders Common, Mountain World, Islands World, Volcanic World, Multiplayer, Rift World and leave original files in place.

Nice!

Reply 18 of 26, by crazyc

User metadata
Rank Member
Rank
Member

To make the music work with replacing dmusic.dll just open Music.rrc with a hex editor and replace all instances of INFOLIST with blehLIST (bleh can be anything that doesn't conflict with any other common RIFF chunk name). Dmusic checks for the INFO chunk in the DLS wavetable instrument description to have a valid INAM or ICOP chunk or it errors out. By removing the empty INFO it just skips it.

Reply 19 of 26, by UCyborg

User metadata
Rank Oldbie
Rank
Oldbie

Wait, in which cases is this necessary? I don't have the problem with music playback with old DLL.

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.