ekeeke / Genesis-Plus-GX

An enhanced port of Genesis Plus - accurate & portable Sega 8/16 bit emulator
Other
676 stars 194 forks source link

ENHANCEMENT: Sega Master System, set the YM2413 chip to "1" / "Always Enabled" by default rather than "2" / "AUTO" / "Whitelisted" #412

Closed lonkelle closed 2 years ago

lonkelle commented 2 years ago

On this line specifically: https://github.com/ekeeke/Genesis-Plus-GX/blob/4a899e8262f2f2180db8799245ce9c7881068ad3/gx/config.c#L115

it should be config.ym2413 = 1; /* ALWAYS ENABLED */

Reason being, Sega Master System games that have fan translations / hacks / anything that changes your whitelist hash of the file AUTO doesn't work. The Pokemon hacking community had this exact same problem with whitelisting the RTC instead of always having it be available for ROMs but this bug is easier to overlook unless you really like Phantasy Star 1 YM2413 soundchip music and fan translations / hacks (it has plenty: https://www.romhacking.net/games/871/). Each hack breaks the YM2413 soundchip music in your emulator core. Some front-ends allow your config file to be configured by the user but many front ends don't allow this setting to be configurable by the user (and no emulator front-end author has noticed such a small detail like this so far in my testing as they've left it the same as your default).

Since (by default) most Genesis Plus GX front ends don't allow this setting to be changed and users need this feature for (at the very least) the hack translation for Phantasy Star 1 to work, can't we change that line to config.ym2413 = 1; /* ALWAYS ENABLED */ since doing so doesn't break anything but does fix the sound chip support for translated games for the Sega Master System without user intervention?

Any pushback to this - and if so, what's the whitelisting process to get SMS game hacks enabled for the AUTO whitelisting of that specific soundchip?

ekeeke commented 2 years ago

FM emulation has a performance cost, that's why it is only emulated when requested or when necessary. This was also an optional module that only existed in Japan back then. This is a design choice and I won't change it, sorry.

Since (by default) most Genesis Plus GX front ends don't allow this setting to be changed

That's simply not true. The config file you are showing is the config file for the Gamecube/Wii standalone version, which has an option to change this setting between AUTO, ON or OFF. The other big frontend is retroarch or anything that use libretro backend and again, there is a core setting (implemented in libretro.c) to change this option. If this option is missing in a particular frontend, you can ask it to be added to the people maintaining it.

After that, it is just a matter of leaving this setting to "always ON" if you want to play hacks not in internal database.