Password generator for Rayman 1 (PSX) PAL version

Discuss tools to aid in the modification and running of Rayman games.

Moderator: Modding and utilities team

Forum rules
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
Post Reply
kemptom8
Electoon
Posts: 2
Joined: Thu Jul 15, 2021 2:00 pm
Tings: 10

Password generator for Rayman 1 (PSX) PAL version

Post by kemptom8 »

Hello guys!

As most of you probably know, Rayman 1 uses passwords to load/save game data if no memory card is used. These passwords are generated based on which level you are at, what levels have been completed and the system also keeps track of the number of lives and continues.
I was curious about how this was done, so I decided to analyze the system and try to find a working formula for it.
It didn't seem easy at first, but now I am glad to announce I cracked the Rayman 1 password algorithm! Those of you who are interested in this can find the password generator here:

https://kemptomprojects.com/rayman_pwgen/

As far as I know these password only work for the PAL version. Apparently the NTSC version has different passwords.
Feel free to let me know if there are any bugs or problems with the generator.

Enjoy!

Cheers

Kemptom8
RayCarrot
Carmen
Posts: 2476
Joined: Sat Jan 11, 2014 5:46 pm
Tings: 40322

Re: Password generator for Rayman 1 (PSX) PAL version

Post by RayCarrot »

Nice work! If you want to add support for the NTSC version you can check my source code for it if you'd like :). I reverse engineered it for the password generator in RCP. I didn't add the PAL version myself since as you said they use different data structures (but they're generally the same).
hoodlumsworld
El Stomacho (good)
Posts: 1587
Joined: Mon Jun 15, 2020 1:12 am
Tings: 23101

Re: Password generator for Rayman 1 (PSX) PAL version

Post by hoodlumsworld »

This works really well, great job. But do we know why the data structures are different between PAL and NTSC?
RayCarrot
Carmen
Posts: 2476
Joined: Sat Jan 11, 2014 5:46 pm
Tings: 40322

Re: Password generator for Rayman 1 (PSX) PAL version

Post by RayCarrot »

It's just so the same passwords can't be used between them. The actual data is the same, just stored in a different order and with different encryption tables. The game has quite a ridiculous amount of verification checks to make sure the passwords are accurate.
PluMGMK
Annetta Fish
Posts: 40521
Joined: Fri Jul 31, 2009 9:00 pm
Location: https://www.youtube.com/watch?v=cErgMJSgpv0
Contact:
Tings: 136671

Re: Password generator for Rayman 1 (PSX) PAL version

Post by PluMGMK »

Great work guys! :up:

Also, from the code posted above:

Code: Select all

if (level >= 17 || FinBossLevel.HasFlag(Rayman1FinBossLevelFlags.MrDark))
    return $"Mr Skops has to be beaten before Mr Dark";
We were recently discussing how this is the case on PSX, but not PC. I wonder if they put this validation check in the password system and only realized at the last minute that it was actually possible to skip Skops in a legitimate game. That might explain why the "solution" they came up with (removing the return-to-map sign from Mr Skops' Stalactites) was so ridiculous!
Hunchman801
Bad Rayman
Posts: 87685
Joined: Thu Aug 07, 2003 6:50 pm
Location: Paris, France
Contact:
Tings: 640537

Re: Password generator for Rayman 1 (PSX) PAL version

Post by Hunchman801 »

This is a really nice tool, Kemptom! Works just fine and looks pretty good as well. :up:
Retrofuge
Mister Death
Posts: 106
Joined: Sun Nov 29, 2020 12:18 am
Location: Land of the Livid Dead
Tings: 9590

Re: Password generator for Rayman 1 (PSX) PAL version

Post by Retrofuge »

That sounds really cool. I would love to give this a try, it's seems like a neat tool in general. Thanks for making this! :mrgreen:
kemptom8
Electoon
Posts: 2
Joined: Thu Jul 15, 2021 2:00 pm
Tings: 10

Re: Password generator for Rayman 1 (PSX) PAL version

Post by kemptom8 »

RayCarrot wrote: Thu Jul 15, 2021 5:32 pm Nice work! If you want to add support for the NTSC version you can check my source code for it if you'd like :). I reverse engineered it for the password generator in RCP. I didn't add the PAL version myself since as you said they use different data structures (but they're generally the same).
Thank you very much! I will take a look at the source code in more detail soon and try it add support for the NTSC version as well. Would indeed be cool.
It's nice to see a reverse engineering of the actual code. It's funny the actual implementation looks pretty different than the one I came up with by analyzing the passwords and looking for patterns. As always in programming there are many ways to get the same result :)
Hunchman801 wrote: Fri Jul 16, 2021 10:03 am This is a really nice tool, Kemptom! Works just fine and looks pretty good as well. :up:
Thanks a lot! :)
Post Reply