PC Engine CD games on Mednafen with proper sound balance

A place where you can chat about anything that isn't to do with games!
Post Reply
User avatar
M.Knight
Posts: 1246
Joined: Thu Dec 12, 2013 4:54 pm
Location: France

PC Engine CD games on Mednafen with proper sound balance

Post by M.Knight »

How to play PC Engine CD games with proper sound balance thanks to Mednafen

The PC Engine CD is one of those neat old consoles/add-ons/whatever that features high-quality CD-based music. However, one big issue with some of the games on said platform is that the music is drowned out by terrible and loud Megadrive-tier sound effects that hurt the ears.
Thankfully, thanks to the Mednafen emulator, it is possible to lower the volume of said sound effects to a reasonable amount and properly enjoy the music. There are no dark arts or black magic involved in this, but the feature is not necessarily very well known or advertized, so here is a little step-by-step guide to easily do this.
For the info, the guide is written with Windows machines in mind. If some steps are different on Linux for example, let me know.

Part 1 : Setting up the emulator itself
1) Download Mednafen. The emulator should be in a zip format.
2) Extract the contents of the Mednafen zip file in a dedicated folder.
3) Scour the internet to get the "syscard3.pce" file and put it in the same folder where you unzipped Mednafen.
4) Create some subfolders for each game's backups/files. Since one PC Engine CD game can have multiple files in it, I advise to have one dedicated folder per game to avoid clutter.
5) Drag and drop the .cue file from the game's folder on mednafen.exe to launch a game on the emulator. This operation should not move the .cue file to the mednafen.exe folder, only open said .cue file with mednafen.exe
6) Once the game is launched, press ALT+SHIFT+1 to configure the player 1 inputs, or ALT+SHIFT+2 to configure the player 2 inputs. ( https://mednafen.github.io/documentatio ... ping_input )

Part 2 : Adjusting the sound balance
1) Check the folder where Mednafen has been unzipped. It is where mednafen.exe is located. If there is no folder named "pgconfig" in it, then create it.
2 ) Inside pgconfig, create a file named "XXXX.pce.cfg" in it. Replace "XXXX" by the exact name of your game's .cue file. (The file for "Gate of Thunder.cue" should thus be named "Gate of Thunder.pce.cfg") This file will contain custom configuration values for the game it is named after, so you can adjust the sound balance for each one independently.
Be careful with the file extension. If you create a text file, the OS may give it a .txt extension but hide it from you. You can open Notepad to create the file and save it as a generic file instead of text file, and give it the extension when naming it.
3) Add the following lines in the configuration file :
;ADPCM volume.
pce.adpcmvolume 100

;PSG volume when playing a CD game.
pce.cdpsgvolume 100

;CD-DA volume.
pce.cddavolume 100
These lines have been lifted from the default configuration file. ("mednafen.cfg", which you can find in the mednafen.exe folder after having launched the emulator once) The lines with ";" in front are only helpful indications for us humans, while the lines without ";" provide the config values the emulator will use.

From what I have tested :

-ADPCM refers to voice clips
-PSG is for the sound effects
-CD-DA is the music

This can slightly change on a per-game basis though, so a bit of experimentation may be required

4) Edit the configuration to suit your needs. The three values independently adjust the volume for each of those sound channels, and their value can go from 0 to 200. Modify those values to adjust the sound levels to your liking and play the game to test them.

According to the documentation (https://mednafen.github.io/documentatio ... volbalance), setting up values that are too high can cause sample clipping, so it could be worth keeping the values at 100 at best. (though I personally went higher)

For reference, here are two personal configuration files I have for specific games :

Gate of Thunder :
Stage 1 showcase : https://www.youtube.com/watch?v=EuIjVUn1puw
;ADPCM volume.
pce.adpcmvolume 200

;PSG volume when playing a CD game.
pce.cdpsgvolume 50

;CD-DA volume.
pce.cddavolume 200
Ginga Fukei Densetsu Sapphire :
Stage 1 showcase : https://www.youtube.com/watch?v=_tGS1i03Gko
;ADPCM volume.
pce.adpcmvolume 200

;PSG volume when playing a CD game.
pce.cdpsgvolume 35

;CD-DA volume.
pce.cddavolume 200

Thanks for reading! Enjoy the games and the music!
RegalSin wrote: I think I have downloaded so much I am bored with downloading. No really I bored with downloading stuff I might consider moving to Canada or the pacific.
Remote Weapon GunFencer - My shmup project
User avatar
Mortificator
Posts: 2808
Joined: Tue Jun 19, 2007 1:13 am
Location: A star occupied by the Bydo Empire

Re: PC Engine CD games on Mednafen with proper sound balance

Post by Mortificator »

Not the bad idea to spread the word on these features. Checking my own batch file, I set cddavolume to 170 years ago, which isn't far off from what you determined. I haven't experimented with the other audio settings, though.
RegalSin wrote:You can't even drive across the country Naked anymore
User avatar
M.Knight
Posts: 1246
Joined: Thu Dec 12, 2013 4:54 pm
Location: France

Re: PC Engine CD games on Mednafen with proper sound balance

Post by M.Knight »

I used 200 since that's the max value, but I am not surprised a slightly lower value can work too! As long as the sound effects are lower enough not to be a nuisance, it's all good.
After writing this, I checked out Rayxanber 3 as well, and that's one game that really enjoys from this config change. The yellow shot has a truly grating sound effect. The other sound effects are less annoying but they are also pretty loud and cover the fantastic music, so the fix helps no matter your playstyle. Once again I just put the music at max and decreased the SFX a lot.
;ADPCM volume.
pce.adpcmvolume 200

;PSG volume when playing a CD game.
pce.cdpsgvolume 25

;CD-DA volume.
pce.cddavolume 200
Haven't tried Rayxanber 2, but I suspect the default sound balance is also off in it.

Note that the games I've tried are all shmups, as those are what I wanted to play and their SFX are heard the most continuously. Maybe some non-shmup games can benefit too but I don't know much about the non-shmup library.
RegalSin wrote: I think I have downloaded so much I am bored with downloading. No really I bored with downloading stuff I might consider moving to Canada or the pacific.
Remote Weapon GunFencer - My shmup project
ronsmith
Posts: 1
Joined: Thu Aug 27, 2020 9:06 am

Re: PC Engine CD games on Mednafen with proper sound balance

Post by ronsmith »

M.Knight wrote:How to play PC Engine CD games with proper sound balance thanks to Mednafen

The PC Engine CD is one of those neat old consoles/add-ons/whatever that features high-quality CD-based music. However, one big issue with some of the games on said platform is that the music is drowned out by terrible and loud Megadrive-tier sound effects that hurt the ears.
Thankfully, thanks to the Mednafen emulator, it is possible to lower the volume of said sound effects to a reasonable amount and properly enjoy the music. There are no dark arts or black magic involved in this, but the feature is not necessarily very well known or advertized, so here is a little step-by-step guide to easily do this.
For the info, the guide is written with Windows machines in mind. If some steps are different on Linux for example, let me know.

Part 1 : Setting up the emulator itself
1) Download Mednafen. The emulator should be in a zip format.
2) Extract the contents of the Mednafen zip file in a dedicated folder.
3) Scour the internet to get the "syscard3.pce" file and put it in the same folder where you unzipped Mednafen.
4) Create some subfolders for each game's backups/files. Since one PC Engine CD game can have multiple files in it, I advise to have one dedicated folder per game to avoid clutter.
5) Drag and drop the .cue file from the game's folder on mednafen.exe to launch a game on the emulator. This operation should not move the .cue file to the mednafen.exe folder, only open said .cue file with mednafen.exe
6) Once the game is launched, press ALT+SHIFT+1 to configure the player 1 inputs, or ALT+SHIFT+2 to configure the player 2 inputs. ( https://mednafen.github.io/documentatio ... ping_input )

Part 2 : Adjusting the sound balance
1) Check the folder where Mednafen has been unzipped. It is where mednafen.exe is located. If there is no folder named "pgconfig" in it, then create it.
2 ) Inside pgconfig, create a file named "XXXX.pce.cfg" in it. Replace "XXXX" by the exact name of your game's .cue file. (The file for "Gate of Thunder.cue" should thus be named "Gate of Thunder.pce.cfg") This file will contain custom configuration values for the game it is named after, so you can adjust the sound balance for each one independently.
Be careful with the file extension. If you create a text file, the OS may give it a .txt extension but hide it from you. You can open Notepad to create the file and save it as a generic file instead of text file, and give it the extension when naming it.
3) Add the following lines in the configuration file :
;ADPCM volume.
pce.adpcmvolume 100

;PSG volume when playing a CD game.
pce.cdpsgvolume 100

;CD-DA volume.
pce.cddavolume 100
These lines have been lifted from the default configuration file. ("mednafen.cfg", which you can find in the mednafen.exe folder after having launched the emulator once) The lines with ";" in front are only helpful indications for us humans, while the lines without ";" provide the config values the emulator will use.

From what I have tested :

-ADPCM refers to voice clips
-PSG is for the sound effects
-CD-DA is the music

This can slightly change on a per-game basis though, so a bit of experimentation may be required

4) Edit the configuration to suit your needs. The three values independently adjust the volume for each of those sound channels, and their value can go from 0 to 200. Modify those values to adjust the sound levels to your liking and play the game to test them.

According to the documentation (https://mednafen.github.io/documentatio ... volbalance), setting up values that are too high can cause sample clipping, so it could be worth keeping the values at 100 at best. (though I personally went higher)

For reference, here are two personal configuration files I have for specific games :

Gate of Thunder :
Stage 1 showcase : https://www.youtube.com/watch?v=EuIjVUn1puw
;ADPCM volume.
pce.adpcmvolume 200

;PSG volume when playing a CD game.
pce.cdpsgvolume 50

;CD-DA volume.
pce.cddavolume 200
Ginga Fukei Densetsu Sapphire :
Stage 1 showcase : https://www.youtube.com/watch?v=_tGS1i03Gko
;ADPCM volume.
pce.adpcmvolume 200

;PSG volume when playing a CD game.
pce.cdpsgvolume 35

;CD-DA volume.
pce.cddavolume 200

Thanks for reading! Enjoy the games and the music!
Thanks for this detailed guide! I really appreciate it.
User avatar
evil_ash_xero
Posts: 6181
Joined: Thu Jul 12, 2007 6:33 am
Location: Where the fish lives

Re: PC Engine CD games on Mednafen with proper sound balance

Post by evil_ash_xero »

Necro bump.

Any way to adjust this on the actual ISO? Like using a hex editor or something like that?
I have Gate of Thunder Remastered, which sounds very good, but he drowned out the sound effects.
So, I wonder if I could do this outside of emulation.
Post Reply