git.y1.nz

SameBoy

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

commit 87fdf91e0c40253cb127c9f483d1a5af157c7c32
parent f866284b490cdb3fc45f6114cce3b1e620ae50ef
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Fri, 13 May 2022 00:58:21 +0300

Better debugger output for scrolling adjustment

Diffstat:
MCore/debugger.c9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Core/debugger.c b/Core/debugger.c @@ -1727,8 +1727,13 @@ static bool lcd(GB_gameboy_t *gb, char *arguments, char *modifiers, const debugg GB_log(gb, "Glitched line 0 OAM mode (%d cycles to next event)\n", -gb->display_cycles / 2); } else if (gb->mode_for_interrupt == 3) { - signed pixel = gb->position_in_line > 160? (int8_t) gb->position_in_line : gb->position_in_line; - GB_log(gb, "Rendering pixel (%d/160)\n", pixel); + if (((uint8_t)(gb->position_in_line + 16) < 8)) { + GB_log(gb, "Adjusting for scrolling (%d/%d)\n", gb->position_in_line & 7, gb->io_registers[GB_IO_SCX] & 7); + } + else { + signed pixel = gb->position_in_line > 160? (int8_t) gb->position_in_line : gb->position_in_line; + GB_log(gb, "Rendering pixel (%d/160)\n", pixel); + } } else { GB_log(gb, "Sleeping (%d cycles to next event)\n", -gb->display_cycles / 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.