SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 486f8a2c109b6f212ad7ba8380964c25378ba543 parent 06b744259be749cb7a5d6611d76b04581541ea99 Author: Lior Halphon <LIJI32@gmail.com> Date: Fri, 26 Nov 2021 14:10:35 +0200 Merge pull request #420 from SnowyMouse/cgb_mode Add GB_is_cgb_in_cgb_mode Diffstat:
| M | Core/gb.c | 5 | +++++ |
| M | Core/gb.h | 1 | + |
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Core/gb.c b/Core/gb.c @@ -1319,6 +1319,11 @@ bool GB_is_cgb(GB_gameboy_t *gb) return (gb->model & GB_MODEL_FAMILY_MASK) == GB_MODEL_CGB_FAMILY; } +bool GB_is_cgb_in_cgb_mode(GB_gameboy_t *gb) +{ + return gb->cgb_mode; +} + bool GB_is_sgb(GB_gameboy_t *gb) { return (gb->model & ~GB_MODEL_PAL_BIT & ~GB_MODEL_NO_SFC_BIT) == GB_MODEL_SGB || (gb->model & ~GB_MODEL_NO_SFC_BIT) == GB_MODEL_SGB2; diff --git a/Core/gb.h b/Core/gb.h @@ -765,6 +765,7 @@ __attribute__((__format__ (__printf__, fmtarg, firstvararg))) void GB_init(GB_gameboy_t *gb, GB_model_t model); bool GB_is_inited(GB_gameboy_t *gb); bool GB_is_cgb(GB_gameboy_t *gb); +bool GB_is_cgb_in_cgb_mode(GB_gameboy_t *gb); bool GB_is_sgb(GB_gameboy_t *gb); // Returns true if the model is SGB or SGB2 bool GB_is_hle_sgb(GB_gameboy_t *gb); // Returns true if the model is SGB or SGB2 and the SFC/SNES side is HLE'd GB_model_t GB_get_model(GB_gameboy_t *gb);
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.