From 3918ff93607e4da825fb211d4057bbe635cc9c9c Mon Sep 17 00:00:00 2001 From: Charlie Birks Date: Mon, 15 Jan 2024 16:29:32 +0000 Subject: [PATCH] minimal pico gba cart port --- 32blit/gameblit.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/32blit/gameblit.cpp b/32blit/gameblit.cpp index b254a4f..9004f7d 100644 --- a/32blit/gameblit.cpp +++ b/32blit/gameblit.cpp @@ -478,7 +478,7 @@ void render(uint32_t time_ms) if(redrawBG || !updateRunning) { - if(awfulScale) + if(awfulScale || blit::screen.bounds.w < 320) { blit::screen.pen = blit::Pen(145, 142, 147); blit::screen.clear(); @@ -496,6 +496,14 @@ void render(uint32_t time_ms) blit::screen.blit(&dmgScreen, {0, 0, 160, 144}, {80, 48}); #endif +#ifdef BLIT_BOARD_GBACART + for(int y = 0; y < 144; y++) + { + auto ptr = blit::screen.ptr(40, y + 8); + memcpy(ptr, screenData + y * 160, 160 * 2); + } +#endif + #ifndef PICO_BUILD auto gbScreen = screenData;