Heavy Gear 2 CD Audio help needed

Getting old Windows games working.

Heavy Gear 2 CD Audio help needed

Postby SpeedySPCFan » 2017-12-31 @ 16:34

Has anyone ever found a fix for this? Just reinstalled the game to go back to it, and I can't get the music working for the life of me on Windows 7. The IAS Control Panel refuses to play any CD audio in any of its tests, and even after patching every DLL and EXE I could find in the games directory with _INMM, CD audio still won't work. I'm about at my wits end here, any advice?

Specs:
Windows 7 Professional 64-bit
Intel i7 4770k
8GB RAM
GTX 1070
YouTube
SoundCloud
Musician & YouTuber. Currently working on Planet X3 and Necrolepsy.

MIDI modules: Roland MT-32, SC-55 (2.00 ROM), SC-8850, KORG NX5R, Yamaha MU1000EX. PM me if you want any music/soundtracks recorded in 24-bit quality!
User avatar
SpeedySPCFan
Member
 
Posts: 182
Joined: 2014-10-30 @ 20:34

Re: Heavy Gear 2 CD Audio help needed

Postby akula65 » 2017-12-31 @ 21:00

A user in this post indicated that he got it running by using Win95 Compatibility mode:

https://www.vogons.org/viewtopic.php?t=22059&p=163357

Also, a user at GOG.com had the following information on this topic:

'iasinst.exe' in the Setup folder on the HG2 CD needs to be run in Windows 98 compatibility mode to avoid EAR / audio errors (it might be a good idea to set everything on the CD to run in Windows 98 compatibility mode and as an Administrator before you install)


Source: https://www.gog.com/forum/general_archi ... fix/post34

Good luck!
User avatar
akula65
Member
 
Posts: 490
Joined: 2004-9-28 @ 01:29
Location: North Carolina

Re: Heavy Gear 2 CD Audio help needed

Postby SpeedySPCFan » 2017-12-31 @ 22:35

Didn't fix anything, sadly. Compatibility mode does absolutely nothing for me, so in a last ditch effort I just hunted down every version of the IAS installer, tried all of them, and got no music from any of them. I think however the audio driver works just doesn't play nice with modern operating systems.

The only solution I can think of would be to try and get the game running with OpenAL. Apparently the Linux version uses that for audio, which makes me wonder if there's a way to get it in the Windows version... probably not :depressed:
YouTube
SoundCloud
Musician & YouTuber. Currently working on Planet X3 and Necrolepsy.

MIDI modules: Roland MT-32, SC-55 (2.00 ROM), SC-8850, KORG NX5R, Yamaha MU1000EX. PM me if you want any music/soundtracks recorded in 24-bit quality!
User avatar
SpeedySPCFan
Member
 
Posts: 182
Joined: 2014-10-30 @ 20:34

Re: Heavy Gear 2 CD Audio help needed

Postby betamax80 » 2018-1-01 @ 04:50

I have found the IAS files including the main 1.58 API installer applicable to HG2. http://www.vogonsdrivers.com/getfile.ph ... enustate=0

There was a thing in their FAQ about a CD-check issue, particularly with Hitachi DVD drives. They suggest the issue is to do with the drive and a firmware update may or may not fix this - the copy protect is on an area of CD > 650mb.
betamax80
Newbie
 
Posts: 59
Joined: 2016-5-30 @ 22:00

Re: Heavy Gear 2 CD Audio help needed

Postby SpeedySPCFan » 2018-1-01 @ 16:03

betamax80 wrote:I have found the IAS files including the main 1.58 API installer applicable to HG2. http://www.vogonsdrivers.com/getfile.ph ... enustate=0

There was a thing in their FAQ about a CD-check issue, particularly with Hitachi DVD drives. They suggest the issue is to do with the drive and a firmware update may or may not fix this - the copy protect is on an area of CD > 650mb.


Thanks for uploading those, but I already tried all of the iaspkg installers and none of them make the CD audio work. I just emailed the address for the company Dan Bates (one of the creators of IAS) currently works at to see if they can get me in contact with him. I was going to ask him if he still has backups of either Version 1.75 or the earpds_nt.zip file. Probably not going to but hey, it's worth a shot.
YouTube
SoundCloud
Musician & YouTuber. Currently working on Planet X3 and Necrolepsy.

MIDI modules: Roland MT-32, SC-55 (2.00 ROM), SC-8850, KORG NX5R, Yamaha MU1000EX. PM me if you want any music/soundtracks recorded in 24-bit quality!
User avatar
SpeedySPCFan
Member
 
Posts: 182
Joined: 2014-10-30 @ 20:34

Re: Heavy Gear 2 CD Audio help needed

Postby dippy-dipper » 2018-11-17 @ 17:46

Hello!

First of all sorry to post on a year old topic but I think this might still be relevant.

I have been looking into enabling music playback in Heavy Gear 2 and have made a small program that plays mp3 files while the game is running. The program works by monitoring the loaded DLL files and I have used the example code from here as the basis for it: https://docs.microsoft.com/en-us/window ... -a-process

Luckily Heavy Gear 2 uses two different dll files based on whether the player is in the game menu or in the simulator phase of the game. My launcher program first starts "Heavy Gear 2.exe" and then stays active in the background looking for when HG2SIM.DLL is loaded. When this happens the program knows the player has entered the mission (simulator) and music should play. When SHELL.DLL is detected the program knows the player is in the game menu and music stops. The program plays the mp3 files using the standard Microsoft Media Control Interface (MCI commands) from a \music\ sub directory in a random order.

Now originally the game used earpds.dll a custom library for handling the music playback. This means that the normal winmm.dll wrappers can not be used to restore the music playback. To my knowledge the earpds.dll is only compatible with real hardware running Win9x. For example you can run win9x on Oracle Virtual Box but cdaudio is not supported so you still do not get the music (not to mention that the game also requires Direct3D).

Originally the game had interactive music track playback where the music would change according to the events in the missions. My launcher program can not restore this interactive music behaviour and thus the compromise to play random tracks was made. Ideally one would need to somehow understand how "earpds.dll" handles the music playback and write a custom wrapper for it but this seems like a huge amount of work to support just one game.

You could of course simply play your music manually in the background with some media player software but that would require you to stop and pause the music manually and possibly affect the immersion.

I wonder if there is any interest for this kind of launcher program or if indeed something similar has already been done. (I could not find anything in my searches other than this topic)
User avatar
dippy-dipper
Newbie
 
Posts: 7
Joined: 2018-11-17 @ 17:03

Re: Heavy Gear 2 CD Audio help needed

Postby mrpenguinb » 2018-11-18 @ 22:53

HG2 Problem Workarounds: http://alumnus.caltech.edu/~dank/hg2fix.html
There is a troubleshooting guide for getting the CD audio to work in Heavy Gear 2 as well: http://www.earsound.com/tech/ts_hg2.html#cd

Some CD/DVD drives are not liked by the game at all. Even particular software programs can interfere with the CD audio playback (this includes virtual CD/DVD mounting software). Any auto-insert notification from a program installed on your computer can interfere too. You could try and disable the Windows pop-up each time you insert a disc.
mrpenguinb
Newbie
 
Posts: 12
Joined: 2018-10-29 @ 08:11

Re: Heavy Gear 2 CD Audio help needed

Postby dippy-dipper » 2018-11-18 @ 23:29

Do you mean that the Heavy Gear 2 music works on your modern PC or are you just referencing to these old documents?

These originate from 1999 and are really of no help today. They do tell that even back in the day the game could have issues on some systems.
User avatar
dippy-dipper
Newbie
 
Posts: 7
Joined: 2018-11-17 @ 17:03

Re: Heavy Gear 2 CD Audio help needed

Postby mrpenguinb » 2018-11-19 @ 11:01

dippy-dipper wrote:Do you mean that the Heavy Gear 2 music works on your modern PC or are you just referencing to these old documents?

These originate from 1999 and are really of no help today. They do tell that even back in the day the game could have issues on some systems.

I am just referring to old documents. They are too old really to be useful. Apparently installing K-Lite codec pack can interfere with the game. This game seems quite difficult to fix, what you have done to work around the issues is impressive! :cool: I am a bit out of my depth, but I have fixed a few games like Monopoly Tycoon and Ford Racing 2 that needed a DirectShow codec and other general troubleshooting.
mrpenguinb
Newbie
 
Posts: 12
Joined: 2018-10-29 @ 08:11

Re: Heavy Gear 2 CD Audio help needed

Postby SpeedySPCFan » 2018-11-20 @ 19:18

dippy-dipper wrote:[snip!]


I would be forever grateful if you could release a launcher program like that. Even if it were just quick and dirty, so as long as it works, it'd be awesome to finally play the game with background music on a newer computer!
YouTube
SoundCloud
Musician & YouTuber. Currently working on Planet X3 and Necrolepsy.

MIDI modules: Roland MT-32, SC-55 (2.00 ROM), SC-8850, KORG NX5R, Yamaha MU1000EX. PM me if you want any music/soundtracks recorded in 24-bit quality!
User avatar
SpeedySPCFan
Member
 
Posts: 182
Joined: 2014-10-30 @ 20:34

Re: Heavy Gear 2 CD Audio help needed

Postby dippy-dipper » 2018-11-21 @ 14:27

Status update:

Here are the changes I have made:
The Launcher now looks for .mp3 tracks first and then switches to .wav tracks. Maybe useless to have wave file support but I figured it was easy to add and maybe someone wants 100% lossless audio quality. FLAC format would be better but that would require additional coding and libraries and I am too lazy.

If the launcher finds no mp3 or wav tracks in the music folder it will try to play music from the cd. Music playback from the cd is very crude and only plays from the first track to the end of the cd. There is no randomization and additionally due to a possible bug in Microsofts MCI interface it can not tell when the cd has finished playing and start over.

Finally I added a manual Pause/break key detection that allows the user to stop the music and restart it from another random track. I don't know how useful that would be but it is there none the less. If it interferes with some other software then it can be easily removed by editing the source code.

I will run a couple of tests and upload later today or tomorrow.
User avatar
dippy-dipper
Newbie
 
Posts: 7
Joined: 2018-11-17 @ 17:03

Re: Heavy Gear 2 CD Audio help needed

Postby dippy-dipper » 2018-11-22 @ 14:20

I dropped support for cdaudio since there were so many issues. So just mp3 or wav playback supported.
I also changed the music pause key to "Scroll lock". Since this is a simple console application and by default a console application is paused with the Pause/Break key this caused a problem if the user had minimized the game and pressed Pause/Break. That would pause the console application until Ctrl+Z was pressed. D'oh!

Quick start:
Place HG2Launcher.exe into your Heavy Gear 2 install directory.
Create a folder called "Music" in your Heavy Gear 2 directory and add your mp3 tracks there. (Track1.mp3 - Track18.mp3)

Read HG2Launcher.txt for the complete instructions!
As a bonus there is also the "extras" directory that contains some files that may be useful for running HG2 on modern systems.
Attachments
HG2Launcher.zip
(201.42 KiB) Downloaded 18 times
User avatar
dippy-dipper
Newbie
 
Posts: 7
Joined: 2018-11-17 @ 17:03

Re: Heavy Gear 2 CD Audio help needed

Postby dippy-dipper » 2018-11-22 @ 14:22

Here is the source code for those who are interested. It is written in C language and can be compiled with MinGW or Visual C++.
Attachments
HG2Launcher_source.zip
(7.6 KiB) Downloaded 7 times
User avatar
dippy-dipper
Newbie
 
Posts: 7
Joined: 2018-11-17 @ 17:03

Re: Heavy Gear 2 CD Audio help needed

Postby dippy-dipper » 2018-12-07 @ 16:51

Recent development in Dxwnd Virtual audio CD emulation have made HG2Launcher obsolete.

With Dxwnd you can now restore the original functionality of music playback in Heavy Gear 2.

see this discussion for more info:
https://sourceforge.net/p/dxwnd/discuss ... it=25#4356
User avatar
dippy-dipper
Newbie
 
Posts: 7
Joined: 2018-11-17 @ 17:03

Re: Heavy Gear 2 CD Audio help needed

Postby dippy-dipper » 2018-12-08 @ 03:58

I'm dumb...

Of course I could have simply hex edited earpds.dll to point to something else than winmm.dll. For example winm2.dll and then use a stand alone ogg-winmm wrapper renamed to match.

I believe the _inmm thingy works in a similar way though I have never used it.

SpeedySPCFan did you try _inmm on earpds.dll already?

Well at least we now have several ways to enable music on Heavy Gear 2.

EDIT:

Attached here is a version of the ogg-winmm wrapper that supports Heavy Gear 2.

Unlike the previous HG2Launcher it should restore the original interactive music playback instead of just playing random music tracks.
Attachments
HG2_ogg-winmm_wrapper.zip
(347.16 KiB) Downloaded 7 times
User avatar
dippy-dipper
Newbie
 
Posts: 7
Joined: 2018-11-17 @ 17:03

Re: Heavy Gear 2 CD Audio help needed

Postby SpeedySPCFan » 2018-12-09 @ 04:16

I have yet to try it since I've been swamped with music work lately. But man, you're a freaking legend for doing this, thank you so much! As soon as I get some free time I'm going to revisit the game with your fix!
YouTube
SoundCloud
Musician & YouTuber. Currently working on Planet X3 and Necrolepsy.

MIDI modules: Roland MT-32, SC-55 (2.00 ROM), SC-8850, KORG NX5R, Yamaha MU1000EX. PM me if you want any music/soundtracks recorded in 24-bit quality!
User avatar
SpeedySPCFan
Member
 
Posts: 182
Joined: 2014-10-30 @ 20:34


Return to Windows

Who is online

Users browsing this forum: No registered users and 1 guest