SCI: Fix for incorrect MT-32 sysex checksum calculation
|Reported by:||SF/sven3000||Owned by:||waltervn|
In order to calculate the checksum of an MT-32 sysex, ScummVM uses the calculation 128 - chk % 128 (where chk is the sum of the value of the bytes in the message). This calculation is essentially correct, except that if the result is 128 (chk % 128 == 0), the checksum should be 0, not 128.
This problem can be observed with Conquests of the Longbow: while this game is sending the sysex data from the patch.001 resource, the MT-32 displays an "Exc. checksum error" message.
The attached patch fixes the checksum calculation to account for this situation, and has been verified to fix the checksum error encountered in Conquests of the Longbow.
ScummVM version: svn54465 OS: Win7 x64
Ticket imported from: #3118257. Ticket imported from: patches/1368.