Skip to content

game: Pokémon Pokopia renders 21:9 and 32:9 screens on v327680 - #2678

Open
Ayymeric wants to merge 3 commits into
seedds:mainfrom
Ayymeric:pokopia-ultrawide
Open

Ayymeric wants to merge 3 commits into
seedds:mainfrom
Ayymeric:pokopia-ultrawide

Conversation

@Ayymeric

Copy link
Copy Markdown

Requested by Aymeric · project thread

What and why

On a 21:9 or 32:9 monitor Pokopia's picture is a 16:9 band with black bars. This lets the game render the screen's own shape, 1080 pixels tall with more at the sides (Hor+), with the gameplay HUD at the screen's edges and the menus in the middle 16:9 area. It is off unless the player picks a wide Picture shape in the Mac launcher (21:9 2560x1080, 21:9 3440x1440, 32:9).

Three commits:

  1. host/loader: DM_SCREEN_ASPECT from 1.8 to 4 keeps the output 1080 tall and takes the ratio's width (a multiple of 8; 2.37 gives 2560x1080). The present takes that shape the same way a taller shape does, and the frame step state page carries the width and ratio for a build's stubs (+0xa0, +0xa4, +0xa8). A profile opts in with screen_aspect wide, so nothing changes for any other game, and 16:9 leaves every stub on the game's original instructions.
  2. packing/settings: a launcher choice left with one option on a platform is not shown (Pokopia's Picture shape on iOS, where the wide shapes are not offered).
  3. game: the stubs in dm/games/0400A3A01EE4C000/patches.py, gated to the v327680 main (816c5358…). They widen KTGL's 16:9 render targets, swap chain, render-width getters and its own 1920.0 viewport constants, give 16:9 cameras the screen's ratio, stretch full-screen fades and loading pictures, move the gameplay HUD's edge panes out, keep the UI's text, map and screen-space rects on the 16:9 canvas, and leave the album's photo textures alone. The game note's new section, Screen shape wider than 16:9, says where each one was found and what is still open.

Limits, said up front: the stubs are for v327680 only, the build I have. v655360 (Ver. 2.0.1, the profile's tested build) is not touched; its addresses would need carrying over with nso_fnmap.py and checking on that build. Only the Mac launcher offers the wide shapes.

Checked

  • Tests: dm/tools/tests (test_docs, test_settings, test_launcher_settings, test_game_profile, test_patches, test_env_switches, test_player_env, test_usage, lint) pass; make -C dm/host/tests GAME=0400A3A01EE4C000 run and make -C dm/gfx/tests GAME=0400A3A01EE4C000 run pass (run on the follow-up PR's branch, which contains this one). check_t_feedback ("with nothing running: a commit") failed in 1 of 6 runs on plain main too, on a loaded machine; it passed in the full run.

  • Game: Pokémon Pokopia 0400A3A01EE4C000 v327680, packed from a NUP into a Mac app on this branch.

    • Played by me in the Mac app at 2560x1080, fullscreen, for more than 5 hours, through the end of the first region. The problems that play turned up are fixed in this PR: black bars and 16:9-only fades on the title and loading screens, sheared title photos, squeezed text and uneven button-bar pills, spread-out map icons, and the door wipe stopping 1920 pixels in.
    • Headless at 2560x1080 against 16:9 on the same save: the hut, the walk to the first outdoor area, the main menu, the bag, the Pokédex, the map, the button guide and the pick-up prompt. Same sizes and places, no red line. At 16:9 the picture and log match the unpatched build.
    • Not checked: the regions after the first, photo mode, movies, the 3440x1440 and 32:9 shapes, the iPhone and iPad.
  • Base: the game runs, measurements and screenshots were made on this branch based on b06f4e0e. It is now rebased onto ce370e12, which applied without conflicts. On the rebased tip the tool tests pass and the host builds and passes make -C dm/host/tests GAME=0400A3A01EE4C000 run. The game was not run again on it, because main's shader chain changed in between (d6b05d7481e5 → d254f45e8002), which means another four-hour shader build here.

  • Devices and OS: Mac mini M4, 16 GB, macOS 27.2; a 2560x1080 monitor.

  • regress.py: not run on other games. regress.py impact lists every game (the launcher settings and the loader are shared), but the new code path only runs when DM_SCREEN_ASPECT is 1.8 or more, which the launcher offers only for a profile with screen_aspect wide; no other profile has it, and the settings change only hides a choice row left with one option. The only other game I have locally is Mario Kart World, whose shaders would need a full rebuild for this main.

  • Measurements on this branch's Mac app (all 131,382 shaders), M4 Mac mini 16 GB, headless, docked, the same save and route (out of the hut to the first outdoor area, then standing), medians of frames 8,400 to 13,000, two runs each:

    16:9 (1920x1080) 21:9 (2560x1080)
    Frame rate 59.3 fps (both runs) 59.3 fps (both runs)
    Frame time p50 17.0 / 17.1 ms 16.8 / 16.8 ms
    GPU time per frame p50 11.6 / 11.8 ms 15.5 / 15.3 ms
    CPU (100% = one core) 84 / 86% 96 / 94%
    Memory, resident (the host's memory line) 5,832 / 5,955 MB 5,937 / 6,057 MB
    GPU memory allocated 4,075 / 4,187 MB 4,317 / 4,287 MB

    21:9 draws a third more pixels: about 4 ms more GPU time a frame and about 100 to 200 MB more memory, and it holds 60 fps on the M4. No red line in any run.

Screenshots

16:9 and 21:9 on the same spot (this branch's build, headless):

16:9 vs 21:9

Title, loading screen and fades (development runs; before this they kept black bars and the fades covered only the middle 16:9):

Title, loading and fades at 21:9

Text, button bars and the map: before (text scaled by width / 1920), after, and 16:9 for reference:

Text and map fix

The door wipe: before, it stopped 1920 pixels in; after, black across 21:9 with the house centred:

Door wipe fix

The title screen's photos (the album's textures keep their 16:9 size):

Title photos fix

Docs

  • The findings are in the game note (Screen shape wider than 16:9) and the picture-shape entry in docs/reference/rendering.md lists Pokopia; docs_symptoms.py and docs_patches.py were run
  • A chain tool changed (no)
  • No game files, keys or data extracted from a game in the change or the attachments

🤖 Generated with Claude Code

seedds and others added 3 commits November 14, 2026 16:19
A ratio from 1.8 to 4 (2.37 for a 2560x1080 screen) keeps the output 1080 tall and takes the ratio's width, a multiple of 8, and the present takes that shape (mtl_present_screen, as a taller shape does). The frame step state page carries it for a build's stubs: +0xa0 the output width, +0xa4 width / 1080 (the cameras' ratio), +0xa8 the width as a float; 0 is 16:9 and leaves every stub on its original instructions. A profile opts in with screen_aspect wide (DM_GAME_SCREEN_ASPECT 2); the launcher then offers 21:9 2560x1080, 21:9 3440x1440 and 32:9 under Picture shape on the Mac. Match screen and the Duo's 1.43 stay for screen_aspect on.

The first profile to use it is Pokémon Pokopia's, in the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A setting whose options are all for other games or platforms showed one choice with nothing to pick: Pokémon Pokopia's Picture shape on iOS, where the wide shapes are not offered. The language row keeps its single entry, which names the game's language.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With DM_SCREEN_ASPECT wider than 16:9 the v327680 main (816c5358) renders the screen's shape, 1080 tall, Hor+, with the gameplay HUD at the screen's edges. The stubs (patches.py) widen KTGL's 16:9 render targets, swap chain, render width getters and its own 1920.0 viewport constants, give 16:9 cameras the screen's ratio, stretch full-screen fades and loading pictures, move the gameplay HUD's edge panes out, keep the UI's text and map scale and its screen-space rects on the 16:9 canvas, and leave the album's photo textures alone. The note says where each was found and what is open.

Checked headless on an M4 Mac mini at 2560x1080 against 16:9, and played by the user in the Mac app at 2560x1080 for more than 5 hours, through the end of the first region; the problems that play found are fixed here. v655360 (Ver. 2.0.1) is not touched: these stubs are gated to the v327680 build ID.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added host The Horizon host: SVCs, services, threads, memory (dm/host) rewriter The NSO rewriter and per-build patches tools Tools and scripts (dm/tools, scripts) docs Documentation game: 0400A3A01EE4C000 Pokémon Pokopia labels Nov 14, 2026
@Ayymeric

Copy link
Copy Markdown
Author

While upstream CI is queued, I ran the tests.yml jobs locally on this branch (M4 Mac mini, macOS 27.2, GAME=010015100B514000 as in CI; the tip of #2679, which contains #2678):

  • Pass: tool tests (every dm/tools/tests, dm/ios/tests, dm/gfx/tests Python test), make -C dm/host/tests tsan memory-tsan, make -C dm/gfx/tests check_t_thermal thermal-tsan, t_tex, make -C dm/gfx/tex/tests asan, dmhost for 010015100B514000, 0100535012974000, 010014E00DB56000 and 0400A3A01EE4C000, dm/ios/tools/compile_check.py; earlier also make -C dm/gfx/tests GAME=0400A3A01EE4C000 run.
  • make -C dm/host/tests run and asan: both stop at t_pollwait (alarm). The same binary built from main (ce370e12) hangs the same way on this Mac.
  • tsan-threads: t_preempt reported "worker saw the flag 0" in one run. Rerun 5 times: 0 of 5 failed on this branch, 2 of 5 on main.
  • clang-tidy (ratchet), the failed check on game: Pokémon Pokopia renders 21:9 and 32:9 screens on v327680 #2678: the nine file/check pairs above the baseline are all in dm/gfx/tests files this PR does not touch (t_pfv.m, t_res_commit.m, t_sparse_copy.m, t_upload_src.m, t_vk_swapchain_life.m, t_wline.m, t_zero_depth.m); pr/fstep-hitch-grace (run 43608307174) fails with the same nine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation game: 0400A3A01EE4C000 Pokémon Pokopia host The Horizon host: SVCs, services, threads, memory (dm/host) rewriter The NSO rewriter and per-build patches tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants