ZellSF wrote on 2020-01-28, 20:19:
The second problem was new to me. Whenever the game tried to play a new midi file, it would freeze for a few seconds. This got i […]
The second problem was new to me. Whenever the game tried to play a new midi file, it would freeze for a few seconds. This got infuriating fast. Apparently, it's a known issue with playing midi files through MCI on systems newer than XP, documented here:
The documentation is lacking why Microsoft implemented this delay, but there's instructions on that page on how to remove it. In case the link dies I followed this advice by Phaeron (talking about editing mciseq.dll):
The code that foxyshadis patched is in the LeaveSeq() function whose disassembly is above — so you are looking for a hex pattern of 68 __ __ __ __ FF 15 __ __ __ __ 6A 04 __ __ __ __ C3. Underscores represent bytes that may be different due to a different base address. The 04 should be patched to 00, and then the PE header checksum at 00000130 should be cleared by patching to 00 00 00 00.
Once I did that, Nectaris started playing back midi instantly, without freezing the game for seconds. I actually found this page first:
Indicating that Transport Tycoon Deluxe also has this problem. I have to assume other games have this problem too, but I haven't run into any.
So as I wrote, I've given up on this earlier, despite having given up on getting this working several times earlier, I figured it out easily this time just by googling "mci midi freeze", but for unrelated reasons I googled "nectaris win95" today and found this:
Which has a winmm patcher that fixes the problem in a different way, that's maybe less likely to break on future versions of Windows. And is also probably applicable to other games too.
I obviously didn't specifically look for workarounds for the game specifically earlier, because it's a Japanese game and I can't read Japanese, so I thought that would be rather futile. That page also has fixes for the 16-bit installer and high CPU usage, though neither were issues to me (InstallShield Wrapper works and I don't multitask while gaming).