git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit 66f62d696c9664121887de43c33d234c17f17e63
parent aa2bdf2a1c2e1e004703b6e8bb61cb1cd7e257fc
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Thu, 24 Dec 2020 20:50:47 +0200

More window fixes

Diffstat:
MCore/display.c10++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/Core/display.c b/Core/display.c @@ -983,10 +983,9 @@ void GB_display_run(GB_gameboy_t *gb, uint8_t cycles) gb->cycles_for_line += 2; GB_SLEEP(gb, display, 32, 2); mode_3_start: - /* Todo: verify timings */ + /* TODO: Timing seems incorrect, might need an access conflict handling. */ if ((gb->io_registers[GB_IO_LCDC] & 0x20) && - (gb->io_registers[GB_IO_WY] == 0) && - gb->current_line == 0) { + gb->io_registers[GB_IO_WY] == gb->current_line) { gb->wy_triggered = true; } @@ -1241,11 +1240,10 @@ abort_fetching_object: GB_SLEEP(gb, display, 11, LINE_LENGTH - gb->cycles_for_line - 2); /* TODO: Verify double speed timing - TODO: Line 0 behaves differently when enabling the window during the transition between mode 2 to 3 + TODO: Timing differs on a DMG */ if ((gb->io_registers[GB_IO_LCDC] & 0x20) && - (gb->io_registers[GB_IO_WY] == gb->current_line || - gb->io_registers[GB_IO_WY] == gb->current_line + 1)) { + (gb->io_registers[GB_IO_WY] == gb->current_line)) { gb->wy_triggered = true; } GB_SLEEP(gb, display, 31, 2);

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.