[Scummvm-git-logs] scummvm master -> d2b85bf4739a1d1891fdd1c65dd954f95aca220e
sluicebox
noreply at scummvm.org
Sun Sep 17 22:35:31 UTC 2023
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
49da510f80 SCI32: Fix PHANT1 dragon passage lockup
c8425b6dff SCI32: Add HOYLE5 Solitaire Mac detection
0de0beb15f SCI32: Update kDoSoundMac32 for HOYLE5 Solitaire
d2b85bf473 SCI32: Update HOYLE5 Solitaire workarounds for Mac
Commit: 49da510f80384c476794a12ba212e4bd0b19d670
https://github.com/scummvm/scummvm/commit/49da510f80384c476794a12ba212e4bd0b19d670
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-09-17T15:34:19-07:00
Commit Message:
SCI32: Fix PHANT1 dragon passage lockup
Fixes bug #14568
Thanks to @DustyShinigami for reporting this
Changed paths:
engines/sci/engine/script_patches.cpp
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 8b47e632c1f..376958f59b3 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -12276,6 +12276,47 @@ static const uint16 phant1MacVideoQualityPatch[] = {
PATCH_END
};
+// In chapter 5, clicking on the dragon projection in room 16200 locks up the
+// game if ego is standing in front of it. sPassageReveal sets ego's heading
+// based on room position, but it's missing a handler for position 9. This bug
+// occurs the first time the passage is opened. sPassageOpen is used afterwards
+// and it has the missing code.
+//
+// We fix this by adding a default handler for position 9 to sPassageReveal.
+// To make room, we combine the identical handlers for positions 11 and 12.
+//
+// Applies to: All versions
+// Responsible method: sPassageReveal:changeState(0)
+// Fixes bug: #14568
+static const uint16 phant1DragonPassageSignature[] = {
+ 0x1a, // eq? [ global125 == 11 ]
+ SIG_ADDTOOFFSET(+16),
+ 0x3c, // dup
+ 0x35, SIG_MAGICDWORD, 0x0c, // ldi 0c
+ 0x1a, // eq? [ global125 == 12 ]
+ 0x31, 0x0c, // bnt 0c
+ 0x38, SIG_SELECTOR16(setHeading), // pushi setHeading
+ 0x7a, // push2
+ 0x39, 0x2d, // pushi 2d
+ 0x7c, // pushSelf
+ 0x81, 0x00, // lag 00
+ 0x4a, SIG_UINT16(0x0008), // send 08 [ ego setHeading: 45 self ]
+ SIG_END
+};
+
+static const uint16 phant1DragonPassagePatch[] = {
+ 0x20, // ge? [ global125 >= 11]
+ PATCH_ADDTOOFFSET(+16),
+ 0x38, PATCH_SELECTOR16(setHeading), // pushi setHeading
+ 0x38, PATCH_UINT16(0x0003), // pushi 0003
+ 0x38, PATCH_UINT16(0x002d), // pushi 002d
+ 0x7c, // pushSelf
+ 0x38, PATCH_UINT16(0x000f), // pushi 000f
+ 0x81, 0x00, // lag 00
+ 0x4a, PATCH_UINT16(0x000a), // send 0a [ ego setHeading: 45 self 15 ]
+ PATCH_END
+};
+
// script, description, signature patch
static const SciScriptPatcherEntry phantasmagoriaSignatures[] = {
{ true, 0, "mac: set high video quality", 1, phant1MacVideoQualitySignature, phant1MacVideoQualityPatch },
@@ -12286,6 +12327,7 @@ static const SciScriptPatcherEntry phantasmagoriaSignatures[] = {
{ true, 901, "fix invalid array construction", 1, sci21IntArraySignature, sci21IntArrayPatch },
{ true, 901, "fix delete save", 1, phant1DeleteSaveSignature, phant1DeleteSavePatch },
{ true, 1111, "ignore audio settings from save game", 1, phant1SavedVolumeSignature, phant1SavedVolumePatch },
+ { true, 16200, "fix dragon passage", 1, phant1DragonPassageSignature, phant1DragonPassagePatch },
{ true, 20100, "fix basement fast-forward", 1, phant1BasementFastForwardSignature, phant1BasementFastForwardPatch },
{ true, 20200, "fix broken rat init in sEnterFromAlcove", 1, phant1RatSignature, phant1RatPatch },
{ true, 20200, "fix chapter 5 wine cask hotspot", 1, phant1WineCaskHotspotSignature, phant1WineCaskHotspotPatch },
Commit: c8425b6dffec574103f1926a44c8a9f9ffaad95e
https://github.com/scummvm/scummvm/commit/c8425b6dffec574103f1926a44c8a9f9ffaad95e
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-09-17T15:34:20-07:00
Commit Message:
SCI32: Add HOYLE5 Solitaire Mac detection
Changed paths:
engines/sci/detection_tables.h
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index 5c91c875e6b..9e1260a262f 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -1445,6 +1445,14 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK | ADGF_UNSTABLE, GUIO_HOYLE5_SAVELOAD },
+ // Hoyle Solitaire - Macintosh CD
+ // VERSION file reports "1.000.000"
+ {"hoyle5solitaire", "", {
+ {"Data1", 0, "38283be5a7e21098cb34f6e6789b7180", 401393},
+ {"Data2", 0, "f007f4a13260d2b26b85b5d8379ac8d1", 15066173},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK | ADGF_UNSTABLE, GUIO_HOYLE5 },
+
#undef GUIO_HOYLE5
#undef GUIO_HOYLE5_SAVELOAD
Commit: 0de0beb15f28e0e3f524a8e253f019cb0b43ac29
https://github.com/scummvm/scummvm/commit/0de0beb15f28e0e3f524a8e253f019cb0b43ac29
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-09-17T15:34:20-07:00
Commit Message:
SCI32: Update kDoSoundMac32 for HOYLE5 Solitaire
Changed paths:
engines/sci/engine/ksound.cpp
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index 3d43a3ec8ae..8480b11e55a 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -73,10 +73,8 @@ CREATE_DOSOUND_FORWARD(DoSoundSetLoop)
reg_t kDoSoundMac32(EngineState *s, int argc, reg_t *argv) {
// Several SCI 2.1 Middle Mac games, but not all, contain a modified kDoSound
// in which all but eleven subops were removed, changing their subop values to
- // zero through ten. PQSWAT then restored all of the subops, but kept the new
- // subop values that removing caused in the first place, and assigned new
- // values to the restored subops. It is the only game that does this and it
- // only uses two of them.
+ // zero through ten. PQSWAT and HOYLE5 Solitaire restored all of the subops,
+ // but kept the new values that removing caused in the first place.
switch (argv[0].toUint16()) {
case 0:
return g_sci->_soundCmd->kDoSoundMasterVolume(s, argc - 1, argv + 1);
@@ -100,11 +98,19 @@ reg_t kDoSoundMac32(EngineState *s, int argc, reg_t *argv) {
return g_sci->_soundCmd->kDoSoundSetLoop(s, argc - 1, argv + 1);
case 10:
return g_sci->_soundCmd->kDoSoundUpdateCues(s, argc - 1, argv + 1);
- // PQSWAT only
+ // PQSWAT, HOYLE5 solitaire
case 12: // kDoSoundRestore
return kEmpty(s, argc - 1, argv + 1);
case 13:
return g_sci->_soundCmd->kDoSoundGetPolyphony(s, argc - 1, argv + 1);
+ case 14:
+ return g_sci->_soundCmd->kDoSoundSuspend(s, argc - 1, argv + 1);
+ case 15:
+ return g_sci->_soundCmd->kDoSoundSetHold(s, argc - 1, argv + 1);
+ case 17:
+ return g_sci->_soundCmd->kDoSoundSetPriority(s, argc - 1, argv + 1);
+ case 18:
+ return g_sci->_soundCmd->kDoSoundSendMidi(s, argc - 1, argv + 1);
default:
break;
}
Commit: d2b85bf4739a1d1891fdd1c65dd954f95aca220e
https://github.com/scummvm/scummvm/commit/d2b85bf4739a1d1891fdd1c65dd954f95aca220e
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-09-17T15:34:21-07:00
Commit Message:
SCI32: Update HOYLE5 Solitaire workarounds for Mac
Changed paths:
engines/sci/engine/script_patches.cpp
engines/sci/engine/workarounds.cpp
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 376958f59b3..624fa48fa07 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -2638,12 +2638,41 @@ static const uint16 hoyle5PatchBridgeArithmetic[] = {
PATCH_END
};
+// Hoyle5 Solitaire has a script typo in five games that attempts to initialize
+// a temp variable to zero but instead compares it. This affects Calculation,
+// Strategy, Beleaguered Castle, La Belle Lucie, and Gaps.
+//
+// We fix this with a single script patch as opposed to many workaround entries
+// because this occurs in local procedures with different bytecode in Windows
+// and Mac versions.
+//
+// Applies to: All versions
+// Responsible methods: local procedures in scripts 6001, 6002, 6004, 6011, 6023
+static const uint16 hoyle5SignatureSolitaireInit[] = {
+ 0x8d, 0x00, // lst 00
+ 0x35, SIG_MAGICDWORD, 0x00, // ldi 00
+ 0x1a, // eq? [ temp0 == 0 ]
+ 0x8d, 0x00, // lst 00
+ SIG_END
+};
+
+static const uint16 hoyle5PatchSolitaireInit[] = {
+ 0x34, PATCH_UINT16(0x0000), // ldi 0000
+ 0xa5, 0x00, // sat 00 [ temp0 = 0 ]
+ PATCH_END
+};
+
// script, description, signature patch
static const SciScriptPatcherEntry hoyle5Signatures[] = {
{ true, 3, "remove kGetTime spin", 1, hoyle5SignatureSpinLoop, hoyle5PatchSpinLoop },
{ true, 23, "remove kGetTime spin", 1, hoyle5SignatureSpinLoop, hoyle5PatchSpinLoop },
{ true, 200, "fix setScale calls", 11, hoyle5SetScaleSignature, hoyle5PatchSetScale },
{ true, 500, "remove kGetTime spin", 1, hoyle5SignatureSpinLoop, hoyle5PatchSpinLoop },
+ { true, 6001, "fix solitaire init", 1, hoyle5SignatureSolitaireInit, hoyle5PatchSolitaireInit },
+ { true, 6002, "fix solitaire init", 1, hoyle5SignatureSolitaireInit, hoyle5PatchSolitaireInit },
+ { true, 6004, "fix solitaire init", 1, hoyle5SignatureSolitaireInit, hoyle5PatchSolitaireInit },
+ { true, 6011, "fix solitaire init", 1, hoyle5SignatureSolitaireInit, hoyle5PatchSolitaireInit },
+ { true, 6023, "fix solitaire init", 1, hoyle5SignatureSolitaireInit, hoyle5PatchSolitaireInit },
{ true, 64937, "remove kGetTime spin", 1, hoyle5SignatureSpinLoop, hoyle5PatchSpinLoop },
{ true, 733, "bridge arithmetic against object", 1, hoyle5SignatureBridgeArithmetic, hoyle5PatchBridgeArithmetic },
{ true, 64990, "increase number of save games (1/2)", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 },
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index cf479ec8750..6c452c8138f 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -143,60 +143,11 @@ static const uint16 sig_uninitread_hoyle5_1[] = {
SIG_END
};
-// Game: Hoyle 5 (Solitaire)
-// Calling methods: roomScript::changeState, beleaguered_castle::init, strategy::init
-// Subroutine offsets: 0x25f4 (script 6001), 0x1d7a (script 6004), 0x239d (script 6002)
-// Applies to at least: English PC
-static const uint16 sig_uninitread_hoyle5_2[] = {
- 0x7e, SIG_ADDTOOFFSET(2), // line N
- 0x7d, SIG_ADDTOOFFSET(8),
- 0x2e, 0x73, 0x63, 0x00, // file "calculat.sc" / "belcastl.sc" / "strategy.sc"
- 0x3f, 0x02, // link 02
- 0x7e, SIG_ADDTOOFFSET(2), // line N
- 0x8d, 0x00, // lst temp[0]
- 0x35, 0x00, // ldi 00
- 0x1a, // eq?
- SIG_END
-};
-
-// Game: Hoyle 5 (Solitaire)
-// Calling method: roomScript::changeState
-// Subroutine offset: 0x494a (script 6023)
-// Applies to at least: English PC
-static const uint16 sig_uninitread_hoyle5_3[] = {
- 0x7e, SIG_ADDTOOFFSET(2), // line N
- 0x7d, 0x67, 0x61, 0x70, 0x73,
- 0x2e, 0x73, 0x63, 0x00, // file "gaps.sc"
- 0x3f, 0x02, // link 02
- 0x7e, SIG_ADDTOOFFSET(2), // line N
- 0x8d, 0x00, // lst temp[0]
- 0x35, 0x00, // ldi 00
- 0x1a, // eq?
- SIG_END
-};
-
-// Game: Hoyle 5 (Solitaire)
-// Calling method: roomScript::changeState
-// Subroutine offset: 0x2097 (script 6011)
-// Applies to at least: English PC
-static const uint16 sig_uninitread_hoyle5_4[] = {
- 0x7e, SIG_ADDTOOFFSET(2), // line N
- 0x7d, 0x6c, 0x61, 0x62, 0x65,
- 0x6c, 0x6c, 0x65,
- 0x2e, 0x73, 0x63, 0x00, // file "labelle.sc"
- 0x3f, 0x02, // link 02
- 0x7e, SIG_ADDTOOFFSET(2), // line N
- 0x8d, 0x00, // lst temp[0]
- 0x35, 0x00, // ldi 00
- 0x1a, // eq?
- SIG_END
-};
-
// Game: Hoyle 5
// Calling method: LeadSeat_NoTrump::think
// Subroutine offset: 0x22e (script 753)
// Applies to at least: English PC
-static const uint16 sig_uninitread_hoyle5_5[] = {
+static const uint16 sig_uninitread_hoyle5_2[] = {
0x7e, SIG_ADDTOOFFSET(2), // line N
0x7d, 0x73, 0x74, 0x67, 0x62, 0x64, 0x6c, 0x6e, 0x74,
0x2e, 0x73, 0x63, 0x00, // file "stgbdlnt.sc"
@@ -431,19 +382,12 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
{ GID_HOYLE5, 700, -1, 1, "BridgeDefense", "makeContractMinusAce", nullptr, -1, -1, { WORKAROUND_FAKE, 0 } }, // when playing Bridge
{ GID_HOYLE5, 700, -1, 1, "BridgeDefense", "think", nullptr, -1, -1, { WORKAROUND_FAKE, 0 } }, // when an opponent is playing in Bridge, objects LeadSeat_NoTrump and others
{ GID_HOYLE5, 700, -1, 1, "Code", "doit", nullptr, -1, -1, { WORKAROUND_FAKE, 0 } }, // when placing a bid in Bridge, objects c2_tree, other1_tree, compwe_tree - bugs #11168, #11169, #11170, #11183
- { GID_HOYLE5, 700, 753, 0, "LeadSeat_NoTrump", "think", sig_uninitread_hoyle5_5, 4, 6, { WORKAROUND_FAKE, 0 } }, // when playing Bridge
+ { GID_HOYLE5, 700, 753, 0, "LeadSeat_NoTrump", "think", sig_uninitread_hoyle5_2, 4, 6, { WORKAROUND_FAKE, 0 } }, // when playing Bridge
{ GID_HOYLE5, 700, 1115, 0, nullptr, "select", nullptr, 1, 1, { WORKAROUND_FAKE, 0 } }, // when adjusting the attitude slider in Bridge - bug #11166
{ GID_HOYLE5, 1100, 18, 0, "Tray", "init", nullptr, 0, 0, { WORKAROUND_FAKE, 0 } }, // when playing Poker
{ GID_HOYLE5, 1100, 1100, 0, "anteButton", "handleEvent", nullptr, 1, 1, { WORKAROUND_FAKE, 0 } }, // when exiting Poker
{ GID_HOYLE5, 6029, 6029, 1, "ControlIcon", "select", nullptr, 1, 1, { WORKAROUND_FAKE, 0 } }, // Solitaire: when changing any slider in the Card Flip mini-game's options window
{ GID_HOYLE5, -1, 6000, 1, "sHand", "handleEvent", nullptr, 4, 4, { WORKAROUND_FAKE, 0 } }, // Solitaire: when clicking on an empty card base in any game
- { GID_HOYLE5, 6001, 6001, 0, "roomScript", "changeState", sig_uninitread_hoyle5_2, 0, 0, { WORKAROUND_FAKE, 0 } }, // Solitaire: when starting Calculation
- { GID_HOYLE5, 6004, 6004, 0, "roomScript", "changeState", sig_uninitread_hoyle5_2, 0, 0, { WORKAROUND_FAKE, 0 } }, // Solitaire: when starting Beleaguered Castle
- { GID_HOYLE5, 6004, 6004, 0, "beleaguered_castle", "init", sig_uninitread_hoyle5_2, 0, 0, { WORKAROUND_FAKE, 0 } }, // Solitaire: when starting Beleaguered Castle
- { GID_HOYLE5, 6023, 6023, 0, "roomScript", "changeState", sig_uninitread_hoyle5_3, 0, 0, { WORKAROUND_FAKE, 0 } }, // Solitaire: when starting Gaps
- { GID_HOYLE5, 6011, 6011, 0, "roomScript", "changeState", sig_uninitread_hoyle5_4, 0, 0, { WORKAROUND_FAKE, 0 } }, // Solitaire: when starting La Belle Lucie
- { GID_HOYLE5, 6002, 6002, 0, "roomScript", "changeState", sig_uninitread_hoyle5_2, 0, 0, { WORKAROUND_FAKE, 0 } }, // Solitaire: when starting Strategy
- { GID_HOYLE5, 6002, 6002, 0, "strategy", "init", sig_uninitread_hoyle5_2, 0, 0, { WORKAROUND_FAKE, 0 } }, // Solitaire: when starting Strategy
{ GID_ISLANDBRAIN, 100, 937, 0, "IconBar", "dispatchEvent", nullptr, 58, 58, { WORKAROUND_FAKE, 0 } }, // when using ENTER at the startup menu - bug #5241
{ GID_ISLANDBRAIN, 140, 140, 0, "piece", "init", nullptr, 3, 3, { WORKAROUND_FAKE, 1 } }, // first puzzle right at the start, some initialization variable. bnt is done on it, and it should be non-0
{ GID_ISLANDBRAIN, 180, 190, 0, "word", "dispatchEvent", nullptr, 14, 15, { WORKAROUND_FAKE, 0 } }, // holding down enter key during the word search puzzle, temps 14 and 15
More information about the Scummvm-git-logs
mailing list