Emulator Coder, Skilled player (1300)
Joined: 12/21/2004
Posts: 2687
It's been mentioned a few times that people want an input plugin that's better for making TASes. I realized this should be pretty easy to do since some existing input plugins have source available that's free to use for anything. So what features do people want, again? UPDATE: Here [adelikat]: Updated link with a current one. Everything but the combo system is functional. So far it has only been tested with Mupen64 0.5 running on Windows XP. It's based on Def's DirectInput plugin. To use, move or copy "TASDI.dll" into the "plugin" folder where your emulator is, then open the emulator and choose "TAS Input Plugin 0.6" in the Input Plugin part of the Settings. Then you'll want to configure the buttons before using it, like any other input plugin. When you start a ROM, a control panel should appear for each active controller. If the main emulator window doesn't get focus when you click on the panel, click on the emulator once first, then on the input panel, and it should remember it after that. You might want to turn off the "Pause when inactive" option in the emulator, if you don't want it to pause whenever you are dragging the panel around or clicking on a button. The "Instant / Relative / Radial" buttons change how the keyboard (or joystick) controls the analog stick. You can also left-click and drag on the analog stick circle to set the stick position, or right click once if you don't want to drag the mouse to keep controlling it. The sliders on the right are multipliers for X and Y analog stick intensity from the keyboard. To reset the multiplier to 100%, right-click-drag on the slider bar. "Ang. Disp" stands for "Angular Display", which changes the X/Y display into Angle/Distance. You can manually edit the numbers for X/Y or Angle/Distance, but if you do so, remember that other input is disabled while you're editing it, until you hit Enter or Escape to return focus to the emulator. The game buttons (A,B,L,R,Start,etc.) can be left-clicked on for auto-hold, or right-clicked on for auto-fire. Known bugs:
  • If you're using a joystick, you'll need to set the max range to 127 instead of 128 in the settings.
  • Sometimes the X and Y range sliders start at 1, so you'll have to set them higher before you can move with the keyboard/joystick.
  • Autofire doesn't work in many games yet (timing issues, since the plugin has no reliable way to tell what frame it is)
  • It doesn't show movie playback input (not really a bug because it is the plugin specification that lacks any way of supporting this)
  • Combos don't work yet (because they haven't been implemented)
  • If you spastically click the show/hide buttons the panel may eventually stop working.
Emulator Coder, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
Deny raw input mode, and make sure that the readController function does nothing so that it causes errors from the game. If it's for TASing, make sure it minimizes the chances of a desync.
Emulator Coder, Skilled player (1300)
Joined: 12/21/2004
Posts: 2687
Check.
EXPORT void CALL ReadController ( int Control, BYTE * Command ) {}

...

for (BYTE i = 0; i < NUMBER_OF_CONTROLS; i++)
	ControlDef[i]->RawData = FALSE;
Active player (277)
Joined: 5/29/2004
Posts: 5712
Wow, it took me a while to figure out that that was Mario upside-down inside a box there.
put yourself in my rocketpack if that poochie is one outrageous dude
Mitjitsu
He/Him
Banned User, Experienced player (532)
Joined: 4/24/2006
Posts: 2997
Yeah that would be real pwnage, this is just what I was saying and you can also manually enter it in as well and you'll still be able to view previous input from the movie as well as others. Although this would probally cause re-records to sky rocket with good reason. The one other thing I would like to say is, wouldn't it be possible to manually enter inputs in a input box, since at certain parts of a game you may need to hold 4-5 buttons including the frame advance button. Couldn't you have the option of manually entering the sensity as well as the scroll bar. Other features that I would like to see are Resume recording function (like GENS) ,instead of converting to a write file since the currect re-recording system discourages using many re-records Goto Frame feature e.g ||Input Box|| since movies are often long Frame Skip AND finally... Autostick spin EDIT: This would lead to very unhuman movements such as two very precise but completely differents tilts and angles.
Hoe
Joined: 7/31/2004
Posts: 183
Location: USA
I can imagen macros would be useful. For example in Mario64, you may want to make a "backflip one." direction=current+180 advance frame B Or some thing to this effect.
Emulator Coder, Skilled player (1300)
Joined: 12/21/2004
Posts: 2687
AKA wrote:
Autostick spin
What is autostick spin? These had nothing to do with the input plugin, but I'll answer them anyway:
AKA wrote:
Resume recording function (like GENS) ,instead of converting to a write file since the currect re-recording system discourages using many re-records
A "resume recording" shortcut wouldn't change anything, except it would allow you to go choose a menu item that does something you can already do by hitting the save/load savestate hotkeys.
AKA wrote:
Goto Frame feature e.g ||Input Box|| since movies are often long
Can already do this by choosing Pause at Frame, turning the speed up, and waiting. Goto Frame wouldn't be any faster.
AKA wrote:
Frame Skip
It already skips drawing frames during fast-forward. And frame advance already skips non-input frames.
Mitjitsu
He/Him
Banned User, Experienced player (532)
Joined: 4/24/2006
Posts: 2997
nitsuja wrote:
AKA wrote:
Autostick spin
What is autostick spin?
What I meant by autostick spin was selecting an option in which a very quick 360 spin on the analougue could be done. It would be helpful to people without a pad converter and would also speed up the movie making progress. Although I don't how games check for a 360 rotation my only guess is it checks if you have sequencially looked in eight directions in a anti/clockwise movement within a given time period. Since on rare ocassions I have been able to replicate on a keyboard certain moves in games that require 360 degrees movement on the analougue. Whats your thoughts on this?
Emulator Coder, Skilled player (1300)
Joined: 12/21/2004
Posts: 2687
Sounds like something a good enough combo system should work for, and/or simply moving the mouse in a circle at slow enough speeds.
Joined: 6/12/2006
Posts: 368
nitsuja wrote:
AKA wrote:
Frame Skip
It already skips drawing frames during fast-forward. And frame advance already skips non-input frames.
In Hybrid Heaven this does not occur, regular playing skips input frames but frame advance does not seem to. Frame count goes up by 1 in frame advance but actual count is variable in real time. Just start recording in the game and you'll see the counters get separated. I don't know if this is a problem atm. The only thing useful i can think of for an input plugin is a button sequence if it's possible
Emulator Coder, Skilled player (1300)
Joined: 12/21/2004
Posts: 2687
I'll have to check Hybrid Heaven, but maybe you're just confused about what the frame counts mean. What does "actual count is variable in real time" mean? There are 2 frame counters, one for input and one for graphics, and for most games they are supposed to be different. I know for some games, like OoT, it doesn't skip any input frames because the game does in fact check input every frame, more often than it draws frames. That was probably done to get more responsive controls, for instance you can press the "swing sword" button for any 1/60 of a second and it will register even if you don't hold it until the next drawn frame. There's currently no way to check if the game will actually use the input it requests.
Joined: 6/12/2006
Posts: 368
Argh nevermind, i was wrong, i just happened to check where they went up equally.. but what i meant was the input frames' rate of change stays the same but the actual frame count seems to fluctuate rates. edit: well even the input ratio is not constant but it is much closer to staying the same.
Post subject: Re: Input Plugin for TAS
Emulator Coder, Skilled player (1300)
Joined: 12/21/2004
Posts: 2687
Rising Tempest wrote:
That looks incredibly convenient- can the plugin be downloaded anywhere, or are you still working on it?
Still working on it, although everything in the above picture except for the combo system is done, so I could release an alpha version if there's interest in it.
Player (166)
Joined: 4/27/2006
Posts: 304
Location: Eastern Canada
There is interest- mainly for the analog aspect of it. Holding down many buttons on keyboard isn't too tedious... Also, will this support multiple controllers simultaneously? Like, two separate windows for controller 1, and 2. If not, and you have to toggle between them... it may be a bit more tedious, but the whole thing is still a godsend.
Emulator Coder, Skilled player (1300)
Joined: 12/21/2004
Posts: 2687
I'll try to put something up soon. I just remembered I haven't implemented those sensitivity bars yet so that should happen first.
Rising Tempest wrote:
Holding down many buttons on keyboard isn't too tedious...
It's not only for holding keys, you can right-click on one of the button checkboxes to switch it into autofire, although the combo system should give more control over autofire and other things. Also, it's nice to see instant feedback of what buttons you're pressing. Or that panel can be hidden if it's being useless.
Rising Tempest wrote:
will this support multiple controllers simultaneously?
Yes, it opens one of those windows for each active controller.
AKA wrote:
and you'll still be able to view previous input from the movie as well as others
This is currently impossible since the emulator doesn't tell the input plugin what input it finds in the movie, but I can add a function for a future version of the emulator to call to support this feature.
Joined: 6/14/2004
Posts: 646
Maybe you could include an angle indicator as an alternate view, so instead of an x,y coordinate, you could have degrees and intensity.
I like my "thank you"s in monetary form.
Emulator Coder, Skilled player (1300)
Joined: 12/21/2004
Posts: 2687
NrgSpoon wrote:
Maybe you could include an angle indicator as an alternate view, so instead of an x,y coordinate, you could have degrees and intensity.
It will be a little weird but I can fit that option in the "Y" box. Unless you think it should always be enabled along with the "radial" control scheme being selected? That makes the left/right keys change the angle and the up/down keys go forward/backward.
Emulator Coder, Skilled player (1300)
Joined: 12/21/2004
Posts: 2687
I've made a preliminary version available for download, see top. EDIT: since I can't edit the original post anymore I'll re-add this here: Try these links if you want the source code too: http://www.bluetoaster.net/emu/acc/TASInputPlugin0.6.zip http://code.google.com/p/mupen64-rr/source/browse/#svn/trunk/tasinput_plugin/src
Joined: 6/12/2006
Posts: 368
EDIT: Works good now, fixed the problem. This is awesome.
Player (166)
Joined: 4/27/2006
Posts: 304
Location: Eastern Canada
nitsuja wrote:
I've made a preliminary version available for download, see top.
*sacrifices virgins*
Mitjitsu
He/Him
Banned User, Experienced player (532)
Joined: 4/24/2006
Posts: 2997
I've had a little mess around with new plugin and heres a little muck around I had earlier on (don't worry its a small file) http://rapidshare.de/files/29478144/Mario_Testing_.avi.html As you an see in real time using a mouse I have very erratic almost uncontrolable movement. I wasn't able to do the chain chomp star since I wasnt able to land on the wooden stake, I then convert to frame advance and enter values in manually and the difference is obvious in the control I have. However, getting near perfectiong out of this device will be painstaking, but at least you can be sure there is a way to get a certain jump or turn since you can go into decimal points. I'm now gonna try sword spining in OoT. EDIT: http://rapidshare.de/files/29480834/Zelda_360.avi.html Ah just as I thought you just need to face eight directions in a anti/clockwise movement and hit B when at the very moment at 360 is complete. I did it in 9 frames in the video but I beleve it can be done in eight if you face 45 degrees away from where Link is currently facing. I understand that when Guano tried to sword spin the game desynced. Would this plugin prevent it.
Emulator Coder, Skilled player (1300)
Joined: 12/21/2004
Posts: 2687
AKA wrote:
As you an see in real time using a mouse I have very erratic almost uncontrolable movement.
For real-time if not using a joystick I'd recommend playing with the keyboard and setting either "Semi-Relative" or "Instant" for X and Y. Of course, real-time playing wasn't the main concern with the new additions, and the existing input plugin was already decent enough at that.
AKA wrote:
I understand that when Guano tried to sword spin the game desynced. Would this plugin prevent it.
It might in fact prevent that desync if the problem was caused by Guano using "Raw Input", because this plugin doesn't allow for that option.
Emulator Coder, Skilled player (1300)
Joined: 12/21/2004
Posts: 2687
AKA wrote:
Its a shame that the previous input isn't shown on the new 0.6 plugin as it would make ajustments far easier espeacially since there way back.
How exactly should it show the previous input? A ghosted-out picture of the last time the angle was different, or something else?
Mitjitsu
He/Him
Banned User, Experienced player (532)
Joined: 4/24/2006
Posts: 2997
Here's a brief movie I tried to make on OoT, this is something which could never be done on a keyboard. http://rapidshare.de/files/29614858/THE_LEGEND_OF_ZELDA__USA_.m64.html Nitsuja: How exactly should it show the previous input? A ghosted-out picture of the last time the angle was different, or something else? If you watch the movie above, you'll see that I make several blind turns in it, which is what caused most of the difficulty in the movie. It would have been more easier to tweak these turns if the input from before was presented as some kind of ghost image. Would it also be possible to select angle and tilt as a preffernce as opposed to x,y coordinates It could be simply be done as Start at zero degrees north and divide the tilt by percentage and then apply the angle to it so you get something like e.g. 48%, 137 degrees.
Emulator Coder, Skilled player (1300)
Joined: 12/21/2004
Posts: 2687
AKA wrote:
if the input from before was presented
My question was, how far before? The last frame? Note that immediately after loading a savestate, the "last frame" can be in the future.
AKA wrote:
Would it also be possible to select angle and tilt as a preffernce as opposed to x,y coordinates
Yes, that's already in. Enable "Radial" and "Ang. Disp" in the top panel. Changing the numbers doesn't work too well yet in that mode (some update bug) but controlling it with the keyboard works fine. Set a speed modifier key in the configuration and hold that down if it moves too quickly for you.