How can I get 2x PSG on OpenMSX ?
And then use them on any PSG game to simulate a TRUE stereo sound ?
!login ou Inscrivez-vous pour poster
How can I get 2x PSG on OpenMSX ?
And then use them on any PSG game to simulate a TRUE stereo sound ?
Hi Gradius2.
2x PSG is possible. Choose a machine and edit its .xml config file for adding the second PSG. For instance OpenMSX_Root/share/machines/Panasonic_FS-A1GT.xml
Look for PSG definition. You'll be able to see this (sorry, I don't know how to write xml tags properly in this forum):
PSG id="psg" io base="0xA0" num="2" type="O"/ io base="0xA2" num="1" type="I"/ sound volume 21000 /volume /sound keyboardlayout JIS /keyboardlayout /PSG
Add the following behind first PSG definition:
PSG id="PSG" type YM2149 /type sound volume 21000 /volume /sound io base="0x10" num="2" type="O"/ io base="0x12" num="1" type="I"/ /PSG
Yamaha YM2149 is binary compatible with AY3-8910. You can query the second PSG I/O address here:
http://map.grauw.nl/resources/msx_io_ports.php
Now, start OpenMSX with this computer and go to Audio tab. You will be able to see two PSG sliders.
To check the sound, download a sound melody for x2 PSG. For instance the arcade game Alcon:
https://vgmrips.net/packs/pack/alcon-arcade
Download the melodies and play them with vgmplay of Grauw. The melody "02 Game Start ..." uses both PSGs.
You will be able to hear the melody with all channels. Try to change both PSG sliders in audio tab to check the volume of both PSG.
If you only want to listen to stereo music on PSG games, I'd suggest you to create a custom machine with stereo PSG sound. Step by step:
First of all, thanks for the feedback and comments.
Well, I did edited the .xml and created a new GT_stereo machine.
After pressing CTRL+T on Catalyst, the new machine still not showing as available.
What I added:
https://justpaste.it/895qw
So isn't as simple as editing .xml file.
Of course, I edited the original GT with the new values... still not working.
Ok, let's try something else. I assume you want an A1GT with stereo PSG sound. So grab my own GT_stereo.xml file here:
Copy it to this folder:
%userprofile%\Documents\OpenMSX\share\machines
If for some reason the path above doesn't work (you can paste it in the address bar of any Windows Explorer window), just navigate to your personal documents folder, find the OpenMSX folder there and open the share folder to find the machines folder. Put that .xml file you just download there, inside the machines folder. It should immediately appear in the MSX type dropdown selector when you restart Catapult. There's no need to rescan the ROMs with Ctrl+T.
I previously misstated that it isn't necessary to rescan the ROMs. It actually is if the Display Broken Configurations option is disabled.
The MSX is a mono machine, so there is no true stereo music in games. Parn's solution uses a pseudo stereo effect using only one PSG. PSG channel 1 is played center, channel 2 is right (or left?) and channel 3 is left (or is it right?). Of course, this is only possible on an emulator, not on a real MSX.
A few (enhanced) games support dual PSG. But they only use it to have more audio channels available. Take for instance Sky Jaguar plus that now has background music and some speech. Most classic games have been written for single PSG and will ignore a secondary one.
The code below is for an extension for a secondary PSG. Save it as secpsg.xml in your folder %userprofile%\Documents\OpenMSX\share\extensions and a new extension 'General Instrument AY8910 Secondary PSG' will be available.
If you enable vu meters from the openMSX menu (Advanced -> Toys and utilities -> vu meters) you can see it in action. Tested with Sky Jaguar plus and it works fine.
<?xml version="1.0" ?> <!DOCTYPE msxconfig SYSTEM 'msxconfig2.dtd'> <msxconfig> <info> <name>Secondary PSG</name> <manufacturer>General Instrument</manufacturer> <code>AY8910</code> <description>This extension contains a secondary AY8910 sound chip on I/O ports $10-$12</description> <type>sound expansion</type> </info> <devices> <PSG id="PSG secondary"> <type>AY8910</type> <sound> <volume>21000</volume> </sound> <io base="0x10" num="2" type="O"/> <io base="0x12" num="1" type="I"/> </PSG> </devices> </msxconfig>
The MSX is a mono machine, so there is no true stereo music in games. Parn's solution uses a pseudo stereo effect using only one PSG. PSG channel 1 is played center, channel 2 is right (or left?) and channel 3 is left (or is it right?). Of course, this is only possible on an emulator, not on a real MSX.
Actually there are several machines with stereo PSG output.
I didn't know that. Are there any games that exploit this? Maybe even to a level that when something happens on the left of the screen you get a sound coming from the left?
I’m not sure, I don’t have one of these machines so I’ve never been able to pay attention to it. It’s probably not common.
But it could be fun to take these stereo PSGs into account when creating music and sound effects.
@Grauw I own a Japanese HX-21 and always consider this full channel panning (not a real stereo).
Don't you have an account yet? Become an MSX-friend and register an account!