[Scummvm-tracker] [ScummVM :: Bugs] #16454: GOB: WEEN - unimplemented opcodeGob

ScummVM :: Bugs trac at scummvm.org
Fri Oct 9 18:52:43 UTC 2026


#16454: GOB: WEEN - unimplemented opcodeGob
-------------------+--------------------------
Reporter:  joshas  |       Owner:  (none)
    Type:  defect  |      Status:  new
Priority:  low     |   Component:  Engine: Gob
 Version:          |  Resolution:
Keywords:  opcode  |        Game:  Ween
-------------------+--------------------------
Comment (by joshas):

 Here are some things I was able to figure out:
 1. `degob` program does not print unimplemented opcodes 0x3 and 0xD in
 decompiled script output, because those two are mapped to "o1_dummy"
 function in `_goblinFuncLookUp` map.
 2. `opcodeGob 0x3` and `0xD` do absolutely nothing in DOS version of the
 game, so from this point of view there is not much loss to hide those
 functions when decompiling game script. Although it makes decompiled code
 incorrect.
 3. Things get more interesting in Amiga version of the game - "Ween: The
 Prophecy (Amiga/English (GB))". There is a new "WARNING: unimplemented
 opcodeGob: 11 [0xB]" displayed by ScummVM, when running "INTRO016.TOT" and
 `degob` stops with error message while trying to decompile this opcode.
 This is because this opcode is not mapped in `scummvm-tools`.
 4. After decompiling executable from Amiga version I was able to find
 where those opcodes are handled, and they all are related to "Infogrames"
 music player. I do not have enough Amiga hardware knowledge to understand
 what exactly those unimplemented opcodes do, but looking at their
 placement in game script, `0x3` and `0xD` always appear after
 `o2_stopInfogrames(0)` function. I can only guess that they do some sort
 of cleanup which currently might be already implemented in
 `o2_stopInfogrames(0)`. opcode `0xB` is used only once in whole Amiga game
 script and is placed after `o2_playInfogrames(var8_476)`, at the start of
 intro script.

 It would be great to figure out what those 3 opcodes are responsible for
 in Amiga version and document them, by adding appropriate functions to
 `degob` utility. This would also fix `degob` exiting with error message
 when trying to decompile "INTRO016.TOT" from Amiga version of the game.

 And could someone explain, why `_goblinFuncLookUp` is used in
 "degob_script_v2.cpp" instead of placing opcodes at correct index
 locations right from the start? It took me a while to understand why
 opcode indexes were different in TOT file and function list of this source
 file.
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/16454#comment:3>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list