From 9359f7a2d9f9068ba1b52635601c85df002cb667 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Sat, 29 Mar 2025 19:12:35 +0300 Subject: [PATCH] Fix SGB attribute and tile transfers on BE platforms, fixes #693 --- Core/sgb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Core/sgb.c b/Core/sgb.c index dd54222..a2a4ec8 100644 --- a/Core/sgb.c +++ b/Core/sgb.c @@ -640,7 +640,9 @@ void GB_sgb_render(GB_gameboy_t *gb) for (unsigned x = 0; x < 8; x++) { *data |= pixel_to_bits[gb->sgb->screen_buffer[(tile_x + x) + (tile_y + y) * 160] & 3] >> x; } - *data = LE16(*data); + if (gb->sgb->transfer_dest == TRANSFER_PALETTES || gb->sgb->transfer_dest == TRANSFER_BORDER_DATA) { + *data = LE16(*data); + } data++; } }