keylie
He/Him
Editor, Emulator Coder, Expert player (2826)
Joined: 3/17/2013
Posts: 391
Similar to PPSSPP, I was wondering if Citra could run in libTAS. I compiled the latest version (commit d3b1b5f) following the building guide, using "cmake -DENABLE_QT=OFF .." to only build the SDL2 frontend. After compiling and launching the emulator once, I had to edit the config file in "~/.config/citra-emu/sdl2-config.ini", go to the "[Audio]" section and set "output_engine = sdl2" to force using sdl2 audio. I tested one game only (SteamWorld Dig, maked as Perfect in Citra's compatibility list) using libTAS 1.3.2. Inputs (both buttons and touchpad), savestates, audio, encoding are working. The emulator does not need any more configuration regarding throttling like PPSSPP (frame advance and fastforward work correctly). I could record a movie of the beginning of the game with frame perfect inputs and playback correctly.
Spikestuff
They/Them
Editor, Publisher, Expert player (2283)
Joined: 10/12/2011
Posts: 6335
Location: The land down under.
Citra is slowly creating tools for TASing themselves and this might not be necessary.
WebNations/Sabih wrote:
+fsvgm777 never censoring anything.
Disables Comments and Ratings for the YouTube account. Something better for yourself and also others.
Joined: 9/12/2014
Posts: 536
Location: Waterford, MI
Yeah, but citra doesn’t have save states, and that’s gonna be huge. And this pretty much ends that ordeal. It’s nice that unthrottling isn’t necessary. I’ve had trouble with saving the movie file as both the game and tool soft-locked and crashed on me. But yeah, citra would be very nice to have! Could you include these emulators inside libtas preconfigured? Like how bizhawk does?
lexikiq
She/Her
Active player (393)
Joined: 8/13/2018
Posts: 106
Location: United States of America
Joysticks don't seem to work, as "Input <Error> input_common/sdl/sdl_impl.cpp:InitJoystick:198: failed to open joystick 0" gets printed after advancing a frame with joysticks enabled.
keylie
He/Him
Editor, Emulator Coder, Expert player (2826)
Joined: 3/17/2013
Posts: 391
Could you include these emulators inside libtas preconfigured? Like how bizhawk does?
I'm not sure what you mean, but it would be better to write specific configurations in a wiki page than in the software.
lexikiq
She/Her
Active player (393)
Joined: 8/13/2018
Posts: 106
Location: United States of America
Should be noted that libTAS movies can be used to create Citra movies by adding "--movie-record=/path/to/file", meaning this can be used until Citra adds proper TAS support. On another note, would it be possible to add a feature to libTAS that lets you resize the game window? I'd like to encode Citra at a higher resolution than standard but I need to resize Citra to do so which currently doesn't work.
keylie
He/Him
Editor, Emulator Coder, Expert player (2826)
Joined: 3/17/2013
Posts: 391
If you only need window resizing for encoding, you can add an ffmpeg option to encode at a specific resolution, i.e. "-vf scale=320:240" or "-vf scale=iw*4:ih*4" (iw/ih: input width/height)
Joined: 9/12/2014
Posts: 536
Location: Waterford, MI
noahkiq wrote:
Should be noted that libTAS movies can be used to create Citra movies by adding "--movie-record=/path/to/file", meaning this can be used until Citra adds proper TAS support.
I’m confused.. can you elaborate? I understand citra has a movie feature, but I don’t understand what you mean? Like use citra movies file with libtas? Like not in recording mode in libtas but in citra??
keylie
He/Him
Editor, Emulator Coder, Expert player (2826)
Joined: 3/17/2013
Posts: 391
Once you have a complete libTAS movie of Citra running a game, playback your movie and add "--movie-record=/path/to/file" to the Citra command-line options. It will record a Citra movie file that you can then playback natively in Citra (on the assumption that movie record/playback is deterministic in Citra). libTAS was only used for the production of the movie but is not involved in the end product.
lexikiq
She/Her
Active player (393)
Joined: 8/13/2018
Posts: 106
Location: United States of America
keylie wrote:
If you only need window resizing for encoding, you can add an ffmpeg option to encode at a specific resolution, i.e. "-vf scale=320:240" or "-vf scale=iw*4:ih*4" (iw/ih: input width/height)
This works fine for upscaling, but won't help with using a different layout (ie side by side). Did find a workaround though: changing "Core::kScreenTopWidth, Core::kScreenTopHeight + Core::kScreenBottomHeight" to "720, 240" in src/citra/emu_window/emu_window_sdl2.cpp (and possibly line 44 in src/core/frontend/emu_window.cpp) changes the default resolution of Citra.