Repository navigation
madeira japanese locale to play visual novels - #567
nekodesusan-prog wants to merge 9 commits into
Conversation
Game details > Compatibility > Japanese locale (or env.MADEIRA_JAPANESE = 1) runs a game the way Japanese games and visual novels expect: - LC_ALL = ja_JP.UTF-8, so Wine's system and user locale are ja-JP and the ANSI/OEM code page is 932 (Shift-JIS); - MADEIRA_NLS_EXTRA = 1, with Wine's c_932/936/949/950.nls now bundled in nls/extra (the IPA had no CJK code page tables at all, so code page 932 could not be loaded); - the bundled Noto Sans JP (SIL OFL 1.1) is copied into C:\windows\Fonts and MS Gothic / MS PGothic / MS UI Gothic / MS Mincho / Meiryo / Yu Gothic (and their Japanese names) are mapped onto it in HKCU\Software\Wine\Fonts\Replacements, written before the wineserver loads the registry. CI: jobs run on vars.MADEIRA_RUNNER, else GitHub's macos-26 image, where tools/build/ci-select-xcode.sh selects Xcode 27; claude/** branches build on push. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A5HxVaiawi5vZqXppouYTG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A5HxVaiawi5vZqXppouYTG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A5HxVaiawi5vZqXppouYTG
GitHub's macos-26 image ships Xcode 26.0-26.6 only. The one iOS 27 SDK field the ntdll unix side reads is already detected by its build script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A5HxVaiawi5vZqXppouYTG
Xcode 26.x's Metal toolchain defines __METAL_MEMORY_FLAGS_NONE__ but its __metal_atomic_fetch_add_explicit still takes four arguments, so the #ifdef chose the Xcode 27 form and air_tessellation.metal failed to compile. The shader now compiles with the five-argument form and, on a 'too many arguments' error, again with four. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A5HxVaiawi5vZqXppouYTG
Wine's get_teb64() (dlls/opengl32/unix_private.h) reads the TEB32 at the bare 32-bit guest address. On iOS a 32-bit pseudo-process lives at host window base + guest address, so every 32-bit program that loads opengl32.dll faulted in its thread attach (opengl32.dll failed to initialize, c0000142; AI6WIN.exe: fault at 0x7ffc2fdc, window base 0x7100000000). opengl32_wgl_ios.c and opengl32_thunks_ios.c wrap Wine's sources with a get_teb64() that adds ios_wow_base(); a 64-bit caller (base 0) is unchanged. Other 32-bit pointers in the generated wow64 thunks still go through ULongToPtr. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A5HxVaiawi5vZqXppouYTG
…dow" This reverts commit 34ffa64.
patches/wine-opengl-winios.patch (32-bit opengl32 on iOS: wow64 thunks that convert every guest pointer through the WoW64 window, get_teb64() included, and the winios GLES contexts) was only applied by hand (docs/BUILDING.md), so CI builds compiled Wine's unpatched opengl32 and every 32-bit program that loads opengl32.dll died in its thread attach: Ningen Debris (c0000142), The Fruit of Grisaia (dxdiagn's DirectX probe through ddraw/wined3d, then 'DirectX 9.0c required'). tools/build/apply-wine-patches.sh applies each patch, skips one already applied and stops on one that does neither; build-wine.sh, the ntdll unix build, the i386 build and the windows runtime component run it. The i386 cache key now includes the patches. Replaces the previous commit's single get_teb64 wrapper, which the patch supersedes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A5HxVaiawi5vZqXppouYTG
Japanese-locale sessions asked for code page 10000 repeatedly ([nls-missing] code page 10000 has no table) while the game's fonts were loaded; Wine's font code converts Mac-platform font names with it. Unmodified from the Wine fork; served with env.MADEIRA_NLS_EXTRA = 1 like the CJK tables. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A5HxVaiawi5vZqXppouYTG
… a bundled Japanese font (#567) The Japanese-locale part of #567 by nekodesusan-prog. Game details > Compatibility > Japanese locale (LibraryPrefs.japanese, env.MADEIRA_JAPANESE, default off): the game runs with a Japanese system and user locale (LC_ALL = ja_JP.UTF-8, ANSI and OEM code page 932), env.MADEIRA_NLS_EXTRA supplies c_932 and the other CJK tables from the bundle's nls/extra folder, and Noto Sans JP (SIL OFL 1.1, fonts-ja) is installed into the prefix with the Windows Japanese font names mapped onto it in HKCU\Software\Wine\Fonts\Replacements. docs/JAPANESE.md describes it. Left out of this squash, to be sent separately if wanted: the pull request's CI changes (GitHub-hosted runners, the Xcode selection script, the claude/** push triggers and the runner probe), the wine-patch script wired into the build scripts, the Metal atomic builtin probe and the opengl32 commit with its revert. Co-authored-by: nekodesusan-prog <271027775+nekodesusan-prog@users.noreply.github.com>
An ours-strategy merge of the pull request heads squashed above, so GitHub marks them merged: #575, #574, #556, #541, #540, #568, #564, #546, #544 and #571. #567 was taken in part (its Japanese-locale files, credited to its author) and is closed with a pointer to that commit; #572 waits with madeira-dock#10. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Merged in part, with credit, as commit 025c0ca on main (author nekodesusan-prog, Co-authored-by trailer, so it shows in the contributors list and in the commit details). Thank you for the work. What went in: the Japanese locale option (Game details > Compatibility > Japanese locale; Left out, so this pull request is closed rather than merged whole: the CI changes (GitHub-hosted runners, the Xcode selection script, the claude/** push triggers and the runner probe), the wine-patch script wired into the build scripts, the Metal atomic builtin probe, and the opengl32 commit with its revert. If any of those are wanted on their own, a separate pull request for each is welcome. |
A lot of visual novels need a Japanese locale and fonts etc.. I’ve managed to run a few visuals that didn’t boot or the font was broken.