libretro / beetle-psx-libretro

Standalone port/fork of Mednafen PSX to the Libretro API.
GNU General Public License v2.0
309 stars 131 forks source link

[Feature Request] Correct reading of Audio TOC/Meta Data for games with Disc Swap mechanics #910

Open MonsterFenrick opened 1 week ago

MonsterFenrick commented 1 week ago

Greetings, I hope this finds the right folks! I believe this is a request for improvement/addition rather than a bug... but I suppose it could be considered a bug since it prevents the expected behaviour of the game as it plays in the original hardware.

Summary:

This request is specific to a particular game, "Monster Rancher 2" (And Monster Rancher, the original though less played) which uses a mechanic In-Game which asks you to remove the game disc, and insert an Audio CD (or other PlayStation1 game) to generate a monster. After the interim CD's data is read, the game prompts you to re-insert the game disc and your monster is generated for you to continue to play the game.

Game-Specific data and information:

The complete breakdown for how the game (NTSC and PAL versions) reads a disc's TOC data is documented here: https://legendcup.com/mr2researchdiskread.php - Using this process one can manually create files, by hand, in a text editor as a stand in for what normally would be an audio CD for example.

Because this process is data-mined directly from the game, some developers in the community reverse engineered the process and created a web-app automoation to help more easily generate empty files that contain the correct TOC data of a specific monster that can be read by the game during this Disc Swapping process: https://legendcup.com/make-a-monster-mr2.php For visual rereference, Here's a YouTube demonstration of using the app successfully using DuckStation emulator.

What's broken/How it doesn't work:

RetroArch has 3 cores that work with MR2:

However, between all 3 of them, None can properly read the Table of Contents from files during the disc swap mechanic of the game, and therefore cannot generated the desired monster using the above mentioned "Make-A-Monster" app.

To briefly explain the mechanic at play from the game: Monster Rancher 2 generates monsters by reading the Table of Contents of the disc, specifically from these values:

  1. Last minute of the last track (LN-PMin)
  2. Last second of the last track (LN-PSec)
  3. Starting minute of the last track (LT-PMin)
  4. Starting second of the last track (LT-PSec)
  5. Starting second of the 2nd track (T2-PSec)

Each of the above mentioned cores reads these values differently, but none of them read them correctly.

Beetle PSX HW reads LN-PMin and LN-PSec correctly from the .bin file however, it assigns a value of 0 to LT-PMin and a value of 2 to LT-PSec regardless of what disc you're using. Since LT-PMin and LT-PSec are assigned fixed values, it blocks out a majority of the sub-breeds that can be generated. The main breeds can still be varied using LN-PMin. It also adds 2 seconds to T2-PSec. (adding 2 seconds isn't a huge issue as it is something that can be compensated when generating the files through the web-app, but it adds 2 seconds all the same)

ReARMed reads LN-PMin correctly, but assigns a value of 0 to all the other variables, so this is even worse than Beetle PSX HW.

SwanStation does not read .cue files, so it will only generates a specific monster (Pink Kato) regardless of what disc you use.

In conclusion, it's currently not possible to make the Make-A-Monster app compatible with RetroArch as it will not read the indicated values correctly. At most, one can use it to generate the main monster breeds one wants, but not the exact cross-breed or rare monsters that the game should be capable of producing.