OpenMSX and ePSG or dual/double PSG

Page 1/4
| 2 | 3 | 4

Par Gradius2

Hero (652)

Portrait de Gradius2

21-08-2020, 05:35

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

Par Juan Luis

Master (143)

Portrait de Juan Luis

21-08-2020, 16:32

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.

Par Parn

Paladin (837)

Portrait de Parn

21-08-2020, 18:50

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:

  1. Go to the folder where OpenMSX is installed and open the machines subfolder inside the share folder.
  2. Open with a text editor the configuration file for an MSX computer with stereo PSG sound, like the Toshiba HX-32 for example.
  3. Now open the corresponding file for your preferred MSX computer, say, the Panasonic FS-A1WSX.
  4. In the Toshiba xml, find the sound subsection inside the PSG section inside the devices section (it should be from line 65 to 70 if your file is the same as mine).
  5. Now do the same for the Panasonic xml (it should from line 59 to 61 if your file is the same as mine).
  6. Before doing any modification, save this xml in your personal documents folder, inside the OpenMSX folder there should be a share folder and a machines subfolder as well. Just change its name so you can select this machine later (for example, a good name would be "Panasonic_FS-A1WSX_(stereo_PSG).xml").
  7. Now replace the appropriate subsection with the one from the Toshiba xml.
  8. Save and voilà! You'll have a new machine option, the Panasonic FS-A1WSX (stereo PSG). If you were running OpenMSX or Catapult, restart to see your new machine option.

Par Gradius2

Hero (652)

Portrait de Gradius2

22-08-2020, 07:00

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.

Par Gradius2

Hero (652)

Portrait de Gradius2

22-08-2020, 08:33

Of course, I edited the original GT with the new values... still not working.

Par Parn

Paladin (837)

Portrait de Parn

22-08-2020, 13:31

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:

GT_stereo.xml

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.

Par Briqunullus

Hero (665)

Portrait de Briqunullus

22-08-2020, 15:20

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>

Par Grauw

Ascended (10768)

Portrait de Grauw

22-08-2020, 17:11

Briqunullus wrote:

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.

Par Briqunullus

Hero (665)

Portrait de Briqunullus

22-08-2020, 17:43

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?

Par Grauw

Ascended (10768)

Portrait de Grauw

22-08-2020, 18:24

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.

Par [WYZ]

Champion (451)

Portrait de [WYZ]

22-08-2020, 19:26

@Grauw I own a Japanese HX-21 and always consider this full channel panning (not a real stereo).

Page 1/4
| 2 | 3 | 4