PC DOS Rayman v1.21 Language Switch Fix

The common PC releases of Rayman all contain data for English, French and German languages. The language setting is determined by the first byte of the configuration file (RAYMAN.CFG) – 00 – English, 01 – French, 02 – German (other values are invalid). Rayman v1.12 allows the language to be chosen by the installation program. Rayman v1.21 took a different approach, and a strange one: the executables of different local release simply force the language of the locale, completely overriding the configuration file. Thus, the ability to switch language on the fly is removed, which is unfortunate.

PluMGMK from the Rayman Pirate Community has provided a patch utility to fix this limitation in the GOG Rayman Forever release (which uses Rayman (US) v1.21), and also documented how it works. Comparing the hex dumps of the patched vs. unpatched executables, and consulting the disassembly (obtained via the DOSBox debugger) I was able to narrow down the required changes to just two bytes, and also port the patch to Rayman (FR) v1.21. The latter uses basically the same code to “force” French, except instead of clearing the registers, it sets their value to “1” (since 0 is English and 1 is French).

Rayman (US) v1.21 Code

B874E81A00         mov  eax,001AE874
30FF               xor  bh,bh
31D2               xor  edx,edx
883D350A1B00       mov  [001B0A35],bh
E862EAFFFF         call ($-159e)

Rayman (FR) v1.21 Code

B701               mov  bh,01
BA01000000         mov  edx,00000001
B874E81A00         mov  eax,001AE874
883D350A1B00       mov  [001B0A35],bh
E85FEAFFFF         call ($-15a1)

The DOS executables are PMODE/W compressed, and must be decompressed before patching, as described here. After decompression, the following offsets must be changed (replacing a mov [byte ptr], bh with a move dl, [byte ptr]):

Rayman (US) v1.21 Patch Offsets

0x6D3A388 3D8A 15

Rayman (FR) v1.21 Patch Offsets

0x6D3B688 3D8A 15

If there exists a German version of Rayman v1.21, I imagine the fix would be similar.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s