ITotalJustice / notorious_beeg

gba emulator written in c++23
https://notorious-beeg.netlify.app/
GNU General Public License v3.0
41 stars 4 forks source link

add dmg emulation support #24

Closed ITotalJustice closed 2 years ago

ITotalJustice commented 2 years ago

since writing this gba emulator (in c++), it's inspired me to re-write my gameboy emulator https://github.com/ITotalJustice/TotalGB in modern c++, using a few of the optimisation techniques that i learned doing this project.

the initial goal is to have both emulators behave separate from each other. the only thing shared is some of the memory in mem struct (vram, pram, io, rom, wram). even then however, only rom mem will be used, just to simplify things.

the run loop will add an if (system == dmg) run_dmg();

the apu in gba can easily be re-purposed as well.

the final goal is to have the dmg/gbc emulation behave as it would on an actual gba. this means that gb games that dont work on the gba should also not work in this emu. any bugs / sounds glitches that are present on the gba should also be present in this emu.

NOTE: certain gbc games have a gba mode, by detecting that its running on a gba, it changes the colour palette (and thats about it iirc). for now, i'll stub this so all games (namely shantae) believe its running on a gba.