game-compatibility icon indicating copy to clipboard operation
game-compatibility copied to clipboard

4B4E0840 - MGS 2 AND 3 (Metal Gear Solid HD Collection)

Open cyberkitsune opened this issue 8 years ago • 46 comments

Marketplace

Tested on xenia-project/xenia@7711568af9c992bdef3c42b83bf5a7e3dd98738b

Issues:

Loads game, gets to game selector. Can move between MGS 2 and 3. Can look at game descriptions. Trying to open a game crashes Xenia. Throws this assert a lot on the menu. Not sure if it's a multi xex loading issue or something. If I open MGS2.xex directly instead of default it hangs on a loading screen, throwing up the same assert.

Video:

Video

Log:

Log

Labels:

state-menus

cyberkitsune avatar Aug 30 '15 20:08 cyberkitsune

As far as I can tell the asserts may just be NtReadFile calls that have a null completion routine, but no idea on the crash. Happens in a generated function which is well beyond my debugging skill level.

Also, if I run MGS2.xex or MGS3.xex directly, I get a loading screen but then this:

Xenia Error

cyberkitsune avatar Aug 30 '15 23:08 cyberkitsune

As of the latest build if I load MGS2 or MGS3 and let it load (ignoring the asserts) I get a screen flashing this set of colors. (The konami logo, and other logos play and I get some audio for a little then it cuts out too)

colors

Here's the assert I get: asserts

cyberkitsune avatar Sep 06 '15 02:09 cyberkitsune

I can get into MGS3(running MGS3.xex directly) now (running commit 42abdabf664fe0d1c397486dbe377b40936150d5) Crashes randomly. screenshot 261 screenshot 262 screenshot 265 screenshot 266

), but it runs horribly slow and has many graphical glitches.

The log is way too big(over 200MB) and my internet speed is terribly slow(50KB/s)

hch12907 avatar Nov 26 '15 06:11 hch12907

MGS2 also works now. It's painfully slow tho. https://www.youtube.com/watch?v=krNLBmeb2s0 (MUTE THE SOUND)

Blackbird88 avatar Dec 24 '15 19:12 Blackbird88

Can select games. Choose a game and it goes to a black screen doesn't get past this. Sometimes 'the guest has crashed' error will appear.

Edit: Seems to work much better when started directly from the games xex. Maybe xenia is having trouble switching xexs? (They run on their own xex).

However, MGS2 is painfully slow.

PersonalityPi avatar May 23 '18 22:05 PersonalityPi

I have the same issue. I can't get the game selection menu, but as soon as I launch a game I get a black screen, and sometimes an error message like in the picture. I checked the log but there is nothing I can find that's useful. I can upload it if needed but as I use xenia-project/xenia@bbebfd49 there might be some fixes, improvements or features I am missing from the latest dev.

err

copymystyle666 avatar May 31 '18 21:05 copymystyle666

I retested this with commit xenia-project/xenia@e8621691 but I noticed this at least a week ago: When I boot mgs3.xex, it crashes after the first codec conversation. I skipped the cutscenes and fastforwarded the codec conversation if that is of relevance. If I use an existing save from my Xbox 360 and cut off the first 0xCFFF Bytes, it lists the save files as damaged. With all other games I tried, cutting off the header allows the game to load my save data.

I use an 8700k with a 1060 6gb with Windows 10 64bit and run xenia in DirectX 12/Vulkan mode. I extracted my redump dump of this game with extract-xiso to run it and all hashes matched. xenia_log.zip

LittleStinky123 avatar Aug 15 '19 14:08 LittleStinky123

Hi, I'm having the same issue. I can select a game and view the instruction manual, as others have stated, but the game crashes as soon as I try to open one of the games. My disk image also doesn't seem to have a MGS3.xex or a MGS2.xex - just default.xex.

Kenobium avatar Aug 15 '19 17:08 Kenobium

With the latest canary commit https://github.com/xenia-canary/xenia-canary/commit/53544d76a89f79f70165a253ff122109b4fe545b it doesn't crash after the first codec conversation in MGS3 anymore. It runs at 48 FPS and even slower in more complex areas and has some visual oddities with Snakes hair, the parachute and general effects like when enemies transform into supplies after being killed. The screen flickers a lot as well. MGS3 It saves now and the reason why exported xbox 360 saves didn't work is that xenia creates and reads them separated with a thumbnail, data.bin and master.bin split up to their own files instead all in one file. Interestingly the xbox 360 saves have some form of redundancy in them as they contain data.bin and master.bin twice.

LittleStinky123 avatar Oct 23 '19 12:10 LittleStinky123

@LittleStinky123 You can't make compatibility reports with the Canary version. It's only allowed with Master builds

ZolaKluke avatar Nov 02 '19 02:11 ZolaKluke

@ZolaKluke Ok, with the current https://github.com/xenia-project/xenia/commit/443e6ed72915e1045cb090a1d3795739d07985bd save game loading still doesn't work and it crashes after the codec like I said on the 15th of August. Log of it crashing when loading my xbox 360 save: xenia.log

LittleStinky123 avatar Nov 02 '19 15:11 LittleStinky123

With the most recent build as of 2020 03 16, Metal Gear Solid 3 HD doesn't start, it shows a black screen or crashes like user @copymystyle666 has described.

I'm running it on Ryzen 7 3800x with GTX1070ti.

Pollyvx avatar Mar 15 '20 23:03 Pollyvx

@Pollyvx For now the launching the xex of the MGS game selected in the starting screen from the default.xex doesn't work. If you extract the dump of your game with extract-xiso and select the xex of choice directly, it goes ingame, but is set on a constant 48 FPS for some reason for me with https://github.com/xenia-project/xenia/commit/b1d3fd2ad3c201e287a4641ec143786629da3db7. Interestingly, if you extract your 360 savegame, remove the header, split it up into the files master.bin and data.bin and cut 2 bytes at the end of data.bin, it works with the PS3 version of MGS3 as well, if you happen to own both versions.

LittleStinky123 avatar Mar 17 '20 01:03 LittleStinky123

@LittleStinky123 Can confirm, game works on rpcs3 I'm getting stable 60FPS with noticeable slowdowns in open areas.

Pollyvx avatar Mar 19 '20 01:03 Pollyvx

Tested on https://github.com/xenia-project/xenia/commit/c2e8c5554dcb89099952037571fd9d715f982b6f

Played MGS3 until I retrieved my backpack from the tree and was introduced to Paramedic and the Boss. 40-48FPS.

• Runs at a max of 48FPS. :warning: You must boot MGS3.xex!

mgs (9)

More Screenshots

mgs (1) mgs (2) mgs (3) mgs (4) mgs (5) mgs (6) mgs (7) mgs (8)

xenia.zip

kernel-xex-switching

Etokapa avatar Sep 27 '20 18:09 Etokapa

The game works, you have to launch separately as no xex switching Will try to play thru the whole game, to verify that its playable On my RX580 it runs at 35-40 fps. One thing i noticed that gameplay is bound to the framerate, so nothing below 48-50fps is considered great really

Maybe a sort of a frameskip system for this game?

[Remove if post unnecessary]

Solid-Kris avatar Dec 22 '20 21:12 Solid-Kris

With latest master https://github.com/xenia-project/xenia/commit/9a74df491ffd0189ddd26bc2030e0eae6a775f4e

MGS2.xex gets stuck on fading load screen for ~5 minutes, before eventually displaying intro logos. Logos/splash screen/menu flash in and out at very high speed. Menu seems to be running at a snail pace at 16FPS, but CPU usage is very tiny. Profiler shows ExecuteRaw jumping from 0 to 100+ms. Framerate sometimes jumps up to 100+ FPS after going through the menus, maybe issue with vsync. After menus another long fading load screen shows, which took even longer than the first load screen (~10 minutes). 3D graphics also have the flashing issue (and would also jump up and down from 300FPS+), so sadly unplayable for me atm.


MGS3.xex seems to work pretty fine however, other than some minor 2D flashing similar to MGS2, but only runs at ~38FPS for me at starting area, with game being noticeably sluggish as others mentioned. (profiler shows most of the frametime is taken up by Processor::ExecuteRaw in my case, 25ms or so - would be interesting if the people who reported being locked at 48FPS could check the frametime of this too)

Time scalar options only seem to affect audio, gameplay stays at same speed :(

Most articles talking about these HD ports mention they run at 60FPS on actual 360, so I guess game is coded to assume it's always at 60FPS... But since the original PS2 game ran at 30FPS I wonder if most of the code was un-coupled from the framerate, maybe the 30FPS gameplay could be restored with an XEX patch or something (IIRC the 3DS version of MGS3 was patchable to 60FPS, maybe something similar can be done here)

E: the rest of this post is pretty much outdated now that I found the real culprit that prevented us from running it at 60FPS, see next post for details about that. Leaving my old notes here since they might be of interest to people that can't run 60FPS though:

E: from looking at the games code it seems pretty hardcoded to work at 60FPS... but there are some spots where they correct things for 50FPS though (multiply by 0.83 / 1.2), but will only use those corrections if VdQueryVideoMode returns 50Hz refresh rate. Maybe it'd be a good idea to add an option for that to config, after all it's easier to get 50FPS than 60, and there's probably other games that are hardcoded for 50/60 too.

Below are some ways I found that can help if you can't get 50/60FPS, by speeding up animations & some other game-world things, pretty sure there's still a ton of things hardcoded for 50/60FPS though.


E: Seems 0x84423B7F is a byte that acts as a speed multiplier or something, by default for 60Hz screens the game sets this to 5, and for 50Hz it sets it to 6. I'm guessing if you want to play at 40Hz/fps you should set it to 7, or for 30Hz/fps it should be 8, and hopefully this should let it run at a proper speed.

This number gets reset back to 5 pretty often though, a more permanent solution is editing the function that sets it: at 0x823342C8 it decides what number to use based on refresh-rate (some funcs also call this directly instead of using the stored value)

We can just change that func to always return the number we want instead, by patching 0x823342C8 to

38 60 00 XX 4E 80 00 20

Where XX is the number you want to set it to (you'll probably need to patch the XEX itself or use a xenia-patch file for this, don't think we can edit code with cheat-engine)

(tip: use 'xextool -eu -cu MGS3.xex', open MGS3.xex in hex editor, search for

7D 88 02 A6 91 81 FF F8 94 21 FF A0 48 00 74 9D

and change the first 8 bytes of the search result to the ones above)

BTW I haven't tested this out that much yet, but it seems to change character movement/anim speed at least. There's a ton of other 50Hz checks in the code which this doesn't touch though (the 'DisplayIs50Hz' func is at 0x8233B770), maybe those need to be looked at too.

These offsets are for the EU release btw (media ID 62DC722C, v0.0.0.6)

emoose avatar Jan 31 '21 16:01 emoose

E: the issues mentioned below (except the blurriness) have now been fixed as of https://github.com/xenia-project/xenia/commit/690b0d9197952dd23321dfb1510837da11e0218f - so both MGS2 & 3 should give better performance now!

Label suggestions

state-gameplay / state-playable kernel-xex-switching gpu-shader-errors gpu-drawing-corrupt


Huh, the MGS2 long load time & flashing issues seem to be caused by https://github.com/xenia-project/xenia/blob/9a74df491ffd0189ddd26bc2030e0eae6a775f4e/src/xenia/kernel/xam/apps/xmp_app.cc#L431 - removing that Sleep lets MGS2 start up fine, just like MGS3.

MGS2 is calling that func from the main thread, guess that's what caused those issues, maybe we need to add some check there so it only sleeps when it's a different thread instead.

E: Looks like MGS3 is also doing the same thing too, with the Sleep removed even my ancient 3570K can get 55-60FPS now, without any patches, woot!

Anyway it's a little hard to make out, but here's MGS2 ingame: image

Not really sure what's up with that blurring, the cutscenes all seemed fine. Tried changing a bunch of config options but haven't found any that fix it unfortunately ;_;

emoose avatar Feb 01 '21 00:02 emoose

I have the same issue. I can't get the game selection menu, but as soon as I launch a game I get a black screen, and sometimes an error message like in the picture. I checked the log but there is nothing I can find that's useful. I can upload it if needed but as I use xenia-project/xenia@bbebfd4 there might be some fixes, improvements or features I am missing from the latest dev.

err

I'm having the exact same issue using the newest version of Xenia. Il be able to navigate the menu and then when I launch a game it either gives me a black screen or a crash log and notification.

funkytownyanis avatar Jul 03 '21 08:07 funkytownyanis

@funkytownyanis MGS2, MGS3 & the menu launcher are all separate XEX executables, Xenia will run the launcher XEX but doesn't support reloading into another executable atm. For now you can get around that by running the MGS2/MGS3 XEX directly (if you have ISO/GOD you'll need to extract it)

E: oh as gibbed mentions below you can use launch_module with ISO/GODs, eg. running xenia like xenia.exe --launch_module=MGS2.xex or xenia.exe --launch_module=MGS3.xex should hopefully work.

emoose avatar Jul 03 '21 16:07 emoose

@emoose Don't need to extract. You can set launch_module cvar (General section).

Though I guess you wouldn't know what the filenames were unless you extracted.

gibbed avatar Jul 03 '21 22:07 gibbed

Sin_titulo This is my problem with Metal Gear HD, I get 48 fps, but only 15% CPU usage and 50% GPU usage. Is there any way of making Xenia to use more resources in order to get solid 60 fps? (my setup is RTX 3070, Ryzen 7 5800x and 32Gb Ram at 3600Mhz). Also Game and Xenia in SSD. I think there are some kind of CPU bottleneck, but I am not able to find the root cause. I have tried changing almost any of the settings in the config file, but nothing seems to help. Disabling SMT (Simultaneous Multi Threading) makes CPU usage higher (around 40-50%), but it doesn't improve the performance. Exactly the same amount of FPS with Higher CPU use.

Can anyone help me?

Kind Regards

katze1123 avatar Feb 11 '22 16:02 katze1123

E: the issues mentioned below (except the blurriness) have now been fixed as of xenia-project/xenia@690b0d9 - so both MGS2 & 3 should give better performance now!

Label suggestions

state-gameplay / state-playable kernel-xex-switching gpu-shader-errors gpu-drawing-corrupt

Huh, the MGS2 long load time & flashing issues seem to be caused by https://github.com/xenia-project/xenia/blob/9a74df491ffd0189ddd26bc2030e0eae6a775f4e/src/xenia/kernel/xam/apps/xmp_app.cc#L431 - removing that Sleep lets MGS2 start up fine, just like MGS3.

MGS2 is calling that func from the main thread, guess that's what caused those issues, maybe we need to add some check there so it only sleeps when it's a different thread instead.

E: Looks like MGS3 is also doing the same thing too, with the Sleep removed even my ancient 3570K can get 55-60FPS now, without any patches, woot!

Anyway it's a little hard to make out, but here's MGS2 ingame: image

Not really sure what's up with that blurring, the cutscenes all seemed fine. Tried changing a bunch of config options but haven't found any that fix it unfortunately ;_;

how do you remove the Sleep part?

spacebear84 avatar Jul 18 '22 00:07 spacebear84

@spacebear84 IIRC it was removed in Xenia master branch not long after I posted about it, not sure about other builds though.

emoose avatar Jul 18 '22 01:07 emoose

@spacebear84 IIRC it was removed in Xenia master branch not long after I posted about it, not sure about other builds though.

So as long as I use the master build it should work fine?

spacebear84 avatar Jul 18 '22 01:07 spacebear84

I can run MGS2, but its just blurry

spacebear84 avatar Jul 18 '22 01:07 spacebear84

In both mgs2 and mgs3, cutscenes seem to have a problem where sound effects and voice lines will get progressively out of sync. Its uneffected by the max_queued_frames = 3, as the delay still happens with or without it. The subtitles themselves are also delayed.

ajojoreference avatar Jul 20 '22 20:07 ajojoreference

In both mgs2 and mgs3, cutscenes seem to have a problem where sound effects and voice lines will get progressively out of sync. Its uneffected by the max_queued_frames = 3, as the delay still happens with or without it. The subtitles themselves are also delayed.

it's not an issue when you use vulkan for some reason but some textures dissapear Edit: Seems like while the game fps can fluctuate the audio is hard capped at 60 fps no matter what, when i tried uncapping the fps, the audio was horribly behind and when i capped it at 55 it synced up perfectly, so i think when you cap the game at 60 it actually runs slightly faster and it slowly starts to become noticeable in cutscenes

Petkundaz avatar Sep 10 '22 09:09 Petkundaz

In both mgs2 and mgs3, cutscenes seem to have a problem where sound effects and voice lines will get progressively out of sync. Its uneffected by the max_queued_frames = 3, as the delay still happens with or without it. The subtitles themselves are also delayed.

@ajojoreference i've been trying to fix this for days now and it turns out that all you have to do is set fps cap in your gpu driver to 60

Petkundaz avatar Sep 11 '22 12:09 Petkundaz

@ajojoreference i've been trying to fix this for days now and it turns out that all you have to do is set fps cap in your gpu driver to 60

I can confirm this works, though the newer builds seem to have reintroduced a transparency bug that makes mgs2 unplayable

ajojoreference avatar Sep 12 '22 03:09 ajojoreference