Repository navigation
Add adaptive widescreen with left-aligned city HUD and centered menus - #1
Conversation
Launcher (src/sc_launcher.c, recomp-ui submodule at cb7e54b): - Started without a ROM argument, the game shows recomp-ui's launcher: ROM, window, fullscreen, filter, audio, widescreen, language (English/Deutsch/Francais), the Sylt scenario as a mod, and keyboard bindings. Choices go to sc-settings.ini, bindings to keybinds.ini. - Runs other than --qualify apply sc-settings.ini as SC_WIDESCREEN, SC_NINTH, SC_TRANSLATION and SC_PACKET_PATCH where these are not set by hand; --launcher shows the launcher, --no-settings ignores the file. - The pad reads keybinds.ini; a first run writes this host's own layout. - The launcher needs OpenGL 3.3 and recomp-ui does not check for it. The host asks the context for its version first and starts the game directly where there is none (a Hyper-V VM reports GDI Generic 1.1). Save states (from #1): - States carry the PPU's CPU-port latches, the host master clock and the HDMA walker behind a versioned header; the missing latches broke uploads after loading a state taken mid-upload (report and loan screens). A save/restore matched the uninterrupted run for 300 frames and 12 pictures. Old states still load, with a warning. - --qualify gains SC_SAVE_AT/SC_SAVE_PATH and SC_STATE_TRACE. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Brings in the German bank page, the vehicles kept for the margin, the selector's pins and win marks, ALL SCENARIO WON, and the two shared modules the adaptive renderer uses next: src/sc_vehicles.c (ScVehicles_Shown) and src/sc_selector.c. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ive renderer The margins showed neither: the game drops its vehicles once they are right of its 256 columns, and the selector's margin pins and marks cannot be told from the blink-hidden bracket by raw OAM X, with Sylt's not in OAM at all. - object_row draws the vehicles src/sc_vehicles.c keeps (ScVehicles_Shown, handed in by the host each frame as r->vehicles), before the OAM's own sprites, at the size c019 gives them -- their parked slots' size bit is the park's, hence sprite_word_pixel() with the size as a parameter. - scenery draws src/sc_selector.c's pins and marks, the game's and Sylt's (r->sylt), outside the core on the selector's screens -- $0A included once its map is in VRAM, so the fade-in from the fax or the menu shows the whole selector and not the shipped map. Rows follow the PPU (row 0 on line Y), as the core's half of an object crossing the edge does. sc_renderer_test links sc_selector.c; both renderer tests pass. Checked at 32:9: the ship panned across the margin, the pins at scroll $00, and the fade from the fax with Sylt won. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- Title lights stretched, squeezed and seemed to run backwards in the margins. find_lights started from lo = 256 and counted each member's distance to it as a gap, so the first member visited set the pitch to 256 - x (20 px for a light at 236), changing every frame as the row moved. The pitch is now the smallest gap between sorted neighbours, and each row is evaluated once. - Margin sprites sat one row above the core's half of the same object -- the train at the seam. The PPU evaluates a line's sprites one line early, so a sprite's row 0 is on line Y, not Y-1: object_row and the title lights use y - Y. The train at the seam now matches the native picture pixel for pixel. The two renderer tests that encoded y+1 move to the PPU's row. - Selector to fax: the margins stayed black for the fax's whole fade-in and then popped in, because $0C (and $0B) were taken for the selector even after the fax's desk had arrived. The map on screen decides now (BG1 at $3000 in mode 0); the margins fade with the centre. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A fresh install starts with it enabled at 21:9, a 448x224 canvas as wide as the classic widescreen, so the margins are there whatever the window's shape. Switching it off in Mods, or Enabled=0 in sc-video.ini, returns to the classic widescreen; a saved choice is kept either way. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Merged into What landed on top of your branch before and after the merge, so you know what changed under your code:
Checklist item 15 went the other way round, and the issue's premise was wrong. It said the billboard's one-frame lag behind the building is the game's own behaviour and stays, so the margin copy should reproduce it. Measured frame by frame in the native columns, that lag is exactly what makes the board shiver:
Still open from the checklist, and both belong to the renderer -- measured again today on
Release: https://github.com/blackerking/UrbanRecomp/releases/tag/v1.1.0 |
Adds an opt-in Adaptive Widescreen mod that reveals more city columns or rows as the window changes shape. The city toolbar and status display default to the top left; the title, standalone menus and advisor/tutorial pages stay centered. Centered gameplay remains available. Settings persist through the shared Mods launcher, and F11 toggles fullscreen.
Integrates current UrbanRecomp main (
28c280b) and addresses the renderer regressions reported in #2. Main's published engine pin (bc2838d), beam/audio fixes, translations, SRAM persistence and optional launcher behavior are retained. Sylt and Adaptive Widescreen share the launcher.Validation on Windows/SDL3: Release build and both CTests pass. The renderer suite passes 16 comparisons with 13,920 paired CPU/WRAM/clock checks, 142 native-region captures and a separate 300-frame save/restore comparison. The new wide/portrait layout suite adds 7,200 paired state checks and 48 captures, including eight advisor captures checked against original page pixels and an independent stock-PPU background reference with obsolete occlusion removed. City and advisor states both pass six actual window-resize shapes. The preceding regression work also validated launcher toggle/choice/Play/persistence, no-OpenGL fallback and a build without the launcher.
Custom city reconstruction is qualified for the USA ROM. AOT, other regions and every translated/disaster scene are not covered by this validation. Interactions retain the original game's coordinates; pan to interact with city space first seen in a margin.
Renderer behavior, fixes and reproducible checks · Screenshot gallery
Centered title:
Centered advisor over the stationary city:
Left-aligned gameplay controls: