VOGONS


First post, by bloodbat

User metadata
Rank Oldbie
Rank
Oldbie

I decided to play Police Quest 4 today...and...I got no general midi music with the current version in SVN of mpu401.cpp (commit 3791); I decided to test the old version of the file (commit 3700) and recompile...General Midi worked again for that game. It may or may not break general midi for other games (I don't think I've encountered one so far...) On the other hand...it does fix MPU-401 for Innocent until Caught 😉

Reply 1 of 28, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Floppy or CD version? I tried the floppy version and GM music is working fine with default settings in a build of current source. I configured the game for SVGA graphics, GM music, SoundBlaster sound.

Reply 2 of 28, by bloodbat

User metadata
Rank Oldbie
Rank
Oldbie

CD version; configured same as you, except GM produces no sound.

Reply 3 of 28, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Seems unlikely that the GENMIDI.DRV driver would be significantly different between floppy and CD version...

Some of the MPU changes are related to timing, so try reducing cycles (fixed or limited).

Reply 4 of 28, by bloodbat

User metadata
Rank Oldbie
Rank
Oldbie

Sadly, that didn't work, went as low as 3,000 and...still no music.
I think Day of the Tentacle did the same, but going around 10,000 cycles fixed it.

Reply 5 of 28, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

It works if you go down to 1000 cycles, but that's far too low for the game.

The CD version GM driver is different than the one in the floppy version, despite both being internally labelled as v1.08. The CD version driver has a problem with the reset delay that was implemented in the MPU401 device: it sends TWO reset commands to the MPU and expects the second one to ACK in a short period of time. The floppy version driver sends only one reset command and will wait a relatively long time for an ACK. The driver in the CD version would work with the reset delay if it sent only one reset, or if it would wait for an ACK as long as the floppy version driver does.

Maybe the CD version driver works with other MIDI interfaces but not a real MPU401; can't be sure until it's tested. In the meantime, the GENMIDI.DRV from the floppy version of PQ4 can be used with the CD version. With a full install of the game you can just replace the driver file; with a minimal install you can put the driver in the PQ4CD directory and change the RESOURCE.CFG to have an absolute path to the driver. (e.g. soundDrv = C:\SIERRA\PQ4CD\GENMIDI.DRV)

Reply 6 of 28, by bloodbat

User metadata
Rank Oldbie
Rank
Oldbie

Thanks 😀. I did think about replacing it, but didn't wanna resort to it.

Reply 7 of 28, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Is that the only difference between the two versions of the driver?

Also, ScummVM might support PQ4 by now if you're willing to use it.

Reply 8 of 28, by Great Hierophant

User metadata
Rank l33t
Rank
l33t
ripsaw8080 wrote:

It works if you go down to 1000 cycles, but that's far too low for the game.

The CD version GM driver is different than the one in the floppy version, despite both being internally labelled as v1.08. The CD version driver has a problem with the reset delay that was implemented in the MPU401 device: it sends TWO reset commands to the MPU and expects the second one to ACK in a short period of time. The floppy version driver sends only one reset command and will wait a relatively long time for an ACK. The driver in the CD version would work with the reset delay if it sent only one reset, or if it would wait for an ACK as long as the floppy version driver does.

Maybe the CD version driver works with other MIDI interfaces but not a real MPU401; can't be sure until it's tested. In the meantime, the GENMIDI.DRV from the floppy version of PQ4 can be used with the CD version. With a full install of the game you can just replace the driver file; with a minimal install you can put the driver in the PQ4CD directory and change the RESOURCE.CFG to have an absolute path to the driver. (e.g. soundDrv = C:\SIERRA\PQ4CD\GENMIDI.DRV)

I have bad news on this front. I don't have a CD-ROM drive in my 486 (not for lack of wanting), but I did have the floppy version of PQ4 installed. I copied over the GENMIDI.DRV over from the CD-ROM version, (dated 6/28/94, CD-ROM version 1.100.000) and used with the floppy version instead of the floppy's GENMIDI.DRV. Game's music worked fine with a Roland MPU-401 + MIF-IPC-A and a Roland SC-55.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 9 of 28, by robertmo

User metadata
Rank l33t++
Rank
l33t++

does GENMIDI.DRV from cd ver work with floppy ver in dosbox?

Reply 10 of 28, by Great Hierophant

User metadata
Rank l33t
Rank
l33t
robertmo wrote:

does GENMIDI.DRV from cd ver work with floppy ver in dosbox?

No, it does not seem to work in the latest SVN, but it does with 0.74

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 11 of 28, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Tests have shown that the MPU-401 (external) becomes busy for 27ms after a reset command is received, and it won't process further commands during that interval, although one command can be queued pending completion of the reset. Maybe a reset command received while a reset is in progress is immediately ACKed but not processed. That would fix the problem in the case of the CD version's GM driver, but it might be more workaround than emulating actual behavior.

In any case, sending two reset commands in quick succession can serve no purpose; but it apparently manages to work on the real interface, somehow.

Reply 12 of 28, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Any idea what specific part of the changes may have caused the regression? Is it something that fixed another game, or is it something that can/should be rolled back or refined further?

Reply 13 of 28, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

It's something that fixed multiple other games.

1+1=10

Reply 14 of 28, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The attached patch fixes the PQ4CD GM driver, and it appears to cause no problem with the usual suspects (MechWarrior, It Came From The Desert, Innocent Until Caught, Curse of Enchantia, Legend games, several sequencer apps). It will need plenty of testing to make sure nothing else becomes broken. Although it makes a certain amount of sense, it is nonetheless a workaround until the interface's behavior in a multiple reset condition is better understood.

Reply 15 of 28, by bloodbat

User metadata
Rank Oldbie
Rank
Oldbie

Will test it 😀, thanks.

Reply 16 of 28, by bloodbat

User metadata
Rank Oldbie
Rank
Oldbie

What I've tested so far seems to be fine:
-Alien Breed
-Blood
-BloodNet
-Boppin
-Budokan
-Castle of Dr. Brain
-Desert Strike
-Duke Nukem 3D
-Dungeon Hack
-Elvira 2
-Eye of the Beholder 3
-Flashback
-Gabriel Knight 1
-Gods
-Innocent Until Caught
-Leisure Suit Larry 1 and 5
-Rise of the Triad
-Police Quest 4 CD

However I did find some timing related issues both with the patch you posted and commit 3791 of mpu401.cpp: neither Bureau 13 or Hell: A Cyberpunk Thriller will start with cycles set higher than 3000 (auto): you get an "invalid music card selected" with both if starting with anything higher; they even seem to corrupt memory after that (see screenshot), you can increase the cycles after the game has started and they work fine, though.

Reply 17 of 28, by HunterZ

User metadata
Rank l33t++
Rank
l33t++
bloodbat wrote:

However I did find some timing related issues both with the patch you posted and commit 3791 of mpu401.cpp: neither Bureau 13 or Hell: A Cyberpunk Thriller will start with cycles set higher than 3000 (auto): you get an "invalid music card selected" with both if starting with anything higher; they even seem to corrupt memory after that (see screenshot), you can increase the cycles after the game has started and they work fine, though.

What happens in 0.74?

Reply 18 of 28, by bloodbat

User metadata
Rank Oldbie
Rank
Oldbie

They work fine, at least those two.

Reply 19 of 28, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The two games are developed by the same company, so it's likely they have the same issue. Is the result the same without the patch I posted?