libretro / gambatte-libretro

Hard fork of Gambatte to the libretro API.
http://sourceforge.net/projects/gambatte/
GNU General Public License v2.0
105 stars 79 forks source link

Make it load palettes only when it makes sense #75

Closed sergiobenrocha2 closed 7 years ago

sergiobenrocha2 commented 7 years ago

Loads palettes only when using HLE BIOS (Auto/GBC/GBA) or forcing GBC/GBA with real bios. Make it works more like real hardware while using real bios.

Avoids weird palettes in GBC games when forcing GB:

pokemon - gold version usa europe sgb enhanced -170213-015240

Fixed default palette too (Dark Green).

meepingsnesroms commented 7 years ago

Looks good, glad to see something came of all this bootloader work.

sergiobenrocha2 commented 7 years ago

@meepingsnesroms, gambatte_gb_bootloader should take effect only after restarting the core, right now if you change it from disabled to enabled and reset the game it'll load the bootloader. ~The only thing I found to don't mess with the palettes was this:~

Do you have a better idea?

meepingsnesroms commented 7 years ago

Dont do that, the set bootloader getter only provides an abstract "dump file to buffer" function. The use official bootloader switch is checked in that function, if false it just returns.

Why should the bootloader option only change on core reload?

Gbc games will never get run with gb mode palettes! That pokemon game is a gb game, if available it will use gbc features. Running it with its header value set to gb only will produce this on a real gameboy color.

Some people may want to boot the gb bootloader with a color palette, so it should not be banned, if you don't like it then turn it off or change the palette to "Special 1" it is green and black like the original hardware.

All those extra functions are redundant and will make it very confusing to know what goes where, and the forced bootloader flags dont seem to be used.

All that this pull request should have is the dark green for default palette, and the variable renaming.

sergiobenrocha2 commented 7 years ago

Yeah, that patch is pretty wrong heh

Why should the bootloader option only change on core reload?

Force GBC, load with bios and then change gambatte_gb_bootloader to OFF, then restart the game. You'll get this again https://cloud.githubusercontent.com/assets/5431285/22903920/969d30e0-f221-11e6-95f9-1b53ad87f1a7.png

Gbc games will never get run with gb mode palettes! That pokemon game is a gb game, if available it will use gbc features. Running it with its header value set to gb only will produce this on a real gameboy color.

Yeah, this is on purpose. If I want colorization I get my GBC, not my GB. And messing with rom header value is hack, do we really want to support colorization while forcing GB just for it? Either way, you can just force GBC or use Auto + HLE for it

Some people may want to boot the gb bootloader with a color palette, so it should not be banned, if you don't like it then turn it off or change the palette to "Special 1" it is green and black like the original hardware.

Looking that dmg bios with colorization is very inconsistent I think, again, I'm looking to a real game boy. There's no point in loading a LLE bios and see it with other behavior.

All those extra functions are redundant and will make it very confusing to know what goes where, and the forced bootloader flags dont seem to be used.

Right now only USING_DMG_BIOS is beeing used, by isDmgForced(). USING_CGB_BIOS is for future use.

Edit: maybe isCgbForced() is redundant too? It's not used yet, and seems only with real bios gambatte uses FORCE_CGB right?

sergiobenrocha2 commented 7 years ago

The point in this PR is:

Wanna bootloader accuracy stuff? Fine, but palette follows the real hardware & bootloader pattern/behavior for consistency.

Wanna force GB? Fine, but remember you are playing in a monochromatic device.

meepingsnesroms commented 7 years ago

I will fix that puke palette again.

As for the accuracy argument, the accuracy is there, but it can be turned off if you want it to be.

Removing color palettes from the GB bootloader mode is like saying remove 4x resolution, opengl and vulkan from the ps1 emu because there inaccurate, this is the users choice not ours.

Many users do emulation to have there own custom version of a certain console like the ps1, n64 upscaling and if that doesn't cause any issues that ability should remain available.

meepingsnesroms commented 7 years ago

For the options force GB/GBC/GBA I mean bootmode not behavior so if you want I could make it say force bootmode instead?

sergiobenrocha2 commented 7 years ago

As for the accuracy argument, the accuracy is there, but it can be turned off if you want it to be.

It's consistency too.

Removing color palettes from the GB bootloader mode is like saying remove 4x resolution, opengl and vulkan from the ps1 emu because there inaccurate, this is the users choice not ours.

Well, the user have GBC / GBA mode yet. I can revert that if everyone thinks it's a better idea

For the options force GB/GBC/GBA I mean bootmode not behavior so if you want I could make it say force bootmode instead?

You mean FORCE_DMG / FORCE_CGB flags? No, it's fine. I just don't see consistency between 'Emulated hardware' and palette stuff, I guess this kind of thing really depends on the person interpretation. I see that option like a whole thing & more strict, whatever 'GB colorization says'

sergiobenrocha2 commented 7 years ago

Ok, I'll do another PR