TASEmulators / BizHawk

BizHawk is a multi-system emulator written in C#. BizHawk provides nice features for casual gamers such as full screen, and joypad support in addition to full rerecording and debugging tools for all system cores.
http://tasvideos.org/BizHawk.html
Other
2.2k stars 385 forks source link

Lua joypad.setfrommnemonicstr doesn't work without reinit'ing MovieSession #2525

Closed WilliamSzeto1 closed 2 years ago

WilliamSzeto1 commented 3 years ago

Summary

Running Lua programs for Pokemon Red, joypad.setfrommnemonicstr won't actually set the inputs for a frame until I open TASStudio. After closing TASStudio, the function will work properly.

Repro

  1. Open BizHawk, Load ROM, Open Lua Console
  2. Run program in question, including joypad.setfrommnemonicstr. At this point, there is no input to the emulator.
  3. Open TASStudio. The input begins working.
  4. Input keeps working after TASStudio is closed, even after Lua Console is closed and opened again, and even after ROM is closed and opened again.

Host env.

YoshiRulz commented 3 years ago

Working as intended. Changing this to a feature request.

adelikat commented 3 years ago

The intent is to only use this method with movies, maybe it would be better to move this to movie.setinputfrommnemonicstr() ?

michael-simon commented 3 years ago

I am trying to use this function in TASing/RNG Manipulating, and having to create and load a movie just to do this is weird given that this is the only compact data-driven format for doing controller input. If you want to put a list of controller inputs into a file (like bk2 does internally) and then use them, without a function like this you can't. For a scriptable toolkit, I would think you would want to support using some consistent input file format, and this is the one that's knocking around, right?

(Also, I am entirely able to do this in Bizhawk 2.4.2, so I'm not sure when things changed such that the function shouldn't be usable outside of a movie context.)

YoshiRulz commented 2 years ago

^ possibly a hack? @adelikat