MiSTer-devel / Saturn_MiSTer

Sega Saturn for MiSTer
60 stars 17 forks source link

Pyon Pyon Kyaruru no Mahjong Biyori // Corruption In Intro On Single RAM Build (10-30-2024~) #251

Open InfernoHabanero opened 2 months ago

InfernoHabanero commented 2 months ago

Screenshot 2024-09-21 00-16-55

In the intro to Pyon Pyon Kyaruru no Mahjong Biyori, there a brief moment where the graphics corrupt. This is easy to replicate; all you need to do is let the intro play out and it's guaranteed to show up.

Tested on both the 09/18/2024 single and dual RAM builds with 128MB 2.9 RAM modules.

Zet-sensei commented 3 weeks ago

Fixed with commit https://github.com/MiSTer-devel/Saturn_MiSTer/commit/d7aee5703a2ff8b9829ccb1f78726b04f6031864 on a Dual RAM system.

InfernoHabanero commented 3 weeks ago

Yeah I can confirm it's fixed on the dual RAM build. Single RAM build actually has worse glitching though, so this is a two-steps-back-two-steps-forward solution.

I'm going to still keep this open, but with the clarification that this is still a problem with the single RAM build.

srg320 commented 3 weeks ago

The intro is very dependent on the RAM-H access speed. In a single sdram build, RAM-H (and 6 other core memories) is located in ddram, which has low latency. So it is impossible to make the intro work correctly in a single sdram build.

Zet-sensei commented 1 week ago

For future reference. Doesn't change after a new test asked to another user with the Single RAM core version 2024-11-16 & the FAST timings option ON.

srg320 commented 1 week ago

For future reference. Doesn't change after a new test asked to another user with the Single RAM core version 2024-11-16 & the FAST timings option ON.

The option will be useful for slowdowns in some fighting games and Digital Dance Mix freeze. In other cases this option is useless or even dangerous. I do not recommended to use this option regularly.

Kuba-J commented 1 week ago

The option will be useful for slowdowns in some fighting games and Digital Dance Mix freeze. In other cases this option is useless or even dangerous. I do not recommended to use this option regularly.

What are the risks of using this option?

srg320 commented 1 week ago

The option will be useful for slowdowns in some fighting games and Digital Dance Mix freeze. In other cases this option is useless or even dangerous. I do not recommended to use this option regularly.

What are the risks of using this option?

Freezes, graphical glitches, etc. Simply put: if you have problems with a specific game with this option enabled, you should check with it disabled.

Kuba-J commented 1 week ago

Thanks for the explanation

real-amano commented 1 week ago

@srg320 you hinted that even the dual RAM builds cannot replicate the hardware Saturn timing for those games perfectly. Will this setting just help single build users or might that potentially improve dual builds as well (at least a bit)? Or will it just be available for the single RAM builds?

srg320 commented 1 week ago

@srg320 you hinted that even the dual RAM builds cannot replicate the hardware Saturn timing for those games perfectly. Will this setting just help single build users or might that potentially improve dual builds as well (at least a bit)? Or will it just be available for the single RAM builds?

I'll try to explain. Some games depend on the accuracy of the VDP1 timings. Some games depend on the accuracy of the VDP2 timings. Some games depend on the accuracy of the work ram (RAM-H,RAM-L) timings. Some games depend on the accuracy of the sound processor (SCSP) timings. Some games depend on the accuracy of the CD block timings. And some games depend on the accuracy of the combination of these components. The main sdram used by the VDP2 and the SCSP. The second sdram used only for RAM-H. The VDP1, CD, RAM-L, DRAM/backup cartridge (and RAM-H in single sdram build) use on-board ddr3 memory, which has latency. The ddr3 speed is not fast enough to provide all these blocks with the required access speeds. Therefore, due to these latencies, various problems can occur in games. Only the RAM-H has been transferred to the second sdram, everything else remains in ddr3. That's why I say that it is not possible to provide 100% accuracy even in dual sdram build. The FAST option makes half of Saturn's components (CPUs, SCU, ROM, RAM-L, CD block) inaccurate (faster than the original). It is needed to save a few cycles, which PARTIALLY compensate for ddr3 delays when accessing RAM-H in single sdram build.

About this issue. The game intro code is programmed in such a way that it depends on the accuracy of RAM-H access speed. Here we need absolute accuracy of RAM-H reading by the CPU (that none of the emulators have). To provide such precision is possible only in a dual sdram build.

real-amano commented 1 week ago

Thanks a lot for the detailed answer!