[Scummvm-git-logs] scummvm master -> 0174ef9b2ea0e65461f6d5429a0a7b4a58b1de29
sluicebox
22204938+sluicebox at users.noreply.github.com
Fri Jun 25 01:11:31 UTC 2021
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1c54777cc5 SCI: Remove broken SQ1 debugging hotkey
0174ef9b2e SCI32: Fix KQ7 crash when skipping opening cartoon
Commit: 1c54777cc5a17e4ba0e51d669a288593a54cd7c3
https://github.com/scummvm/scummvm/commit/1c54777cc5a17e4ba0e51d669a288593a54cd7c3
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2021-06-24T18:27:26-05:00
Commit Message:
SCI: Remove broken SQ1 debugging hotkey
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 4c4e09cea5..80dcde4947 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -20116,8 +20116,30 @@ static const uint16 sq1vgaPatchSpanishMessages5[] = {
PATCH_END
};
+// The PC EGA and Amiga versions contain an active debugging hotkey, ALT+N,
+// which either crashes the game by trying to load the missing sysLogger script
+// or brings up a series of unskippable bug-reporting dialogs and crashes in
+// other ways. As in GK2, we just patch this out.
+//
+// Applies to: English PC EGA, Amiga
+// Responsible method: sq1:handleEvent
+static const uint16 sq1vgaSysLoggerHotKeySignature[] = {
+ SIG_MAGICDWORD,
+ 0x34, SIG_UINT16(0x3100), // ldi 3100 [ ALT+N ]
+ 0x1a, // eq?
+ 0x30, // bnt
+ SIG_END
+};
+
+static const uint16 sq1vgaSysLoggerHotKeyPatch[] = {
+ PATCH_ADDTOOFFSET(+4),
+ 0x32, // jmp
+ PATCH_END
+};
+
// script, description, signature patch
static const SciScriptPatcherEntry sq1vgaSignatures[] = {
+ { true, 0, "remove alt+n syslogger hotkey", 1, sq1vgaSysLoggerHotKeySignature, sq1vgaSysLoggerHotKeyPatch },
{ true, 28, "orat sounds", 1, sq1vgaSignatureOratSounds, sq1vgaPatchOratSounds },
{ true, 40, "taste pink ship", 1, sq1vgaSignatureTastePinkShip, sq1vgaPatchTastePinkShip },
{ true, 40, "tiny's sign", 1, sq1vgaSignatureTinysSign, sq1vgaPatchTinysSign },
Commit: 0174ef9b2ea0e65461f6d5429a0a7b4a58b1de29
https://github.com/scummvm/scummvm/commit/0174ef9b2ea0e65461f6d5429a0a7b4a58b1de29
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2021-06-24T18:27:26-05:00
Commit Message:
SCI32: Fix KQ7 crash when skipping opening cartoon
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 80dcde4947..0c07d95e4c 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -6802,11 +6802,55 @@ static const uint16 kq7TooManySavesPatch[] = {
PATCH_END
};
+// During the chapter one opening cartoon, clicking the skip-scene button too
+// quickly breaks the game. openingCartoon sets a 20 tick timer in state 0 and
+// initializes ego in state 1. If skip-scene is clicked during this window then
+// KQEgo:init is never called, Valanice never appears, and clicking eventually
+// crashes the game. This also happens in Sierra's interpreter.
+//
+// We fix this by adding code to the skip-scene handler in openingCartoon to
+// call KQEgo:init if the script was in state 0 when skip-scene was clicked.
+// We make room by overwriting an unnecessary state check.
+//
+// Applies to: All versions
+// Responsible method: openingCartoon:changeState
+static const uint16 kq7OpeningCartoonSignature[] = {
+ SIG_MAGICDWORD,
+ 0x18, // not
+ 0x30, SIG_UINT16(0x0544), // bnt 05444 [ skip if skip-scene clicked ]
+ SIG_ADDTOOFFSET(+0x0541),
+ 0x32, SIG_ADDTOOFFSET(+2), // jmp [ ret ]
+ 0x87, 0x01, // lap 01
+ 0x65, 0x16, // aTop state
+ 0x36, // push
+ 0x3c, // dup
+ 0x35, 0x00, // ldi 00
+ 0x1a, // eq? [ is state 0? always true ]
+ 0x30, SIG_ADDTOOFFSET(+2), // bnt [ toss, ret ]
+ SIG_END
+};
+
+static const uint16 kq7OpeningCartoonPatch[] = {
+ PATCH_ADDTOOFFSET(+1),
+ 0x30, PATCH_UINT16(0x0542), // bnt 0542 [ skip if skip-scene clicked ]
+ PATCH_ADDTOOFFSET(+0x0541),
+ 0x48, // ret
+ 0x63, 0x22, // pToa ticks [ non-zero if we were in state 0 ]
+ 0x31, 0x09, // bnt 09 [ skip ego init if state > 0 ]
+ 0x38, PATCH_SELECTOR16(init), // pushi init
+ 0x76, // push0
+ 0x81, 0x00, // lag 00
+ 0x4a, PATCH_UINT16(0x0004), // send 0004 [ KQEgo init: ]
+ 0x36, // push [ to satisfy toss ]
+ PATCH_END
+};
+
// script, description, signature patch
static const SciScriptPatcherEntry kq7Signatures[] = {
{ true, 0, "disable video benchmarking", 1, kq7BenchmarkSignature, kq7BenchmarkPatch },
{ true, 0, "remove hardcoded spin loop", 1, kq7PragmaFailSpinSignature, kq7PragmaFailSpinPatch },
{ true, 30, "fix allowing too many saves", 1, kq7TooManySavesSignature, kq7TooManySavesPatch },
+ { true, 1250, "fix opening cartoon", 1, kq7OpeningCartoonSignature, kq7OpeningCartoonPatch },
{ true, 5300, "fix snake oil salesman disposal", 1, kq7SnakeOilSalesmanSignature, kq7SnakeOilSalesmanPatch },
{ true, 5301, "fix chicken cartoon", 1, kq7ChickenCartoonSignature, kq7ChickenCartoonPatch },
{ true, 6100, "fix extra ambrosia", 1, kq7ExtraAmbrosiaSignature, kq7ExtraAmbrosiaPatch },
More information about the Scummvm-git-logs
mailing list