Project

General

Profile

Actions

Emulator Issues #9743

closed

Memory checks - write, breaks at unrelated places occasionally

Added by aldelaro5 over 8 years ago. Updated over 8 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:
5.0-588

Description

Game Name?
Super Paper Mario, I doubt the game matters, but for the sake of reproducing the issue, I should probably mention it :)

Game ID? (right click the game in the game list, properties, info tab)

R8PE01 revision 0 (there's a revision 2 which has a different memory addresses)

MD5 Hash? (right click the game in the game list, properties, info tab, MD5 Hash: Compute)

ba74fb5b6b820b6feb771786180e4c65

What's the problem? Describe what went wrong.

Basically, a write and break memory check breaks when it should be, but also at completely unrelated places which is quite confusing. Normally, the game should break only if the desired memory get written to, but I got it to break in 2 instances where it wasn't even writting to memory and not even reading from that memory. These 2 cases are described below. It should be noted that actuall writes on the memory will cause a break as expected, the problem comes from additional breaks where nothign happened.

What steps will reproduce the problem?
This requries a debugfast configuration to use the memory checks.

1: Before booting the game, add a memory check using the mc button; for both "Start" and "End", put the value 8056D13C (this is the RNG seed address which I thoroughly tested beforehand to confirm it is indeed the RNG seed, more info here: http://tasvideos.org/GameResources/Wii/SuperPaperMario.html#Rng ). Finally, check "write" and "break", you may check "log" if you want, but don't check "read" as this issue doesn't seem to affect read as far as I know.
2: Start the game, you should see the wiimote safety screen, the game shouldn't break on that screen (it might break very soon on startup, but not after you resumed from that).
3: Pass the wiimote safety screen using the 1 and 2 button, the game should break at the end of the fade out (this is because the game is loading texts which as explained in the hyperlink above, causes the RNG to move forward a bunch of times which effectively does writes to the address). The instruction that updates the value should be stw r6, -0x7DE4 (r13) and the game should break on this one as expected.
4: Hit play, now it should break while doing lfs f0, -0x35C4 (rtoc) which doesn't even write memory, it loads some into a floating point register and not even the source is related to the RNG seed address.
5: Hit play twice, it now should break at rlwinm r24, r3, 0, 24, 31 (000000ff) which is even less related since again, it writes from register to another register, both completely unrelated to the address.

Which versions of Dolphin did you test on? Does using an older version of Dolphin solve your issue? If yes, which versions of Dolphin used to work?

I tested on the latest github master branch (5.0-385), but I applied the pr #4078 since this PR is a current workaround of an issue where memory checks on write are completely ignored. This is of course built from source to have memory checks working.

I also tested on a Windows 10 VM (it had OpenGL 3.3 support so it was enough) with dolphin 3.0-865 and not only I got the same problem, but it actually didn't break at stw r6, -0x7DE4 (r13) which means apparently, write memory checks got better???

What are your PC specifications? (CPU, GPU, Operating System, more)

Not talking about my VM here, but my actually PC.

OS: Arch Linux x64
CPU: Intel Core i5 4690
GPU: NVIDIA GeForce GTX 950 (using proprietary drivers version 367.35)
RAM: 8GB

Is there any other relevant information? (e.g. logs, screenshots,
configuration files)

I am aware of this issue https://bugs.dolphin-emu.org/issues/7811 but as this got a workaroudn with pr #4078 and the fact that none of what I experienced seemed to be mentioned therem I decided to open a new issue, if I was doing it in the wrong place, I am sorry.

It should also be noted that I might be wrong to post this because I am new to learning PowerPC assembler so if I am wrong, please bear with me :)

Actions #1

Updated by JosJuice over 8 years ago

  • Status changed from New to Fix pending
Actions #2

Updated by JosJuice over 8 years ago

  • Status changed from Fix pending to Fixed
  • Fixed in set to 5.0-588
Actions

Also available in: Atom PDF