irixxxx / picodrive

Fast MegaDrive/MegaCD/32X emulator
Other
47 stars 24 forks source link

Level 2 & 4 of Kolibri keep crashing. #87

Closed sgoshaye closed 1 year ago

sgoshaye commented 1 year ago

Hello, I got picodrive for RetroArch on RP3+. On level 2 of Kolibri for 32x, whenever I move my character to certain areas, RetroArch crashes and takes me back to my homepage. There is constant crashing on level 2. I also asked someone else to verify this, and he said he eventually reached a point where the game keeps crashing.

irixxxx commented 1 year ago

What's in the retroarch log file?

sgoshaye commented 1 year ago

What's in the retroarch log file?

I apologize for not providing it before. I am kind of new to this. Here is the log for the crash with frontend logging level at 1 (info) and core logging level at 1 (info): retroarch.log

Here is a log by setting frontend logging level to 0 (debug) and core logging level to 0 (debug).

retroarch2023_05_2511_36_38.log

If you need anything else please let me know.

Also, I am not sure if this is useful, but I found this same issue before the fork: https://github.com/notaz/picodrive/issues/27

irixxxx commented 1 year ago

There's no output from picodrive in the logs. Would you please increase the Core Logging Level in the Logging menu and try again?

sgoshaye commented 1 year ago

There's no output from picodrive in the logs. Would you please increase the Core Logging Level in the Logging menu and try again?

I decided to try this on my Ubuntu 22.04 computer. It still crashes on level 2 of Kolibri. Here is the relevant part of the log. I was able to get the info when I ran "retroarch -v --log-file retroarch.log" in terminal at the file location.

I had the terminal up right when it crashes. The only message I receive is "Segmentation fault (core dumped)".

This is the error I get (bolded) when it crashes:

[INFO] [State]: Loading state "/home/sepehr/snap/retroarch/2005/.config/retroarch/states/Kolibri (USA, Europe).state", 678544 bytes. [INFO] [State]: Saving state "RAM", 678544 bytes. [libretro INFO] 09992:239: ssh2 drc: branch in DS @ 02093396 [libretro INFO] 10237:239: ssh2 drc: branch in DS @ 02092816 Segmentation fault (core dumped)

irixxxx commented 1 year ago

These 2 actually indicate a programming bug in the game itself - it violates the SH-2 manuals which prohibits branches in delay slots. It's most probably not related to the emulator crash.

Is this randomly happening, or is there some scenario where it always crashes? If so, could you provide a save file and instructions to reproduce, please?

sgoshaye commented 1 year ago

These 2 actually indicate a programming bug in the game itself - it violates the SH-2 manuals which prohibits branches in delay slots. It's most probably not related to the emulator crash.

Is this randomly happening, or is there some scenario where it always crashes? If so, could you provide a save file and instructions to reproduce, please?

It uses a password system. The crashing happens randomly, and it tends to occur when you fly around the stage, most typically happening around the upper left of the screen in Stage 2. However, I have had crashes in many other parts:

2) Rescue - BLSCGFDP

A friend who luckily got past the 2nd stage after the endless crashing told me that crashing also occurs even more in the 4th stage. I decided to input a password and check it out, and I got a crash there too almost immediately. Therefore, I will update the title of this thread to say Stage 2 and 4:

4) Infestation - CZWTJFDG

I don't think it's a problem with the game itself because it was somewhat well-received and people would have mentioned the issue. It's by the developers of Ecco the Dolphin. If it came out on the Genesis, it would have been more well-known. Kolibri is one of the main highlights of 32x, especially for fans of Ed Annunziata's creative works.

irixxxx commented 1 year ago

Is this also happening with the recompiler turned off?

sgoshaye commented 1 year ago

Is this also happening with the recompiler turned off?

Yes, it's still happening with Dynamic Recompiler turned off on both Stage 2 & 4. I went ahead and tried it.

It took about 30 seconds to get Stage 2 to crash, but about 1 minute to get Stage 4 to crash.

irixxxx commented 1 year ago

I've tried for some time to reproduce your problem on a 64 bit ARM platform to no avail. Is the Pi3 still using 32 bit?

sgoshaye commented 1 year ago

I've tried for some time to reproduce your problem on a 64 bit ARM platform to no avail. Is the Pi3 still using 32 bit?

I am using a Retroid Pocket 3+, which is known to play below Ps2 well. I am using Retroarch 1.15.0 Stable. I downloaded & installed aarch64.apk awhile back and have beaten several Ps1, SNES, etc. games with no problems. The core version of PicoDrive being used is 1.99. It also crashes a lot of on my Ubuntu 22.04 system. I am also using Retroarch 1.15.0 Stable on Ubuntu, which I installed from the Snap Store. I have not tested on my Windows computer yet.

Are you using a stable or nightly build of RetroArch?

I should have specified this before, sorry about that.

irixxxx commented 1 year ago

I'm not able to reproduce your problem with both of the passwords you provided. What exact version are you using? There should be a git revision behind the 1.99? Could you build a core from the current libretro master, or else try a core built from the current master from here?

sgoshaye commented 1 year ago

I'm not able to reproduce your problem with both of the passwords you provided. What exact version are you using? There should be a git revision behind the 1.99?

How can I check the git revision in Retroarch? In the logs for the Retroid Pocket 3+ it says Git: 1581ece.

irixxxx commented 1 year ago

It is normally displayed if you change from a running game to the menu, somewhere at the bottom. It should look like PicoDrive 1.99-<revision>, with revision being a 7-digit hex number.

sgoshaye commented 1 year ago

It is normally displayed if you change from a running game to the menu, somewhere at the bottom. It should look like PicoDrive 1.99-<revision>, with revision being a 7-digit hex number.

I see : 1.997119167

I think the 7-digit hex number is 7119167.

irixxxx commented 1 year ago

Your code is current, so it could not be that. Could you give a more detailed description of what you are doing before the crash? Does pressing any button lead to this? Or flying into a certain area? Any observation would be helpful as it could help me reproducing it.

irixxxx commented 1 year ago

Ah, I just got the input it's related to the ROM image. The buggy one has this MD5: 6AF6207B1E67072A9104178130C61712 The image I pulled from my own cart has a different sum and works fine. That explains why I couldn't trigger your bug.

I think I know what's going on. Going to try a fix later.

sgoshaye commented 1 year ago

Ah, I just got the input it's related to the ROM image. The buggy one has this MD5: 6AF6207B1E67072A9104178130C61712 The image I pulled from my own cart has a different sum and works fine. That explains why I couldn't trigger your bug.

I think I know what's going on. Going to try a fix later.

Yes, I have the buggy rom with that MD5! I'm glad you've found the issue.

Do you have any email where I can contact you? I would like to ask something.

irixxxx commented 1 year ago

It's in the readme...

irixxxx commented 1 year ago

Fixed with 28165a1

irixxxx commented 1 year ago

After converting my rom file from smd to bin (I'm using a modified super magic drive for pulling images), I have the same checksum as above. So, the roms aren't different. However, smd was treated a bit different in picodrive, leading to the bug being covered.