Peanut-GB icon indicating copy to clipboard operation
Peanut-GB copied to clipboard

CGB Support

Open froggestspirit opened this issue 3 years ago • 5 comments

I added CGB support here: https://github.com/froggestspirit/Peanut-GB

I only really tested this with Pokemon Crystal, but seemed to work fine. I wasn't sure if you might want to merge it, or copy parts of it over, I know there's some formatting differences, and also the way I handled sram.

I should also note, this might only be working in the SDL2 example for now, since some changes to the C file were necessary there for rendering the palettes.

froggestspirit avatar Jan 30 '22 20:01 froggestspirit

Thank you for your work! 😃

I would be happy if you could make a pull request, and then I can start reviewing the code. At a glance:

  • the formatting of code you haven't modified shouldn't be altered. So maybe we could cherry-pick 04cef564d25bcdac3471c8a6dc690b733102b154 ?
  • the CGB code should be within ifdefs to allow developers to disable it if their target environment has very little RAM and processing power.
  • ~uint8_t should only be used for 8-bit integers and not for bit fields that aren't 8-bits.~ Using uint8_t for bitfields was correct.
  • group the CGB if statements on lines 3646 to 3652 together.
  • why is num_rom_banks_mask reverted to the previous version? Those three ROM size masks aren't ever used apparently.

deltabeard avatar Feb 02 '22 09:02 deltabeard

The repository has been archived, I guess the author has no intention to make these changes nor to make it a pull request anymore

victorbnl avatar Apr 03 '22 09:04 victorbnl

I plan on adding this feature in v2 as this will require an API change. I'll plan and put more thought into this at a later date.

deltabeard avatar May 30 '22 22:05 deltabeard

can I use a st7789vw 2 inch display or can you make support for it please.

kevinjones120 avatar May 09 '24 09:05 kevinjones120

can I use a st7789vw 2 inch display or can you make support for it please.

That's not relevant to this issue. You can probably use that display but you have to add support for it yourself. This repository is just for the emulation core. The display driver has to be written by yourself.

deltabeard avatar May 09 '24 09:05 deltabeard