libretro / picodrive

Fast MegaDrive/MegaCD/32X emulator
Other
38 stars 60 forks source link

[Wii] Unresponsive Controls / 32X crashes #149

Closed Cee123 closed 3 years ago

Cee123 commented 3 years ago

The controls do not respond at all using this core on the Wii. Needs a fix.

Related to issue: libretro/RetroArch#11217

irixxxx commented 3 years ago

could you please try the controls with the wii image in #150?

Cee123 commented 3 years ago

could you please try the controls with the wii image in #150?

Ok nice, will try that and see if it works.

Cee123 commented 3 years ago

could you please try the controls with the wii image in #150?

I'm a bit confused. Do you mean try the retroarch.dol mentioned in that thread to get the log file?

irixxxx commented 3 years ago

yes... the logging doesn't matter. It's from my own repo and has bitmask support. I'm interested if controls work with this.

Cee123 commented 3 years ago

yes... the logging doesn't matter. It's from my own repo and has bitmask support. I'm interested if controls work with this.

Alright cool, I'll try that. I'll let you know if it works.

Cee123 commented 3 years ago

yes... the logging doesn't matter. It's from my own repo and has bitmask support. I'm interested if controls work with this.

Alright well it tried that version and it does work! The controls do work now! That's fantastic. They appear to be fixed.

irixxxx commented 3 years ago

super. fix will be imported by the next merge from my repo.

Cee123 commented 3 years ago

super. fix will be imported by the next merge from my repo.

Great work! Thank you so much, appreciate that. All working good now.

irixxxx commented 3 years ago

Could you check if this is still crashing for 32x? (I have replaced the file because it was damaged) retroarch_wii.dol.gz

Cee123 commented 3 years ago

Could you check if this is still crashing for 32x? (I have replaced the file because it was damaged) retroarch_wii.dol.gz

Thanks, I'll check it now.

Cee123 commented 3 years ago

Could you check if this is still crashing for 32x? (I have replaced the file because it was damaged) retroarch_wii.dol.gz

Seems to be the same. Strange.

GetAttachmentThumbnail

irixxxx commented 3 years ago

could you send me the log, please?

Cee123 commented 3 years ago

could you send me the log, please?

There was nothing in the log folder. For some reason it didn't generate a log file. I'll turn on that feature and try and get it to generate one.

Cee123 commented 3 years ago

Ok here it is retroarch2021_04_1917_02_27.log retroarch2021_04_1917_02_45.log

irixxxx commented 3 years ago

Thanks, that did indeed help. Would you please try this? retroarch_wii.dol.gz

Cee123 commented 3 years ago

I've tested a few games and have the logs for them. I'm going through them. Some freeze and some make it to the Sega logo and then crash.

Cee123 commented 3 years ago

Thanks, that did indeed help. Would you please try this? retroarch_wii.dol.gz

Alright cool will try that. Thanks.

Cee123 commented 3 years ago

Doesn't crash now, now it just freezes. Here's the log file for that game. retroarch2021_04_1918_23_21.log

Cee123 commented 3 years ago

Don't know if these would help too. Might help narrow it down (or not)

After Burner Complete retroarch2021_04_1917_52_56.log

Amazing Spider-man retroarch2021_04_1917_54_19.log

BC Racers retroarch2021_04_1917_55_36.log

Blackthorne retroarch2021_04_1918_00_04.log

Cyber Brawl - Cosmic Carnage retroarch2021_04_1918_04_07.log

Darxide retroarch2021_04_1918_06_22.log

Doom retroarch2021_04_1918_08_26.log

Ecco the Dolphin (makes it to the Sega logo) retroarch2021_04_1918_09_37.log

FIFA Soccer '96 retroarch2021_04_1918_13_16.log

Golf Magazine 36 Great Holes retroarch2021_04_1918_14_47.log

Kolibri retroarch2021_04_1918_16_09.log

Cee123 commented 3 years ago

It's not crash dumping with that version. Just freezing upon launch.

irixxxx commented 3 years ago

I've enabled some more debug output: retroarch_wii.dol.gz Please try this at lest with doom, blackthorne and 36 holes and post the logs.

Cee123 commented 3 years ago

I've enabled some more debug output: retroarch_wii.dol.gz Please try this at lest with doom, blackthorne and 36 holes and post the logs.

Ah thanks, I'll try that.

Cee123 commented 3 years ago

I've enabled some more debug output: retroarch_wii.dol.gz Please try this at lest with doom, blackthorne and 36 holes and post the logs.

Golf Magazine 36 Great Holes Starring Fred Couples (Japan, USA).log Blackthorne (USA).log Doom (Japan, USA).log

Cee123 commented 3 years ago

Here's the rest of them. Just in case some of the others are experiencing other unexplained or unrelated bugs. After Burner Complete ~ After Burner (Japan, USA).log Amazing Spider-Man, The - Web of Fire (USA).log BC Racers (USA).log Brutal Unleashed - Above the Claw (USA).log Chaotix ~ Knuckles' Chaotix (Japan, USA).log Cyber Brawl ~ Cosmic Carnage (Japan, USA).log Darxide (Europe) (En,Fr,De,Es).log ECCO the Dolphin CinePak Demo (Japan, USA) (Developer Cart).log FIFA Soccer '96 (Europe) (En,Fr,De,Es,It,Sv).log Kolibri (USA, Europe).log Metal Head (Japan, USA).log Mortal Kombat II (Japan, USA).log Motocross Championship (USA).log NBA Jam - Tournament Edition (World).log NFL Quarterback Club (World).log Parasquad ~ Zaxxon's Motherbase 2000 (Japan, USA).log Pitfall - The Mayan Adventure (USA).log Primal Rage (USA, Europe).log RBI Baseball '95 (USA).log Sangokushi IV (Japan).log Shadow Squadron ~ Stellar Assault (USA, Europe).log Soulstar X (USA) (Proto).log Space Harrier (Japan, USA).log Star Trek Starfleet Academy - Starship Bridge Simulator (USA).log Star Wars Arcade (USA).log Stellar Assault (Japan).log Tempo (Japan, USA).log T-Mek (USA, Europe).log Toughman Contest (USA, Europe).log Virtua Fighter (Japan, USA).log Virtua Hamster (USA) (Proto).log Virtua Racing Deluxe (USA).log World Series Baseball Starring Deion Sanders (USA).log WWF Raw (World).log WWF WrestleMania - The Arcade Game (USA).log X-Men (USA) (Proto).log

irixxxx commented 3 years ago

uuhh the logs are too short... I'll make you a version with "optimized" output.

irixxxx commented 3 years ago

Here's a version with more compact logging: retroarch_wii.dol.gz You do not need to do the full monty. Just do it with the 3 from my list and a few more if you like. BTW thank you for being so persistent with testing!

Cee123 commented 3 years ago

uuhh the logs are too short... I'll make you a version with "optimized" output.

Ah right, yeah they probably would've been longer if I left it longer. It would freeze up so I didn't think it was doing anything, so I had to hard reset the system.

Cee123 commented 3 years ago

Here's a version with more compact logging: retroarch_wii.dol.gz You do not need to do the full monty. Just do it with the 3 from my list and a few more if you like. BTW thank you for being so persistent with testing!

Thanks for that. I'll try with just those couple of games. Looks like it's doing the same thing with all of them anyway. No worries, glad I could help!

Cee123 commented 3 years ago

How long should I leave it generating the log files? Seems like it's just frozen and goes on forever... Until I hard reset. These are probably going to be too short as well. If they are just let me know, and I'll leave it to generate for much longer. Blackthorne (USA).log Doom (Japan, USA).log Golf Magazine 36 Great Holes Starring Fred Couples (Japan, USA).log

Cee123 commented 3 years ago

This is for Blackthorne. I left it generating for about an hour before I hard reset it. retroarch2021_04_2020_51_41.log

Cee123 commented 3 years ago

Doom. Been generating for about an hour before I hard reset. retroarch2021_04_2021_48_54.log

Cee123 commented 3 years ago

Golf Magazine 36 Great Holes. Stopped at a hard reset after about an hour. retroarch2021_04_2022_43_43.log

irixxxx commented 3 years ago

super, thank you.

irixxxx commented 3 years ago

Hmm, the simulated mmap returns dirty memory, which might confuse the drc. Here's one to check this: retroarch_wii.dol.gz From what I see that long a runtime isn't really necessary. Some minutes with one of the games should be enough for checking.

Cee123 commented 3 years ago

super, thank you.

No worries, glad to help. Thank you for helping.

Cee123 commented 3 years ago

Hmm, the simulated mmap returns dirty memory, which might confuse the drc. Here's one to check this: retroarch_wii.dol.gz From what I see that long a runtime isn't really necessary. Some minutes with one of the games should be enough for checking.

Alright will check that one out to confirm.

Cee123 commented 3 years ago

Here's the log file for Doom with the latest dol provided retroarch2021_04_2110_51_51.log

irixxxx commented 3 years ago

Hmm, this looks more and more like someone is overwriting memory. Here's some checking to try to verify this: retroarch_wii.dol.gz

Cee123 commented 3 years ago

Hmm, this looks more and more like someone is overwriting memory. Here's some checking to try to verify this: retroarch_wii.dol.gz

That's strange, not sure why that would be or what is happening there. But anyways, here are the logs from the latest .dol you provided.

Blackthorne: retroarch2021_04_2118_45_23.log Doom: retroarch2021_04_2118_52_22.log

irixxxx commented 3 years ago

yes, either the memory is overwritten, the pointer is invalid, or the index is off. I doubt the latter 2 though - it works fine on every other platform.

Cee123 commented 3 years ago

yes, either the memory is overwritten, the pointer is invalid, or the index is off. I doubt the latter 2 though - it works fine on every other platform.

What could cause that to happen? Really strange. If that's the case then I've got no idea.

irixxxx commented 3 years ago

ATM no idea. I wouldn't suspect the emulation core code. That runs fine on a plethora of other hosts, including 32 bit PPC big endian (G4 Mac) and 64 bit PPC little endian (qemu). Besides, I regularly check for this by running ASAN on x86-64. I might be either the platform adaption inside the core, or maybe a bug in retroarch, or something in newlib or the underlying OS. Lots of possibilities :-(

Cee123 commented 3 years ago

ATM no idea. I wouldn't suspect the emulation core code. That runs fine on a plethora of other hosts, including 32 bit PPC big endian (G4 Mac) and 64 bit PPC little endian (qemu). Besides, I regularly check for this by running ASAN on x86-64. I might be either the platform adaption inside the core, or maybe a bug in retroarch, or something in newlib or the underlying OS. Lots of possibilities :-(

That's interesting. That's what I was thinking too, seems to work fine on other platforms such as 3DS, linux, android etc. Damn sounds like a lot of possibilities. Could be anything. Doesnt really narrow it down. :/

Edu789 commented 3 years ago

ATM no idea. I wouldn't suspect the emulation core code. That runs fine on a plethora of other hosts, including 32 bit PPC big endian (G4 Mac) and 64 bit PPC little endian (qemu). Besides, I regularly check for this by running ASAN on x86-64. I might be either the platform adaption inside the core, or maybe a bug in retroarch, or something in newlib or the underlying OS. Lots of possibilities :-(

That's interesting. That's what I was thinking too, seems to work fine on other platforms such as 3DS, linux, android etc. Damn sounds like a lot of possibilities. Could be anything. Doesnt really narrow it down. :/

is Sega Cd working now at least?

Edu789 commented 3 years ago

ATM no idea. I wouldn't suspect the emulation core code. That runs fine on a plethora of other hosts, including 32 bit PPC big endian (G4 Mac) and 64 bit PPC little endian (qemu). Besides, I regularly check for this by running ASAN on x86-64. I might be either the platform adaption inside the core, or maybe a bug in retroarch, or something in newlib or the underlying OS. Lots of possibilities :-(

Maybe the problem is not with the Wii Devkit? I recently had some problems fixed in it ... https://github.com/ekeeke/Genesis-Plus-GX/issues/357#issuecomment-812219447

irixxxx commented 3 years ago

I've put in zeroing of 32x memories on startup. Could you please do another check? retroarch_wii.dol.gz

I don't know if MCD is working on Wii or Wii U. All I can tell you is it works fine on a G4 running OSX and on qemu running void linux, both using a 32 bit powerpc processor in big endian mode. So, to my best knowledge it should work.

Cee123 commented 3 years ago

ATM no idea. I wouldn't suspect the emulation core code. That runs fine on a plethora of other hosts, including 32 bit PPC big endian (G4 Mac) and 64 bit PPC little endian (qemu). Besides, I regularly check for this by running ASAN on x86-64. I might be either the platform adaption inside the core, or maybe a bug in retroarch, or something in newlib or the underlying OS. Lots of possibilities :-(

That's interesting. That's what I was thinking too, seems to work fine on other platforms such as 3DS, linux, android etc. Damn sounds like a lot of possibilities. Could be anything. Doesnt really narrow it down. :/

is Sega Cd working now at least?

I just tried Sega CD with Picodrive and it crash dumps on Wii as well. But I tried to run them as chd files. They do work with Genesis Plus.

The log for After Burner Complete and Sonic CD retroarch2021_04_2121_16_02.log retroarch2021_04_2122_51_12.log

Cee123 commented 3 years ago

I've put in zeroing of 32x memories on startup. Could you please do another check? retroarch_wii.dol.gz

I don't know if MCD is working on Wii or Wii U. All I can tell you is it works fine on a G4 running OSX and on qemu running void linux, both using a 32 bit powerpc processor in big endian mode. So, to my best knowledge it should work.

Thanks, I'll try that now.

Cee123 commented 3 years ago

Latest log for Doom. retroarch2021_04_2123_00_37.log

Looks like it's doing things a bit differently according to the log. But still frozen with no output.

irixxxx commented 3 years ago

How long did that run?