User:Kram~enwiki/Sandbox

Ecstatica II
I had a lot of fun playing Ecstatica 2 in days gone by, so I was pleased (ecstatic?) to find that it runs fine under Microsoft Vista. I was not quite so pleased to find that there is no music available. Having scoured the web for a fix to this problem (DosBox works, but I had some random program hangs/crashes, YMMV), I resorted to fixing it myself.

In short, the problem is with the MIDI support in Vista (possibly XP too, but I haven't tried it there) which has changed since windows 95/98. In geek talk, Ecstatica 2 enumerates the MIDI device capabilities using midiOutGetDevCapsA but discards any device with (wTechnology&1) set (MOD_MIDIPORT), thus excluding pass-through devices. Unfortunately Vista returns wTechnology==7 (MOD_SWSYNTH) which is also discarded as (wTechnology&1) is set. So a simple (crude) fix is to bypass the test which is achieved by patching the executable replacing the instruction "test dh,1" with "test dh,0".

Given the vagueries of finding reliable, free web hosting, I am not going to supply a patch online. But I will supply some instructions for you to roll your own :-) You will need a hex editor (of which there are many) and (optionally) MD5 which you can get from http://www.fourmilab.ch/md5/

Locate the folder in which Ecstatica 2 is installed, typically "C:\Program Files\Ecstatica II" and check the date for the file e2win95.exe - if its 21-May-1997 then you're in luck. From a command window, run "md5 e2win95.exe", you should get a signature of 88B5D0A3634BF6BBE2A8FCB8594C3E91. If you don't then do not attempt to patch it, as its not the same as my version. Using your favourite hex editor, change the byte at address 0004994B from 01 to 00 (you will probably need to change the file permissions on e2win95.exe first - right click on it Properties/Security/Edit and change Users to Full Control). Then re-check the MD5 signature which should now be 4D6B7C555A5D1D22C62CDD6933BEA87F. Voila, music should now work (otherwise you can restore the original e2win95.exe from the CD-ROM).

I'm not going to link from Ecstatica II to here as it probably violates WP:OR and I don't want to get a ticket. Perhaps I'll put a note on the talk page though.