Akiba's Trip Undead & Undressed (333980)
Akiba crashes on startup, due to MFStartup not returning S_OK. This was fixed with Wine 3.8 in this commit.
Original upstream bug report can be found here.
Proton: 3.7-4 Beta Proton Log: steam-333980.log
I've reported the bug that happens after this, which is an infinite black window, upstream.
Updated log file for Proton 3.16-6 Beta: steam-333980.log
Yes. Missing Media Foundation support.
Does this game have issues with cutscenes/cinematic/video playback? I'm not sure after reading trough this issue. Can somebody clarify?
If the game has issues with playback, you can earn extra brownie points by giving information about the media files the game uses and what codecs it uses. :smile:
Disabling movie in the launcher will get past the blackscreen and into the title screen. In game will have missing dialogue voice and bgm. Sfx sounds like foot steps, combat sound, ui, and gameplay wise seems to be running fine, gamepad also detected properly.
Hi @wah123 thanks for the log.
Maybe this is also relevant to the issues?
13182.400:0028:0029:warn:module:load_builtin_dll cannot open .so lib for builtin L"Steam2.dll": /home/tommy/.local/share/Steam/steamapps/common/Proton 4.2/dist/lib/wine/steam2.dll.so: cannot open shared object file: No such file or directory
Extracted information from the 3 main jp video files.
Short Summery: Format: MPEG-4 Format Profile: Base Media Codec ID: isom (isom/iso2/avc1/mp41
Video Format: AVC Format Profile: [email protected] / [email protected] / [email protected] Codec ID: avc1
Audio Format: AAC LC Codec ID: mp4a-40-2
Videos work, but are upside down now. Also there is no voice. steam-333980.log
Videos are upside down again, with no game sound still.
steam-333980.log
@ukbeast Thank you for the update - it seems like something changed in the game code that caused this regression. We will look into this :)
Any news regarding this game. Would love to play this on the deck
Any news regarding this problem?
Any news about this? Could someone check it with the new proton versions like experimental or ge 9.13?
Has anyone found a fix for this?
Have been trying to diagnose this with ProtonTricks and Proton-GE with no luck, the videos play flipped and upside down with regular proton and GE. As for in-game audio? Completely busted. Looking at the steam forums for the game indicate this has been an issue on windows as well, the devs stated it was due to an "outdated sound driver" without specifying further. I suspect this game will need custom fixes to get working, such as re-encoding the video files and some hand tuning to get the audio working, because in game everything runs and looks fine apart from no sound whatsoever.
I’ve been trying to get Akiba's Trip: Undead & Undress working properly on my Linux system (Bazzite), but I’m encountering a couple of issues related to the game's video playback and audio.
Video Rendering Issue: Some in-game videos appear upside down or distorted. This only seems to affect video content, not regular gameplay. Audio Glitches: I am experiencing intermittent audio stuttering or skips during these video sequences. Interestingly, these problems do not occur when playing the same game on PS Vita, so it seems to be specific to the PC version.
I’ve tested multiple versions of Proton, including both official and third-party builds, but the issue persists. I was hoping that someone might have a working configuration that resolves these video and audio issues.
If anyone has faced similar problems or has any solutions to suggest, I’d greatly appreciate the help. Thank you for your time and support!
The video issue appears to be fixed in the latest GE (10-15 for me) but there is no audio in-game. I've tried messing with the xaudio dlls, but with no luck. Is this something that could ever be fixed with proton, or is it something that the original deva would have to patch in the game? I've read somewhere that the audio once worked on an earlier build of the game with an earlier proton?
I debugged the game for a bit and found out that audio playback is purposefully disabled when wine/proton is detected. The detection is basically
bool is_running_in_wine() {
auto ntdll = GetModuleHandleA("ntdll.dll");
return ntdll != NULL && GetProcAddress(ntdll, "wine_get_version") != NULL;
}
This detection could be fooled by using the HideWineExports registry key. However, the detection is used in 3 places. I'm pretty sure 2 of them are related to the audio system init and audio playback, but one seems to be related to movie/video playback.
When I patched this whole detection away I indeed wasn't able to get too far in the startup before crashing, presumably when the intro video starts. When I patched out only the audio disabling related call sites I still got problems when the game was about to start after intro animations (probably during audio system init or when menu bgm playback starts).
I was able to get the audio-enabled game started once, I'm not sure if that was due to the proton ge localfixes I tried (disable_protonmediaconverter(), xact, wmp11, qasf, quartz...) or if it was completely luck based. I haven't been able to reproduce it yet. It was still not perfect, menu effects and combat voices/effects were there but rest of the sounds were missing (bgm, dialogue voices).
Unless the devs are going to fix something, I think getting the sounds working is going to involve hiding the wine exports or bytepatching. Patching isn't ideal, but idk how else the devs' video workaround could be retained. Otherwise the video issue would also have to be fixed in proton I think.
I messed with it a bit more and found that the following Proton GE gamefix, which simply disables all the devs' workarounds, results in menu and combat effects working but bgm and dialogue voices missing, and videos (at least the intros) still playing in correct orientation:
"""Game fix for Akiba's Trip: Undead & Undressed"""
from protonfixes import util
def main() -> None:
# Disable devs' workarounds which disable the audio system and flip videos.
util.protontricks('hidewineexports=enable')
If one wants to try this out, it can be placed at ~/.config/protonfixes/localfixes/333980.py for native steam or ~/.var/app/com.valvesoftware.Steam/.config/protonfixes/localfixes/333980.py for flatpak steam when using Proton GE.
Notably this doesn't have the current GE's video flip fix env var, which also enables winegstreamer for media. Gstreamer seems to be problematic when this game plays audio, resulting in a hang. Also, I'm guessing the devs' third wine workaround I mentioned earlier wasn't related to crashing after all, but it instead flips videos. Some old wine/proton version probably played videos upside down and the devs tried working around that? So hidewineexports=enable also fixes the flipping on modern proton.
I might later try if I can find out the reason for the missing bgm and dialogue. I tried combinations of usual verbs like xact, wmp9, quartz but they didn't seem to help. If I fail at that I'd probably still contribute this current incomplete fix to GE (umu-protonfixes), as it's still better than no audio. Of course anyone else is free to do that as well.
thanks so much for looking into this!! I've added your fix into ~/.config/protonfixes/localfixes/, and I've got the basic sound effects playing (without dialogue, music and environmental as you said). I was getting a lot of hangs running GE10-25 (I'm assuming that's the Gstreamer issue you mentioned?), but I've just set it to GE10-20 and it runs well without hanging/crashes, plus the opening video is the correct orientation.
(edited for clarification)
In case this is of any help: I've noticed that the game ofter hangs if I have to travel to a location where a cutscene will automatically start (e.g. returning to MOGRA after the initial arena fight). The loading screen starts, the loading bar gets just to the end before it freezes.
Thanks for testing! If the game didn't crash at cutscenes previously on Proton GE then using gstreamer might be a better bet after all. Also because I noticed when the game tries to stream sound files, it runs into issues with the same MFCreateSourceReaderFromByteStream function call with both gstreamer and winedmo, it's just that the issues are different. With gstreamer it hangs during that call waiting for some result infinitely inside wine. With winedmo that function ends up returning E_INVALIDARG (0x80070057) instead of the expected S_OK (0x0), so the game doesn't continue with the playback of sound files streamed from disk. I'm guessing larger sound files like bgm and dialogue files are streamed, while small files like effects are just loaded into memory once, explaining why some of the sounds work.
I experimented by patching the game to skip the playback of streamed sound and indeed the game then starts with gstreamer as well, with the basic sound effects working.
Looks like the next step towards full sound would be to figure out what's the issue with that MFCreateSourceReaderFromByteStream call. Haven't had much progress with that yet but I'll try to continue. I noticed there was a message warn:mfplat:resolver_get_bytestream_url_hint Unrecognized content type "`\xfd\xcc\x14\xd4\x15\xf4{". in the logs during that call, but I'm not sure if that really matters here.
Well that took a while but I think I have identified the issue regarding the rest of the sounds, or at least one of them. The log message above was indeed related.
The game has weird implementations for the IMFByteStream's synchronous Read ("one-read-a-time") and asynchronous BeginRead/EndRead ("overlapping reads") functions. The game's implementation of the byte stream only supports one of those at a time depending on its internal state. When decoding media, Wine's MF implementation tries to use sync api when the game's byte stream happens to be in "async mode", which results in the game trying to call ReadFile synchronously on a file opened in async mode (FILE_FLAG_OVERLAPPED), in which case nothing is read and Wine ends up trying to decode uninitialized junk from memory instead of the actual audio. That was the junk in the logs from earlier. The game also returns an invalid 0xFFFFFFFF "bytes read" value when this happens.
TL;DR: I got the background music working (at least in menu and during the first fight) with an experimental hack for Proton GE which uses the async byte stream api in certain situations for this game. I'd expect all sounds in lang_common/sound_bgm/bgm.stm to work. The sound files in that container are in WMA/ASF format.
Dialogue voices don't work yet however :(. They are in WAV format, which might be related. I didn't notice any immediate problems in the log, but I'll try to continue debugging.
I suppose I could share my current test build of Proton if anyone is eager to try, but I don't know if sharing binaries is allowed here (ping @kisak-valve ?).
I also have no idea if that hack is something that could stay long term or if there's a better fix. Also don't know if it breaks something else. Might have to consult someone who actually knows about MF. The fix seems much easier to do on the game's side 😩, but I don't know if we'd be able to contact the devs.
Replying to https://github.com/ValveSoftware/Proton/issues/651#issuecomment-3564552601
You could send a PR over on GloriousEggroll perhaps?
I think proton-ge would be a good compromise.
Also thank you and everyone else for working on this ❤️
It's probably the best idea for now yeah 👍. Though before that I'd still want to take a shot at getting the WAV dialogue voices working as well, and then I'd want to do some testing to check that the rest of the game isn't completely broken with this.
That is amazing work! :) I've tried to email the developers before, back when the Kati DLC was released to ask if there would ever be a patch, but recieved to response from them... I've posted on the Marvelous/XSeed games Discord as well with no response. If you would like anyone to test the proton build, I'd be very happy to give it a go!
@synthetictruism Here's a test build if you want to try: https://github.com/delet-this/proton-ge-custom/releases/tag/GE-Proton-akiba-1 It's installed the same way as Proton-GE as described here. The sound effects and bgm work but the dialogue doesn't, at least on my end. If you have the previous fix at ~/.config/protonfixes/localfixes/333980.py then you should delete or rename it. Or if you want to experiment with your own changes then copy over the new one from compatibilitytools.d/GE-Proton-akiba-1/protonfixes/gamefixes-steam/333980.py to use as a base.
I haven't made much progress with the dialogue, I'm thinking I might just have to try getting this merged to GE without it. What I found so far: On windows the game opens the evvoice.stm file when the dialogue starts and closes it when the dialogue stops. On proton however the file is closed almost immediately because IXAudio2SourceVoice::GetState is reporting zero buffers queued (the game uses this to find when the playback ends). When I force the game to continue regardless I get like unintelligible, very distorted, possibly slowed down audio when the dialogue is playing. It seems to happen on both microsoft's XAudio2 as well as FAudio, so I'm thinking it could be an issue related to decoding the ADPCM WAV dialogue files in mf/mfplat. I might try to re-encode/transcode the files in evvoice.stm at some point, but before that I'd have to reverse engineer the format of that .stm container thingy.
@delet-this that's amazing, thanks! I've quickly tried it out and its working well, but I got to head out to work, so I'll test it out a little more thoroughly later tonight and see how it goes. I'm tempted to see if older versions of the game had the same dialogue .stm files, i.e. from before the dlc release.
The game with the new Proton runs well, until it very occasionally hangs, usually in an open area when running around after about 5 seconds. It seems pretty random and I can't tell what event is triggering the hang. Music and background effects are all fine, no timing issues or anything. Dialogue is missing as expected. Cutscenes are fine, moving into a location that have a cutscene upon entering are fine too (either traveling there directly, or via the map).
The STM files are a bit odd - it looks like they are RIFF files. There is a header buried in there with "RIFF・ WAVEfmt 2" with a chunk size of 3576 (the hex after it is F0 0D 00 00, so have I got that right? I'm still learning!). I've tried to open it in an RIFF reader, but I'm getting an error saying it has no RIFF header...
edit: also, the older version of the game (2016 release) has a smaller dialogue file, I'm assuning the latest (2021 latest version) includes the Kati route dialogue. I've not had a chance to test the older verison with the new Proton...