[Scummvm-git-logs] scummvm-tools master -> d0b41d0d0540551ac9adf8d42ac1f4bb94f3c801
sdelamarre
noreply at scummvm.org
Sat Sep 13 21:01:40 UTC 2025
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm-tools' repo located at https://api.github.com/repos/scummvm/scummvm-tools .
Summary:
7f58984686 GOB: o7_draw0x89 is o7_setActiveCD + add a missing parameter
4b654c5f54 GOB: Add Adibou2 Html-related opcodes names in degob
27f0a870b7 GOB: Always use function names table as additional entry points in degob
717575e602 GOB: Add Adi4 "open application" and (de)obfuscate opcodes in degob
d0b41d0d05 GOB: Fix missing argument in o1_insertStr opcode in degob
Commit: 7f5898468640444f3ac5aafeadcba4f7143f5eb7
https://github.com/scummvm/scummvm-tools/commit/7f5898468640444f3ac5aafeadcba4f7143f5eb7
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2025-09-13T23:01:11+02:00
Commit Message:
GOB: o7_draw0x89 is o7_setActiveCD + add a missing parameter
Changed paths:
engines/gob/degob_script_v7.cpp
diff --git a/engines/gob/degob_script_v7.cpp b/engines/gob/degob_script_v7.cpp
index 22ab1faf..c418e838 100644
--- a/engines/gob/degob_script_v7.cpp
+++ b/engines/gob/degob_script_v7.cpp
@@ -289,7 +289,7 @@ void Script_v7::setupOpcodes() {
{OPCODET(o2_setImdFrontSurf), {PARAM_NONE}},
/* 88 */
{OPCODET(o2_resetImdFrontSurf), {PARAM_NONE}},
- {OPCODET(o7_draw0x89), {PARAM_EXPR, PARAM_EXPR}},
+ {OPCODET(o7_setActiveCD), {PARAM_EXPR, PARAM_EXPR, PARAM_VARINDEX}},
{OPCODET(o7_findFile), {PARAM_EXPR, PARAM_VARINDEX, PARAM_VARINDEX}},
{OPCODET(o7_findCDFile),{PARAM_VARINDEX, PARAM_VARINDEX}},
/* 8C */
Commit: 4b654c5f54885633b9e50a03c8f7762b2f406856
https://github.com/scummvm/scummvm-tools/commit/4b654c5f54885633b9e50a03c8f7762b2f406856
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2025-09-13T23:01:11+02:00
Commit Message:
GOB: Add Adibou2 Html-related opcodes names in degob
Changed paths:
engines/gob/degob_script_v7.cpp
diff --git a/engines/gob/degob_script_v7.cpp b/engines/gob/degob_script_v7.cpp
index c418e838..1ded5670 100644
--- a/engines/gob/degob_script_v7.cpp
+++ b/engines/gob/degob_script_v7.cpp
@@ -355,11 +355,11 @@ void Script_v7::setupOpcodes() {
/* BC */
{TYPE_NONE, 0, 0, {PARAM_NONE}},
{TYPE_NONE, 0, 0, {PARAM_NONE}},
- {OPCODET(o7_draw0xBE), {PARAM_EXPR}},
- {OPCODET(o7_draw0xBF), {PARAM_EXPR}},
+ {OPCODET(o7_openHtmlFile), {PARAM_EXPR}},
+ {OPCODET(o7_closeHtmlFile), {PARAM_EXPR}},
/* C0 */
- {OPCODET(o7_draw0xC0), {PARAM_EXPR, PARAM_EXPR, PARAM_EXPR, PARAM_VARINDEX}},
- {OPCODET(o7_draw0xC1), {PARAM_EXPR, PARAM_VARINDEX, PARAM_VARINDEX}},
+ {OPCODET(o7_seekHtmlFile), {PARAM_EXPR, PARAM_EXPR, PARAM_EXPR, PARAM_VARINDEX}},
+ {OPCODET(o7_nextKeywordHtmlFile), {PARAM_EXPR, PARAM_VARINDEX, PARAM_VARINDEX}},
{TYPE_NONE, 0, 0, {PARAM_NONE}},
{OPCODET(o7_draw0xC3), {PARAM_EXPR, PARAM_EXPR, PARAM_EXPR, PARAM_EXPR, PARAM_EXPR, PARAM_VARINDEX, PARAM_VARINDEX}},
/* C4 */
Commit: 27f0a870b7b2e0d484fe039fde7a8f43fb9119a2
https://github.com/scummvm/scummvm-tools/commit/27f0a870b7b2e0d484fe039fde7a8f43fb9119a2
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2025-09-13T23:01:11+02:00
Commit Message:
GOB: Always use function names table as additional entry points in degob
+ Remove --lib option
Changed paths:
engines/gob/degob.cpp
engines/gob/degob_script.cpp
engines/gob/degob_script.h
diff --git a/engines/gob/degob.cpp b/engines/gob/degob.cpp
index 0bc33e66..11ae1720 100644
--- a/engines/gob/degob.cpp
+++ b/engines/gob/degob.cpp
@@ -65,7 +65,6 @@ int main(int argc, char **argv) {
ideData = readFile(ideFilename.c_str(), ideSize);
ExtTable *extTable = 0;
- bool libMode = false;
if (argc > 3) {
int n = 3;
@@ -89,13 +88,6 @@ int main(int argc, char **argv) {
n++;
}
- if (argc > n) {
- if (!strncmp(argv[n], "--lib", 5)) {
- libMode = true;
- n++;
- }
- }
-
if (argc > n) {
extData = readFile(argv[n], extSize);
@@ -123,7 +115,7 @@ int main(int argc, char **argv) {
printInfo(*script);
printf("-----\n");
- script->deGob(offset, libMode);
+ script->deGob(offset);
delete[] totData;
delete[] extData;
@@ -153,7 +145,6 @@ void printHelp(const char *bin) {
printf("\n");
printf("<file.tot>\n\tthe .tot file to decompile\n\n");
printf("-o <offset>\n\tscript entry point in the .tot file, defaults to the value read in script header\n\n");
- printf("--lib\n\tlibrary mode: all offsets from .IDE named functions file are used as entry points\n\n");
printf("<file.ext>\n\texternal script resource file (<script name>.EXT)\n\n");
printf("<commun.ext>\n\texternal common script resource file (commun.EXn)\n\n");
diff --git a/engines/gob/degob_script.cpp b/engines/gob/degob_script.cpp
index c131a354..5ec45076 100644
--- a/engines/gob/degob_script.cpp
+++ b/engines/gob/degob_script.cpp
@@ -930,21 +930,18 @@ void Script::addFuncOffset(uint32 offset) {
_funcOffsets.push_back(offset);
}
-void Script::deGob(int32 offset, bool isLib) {
+void Script::deGob(int32 offset) {
_funcOffsets.clear();
- if (isLib) {
- // Use functions from IDE file as entry points
+ if (offset >= 0)
+ _funcOffsets.push_back(offset);
+ else {
+ addStartingOffsets();
+ // Use functions from IDE file as entry points if any
for (auto it = _funcOffsetsNames.begin(); it != _funcOffsetsNames.end(); ++it)
addFuncOffset(it->first);
- } else {
- if (offset < 0)
- addStartingOffsets();
- else
- _funcOffsets.push_back(offset);
}
-
for (std::list<uint32>::iterator it = _funcOffsets.begin(); it != _funcOffsets.end(); ++it) {
seek(*it);
deGobFunction();
diff --git a/engines/gob/degob_script.h b/engines/gob/degob_script.h
index 40f62e8d..0047ef28 100644
--- a/engines/gob/degob_script.h
+++ b/engines/gob/degob_script.h
@@ -90,7 +90,7 @@ public:
void loadIDE(const byte *ideData);
- void deGob(int32 offset = -1, bool isLib = false);
+ void deGob(int32 offset = -1);
protected:
enum FuncType {
Commit: 717575e602ff71bbbd5bc4a2ac87a6308682029f
https://github.com/scummvm/scummvm-tools/commit/717575e602ff71bbbd5bc4a2ac87a6308682029f
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2025-09-13T23:01:11+02:00
Commit Message:
GOB: Add Adi4 "open application" and (de)obfuscate opcodes in degob
Changed paths:
engines/gob/degob_script.h
engines/gob/degob_script_v7.cpp
diff --git a/engines/gob/degob_script.h b/engines/gob/degob_script.h
index 0047ef28..8fbbacdf 100644
--- a/engines/gob/degob_script.h
+++ b/engines/gob/degob_script.h
@@ -674,6 +674,10 @@ protected:
void o7_oemToANSI(FuncParams ¶ms);
void o7_ansiToOEM(FuncParams ¶ms);
void oPlaytoons_freeSprite(FuncParams ¶ms);
+
+ void o7_startAdi4Application(FuncParams ¶ms);
+ void o7_xorDeobfuscate(FuncParams ¶ms);
+ void o7_xorObfuscate(FuncParams ¶ms);
};
#endif // DEGOB_SCRIPT_H
diff --git a/engines/gob/degob_script_v7.cpp b/engines/gob/degob_script_v7.cpp
index 1ded5670..f3a8e627 100644
--- a/engines/gob/degob_script_v7.cpp
+++ b/engines/gob/degob_script_v7.cpp
@@ -103,7 +103,10 @@ const int Script_v7::_goblinFuncLookUp[][2] = {
{3, 71},
{420, 72},
{421, 73},
- {513, 74}
+ {513, 74},
+ {406, 75},
+ {407, 76},
+ {408, 77},
};
Script_v7::Script_v7(byte *totData, uint32 totSize, ExtTable *extTable) :
@@ -542,7 +545,7 @@ void Script_v7::setupOpcodes() {
{OPCODET(o1_manageDataFile), {PARAM_EXPR}},
};
- static const OpcodeGoblinEntryV7 opcodesGoblin[75] = {
+ static const OpcodeGoblinEntryV7 opcodesGoblin[78] = {
/* 00 */
{OPCODEF(o1_dummy), {PARAM_NONE}},
{OPCODET(o2_startInfogrames), {PARAM_UINT16}},
@@ -635,7 +638,10 @@ void Script_v7::setupOpcodes() {
{OPCODEF(o1_dummy), {PARAM_NONE}},
{OPCODEF(o7_ansiToOEM), {PARAM_NONE}},
{OPCODEF(o7_oemToANSI), {PARAM_NONE}},
- {OPCODET(o7_gob0x201), {PARAM_UINT16}}
+ {OPCODET(o7_gob0x201), {PARAM_UINT16}},
+ {OPCODEF(o7_startAdi4Application), {PARAM_NONE}},
+ {OPCODEF(o7_xorDeobfuscate), {PARAM_NONE}},
+ {OPCODEF(o7_xorObfuscate), {PARAM_NONE}},
};
_opcodesDrawV7 = opcodesDraw;
@@ -792,4 +798,28 @@ void Script_v7::oPlaytoons_freeSprite(FuncParams ¶ms)
else
print("%s", readExpr().c_str());
endFunc();
+}
+
+void Script_v7::o7_startAdi4Application(FuncParams ¶ms)
+{
+ startFunc(params);
+ print("var32_%d, ", 4 * readUint16());
+ print("var32_%d", 4 * readUint16());
+ endFunc();
+}
+
+void Script_v7::o7_xorDeobfuscate(FuncParams ¶ms)
+{
+ startFunc(params);
+ print("&var8_%d, ", 4 * readUint16());
+ print("%d", readUint16());
+ endFunc();
+}
+
+void Script_v7::o7_xorObfuscate(FuncParams ¶ms)
+{
+ startFunc(params);
+ print("&var8_%d, ", 4 * readUint16());
+ print("%d", readUint16());
+ endFunc();
}
\ No newline at end of file
Commit: d0b41d0d0540551ac9adf8d42ac1f4bb94f3c801
https://github.com/scummvm/scummvm-tools/commit/d0b41d0d0540551ac9adf8d42ac1f4bb94f3c801
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2025-09-13T23:01:11+02:00
Commit Message:
GOB: Fix missing argument in o1_insertStr opcode in degob
Changed paths:
engines/gob/degob_script_bargon.cpp
engines/gob/degob_script_fascin.cpp
engines/gob/degob_script_geisha.cpp
engines/gob/degob_script_littlered.cpp
engines/gob/degob_script_v1.cpp
engines/gob/degob_script_v2.cpp
engines/gob/degob_script_v3.cpp
engines/gob/degob_script_v4.cpp
engines/gob/degob_script_v5.cpp
engines/gob/degob_script_v6.cpp
engines/gob/degob_script_v7.cpp
diff --git a/engines/gob/degob_script_bargon.cpp b/engines/gob/degob_script_bargon.cpp
index 77d93136..d7ab9ad6 100644
--- a/engines/gob/degob_script_bargon.cpp
+++ b/engines/gob/degob_script_bargon.cpp
@@ -519,7 +519,7 @@ void Script_Bargon::setupOpcodes() {
/* 40 */
{TYPE_NONE, 0, 0, {PARAM_NONE}},
{OPCODET(o1_cleanupStr), {PARAM_VARINDEX}},
- {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR}},
+ {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
{OPCODET(o1_cutStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
/* 44 */
{OPCODET(o1_strstr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_VARINDEX}},
diff --git a/engines/gob/degob_script_fascin.cpp b/engines/gob/degob_script_fascin.cpp
index 143a9dbd..d0579b67 100644
--- a/engines/gob/degob_script_fascin.cpp
+++ b/engines/gob/degob_script_fascin.cpp
@@ -464,7 +464,7 @@ void Script_Fascin::setupOpcodes() {
/* 40 */
{TYPE_NONE, 0, 0, {PARAM_NONE}},
{OPCODET(o1_cleanupStr), {PARAM_VARINDEX}},
- {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR}},
+ {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
{OPCODET(o1_cutStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
/* 44 */
{OPCODET(o1_strstr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_VARINDEX}},
diff --git a/engines/gob/degob_script_geisha.cpp b/engines/gob/degob_script_geisha.cpp
index 618e4e53..b6a5b481 100644
--- a/engines/gob/degob_script_geisha.cpp
+++ b/engines/gob/degob_script_geisha.cpp
@@ -457,7 +457,7 @@ void Script_Geisha::setupOpcodes() {
/* 40 */
{TYPE_NONE, 0, 0, {PARAM_NONE}},
{OPCODET(o1_cleanupStr), {PARAM_VARINDEX}},
- {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR}},
+ {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
{OPCODET(o1_cutStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
/* 44 */
{OPCODET(o1_strstr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_VARINDEX}},
diff --git a/engines/gob/degob_script_littlered.cpp b/engines/gob/degob_script_littlered.cpp
index 5d51f562..cfc76127 100644
--- a/engines/gob/degob_script_littlered.cpp
+++ b/engines/gob/degob_script_littlered.cpp
@@ -453,7 +453,7 @@ void Script_LittleRed::setupOpcodes() {
/* 40 */
{TYPE_NONE, 0, 0, {PARAM_NONE}},
{OPCODET(o1_cleanupStr), {PARAM_VARINDEX}},
- {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR}},
+ {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
{OPCODET(o1_cutStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
/* 44 */
{OPCODET(o1_strstr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_VARINDEX}},
diff --git a/engines/gob/degob_script_v1.cpp b/engines/gob/degob_script_v1.cpp
index 7f6ddc6d..ff0539d1 100644
--- a/engines/gob/degob_script_v1.cpp
+++ b/engines/gob/degob_script_v1.cpp
@@ -521,7 +521,7 @@ void Script_v1::setupOpcodes() {
/* 40 */
{TYPE_NONE, 0, 0, {PARAM_NONE}},
{OPCODET(o1_cleanupStr), {PARAM_VARINDEX}},
- {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR}},
+ {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
{OPCODET(o1_cutStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
/* 44 */
{OPCODET(o1_strstr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_VARINDEX}},
diff --git a/engines/gob/degob_script_v2.cpp b/engines/gob/degob_script_v2.cpp
index 162737c6..c25b6e46 100644
--- a/engines/gob/degob_script_v2.cpp
+++ b/engines/gob/degob_script_v2.cpp
@@ -521,7 +521,7 @@ void Script_v2::setupOpcodes() {
/* 40 */
{TYPE_NONE, 0, 0, {PARAM_NONE}},
{OPCODET(o1_cleanupStr), {PARAM_VARINDEX}},
- {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR}},
+ {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
{OPCODET(o1_cutStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
/* 44 */
{OPCODET(o1_strstr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_VARINDEX}},
diff --git a/engines/gob/degob_script_v3.cpp b/engines/gob/degob_script_v3.cpp
index b8efb360..6b8f4f77 100644
--- a/engines/gob/degob_script_v3.cpp
+++ b/engines/gob/degob_script_v3.cpp
@@ -520,7 +520,7 @@ void Script_v3::setupOpcodes() {
/* 40 */
{TYPE_NONE, 0, 0, {PARAM_NONE}},
{OPCODET(o1_cleanupStr), {PARAM_VARINDEX}},
- {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR}},
+ {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
{OPCODET(o1_cutStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
/* 44 */
{OPCODET(o1_strstr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_VARINDEX}},
diff --git a/engines/gob/degob_script_v4.cpp b/engines/gob/degob_script_v4.cpp
index 0607401a..d24f011f 100644
--- a/engines/gob/degob_script_v4.cpp
+++ b/engines/gob/degob_script_v4.cpp
@@ -520,7 +520,7 @@ void Script_v4::setupOpcodes() {
/* 40 */
{TYPE_NONE, 0, 0, {PARAM_NONE}},
{OPCODET(o1_cleanupStr), {PARAM_VARINDEX}},
- {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR}},
+ {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
{OPCODET(o1_cutStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
/* 44 */
{OPCODET(o1_strstr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_VARINDEX}},
diff --git a/engines/gob/degob_script_v5.cpp b/engines/gob/degob_script_v5.cpp
index 8cf6eedd..519bfc69 100644
--- a/engines/gob/degob_script_v5.cpp
+++ b/engines/gob/degob_script_v5.cpp
@@ -520,7 +520,7 @@ void Script_v5::setupOpcodes() {
/* 40 */
{TYPE_NONE, 0, 0, {PARAM_NONE}},
{OPCODET(o1_cleanupStr), {PARAM_VARINDEX}},
- {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR}},
+ {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
{OPCODET(o1_cutStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
/* 44 */
{OPCODET(o1_strstr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_VARINDEX}},
diff --git a/engines/gob/degob_script_v6.cpp b/engines/gob/degob_script_v6.cpp
index 9979b28a..1cb5c0a3 100644
--- a/engines/gob/degob_script_v6.cpp
+++ b/engines/gob/degob_script_v6.cpp
@@ -520,7 +520,7 @@ void Script_v6::setupOpcodes() {
/* 40 */
{TYPE_NONE, 0, 0, {PARAM_NONE}},
{OPCODET(o1_cleanupStr), {PARAM_VARINDEX}},
- {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR}},
+ {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
{OPCODET(o1_cutStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
/* 44 */
{OPCODET(o1_strstr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_VARINDEX}},
diff --git a/engines/gob/degob_script_v7.cpp b/engines/gob/degob_script_v7.cpp
index f3a8e627..1500cabc 100644
--- a/engines/gob/degob_script_v7.cpp
+++ b/engines/gob/degob_script_v7.cpp
@@ -526,7 +526,7 @@ void Script_v7::setupOpcodes() {
/* 40 */
{TYPE_NONE, 0, 0, {PARAM_NONE}},
{OPCODET(o1_cleanupStr), {PARAM_VARINDEX}},
- {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR}},
+ {OPCODET(o1_insertStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
{OPCODET(o1_cutStr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_EXPR}},
/* 44 */
{OPCODET(o1_strstr), {PARAM_VARINDEX, PARAM_EXPR, PARAM_VARINDEX}},
More information about the Scummvm-git-logs
mailing list