bardeci / gambatte-dms

Gambatte-DMS is a GB/GBC emulator for handheld devices, using a modified Gambatte core.
GNU General Public License v2.0
66 stars 23 forks source link

Add gameboy advance "emulation" for GBA enhanced GBC games. #10

Open nl255 opened 4 years ago

nl255 commented 4 years ago

Some gameboy color games can detect if they are running on a gameboy advance and unlock extra features. It would be nice to have an option to be able to simulate running on a gameboy advance to make those features work without having to patch the rom. Apparently it is fairly simple to do (and some versions of gambatte already support it) as the only difference is that the CPU register 'b' holds a value of 0 when a GBC is first turned on and a value of 1 on a GBA.

bardeci commented 4 years ago

I will look into it.

nl255 commented 4 years ago

As for hardware detection games I found this document which hopefully will help. I am not sure if the Accumulator value is properly set in your port of Gambatte but if it is not then some GBC exclusive games will fail to run.

nl255 commented 4 years ago

Is there any update on this? From a quick look at the source code it appears that libgambatte already has support for that (search for "GBA_CGB" in include/gambatte.h or "isgba" in several places including bootloader.cpp, gambatte.cpp, and initstate.cpp) and it just needs a menu option.