Repository navigation
Conversation
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>
2 of 3 tasks
Author
|
While upstream CI is queued, I ran the
|
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.
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:
host/loader:DM_SCREEN_ASPECTfrom 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 withscreen_aspect wide, so nothing changes for any other game, and 16:9 leaves every stub on the game's original instructions.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).game: the stubs indm/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.pyand 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 runandmake -C dm/gfx/tests GAME=0400A3A01EE4C000 runpass (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 plainmaintoo, on a loaded machine; it passed in the full run.Game: Pokémon Pokopia
0400A3A01EE4C000v327680, packed from a NUP into a Mac app on this branch.Base: the game runs, measurements and screenshots were made on this branch based on
b06f4e0e. It is now rebased ontoce370e12, which applied without conflicts. On the rebased tip the tool tests pass and the host builds and passesmake -C dm/host/tests GAME=0400A3A01EE4C000 run. The game was not run again on it, becausemain'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 impactlists every game (the launcher settings and the loader are shared), but the new code path only runs whenDM_SCREEN_ASPECTis 1.8 or more, which the launcher offers only for a profile withscreen_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 thismain.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:
memoryline)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):
Title, loading screen and fades (development runs; before this they kept black bars and the fades covered only the middle 16:9):
Text, button bars and the map: before (text scaled by width / 1920), after, and 16:9 for reference:
The door wipe: before, it stopped 1920 pixels in; after, black across 21:9 with the house centred:
The title screen's photos (the album's textures keep their 16:9 size):
Docs
docs/reference/rendering.mdlists Pokopia;docs_symptoms.pyanddocs_patches.pywere run🤖 Generated with Claude Code