Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sega CD - Chuck Rock game freezes in intro #560

Open
KamiLordus opened this issue May 19, 2024 · 15 comments
Open

Sega CD - Chuck Rock game freezes in intro #560

KamiLordus opened this issue May 19, 2024 · 15 comments

Comments

@KamiLordus
Copy link

KamiLordus commented May 19, 2024

The game freezes at the beginning of the intro. You can hear the narrator and sounds, but the animation is stopped.

Chuck Rock (USA)-240519-153357

Windows 11
Retroarch 1.18
Genesis Plus Gx core latest
Chuck Rock (USA) - chd file format

Retroarch log file:
retroarch.log

@KamiLordus KamiLordus changed the title [Libretro] Chuck Rock game freez in intro. [Libretro] Sega CD - Chuck Rock game freez in intro. May 19, 2024
@ekeeke
Copy link
Owner

ekeeke commented May 20, 2024

I can confirm this is a regression introduced by commit 47761b9

Most probably, this was working by chance in earlier versions but above commit slightly modified main-cpu execution timings just enough to break synchronization between main-cpu and sub-cpu. I will need to analyze this further.

Note: I also noticed that since this other commit (dd61951), that game (and maybe others from Sony Imagesoft which share same boot routines) was taking much longer time at the Sega logo so this is another thing to lookup.

@ekeeke ekeeke changed the title [Libretro] Sega CD - Chuck Rock game freez in intro. Sega CD - Chuck Rock game freezes in intro May 20, 2024
@KamiLordus
Copy link
Author

Wolfchild seems to have a very similar issue. The game freezes on the Sega logo, but if you wait a bit, or use the fast forward option in Retroarch, you can hear the music playing.

@jmaneyrol69
Copy link

It has actually become worse, even with the latest commit from libretro@7b57513 : now all Core Design segaCD games I have tested so far have become unusable.

They all boot-loop right after the "Sega" boot logo. I have reproduced on Linux and Android with:

  • Wolfchild (USA)
  • Chuck Rock (USA)
  • Wonderdog (USA)

My images are in CHD format.

Also, they work with other emus, such as PicoDrive.

@Freakservo
Copy link

Confirming Core bug -- Chuck 2 and BC Racers also freeze, and Thunderstrike sometimes freezes after the opening cinematic (Other times at SEGA logo; About 50/50.)

@jmaneyrol69
Copy link

Some precision too ; the problem seems to differ depending on the system.

On Linux & Android, those games just loop boot right after the Sega loading logo (the one where we see Sonic).

On Windows, it goes further but then freezes, usually after the intro (Chuck Rock) or some time after the loading screen (WolfChild). Anyway, in all cases, Core games are unplayable on Sega CD for the moment with this core.

@ekeeke
Copy link
Owner

ekeeke commented Dec 2, 2024

From experience, it differs depending on BIOS version used so most likely you have different BIOS configured on these different system.

Anyway, my spare time for working on this emulator is close to 0 these days and so far, there has been nobody else but me investigating emulation bugs so, unfortunately, it's not going to be solved soon. I looked briefly to it some times ago but it's kinda hard to figure out the root cause as this is likely a synchronization issue between the two CPUs, which is quite hard to debug.

For the time being, the only solution is to revert to an older version (previous to the commit indicated above).

@jmaneyrol69
Copy link

@ekeeke thank you for the details. I'm pretty sure I use the same BIOSes on all my systems. However, I have not tested other versions than US so far, I'll see what happens with EU/JP.

I hope you'll have enough time & support in the future to look further into the issue, and no worries, there are other options to run those games (though it will be nice when it is fixed ;-) ). Take care!

@Freakservo
Copy link

Freakservo commented Dec 2, 2024

tOkay then -- Workaround time! =)

After taking a bit to mess with the options, I discovered turning 'CD Access Time' off in the 'Emulation Hacks' menu gets these games moving. I only ran them as far as their title-screens, but all Core-developed games seem to function with this one option deactivated.

Mind, this is only tested on Windows and with US Bios 1.10 and 2.00. Your mileage may vary on other formats.

[EDIT] Guess I goofed a bit! Turning off 'CD Access Time' does seem to move the games past the 'SEGA' logo, but Chuck Rock will now freeze on the first scene of the intro (Cannot be skipped). Similar issue with Wolfchild, but further into the intro (Can be skipped). The rest seem to be working.

@jmaneyrol69
Copy link

@Freakservo I was just going to report 😉 This actually fixes the boot loop on Linux & Android (I haven't tested on Windows yet, but you seem to be doing that yourself 🙂 ).

On those systems, I am having weird results with Wolfchild: with the US version, the game still crashes after the loading screen, right after the map. With the Japanese version, however, the game actually starts but display is completely corrupted, with weird blocks everywhere, missing tiles and sprites. Wonder Dog, on the other hand, seems to work well. I haven't tried any other Core games yet.

I have also found that Batman Returns (USA) is somehow affected by the problem: without the workaround, the game is stuck right after the SEGA logo. So this may even stretch to non-Core games as well 😢

@Freakservo
Copy link

@jmaneyrol69 -
Can further-confirm with Wolfchild - The intro can be skipped but the game freezes past the map and 'loading' screen.

Digging a little deeper, the EU-version of Chuck Rock does seem to work with the CD Access Time off -- Intro plays and I can load into the level. I wonder how this affects other EU releases... Including Batman and Wolfchild.

@Goratrix
Copy link

Goratrix commented Jan 7, 2025

I just found this issue on my Anbernic handheld, tested a bunch of games thinking it may be a SD card issue first, here's the list of affected games I found so far:

AH3 - Thunderstrike (USA)
Batman Returns (USA)
BC Racers (USA)
Chuck Rock (USA)
Chuck Rock II - Son of Chuck (USA)
Fatal Fury Special (USA)
Garou Densetsu Special (Japan)
Hook (USA)
SoulStar (USA)

I also quickly tested these with 'CD Access Time' OFF, and they seem to launch fine into their intros, but I did not have time to actually play them further.

@jmaneyrol69
Copy link

@Goratrix turning CD Access Time OFF seems to workaround the issue on most of those games, but the result is variable depending on the version/BIOS, and the game (for instance, WolfChild won't work, no matter what).
Hopefully, ekeeke will have some time to look into the problem and release a fix...

@KamiLordus
Copy link
Author

I just found this issue on my Anbernic handheld, tested a bunch of games thinking it may be a SD card issue first, here's the list of affected games I found so far:

AH3 - Thunderstrike (USA) Batman Returns (USA) BC Racers (USA) Chuck Rock (USA) Chuck Rock II - Son of Chuck (USA) Fatal Fury Special (USA) Garou Densetsu Special (Japan) Hook (USA) SoulStar (USA)

I also quickly tested these with 'CD Access Time' OFF, and they seem to launch fine into their intros, but I did not have time to actually play them further.

Retroarch lets you save settings for each game separately. So disabling cd access time shouldn't be a problem here.

So most of the games you listed here work fine.

The games that clearly don't work are:
Chuck Rock (USA)
Wolf Child (USA)

From what I've seen @ekeeke doesn't have the time/will to work on this core, and he's also been struggling to get his github account back.

Too bad, because genesis plus gx is a very good core.

@sonninnos
Copy link

I did some investigating and noticed that doing this simple partial revert fixed most hangs with access time enabled:

diff --git a/core/cd_hw/cdd.c b/core/cd_hw/cdd.c
index 73ead1a1..07987348 100644
--- a/core/cd_hw/cdd.c
+++ b/core/cd_hw/cdd.c
@@ -1960,7 +1960,7 @@ void cdd_update(void)
   }

   /* check if seeking is pending */
-  if (cdd.pending)
+  if (scd.regs[0x38>>1].byte.h == CD_SEEK)
   {
     /* reset track index */
     int index = 0;

Chuck Rock at least still hangs though, so please do more testing if you can.

@KamiLordus
Copy link
Author

Almost all of my Sega CD games are for the US region and apart from the two mentioned above I haven't been able to find anything else.
Although many games require disabling cd access time.
Unfortunately I don't know how it is for games for regius Europe and Japan. I'll try to test pal games soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants