Repository navigation
gba: allocate the frame buffers before the ROM cache; skip only when behind - #11
Merged
Merged
Conversation
…behind Every GBA game showed a white screen (with sound): the core was running and rendering, but no frame reached the display. gpSP's ROM cache takes 1 MB PSRAM blocks until it has 16 of them or one fails, which left ~320 KB, and the two 150 KB frame buffers video_cb alternates between were allocated on first use after that: the second one failed, and video_cb returned before pushing every frame. - init_gba allocates both frame buffers before the core starts. - The cache's heap blocks stop short of the last 2 MB of PSRAM, for the pause menu's screenshots and a save state's 425 KB buffer (which, with no exceptions, would abort rather than throw). 16 MB ROMs now page their last couple of MB from the card, as gpSP does when the cache is smaller than the ROM. Also: the frame pacing counted a frame that started just after its deadline (the sleep wakes up to a 1 ms tick late) as behind, so every other frame was skipped even at 4 ms a frame (Metroid Fusion: 1194 rendered, 1193 skipped). A frame is now behind only a quarter frame late: 1785 rendered, 4 skipped. Minish Cap 1657 / 135, Fire Red 1647 / 115. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ESP-IDF Size Report for 'Tab5 Emu'
FLASH uses app .bin size or json2 flash sum. RAM sums DRAM+IRAM via idf_size. Percentages shown when totals are available. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every GBA game showed a white screen (with sound): the core was running and
rendering, but no frame reached the display. gpSP's ROM cache takes 1 MB
PSRAM blocks until it has 16 of them or one fails, which left ~320 KB, and
the two 150 KB frame buffers video_cb alternates between were allocated on
first use after that: the second one failed, and video_cb returned before
pushing every frame.
pause menu's screenshots and a save state's 425 KB buffer (which, with no
exceptions, would abort rather than throw). 16 MB ROMs now page their
last couple of MB from the card, as gpSP does when the cache is smaller
than the ROM.
Also: the frame pacing counted a frame that started just after its deadline
(the sleep wakes up to a 1 ms tick late) as behind, so every other frame was
skipped even at 4 ms a frame (Metroid Fusion: 1194 rendered, 1193 skipped).
A frame is now behind only a quarter frame late: 1785 rendered, 4 skipped.
Minish Cap 1657 / 135, Fire Red 1647 / 115.
🤖 Generated with Claude Code