Skip to content

Commit 4d1631d

Browse files
committed
dsda: support the 2 known "fake" pwads that are actually iwads
fix #4340 add hacx and chex to db since they have canonical versions unlike the new stuff
1 parent e8d58a9 commit 4d1631d

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

Assets/gamedb/gamedb_doom.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,5 @@ ec5b38b30ba2b70e278205776af3fbb5 Freedoom: Phase 2 (v0.11.1) Doom Doom
134134
83560b2963424fa4a2eb971194428bf8 Freedoom: Phase 2 (v0.12.0) Doom Doom
135135
ca9a4159a7833544a89144c7f5053412 Freedoom: Phase 2 (v0.12.1) Doom Doom
136136
cd666466759b5e5f63af93c5f0ffd0a1 Freedoom: Phase 2 (v0.13.0) Doom Doom
137+
65ed74d522bdf6649c2831b13b9e02b4 Hacx - IWAD release (v1.2) Doom Doom
138+
25485721882b050afa96a56e5758dd52 Chex Quest Doom Doom

src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,17 @@ public DSDA(CoreLoadParameters<DoomSettings, DoomSyncSettings> lp)
6060
}
6161
else if (wadFile.RomData is [ (byte) 'P', (byte) 'W', (byte) 'A', (byte) 'D', .. ])
6262
{
63-
_pwadFiles.Add(wadFile);
63+
if (_fakePwads.Contains(GetFullName(wadFile).ToLowerInvariant()))
64+
{
65+
_iwadName = wadFile.RomPath;
66+
_iwadData = wadFile.RomData;
67+
foundIWAD = true;
68+
}
69+
else
70+
{
71+
_pwadFiles.Add(wadFile);
72+
}
73+
6474
recognized = true;
6575
}
6676

@@ -346,6 +356,10 @@ private static bool PlayerPresent(DoomSyncSettings syncSettings, int port) =>
346356
private readonly int[] _turnSpeeds = [ 640, 1280, 320 ];
347357
private readonly string _dsdaWadFileName = "dsda-doom.wad";
348358

359+
// these are IWADs in terms of contents but they have "PWAD" in header
360+
// source ports including upstream have special hacks to load them like IWADs
361+
private readonly List<string> _fakePwads = [ "chex.wad", "rekkrsa.wad" ];
362+
349363
// order must match AspectRatio values since they're used as index
350364
private readonly Point[][] _resolutions =
351365
[

0 commit comments

Comments
 (0)