SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit aa5fc484d1d8155a3b8bbc145cf32b4c05c334a0 parent 849ae42b9929458520be93f11b1a16551bfc2364 Author: Lior Halphon <LIJI32@gmail.com> Date: Tue, 3 Dec 2024 23:22:52 +0200 Fix m3_lcdc_obj_en_change_variant.gb Diffstat:
| M | Core/sm83_cpu.c | 5 | ++++- |
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Core/sm83_cpu.c b/Core/sm83_cpu.c @@ -227,7 +227,10 @@ static void cycle_write(GB_gameboy_t *gb, uint16_t addr, uint8_t value) uint8_t old_value = GB_read_memory(gb, addr); GB_advance_cycles(gb, gb->pending_cycles - 2); GB_display_sync(gb); - if (gb->model != GB_MODEL_MGB && gb->position_in_line == 0 && (old_value & GB_LCDC_OBJ_EN) && !(value & GB_LCDC_OBJ_EN)) { + if (gb->model != GB_MODEL_MGB && gb->position_in_line == 0 && !(value & GB_LCDC_OBJ_EN)) { + old_value &= ~GB_LCDC_OBJ_EN; + } + else if (gb->during_object_fetch && !(value & GB_LCDC_OBJ_EN)) { old_value &= ~GB_LCDC_OBJ_EN; }
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.