[libretro] PS enhanced soundtrack plays at left channel only

Issue #288 resolved
Former user created an issue

Original issue 288 created by 0vetal0 on 2012-10-17T15:42:15.000Z:

What steps will reproduce the problem?
1. just start the game with rom and iso.

What is the expected output? What do you see instead?
I've expected music in stereo, but I hear it only in left channel, FM music/sfx plays normal in both channels.

Also I've noticed (potentially) wrong filename manipulations in load routines, assuming 3 char rom-file extension, but it can be 2 char (.md) in the case of no-intro-style named roms.

I'am not sure here is the right place to report this issue(s), sorry if it must be reported in another place.

What version of the emulator are you using (official, SVN revision,...)?
win32 x86 MSVC2010 build selfcompiled from https://github.com/libretro/Genesis-Plus-GX

Comments (5)

  1. Former user Account Deleted

    Comment # 1 originally posted by ekeeke31 on 2012-10-17T17:10:26.000Z:

    I do not have a Mega CD anymore to test it but i think people have reported it happens with the "real thing" as well.

    That's the first thing I noticed when trying the enhanced disc too but I checked and there is no bug with PCM emulation, seems like it's a bug with the game programming instead. Very likely, they did not tested with the stereo cable connected ?

  2. Former user Account Deleted

    Comment # 3 originally posted by ekeeke31 on 2012-10-17T17:31:42.000Z:

    And about "filename manipulations in load routines", if you look at the code, you can see that 3 extension chars is only used when detecting SG-1000 (sg), Master System (sms) & Game Gear (gg) ROM files (and eventually Genesis MDX files which need to be treated differently). Anything else would be considered as a Genesis ROM file, no matter of the extension, so there isn't any potential problem that I know of ...unless a new "preservation group" invents new ROM extensions for these systems as well.

    Off course, it's up to the platform-specific "load_archive" function to make sure the data copied to the extension buffer is a 3 characters string. Copying everything from the . character to the end of the file would be a very bad idea indeed but I assume good devs don't do that ^^

    Both libretro and GX port does the following so they are safe:
    memcpy(extension, &filename[strlen(filename) - 3], 3);

  3. Former user Account Deleted

    Comment # 4 originally posted by 0vetal0 on 2012-10-17T18:01:31.000Z:

    thanks for quick reply and explantation, as always )

  4. Former user Account Deleted

    Comment # 6 originally posted by ekeeke31 on 2012-10-17T21:07:55.000Z:

    Actually, I had another look to this issue and it appears that there should be *some* PCM sound getting out the right channel (according to the previous thread link) but there is absolutely NONE with the emulator.

    The reason is that the game does NOT initialize the PAN registers for the PCM channels, at least not completely (for the title screen, channel 3 panning is set to left & right, then channel 0 panning is set to the left only and only channels 0 & 1 outputs are enabled, resulting in channel 0 being output to left channel only and channel 1 output nowhere).

    My hypothesis is that on reset state, PCM chip registers are all set to $ff, which disables all channels outputs but also initializes the panning to left & right by default for all channels.

    It turns out that doing this when resetting the chip makes PCM sound outputting correctly to left & right (but indeed a little more balanced to the left because one or two channels are accidentally or deliberately panned to this side only).

    Should now be fixed in r724

  5. Log in to comment