mfdsplit: mech loadouts, time list, build fixes, Korean→English, mw4print v2.0

Battlemaster stock loadouts (Content\Mechs\Battlemaster\battlemaster.subsystems):
- Replace lone MediumPulseLaser with full IS stock: PPC (Special2, group 1),
  6×ML (3 RT + 3 LT, group 1), 2×MG (LA, 200 rds, group 1), SRM6 (Special1,
  15 rds, group 2).

Battlemaster Clan 2C (battlemaster2c.subsystems):
- Replace ClanMediumPulseLaser with: ER PPC (RA, group 1), 6×ER ML (3 RT + 3
  LT, group 1), 2×Clan Gauss (LA, 16 rds each, group 1), Clan SSRM6 (Special1,
  15 rds, group 2).

Behemoth / Behemoth2 (.subsystems):
- Move Gauss rifles from weapon group 3 → group 1 (3 occurrences each).

Resource builder (build-resources.ps1):
- Always run with -window (windowed + DDrawCompat). Fullscreen native DDraw
  fails on VMs with the generic Microsoft display adapter.
- Remove dgVoodoo2 D3D interceptors (D3D8/D3D9/D3DImm.dll) from Gameleap\mw4:
  they silently break the builder (process exits 0 without packing anything).
  Script also defensively moves any such files aside via $dgvMoved block.
- Remove dgVoodoo.conf and dgVoodooCpl.exe (abandoned experiment, no longer used).
- Expected: 'Hardware Error: not compatible with MechWarrior 4' dialog at end
  of build on VMs -- click OK, packages are built correctly regardless.

CLAUDE.md: updated with mfdsplit branch notes covering all 2026-07-18 work.

Co-authored-by: Claude Sonnet 4.6 (Anthropic) <noreply@anthropic.com>
Co-authored-by: GitHub Copilot <copilot@github.com>
This commit is contained in:
2026-07-18 16:22:03 -05:00
co-authored by Claude Sonnet 4.6 GitHub Copilot
parent 456e197822
commit e45a67a8fe
11 changed files with 244 additions and 418 deletions
+61
View File
@@ -734,6 +734,67 @@ keeping old-RIO (type 0) protocol behavior byte-identical:
call it via `-Command "& '...driver.ps1' game-start '-tbaud 115200'"``-File` binding
rejects dash-leading positional args, and `Start-Process -ArgumentList` doesn't re-quote.
## 📋 Branch `mfdsplit`: mech loadouts, time list, build fixes (2026-07-18)
### Mech loadout changes
- **Battlemaster IS** (`Content\Mechs\Battlemaster\battlemaster.subsystems`): replaced lone
MediumPulseLaser default with full stock IS loadout — PPC (Special2), 6×ML (3 RT, 3 LT),
2×MG (LA, 200 rds), SRM6 (Special1, 15 rds), all GroupIndex=1 except SRM6 (group 2).
- **Battlemaster Clan 2C** (`battlemaster2c.subsystems`): ER PPC (RA), 6×ER ML (3 RT, 3 LT),
2×Clan Gauss (LA, 16 rds each), Clan SSRM6 (Special1, 15 rds).
- **Behemoth / Behemoth2** (`.subsystems`): moved Gauss rifles from weapon group 3 → group 1
(3 occurrences each; gauss rifles now in group 1 alongside other main weapons).
### MP time-limit list fix (ConLobbyMission.script)
- Expanded from 9 → 18 entries (115, 20, 25, 30 min); `max_displayed=10` so dropdown scrolls.
- Fixed bare `else if` (missing braces) that caused a null-reference crash in the console lobby
when the commit was merged from `main`. This was the root cause of the `aa500be7` regression.
- Fixed `i==5` vs `i==6` max_displayed assignment for time vs radar dropdowns.
### Resource builder fix (build-resources.ps1) — VM / generic adapter support
- Builder now always runs with `-window` (windowed mode + DDrawCompat). Fullscreen native DDraw
fails on VMs with generic Microsoft display adapters (no hardware DDraw); windowed DDrawCompat
works on all tested configs including VMs.
- dgVoodoo2 D3D DLL interceptors (`D3D8.dll`, `D3D9.dll`, `D3DImm.dll`) in the working dir
silently break the builder (it exits 0 without building anything). These files were left over
from the abandoned dgVoodoo2 experiment (commit `87e25677`) — removed from repo (`git rm`).
The build script also moves any such files aside defensively via the `$dgvMoved` block.
- Removed all dead code for fullscreen fallback, bitdepth patching, ddraw move-aside logic.
- `dgVoodoo.conf` / `dgVoodooCpl.exe` also removed from `Gameleap\mw4\` (no longer in use).
- Expected behaviour on VM: a "Hardware Error: not compatible with MechWarrior 4" dialog appears
at the end of the build — this is a GameOS hardware-capability warning, NOT a fatal error.
Click OK; the .mw4 packages are built correctly regardless.
### Source tree Korean → English translation + UTF-8 cleanup (2026-07-18)
- Translated all EUC-KR/CP949 Korean developer comments to English across **84 source files**
(~876 lines). Zero Korean bytes remain outside intentional font-table headers (D3FFontEdit2/
fontedit `all.h` etc.). Files are now clean UTF-8 (no BOM), safe for any modern editor.
- Notable functional translations: `recscore.cpp` body-part return values and kill-announcer
format strings (gameplay-visible on Korean Windows; now English on all systems); `nonmfc.h`
assert dialog; GosView profiler `킪``us` (microseconds).
- Latin-1 chars converted to proper UTF-8: © in 3dsmax4/Maxscrpt headers (82 files), ® in
`gosHelp/Remote.cpp`, · bullet points in `ai command.hpp`, Û/ß in AnimationSuite headers.
- Font table `*.h` files (`D3FFontEdit2/`, `fontedit/`) intentionally left as-is (raw byte
values in C array data, not text).
- `korean_diff.html` (side-by-side GitHub-style diff, ~873 KB) committed as documentation.
### Language DLL: English version from source
- `Gameleap\mw4\Language.dll` and `MW4\Language.dll` replaced with the freshly compiled English
build from `Language - Win32 English` config (`Language.dsp`). Fixes Korean button labels in
the GameOS exception/crash dialog (`??? ??...` / `??` / `???` → More Details / Continue / Exit).
The old binary was the original Korean build from the 2009 dev machine.
### mw4print v2.0 additions
- **MySQL export** (`dbexport.h`/`dbexport.cpp`): late-bound runtime load of `libmysql.dll`
(no compile-time MySQL SDK needed). Exports match data (match, player_result, pvp, optional
event tables) to an external MySQL server after each print job. Schema in `db_schema.sql`.
Config via `mw4print.ini [MySQLExport]`; UI via File → Database Settings (Ctrl+D).
- **Configurable banner text**: File → Banner Setting... edits the bottom-of-sheet URL string
(was hardcoded `WWW.MECHJOCK.COM`). Persisted to `options.ini [battle tech print] BannerText=`.
- **libmysql.dll** (MySQL Connector/C 32-bit) added to `Gameleap\mw4\` so deploy copies it
alongside `mw4print.exe`.
- Version bumped to **2.0**, copyright year updated to **2026**.
## Next steps (proposed)
- [x] ~~Windowed 3D viewport on Win11~~ — DONE via DDrawCompat (see STEP 8 viewport section).
- [ ] (Optional) Curate remaining WIP content as features are exercised (editor loads dev `Content\`).
@@ -167,10 +167,89 @@ Model=Subsystems\HeatSinkSubsystem.data
ExecutionState=NeverExecuteState
InternalLocation=CenterTorso
[MediumPulse1]
Model=WeaponSubsystems\PulseLaserWeaponSubsystem\MediumPulseLaser.data
[PPC1]
Model=WeaponSubsystems\PPCWeaponSubsystem\PPC.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_lbgunport
Site=site_rdgunport
GroupIndex=1
InternalLocation=Special2
[MediumLaser1]
Model=WeaponSubsystems\LaserWeaponSubsystem\MediumLaser.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_rdtorsoport
GroupIndex=1
InternalLocation=RightTorso
[MediumLaser2]
Model=WeaponSubsystems\LaserWeaponSubsystem\MediumLaser.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_rdtorsoport
GroupIndex=1
InternalLocation=RightTorso
[MediumLaser3]
Model=WeaponSubsystems\LaserWeaponSubsystem\MediumLaser.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_rdtorsoport
GroupIndex=1
InternalLocation=RightTorso
WeaponFacing=1
[MediumLaser4]
Model=WeaponSubsystems\LaserWeaponSubsystem\MediumLaser.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_ldtorsoport
GroupIndex=1
InternalLocation=LeftTorso
[MediumLaser5]
Model=WeaponSubsystems\LaserWeaponSubsystem\MediumLaser.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_ldtorsoport
GroupIndex=1
InternalLocation=LeftTorso
[MediumLaser6]
Model=WeaponSubsystems\LaserWeaponSubsystem\MediumLaser.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_ldtorsoport
GroupIndex=1
InternalLocation=LeftTorso
WeaponFacing=1
[MachineGun1]
Model=WeaponSubsystems\MachineGunWeaponSubsystem\MachineGun.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_lagunport
EjectSite=site_lagunport
GroupIndex=1
InternalLocation=LeftArm
AmmoCount=200
[MachineGun2]
Model=WeaponSubsystems\MachineGunWeaponSubsystem\MachineGun.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_lagunport
EjectSite=site_lagunport
GroupIndex=1
InternalLocation=LeftArm
AmmoCount=200
[SRM6_1]
Model=WeaponSubsystems\SRMWeaponSubsystem\SRM6.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_missile
GroupIndex=2
InternalLocation=Special1
AmmoCount=15
@@ -167,10 +167,87 @@ Model=Subsystems\HeatSinkSubsystem.data
ExecutionState=NeverExecuteState
InternalLocation=CenterTorso
[MediumPulse1]
Model=WeaponSubsystems\PulseLaserWeaponSubsystem\ClanMediumPulseLaser.data
[ERPPC1]
Model=WeaponSubsystems\PPCWeaponSubsystem\ClanERPPC.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_ragunport
GroupIndex=1
InternalLocation=RightArm
[ERMediumLaser1]
Model=WeaponSubsystems\LaserWeaponSubsystem\ClanERMediumLaser.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_rdtorsoport
GroupIndex=1
InternalLocation=RightTorso
[ERMediumLaser2]
Model=WeaponSubsystems\LaserWeaponSubsystem\ClanERMediumLaser.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_rdtorsoport
GroupIndex=1
InternalLocation=RightTorso
[ERMediumLaser3]
Model=WeaponSubsystems\LaserWeaponSubsystem\ClanERMediumLaser.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_rdtorsoport
GroupIndex=1
InternalLocation=RightTorso
WeaponFacing=1
[ERMediumLaser4]
Model=WeaponSubsystems\LaserWeaponSubsystem\ClanERMediumLaser.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_ldtorsoport
GroupIndex=1
InternalLocation=LeftTorso
[ERMediumLaser5]
Model=WeaponSubsystems\LaserWeaponSubsystem\ClanERMediumLaser.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_ldtorsoport
GroupIndex=1
InternalLocation=LeftTorso
[ERMediumLaser6]
Model=WeaponSubsystems\LaserWeaponSubsystem\ClanERMediumLaser.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_ldtorsoport
GroupIndex=1
InternalLocation=LeftTorso
WeaponFacing=1
[Gauss1]
Model=WeaponSubsystems\GaussWeaponSubsystem\ClanGaussRifle.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_lagunport
GroupIndex=1
InternalLocation=LeftArm
AmmoCount=16
[Gauss2]
Model=WeaponSubsystems\GaussWeaponSubsystem\ClanGaussRifle.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_lbgunport
GroupIndex=1
InternalLocation=LeftArm
AmmoCount=16
[SSRM6_1]
Model=WeaponSubsystems\SSRMWeaponSubsystem\ClanSSRM6.data
ExecutionState=NeverExecuteState
CriticalHitsTaken=1
Site=site_missile
GroupIndex=2
InternalLocation=Special1
AmmoCount=15
@@ -185,7 +185,7 @@ InternalLocation=RightTorso
Model=WeaponSubsystems\GaussWeaponSubsystem\ClanGaussRifle.data
ExecutionState=NeverExecuteState
Site=site_lmgunport
GroupIndex=3
GroupIndex=1
InternalLocation=LeftArm
AmmoCount=16
@@ -193,7 +193,7 @@ AmmoCount=16
Model=WeaponSubsystems\GaussWeaponSubsystem\ClanGaussRifle.data
ExecutionState=NeverExecuteState
Site=site_rmgunport
GroupIndex=3
GroupIndex=1
InternalLocation=RightArm
AmmoCount=16
@@ -201,6 +201,6 @@ AmmoCount=16
Model=WeaponSubsystems\LaserWeaponSubsystem\LargeLaser.data
ExecutionState=NeverExecuteState
Site=site_ctorsoport
GroupIndex=3
GroupIndex=1
InternalLocation=Special1
@@ -185,7 +185,7 @@ InternalLocation=RightTorso
Model=WeaponSubsystems\GaussWeaponSubsystem\ClanGaussRifle.data
ExecutionState=NeverExecuteState
Site=site_lmgunport
GroupIndex=3
GroupIndex=1
InternalLocation=LeftArm
AmmoCount=16
@@ -193,7 +193,7 @@ AmmoCount=16
Model=WeaponSubsystems\GaussWeaponSubsystem\ClanGaussRifle.data
ExecutionState=NeverExecuteState
Site=site_rmgunport
GroupIndex=3
GroupIndex=1
InternalLocation=RightArm
AmmoCount=16
@@ -201,6 +201,6 @@ AmmoCount=16
Model=WeaponSubsystems\LaserWeaponSubsystem\LargeLaser.data
ExecutionState=NeverExecuteState
Site=site_ctorsoport
GroupIndex=3
GroupIndex=1
InternalLocation=Special1
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
-363
View File
@@ -1,363 +0,0 @@
;==========================================================================
; === Text based config file for dgVoodoo2
; === Use this file if you are a game modder/hacker or an experted user and
; want to modify some advanced properties not available via the CPL.
;==========================================================================
Version = 0x287
;--------------------------------------------------------------------------
[General]
; OutputAPI: "d3d11warp", "d3d11_fl10_0", "d3d11_fl10_1", "d3d11_fl11_0",
; "d3d12_fl11_0", "d3d12_fl12_0", "bestavailable"
; Adapters: "all", or the ordinal of the adapter (1, ...)
;FullScreenOutput: "default", or the ordinal of the output on the adapter (1, ...)
; ScalingMode: "unspecified", "centered", "stretched", "centered_ar", "stretched_ar", "stretched_ar_crt",
; "stretched_4_3", "stretched_4_3_crt", "stretched_4_3_c64"
;
;InheritColorProfileInFullScreenMode:
; Enabled by default and can only be disabled only when a D3D11 output API
; is explicitly selected. Disabled case is intended for avoiding extra
; rendering resources on old hardware for better performance, if required.
; DisableScreenSaver: If true then screen saver and monitor sleep mode are disabled while rendering through dgVoodoo is active
OutputAPI = bestavailable
Adapters = all
FullScreenOutput = default
FullScreenMode = false
ScalingMode = unspecified
ProgressiveScanlineOrder = false
EnumerateRefreshRates = false
Brightness = 100
Color = 100
Contrast = 100
InheritColorProfileInFullScreenMode = true
KeepWindowAspectRatio = true
CaptureMouse = true
CenterAppWindow = false
DisableScreenSaver = false
;--------------------------------------------------------------------------
[GeneralExt]
; DesktopResolution: Desktop (native) resolution can be forced for dgVoodoo's internal calculations.
; Useful for rare applications that pre-set the desktop to other than the native
; resolution before dgVoodoo gets in action. Only the compact format can be used here,
; and applies to all outputs of the desktop.
; DesktopBitDepth: You can define what screen bit depth should be reported through dgVoodoo
; (8, 16, 32)
; DeframerSize: When resolution is forced to other than the app default then
; a black frame is drawn around the output image coming from a wrapped API
; to remove scaling artifacts -
; frame thickness can be defined in pixels (max 16, 0 = disable)
; ImageScaleFactor: Integer factor for scaling the output image coming from a wrapped API
; Always done by nearest point filtering, independent on scaling mode
; (0 = max available)
; Separate factors can be defined for horizontal and vertical scaling
; by subproperties, e.g.
; ImageScaleFactor = x:3, y:2
; CursorScaleFactor: Integer factor for scaling the emulated hardware mouse (max 16)
; (0 = automatic, 1 = no scale, 2 = double scale, ...)
; DisplayROI: Display region of interest
; If scaling is done by the dgVoodoo then you can define a subrect of the
; output image, coming from a wrapped API, to be displayed. The defined subrect
; is mapped to the display output according to the current scaling mode
; It can be useful for applications rendering a widescreen subimage into a 4:3
; resolution; in this case you can scale up that subimage to (nearly) fill the
; whole screen on a widescreen monitor.
; DisplayROI empty value means the whole image.
; DisplayROI value can be a proportion in form of %d_%d or a pixel size (%d|%d)
; Pos subproperty is not mandatory and can be 'centered' or a pixel position (%d|%d)
; Examples: DisplayROI = 16_9, pos:centered
; DisplayROI = (320|200), pos:(10|10)
; Resampling: When scaling is done by the dgVoodoo for the given scaling mode,
; you can choose which filter is to be used for resampling the output image
; Available filters are: "pointsampled", "bilinear", "bicubic", "lanczos-2", "lanczos-3"
; PresentationModel: Low-level swapchain swap effect: if you know what you are doing then it can be
; overridden here. Flip models are better suited for modern OS features like auto HDR,
; while plain legacy models provide the best presentation performance under ideal conditions
; Not all model + output API + OS version combinations are supported.
; "auto", "discard", "seq", "flip_discard", "flip_seq"
; ColorSpace: Color space of the swap chain:
; "appdriven" - an application can choose argb2101010 through D3D9, but it means
; the legacy argb8888_srgb in any other case
; "argb8888_srgb" - Legacy 32 bit output for SDR displays
; "argb2101010_sdr" - 32 bit extended precision for SDR displays
; "argb2101010_sdr_wcg" - Wide Color Gamut format for SDR displays (available from Windows 11 22H2)
; "argb16161616_hdr" - Float16 HDR output (available from Windows 10 1709)
;WatermarkDisplayDuration: Display duration in secs for the watermark(s) if they are enabled (per swapchain)
; 0 or undefined means infinite time
; FreeMouse: If true then physical mouse is free to move inside the game window
; when using emulated scaling and/or application and forced resolution
; differs; can be useful when a game relies on the physical window size
; WindowedAttributes: You can define attributes for forced windowed appearance (separated by commas):
; "borderless" - forces the app window not have any border
; "alwaysontop" - forces the app window into the top-most band
; "fullscreensize" - forces the app window to be full screen size with image scaling inside
; FullscreenAttributes: You can define attributes for fullscreen appearance (separated by commas):
; "fake" - forces fake fullscreen mode with a screen-size window
; FPSLimit: An integer or rational (fractional) value, 0 = unlimited
; Environment: Software environment in which dgVoodoo is running: can be left unspecified (native)
; or can be set to 'DosBox' or 'QEmu'.
; SystemHookFlags: You can define which part of the system should be hooked (x86-DX only):
; "gdi" - for showing graphical contents rendered through GDI
; (like movie playback through the ancient Windows Multimedia AVI player library)
; "cursor" - for suppressing double-cursor symptoms when the cursor is emulated
DesktopResolution =
DesktopBitDepth =
DeframerSize = 1
ImageScaleFactor = 1
CursorScaleFactor = 0
DisplayROI =
Resampling = bilinear
PresentationModel = auto
ColorSpace = appdriven
WatermarkDisplayDuration = 0
FreeMouse = false
WindowedAttributes =
FullscreenAttributes =
FPSLimit = 0
Environment =
SystemHookFlags =
;--------------------------------------------------------------------------
[Glide]
; VideoCard: "voodoo_graphics", "voodoo_rush", "voodoo_2", "voodoo_banshee", "other_greater"
; OnboardRAM: in MBs
; MemorySizeOfTMU: in kBs
; TMUFiltering: "appdriven", "pointsampled", "bilinear"
;
; Resolution: either "unforced", "max", "max_isf", "max_fhd", "max_fhd_isf", "max_qhd", "max_qhd_isf", "desktop", "%dx",
; "max_%dx", "max_isf_%dx", "max_fhd_%dx", "max_fhd_isf_%d"x, "max_qhd_%dx", "max_qhd_isf_%dx", "desktop_%dx"
; or subproperties: h: horizontal, v: vertical
; + optional subproperty refrate: refresh rate in Hz
; e.g. Resolution = max, refrate:60
; Resolution = 2x, refrate:59
; Resolution = h:1280, v:1024, refrate:75
; Resolution = max_2x
; or just use the compact form like "1024x768@60" or "512x384"
;
;Antialiasing: "off", "appdriven", "2x", "4x", "8x", "16x" (your GPU must support the chosen one)
VideoCard = voodoo_2
OnboardRAM = 8
MemorySizeOfTMU = 4096
NumberOfTMUs = 2
TMUFiltering = appdriven
DisableMipmapping = false
Resolution = unforced
Antialiasing = appdriven
EnableGlideGammaRamp = true
ForceVerticalSync = true
ForceEmulatingTruePCIAccess = false
16BitDepthBuffer = false
3DfxWatermark = true
3DfxSplashScreen = false
PointcastPalette = false
EnableInactiveAppState = false
;--------------------------------------------------------------------------
[GlideExt]
; DitheringEffect: "pure32bit", "dither2x2", "dither4x4"
; Dithering: "disabled", "appdriven", "forcealways"
; DitherOrderedMatrixSizeScale: integer scale value for dither matrix size
; 1 = normal, 2 = double size, etc.
; 0 = automatic (the aim is to have some retro feel&look)
DitheringEffect = pure32bit
Dithering = forcealways
DitherOrderedMatrixSizeScale = 0
;--------------------------------------------------------------------------
[DirectX]
; VideoCard: "svga", "internal3D", "geforce_ti_4800", "ati_radeon_8500",
; "matrox_parhelia-512", "geforce_fx_5700_ultra", "geforce_9800_gt"
; VRAM: in MBs (default) or in GBs (e.g. VRAM = 2GB)
; Filtering: "appdriven", "pointsampled", "bilinear", "pointmip", "linearmip", "trilinear"
; or the integer value of an anisotropic filtering level (1-16)
; Mipmapping: "appdriven", "disabled", "autogen_point", "autogen_bilinear"
; KeepFilterIfPointSampled: if enabled then forced filtering affects only non-point sampled textures
; Bilinear2DOperations: if enabled then DirectDraw Blit and CPU-written data is transferred with bilinear scaling
; DisableD3DTnLDevice: if disabled then D3D TnL device is not enumerated and hardware Transform&Light vertex processing
; is not available
DisableAndPassThru = false
VideoCard = internal3D
VRAM = 256
Filtering = appdriven
Mipmapping = appdriven
KeepFilterIfPointSampled = false
Resolution = unforced
Antialiasing = appdriven
AppControlledScreenMode = true
DisableAltEnterToToggleScreenMode = true
Bilinear2DOperations = false
PhongShadingWhenPossible = false
ForceVerticalSync = false
dgVoodooWatermark = true
FastVideoMemoryAccess = false
DisableD3DTnLDevice = false
;--------------------------------------------------------------------------
[DirectXExt]
; AdapterIDType: "nvidia", "amd", "intel" or leave it undefined
; You can define what type of driver version and vendor id's the wrapper should report to
; the application; Some games rely on that information so it can be useful for them
; Can be defined only for SVGA and Internal3D card types; the others have their own wired
; information
; VendorID, DeviceID, SubsystemID, RevisionID:
; Can be defined only for SVGA and Internal3D card types
; You can overwrite these properties even if a non-default AdapterIDType is defined;
; say, you defined an nvidia id type but would like to refine the vendor id
; DefaultEnumeratedResolutions: you can define what resolutions should be enumerated to the application by default
; "all", "classics", "none"
; ExtraEnumeratedResolutions: you can add extra resolutions (separated by commas, max 16) that will get
; enumerated to the application as display adapter supported ones -
; can be useful if an app supports rendering at arbitrary resolutions
; and you have a particular favorite resolution that are not
; enumerated to the application by default
; you can either use the compact resolution format here, or
; "max", "max@refrate" meaning your desktop resolution with a potential refresh rate, or
; "max_4_3", "max_4_3@refrate", "max_16_9", "max_16_9@refrate"
; meaning the maximum resolution with the given aspect ratio calculated from
; the desktop resolution with the given refresh rate, e.g. "max_4_3@60", "max_16_9"
; EnumeratedResolutionBitdepths: you can filter what bitdepths are included in the resolution enumeration
; any subset of {"8", "16", "32"}, or "all"
; DitheringEffect: "high_quality", "ordered2x2", "ordered4x4"
; Dithering: "disabled", "appdriven", "forceon16bit", "forcealways"
; DitherOrderedMatrixSizeScale: integer scale value for dither matrix size
; 1 = normal, 2 = double size, etc.
; 0 = automatic
; DepthBuffersBitDepth: internal bit depth of depth/stencil buffers for 3D rendering (32 bit is not recommended)
; "appdriven", "forcemin24bit", "force32bit"
; Default3DRenderFormat: default format of 3D rendering
; "auto", "argb8888", "argb2101010", "argb16161616"
; auto corresponds to the selected color space
; argb2101010 has the benefit that it is still 32 bit but it can corrupt the rendering
; because of the lowered alpha bits, not recommended
; MaxVSConstRegisters: Max number of vertex shader constant registers (DX8/9 only)
; Can be defined only for SVGA and Internal3D card types
; Valid values are 256 (default), 512 or 1024
; D3D12BoundsChecking: If enabled then the D3D12 backend does bound checking on vs const register file accesses (D3D8/9 only)
; It should always be enabled to be fully compatible with the D3D8/9 specs but unfortunately that can cause
; performance loss while the vast majority of games do not need it; try to enable it if you experience a
; GPU crash with a D3D8/9 game
; NPatchTesselationLevel: Force N-Patch tesselation level (D3D8/9)
; 0 = app driven
; 1 = disable
; 2 to 8 = a forced tesselation level
; Altough tesselation works with all vertex shader versions, you can force level higher than 1
; only for the fixed function or vs.1.x vertex pipeline because of performance and practical reasons
; (forced tesselation also disables adaptive mode (D3D9), but forcing is not recommended at all, anyway)
; DisplayOutputEnableMask: Each bit in this 32 bit value corresponds to a display output. Display outputs of the adapters are numbered
; sequentially. If Adapter0 has n display outputs and Adapter1 has m display outputs attached then the lowest
; n bits match Adapter0 display outputs, the next m bits match Adapter1 outputs, and so on. The lowest bit
; in a group corresponds to Output0. If a bit value is 0 then the display output is disabled for the device
; enumeration, in other words, it is invisible to the application. It can be useful for D3D9 multihead-
; or very special applications where you want to enable only individual displays on your monitor wall.
; MSD3DDeviceNames: if true then original Microsoft D3D device names are exposed
; (some applications check for them and they fail)
; RTTexturesForceScaleAndMSAA: if true then forced resolution scaling and MSAA is
; applied also to rendertarget textures
; Set it to false for games requiring pixel-precise rendering
; but be careful it can EASILY break certain things, not recommended
; SmoothedDepthSampling: if true then extra smoothing is added to depth textures
; when they are sampled
; DeferredScreenModeSwitch: If true the switching to full screen is deferred after the application initialized
; the DirectX device; can be useful for games that don't expect rendering window changes
; during initialization and crash
; PrimarySurfaceBatchedUpdate: If true then direct changes of the primary surface are batched together for presenting them
; If false then each change is instantly presented (debug-like mode)
; SuppressAMDBlacklist: Some AMD GPU models are blacklisted to workaround the solid-color-textures driver issue
; You can suppress it to check out if the problem is fixed in your current driver
AdapterIDType =
VendorID =
DeviceID =
SubsystemID =
RevisionID =
DefaultEnumeratedResolutions = all
ExtraEnumeratedResolutions =
EnumeratedResolutionBitdepths = all
DitheringEffect = high_quality
Dithering = forcealways
DitherOrderedMatrixSizeScale = 0
DepthBuffersBitDepth = appdriven
Default3DRenderFormat = auto
MaxVSConstRegisters = 256
D3D12BoundsChecking = false
NPatchTesselationLevel = 0
DisplayOutputEnableMask = 0xffffffff
MSD3DDeviceNames = false
RTTexturesForceScaleAndMSAA = true
SmoothedDepthSampling = true
DeferredScreenModeSwitch = false
PrimarySurfaceBatchedUpdate = false
SuppressAMDBlacklist = false
;--------------------------------------------------------------------------
[Debug]
; This section affects only debug/spec release builds
;
; Info, Warning, Error
; "Disable" - disables all messages and debugger break
; "Enable" - enables messages and disables debugger break
; "EnableBreak" - enables both messages and breaking into debugger
;
; MaxTraceLevel: Maximum level of tracing API calls
; 0 - Disable
; 1 - API Functions and methods
; 2 - Additional trace info for internals
;
; LogToFile: if false or debugger is detected then output goes to the debug output
; if true and no debugger detected then output goes to 'dgVoodoo.log'
; (not implemented yet, always the default debug output is used)
Info = enable
Warning = enable
Error = enable
MaxTraceLevel = 0
;LogToFile = false
Binary file not shown.
+16 -32
View File
@@ -73,37 +73,22 @@ $startUtc = (Get-Date).ToUniversalTime()
# a clean process EXIT (caught via exit code below) instead of an unattended modal hang.
# (CheckOption strips the token, so it does NOT trip the LAB_ONLY "/gos" help-and-exit trap.)
Write-Host "[pack 2/3] running resource compiler (this can take a while) ..." -ForegroundColor Yellow
# DDrawCompat's ddraw.dll is fatal to MW4pro.exe in FULLSCREEN (it tries to set an
# exclusive display mode that DDrawCompat rejects with a Fatal Error dialog). In WINDOWED
# mode DDrawCompat works fine, and the builder only needs DDraw to init -- it never renders
# a frame with -norun. So: keep ddraw.dll in place and use -window. This also works on VMs
# with generic display adapters that have no hardware DirectDraw at all.
$ddrawPresent = Test-Path (Join-Path $Runtime "ddraw.dll")
if ($ddrawPresent) {
Write-Host " (ddraw.dll present -- running windowed so DDrawCompat/dgVoodoo2 init succeeds)"
} else {
Write-Host " (no ddraw.dll -- running fullscreen with native DirectDraw)"
}
# Native DirectDraw on Win10/11 cannot create a 16-bit fullscreen surface without the
# DWM8And16BitMitigation shim, which is unreliable on some machine configs.
# Temporarily force 32-bit colour in options.ini so native DDraw always succeeds;
# restored in the finally block regardless of how the build ends.
$optionsIni = Join-Path $Runtime "options.ini"
$bitdepthOrig = $null
if (-not $ddrawPresent -and (Test-Path $optionsIni)) {
$content = Get-Content $optionsIni -Raw
if ($content -match '(?m)^bitdepth=(\d+)') {
$bitdepthOrig = $Matches[1]
if ($bitdepthOrig -ne '32') {
($content -replace '(?m)^bitdepth=\d+', 'bitdepth=32') | Set-Content $optionsIni -NoNewline
Write-Host " (temporarily set options.ini bitdepth=32 for build, was $bitdepthOrig)"
} else { $bitdepthOrig = $null }
}
# Always run the builder windowed (-window). DDrawCompat's ddraw.dll handles windowed DDraw
# on Win10/11 and VMs with generic adapters. Fullscreen requires the DWM16-bit shim which
# is unreliable on some machine configs. The builder only needs DDraw to init -- it never
# renders a frame with -norun, so windowed mode is always safe.
# dgVoodoo2 D3D interceptors (D3D8/D3D9/D3DImm.dll) must not be present during the build;
# move them aside if present (defensive -- they should not be in the repo).
$dgvDlls = @("D3D8.dll","D3D9.dll","D3DImm.dll") | Where-Object { Test-Path (Join-Path $Runtime $_) }
$dgvMoved = @()
foreach ($d in $dgvDlls) {
$src = Join-Path $Runtime $d; $bak = "$src.buildaside"
Move-Item $src $bak -Force; $dgvMoved += $bak
Write-Host " (moved $d aside -- dgVoodoo2 interceptors break the builder)"
}
$code = $null
try {
$windowFlag = if ($ddrawPresent) { "-window" } else { "" }
$argList = "/gosnodialogs -armorlevel 3 -build -norun -nosound -nocd -noeula $windowFlag".Trim()
$argList = "/gosnodialogs -armorlevel 3 -build -norun -nosound -nocd -noeula -window"
$p = Start-Process -FilePath $builder -ArgumentList $argList -WorkingDirectory $Runtime -PassThru
$timedOut = $false
try { Wait-Process -Id $p.Id -Timeout $TimeoutSec -ErrorAction Stop }
@@ -126,10 +111,9 @@ try {
"$tail`n`nFix the asset and re-run, or run deploy-mw4.ps1 -SkipResourceBuild to ship existing packages.")
}
} finally {
if ($bitdepthOrig -and (Test-Path $optionsIni)) {
$content = Get-Content $optionsIni -Raw
($content -replace '(?m)^bitdepth=\d+', "bitdepth=$bitdepthOrig") | Set-Content $optionsIni -NoNewline
Write-Host " (restored options.ini bitdepth=$bitdepthOrig)"
foreach ($bak in $dgvMoved) {
$orig = $bak -replace '\.buildaside$',''
if (Test-Path $bak) { Move-Item $bak $orig -Force }
}
}