From 3d9f86312e19219278d702117647cebf8c3caad8 Mon Sep 17 00:00:00 2001 From: The99sPuppycat Date: Tue, 28 Apr 2026 21:21:54 +0700 Subject: [PATCH 1/5] build(cores): update fbneo core hash to aaecfed Update the FBNeo core commit hash to the latest version. --- workspace/tg5040/cores/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace/tg5040/cores/makefile b/workspace/tg5040/cores/makefile index a224ff179..5f5c1bafb 100755 --- a/workspace/tg5040/cores/makefile +++ b/workspace/tg5040/cores/makefile @@ -52,7 +52,7 @@ fbneo_REPO = https://github.com/libretro/FBNeo fbneo_CORE = fbneo_libretro.so fbneo_BUILD_PATH = fbneo/src/burner/libretro fbneo_MAKE = make -fbneo_HASH = 6a5cc250c2db8d874a06ee86e302a2a78918b4c1 +fbneo_HASH = aaecfedbb206a79d0e35a0dfe922622b921a66f7 mednafen_pce_fast_REPO = https://github.com/libretro/beetle-pce-fast-libretro mednafen_vb_REPO = https://github.com/libretro/beetle-vb-libretro From 81c44b62429d338bee28823a0e9fbbc5857dd9c0 Mon Sep 17 00:00:00 2001 From: The99sPuppycat Date: Tue, 28 Apr 2026 21:54:37 +0700 Subject: [PATCH 2/5] chore(fbneo): refresh core patches Update the fbneo.patch file to align with the latest core changes, including updated index markers and formatting adjustments in the libretro implementation. --- workspace/tg5040/cores/patches/fbneo.patch | 98 ++++++++++++---------- 1 file changed, 52 insertions(+), 46 deletions(-) diff --git a/workspace/tg5040/cores/patches/fbneo.patch b/workspace/tg5040/cores/patches/fbneo.patch index 0e1dfc9f7..2b4bcf7a0 100644 --- a/workspace/tg5040/cores/patches/fbneo.patch +++ b/workspace/tg5040/cores/patches/fbneo.patch @@ -1,10 +1,10 @@ diff --git a/src/burner/libretro/Makefile b/src/burner/libretro/Makefile old mode 100644 new mode 100755 -index 0b7d646c7..2784aa150 +index 0f097afd7..a70405dd3 100644 --- a/src/burner/libretro/Makefile +++ b/src/burner/libretro/Makefile -@@ -346,6 +346,22 @@ else ifeq ($(platform), classic_armv7_a7) +@@ -359,6 +359,22 @@ else ifeq ($(platform), classic_armv7_a7) CFLAGS += $(PLATFORM_FLAGS) CXXFLAGS += $(PLATFORM_FLAGS) @@ -23,12 +23,12 @@ index 0b7d646c7..2784aa150 + LDFLAGS += -lstdc++ -static-libgcc -static-libstdc++ -lpthread -lm -flto + CFLAGS += $(PLATFORM_FLAGS) + CXXFLAGS += $(PLATFORM_FLAGS) -+ ++ # (armv8 a35, hard point, neon based) ### # Playstation Classic else ifeq ($(platform), classic_armv8_a35) diff --git a/src/burner/libretro/libretro.cpp b/src/burner/libretro/libretro.cpp -index 3726ec60f..30a6c8cd6 100644 +index 9181b189b..1cc0ce3ab 100644 --- a/src/burner/libretro/libretro.cpp +++ b/src/burner/libretro/libretro.cpp @@ -78,7 +78,7 @@ INT32 nAudSegLen = 0; @@ -40,69 +40,75 @@ index 3726ec60f..30a6c8cd6 100644 static int16_t *pAudBuffer = NULL; static char text_missing_files[2048] = ""; -@@ -1550,8 +1550,46 @@ void retro_run() - // current frame will be corrupted, let's dupe instead +@@ -1569,7 +1569,52 @@ void retro_run() pBurnDraw = NULL; } -+ // get flags -+ UINT32 flags = BurnDrvGetFlags(); + +- video_cb(pBurnDraw, nGameWidth, nGameHeight, nBurnPitch); ++ // get flags ++ UINT32 flags = BurnDrvGetFlags(); + -+ if (pBurnDraw && flags & BDF_ORIENTATION_VERTICAL) { -+ int y=0; ++ if (pBurnDraw && flags & BDF_ORIENTATION_VERTICAL) ++ { ++ int y = 0; + -+ UINT8 *pTMP = (UINT8*)malloc(nGameWidth * nGameHeight * nBurnBpp); -+ memcpy(pTMP, pBurnDraw, nGameWidth * nGameHeight * nBurnBpp); ++ UINT8 *pTMP = (UINT8 *)malloc(nGameWidth * nGameHeight * nBurnBpp); ++ memcpy(pTMP, pBurnDraw, nGameWidth * nGameHeight * nBurnBpp); + -+ int newGameWidth = nGameHeight; -+ int newGameHeight = nGameWidth; -+ int newBurnPitch = newGameWidth * nBurnBpp; ++ int newGameWidth = nGameHeight; ++ int newGameHeight = nGameWidth; ++ int newBurnPitch = newGameWidth * nBurnBpp; + + if ((BurnDrvGetFlags() & BDF_ORIENTATION_VERTICAL)) -+ while (y < newGameHeight) { -+ int x = 0; ++ while (y < newGameHeight) ++ { ++ int x = 0; + -+ if ( flags & BDF_ORIENTATION_FLIPPED ) { -+ while (x < newGameWidth) -+ { -+ for (int i = 0; i < nBurnBpp; i++) -+ pBurnDraw[x * nBurnBpp + y * newBurnPitch + i] = pTMP[(nGameHeight - x - 1) * nBurnPitch + y * nBurnBpp + i]; -+ x++; -+ } -+ } else { -+ while (x < newGameWidth) -+ { -+ for (int i = 0; i < nBurnBpp; i++) -+ pBurnDraw[x * nBurnBpp + y * newBurnPitch + i] = pTMP[x * nBurnPitch + (nGameWidth - y - 1) * nBurnBpp + i]; -+ x++; -+ } -+ } -+ y++; -+ } -+ free(pTMP); -+ video_cb(pBurnDraw, newGameWidth, newGameHeight, newBurnPitch); -+ } else { -+ video_cb(pBurnDraw, nGameWidth, nGameHeight, nBurnPitch); -+ } - -- video_cb(pBurnDraw, nGameWidth, nGameHeight, nBurnPitch); ++ if (flags & BDF_ORIENTATION_FLIPPED) ++ { ++ while (x < newGameWidth) ++ { ++ for (int i = 0; i < nBurnBpp; i++) ++ pBurnDraw[x * nBurnBpp + y * newBurnPitch + i] = pTMP[(nGameHeight - x - 1) * nBurnPitch + y * nBurnBpp + i]; ++ x++; ++ } ++ } ++ else ++ { ++ while (x < newGameWidth) ++ { ++ for (int i = 0; i < nBurnBpp; i++) ++ pBurnDraw[x * nBurnBpp + y * newBurnPitch + i] = pTMP[x * nBurnPitch + (nGameWidth - y - 1) * nBurnBpp + i]; ++ x++; ++ } ++ } ++ y++; ++ } ++ free(pTMP); ++ video_cb(pBurnDraw, newGameWidth, newGameHeight, newBurnPitch); ++ } ++ else ++ { ++ video_cb(pBurnDraw, nGameWidth, nGameHeight, nBurnPitch); ++ } bool updated = false; if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE, &updated) && updated) -@@ -1567,7 +1605,7 @@ void retro_run() +@@ -1587,7 +1632,7 @@ void retro_run() // change orientation/geometry if vertical mode was toggled on/off if (old_nVerticalMode != nVerticalMode) { - SetRotation(); -+ //SetRotation(); ++ // SetRotation(); struct retro_system_av_info av_info; retro_get_system_av_info(&av_info); environ_cb(RETRO_ENVIRONMENT_SET_GEOMETRY, &av_info); -@@ -2184,7 +2222,7 @@ static bool retro_load_game_common() +@@ -2217,7 +2262,7 @@ static bool retro_load_game_common() // Initializing display, autorotate if needed BurnDrvGetFullSize(&nGameWidth, &nGameHeight); - SetRotation(); -+ //SetRotation(); ++ // SetRotation(); + BurnSetResolution(nNewWidth, nNewHeight); SetColorDepth(); - VideoBufferInit(); From c1fe945504790c09a492e3eb4b2d282550582ed8 Mon Sep 17 00:00:00 2001 From: The 99's Puppycat Date: Wed, 29 Apr 2026 09:10:12 +0700 Subject: [PATCH 3/5] build(cores): update fbneo core to 8e96a4a Update the fbneo core hash and refresh the associated patches to ensure compatibility with the latest upstream changes. --- workspace/tg5040/cores/makefile | 2 +- workspace/tg5040/cores/patches/fbneo.patch | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/workspace/tg5040/cores/makefile b/workspace/tg5040/cores/makefile index 5f5c1bafb..c5d0c245f 100755 --- a/workspace/tg5040/cores/makefile +++ b/workspace/tg5040/cores/makefile @@ -52,7 +52,7 @@ fbneo_REPO = https://github.com/libretro/FBNeo fbneo_CORE = fbneo_libretro.so fbneo_BUILD_PATH = fbneo/src/burner/libretro fbneo_MAKE = make -fbneo_HASH = aaecfedbb206a79d0e35a0dfe922622b921a66f7 +fbneo_HASH = 8e96a4a38506054b2d9ceb9f5e93689f143359e7 mednafen_pce_fast_REPO = https://github.com/libretro/beetle-pce-fast-libretro mednafen_vb_REPO = https://github.com/libretro/beetle-vb-libretro diff --git a/workspace/tg5040/cores/patches/fbneo.patch b/workspace/tg5040/cores/patches/fbneo.patch index 2b4bcf7a0..9d4fc85c4 100644 --- a/workspace/tg5040/cores/patches/fbneo.patch +++ b/workspace/tg5040/cores/patches/fbneo.patch @@ -1,7 +1,7 @@ diff --git a/src/burner/libretro/Makefile b/src/burner/libretro/Makefile old mode 100644 new mode 100755 -index 0f097afd7..a70405dd3 100644 +index 0f097afd7..a70405dd3 --- a/src/burner/libretro/Makefile +++ b/src/burner/libretro/Makefile @@ -359,6 +359,22 @@ else ifeq ($(platform), classic_armv7_a7) @@ -28,10 +28,10 @@ index 0f097afd7..a70405dd3 100644 # Playstation Classic else ifeq ($(platform), classic_armv8_a35) diff --git a/src/burner/libretro/libretro.cpp b/src/burner/libretro/libretro.cpp -index 9181b189b..1cc0ce3ab 100644 +index 6cf17df9f..59ba0cb05 100644 --- a/src/burner/libretro/libretro.cpp +++ b/src/burner/libretro/libretro.cpp -@@ -78,7 +78,7 @@ INT32 nAudSegLen = 0; +@@ -71,7 +71,7 @@ INT32 nAudSegLen = 0; static UINT8* pVidImage = NULL; static bool bVidImageNeedRealloc = false; @@ -40,7 +40,7 @@ index 9181b189b..1cc0ce3ab 100644 static int16_t *pAudBuffer = NULL; static char text_missing_files[2048] = ""; -@@ -1569,7 +1569,52 @@ void retro_run() +@@ -1579,7 +1579,52 @@ void retro_run() pBurnDraw = NULL; } @@ -94,7 +94,7 @@ index 9181b189b..1cc0ce3ab 100644 bool updated = false; if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE, &updated) && updated) -@@ -1587,7 +1632,7 @@ void retro_run() +@@ -1597,7 +1642,7 @@ void retro_run() // change orientation/geometry if vertical mode was toggled on/off if (old_nVerticalMode != nVerticalMode) { @@ -103,7 +103,7 @@ index 9181b189b..1cc0ce3ab 100644 struct retro_system_av_info av_info; retro_get_system_av_info(&av_info); environ_cb(RETRO_ENVIRONMENT_SET_GEOMETRY, &av_info); -@@ -2217,7 +2262,7 @@ static bool retro_load_game_common() +@@ -2227,7 +2272,7 @@ static bool retro_load_game_common() // Initializing display, autorotate if needed BurnDrvGetFullSize(&nGameWidth, &nGameHeight); From c32bf4a97ed162886ac9adb7bc01b11fc31162ba Mon Sep 17 00:00:00 2001 From: The99sPuppycat Date: Fri, 22 May 2026 20:43:02 +0700 Subject: [PATCH 4/5] chore(fbneo): bump core hash to ce167b80 --- workspace/tg5040/cores/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace/tg5040/cores/makefile b/workspace/tg5040/cores/makefile index c5d0c245f..f850fb0b6 100755 --- a/workspace/tg5040/cores/makefile +++ b/workspace/tg5040/cores/makefile @@ -52,7 +52,7 @@ fbneo_REPO = https://github.com/libretro/FBNeo fbneo_CORE = fbneo_libretro.so fbneo_BUILD_PATH = fbneo/src/burner/libretro fbneo_MAKE = make -fbneo_HASH = 8e96a4a38506054b2d9ceb9f5e93689f143359e7 +fbneo_HASH = ce167b803318f24c1a04bf666f42a6c097a63a20 mednafen_pce_fast_REPO = https://github.com/libretro/beetle-pce-fast-libretro mednafen_vb_REPO = https://github.com/libretro/beetle-vb-libretro From d5a9a24201b59c8d4d0e6f4dfc82e6e39fa25877 Mon Sep 17 00:00:00 2001 From: The99sPuppycat Date: Fri, 22 May 2026 21:03:08 +0700 Subject: [PATCH 5/5] build(fbneo): update core hash to e2e14514 --- workspace/tg5040/cores/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace/tg5040/cores/makefile b/workspace/tg5040/cores/makefile index f850fb0b6..5af8e14e9 100755 --- a/workspace/tg5040/cores/makefile +++ b/workspace/tg5040/cores/makefile @@ -52,7 +52,7 @@ fbneo_REPO = https://github.com/libretro/FBNeo fbneo_CORE = fbneo_libretro.so fbneo_BUILD_PATH = fbneo/src/burner/libretro fbneo_MAKE = make -fbneo_HASH = ce167b803318f24c1a04bf666f42a6c097a63a20 +fbneo_HASH = e2e14514ebda6a88a1df90db7f37a0862e8baa8c mednafen_pce_fast_REPO = https://github.com/libretro/beetle-pce-fast-libretro mednafen_vb_REPO = https://github.com/libretro/beetle-vb-libretro