EmulatorArchive / genplus-gx

Automatically exported from code.google.com/p/genplus-gx
Other
1 stars 0 forks source link

[libretro] PS enhanced soundtrack plays at left channel only #288

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

Original issue reported on code.google.com by 0vet...@gmail.com on 17 Oct 2012 at 3:42

GoogleCodeExporter commented 9 years ago
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 ?

Original comment by ekeeke31@gmail.com on 17 Oct 2012 at 5:10

GoogleCodeExporter commented 9 years ago
here we go:

http://www.piersolar.com/board/viewtopic.php?f=30&t=1597

I would like confirmation from real PS + Mega CD owner though as it could be 
working fine on different hardware revisions, which would be interesting to 
know.

Original comment by ekeeke31@gmail.com on 17 Oct 2012 at 5:18

GoogleCodeExporter commented 9 years ago
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);

Original comment by ekeeke31@gmail.com on 17 Oct 2012 at 5:31

GoogleCodeExporter commented 9 years ago
thanks for quick reply and explantation, as always )

Original comment by 0vet...@gmail.com on 17 Oct 2012 at 6:01

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
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

Original comment by ekeeke31@gmail.com on 17 Oct 2012 at 9:07