VOGONS

Common searches


Road Rash '96 - MIDI Error

Topic actions

First post, by Kappa971

User metadata
Rank Newbie
Rank
Newbie

Hi, as the title suggests I would like to discuss this famous problem affecting the Road Rash game released for Windows 95 in 1996.
Using Coolsoft MIDI Mapper + LoopMIDI + Falcosoft MIDI Player (+ Sound Canvas VA) in Windows 10/11, when starting a race, "MIDI Error" will be displayed. Despite this error, the music works but it will work indefinitely, even after finishing the race. This problem seems to happen even when using only Coolsoft VirtualMIDISynth (which acts as a MIDI mapper and software synthesizer).
A long time ago, I installed Windows 98 in PCEm and selecting the Sound Blaster AWE32 (emulated) as the MIDI device, the music worked perfectly. Selecting an external midi device (I think it was indicated as "MPU-401") in Windows 98 and the Sound Canvas VA (LoopMIDI) port in the PCEm settings, I was getting the exact same error also in Windows 98. This means that using a real Windows 98 PC with an external synthesizer, would I get the same error in this game??

Before Coolsoft MIDI Mapper was released, here WARNING: Currently impossible to change default midi device in Win8 was talking about modifying the game executable to point to a Device ID other than the Windows default (Microsoft GS Wavetable). There is this comment from the user @Silanda that says:
"Road Rash required some bypassing of code since it assumes that it can change MIDI volume through the Windows mixer, and freaks out when it can't. "
but it is not clear if with "freaks out" he meant the same error, and if with this bypass the game worked correctly.

Reply 1 of 31, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t

I searched for the game's issues on Coolsoft website and it seems they assumed the issue would be fixed in the new update, but it wasn't.

I uninstalled MidiSynth for this same reason. I should try if the game runs into some exception error and if they can be skipped...

previously known as Discrete_BOB_058

Reply 2 of 31, by Kappa971

User metadata
Rank Newbie
Rank
Newbie
BEEN_Nath_58 wrote on 2022-04-17, 09:34:

I searched for the game's issues on Coolsoft website and it seems they assumed the issue would be fixed in the new update, but it wasn't.

I uninstalled MidiSynth for this same reason. I should try if the game runs into some exception error and if they can be skipped...

@BEEN_Nath_58, I hope you will find out something.
I can summarize that:
Midis don't work properly with:
1. Coolsoft MIDI Mapper + LoopMIDI + Falcosoft MIDI Player
2. Coolsoft VirtualMIDISynth
Windows 7 still has the MIDI Mapper, you have to change the default device ID in the registry editor, so it doesn't need Coolsoft MIDI Mapper and should work with only LoopMIDI and Falcosoft MIDI Player installed. I don't have a Windows 7 PC to test with, I should create a virtual machine. If anyone has a PC with Windows 7, it saves me the work. I suspect that the LoopMIDI driver (without Coolsoft MIDI Mapper) may also cause the same error.
3. PCEm Windows 98, AWE32 MPU-401 + LoopMIDI + Falcosoft MIDI Player.

Midis works properly with:
1. Microsoft GS Wavetable Synth
2. PCEm Windows 98, AWE32 synth

Reply 3 of 31, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t

I tried the game now and there's not a solution, skipping the error isn't possible since it isn't an excepton. Reading Silanda's comment I come to understand that the game tries to look for a MIDI volume mixer, which was present in Windows but non-functional in games since Windows Vista when every audio played in the wave stream. But that doesn't explain the fact why a MIDI Mapper causes the issue. My theory is that although MIDI Mapper was able to create a mapper for Windows 8/10/11 (it was removed in Windows 😎, they did it in an incomplete way, perhaps they missed to emulate certain features such as volume mixer which the game probably checks for as Silanda says.

So what I believe is the game requires a MIDI volume mixer. The only correct answer now can be given by Coolsoft themselves, because they have to emulate a fake/real volume mixer for this game. Or maybe neither of these? Now I think you will need to write to the Coolsoft forums, and probably explaining what Silanda/I said as some "hints". DxWnd may be able to create a volume mixer someday, but it won't be possible to bring it to MIDIMapper.

Selecting an external midi device (I think it was indicated as "MPU-401") in Windows 98 and the Sound Canvas VA (LoopMIDI) port in the PCEm settings, I was getting the exact same error also in Windows 98.

I never used MPU-401 in Windows so I can't answer this. Probably someone from the DOS forums will be able to explain what MPU-401 features are available in Windows, and the incompatibilities posed by it.

previously known as Discrete_BOB_058

Reply 4 of 31, by Kappa971

User metadata
Rank Newbie
Rank
Newbie
BEEN_Nath_58 wrote on 2022-04-17, 17:26:

I tried the game now and there's not a solution, skipping the error isn't possible since it isn't an excepton. Reading Silanda's comment I come to understand that the game tries to look for a MIDI volume mixer, which was present in Windows but non-functional in games since Windows Vista when every audio played in the wave stream. But that doesn't explain the fact why a MIDI Mapper causes the issue. My theory is that although MIDI Mapper was able to create a mapper for Windows 8/10/11 (it was removed in Windows 😎, they did it in an incomplete way, perhaps they missed to emulate certain features such as volume mixer which the game probably checks for as Silanda says.

So what I believe is the game requires a MIDI volume mixer. The only correct answer now can be given by Coolsoft themselves, because they have to emulate a fake/real volume mixer for this game. Or maybe neither of these? Now I think you will need to write to the Coolsoft forums, and probably explaining what Silanda/I said as some "hints". DxWnd may be able to create a volume mixer someday, but it won't be possible to bring it to MIDIMapper.

You are probably more capable than me at explaining what you discovered in the Coolsoft MIDI Mapper forum 🙂. This is a open bug report regarding this issue: https://coolsoft.altervista.org/en/forum/thread/986

Reply 5 of 31, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
Kappa971 wrote on 2022-04-17, 17:52:
BEEN_Nath_58 wrote on 2022-04-17, 17:26:

I tried the game now and there's not a solution, skipping the error isn't possible since it isn't an excepton. Reading Silanda's comment I come to understand that the game tries to look for a MIDI volume mixer, which was present in Windows but non-functional in games since Windows Vista when every audio played in the wave stream. But that doesn't explain the fact why a MIDI Mapper causes the issue. My theory is that although MIDI Mapper was able to create a mapper for Windows 8/10/11 (it was removed in Windows 😎, they did it in an incomplete way, perhaps they missed to emulate certain features such as volume mixer which the game probably checks for as Silanda says.

So what I believe is the game requires a MIDI volume mixer. The only correct answer now can be given by Coolsoft themselves, because they have to emulate a fake/real volume mixer for this game. Or maybe neither of these? Now I think you will need to write to the Coolsoft forums, and probably explaining what Silanda/I said as some "hints". DxWnd may be able to create a volume mixer someday, but it won't be possible to bring it to MIDIMapper.

You are probably more capable than me at explaining what you discovered in the Coolsoft MIDI Mapper forum 🙂. This is a open bug report regarding this issue: https://coolsoft.altervista.org/en/forum/thread/986

I needed some time and I used the MPU-401 on my Windows XP and it gives the MIDI error. But here, instead of music playing in race, it doesn't play but plays again in menu. This is looking hard.

previously known as Discrete_BOB_058

Reply 6 of 31, by Kappa971

User metadata
Rank Newbie
Rank
Newbie
BEEN_Nath_58 wrote on 2022-04-19, 07:25:

I needed some time and I used the MPU-401 on my Windows XP and it gives the MIDI error. But here, instead of music playing in race, it doesn't play but plays again in menu. This is looking hard.

If two facts constitute proof, we can say that Road Rash doesn't recognize external synthesizers (I had the same problem in PCEm with Windows 98). So my suspicion (not yet verified) that Road Rash could give the same error even with just the LoopMIDI driver (without Coolsoft MIDI Mapper installed) could be real. If this is the case, we can say that this game only recognizes certain MIDI drivers:
1. Microsoft GS Wavetable Synth (probably unchanged since 1996)
2. AWE32 Synth (the game also contains a file called "aweman.dll", clearly refers to the AWE32)
3. I also think FM synthesis (I don't remember well but I think I tried this in PCEm too).

Following this theory, with other drivers, the game should return the error.

Reply 7 of 31, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie

Hi,
Although I do not have this exact game to test with I'm 99% sure that the problem is not 'mixer' related per se but the problem is the missing support for the midiOutSetVolume function.
https://docs.microsoft.com/en-us/windows/win3 … idioutsetvolume
This function is never implemented by hardware(MPU-401) ports or virtual cables and only some of the soft synthesizers support it. I only know 2 soft synths that support it, namely: MS GM/GS Soft Synth and Yamaha S-YXG50 XP driver.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 8 of 31, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
Falcosoft wrote on 2022-04-19, 10:34:
Hi, Although I do not have this exact game to test with I'm 99% sure that the problem is not 'mixer' related per se but the prob […]
Show full quote

Hi,
Although I do not have this exact game to test with I'm 99% sure that the problem is not 'mixer' related per se but the problem is the missing support for the midiOutSetVolume function.
https://docs.microsoft.com/en-us/windows/win3 … idioutsetvolume
This function is never implemented by hardware ports or virtual cables and only some of the soft synthesizers support it. I only know 2 soft synths that support it, namely: MS GM/GS Soft Synth and Yamaha S-YXG50 XP driver.

I wanted to mean midiOutSetVolume (I forgot this function name), because new Windows don't even have a separate volume mixer and installing MIDI Mapper shouldn't cause issues with mixer, neither should MPU-401 should cause an issue, so your explanation is more correct.

And to top it off, I remember MPU-401 under XP has removed the volume function, that probably explains it all. But HW synth sound cards do support the function, such as my AWE32's MIDI emulation

previously known as Discrete_BOB_058

Reply 10 of 31, by Kappa971

User metadata
Rank Newbie
Rank
Newbie
Falcosoft wrote on 2022-04-19, 10:34:
Hi, Although I do not have this exact game to test with I'm 99% sure that the problem is not 'mixer' related per se but the prob […]
Show full quote

Hi,
Although I do not have this exact game to test with I'm 99% sure that the problem is not 'mixer' related per se but the problem is the missing support for the midiOutSetVolume function.
https://docs.microsoft.com/en-us/windows/win3 … idioutsetvolume
This function is never implemented by hardware(MPU-401) ports or virtual cables and only some of the soft synthesizers support it. I only know 2 soft synths that support it, namely: MS GM/GS Soft Synth and Yamaha S-YXG50 XP driver.

So what can be done to solve this problem? Is it solvable?

Reply 11 of 31, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
Kappa971 wrote on 2022-04-19, 11:01:
Falcosoft wrote on 2022-04-19, 10:34:
Hi, Although I do not have this exact game to test with I'm 99% sure that the problem is not 'mixer' related per se but the prob […]
Show full quote

Hi,
Although I do not have this exact game to test with I'm 99% sure that the problem is not 'mixer' related per se but the problem is the missing support for the midiOutSetVolume function.
https://docs.microsoft.com/en-us/windows/win3 … idioutsetvolume
This function is never implemented by hardware(MPU-401) ports or virtual cables and only some of the soft synthesizers support it. I only know 2 soft synths that support it, namely: MS GM/GS Soft Synth and Yamaha S-YXG50 XP driver.

So what can be done to solve this problem? Is it solvable?

Probably since there's no real use of this function now, thus he didn't implement it. Coolsoft has to implement the function. That's it.

Replying to earlier post, MPU 401 is just a port, so synthesizers using this port won't work because of lack of midiOutSetVolume

previously known as Discrete_BOB_058

Reply 12 of 31, by Kappa971

User metadata
Rank Newbie
Rank
Newbie
BEEN_Nath_58 wrote on 2022-04-19, 11:36:

Probably since there's no real use of this function now, thus he didn't implement it. Coolsoft has to implement the function. That's it.

Coolsoft could implement it in VirtualMIDISynth, but if you are using Coolsoft MIDI Mapper + LoopMIDI + Falcosoft MIDI Player and Sound Canvas VA, which of the three programs should implement this function? LoopMIDI? Unless it is possible to implement a hack in MIDI Mapper (I'm not a programmer so I have no idea).

EDIT
I wrote a message to coolsoft here: https://coolsoft.altervista.org/en/forum/post/5426#post5426

Reply 13 of 31, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
Kappa971 wrote on 2022-04-19, 12:15:
Coolsoft could implement it in VirtualMIDISynth, but if you are using Coolsoft MIDI Mapper + LoopMIDI + Falcosoft MIDI Player an […]
Show full quote
BEEN_Nath_58 wrote on 2022-04-19, 11:36:

Probably since there's no real use of this function now, thus he didn't implement it. Coolsoft has to implement the function. That's it.

Coolsoft could implement it in VirtualMIDISynth, but if you are using Coolsoft MIDI Mapper + LoopMIDI + Falcosoft MIDI Player and Sound Canvas VA, which of the three programs should implement this function? LoopMIDI? Unless it is possible to implement a hack in MIDI Mapper (I'm not a programmer so I have no idea).

EDIT
I wrote a message to coolsoft here: https://coolsoft.altervista.org/en/forum/post/5426#post5426

The actually opened/active port has to implement this since the first parameter you have set when you call midiOutSetVolume is the port handle returned by midiOutOpen or the device ID of the selected device.
If CoolSoft Midi mapper is installed both the default port handle and the default device ID belong to Coolsoft Midi mapper.

@Edit:
I think the most reliable way to implement this feature would be to modify the velocity value of all Note On messages according to what value is sent by midiOutSetVolume.
Namely:
newVelocity = oldVelocity * ( (midiOutSetVolumeValue & 0xFFFF) / 0xFFFF);

BTW I have made a simple testing program to confirm/refute the theory. According to my few test runs the reported capability bits (MIDICAPS_VOLUME and MIDICAPS_LRVOLUME) cannot be trusted. Under Win 10 Coolsoft Midi Mapper and MS GM/GS soft synth report the same yet when you call midiOutSetVolume the Coolsoft Midi Mapper reports errors while MS GM/GS soft synth does change the volume successfully.
The reported capability bits should be considered to be not reliable. But they can be used to test what OS reports capability bits right/wrong. In XP the capability bits seem to be more reliable.

So you should test the selected ports with the Volume slider instead. If you get midiOutSetVolume errors when you move the Volume slider with the same ports selected as in the game then the theory is confirmed.

Filename
MidiOutSetVolumeCheck.zip
File size
129.14 KiB
Downloads
97 downloads
File license
Public domain

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 14 of 31, by Kappa971

User metadata
Rank Newbie
Rank
Newbie
Falcosoft wrote on 2022-04-19, 13:45:
The actually opened/active port has to implement this since the first parameter you have set when you call midiOutSetVolume is t […]
Show full quote

The actually opened/active port has to implement this since the first parameter you have set when you call midiOutSetVolume is the port handle returned by midiOutOpen or the device ID of the selected device.
If CoolSoft Midi mapper is installed both the default port handle and the default device ID belong to Coolsoft Midi mapper.
I think the most reliable way to implement this feature would be to modify the velocity value of all Note On messages according to what value is sent by midiOutSetVolume.
Namely:
newVelocity = oldVelocity * ( (midiOutSetVolumeValue & 0xFFFF) / 0xFFFF);

BTW I have made a simple testing program to confirm/refute the theory. According to my few test runs the reported capability bits (MIDICAPS_VOLUME and MIDICAPS_LRVOLUME) cannot be trusted. Under Win 10 Coolsoft Midi Mapper and MS GM/GS soft synth report the same yet when you call midiOutSetVolume the Coolsoft Midi Mapper reports errors while MS GM/GS soft synth does change the volume successfully.
The reported capability bits should be considered to be not reliable. But they can be used to test what OS reports capability bits right/wrong. In XP the capability bits seem to be more reliable.

So you should test the selected ports with the Volume slider instead. If you get midiOutSetVolume errors when you move the Volume slider with the same ports selected as in the game then the theory is confirmed.
MidiOutSetVolumeCheck.zip

Here there are the tests:

Attachments

Reply 15 of 31, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
Kappa971 wrote on 2022-04-19, 14:47:

Here there are the tests:

So far these results confirm my theory: Although Coolsoft Midi Mapper reports support of MIDICAPS_VOLUME, when you actually call midiOutSetVolume it produces errors. On your system only MS GM/GS Soft synth can use midiOutSetVolume without errors. This corresponds your results with the game.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 16 of 31, by Kappa971

User metadata
Rank Newbie
Rank
Newbie
Falcosoft wrote on 2022-04-19, 14:54:

So far these results confirm my theory: Although Coolsoft Midi Mapper reports support of MIDICAPS_VOLUME, when you actually call midiOutSetVolume it produces errors. On your system only MS GM/GS Soft synth can use midiOutSetVolume without errors. This corresponds your results with the game.

So, what can be done to fix this? (if possible)

Reply 17 of 31, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
Kappa971 wrote on 2022-04-19, 17:35:

So, what can be done to fix this? (if possible)

As I have written before:

The actually opened/active port has to implement this since the first parameter you have to set when you call midiOutSetVolume i […]
Show full quote

The actually opened/active port has to implement this since the first parameter you have to set when you call midiOutSetVolume is the port handle returned by midiOutOpen or the device ID of the selected device.
If CoolSoft Midi mapper is installed both the default port handle and the default device ID belong to Coolsoft Midi mapper.
@Edit:
I think the most reliable way to implement this feature would be to modify the velocity value of all Note On messages according to what value is sent by midiOutSetVolume.
Namely:
newVelocity = oldVelocity * ( (midiOutSetVolumeValue & 0xFFFF) / 0xFFFF);

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 18 of 31, by Kappa971

User metadata
Rank Newbie
Rank
Newbie
Falcosoft wrote on 2022-04-19, 18:21:
Kappa971 wrote on 2022-04-19, 17:35:

So, what can be done to fix this? (if possible)

As I have written before:

The actually opened/active port has to implement this since the first parameter you have to set when you call midiOutSetVolume i […]
Show full quote

The actually opened/active port has to implement this since the first parameter you have to set when you call midiOutSetVolume is the port handle returned by midiOutOpen or the device ID of the selected device.
If CoolSoft Midi mapper is installed both the default port handle and the default device ID belong to Coolsoft Midi mapper.
@Edit:
I think the most reliable way to implement this feature would be to modify the velocity value of all Note On messages according to what value is sent by midiOutSetVolume.
Namely:
newVelocity = oldVelocity * ( (midiOutSetVolumeValue & 0xFFFF) / 0xFFFF);

Thanks @Falcosoft! I have no idea what this all means, I copy-paste on the CoolSoft forum, hoping it will help the developer.

Reply 19 of 31, by Kappa971

User metadata
Rank Newbie
Rank
Newbie

There is some news, Coolsoft has released CoolSoft MIDI Mapper 2.0.4-beta1 which seems to have fixed the error. It isn't a definitive solution but now the game is working correctly.
This is what he wrote:
"Well, thanks for your investigation on the issue, really interesting.

I don't think that a missing function could be the culprit here, because if so I'll expect a game crash and not just an error message.
I instead suppose the game does not really need for a full implementation of midiOutSetVolume() function, but it only needs that its calls to modMessage() to return MMSYSERR_NOERROR instead of the current MMSYSERR_NOTSUPPORTED.

That said, I've built a test version with this change: the modMessage() function of MIDIMapper now always returns MMSYSERR_NOERROR (even if it does nothing at all with the given data).

Please let me know if it works.
If so, we could start from there to implement some kind of volume management, that should be done on VirtualMIDISynth rather than on MIDIMapper side.

NOTE: I only expect the game to not emit the error anymore; the volume set/get still does not work, so if the game has some kind of volume controllers, they won't do anything.
As for the "music playing when getting back to game menus" well, I hope they (game creators) do stop MIDI from playing and not only lower its volume to zero..."

https://coolsoft.altervista.org/en/forum/post/5431#post5431