Opened 4 years ago

Closed 4 years ago

#9665 closed defect (fixed)

SCI: Hoyle5: crash due to kPlatform signature mismatch

Reported by: OmerMor Owned by: csnover
Priority: normal Component: Engine: SCI
Version: Keywords:
Cc: Game:


Running any of the Hoyle5 games (including the interactive demo) results in this error on start:

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.

Change History (2)

comment:1 by OmerMor, 4 years ago

To reproduce, the Hoyle5 demo can be downloaded from here:

comment:2 by csnover, 4 years ago

Owner: set to csnover
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.