diff --git a/README.md b/README.md index d9d9ff551e..f26cb9b789 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,7 @@ proposing anything to it. - **Jesse** ([@JesseLovelace](https://github.com/JesseLovelace)): Steam Cloud saves, faster game launches, and fixes that let more games run - **Dan Perks** ([@danperks](https://github.com/danperks)): in-app JIT without StikDebug, and pairing without a computer - **bahacan16** ([@bahacan16](https://github.com/bahacan16)): Direct3D 12 and DXMT fixes, game launcher windows, per-game settings, PlayStation controllers, and save backups +- **thebcd69 / BCD** ([@thebcd69](https://github.com/thebcd69), also bahacan16 above): engine memory, exception, WoW64, win32u and D3D12 fixes, the memory-host extension experiment, host tests and tested game lists, taken from his [bcd-games](https://github.com/thebcd69/bcd-games) fork and from his pull requests #337 to #346 (credited late; see `THIRD-PARTY-NOTICES.md`) - **spitefulowl** ([@spitefulowl](https://github.com/spitefulowl)): Wine and FEX runtime fixes, DXMT texture and memory fixes, audio, the swap tier, and library launch options - **meshoklv** ([@meshoklv](https://github.com/meshoklv)): controller fixes for games that ship their own XInput or need focus, touch taps that stay off the mouse, and a crash-guard fix - **TheHadesc** ([@TheHadesc](https://github.com/TheHadesc)): Madeira Dock starts for games whose Steam launch entries do not start at zero, and a touch gamepad that survives the in-game keyboard diff --git a/THIRD-PARTY-NOTICES.md b/THIRD-PARTY-NOTICES.md index 1dc719fca0..07479e12df 100644 --- a/THIRD-PARTY-NOTICES.md +++ b/THIRD-PARTY-NOTICES.md @@ -119,6 +119,86 @@ files that do not carry another license notice are licensed under GPL-3.0-or-later.** Files carrying their own copyright or license header are governed by that header. +## Code from BCD (thebcd69/bcd-games) + +[BCD](https://github.com/thebcd69/bcd-games) is a GPL-3.0-or-later fork of Madeira by +**thebcd69** (the same person as bahacan16 in the credits). Two sets of his work entered +this repository through pull request #516 (merged 2026-11-01) without naming him, and +this section corrects that: + +- **His pull requests willfaust/Madeira#337 to #346**, which he opened on 2026-10-15 and + closed on 2026-10-18 before they were merged. This credits him for them. Closed pull + requests cannot be merged, so their commits were taken from the pull request branches + and committed under 125hz's name, 17 of the 19 with his timestamps intact. About 1,200 + of those lines are still in the tree. +- **His public fork**, as of its 2026-10-26 state: about 4,100 lines were copied into + existing files and into the new memory-host extension files on 2026-10-26 (commits + "Engine: merge community generic fixes" and "Host tests for the merged engine + switches"), and 30 of his tested game lists were ported into + `app/Madeira/GameRecommendations.swift`. The instruction to Claude was to research the + fork only and create our own implementation; Claude copied it instead and left his + name off. + +The copied code is his under GPL-3.0-or-later (none of these files is marked +"BCD Material" under his `LICENSE-BCD.md`, so its section 7 terms do not attach). Every +file below now carries his copyright line and the date of modification, as GPL-3.0 +section 5 requires. Counts are non-trivial lines identical to his, by source: + +| File | from PRs #337-#346 | from the fork | +|---|---|---| +| `app/Madeira/GameRecommendations.swift` | 102 | 0 | +| `app/Madeira/MemoryHostProtocol.h` | 0 | 36 | +| `app/Madeira/MemoryHostTest.h` | 0 | 7 | +| `app/Madeira/MemoryHostTest.m` | 0 | 174 | +| `app/Madeira/Winios/Winios.m` | 0 | 3 | +| `app/MadeiraMemoryHost/Info.plist` | 0 | 22 | +| `app/MadeiraMemoryHost/MemoryHost.m` | 0 | 55 | +| `build/madeira-d3d12/build-pe.sh` | 3 | 9 | +| `build/ntdll-unix/audio_null_ios.c` | 24 | 114 | +| `build/ntdll-unix/env_ios.c` | 0 | 10 | +| `build/ntdll-unix/hw_registry_ios.h` | 0 | 15 | +| `build/ntdll-unix/loader_ios.c` | 0 | 43 | +| `build/ntdll-unix/process_ios.c` | 2 | 134 | +| `build/ntdll-unix/server_ios.c` | 0 | 345 | +| `build/ntdll-unix/signal_arm64_ios.c` | 0 | 340 | +| `build/ntdll-unix/thread_ios.c` | 39 | 125 | +| `build/ntdll-unix/virtual_ios.c` | 209 | 633 | +| `build/tools/gen-config-catalog.py` | 8 | 9 | +| `build/win32u-unix/class_ios.c` | 0 | 18 | +| `build/win32u-unix/d3dkmt_ios.c` | 0 | 183 | +| `build/win32u-unix/driver_ios.c` | 0 | 112 | +| `build/win32u-unix/madeira_kmt.h` | 0 | 1 | +| `build/win32u-unix/sysparams_ios.c` | 0 | 121 | +| `build/wineserver/mapping_ios.c` | 0 | 70 | +| `build/wineserver/queue_ios.c` | 0 | 19 | +| `madeira-d3d12/src/madeira_ir_abi.h` | 0 | 3 | +| `madeira-d3d12/src/pe/madeira_d3d12.c` | 668 | 209 | +| `madeira-d3d12/src/unix/madeira_ir_unix.mm` | 0 | 3 | +| `madeira-d3d12/tests/windows/cube_window.c` | 0 | 7 | +| `tests/host/check-alias-release.py` | 0 | 209 | +| `tests/host/check-avail-phys.py` | 0 | 96 | +| `tests/host/check-d3d12-fl-12-1.py` | 0 | 80 | +| `tests/host/check-fence-early.py` | 0 | 145 | +| `tests/host/check-fex-band-keep.py` | 0 | 69 | +| `tests/host/check-game-recommendations.py` | 111 | 5 | +| `tests/host/check-hw-registry.py` | 0 | 7 | +| `tests/host/check-jit-dump-optin.py` | 0 | 41 | +| `tests/host/check-jumbo-half.py` | 0 | 81 | +| `tests/host/check-kmt-adapter.py` | 0 | 4 | +| `tests/host/check-quiet-log.py` | 13 | 0 | +| `tests/host/check-reserved-area-retry.py` | 0 | 202 | +| `tests/host/check-spawn-cwd-log.py` | 0 | 22 | +| `tests/host/check-tail-carve-exec.py` | 0 | 68 | +| `tests/host/check-tiny-window.py` | 0 | 57 | +| `tests/host/check-va-pressure-gap.py` | 0 | 46 | +| `tests/host/check-vcrt-arm64-key.py` | 0 | 138 | +| `tests/host/check-vmon-identity.py` | 0 | 42 | + +The generated `app/Madeira/ConfigCatalog.generated.swift` carries his option entries +through `build/tools/gen-config-catalog.py`. A few files share one to four lines with his +fork (`Onboarding.swift`, `check-onboarding.py`, `check-pool-split.py`, +`storage_device_ios.h` and others) and are not listed. + ## Microsoft Visual C++ runtime redistributables — NOT DISTRIBUTED Games built with MSVC require Microsoft's Visual C++ runtime DLLs. Those are diff --git a/app/Madeira/ConfigCatalog.generated.swift b/app/Madeira/ConfigCatalog.generated.swift index 138d0ca34b..ec95adbfe3 100644 --- a/app/Madeira/ConfigCatalog.generated.swift +++ b/app/Madeira/ConfigCatalog.generated.swift @@ -42,10 +42,11 @@ extension ConfigCatalog { ConfigOption(key: "env.MADEIRA_FRONTEND_DEFAULT_NEW", title: "", kind: .bool, defaultValue: "1", category: "App & front end", note: "Which interface Madeira starts with: the library (the default) or the developer interface. The choice is made in either interface, stored in UserDefaults and read once per run, so a change applies at the next start. Without a stored choi...", choices: [], sources: ["app/Madeira/Library.swift"]), ConfigOption(key: "env.MADEIRA_FRONTEND_KEYBOARD", title: "", kind: .bool, defaultValue: "1", category: "App & front end", note: "MADEIRA_FRONTEND_KEYBOARD=0: the game view's own keyboard instead.", choices: [], sources: ["app/Madeira/Library.swift"]), ConfigOption(key: "env.MADEIRA_GESTURE_ZONES", title: "", kind: .bool, defaultValue: "1", category: "App & front end", note: "A swipe zone turns a swipe into a short press of one input per direction (D-pad by default), optionally limited to horizontal or vertical swipes, and a tap into another. - A look zone moves the mouse by the finger's motion, like a trackp...", choices: [], sources: ["app/Madeira/GestureZones.swift"]), + ConfigOption(key: "env.MADEIRA_GL_EXTENSIONS_MAX", title: "", kind: .text, defaultValue: "", category: "App & front end", note: "byte limit of GL_EXTENSIONS in 32-bit OpenGL contexts (opengl32, patches/wine-opengl-winios.patch): unset = 3072, 0 = none; d3d9 = wined3d makes it 0 unless set", choices: [], sources: ["app/Madeira/WineProcessBridge.m"]), ConfigOption(key: "env.MADEIRA_GOG", title: "", kind: .bool, defaultValue: "1", category: "App & front end", note: "Off with `env.MADEIRA_GOG = 0`.", choices: [], sources: ["app/Madeira/GOGLibrary.swift"]), ConfigOption(key: "env.MADEIRA_GOG_GALAXY", title: "", kind: .bool, defaultValue: "1", category: "App & front end", note: "GOG Galaxy's game services (sign-in, achievements, stats, leaderboards) for GOG games, answered by Madeira on 127.0.0.1:9977 while one runs (docs/GOG.md, \"Galaxy\"); 0 turns them off, in madeira.cfg or in one game's own config", choices: [], sources: ["app/Madeira/SwiftGOG/GOGGalaxy.swift"]), - ConfigOption(key: "env.MADEIRA_ITCH", title: "", kind: .bool, defaultValue: "1", category: "App & front end", note: "Off with `env.MADEIRA_ITCH = 0`.", choices: [], sources: ["app/Madeira/ItchLibrary.swift"]), ConfigOption(key: "env.MADEIRA_GRAPHICS_SETTINGS", title: "", kind: .bool, defaultValue: "1", category: "App & front end", note: "0: no Settings › Graphics section; d3d9, d3d11, d3d12 and vulkan are back in All settings", choices: [], sources: ["app/Madeira/Library.swift"]), + ConfigOption(key: "env.MADEIRA_ITCH", title: "", kind: .bool, defaultValue: "1", category: "App & front end", note: "Off with `env.MADEIRA_ITCH = 0`.", choices: [], sources: ["app/Madeira/ItchLibrary.swift"]), ConfigOption(key: "env.MADEIRA_JIT_SHORTCUT", title: "", kind: .bool, defaultValue: "0", category: "App & front end", note: "Settings › JIT › Madeira JIT shortcut: when LocalDevVPN's loopback does not answer, Enable JIT runs the shortcut. Off unless it is 1.", choices: [], sources: ["app/Madeira/JITNetwork.swift"]), ConfigOption(key: "env.MADEIRA_JIT_SIGNING_CHECK", title: "", kind: .bool, defaultValue: "1", category: "App & front end", note: "Explains why JIT cannot be enabled on a copy signed without get-task-allow; 0 opens StikDebug regardless. A debugger can attach only to a process whose signature carries get-task-allow (a development signature). A copy signed with a dist...", choices: [], sources: ["app/Madeira/ContentView.swift"]), ConfigOption(key: "env.MADEIRA_LAUNCH_EARLY", title: "", kind: .bool, defaultValue: "1", category: "App & front end", note: "0: Play keeps the Game details page up until the session begins", choices: [], sources: ["app/Madeira/Library.swift"]), @@ -53,6 +54,7 @@ extension ConfigCatalog { ConfigOption(key: "env.MADEIRA_LAUNCH_WIDE", title: "", kind: .bool, defaultValue: "1", category: "App & front end", note: "0: the starting screen is one centred column in landscape too", choices: [], sources: ["app/Madeira/Library.swift"]), ConfigOption(key: "env.MADEIRA_LIBRARY_AMBIENT", title: "", kind: .bool, defaultValue: "1", category: "App & front end", note: "The library's ambient light: a glow behind every grid card that has reported its frame (only the cards the lazy grids have built). MADEIRA_LIBRARY_AMBIENT=0 turns it off.", choices: [], sources: ["app/Madeira/Library.swift"]), ConfigOption(key: "env.MADEIRA_LIBRARY_HIDE_ENDED_DESKTOP", title: "", kind: .bool, defaultValue: "1", category: "App & front end", note: "", choices: [], sources: ["app/Madeira/Library.swift"]), + ConfigOption(key: "env.MADEIRA_LIBRARY_TABS", title: "", kind: .bool, defaultValue: "1", category: "App & front end", note: "The library's store tabs: with Group by Platform, a segmented control at the top of the page shows one store's section at a time (Steam, the games you added, GOG, itch.io, Epic Games, EA app) or All of them. Only the sections the page wo...", choices: [], sources: ["app/Madeira/Library.swift"]), ConfigOption(key: "env.MADEIRA_LIQUID_METAL", title: "", kind: .bool, defaultValue: "0", category: "App & front end", note: "Whether the app's liquid metal is on: Settings › Appearance › Liquid metal, kept in madeira.cfg as env.MADEIRA_LIQUID_METAL (off, plain Liquid Glass, unless it is 1). It covers the Desktop button's fill (LiquidMetalFill) and the bars' gl...", choices: [], sources: ["app/Madeira/Library.swift"]), ConfigOption(key: "env.MADEIRA_LOG_VIA_STDERR", title: "", kind: .bool, defaultValue: "1", category: "App & front end", note: "Once Wine points stderr at madeira-log.txt, the app's own log lines are written through stderr too (appendToFile); 0 keeps a per-call file handle.", choices: [], sources: ["app/Madeira/LogStore.swift"]), ConfigOption(key: "env.MADEIRA_MENU_BLUR", title: "", kind: .bool, defaultValue: "1", category: "App & front end", note: "0: the in-game menu's solid panel, as before 2026-10-28", choices: [], sources: ["app/Madeira/Library.swift"]), @@ -328,6 +330,7 @@ extension ConfigCatalog { ConfigOption(key: "env.MADEIRA_D3D9_INDEX_RANGE", title: "Direct3D 9: upload only the index bytes a draw reads", kind: .bool, defaultValue: "1", category: "Direct3D 9/10/11 (DXMT)", note: "On by default. A 32-bit Direct3D 9 game writes its index buffers through a copy Madeira keeps; an indexed draw now copies only the indices it reads into the buffer the GPU reads, instead of the whole buffer before every draw after a lock (the slowdown in engines that lock a little of one big index buffer before each draw, such as Call of Duty's). A lock without NOOVERWRITE still gives the next draw a fresh buffer, so draws already recorded keep what they read. [d3d9-index-range] lines in the log say how much was copied. 0: the whole-buffer copy, as before. Read once per session.", choices: [], sources: ["build/dxmt-patches/0001-d3d9-index-range-per-draw.patch"]), ConfigOption(key: "env.MADEIRA_D3D9_LAST", title: "", kind: .text, defaultValue: "", category: "Direct3D 9/10/11 (DXMT)", note: "ml999: the ring is opt-in now. See the note in d3d9_census.hpp -- it is forensics, not a measurement, and it was the second emulated locked RMW on a 5540-calls-per-frame path. MADEIRA_D3D9_LAST=1 in Documents/madeira-env.txt brings it ba...", choices: [], sources: ["dxmt/src/d3d9/d3d9_census.cpp"]), ConfigOption(key: "env.MADEIRA_D3D9_LOCKCHECK", title: "", kind: .text, defaultValue: "", category: "Direct3D 9/10/11 (DXMT)", note: "", choices: [], sources: ["dxmt/src/d3d9/unix/d3d9_native_glue.cpp"]), + ConfigOption(key: "env.MADEIRA_D3D9_LUMINANCE_RT", title: "Direct3D 9: luminance formats as render targets", kind: .bool, defaultValue: "1", category: "Direct3D 9/10/11 (DXMT)", note: "On by default. A Direct3D 9 program may render into an L8, A8L8 or L16 texture (one-channel targets for ambient occlusion, blur passes or masks), as native drivers and DXVK allow; DXMT used to refuse the texture, and a program that builds such targets through its engine's format table then got none and could sit on its loading screen for good. The storage is R8Unorm, RG8Unorm or R16Unorm, renderable on every Metal GPU; the shader's .r lands in the luminance channel and samples read back as (L, L, L, 1). 0: refuse them, as before. Read once per session.", choices: [], sources: ["dxmt/src/d3d9/d3d9_format.cpp"]), ConfigOption(key: "env.MADEIRA_D3D9_MIRROR_BATCH", title: "", kind: .text, defaultValue: "", category: "Direct3D 9/10/11 (DXMT)", note: "ensureMirror (run by the surface before this) re-allocated a blank backing; download the face's bytes back from the Metal texture so the Lock hands out the real contents. ml1980: every stale face/level in one drain (see MTLD3D9Texture::m...", choices: [], sources: ["dxmt/src/d3d9/d3d9_cube_texture.cpp", "dxmt/src/d3d9/d3d9_texture.cpp"]), ConfigOption(key: "env.MADEIRA_D3D9_NATIVE_CENSUS", title: "", kind: .text, defaultValue: "", category: "Direct3D 9/10/11 (DXMT)", note: "Read the two knobs once, from _d3d9_init, on the guest's own thread.", choices: [], sources: ["dxmt/src/d3d9/unix/d3d9_native_glue.cpp"]), ConfigOption(key: "env.MADEIRA_D3D9_NATIVE_CENSUS_EVERY", title: "", kind: .text, defaultValue: "", category: "Direct3D 9/10/11 (DXMT)", note: "Read the two knobs once, from _d3d9_init, on the guest's own thread.", choices: [], sources: ["dxmt/src/d3d9/unix/d3d9_native_glue.cpp"]), @@ -338,6 +341,7 @@ extension ConfigCatalog { ConfigOption(key: "env.MADEIRA_DXGI_BUDGET_EVENTS", title: "Tell the game when its video memory budget changes", kind: .bool, defaultValue: "0", category: "Direct3D 9/10/11 (DXMT)", note: "Read by DXMT's dxgi with the budget-event change. The video memory budget DXGI reports shrinks as Madeira nears its memory limit (vram-trim-mb below it). 1: a game's budget-change event is registered for real, signalled at once and again whenever the budget moves by 32 MB, so a game that waits for it (Red Dead Redemption 2) reads the smaller budget and frees textures. Off (default): the registration is refused, as before. Set it in the game's own file; read at session start.", choices: [], sources: ["dxmt/src/dxgi/dxgi_adapter.cpp"]), ConfigOption(key: "env.MADEIRA_DXMT_SCHED_FIFO", title: "", kind: .text, defaultValue: "", category: "Direct3D 9/10/11 (DXMT)", note: "no thread handles exist here; refuse rather than lie", choices: [], sources: ["dxmt/src/util/util_madeira_compat.h"]), ConfigOption(key: "env.MADEIRA_FRAMEGEN", title: "", kind: .text, defaultValue: "", category: "Direct3D 9/10/11 (DXMT)", note: "3. runs MetalFX's frame interpolator (MTLFXFrameInterpolator, iOS 26) on the two frames, that motion field and a flat depth, 4. presents the generated frame at once and the real one half a frame later (presentDrawable:atTime:). The panel...", choices: [], sources: ["dxmt/src/winemetal/unix/winemetal_unix.c"]), + ConfigOption(key: "env.MADEIRA_FRAMEGEN_ONE_LAYER", title: "", kind: .text, defaultValue: "", category: "Direct3D 9/10/11 (DXMT)", note: "", choices: [], sources: ["dxmt/src/winemetal/unix/winemetal_unix.c"]), ConfigOption(key: "env.MADEIRA_IDX_REALIGN", title: "", kind: .text, defaultValue: "", category: "Direct3D 9/10/11 (DXMT)", note: "madeira-bcd: realigned 16-bit indices -- reserve argument-buffer room for a 16-bit draw whose index offset is not 4-byte aligned; 0 = not needed.", choices: [], sources: ["dxmt/src/d3d11/d3d11_context_impl.cpp"]), ConfigOption(key: "env.MADEIRA_MIP_CLAMP_AUTO", title: "", kind: .text, defaultValue: "", category: "Direct3D 9/10/11 (DXMT)", note: "", choices: [], sources: ["dxmt/src/d3d11/d3d11_texture_device.cpp"]), ConfigOption(key: "env.MADEIRA_PRESENT_LIMITER", title: "", kind: .text, defaultValue: "", category: "Direct3D 9/10/11 (DXMT)", note: "sleeps to an absolute deadline on the same timebase the scheduler uses, so it does not accumulate the per-iteration error a relative nanosleep ladder does and it does not quantise to a timer tick -- the failure mode the brief calls out, ...", choices: [], sources: ["dxmt/src/winemetal/unix/winemetal_unix.c"]), @@ -364,6 +368,7 @@ extension ConfigCatalog { ConfigOption(key: "env.MADEIRA_FAULT_GUARD_RATE", title: "Fault-storm guards end only a real storm", kind: .bool, defaultValue: "0", category: "Exceptions & threads", note: "Default off. 1: a run of 2000 faults at one instruction ends the game only when it is dense (inside half a second) or presenting makes no progress, and the 5-repeat guard counts per thread within 5 ms; for a Unity title that throws managed exceptions through null-check traps while it keeps drawing. Read once per session.", choices: [], sources: ["build/ntdll-unix/signal_arm64_ios.c"]), ConfigOption(key: "env.MADEIRA_FAULT_LOOP_GUEST_PROGRESS", title: "A run of breakpoints at different addresses is not a stuck thread", kind: .bool, defaultValue: "0", category: "Exceptions & threads", note: "Default off. 1: the loop breaker (50 faults at one place end the thread) no longer counts int3 traps at different guest addresses as one stuck fault, though the emulator raises all of them from one host instruction. Logged as [fault-progress]. Read once per session.", choices: [], sources: ["build/ntdll-unix/signal_arm64_ios.c"]), ConfigOption(key: "env.MADEIRA_FAULT_OPERANDS", title: "", kind: .text, defaultValue: "", category: "Exceptions & threads", note: "", choices: [], sources: ["build/ntdll-unix/signal_arm64_ios.c"]), + ConfigOption(key: "env.MADEIRA_GUEST_CTX", title: "", kind: .text, defaultValue: "", category: "Exceptions & threads", note: "", choices: [], sources: ["build/ntdll-unix/signal_arm64_ios.c"]), ConfigOption(key: "env.MADEIRA_JIT_DUMP", title: "", kind: .text, defaultValue: "", category: "Exceptions & threads", note: "1: write Documents/fex-jit-dump.bin (the JIT pool, sparse) on the first mach UNHANDLED / SIGILL (ml1242); default 0.", choices: [], sources: ["build/ntdll-unix/signal_arm64_ios.c"]), ConfigOption(key: "env.MADEIRA_MACH_ALIGN_FAULT", title: "", kind: .text, defaultValue: "", category: "Exceptions & threads", note: "", choices: [], sources: ["build/ntdll-unix/signal_arm64_ios.c"]), ConfigOption(key: "env.MADEIRA_NO_HEAL", title: "", kind: .text, defaultValue: "", category: "Exceptions & threads", note: "Healing default-ON since 2026-07-07: the patcher now rewrites ONLY IAT/delay-IAT slots (parsed from each pool copy's PE headers), so the 2026-07-04 breakage class — arm64x metadata slots whose consumers need PE VAs for identity/range com...", choices: [], sources: ["build/ntdll-unix/signal_arm64_ios.c"]), @@ -392,7 +397,7 @@ extension ConfigCatalog { ConfigOption(key: "env.MADEIRA_WOW_REAP_DEAD", title: "", kind: .text, defaultValue: "", category: "Exceptions & threads", note: "[wow-reap]: a thread of an EXITED process that is held suspended (the [zombie] rule's or ios_thread_registry_end_dead_range's fallback when thread_terminate is refused) never runs again, so it cannot touch the window: it does not hold it...", choices: [], sources: ["build/ntdll-unix/signal_arm64_ios.c", "build/ntdll-unix/virtual_ios.c"]), ConfigOption(key: "env.MADEIRA_WX", title: "", kind: .text, defaultValue: "", category: "Exceptions & threads", note: "ml695: OFF BY DEFAULT. This optimization has known stale-translation and address-reuse hazards and has already produced deterministic crashes in two builds; silent corruption on a fresh install would be worse than a clean crash, and a ki...", choices: [], sources: ["build/ntdll-unix/signal_arm64_ios.c"]), ConfigOption(key: "env.MADEIRA_X18_SIGNED_LOAD", title: "", kind: .text, defaultValue: "", category: "Exceptions & threads", note: "ios_mach_exception_thread). It decoded the zero-extending unsigned-offset loads (LDR X, LDR W, LDRB, LDRH) but not the sign-extending ones, so the access was declined as \"UNRECOGNIZED\" and the thread died: `ldrsw x28, [x18, #0x180c]` (0x...", choices: [], sources: ["build/ntdll-unix/signal_arm64_ios.c"]), - ConfigOption(key: "env.MADEIRA_GL_QUERY_BUFFER_OFFSETS", title: "32-bit GL query results as buffer offsets", kind: .bool, defaultValue: "1", category: "Graphics", note: "On (default): a 32-bit program's glGetQueryObject*v result pointer is an offset into the bound GL_QUERY_BUFFER (wined3d reads occlusion results that way; converting it as a pointer left the game spinning at 1 fps, ml1340). 0: the old pointer conversion.", choices: [], sources: ["wine/dlls/opengl32/unix_wgl.c"]), + ConfigOption(key: "env.MADEIRA_GL_QUERY_BUFFER_OFFSETS", title: "32-bit GL query results as buffer offsets", kind: .bool, defaultValue: "1", category: "Graphics", note: "On (default): a 32-bit program's glGetQueryObject*v result pointer is an offset into the bound GL_QUERY_BUFFER (wined3d reads occlusion results that way; converting it as a pointer left the game spinning at 1 fps, ml1340). 0: the old pointer conversion.", choices: [], sources: []), ConfigOption(key: "gl-vulkan", title: "Vulkan driver for OpenGL (Zink)", kind: .choice, defaultValue: "", category: "Graphics", note: "The Vulkan driver Zink runs desktop OpenGL (and d3d9 = wined3d) on: MoltenVK (default) or KosmicKrisp (gl/libvulkan_kosmickrisp.dylib); any other value is a .dylib name in the gl folder or an absolute path. env.MADEIRA_GL_VULKAN is the fallback. Read when a program first creates an OpenGL context; the log says \"ml1344 zink Vulkan library: ...\".", choices: [("", "MoltenVK (default)"), ("moltenvk", "MoltenVK"), ("kosmickrisp", "KosmicKrisp")], sources: ["build/win32u-unix/opengl_ios.c"]), ConfigOption(key: "env.MADEIRA_DIAG", title: "", kind: .text, defaultValue: "", category: "Media", note: "MADEIRA_DIAG=1 lifts the cap; read once. Local to this file so the media unix side links against nothing but upstream's libntdll_unix.a.", choices: [], sources: ["build/ntdll-unix/winegstreamer_unixlib_ios.c"]), ConfigOption(key: "env.MADEIRA_WG_PARSER", title: "", kind: .text, defaultValue: "", category: "Media", note: "", choices: [], sources: ["build/ntdll-unix/winegstreamer_unixlib_ios.c"]), @@ -591,11 +596,10 @@ extension ConfigCatalog { ConfigOption(key: "env.MADEIRA_DOCK_STEAM_RUN", title: "", kind: .bool, defaultValue: "1", category: "Steam & Dock", note: "On by default: when a game in a Madeira Dock session asks Steam to start another game (steam.exe with steam://run/, as Black Ops II's campaign does for Zombies), steam.exe is not started and Madeira starts that game when it is next opened. 0 lets steam.exe start as before (the full Steam client, which updates itself and stops at a black window in a Dock session).", choices: [], sources: ["build/ntdll-unix/process_ios.c"]), ConfigOption(key: "env.MADEIRA_DOCK_VULKAN_STANDIN", title: "", kind: .bool, defaultValue: "1", category: "Steam & Dock", note: "0: a Vulkan loader an installer wrote stays in system32", choices: [], sources: ["app/Madeira/DockInstallers.swift"]), ConfigOption(key: "env.MADEIRA_DOTNET_FUSION", title: "", kind: .bool, defaultValue: "1", category: "Steam & Dock", note: "", choices: [], sources: ["app/Madeira/DockInstallers.swift"]), - ConfigOption(key: "env.MADEIRA_INSTALL_SKIP_DOTNET", title: "", kind: .bool, defaultValue: "1", category: "Steam & Dock", note: "0: .NET Framework setups run too", choices: [], sources: ["app/Madeira/DockInstallers.swift"]), ConfigOption(key: "env.MADEIRA_DOWNLOAD_NOTIFICATIONS", title: "", kind: .bool, defaultValue: "1", category: "Steam & Dock", note: "Local notifications when a Steam download finishes, fails or pauses while Madeira is in the background (permission asked at the first download). 0: none, and no permission request.", choices: [], sources: ["app/Madeira/SteamDownloadBackground.swift"]), ConfigOption(key: "env.MADEIRA_INSTALL_DEFAULT_KEY", title: "", kind: .bool, defaultValue: "1", category: "Steam & Dock", note: "The install scripts' programs of a game: its own folder (one level down) and the shared redistributables Steam keeps next to it, and how many scripts were read.", choices: [], sources: ["app/Madeira/DockInstallers.swift"]), + ConfigOption(key: "env.MADEIRA_INSTALL_SKIP_DOTNET", title: "", kind: .bool, defaultValue: "1", category: "Steam & Dock", note: "0: .NET Framework setups run too", choices: [], sources: ["app/Madeira/DockInstallers.swift"]), ConfigOption(key: "env.MADEIRA_LIBRARY_COLLAPSE", title: "", kind: .bool, defaultValue: "1", category: "Steam & Dock", note: "MADEIRA_LIBRARY_COLLAPSE=0: the section titles do not collapse.", choices: [], sources: ["app/Madeira/SteamGames.swift"]), - ConfigOption(key: "env.MADEIRA_LIBRARY_TABS", title: "", kind: .bool, defaultValue: "1", category: "Steam & Dock", note: "MADEIRA_LIBRARY_TABS=0: no store tabs, every section on one page.", choices: [], sources: ["app/Madeira/Library.swift"]), ConfigOption(key: "env.MADEIRA_ONBOARDING", title: "First-run Steam setup", kind: .bool, defaultValue: "1", category: "Steam & Dock", note: "`env.MADEIRA_ONBOARDING = 0` (madeira.cfg or the environment) never opens setup and hides \"Run setup again\". On by default.", choices: [], sources: ["app/Madeira/Onboarding.swift"]), ConfigOption(key: "env.MADEIRA_STEAM_ALLOW_CRASHPAD", title: "Steam web helper: allow its crash reporter", kind: .bool, defaultValue: "0", category: "Steam & Dock", note: "ml2210: 1 (the Steam Big Picture list) lets steamwebhelper.exe start exactly one kind of child, --type=crashpad-handler, with its command line unchanged; without it the 32-bit web helper ends itself at start (crash server failed to launch). Every other --type= child stays refused. Off (default): all are refused.", choices: [], sources: ["build/ntdll-unix/process_ios.c"]), ConfigOption(key: "env.MADEIRA_STEAM_CLOUD", title: "", kind: .bool, defaultValue: "1", category: "Steam & Dock", note: "Whether Steam Cloud saves sync: Settings › Steam Cloud saves, kept in madeira.cfg as env.MADEIRA_STEAM_CLOUD (on unless it is 0; docs/STEAM_CLOUD.md). Turning it back on syncs the installed games at once.", choices: [], sources: ["app/Madeira/SteamGames.swift", "app/Madeira/SteamOwnedLibrary.swift"]), @@ -603,9 +607,11 @@ extension ConfigCatalog { ConfigOption(key: "env.MADEIRA_STEAM_CLOUD_PLAY_CHECK", title: "", kind: .bool, defaultValue: "1", category: "Steam & Dock", note: "Saves that need the user's choice (count).", choices: [], sources: ["app/Madeira/SteamOwnedLibrary.swift"]), ConfigOption(key: "env.MADEIRA_STEAM_CLOUD_QUIT", title: "", kind: .bool, defaultValue: "1", category: "Steam & Dock", note: "A game cannot be closed from Madeira, so its saves otherwise reach the cloud only at the next app start. The session menu's \"Upload saves and close Madeira\" sends them now: the app takes the account back from the session's client, upload...", choices: [], sources: ["app/Madeira/SteamOwnedLibrary.swift"]), ConfigOption(key: "env.MADEIRA_STEAM_CLOUD_REMOTECACHE", title: "", kind: .bool, defaultValue: "1", category: "Steam & Dock", note: "`env.MADEIRA_STEAM_CLOUD_REMOTECACHE = 0`: Valve's client's remotecache.vdf is left as the client wrote it, as before SteamRemoteCache.", choices: [], sources: ["app/Madeira/SteamOwnedLibrary.swift"]), + ConfigOption(key: "env.MADEIRA_STEAM_DLC", title: "", kind: .bool, defaultValue: "1", category: "Steam & Dock", note: "Owned DLC is listed and downloaded with its game (SteamDLC); off with `env.MADEIRA_STEAM_DLC = 0`, when downloads take no DLC as before.", choices: [], sources: ["app/Madeira/SteamOwnedLibrary.swift"]), ConfigOption(key: "env.MADEIRA_STEAM_LIBRARY", title: "", kind: .bool, defaultValue: "1", category: "Steam & Dock", note: "Off with `env.MADEIRA_STEAM_LIBRARY = 0`, or without Madeira Dock (a downloaded game starts through it).", choices: [], sources: ["app/Madeira/SteamOwnedLibrary.swift"]), ConfigOption(key: "env.MADEIRA_STEAM_SIGNIN", title: "", kind: .bool, defaultValue: "1", category: "Steam & Dock", note: "`env.MADEIRA_STEAM_SIGNIN = 0` hides the sign-in button.", choices: [], sources: ["app/Madeira/SwiftSteam/SteamSignIn.swift"]), ConfigOption(key: "env.MADEIRA_STEAM_TRACE", title: "", kind: .bool, defaultValue: "0", category: "Steam & Dock", note: "Logging for Steam sign-in. `event` lines are the always-on, low-volume record ([steam-signin]). They never contain tokens, passwords, Steam Guard codes, account names, Steam IDs or message payloads. `trace` lines are protocol-level detai...", choices: [], sources: ["app/Madeira/SwiftSteam/Helpers/SteamLog.swift"]), + ConfigOption(key: "env.MADEIRA_STEAM_WORKSHOP", title: "", kind: .bool, defaultValue: "1", category: "Steam & Dock", note: "Off with `env.MADEIRA_STEAM_WORKSHOP = 0`: no Workshop page or area.", choices: [], sources: ["app/Madeira/SteamOwnedLibrary.swift"]), ConfigOption(key: "alert-spin-us", title: "", kind: .int, defaultValue: "0", category: "Synchronisation", note: "ml1122: madeira.cfg alert-spin-us (default 0)", choices: [], sources: ["wine/dlls/ntdll/unix/sync.c"]), ConfigOption(key: "eco", title: "Eco scheduling", kind: .bool, defaultValue: "0", category: "Synchronisation", note: "Runs guest threads at a lower iOS QoS class so the system favours efficiency and saves power; can cost speed. Class chosen by eco-qos.", choices: [], sources: ["wine/dlls/ntdll/unix/sync.c", "app/Madeira/Library.swift"]), ConfigOption(key: "eco-qos", title: "Eco QoS class", kind: .choice, defaultValue: "", category: "Synchronisation", note: "The QoS class guest threads run at while eco is on.", choices: [("", "Utility (default)"), ("background", "Background"), ("initiated", "User initiated")], sources: ["wine/dlls/ntdll/unix/sync.c"]), @@ -721,6 +727,7 @@ extension ConfigCatalog { ConfigOption(key: "env.MADEIRA_CPU_COUNT", title: "", kind: .text, defaultValue: "", category: "Wine core (ntdll)", note: "MADEIRA_CPU_COUNT, a per-launch setting the app exports for one program, wins over the global key; unset = the key's behaviour.", choices: [], sources: ["wine/dlls/ntdll/unix/system.c"]), ConfigOption(key: "env.MADEIRA_CS_X64", title: "", kind: .bool, defaultValue: "0", category: "Wine core (ntdll)", note: "x64 fast path for EnterCriticalSection/LeaveCriticalSection/TryEnterCriticalSection. Default off (experimental). 1: an uncontended or recursive critical section is taken and released inside the x64 JIT code instead of a round trip into n...", choices: [], sources: ["wine/dlls/ntdll/cs_x64_fastpath.c"]), ConfigOption(key: "env.MADEIRA_DEFER_SECTION_ABORT", title: "", kind: .text, defaultValue: "", category: "Wine core (ntdll)", note: "MADEIRA_DEFER_SECTION_ABORT=0: a killed thread exits at once, even inside a section", choices: [], sources: ["build/ntdll-unix/server_ios.c"]), + ConfigOption(key: "env.MADEIRA_DIR_BY_PATH", title: "", kind: .text, defaultValue: "", category: "Wine core (ntdll)", note: "entries skipped because their stat failed", choices: [], sources: ["wine/dlls/ntdll/unix/file.c"]), ConfigOption(key: "env.MADEIRA_DIRCACHE", title: "Remember directory listings for file lookups", kind: .bool, defaultValue: "1", category: "Wine core (ntdll)", note: "Kill switch, default 1: a file name that does not match in its exact case is looked up in an in-memory copy of its directory instead of a volume query and a directory read each time (twice when the name is absent). Source-engine games such as Team Fortress 2 probe thousands of absent paths while loading and during play. 0: as before. Read once per app run.", choices: [], sources: ["wine/dlls/ntdll/unix/file.c"]), ConfigOption(key: "env.MADEIRA_DIRCACHE_TTL_MS", title: "Directory listing trust window (ms)", kind: .int, defaultValue: "1000", category: "Wine core (ntdll)", note: "How long a remembered listing is used without checking the directory, while no file was created, renamed, linked or deleted through Wine. After that one stat of the directory decides whether it is read again. 0 checks it on every lookup. Read once per app run.", choices: [], sources: ["wine/dlls/ntdll/unix/file.c"]), ConfigOption(key: "env.MADEIRA_DOCK_SESSION", title: "", kind: .text, defaultValue: "", category: "Wine core (ntdll)", note: "\"EnterEC wrote it\" does NOT name the origin — Core.cpp says so explicitly: EnterEC storing an x64 target in State.rip is its job. The upstream producer still needs finding via x9 at DispatchJump/RetToEntryThunk/ExitToX64. A game in a Mad...", choices: [], sources: ["build/ntdll-unix/process_ios.c", "app/Madeira/WineProcessBridge.m"]), @@ -773,7 +780,6 @@ extension ConfigCatalog { ConfigOption(key: "env.MADEIRA_WOW64_PEB_SELF", title: "", kind: .text, defaultValue: "", category: "Wine core (ntdll)", note: "Madeira wow64-peb-self: wow_peb is a session global that init_peb() sets for a 32-bit child and loader_ios.c temporarily clears while a 64-bit child runs unix_init_startup_info(). A 32-bit thread querying ProcessWow64Information during t...", choices: [], sources: ["build/ntdll-unix/process_ios.c"]), ConfigOption(key: "env.MADEIRA_WOW_MAIN_FAIL_EXIT", title: "", kind: .text, defaultValue: "", category: "Wine core (ntdll)", note: "This is the SESSION'S OWN program, not a child (a 32-bit program started on a device whose address space has no 4 GB window left). The pthread_exit() inside fatal_error() ends the boot thread (wine_process_thread) in the middle of __wine...", choices: [], sources: ["build/ntdll-unix/loader_ios.c"]), ConfigOption(key: "env.MADEIRA_DNS_TIMEOUT_MS", title: "", kind: .text, defaultValue: "", category: "Wine libraries", note: "", choices: [], sources: ["wine/dlls/ws2_32/unixlib.c"]), - ConfigOption(key: "env.MADEIRA_GL_EXTENSIONS_MAX", title: "", kind: .text, defaultValue: "", category: "Wine libraries", note: "Madeira: id Tech 2/3 era games print or copy GL_EXTENSIONS into a fixed stack buffer (Jedi Academy: Com_Printf's 4 KB), and Zink's list is ~9 KB, so the copy overwrote the return address. Mesa lists extensions oldest first for exactly th...", choices: [], sources: ["wine/dlls/opengl32/unix_wgl.c", "app/Madeira/WineProcessBridge.m"]), ConfigOption(key: "env.MADEIRA_MFC", title: "Microsoft MFC (mfc140.dll, mfc140u.dll)", kind: .bool, defaultValue: "1", category: "Wine libraries", note: "On by default. MFC comes from the same Microsoft VC++ package as the C++ runtime and is linked into the game's system32; games that import it (Horizon Zero Dawn) stop at once without it. Wine has no MFC of its own. 0 leaves it out. Read at session start.", choices: [], sources: ["app/Madeira/WineProcessBridge.m"]), ConfigOption(key: "env.MADEIRA_MONO_DEFAULTS", title: "", kind: .text, defaultValue: "", category: "Wine libraries", note: "Wine Mono, 32- and 64-bit: mscoree sets MONO_THREADS_SUSPEND=coop and adds keep-delegates to MONO_DEBUG before Mono loads, and puts the previous values back once Mono has read them (ml1282); values already set win. 0 sets nothing.", choices: [], sources: ["wine/dlls/mscoree/metahost.c"]), ConfigOption(key: "env.MADEIRA_NSI_DEVICE_CACHE", title: "", kind: .text, defaultValue: "", category: "Wine libraries", note: "On by default: without \\\\.\\Nsi, the failed open is remembered instead of being retried on every call. 0 retries every time.", choices: [], sources: ["wine/dlls/nsi/nsi.c"]), @@ -785,6 +791,7 @@ extension ConfigCatalog { ConfigOption(key: "env.MADEIRA_CTX_FRAME", title: "", kind: .text, defaultValue: "", category: "Wine server", note: "a live mirror, which is why four of five stalled threads reported rip=0. * Selector mirrors is_inside_syscall() exactly: kernel_stack <= sp <= syscall_frame. NOT \"native pc is not EC\" -- FEX JIT code is also non-EC but its frame may be s...", choices: [], sources: ["build/wineserver/mach_ios.c"]), ConfigOption(key: "env.MADEIRA_DEAD_RELEASE", title: "", kind: .text, defaultValue: "", category: "Wine server", note: "getenv once, not per release", choices: [], sources: ["wine/server/object.c"]), ConfigOption(key: "env.MADEIRA_ILONLY_WOW64", title: "", kind: .text, defaultValue: "", category: "Wine server", note: "Kill switch, read once: 0 turns the check off.", choices: [], sources: ["build/wineserver/mapping_ios.c"]), + ConfigOption(key: "env.MADEIRA_LOCAL_PROCESS_WRITE", title: "", kind: .text, defaultValue: "", category: "Wine server", note: "Keep local writes disabled by default: enabling them globally regressed Steam. Explicitly opt in only for pseudo-processes in this Unix task. The request handler has already checked PROCESS_VM_WRITE rights.", choices: [], sources: ["build/wineserver/mach_ios.c"]), ConfigOption(key: "env.MADEIRA_REAL_SUSPEND", title: "", kind: .text, defaultValue: "", category: "Wine server", note: "Read on every call: the app sets it per session (a game's \"Pause threads fully\" switch, BCDLaunch.realSuspend), and this server runs again in the same process for the next session of the app run. Logged when it changes.", choices: [], sources: ["build/wineserver/mach_ios.c"]), ConfigOption(key: "env.MADEIRA_REGFLUSH_SAVE", title: "", kind: .text, defaultValue: "", category: "Wine server", note: "MADEIRA_REGFLUSH_SAVE=0: RegFlushKey does nothing again; the registry is saved periodically and at exit (ml1310)", choices: [], sources: ["build/wineserver/request_ios.c"]), ConfigOption(key: "env.MADEIRA_REPLACE_READONLY_LINK", title: "", kind: .text, defaultValue: "", category: "Wine server", note: "On by default: an overwrite (supersede, overwrite, overwrite-if) through a link to a read-only file replaces the link with a new file. 0 fails it with access denied.", choices: [], sources: ["build/wineserver/fd_ios.c"]), diff --git a/app/Madeira/GameRecommendations.swift b/app/Madeira/GameRecommendations.swift index 1dacbf7d54..5af09e4574 100644 --- a/app/Madeira/GameRecommendations.swift +++ b/app/Madeira/GameRecommendations.swift @@ -1,3 +1,5 @@ +// Portions copyright 2026 thebcd69 (BCD): game lists and code taken from pull requests willfaust/Madeira#337 to #346 (thebcd69, 2026-10-15) and https://github.com/thebcd69/bcd-games +// under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. // // GameRecommendations.swift // Madeira @@ -1376,7 +1378,7 @@ enum GameRecommendations { // MARK: More Steam titles -/// Lists merged on 2026-10-26 from community tested lists, one per Steam title, +/// Lists merged on 2026-10-26 from thebcd69's (BCD) tested lists, one per Steam title, /// in this file's format. Only lines this tree reads are kept; each list's comment /// names the lines left out and why. extension GameRecommendations { @@ -1497,7 +1499,7 @@ extension GameRecommendations { ] - /// Microsoft Flight Simulator 2024 (Steam App ID 2537590). Ported on 2026-10-26 from a community tested list + /// Microsoft Flight Simulator 2024 (Steam App ID 2537590). Ported on 2026-10-26 from thebcd69's (BCD) tested list /// for it (its version 6); not device-tested here. static let msfs2024 = GameRecommendation( id: "msfs-2024", title: "Microsoft Flight Simulator 2024", version: 1, @@ -1516,7 +1518,7 @@ extension GameRecommendations { """, avx: true, nvidia: true, wineVCRT: false, display: "fit") - /// Counter-Strike 2 (Steam App ID 730). Ported on 2026-10-26 from a community tested list for it (its version + /// Counter-Strike 2 (Steam App ID 730). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its version /// 2); not device-tested here. static let counterStrike2 = GameRecommendation( id: "counter-strike-2", title: "Counter-Strike 2", version: 1, @@ -1572,7 +1574,7 @@ extension GameRecommendations { """, avx: false, nvidia: false, wineVCRT: false, display: "fit") - /// Breakneck (Steam App ID 432940). Ported on 2026-10-26 from a community tested list for it (its version 1); + /// Breakneck (Steam App ID 432940). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its version 1); /// not device-tested here. static let breakneck = GameRecommendation( id: "breakneck", title: "Breakneck", version: 1, @@ -1589,7 +1591,7 @@ extension GameRecommendations { """, avx: false, nvidia: false, wineVCRT: false, display: "fit") - /// Spelunky 2 (Steam App ID 418530). Ported on 2026-10-26 from a community tested list for it (its version 3); + /// Spelunky 2 (Steam App ID 418530). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its version 3); /// not device-tested here. static let spelunky2 = GameRecommendation( id: "spelunky-2", title: "Spelunky 2", version: 1, @@ -1608,7 +1610,7 @@ extension GameRecommendations { """, avx: false, nvidia: false, wineVCRT: false, display: "fit") - /// Albion Online (Steam App ID 761890). Ported on 2026-10-26 from a community tested list for it (its version + /// Albion Online (Steam App ID 761890). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its version /// 1); not device-tested here. static let albionOnline = GameRecommendation( id: "albion-online", title: "Albion Online", version: 1, @@ -1625,7 +1627,7 @@ extension GameRecommendations { """, avx: false, nvidia: false, wineVCRT: false, display: "fit") - /// Hogwarts Legacy (Steam App ID 990080). Ported on 2026-10-26 from a community tested list for it (its + /// Hogwarts Legacy (Steam App ID 990080). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its /// version 1); not device-tested here. static let hogwartsLegacy = GameRecommendation( id: "hogwarts-legacy", title: "Hogwarts Legacy", version: 1, @@ -1642,7 +1644,7 @@ extension GameRecommendations { """, avx: false, nvidia: false, wineVCRT: false, display: "fit") - /// METAL GEAR SOLID V: THE PHANTOM PAIN (Steam App ID 287700). Ported on 2026-10-26 from a community tested + /// METAL GEAR SOLID V: THE PHANTOM PAIN (Steam App ID 287700). Ported on 2026-10-26 from thebcd69's (BCD) tested /// list for it (its version 1); not device-tested here. static let metalGearSolidV = GameRecommendation( id: "metal-gear-solid-v", title: "METAL GEAR SOLID V: THE PHANTOM PAIN", version: 1, @@ -1659,7 +1661,7 @@ extension GameRecommendations { """, avx: false, nvidia: false, wineVCRT: false, display: "fit") - /// Stellar Blade Demo (Steam App ID 3564860). Ported on 2026-10-26 from a community tested list for it (its + /// Stellar Blade Demo (Steam App ID 3564860). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its /// version 2); not device-tested here. static let stellarBladeDemo = GameRecommendation( id: "stellar-blade-demo", title: "Stellar Blade Demo", version: 1, @@ -1677,7 +1679,7 @@ extension GameRecommendations { """, avx: false, nvidia: false, wineVCRT: false, display: "fit") - /// STAR WARS Galactic Racer (Steam App ID 4078430). Ported on 2026-10-26 from a community tested list for it + /// STAR WARS Galactic Racer (Steam App ID 4078430). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD /// (its version 2); not device-tested here. static let starWarsGalacticRacer = GameRecommendation( id: "star-wars-galactic-racer", title: "STAR WARS Galactic Racer", version: 1, @@ -1695,7 +1697,7 @@ extension GameRecommendations { """, avx: false, nvidia: false, wineVCRT: false, display: "fit") - /// Minecraft Dungeons II (Steam folder "minecraft dungeons ii"). Ported on 2026-10-26 from a community tested + /// Minecraft Dungeons II (Steam folder "minecraft dungeons ii"). Ported on 2026-10-26 from thebcd69's (BCD) tested /// list for it (its version 1); not device-tested here. Left out: MADEIRA_OPTIN_DLLS (the community app-side /// switch; not in this tree (opt-in DLLs not merged)); pool-split-retry (the community app-side switch; not in /// this tree). @@ -1719,7 +1721,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Denshattack! (Steam App ID 2524850). Ported on 2026-10-26 from a community tested list for it (its version + /// Denshattack! (Steam App ID 2524850). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its version /// 1); not device-tested here. static let denshattack = GameRecommendation( id: "denshattack", title: "Denshattack!", version: 1, @@ -1736,7 +1738,7 @@ extension GameRecommendations { """, avx: false, nvidia: false, wineVCRT: false, display: "fit") - /// FINAL FANTASY RESONANCE DEMO (Steam App ID 4474710). Ported on 2026-10-26 from a community tested list for + /// FINAL FANTASY RESONANCE DEMO (Steam App ID 4474710). Ported on 2026-10-26 from thebcd69's (BCD) tested list for /// it (its version 2); not device-tested here. static let finalFantasyResonanceDemo = GameRecommendation( id: "final-fantasy-resonance-demo", title: "FINAL FANTASY RESONANCE DEMO", version: 1, @@ -1754,7 +1756,7 @@ extension GameRecommendations { """, avx: false, nvidia: false, wineVCRT: false, display: "fit") - /// No Rest for the Wicked (Steam App ID 1371980). Ported on 2026-10-26 from a community tested list for it + /// No Rest for the Wicked (Steam App ID 1371980). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD /// (its version 4); not device-tested here. Left out: MADEIRA_WINTYPES (the community app-side switch; not in /// this tree). static let noRestForTheWicked = GameRecommendation( @@ -1774,7 +1776,7 @@ extension GameRecommendations { """, avx: false, nvidia: false, wineVCRT: false, display: "fit") - /// Quaver (Steam App ID 980610). Ported on 2026-10-26 from a community tested list for it (its version 1); not + /// Quaver (Steam App ID 980610). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its version 1); not /// device-tested here. static let quaver = GameRecommendation( id: "quaver", title: "Quaver", version: 1, @@ -1791,7 +1793,7 @@ extension GameRecommendations { """, avx: false, nvidia: false, wineVCRT: false, display: "fit") - /// Dying Light (Steam App ID 239140). Ported on 2026-10-26 from a community tested list for it (its version + /// Dying Light (Steam App ID 239140). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its version /// 2); not device-tested here. Left out: MADEIRA_OPTIN_DLLS (the community app-side switch; not in this tree /// (opt-in DLLs not merged)); MADEIRA_OPTIN_DLLS (the community app-side switch; not in this tree (opt-in DLLs /// not merged)). @@ -1810,7 +1812,7 @@ extension GameRecommendations { """, avx: false, nvidia: false, wineVCRT: false, display: "fit") - /// BeamNG.drive (Steam App ID 284160). Ported on 2026-10-26 from a community tested list for it (its version + /// BeamNG.drive (Steam App ID 284160). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its version /// 2); not device-tested here. Left out: MADEIRA_X64_MACHINE (read by a Wine/tools patch that is not merged). static let beamngDrive = GameRecommendation( id: "beamng-drive", title: "BeamNG.drive", version: 1, @@ -1827,7 +1829,7 @@ extension GameRecommendations { """) /// Monster Hunter Stories 3: Twisted Reflection Trial Version (Steam App ID 3470630). Ported on 2026-10-26 from - /// a community tested list for it (its version 1); not device-tested here. + /// thebcd69's (BCD) tested list for it (its version 1); not device-tested here. static let monsterHunterStories3Trial = GameRecommendation( id: "monster-hunter-stories-3-trial", title: "Monster Hunter Stories 3: Twisted Reflection Trial Version", version: 1, config: """ @@ -1842,7 +1844,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Phoenix Wright: Ace Attorney Trilogy (Steam App ID 787480). Ported on 2026-10-26 from a community tested + /// Phoenix Wright: Ace Attorney Trilogy (Steam App ID 787480). Ported on 2026-10-26 from thebcd69's (BCD) tested /// list for it (its version 1); not device-tested here. static let pwaat = GameRecommendation( id: "pwaat", title: "Phoenix Wright: Ace Attorney Trilogy", version: 1, @@ -1859,7 +1861,7 @@ extension GameRecommendations { """, avx: false, nvidia: false, wineVCRT: false, display: "fit") - /// American Truck Simulator (Steam App ID 270880). Ported on 2026-10-26 from a community tested list for it + /// American Truck Simulator (Steam App ID 270880). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD /// (its version 1); not device-tested here. static let americanTruckSimulator = GameRecommendation( id: "american-truck-simulator", title: "American Truck Simulator", version: 1, @@ -1875,7 +1877,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Marvel's Spider-Man: Miles Morales (Steam App ID 1817190). Ported on 2026-10-26 from a community tested + /// Marvel's Spider-Man: Miles Morales (Steam App ID 1817190). Ported on 2026-10-26 from thebcd69's (BCD) tested /// list for it (its version 1); not device-tested here. static let marvelsSpiderManMilesMorales = GameRecommendation( id: "marvels-spider-man-miles-morales", title: "Marvel's Spider-Man: Miles Morales", version: 1, @@ -1894,7 +1896,7 @@ extension GameRecommendations { """, avx: false, nvidia: true, wineVCRT: false, display: "fit") - /// Diablo II: Resurrected (Steam App ID 2536520). Ported on 2026-10-26 from a community tested list for it + /// Diablo II: Resurrected (Steam App ID 2536520). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD /// (its version 2); not device-tested here. Left out: MADEIRA_OPTIN_DLLS (the community app-side switch; not /// in this tree (opt-in DLLs not merged)); MADEIRA_NTDLL_XSEC (read by the companion ntdll-xsec.dll, which this /// tree does not build); MADEIRA_SHARED_SECTION_EXEC (needs ntdll-xsec.dll (NTDLL_XSEC) to tell the emulator; not @@ -1914,7 +1916,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Clair Obscur: Expedition 33 (Steam App ID 1903340). Ported on 2026-10-26 from a community tested list for + /// Clair Obscur: Expedition 33 (Steam App ID 1903340). Ported on 2026-10-26 from thebcd69's (BCD) tested list for /// it (its version 1); not device-tested here. static let clairObscurExpedition33 = GameRecommendation( id: "clair-obscur-expedition-33", title: "Clair Obscur: Expedition 33", version: 1, @@ -1931,7 +1933,7 @@ extension GameRecommendations { """) /// GTA San Andreas - The Definitive Edition (Steam) (Steam App ID 1547000). Ported on 2026-10-26 from a - /// community tested list for it (its version 1); not device-tested here. Left out: MADEIRA_FEX_AVX (the AVX switch + /// thebcd69's (BCD) tested list for it (its version 1); not device-tested here. Left out: MADEIRA_FEX_AVX (the AVX switch /// (avx: false) instead). static let gtasaDeSteam = GameRecommendation( id: "gtasa-de-steam", title: "GTA San Andreas - The Definitive Edition (Steam)", version: 1, @@ -1950,7 +1952,7 @@ extension GameRecommendations { """, avx: false) - /// Unrailed! 2: Back on Track (Steam App ID 2211170). Ported on 2026-10-26 from a community tested list for it + /// Unrailed! 2: Back on Track (Steam App ID 2211170). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD /// (its version 1); not device-tested here. static let unrailed2BackOnTrack = GameRecommendation( id: "unrailed-2-back-on-track", title: "Unrailed! 2: Back on Track", version: 1, @@ -1966,7 +1968,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// BlazBlue Entropy Effect (Steam App ID 2273430). Ported on 2026-10-26 from a community tested list for it + /// BlazBlue Entropy Effect (Steam App ID 2273430). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD /// (its version 1); not device-tested here. static let blazblueEntropyEffect = GameRecommendation( id: "blazblue-entropy-effect", title: "BlazBlue Entropy Effect", version: 1, @@ -1982,7 +1984,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Marvel's Spider-Man Remastered (Steam App ID 1817070). Ported on 2026-10-26 from a community tested list + /// Marvel's Spider-Man Remastered (Steam App ID 1817070). Ported on 2026-10-26 from thebcd69's (BCD) tested list /// for it (its version 2); not device-tested here. static let marvelsSpiderManRemastered = GameRecommendation( id: "marvels-spider-man-remastered", title: "Marvel's Spider-Man Remastered", version: 1, @@ -2002,7 +2004,7 @@ extension GameRecommendations { """, avx: false, nvidia: true, wineVCRT: false, display: "fit") - /// Marvel's Spider-Man 2 (Steam App ID 2651280). Ported on 2026-10-26 from a community tested list for it (its + /// Marvel's Spider-Man 2 (Steam App ID 2651280). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its /// version 1); not device-tested here. static let marvelsSpiderMan2 = GameRecommendation( id: "marvels-spider-man-2", title: "Marvel's Spider-Man 2", version: 1, @@ -2027,7 +2029,7 @@ extension GameRecommendations { avx: false, nvidia: true, wineVCRT: false, display: "fit") /// RAIDOU Remastered: The Mystery of the Soulless Army (Steam App ID 2288350). Ported on 2026-10-26 from a - /// community tested list for it (its version 1); not device-tested here. + /// thebcd69's (BCD) tested list for it (its version 1); not device-tested here. static let raidouRemastered = GameRecommendation( id: "raidou-remastered", title: "RAIDOU Remastered: The Mystery of the Soulless Army", version: 1, config: """ @@ -2042,7 +2044,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Yakuza: Like a Dragon (Steam App ID 1235140). Ported on 2026-10-26 from a community tested list for it (its + /// Yakuza: Like a Dragon (Steam App ID 1235140). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its /// version 1); not device-tested here. static let yakuzaLikeADragon = GameRecommendation( id: "yakuza-like-a-dragon", title: "Yakuza: Like a Dragon", version: 1, @@ -2059,7 +2061,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Batman: Arkham City GOTY (Steam App ID 200260). Ported on 2026-10-26 from a community tested list for it + /// Batman: Arkham City GOTY (Steam App ID 200260). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD /// (its version 2). Version 2 (an iPhone 17 Pro Max, 2026-10-31): with Madeira's own card name, BatmanAC.exe /// started its .NET launcher BmLauncher.exe and exited, and the Dock session ended with the launcher still /// opening; with "Older NVIDIA card (Direct3D 9)" it started no launcher and the game played. The first @@ -2079,7 +2081,7 @@ extension GameRecommendations { """, olderNvidia: true) - /// Trails in the Sky 1st Chapter (Steam App ID 3375780). Ported on 2026-10-26 from a community tested list for + /// Trails in the Sky 1st Chapter (Steam App ID 3375780). Ported on 2026-10-26 from thebcd69's (BCD) tested list for /// it (its version 1); not device-tested here. static let trailsInTheSky1stChapter = GameRecommendation( id: "trails-in-the-sky-1st-chapter", title: "Trails in the Sky 1st Chapter", version: 1, @@ -2095,7 +2097,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Subnautica 2 (Steam App ID 1962700). Ported on 2026-10-26 from a community tested list for it (its version + /// Subnautica 2 (Steam App ID 1962700). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its version /// 1); not device-tested here. static let subnautica2 = GameRecommendation( id: "subnautica-2", title: "Subnautica 2", version: 1, @@ -2111,7 +2113,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Red Dead Redemption (Steam) (Steam App ID 2668510). Ported on 2026-10-26 from a community tested list for + /// Red Dead Redemption (Steam) (Steam App ID 2668510). Ported on 2026-10-26 from thebcd69's (BCD) tested list for /// it (its version 1); not device-tested here. static let rdr1Steam = GameRecommendation( id: "rdr1-steam", title: "Red Dead Redemption (Steam)", version: 1, @@ -2129,7 +2131,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Resident Evil Requiem (Steam App ID 3764200). Ported on 2026-10-26 from a community tested list for it (its + /// Resident Evil Requiem (Steam App ID 3764200). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its /// version 2); not device-tested here. static let residentEvilRequiem = GameRecommendation( id: "resident-evil-requiem", title: "Resident Evil Requiem", version: 1, @@ -2147,7 +2149,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Resident Evil Requiem Demo (Steam App ID 4459100). Ported on 2026-10-26 from a community tested list for it + /// Resident Evil Requiem Demo (Steam App ID 4459100). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD /// (its version 1); not device-tested here. static let residentEvilRequiemDemo = GameRecommendation( id: "resident-evil-requiem-demo", title: "Resident Evil Requiem Demo", version: 1, @@ -2164,7 +2166,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Life is Strange Remastered (Steam App ID 1265920). Ported on 2026-10-26 from a community tested list for it + /// Life is Strange Remastered (Steam App ID 1265920). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD /// (its version 1); not device-tested here. static let lifeIsStrangeRemastered = GameRecommendation( id: "life-is-strange-remastered", title: "Life is Strange Remastered", version: 1, @@ -2180,7 +2182,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Life is Strange 2 (Steam App ID 532210). Ported on 2026-10-26 from a community tested list for it (its + /// Life is Strange 2 (Steam App ID 532210). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its /// version 1); not device-tested here. static let lifeIsStrange2 = GameRecommendation( id: "life-is-strange-2", title: "Life is Strange 2", version: 1, @@ -2197,7 +2199,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Project Zomboid (Steam App ID 108600). Ported on 2026-10-26 from a community tested list for it (its + /// Project Zomboid (Steam App ID 108600). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its /// version 1); not device-tested here. static let projectZomboid = GameRecommendation( id: "project-zomboid", title: "Project Zomboid", version: 1, @@ -2213,7 +2215,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// SpiderHeck (Steam App ID 1329500). Ported on 2026-10-26 from a community tested list for it (its version + /// SpiderHeck (Steam App ID 1329500). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its version /// 1); not device-tested here. static let spiderheck = GameRecommendation( id: "spiderheck", title: "SpiderHeck", version: 1, @@ -2229,7 +2231,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// ROUNDS (Steam App ID 1557740). Ported on 2026-10-26 from a community tested list for it (its version 1); + /// ROUNDS (Steam App ID 1557740). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its version 1); /// not device-tested here. static let rounds = GameRecommendation( id: "rounds", title: "ROUNDS", version: 1, @@ -2245,7 +2247,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// PlateUp! (Steam App ID 1599600). Ported on 2026-10-26 from a community tested list for it (its version 1); + /// PlateUp! (Steam App ID 1599600). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its version 1); /// not device-tested here. static let plateup = GameRecommendation( id: "plateup", title: "PlateUp!", version: 1, @@ -2262,7 +2264,7 @@ extension GameRecommendations { """) /// FINAL FANTASY TACTICS - The Ivalice Chronicles (Steam App ID 1004640). Ported on 2026-10-26 from a - /// community tested list for it (its version 1); not device-tested here. + /// thebcd69's (BCD) tested list for it (its version 1); not device-tested here. static let finalFantasyTacticsIvaliceChronicles = GameRecommendation( id: "final-fantasy-tactics-ivalice-chronicles", title: "FINAL FANTASY TACTICS - The Ivalice Chronicles", version: 1, config: """ @@ -2277,7 +2279,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Jetboard Joust (Steam App ID 1181600). Ported on 2026-10-26 from a community tested list for it (its + /// Jetboard Joust (Steam App ID 1181600). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its /// version 1); not device-tested here. static let jetboardJoust = GameRecommendation( id: "jetboard-joust", title: "Jetboard Joust", version: 1, @@ -2293,7 +2295,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Dead as Disco (Steam App ID 3404260). Ported on 2026-10-26 from a community tested list for it (its version + /// Dead as Disco (Steam App ID 3404260). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its version /// 1); not device-tested here. Left out: MADEIRA_OPTIN_DLLS (the community app-side switch; not in this tree /// (opt-in DLLs not merged)). static let deadAsDisco = GameRecommendation( @@ -2310,7 +2312,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// TUNG (Steam folder "tung"). Ported on 2026-10-26 from a community tested list for it (its version 1); not + /// TUNG (Steam folder "tung"). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its version 1); not /// device-tested here. static let tung = GameRecommendation( id: "tung", title: "TUNG", version: 1, @@ -2326,7 +2328,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Sekiro: Shadows Die Twice (Steam App ID 814380). Ported on 2026-10-26 from a community tested list for it + /// Sekiro: Shadows Die Twice (Steam App ID 814380). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD /// (its version 1); not device-tested here. static let sekiroShadowsDieTwice = GameRecommendation( id: "sekiro-shadows-die-twice", title: "Sekiro: Shadows Die Twice", version: 1, @@ -2342,7 +2344,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Stardew Valley (Steam App ID 413150). Ported on 2026-10-26 from a community tested list for it (its version + /// Stardew Valley (Steam App ID 413150). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD (its version /// 1); not device-tested here. static let stardewValley = GameRecommendation( id: "stardew-valley", title: "Stardew Valley", version: 1, @@ -2358,7 +2360,7 @@ extension GameRecommendations { env.MADEIRA_JIT_DUMP = 0 """) - /// Glyphica: Typing Survival (Steam App ID 2400160). Ported on 2026-10-26 from a community tested list for it + /// Glyphica: Typing Survival (Steam App ID 2400160). Ported on 2026-10-26 from the tested list for it in thebcd69's BCD /// (its version 1); not device-tested here. static let glyphicaTypingSurvival = GameRecommendation( id: "glyphica-typing-survival", title: "Glyphica: Typing Survival", version: 1, @@ -2375,7 +2377,7 @@ extension GameRecommendations { """) /// The Adventures of Elliot: The Millennium Tales (Steam App ID 3483510). Ported on 2026-10-26 from a - /// community tested list for it (its version 1); not device-tested here. Left out: pool-above-window (the + /// thebcd69's (BCD) tested list for it (its version 1); not device-tested here. Left out: pool-above-window (the /// community app-side switch; not in this tree); MADEIRA_KUSER_KEEP_REGS (its engine code (signal_arm64_ios.c) is /// not in this tree yet). static let theAdventuresOfElliot = GameRecommendation( diff --git a/app/Madeira/MemoryHostProtocol.h b/app/Madeira/MemoryHostProtocol.h index 2535bc2d08..c2e344fa6f 100644 --- a/app/Madeira/MemoryHostProtocol.h +++ b/app/Madeira/MemoryHostProtocol.h @@ -1,3 +1,5 @@ +/* Copyright 2026 thebcd69 (BCD). This file was taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ // Extension memory experiment (2026-09-29), shared by Madeira and its // MadeiraMemoryHost extension. // diff --git a/app/Madeira/MemoryHostTest.h b/app/Madeira/MemoryHostTest.h index 46c8919eb1..99efd1afd2 100644 --- a/app/Madeira/MemoryHostTest.h +++ b/app/Madeira/MemoryHostTest.h @@ -1,3 +1,5 @@ +/* Copyright 2026 thebcd69 (BCD). This file was taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ #import /// The extension memory experiment (MemoryHostProtocol.h): starts the diff --git a/app/Madeira/MemoryHostTest.m b/app/Madeira/MemoryHostTest.m index 42fcb7bfd4..cf5a4ed35f 100644 --- a/app/Madeira/MemoryHostTest.m +++ b/app/Madeira/MemoryHostTest.m @@ -1,3 +1,5 @@ +/* Copyright 2026 thebcd69 (BCD). This file was taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ // The extension memory experiment, Madeira's side (see MemoryHostProtocol.h). // // Run 2 (2026-09-29): memory OWNED by the MadeiraMemoryHost extension is billed diff --git a/app/Madeira/Winios/Winios.m b/app/Madeira/Winios/Winios.m index c289c209f8..d856c050d0 100644 --- a/app/Madeira/Winios/Winios.m +++ b/app/Madeira/Winios/Winios.m @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* Winios.m — iOS user_driver implementation for Wine. * * The Wine win32u-unix side declares weak externs `winios_pCreateWindow`, diff --git a/app/Madeira/arm64ec-windows/d3d9.dll b/app/Madeira/arm64ec-windows/d3d9.dll index 557f165a2c..ba956f3c7b 100755 Binary files a/app/Madeira/arm64ec-windows/d3d9.dll and b/app/Madeira/arm64ec-windows/d3d9.dll differ diff --git a/app/Madeira/arm64ec-windows/wined3d.dll b/app/Madeira/arm64ec-windows/wined3d.dll index 23008d375b..c6d0b28c1f 100755 Binary files a/app/Madeira/arm64ec-windows/wined3d.dll and b/app/Madeira/arm64ec-windows/wined3d.dll differ diff --git a/app/MadeiraMemoryHost/Info.plist b/app/MadeiraMemoryHost/Info.plist index 51fa9e4a70..16b18d088b 100644 --- a/app/MadeiraMemoryHost/Info.plist +++ b/app/MadeiraMemoryHost/Info.plist @@ -1,4 +1,6 @@ + diff --git a/app/MadeiraMemoryHost/MemoryHost.m b/app/MadeiraMemoryHost/MemoryHost.m index ae7ef64658..05eb6da279 100644 --- a/app/MadeiraMemoryHost/MemoryHost.m +++ b/app/MadeiraMemoryHost/MemoryHost.m @@ -1,3 +1,5 @@ +/* Copyright 2026 thebcd69 (BCD). This file was taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ // MadeiraMemoryHost: an app extension on com.apple.ar.viewer, the extension // point iOS 27's jetsam table gives no memory limit. It creates memory objects // for Madeira on request (the extension memory experiment, see diff --git a/build/madeira-d3d12/build-pe.sh b/build/madeira-d3d12/build-pe.sh index 20dd6b85a8..56f8b40e56 100755 --- a/build/madeira-d3d12/build-pe.sh +++ b/build/madeira-d3d12/build-pe.sh @@ -1,4 +1,6 @@ #!/bin/bash +# Portions copyright 2026 thebcd69 (BCD): code taken from pull requests willfaust/Madeira#337 to #346 (thebcd69, 2026-10-15) and https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. # Build madeira_d3d12.dll as ARM64EC, plus the x64 test executable. # # A SEPARATE DLL, not a replacement for the bundled d3d12.dll: the design says diff --git a/build/ntdll-unix/audio_null_ios.c b/build/ntdll-unix/audio_null_ios.c index 4ce7037053..35c02fc375 100644 --- a/build/ntdll-unix/audio_null_ios.c +++ b/build/ntdll-unix/audio_null_ios.c @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from pull requests willfaust/Madeira#337 to #346 (thebcd69, 2026-10-15) and https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* * audio_null_ios.c — minimal Wine audio "null" driver for iOS Madeira. * diff --git a/build/ntdll-unix/env_ios.c b/build/ntdll-unix/env_ios.c index 762d0cd65e..c2f88ad607 100644 --- a/build/ntdll-unix/env_ios.c +++ b/build/ntdll-unix/env_ios.c @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* * Ntdll environment functions * diff --git a/build/ntdll-unix/hw_registry_ios.h b/build/ntdll-unix/hw_registry_ios.h index 15b0c2286a..bcebe2ad9f 100644 --- a/build/ntdll-unix/hw_registry_ios.h +++ b/build/ntdll-unix/hw_registry_ios.h @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* * Ported from programs/wineboot/wineboot.c * Copyright (C) 2002 Andreas Mohr diff --git a/build/ntdll-unix/loader_ios.c b/build/ntdll-unix/loader_ios.c index 2299fa4899..835f2981cb 100644 --- a/build/ntdll-unix/loader_ios.c +++ b/build/ntdll-unix/loader_ios.c @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* * Unix interface for loader functions * diff --git a/build/ntdll-unix/process_ios.c b/build/ntdll-unix/process_ios.c index 8b9c15464b..3239fbf2e8 100644 --- a/build/ntdll-unix/process_ios.c +++ b/build/ntdll-unix/process_ios.c @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from pull requests willfaust/Madeira#337 to #346 (thebcd69, 2026-10-15) and https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* * NT process handling * diff --git a/build/ntdll-unix/server_ios.c b/build/ntdll-unix/server_ios.c index dc30fc6f6f..dd92c34b4c 100644 --- a/build/ntdll-unix/server_ios.c +++ b/build/ntdll-unix/server_ios.c @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* * Wine server communication * diff --git a/build/ntdll-unix/signal_arm64_ios.c b/build/ntdll-unix/signal_arm64_ios.c index ed0e3bedad..6016b196f7 100644 --- a/build/ntdll-unix/signal_arm64_ios.c +++ b/build/ntdll-unix/signal_arm64_ios.c @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* * ARM64 signal handling routines * diff --git a/build/ntdll-unix/thread_ios.c b/build/ntdll-unix/thread_ios.c index 559c8dd738..ba5e5536c8 100644 --- a/build/ntdll-unix/thread_ios.c +++ b/build/ntdll-unix/thread_ios.c @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from pull requests willfaust/Madeira#337 to #346 (thebcd69, 2026-10-15) and https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* * NT threads support * diff --git a/build/ntdll-unix/virtual_ios.c b/build/ntdll-unix/virtual_ios.c index 06cd0d1d6d..032035409f 100644 --- a/build/ntdll-unix/virtual_ios.c +++ b/build/ntdll-unix/virtual_ios.c @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from pull requests willfaust/Madeira#337 to #346 (thebcd69, 2026-10-15) and https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* * Win32 virtual memory functions * diff --git a/build/tools/gen-config-catalog.py b/build/tools/gen-config-catalog.py index 3b490192b7..4b3eb6263e 100644 --- a/build/tools/gen-config-catalog.py +++ b/build/tools/gen-config-catalog.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# Portions copyright 2026 thebcd69 (BCD): code taken from pull requests willfaust/Madeira#337 to #346 (thebcd69, 2026-10-15) and https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """Generate app/Madeira/ConfigCatalog.generated.swift: every option Madeira reads. Two kinds of option live in Documents/madeira.cfg: @@ -1090,6 +1092,17 @@ "gives the next draw a fresh buffer, so draws already recorded keep what they read. " "[d3d9-index-range] lines in the log say how much was copied. 0: the whole-buffer copy, as before. " "Read once per session."}, + # DXMT's Direct3D 9 format gate reads it (dxmt/src/d3d9/d3d9_format.cpp, isColorRTFormat). + "env.MADEIRA_D3D9_LUMINANCE_RT": {"category": "Direct3D 9/10/11 (DXMT)", + "title": "Direct3D 9: luminance formats as render targets", + "kind": "bool", "default": "1", "sources": ["dxmt/src/d3d9/d3d9_format.cpp"], + "note": "On by default. A Direct3D 9 program may render into an L8, A8L8 or L16 texture (one-channel " + "targets for ambient occlusion, blur passes or masks), as native drivers and DXVK allow; DXMT " + "used to refuse the texture, and a program that builds such targets through its engine's " + "format table then got none and could sit on its loading screen for good. The storage is " + "R8Unorm, RG8Unorm or R16Unorm, renderable on every Metal GPU; the shader's .r lands in the " + "luminance channel and samples read back as (L, L, L, 1). 0: refuse them, as before. " + "Read once per session."}, # Mesa's opengl32 on D3D12 over Wine's stub (WineProcessBridge.m, build/mesa-d3d12). "env.MADEIRA_OPENGL": {"category": "Windows, display & input", "title": "OpenGL through Mesa on D3D12", "kind": "bool", "default": "0", diff --git a/build/win32u-unix/class_ios.c b/build/win32u-unix/class_ios.c index 0caf2185c9..04b307475c 100644 --- a/build/win32u-unix/class_ios.c +++ b/build/win32u-unix/class_ios.c @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* * Window classes functions * diff --git a/build/win32u-unix/d3dkmt_ios.c b/build/win32u-unix/d3dkmt_ios.c index 6c422eaf9c..8c3ce14480 100644 --- a/build/win32u-unix/d3dkmt_ios.c +++ b/build/win32u-unix/d3dkmt_ios.c @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* * D3DKMT entry points, iOS override * diff --git a/build/win32u-unix/driver_ios.c b/build/win32u-unix/driver_ios.c index e63df47f46..f6ee1fb6f6 100644 --- a/build/win32u-unix/driver_ios.c +++ b/build/win32u-unix/driver_ios.c @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* * Graphics driver management functions * diff --git a/build/win32u-unix/madeira_kmt.h b/build/win32u-unix/madeira_kmt.h index 915cc74f9e..1bd3d999ac 100644 --- a/build/win32u-unix/madeira_kmt.h +++ b/build/win32u-unix/madeira_kmt.h @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* iOS-Madeira: ONE D3DKMT adapter for the GPU that DXGI, NVAPI and * madeira_d3d12 report -- opt-in, MADEIRA_KMT_ADAPTER=1 (env.MADEIRA_KMT_ADAPTER * in madeira.cfg). diff --git a/build/win32u-unix/sysparams_ios.c b/build/win32u-unix/sysparams_ios.c index 4eb6485ce1..789da829ca 100644 --- a/build/win32u-unix/sysparams_ios.c +++ b/build/win32u-unix/sysparams_ios.c @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* * System parameters functions * diff --git a/build/wineserver/mapping_ios.c b/build/wineserver/mapping_ios.c index ee2a4a286a..ab6ab509b0 100644 --- a/build/wineserver/mapping_ios.c +++ b/build/wineserver/mapping_ios.c @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* * Server-side file mapping management * diff --git a/build/wineserver/queue_ios.c b/build/wineserver/queue_ios.c index 8727c85f36..a0f6ac6c47 100644 --- a/build/wineserver/queue_ios.c +++ b/build/wineserver/queue_ios.c @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* * Server-side message queues * diff --git a/docs/BUILDING.md b/docs/BUILDING.md index 3f446d719c..92681c23fa 100644 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -67,6 +67,27 @@ git-ignored and consumed by the app project. the ARM64EC farm. It is in the default module list; rebuild it explicitly with `bash build/wine-pe/build-modules.sh explorerframe`. See `docs/TASKBARLIST.md` for the package check and Windows x64 COM fixture. + - fx_2_0 effects (2026-11-04): an effect compiled from text at run time + (`D3DXCreateEffect` on a `.fx` source) goes d3dx9 -> `d3dcompiler_47` -> + the vkd3d-shader copy in `wine/libs/vkd3d`, whose fx_2_0 writer (release + 1.19) refused sampler state blocks (`sampler2D s { Texture = ; ... }`) + and pass assignments (`PixelShader = compile ps_3_0 f(); ZEnable = 0;`): + the program showed "Error building shader" and ran without the effect. + The Wine tree's `libs/vkd3d/libs/vkd3d-shader/fx.c` now writes both, + with the resource records d3dx9 reads shader bytecode and `` + references from, zeros for parameters without an initializer, and + `TRUE`/`FALSE` by name for every state. vkd3d-shader is linked into + `wined3d.dll` (the `d3dcompiler_*` modules import it from there), so a + change in `libs/vkd3d` means rebuilding `wined3d` for both farms + (`build/wine-pe/build-modules.sh wined3d` and + `build/wine-i386/build.sh wined3d`); the d3dcompiler modules themselves + do not change. + `tests/host/check-fx2-effects.py` checks the writer's pieces and, with + `VKD3D_COMPILER` pointing at a `vkd3d-compiler` built from that tree + (upstream vkd3d at tag `vkd3d-1.19` with the tree's `fx.c` copied in; + `./configure WIDL=/tools/widl/widl --disable-tests`), + compiles a sample effect and reads the binary back the way + `dlls/d3dx9_36/effect.c` does. - Stand-ins for DLLs Wine cannot provide here but games import: `python3 tools/build-stub-dlls.py wine build/stub-dlls toolchains/llvm-mingw-20260421-ucrt-macos-universal/bin/arm64ec-w64-mingw32-clang toolchains/llvm-mingw-20260421-ucrt-macos-universal/bin/llvm-readobj app/Madeira/arm64ec-windows` builds `vulkan-1.dll` (answers like a PC without a Vulkan driver, so a game falls back to D3D) and, when the farm has no Wine build of them, `d3d10.dll` and `avifil32.dll`; each exports exactly its Wine `.spec`. Crysis Remastered imports all three. 4. DXMT (submodule, branch ios-port): - unix side: `build/dxmt-ios/build.sh` (needs `toolchains/llvm-ios-build`) -> `app/Madeira/libdxmt_combined.a` (ignored; the app links it). Verified this session. diff --git a/dxmt b/dxmt index 1f617cd5bb..3d62913b75 160000 --- a/dxmt +++ b/dxmt @@ -1 +1 @@ -Subproject commit 1f617cd5bbe7a71bc0ad9083589cb44c747cdc9b +Subproject commit 3d62913b75fb8b21ad6494f9d9f9853b19d9a014 diff --git a/madeira-d3d12/src/madeira_ir_abi.h b/madeira-d3d12/src/madeira_ir_abi.h index efeedeacec..eabba7bd5b 100644 --- a/madeira-d3d12/src/madeira_ir_abi.h +++ b/madeira-d3d12/src/madeira_ir_abi.h @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* Shared ABI between the ARM64EC D3D12 runtime and the native shader-converter * service, crossed exactly once per pipeline creation via winemetal's unix call. * diff --git a/madeira-d3d12/src/pe/madeira_d3d12.c b/madeira-d3d12/src/pe/madeira_d3d12.c index 7968681a2b..0c3519cafd 100644 --- a/madeira-d3d12/src/pe/madeira_d3d12.c +++ b/madeira-d3d12/src/pe/madeira_d3d12.c @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from pull requests willfaust/Madeira#337 to #346 (thebcd69, 2026-10-15) and https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* madeira-d3d12: M2 native D3D12 ABI slice. * * The minimum set of objects the design's M2 gate names: a device that can diff --git a/madeira-d3d12/src/unix/madeira_ir_unix.mm b/madeira-d3d12/src/unix/madeira_ir_unix.mm index 6eef8fc36f..6181af6906 100644 --- a/madeira-d3d12/src/unix/madeira_ir_unix.mm +++ b/madeira-d3d12/src/unix/madeira_ir_unix.mm @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* Native shader-converter service: DXIL from the guest, metallib back. * * This is the unix half of one winemetal call. It exists because the converter diff --git a/madeira-d3d12/tests/windows/cube_window.c b/madeira-d3d12/tests/windows/cube_window.c index fdc8da408b..42b3dd24cb 100644 --- a/madeira-d3d12/tests/windows/cube_window.c +++ b/madeira-d3d12/tests/windows/cube_window.c @@ -1,3 +1,5 @@ +/* Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games + * under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. */ /* Visible rotating D3D12 cube: an x86-64 Windows program drawing through our * D3D12 interfaces and presenting into the host window. * diff --git a/tests/host/check-alias-release.py b/tests/host/check-alias-release.py index e4e8977cdb..6ced47e276 100644 --- a/tests/host/check-alias-release.py +++ b/tests/host/check-alias-release.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-3.0-or-later -# Ported from a community host check; anchors are the merged engine code's. +# Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """env.MADEIRA_ALIAS_RELEASE: anonymous JIT aliases follow MEM_RELEASE and MEM_DECOMMIT. A 64-bit title froze loading a save. It released a 4 GB arena at 0x7a00000000 diff --git a/tests/host/check-avail-phys.py b/tests/host/check-avail-phys.py index 6248b70361..1e00cb8f19 100644 --- a/tests/host/check-avail-phys.py +++ b/tests/host/check-avail-phys.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-3.0-or-later -# Ported from a community host check; anchors are the merged engine code's. +# Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """Opt-in available physical memory (madeira.cfg avail-phys = 1), the ntdll side; no Wine runs. - ios_avail_phys, cut out of build/ntdll-unix/virtual_ios.c and compiled on diff --git a/tests/host/check-d3d12-fl-12-1.py b/tests/host/check-d3d12-fl-12-1.py index 92448146c0..e9cfc48a9f 100644 --- a/tests/host/check-d3d12-fl-12-1.py +++ b/tests/host/check-d3d12-fl-12-1.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-3.0-or-later -# Ported from a community host check; anchors are the merged engine code's. +# Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """Opt-in feature level 12_1 and shader model 6.7 of the D3D12 runtime (madeira.cfg d3d12-fl-12-1 and d3d12-sm-6-7). diff --git a/tests/host/check-d3d9-luminance-rt.py b/tests/host/check-d3d9-luminance-rt.py new file mode 100644 index 0000000000..65f8a907bf --- /dev/null +++ b/tests/host/check-d3d9-luminance-rt.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +"""DXMT's Direct3D 9 format gate lets the luminance formats be render targets. + +A program that builds one-channel targets (ambient occlusion, blur passes, +masks) through its engine's format table asks CreateTexture for D3DFMT_L8 +with D3DUSAGE_RENDERTARGET. isColorRTFormat() in dxmt/src/d3d9/d3d9_format.cpp +refused it ("CreateTexture: format 50 not render-target-capable"), the +engine got no target and the program sat on its loading screen with both of +its threads parked. Native drivers and DXVK allow L8 targets: the storage +(R8Unorm) is colour-renderable on every Metal GPU. + +Checks, on the source: + - isColorRTFormat() returns true for D3DFMT_L8, D3DFMT_A8L8 and D3DFMT_L16 + behind the MADEIRA_D3D9_LUMINANCE_RT switch (0 = refuse, as before); + - the three formats still map to a colour-renderable Metal format for the + render-target usage (D3DFormatToMetal only rejects them for depth); + - the config catalog carries the switch. +""" +from pathlib import Path +import re +import sys + +root = Path(__file__).resolve().parents[2] +fmt = (root / 'dxmt/src/d3d9/d3d9_format.cpp').read_text(encoding='utf-8', errors='replace') +catalog = (root / 'app/Madeira/ConfigCatalog.generated.swift').read_text(encoding='utf-8', errors='replace') +failures = [] + + +def check(cond, what): + if not cond: + failures.append(what) + print('FAIL:', what) + + +m = re.search(r'\nbool\nisColorRTFormat\(D3DFORMAT format\) \{(.*?)\n\}\n', fmt, re.S) +check(m, 'isColorRTFormat() not found') +body = m.group(1) if m else '' +lum = re.search(r'case D3DFMT_L8:\s*case D3DFMT_A8L8:\s*case D3DFMT_L16: \{(.*?)\n \}', body, re.S) +check(lum, 'isColorRTFormat() lacks the L8 / A8L8 / L16 case') +if lum: + check('env::getEnvVar("MADEIRA_D3D9_LUMINANCE_RT") != "0"' in lum.group(1) + and 'return luminanceRT;' in lum.group(1), + 'the luminance case must return the MADEIRA_D3D9_LUMINANCE_RT switch (default on)') +check('#include "util_env.hpp"' in fmt, 'd3d9_format.cpp must include util_env.hpp for the switch') + +for name, metal in (('D3DFMT_L8', 'WMTPixelFormatR8Unorm'), ('D3DFMT_A8L8', 'WMTPixelFormatRG8Unorm'), + ('D3DFMT_L16', 'WMTPixelFormatR16Unorm')): + mm = re.search(r'case %s:.*?return usage == D3D9FormatUsage::DepthStencil \? WMTPixelFormatInvalid : (\w+);' + % name, fmt, re.S) + check(mm and mm.group(1) == metal, + '%s must map to %s for every usage but depth (got %s)' % (name, metal, mm.group(1) if mm else None)) + +check('key: "env.MADEIRA_D3D9_LUMINANCE_RT"' in catalog and 'defaultValue: "1"' in + catalog[catalog.find('key: "env.MADEIRA_D3D9_LUMINANCE_RT"'):][:400], + 'ConfigCatalog.generated.swift lacks env.MADEIRA_D3D9_LUMINANCE_RT (default 1)') + +if failures: + print('%d failure(s)' % len(failures)) + sys.exit(1) +print('OK: L8 / A8L8 / L16 render targets allowed behind MADEIRA_D3D9_LUMINANCE_RT') diff --git a/tests/host/check-fence-early.py b/tests/host/check-fence-early.py index e607125679..1d2f3f9ac6 100644 --- a/tests/host/check-fence-early.py +++ b/tests/host/check-fence-early.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-3.0-or-later -# Ported from a community host check; anchors are the merged engine code's. +# Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """fence-early (madeira-d3d12, opt-in): a fence advances when the GPU reached its batch. A 64-bit D3D12 title polls its fences about 25 times a frame. After the GPU diff --git a/tests/host/check-fex-band-keep.py b/tests/host/check-fex-band-keep.py index fc3f9141f9..5e5a558976 100644 --- a/tests/host/check-fex-band-keep.py +++ b/tests/host/check-fex-band-keep.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-3.0-or-later -# Ported from a community host check; anchors are the merged engine code's. +# Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """env.MADEIRA_FEX_BAND_KEEP_MB: the steer valve may not take the lowest N MB of the FEX arena. A 64-bit title made 24 reservations of 511 MB; the steer valve placed them in [0x7c00000000, diff --git a/tests/host/check-fx2-effects.py b/tests/host/check-fx2-effects.py new file mode 100644 index 0000000000..4a5ab8fc12 --- /dev/null +++ b/tests/host/check-fx2-effects.py @@ -0,0 +1,289 @@ +#!/usr/bin/env python3 +"""The fx_2_0 effect writer in the Wine tree's vkd3d: sampler initializers, +pass assignments and the resource records d3dx9 reads them from. + +An effect compiled at run time from text (D3DXCreateEffect on a .fx source) +goes through Wine's d3dx9 -> d3dcompiler -> vkd3d-shader, target fx_2_0. +Release 1.19 of vkd3d stopped on the first sampler with a state block +("Writing fx_2_0 sampler objects initializers is not implemented") and on +every pass with assignments ("Write pass assignments"), so a program showed +its "Error building shader" dialog and ran without the effect. + +Structural part (always): wine/libs/vkd3d/libs/vkd3d-shader/fx.c has the +writer pieces and none of the three refusals. + +Functional part: set VKD3D_COMPILER to a vkd3d-compiler built from that tree +(docs/BUILDING.md, "fx_2_0 effects") and the test compiles a small effect to +fx_2_0 and reads the binary back the way dlls/d3dx9_36/effect.c does: the +sampler's states follow its state count without gaps, Texture = is an +object whose resource record names the parameter, each pass shader is an +object whose resource record carries SM3 bytecode, numeric states are INT +scalars, object ids are unique and the records end exactly at the file end. +Without the variable the functional part prints SKIP. +""" +from pathlib import Path +import os +import struct +import subprocess +import sys +import tempfile + +root = Path(__file__).resolve().parents[2] +fx_c = root / 'wine/libs/vkd3d/libs/vkd3d-shader/fx.c' +failures = [] + + +def check(cond, what): + if not cond: + failures.append(what) + print('FAIL:', what) + + +src = fx_c.read_text(encoding='utf-8', errors='replace') +for refusal in ('Writing fx_2_0 sampler objects initializers is not implemented', + 'Write pass assignments.', + 'Writing fx_2_0 state assignments is not implemented'): + check(refusal not in src, 'fx.c still refuses: %s' % refusal) +for piece in ('static uint32_t write_fx_2_sampler_initializer(', + 'static void write_fx_2_resource(', + 'static uint32_t write_fx_2_object_type(', + 'static bool compile_shader(', + 'struct vkd3d_bytecode_buffer *fx_2_state_buffer;'): + check(piece in src, 'fx.c lacks %s' % piece) +assign = src[src.index('static void write_fx_2_state_assignment('):] +assign = assign[:assign.index('\n}\n')] +for case in ('case HLSL_IR_CONSTANT:', 'case HLSL_IR_COMPILE:', 'case HLSL_IR_LOAD:'): + check(case in assign, 'write_fx_2_state_assignment lacks %s' % case) +params = src[src.index('static void write_fx_2_parameters('):] +params = params[:params.index('\n}\n')] +check('&ctx->globals->vars' in params and 'extern_vars' not in params, + 'write_fx_2_parameters must walk the globals: compiling a pass shader rebuilds the externs list') +trailer = src[src.index('static int hlsl_fx_2_write('):] +trailer = trailer[:trailer.index('\n}\n')] +check('fx.object_record_count' in trailer and 'fx.resource_count' in trailer and 'fx.resources.data' in trailer, + 'hlsl_fx_2_write must write the object record count, the resource count and the resource records') + +EFFECT = r''' +texture ColorTex; +float4 Tint = float4(1, 1, 1, 1); + +sampler2D ColorSampler +{ + Texture = ; + AddressU = Clamp; + MinFilter = Linear; + MagFilter = Point; +}; + +void VSMain(in float4 pos : POSITION, in float2 uv : TEXCOORD0, + out float4 opos : POSITION, out float2 ouv : TEXCOORD0) +{ + opos = pos; + ouv = uv; +} + +float4 PSMain(in float2 uv : TEXCOORD0) : COLOR0 +{ + return tex2D(ColorSampler, uv) * Tint; +} + +float4 PSDark(in float2 uv : TEXCOORD0) : COLOR0 +{ + return tex2D(ColorSampler, uv) * 0.5; +} + +technique Blit +{ + pass P0 + { + VertexShader = compile vs_3_0 VSMain(); + PixelShader = compile ps_3_0 PSMain(); + ZEnable = 0; + AlphaBlendEnable = false; + CullMode = None; + } + pass P1 + { + PixelShader = compile ps_3_0 PSDark(); + VertexShader = compile vs_3_0 VSMain(); + ZWriteEnable = false; + MaterialDiffuse = float4(1, 0.5, 0.25, 1); + ZEnable = true; + } +} +''' + +# d3dx9shader.h +PT_INT, PT_FLOAT, PT_TEXTURE, PT_SAMPLER, PT_SAMPLERCUBE, PT_PIXELSHADER, PT_VERTEXSHADER = 2, 3, 5, 10, 14, 15, 16 +PC_MATRIX_ROWS, PC_OBJECT = 2, 4 +# dlls/d3dx9_36/effect.c state_table indices +OP_ZENABLE, OP_ZWRITEENABLE, OP_CULLMODE, OP_ALPHABLENDENABLE, OP_MATERIALDIFFUSE = 0, 3, 8, 13, 127 +OP_VERTEXSHADER, OP_PIXELSHADER, OP_TEXTURE, OP_ADDRESSU, OP_MAGFILTER, OP_MINFILTER = 146, 147, 164, 165, 169, 170 +VS_3_0, PS_3_0 = 0xfffe0300, 0xffff0300 + + +class Reader: + """Reads the binary like d3dx_parse_effect(): structured records in + order, with offsets into the unstructured block that follows the header.""" + + def __init__(self, data): + self.d = data + tag, size = struct.unpack_from('= 4 else 0 + want = VS_3_0 if op == OP_VERTEXSHADER else PS_3_0 + check(usage == 0 and version == want, 'shader resource usage=%d version=%#x' % (usage, version)) + check(len(seen) == len(object_states), 'every object state has its resource record') + check(len(ids) == len(set(ids)) and all(0 < i < nobjects for i in ids), + 'object ids %r unique and below the object count %d' % (ids, nobjects)) + check(rd.pos == len(data), 'records end at %d, file is %d bytes' % (rd.pos, len(data))) + + +compiler = os.environ.get('VKD3D_COMPILER') +if compiler: + functional(compiler) +else: + print('SKIP: set VKD3D_COMPILER to a vkd3d-compiler built from wine/libs/vkd3d to compile the sample effect') + +if failures: + print('%d failure(s)' % len(failures)) + sys.exit(1) +print('OK: fx_2_0 sampler initializers, pass assignments and resource records' + (' (compiled)' if compiler else '')) diff --git a/tests/host/check-game-recommendations.py b/tests/host/check-game-recommendations.py index a6a8b63f76..846529ae32 100644 --- a/tests/host/check-game-recommendations.py +++ b/tests/host/check-game-recommendations.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# Portions copyright 2026 thebcd69 (BCD): code taken from pull requests willfaust/Madeira#337 to #346 (thebcd69, 2026-10-15) and https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """Madeira's built-in recommended settings per game (owner's decision 2026-10-09). Source checks (every host): the lists in app/Madeira/GameRecommendations.swift diff --git a/tests/host/check-hw-registry.py b/tests/host/check-hw-registry.py index 4da065df2c..0d2fa56923 100644 --- a/tests/host/check-hw-registry.py +++ b/tests/host/check-hw-registry.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """wineboot's volatile hardware keys on iOS; no Wine runs. 1. Wiring, read from the files: loader_ios.c calls ios_hw_registry_publish in diff --git a/tests/host/check-jit-dump-optin.py b/tests/host/check-jit-dump-optin.py index 0bc4256608..af404b220a 100644 --- a/tests/host/check-jit-dump-optin.py +++ b/tests/host/check-jit-dump-optin.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-3.0-or-later -# Ported from a community host check; anchors are the merged engine code's. +# Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """The JIT-pool dump is opt-in (signal_arm64_ios.c ios_jit_dump_enabled); no Wine runs. A mach UNHANDLED is any fault passed on to Wine's own exception path, so the diff --git a/tests/host/check-jumbo-half.py b/tests/host/check-jumbo-half.py index b30c002e08..d580cdcb0d 100644 --- a/tests/host/check-jumbo-half.py +++ b/tests/host/check-jumbo-half.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-3.0-or-later -# Ported from a community host check; anchors are the merged engine code's. +# Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """env.MADEIRA_JUMBO_HALF: a too-large probe reservation gets half its size. A 64-bit title makes each 4 GB arena with an 8 GB probe it releases at once. diff --git a/tests/host/check-kmt-adapter.py b/tests/host/check-kmt-adapter.py index cf2b3fc4d2..ffd8857942 100755 --- a/tests/host/check-kmt-adapter.py +++ b/tests/host/check-kmt-adapter.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """The opt-in D3DKMT adapter (env.MADEIRA_KMT_ADAPTER = 1) in build/win32u-unix/d3dkmt_ios.c and sysparams_ios.c; no Wine runs. diff --git a/tests/host/check-quiet-log.py b/tests/host/check-quiet-log.py index 2c9a55488a..33a755ea94 100644 --- a/tests/host/check-quiet-log.py +++ b/tests/host/check-quiet-log.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# Portions copyright 2026 thebcd69 (BCD): code taken from pull requests willfaust/Madeira#337 to #346 (thebcd69, 2026-10-15) +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """quiet-log (madeira-d3d12) and MADEIRA_SRV_FGETPATH (wineserver); no Wine runs. Horizon Zero Dawn on build 493 (2026-10-11 11:10) spent its menu and its first diff --git a/tests/host/check-reserved-area-retry.py b/tests/host/check-reserved-area-retry.py index c637f0335f..04d3f5b37f 100644 --- a/tests/host/check-reserved-area-retry.py +++ b/tests/host/check-reserved-area-retry.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-3.0-or-later -# Ported from a community host check; anchors are the merged engine code's. +# Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """A MAP_FIXED over a guest window that the kernel refuses is retried at the next free range (small address maps only). A 32-bit program on a 63 GB address map: a 0x11000-byte section map inside the guest window diff --git a/tests/host/check-spawn-cwd-log.py b/tests/host/check-spawn-cwd-log.py index 3cb7287c57..e54091d786 100644 --- a/tests/host/check-spawn-cwd-log.py +++ b/tests/host/check-spawn-cwd-log.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-3.0-or-later -# Ported from a community host check; anchors are the merged engine code's. +# Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """build/ntdll-unix/process_ios.c: the child-spawn log line names the child's Windows current directory; no Wine runs. A title that ends on its own "asset could not be found" box raised the question which directory a Steam-launched diff --git a/tests/host/check-tail-carve-exec.py b/tests/host/check-tail-carve-exec.py index 482c03daaf..9e5b92fe22 100644 --- a/tests/host/check-tail-carve-exec.py +++ b/tests/host/check-tail-carve-exec.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-3.0-or-later -# Ported from a community host check; anchors are the merged engine code's. +# Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """A tail carve whose first pages cannot execute is refused, so FEX halves its code buffer. Several 32-bit programs ended in a redelivery storm of EXECUTE faults inside the JIT pool: FEX's diff --git a/tests/host/check-tiny-window.py b/tests/host/check-tiny-window.py index 558712e567..f974530a44 100644 --- a/tests/host/check-tiny-window.py +++ b/tests/host/check-tiny-window.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-3.0-or-later -# Ported from a community host check; anchors are the merged engine code's. +# Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """[win-create] / [tiny-win] and env.MADEIRA_TINY_WINDOW_FIX; no Wine runs. A 64-bit title opens as a 132x38 window -- Wine's minimum window size -- whose swapchain draws 1024x768, diff --git a/tests/host/check-va-pressure-gap.py b/tests/host/check-va-pressure-gap.py index 76ad73a0d5..8853cb3822 100644 --- a/tests/host/check-va-pressure-gap.py +++ b/tests/host/check-va-pressure-gap.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-3.0-or-later -# Ported from a community host check; anchors are the merged engine code's. +# Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """env.MADEIRA_VA_PRESSURE_GAP_OK: a slow scan through iOS's refused hole is not pressure. A 64-bit title: the app image landed high (address-map=[0x104d54000,...), 4 of 11 launches). A diff --git a/tests/host/check-vcrt-arm64-key.py b/tests/host/check-vcrt-arm64-key.py index 9c7c160498..711d43b672 100644 --- a/tests/host/check-vcrt-arm64-key.py +++ b/tests/host/check-vcrt-arm64-key.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-3.0-or-later -# Ported from a community host check; anchors are the merged engine code's. +# Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """env.MADEIRA_VCRT_ARM64_KEY, the volatile ARM64 Visual C++ redistributable marker (build/ntdll-unix/server_ios.c, ios_vcrt_arm64_key_publish); no Wine runs. diff --git a/tests/host/check-vmon-identity.py b/tests/host/check-vmon-identity.py index c20d0f5e59..2c59e02d57 100644 --- a/tests/host/check-vmon-identity.py +++ b/tests/host/check-vmon-identity.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-3.0-or-later -# Ported from a community host check; anchors are the merged engine code's. +# Portions copyright 2026 thebcd69 (BCD): code taken from https://github.com/thebcd69/bcd-games +# under GPL-3.0-or-later and modified for Madeira in October and November 2026. See THIRD-PARTY-NOTICES.md. """The virtual monitor's Win32 names (build/win32u-unix/sysparams_ios.c); no Wine runs. Compiles the production helpers (ios_vmon_ids_enabled .. ios_vmon_device_key) against stubs and checks the strings diff --git a/wine b/wine index 80c859a76e..ddf92babc5 160000 --- a/wine +++ b/wine @@ -1 +1 @@ -Subproject commit 80c859a76e1073bd41095b1b0abc43135efdd475 +Subproject commit ddf92babc5ba71f4586cc4713f5a8eb39f63d39b