They're stored in the exe. Which version are you using? I can find the offsets if you'd like to edit it. Updating the inputs will probably be quite hard though, so maybe best to disable the demos? I should also note the exe needs to be decompressed in order to edit it.
0xB7E1C (DemoRecordMap): 07 00 07 00 01 00 04 00 09 00 0A 00
0xB7E10 (DemoRecordWolrd): 02 00 03 00 04 00 05 00 01 00 05 00
0xB7E04 (DemoRecordSize): 9A 00 C0 00 C8 00 AC 00 C8 00 78 00
0xB7828 (DemoRecord): ...
I'll send you a tool to decompress the exe with in a pm.
On the topic of uncompressing and decompressing the game... I guess that creates an issue around me distributing this mod, originally it would have only been the WLD, LEV and DAT files; which would have meant I wasn't giving out a physical copy of the game out to anyone. If I supply an updated version of the EXE that would probably create some piracy issues wouldn't it?
The plan was going to be that I supply an installer where I could move files over etc. But I'll probably have to include my own implementation of a re/de-compressor to add that data in so that I'm not supplying the game itself just editing the users version.
I'll send you a tool to decompress the exe with in a pm. The game runs just fine with it being decompressed, but you can optionally compress it again afterwards if you prefer.
As for the demo data, this is what there is:
Code:0xB7E1C (DemoRecordMap): 07 00 07 00 01 00 04 00 09 00 0A 00 0xB7E10 (DemoRecordWolrd): 02 00 03 00 04 00 05 00 01 00 05 00 0xB7E04 (DemoRecordSize): 9A 00 C0 00 C8 00 AC 00 C8 00 78 00 0xB7828 (DemoRecord): ...
DemoRecordMap indicates the levels and DemoRecordWolrd (yeah, the devs spelt this wrong) the world. DemoRecordSize has the sizes of each demo. All of these are 16-bit values. The actual demo data is stored in the large array at DemoRecord. This is all a bit of a mess... In the 2D Rayman 2 engine this was cleaned up a lot and the demo data is stored as actual game data, but that doesn't help much here.
The absolute easiest way to deal with this is to set the size values to 0. Then the demos will finish immediately. Alternatively you could probably edit the code which loads the demo and prevent that from running. That'd be a bit more complicated to find though... The game's menu code is quite messy.
Cmd Bin Dec Hex
------------------------------------
NONE 00000000 0 0x0
FIST 00000001 1 0x1
ACTION 00000010 2 0x2
JUMP1 00000100 4 0x4
JUMP2 00001000 8 0x8
LEFT 00010000 16 0x10
RIGHT 00100000 32 0x20
UP 01000000 64 0x40
DOWN 10000000 128 0x80
4 bytes: frame offset (0, 2, 4, 6 etc.)
4 bytes: repeat length
4 bytes: repeat frame (number of times it has repeated out of the current length)
4 bytes: frames length
pointer: buffer (this is also where it writes to, so it has to be a valid pointer from which the data can be extracted)
1 byte: 1 if it's recording, otherwise 0
1 byte: 1 if it's playing, otherwise 0
1 byte: 1 if it's finished, otherwise 0 (this was used by the devs to stop recording a demo, but it will otherwise stop once it reaches 9999 frames)
1 byte: padding
Yeah, the commands are essentially RLE-compressed. The repeat is in number of frames. Since the game is hard-coded to 60 fps, it means that a value of 60 is 1 second.
The reason you have two jump flags is because the game used to have 4 actions where the fourth one was for the hand-stand powerup (triangle on a PS controller). But they removed that after the last JP PS1 demo.
Would the handstand have been jump 1 or jump 2?
Do you know if there's a pointer that states where the demo data starts? (aka shows 0xB782?
Also has anyone worked out if there's a value set somewhere which states what the total number of demos can be?
if (NumDemo == 6)
{
NumDemo = 0;
...
But maybe your idea of making a separate tool is better. Only trouble would probably be getting the timing to match the game's frames. Good luck!![]()
Now I need to go back to the games text (LNG data), I've managed to decrypt and encrypt fine with the xor keys and encoding but I''m unsure what to do about these bits...
- Unsure where the checksum I need to amend is stored in the uncompressed EXE for version 1.21 or any other version for that matter?
- I'm aware that the English, French and German languages work fine with the encoding code page value 850, but I'm noot sure what values are required for the japanese and chinese languages.
00 00 00 00 8A 10 00 00 30 B4 00 00
8A 10 00 00 69 12 00 00 82 A1 00 00
F3 22 00 00 27 13 00 00 CF 5C 00 00
1A 36 00 00 CF 09 00 00 D0 C0 00 00
E9 3F 00 00 3E 09 00 00 95 14 00 00
4 bytes: file offset
4 bytes: file size
1 byte: xor key
1 byte: checksum
2 bytes: padding
The encoding they use is 437, but others might work too. I also wrote a reader/writer for Rayman 1's text files here (mostly re-implemented from how the game does it), but I'm sure it's overkill for the language files since they only contain strings. It was more useful for the data in Rayman Designer.I'm aware that the English, French and German languages work fine with the encoding code page value 850
The Japanese and Chinese ones work a bit differently though by referencing sprites instead of being encoded as text. So each line of text is usually a single sprite.
I managed to change most of the translations and it works fine in game, haven't checked the French or German ones yet though. I also need to update the credits (it will include me yourself and if you can think of any others that were involved in reverse engineering Rayman 1)but I couldn't see any of the names in the LNG file, so I assume they are held elsewhere in the EXE?Edit: I've found them in the EXE from address E1EAC.
The first link is what you want yeah! It starts at 0xB6D5C in the exe and has 20 bytes per entry with there being 24 of them in the array (last 6 ones are the save points!). Some of the data gets filled in during runtime, but you can change their x and y positions, the levels they lead to and how they're linked on the map. The structure is:I was contemplating on whether or not to change the world map medallion locations. I saw some stuff that was documented both here...
https://github.com/BinarySerializer...zer.Ray1/DataTypes/Common/WLDMAP/WorldInfo.cs
...and here...
https://github.com/BinarySerializer...taTypes/PC/FileArchives/WLDMAP/PC_WorldMap.cs
...but I got a little lost; do know what the pointers and structures are for this sort of stuff?
2 bytes: x position
2 bytes: y position
1 byte: up index (index of the entry to lead to when the user moves up from this entry)
1 byte: down index
1 byte: left index
1 byte: right index
2 bytes: runtime data - ignore this
1 byte: world (1-6, except save points which are set to 7 as a sort of Jaguar leftover where world 7 is the menus)
1 byte: level (1-30)
4 bytes: unknown
4 bytes: level name pointer (I think this gets set during runtime in the PC version)
Here is a new promo video for the mod...
https://rumble.com/v3z8md4-rayman-expert-promo.html