From 98a39ae49adb582973f34cfdb941c3201c892ee9 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Wed, 14 Apr 2021 23:39:07 +0300 Subject: [PATCH] ATTR_CHR does not seem to wrap around screen (only lines/columns) --- Core/sgb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Core/sgb.c b/Core/sgb.c index d535f214..894ae966 100644 --- a/Core/sgb.c +++ b/Core/sgb.c @@ -267,7 +267,6 @@ static void command_ready(GB_gameboy_t *gb) #endif uint8_t x = command->x; uint8_t y = command->y; - count = MIN(count, 20 * 18); if (x >= 20 || y >= 18) { /* TODO: Verify with the SFC BIOS */ break; @@ -282,7 +281,7 @@ static void command_ready(GB_gameboy_t *gb) x++; y = 0; if (x == 20) { - x = 0; + break; } } } @@ -292,7 +291,7 @@ static void command_ready(GB_gameboy_t *gb) y++; x = 0; if (y == 18) { - y = 0; + break; } } }