libretro / scummvm

ScummVM main repository
https://www.scummvm.org
GNU General Public License v3.0
5 stars 6 forks source link

[WiiU] Issues Loading Games From Either Load Content or From the Scummvm UI #7

Closed Ploggy closed 1 year ago

Ploggy commented 1 year ago

Hi I've been testing this new Scummvm on WiiU to see if it has fixes the seg fault issue we we're having with the old Core. The earlier Scummvm had issues on WiiU whenever I tried to choose a Directory from within the Scummvm UI, it would crash the Core with a segfault error (there was an issue made awhile back but it looks like the issues haven't carried over from the older Scummvm Core.) The good news is the segfault error when I try to choose a directory is fixed! :^)

But now I can no longer get a game (in this case Kings Quest 7) to load. If I try to load the game from Load Content, by loading a KQ7.scummvm file directly it will seg fault. same if I try to load the games exe. 20230108_230901 If I try to add the game from within the Scummvm UI I can get as far as selecting the games directory but when I choose the directory it will show a big list of possible games to chose from 20230108_232219 but if I select King's Quest VII: The Princeless Bride (Windows/English) - Unknown Variant it will say it seems to be an unknown variant and wont allow me to add the game. 20230108_232511 Doing the same process on the PC version of the Core will only show only the Kings Quest 7 game in the list and wont have the unknown variant tag and will add the game correctly..

Also I've tried adding the Hi-Res Adventure 1 - Mystery House game from the Content Downloader, but when I try to add that game it says "ScummVM could not find any game in the specified directory!" again this works fine on the PC version of the Core.

Thank You.

EDIT: I've even gone as far as copying over the Scumvm.ini from the PC to the WiiU (first editing the game path to match the games location on my sd card) so the game is pre-added to the ScummVM UI, but loading the game then says "Error running game: Game data not found" :P

spleen1981 commented 1 year ago
Ploggy commented 1 year ago

Yes, I've now tried loading King's Quest 7 and Hi Res Adventure - Mystery House to load through Retroarch's Load Content and they will segfault if loading the games exe directly. I have managed to get Secret of Monkey Island to boot through the Monkey.scummvm file but when it does boot it says: 20230109_134216 If left on that screen for a couple minutes then it will segfault: 20230109_134727

I have also managed to get Secret of Monkey Island to add through the ScummVM UI, but loading the game through the UI will show the same screen as above: 20230109_134216 I get the feeling the WiiU Core is being far more picky of which game to boot than the PC Core.

KQ7, Looks like the hash of my version of the game doesn't match any listed on the ref page :/ Still strange how it is able to be added fine on PC Core ScummVM?

So far I haven't got any games to load. but again all the games I've used to test add and work fine on the PC Core.

spleen1981 commented 1 year ago

Just to be sure you may check with current master. Did you check manually the MD5 of the files above (those actually stored in the console)? Are the same prompted by ScummVM? If unknown MD5 is confirmed, those could have been corrupted somehow, and it should not work even on windows version (which I assume to be v2.6.1 as well). Also you may try with one of the freeware games from scummvm website to check if the core works.

Ploggy commented 1 year ago

I've tested with the latest master but the issues are the same.

Strange, looks like the md5 hashes are different? ScummVM UI sees them as: 20230111_191439 Where as if I manually check md5 they show as: Resource.000 - acfbbf1d69d1d859c3c5072e03e30f3d Resource.map - e73c01ca97deadc2ecb85e3e43c20477 None of the md5 hashes above match with any on the ref page: https://github.com/scummvm/scummvm/blob/4bf45d922baaf68552c9936491d34361ffb467f2/engines/sci/detection_tables.h#L2283 I haven't found any version of the game that matches any of those ref md5.

I have tested adding this exact same game on the newest PC version v2.6.1 too and it adds and starts perfectly.

I have tried one of the freeware games from the link you provided on the WiiU v2.6.1 Beneath the Steel Sky - Adds fine but when I boot the game: 20230111_193533 Works on PC v2.6.1

ner00 commented 1 year ago

Where as if I manually check md5 they show as: Resource.000 - acfbbf1d69d1d859c3c5072e03e30f3d Resource.map - e73c01ca97deadc2ecb85e3e43c20477 None of the md5 hashes above match with any on the ref page:

Are you calculating the MD5 hashes based on the first 5000 bytes or less? ScummVM uses this approach for performance reasons. More here: https://wiki.scummvm.org/index.php/Reporting_unknown_MD5_checksums

Ploggy commented 1 year ago

No I've been calculating the md5 of the entire file using this site: https://emn178.github.io/online-tools/md5_checksum.html

Ploggy commented 1 year ago

OK looks like one of my games does indeed match with one on the ref list.

2be9ab94429c721af8e05c507e048a15 C:\Users\Susan\Desktop\md5deep-4.4\RESOURCE.MAP offset 0-4999 Matches: // King's Quest 7 - English Windows (from the King's Quest Collection) // Executable scanning reports "2.100.002", VERSION file reports "1.4" {"kq7", "", { {"resource.map", 0, "2be9ab94429c721af8e05c507e048a15", 18697}, {"resource.000", 0, "eb63ea3a2c2469dc2d777d351c626404", 203882535}, AD_LISTEND}, Common::EN_ANY, Common::kPlatformWindows, ADGF_NO_FLAGS, GUIO_KQ7 }, Excellent :) but it doesn't explain why the game is recognised perfectly on PC but not on WiiU?

spleen1981 commented 1 year ago

The two screenshots above for KQ7 are done with different sets? MD5 and sizes are different.

Ploggy commented 1 year ago

Yes, I was on a quest to find a version of the game that would add through the ScummVM UI or match the ref page.. Now I have the King's Quest Collection version, that's the version that matches with the ref page. :)

spleen1981 commented 1 year ago

So the hash calculated by the core it's confirmed to be different by the one calculated manually? Or the game matching the database is added correctly?

Ploggy commented 1 year ago

Yes, the Core ScummvM UI md5 shown on WiiU is different from the hash from the reference page (which its confirmed to be the King's Quest Collection edition) or if I check manually using md5deep.exe suggested by the link that ner00 posted.

So the Version of the game I have now is a confirmed known working version from the ref page, just not recognised by WiiU ScummVM.

spleen1981 commented 1 year ago

can you check the MD5 issue with the latest master?

Ploggy commented 1 year ago

Hi, Its still showing the same unknown variant error as before. 20230111_191439

spleen1981 commented 1 year ago

and same crash launching Beneath a Steel Sky? Just to be sure, did you clone at this commit https://github.com/libretro/scummvm/commit/7bf21109c2f2fa60e6b46181860c528378d5206d?

Ploggy commented 1 year ago

Yes same crash as before with Beneath the Steel Sky. 20230111_193533 Yes, The "makefile: add SCUMM_BIG_ENDIAN to wiiu" commit.

spleen1981 commented 1 year ago

Was the legacy core working with any game on wiiu?

Ploggy commented 1 year ago

The old Core used to load games from a .scummvm file.. but whenever I tried to add a game from the ScummVM UI it used to segfault when we selected "Choose" directory.. I could never get Kings Quest 7 to boot even with the old Core.

spleen1981 commented 1 year ago

So Beneath the Steel Sky, just to have a reference, was running on the old core? Or any other specific game? I'm asking to understand if there is a regression with new core (that would be easier to investigate) or if it never worked. Basically to understand if we have a regression we should do the same actions (successfully) on the old core and (unsuccessfully) on the new one.

Ploggy commented 1 year ago

Beneath the Steel Sky boots fine if loaded with the sky.scummvm file from Load Content Loading the sky.dsk file from Load Content it will blackscreen.

and since Beneath the Steel Sky was already added in the latest version, loading the game from the older Core boots fine too :p I would say there's a regression. :)

spleen1981 commented 1 year ago

Beneath the Steel Sky boots fine if loaded with the sky.scummvm file from Load Content Loading the sky.dsk file from Load Content it will blackscreen.

this happens with current master?

Ploggy commented 1 year ago

No, sorry I should have specified, that's what happens with the old Core.

spleen1981 commented 1 year ago

I've added new fixes in the wiiu branch, can you test it?

Ploggy commented 1 year ago

Sure I'll test but I can't build the Core myself, I've been grabbing the artifact from the gitlab page, I can usually grab it an hour or 2 after you make a commit to master.

Ploggy commented 1 year ago

oops I mean main, you need to commit it to the main branch before it can appear on the gitlab page :)

EDIT: scratch that it just showed up on gitlab ;) testing now :)

Ploggy commented 1 year ago

Awesome! Both Beneath the Steel Sky and Secrets of Monkey Island both boot fine from their .scummvm files. YAY! Kings Quest 7 does boot from it's .scummvm file too but it seems to freeze on a black screen for a min then continues to boot the game, then shows an error: "Fluidsynth requires a 'soundfont' setting. Please specify it in the ScummVM GUI MIDI tab. Music is off" I think it's just a matter of messing with the settings tho :) it also now add's just fine through the ScummVM UI too. So GOOD! I'm going to mess with it some more and see if i can get it to continue to in game. Thank you soo much for this. The Core now is better than the old core for sure!

I'll msg back here if all goes well.. or not :P

ThankYou!

spleen1981 commented 1 year ago

"Fluidsynth requires a 'soundfont' setting. Please specify it in the ScummVM GUI MIDI tab. Music is off"

You need to select this file in the gui settings as soundfont.

Ploggy commented 1 year ago

OK I set up soundfont and set the audio to fluidsynth, the game does boot now (still takes over 60 secs to boot) but it does eventually get to the KQ7's menu, but when I try to enter my name I get a segfault: 20230113_003443 The game does run a little slow though and audio is stuttering abit.. I never got the King's Quest 7 in game before so I don't know if it's a limitation of the WiiU of a problem with the Core :P

The WiiU should run the game ok right? I'll try setting the Speed Hack option in the Core's Options and see if it makes a difference :)

Ploggy commented 1 year ago

I set the audio from fluidsynth back to default to see if it stops the crash but it still segfaults the same as before, the speed hack setting did seem to help some but its still below fullspeed.

EDIT: Actually timed it, it takes 1min 40sec to boot KQ7 :D If I use FF the game is very close to fullspeed. funny how it doesn't just run that fast anyway.

Ploggy commented 1 year ago

Good news! I got a different version of King's Quest 7 and it now gets in game :) (to actual gameplay) I've enabled Retroarch's FPS counter, I'm getting 44.96FPS its not great but it is playable since its a point + click game :) the only downer is the skipping audio, does Scummvm have a frame skip option? or some other way of increasing speed other than the Speed hack option in the Core options?

Ploggy commented 1 year ago

A video showing performance of KQ7 on WiiU. https://streamable.com/gw28xi

spleen1981 commented 1 year ago

can you check if latest commit in wiiu branch improves the performance?

Ploggy commented 1 year ago

Sure thing, as soon as the artifact gets made I'll test it :)

Ploggy commented 1 year ago

No, performance is the same as the last build. I've tried changing audio/graphic settings in the ScummVM UI but nothing I do seems to effect performance.

spleen1981 commented 1 year ago

Ok I think that's a good result anyways, considering that wiiu is not even supported upstream. Can you test again last commit in wiiu branch before merging to main, I did some code cleaning.

does Scummvm have a frame skip option

Nope

or some other way of increasing speed other than the Speed hack option in the Core options?

You may try enabling the "Threaded Video" option in retroarch video settings.

Ploggy commented 1 year ago

OK, everything seems the same as before. Even if this is as fast as it gets, the fact that Kings Quest 7 is working at all is a big bonus for me :) So thank you for that.. I've been hoping to get this on WiiU since the WiiU RA port happened, I've tried running KQ7 on the Dosbox/Pure Core but it runs even slower on that lol due to lack of Dynarec.

WiiU doesn't have a Threaded Video option in Retroarch.

Everything looks good here if you want to merge, and thanks again for looking at this, the Cores in a much better state than it ever was :)

LibretroAdmin commented 1 year ago

Hi @MrHuu or someone else who is involved with teh 3DS RetroArch Port,

could you guys try the latest ScummVM core for 3DS on the buildbot and tell us how it compares to the old one? It's based on this latest rebased version by @spleen1981 and we are eager to learn if things have not regressed on the low end side of the platform spectrum. Thanks!

spleen1981 commented 1 year ago

Hi @MrHuu or someone else who is involved with teh 3DS RetroArch Port,

could you guys try the latest ScummVM core for 3DS on the buildbot and tell us how it compares to the old one? It's based on this latest rebased version by @spleen1981 and we are eager to learn if things have not regressed on the low end side of the platform spectrum. Thanks!

ok, closing this in the meanwhile as completed

Ploggy commented 1 year ago

Hi :) update in the KQ7 speed issue. Kings Quest 7 now runs fine, no stuttering audio at all! :) The game still takes a while to boot initially but once it starts the gameplay/audio feels fine :) Thank You very much!!