[Scummvm-git-logs] scummvm master -> 8552d9515d51ab0fe31807671558adb107cee5c7
mduggan
mgithub at guarana.org
Wed Sep 8 00:59:09 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:
5a5bd56620 ULTIMA8: Reduce incorrect global warnings in U8
8552d9515d ULTIMA8: Increase process loop detection theeshold
Commit: 5a5bd566201df0d360f9f2168db6b17854aa58ab
https://github.com/scummvm/scummvm/commit/5a5bd566201df0d360f9f2168db6b17854aa58ab
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2021-09-08T09:53:43+09:00
Commit Message:
ULTIMA8: Reduce incorrect global warnings in U8
Because the games have different global sizes, the logic for when to print a
pop-to-global warning was wrong. It should warn for size > 2 in Crusader
(where the globals are *bytes*), or if the size popped doesn't fit in
the number of *bits* for U8.
Changed paths:
engines/ultima/ultima8/usecode/uc_machine.cpp
diff --git a/engines/ultima/ultima8/usecode/uc_machine.cpp b/engines/ultima/ultima8/usecode/uc_machine.cpp
index f3fa903de1..8526f3ca89 100644
--- a/engines/ultima/ultima8/usecode/uc_machine.cpp
+++ b/engines/ultima/ultima8/usecode/uc_machine.cpp
@@ -1234,12 +1234,12 @@ void UCMachine::execProcess(UCProcess *p) {
case 0x4F:
// 4F xx xx yy
// pop value into global xxxx size yy bits
- ui16a = cs->readUint16LE();
- ui16b = cs->readByte();
- ui32a = p->_stack.pop2();
+ ui16a = cs->readUint16LE(); // pos
+ ui16b = cs->readByte(); // len
+ ui32a = p->_stack.pop2(); // val
_globals->setEntries(ui16a, ui16b, ui32a);
- if ((GAME_IS_U8 && (ui32a & ~(((1 << ui16b) - 1)))) || ui16b > 2) {
+ if ((GAME_IS_U8 && (ui32a & ~(((1 << ui16b) - 1)))) || (GAME_IS_CRUSADER && (ui16b > 2))) {
perr << "Warning: value popped into a flag it doesn't fit in (" << ConsoleStream::hex
<< ui16a << " " << ui16b << " " << ui32a << ")" << Std::endl;
}
Commit: 8552d9515d51ab0fe31807671558adb107cee5c7
https://github.com/scummvm/scummvm/commit/8552d9515d51ab0fe31807671558adb107cee5c7
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2021-09-08T09:56:43+09:00
Commit Message:
ULTIMA8: Increase process loop detection theeshold
As reported in #12913, the current process loop detection can incorrectly fire
on certain U8 map transitions. Bump the threshold way up to avoid problems.
This will result in a nasty pause in Crusader: No Remorse Map 3, but it's
better than breaking U8.
Changed paths:
engines/ultima/ultima8/kernel/kernel.cpp
diff --git a/engines/ultima/ultima8/kernel/kernel.cpp b/engines/ultima/ultima8/kernel/kernel.cpp
index 0a200d38fa..65cf06bd1e 100644
--- a/engines/ultima/ultima8/kernel/kernel.cpp
+++ b/engines/ultima/ultima8/kernel/kernel.cpp
@@ -173,7 +173,12 @@ void Kernel::runProcesses() {
// we can work out what it is avoid the game totally hanging at this
// point.
//
- if (num_run > 8096 && !p->is_terminated()) {
+ // If this threshold is set too low, it can cause issues with U8 map
+ // transitions (eg, bug #12913). If it's too high, Crusader locks up
+ // for a really long time at this point. Set it high enough that
+ // a process going through all map items should still terminate.
+ //
+ if (num_run > 65536 && !p->is_terminated()) {
warning("Seem to be stuck in process loop - killing current process");
p->fail();
}
More information about the Scummvm-git-logs
mailing list