[Scummvm-tracker] [ScummVM] #9665: SCI: Hoyle5: crash due to kPlatform signature mismatch

Omer Mor trac at scummvm.org
Sat Dec 10 22:08:55 CET 2016


#9665: SCI: Hoyle5: crash due to kPlatform signature mismatch
---------------------+-------------------------
Reporter:  Omer Mor  |      Owner:  (none)
    Type:  defect    |     Status:  new
Priority:  normal    |  Component:  Engine: SCI
Keywords:            |       Game:
---------------------+-------------------------
 Running any of the Hoyle5 games (including the interactive demo) results
 in this error on start:

 {{{
 ERROR:
 parameter 0: 0000:0004 (integer), should be null, integer (optional)
 parameter 1: 0000:0001 (integer)
 [VM] kPlatform[7a]: signature mismatch in method hoyle4::newRoom (room 0,
 script 0, localCall ffffffff)!
 }}}

 Call stack:
 {{{
 0: script 64994 - hoyle4:play()
 1: script 0 - hoyle4::init()
 2: script 0 - hoyle4::newRoom(0000:0002)
 }}}

 Looking at the decompiled script, `hoyle4::newRoom` is calling kPlatform
 in the following way:
 {{{
 (if (== (Platform 4 1) 1) (proc0_5))
 }}}

 `proc0_5()` appears to be responsible for the (slow) palette transitions
 within the game:
 {{{
 (procedure (proc0_5 &tmp temp0)
         (= temp0 100)
         (while (>= temp0 0)
                 (Palette palSET_FLAG 0 255 temp0)
                 (= temp0 (- temp0 5))
         )
 )
 }}}

 So possibly `(Platform 4 1)` is querying for the platform's ability to
 perform such transitions. Color depth perhaps?

 Changing the signature for kPlatform in `kernel_tables.h` from `(i)` to
 `(i)(i)` overcomes this crash.

--
Ticket URL: <https://bugs.scummvm.org/ticket/9665>
ScummVM <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list