Emulator Issues #12797
openNAND Pagefile is broken/unsupported on Wii64/Not64 (Invalid Write, Invalid Read)
0%
Description
Game Name? Nintendo 64 Emulator for Wii (Wii64/Not64)
To name a few: Smash Remix, Goldeneye X, Perfect Dark, Mario Party 1, 2 & 3, Pokémon Stadium 1 & 2
What's the problem?
Any game that exceeds 16MB in ROM size will require Wii64/Not64 to use the nand pagefile to partially load the ROM into MEM2, this is because MEM2 can only handle ROM sizes that are equal or less than 16MB. On console, the nand pagefile works as expected, but unfortunately it seems that Dolphin does not support nand paging or it's broken for some reason. As a result, trying to load any game higher than 16MB will simply trigger invalid writes and reads into MEM2, thus crashing the emulator with a silent black screen.
Steps to reproduce the problem:
On Dolphin 5.x (latest), run either Wii64 1.3 2021-12-22 or Not64 2013-02-02 or any other newer version, assuming you already have setup and configured a virtual SD Card in order to store the ROMs (any size should work but 2GB is recommended for most homebrew apps), load ANY game higher than 16MB in ROM size, this will trigger the NAND page growth, then the game is partially loaded into MEM2, after the load is finished, select "Play Game".
Is the issue present in the latest development version? Yes. Versions tested:
[Dolphin 5.0.15445 (Arch Linux), dolphin-master-5.0-15377-x64 (Windows 10)]
Is the issue present in the latest stable version? [Yes]
What are your PC specifications? (CPU, GPU, Operating System, more)
[PC specs here]
CPU: Intel Core i5-4590
GPU: Intel HD Graphics 4600
RAM: 12GB DDR3 @ 1600Mhz
OS: Windows 10 / Arch Linux both x64
configuration files, savefiles, savestates)
I don't think I can upload my 2GB Virtual SD card but if you need it I could try uploading to let others test with it.
Once it starts partially loading ROM into MEM2 a lot of these warnings will pop up on the log:
Common/MsgHandler.cpp:112 E[MASTER]: Warning: Invalid write to 0x7fffb2b4, PC = 0x800ea860
Then after "Play Game" is selected, it start showing up invalid reads:
Common/MsgHandler.cpp:112 E[MASTER]: Warning: Invalid read from 0x00000258, PC = 0x800833d4
[Anything else here]
On real hardware this isn't an issue.
Files
Updated by JMC4789 almost 3 years ago
This was working a while ago, please try the latest development build as I believe we addressed this once.
Updated by leodexe almost 3 years ago
- File invalidread-15874.png invalidread-15874.png added
- File invalidwrite-15874.png invalidwrite-15874.png added
JMC4789 wrote:
This was working a while ago, please try the latest development build as I believe we addressed this once.
Tested latest development build #15874
Still having the same issue.
Updated by JMC4789 almost 3 years ago
Can you try using interpreter? This seems similar to https://dolphin-emu.org/blog/2018/09/01/dolphin-progress-report-august-2018/#50-8576-jit64-fix-pc-location-on-fallback-to-interpreter-by-delroth
Updated by JMC4789 almost 3 years ago
Can you make sure MMU is enabled in Options -> Configuration -> Advanced
Updated by leodexe almost 3 years ago
- File interpreter-15874.png interpreter-15874.png added
- File wii64-15874-interpreter.png wii64-15874-interpreter.png added
JMC4789 wrote:
Can you try using interpreter? This seems similar to https://dolphin-emu.org/blog/2018/09/01/dolphin-progress-report-august-2018/#50-8576-jit64-fix-pc-location-on-fallback-to-interpreter-by-delroth
Yeah setting the core to interpreter seems to work out, at an unplayable framerate.
JMC4789 wrote:
Can you make sure MMU is enabled in Options -> Configuration -> Advanced
It wasn't. But with this config only Not64 (injected through a wad) seems to boots properly in the fist place.
Wii64 seems to get stuck with these two last messages in the log:
12:55:715 Core\HW\ProcessorInterface.cpp:114 W[PI]: Fifo reset (00000001)
12:55:715 Core\HW\ProcessorInterface.cpp:114 W[PI]: Fifo reset (00000000)
Updated by JMC4789 almost 3 years ago
If interpreter works and the JIT doesn't, the build I linked should work for you. Then you just have to bisect to find out what build broke it, and we can fix it in the latest development builds.
Updated by JosJuice almost 3 years ago
- Tracker changed from Issue to Emulator Issues
- Project changed from Infrastructure to Emulator
- Issue type set to Bug
- Regression set to No
- Relates to usability set to No
- Relates to performance set to No
- Easy set to No
- Relates to maintainability set to No
- Operating system N/A added
Updated by AdmiralCurtiss almost 3 years ago
I tried this just now and... as far as I can tell this works?
We need some more detailed instructions on what you're doing, I think.
Updated by leodexe almost 3 years ago
Pikachu025 wrote:
I tried this just now and... as far as I can tell this works?
We need some more detailed instructions on what you're doing, I think.
I can tell you're using OHBC to run Not64, while I inject it to run into a wad so it doesn't crash. If this same bug happen with Wii64, that should explain why pagefile seems broken.
I'll run some tests later with OHBC > Wii64/Not64 and report back results later.
Updated by leodexe almost 3 years ago
JMC4789 wrote:
If interpreter works and the JIT doesn't, the build I linked should work for you. Then you just have to bisect to find out what build broke it, and we can fix it in the latest development builds.
It does work, with the workaround you provided in the link. Not64 nand paging works properly. It must be noted that this specific setup (Load Not64 through OHBC and not other way around) is required so the emulator doesn't break when triggers r/w to sdcard with nand paging.
Wii64 (1.3) nand paging also works when loaded through OHBC, HOWEVER it also causes the menu to permanently appear after starting the game, thus rendering the game unplayable but the emulator itself does not crash, it's just that for some reason the button combo is always pressed so the menu is called in an infinite loop. Do you have any clue why this happens? And then again, when you load Wii64 directly from Dolphin, this does not happen but the nand paging will only work if loaded through OHBC.
Still, this technically resolves what I was looking for. So my original issue is pretty much solved at this point.
Now, if there were some way to play games with Wii64 Rice without slowing down to an unplayable pace of 1FPS...
Updated by leodexe almost 3 years ago
- File mk64-auv2.1-crashed.png mk64-auv2.1-crashed.png added
Hey, it's me again. I was playing Mario Kart 64 Amped Up v2.1 on Not64 (latest) loaded through OHBC, after playing the first two cups, the game froze on Green Greens (1st track of 3rd cup)
This is not supposed to happen as I have played many times this mod on the actual Wii and never experienced a crash on console. Here is the log but idk if contains anything useful.
As this ROM is exactly 16MB and it's within the limits of MEM2 so it's actually fully loaded into it, this problem is unrelated to nand paging.