Post subject: BizHawk Rapidfire Analog Sticks
DerpPrincess
She/Her
Joined: 9/19/2020
Posts: 4
Location: Chicago
The current versions of BizHawk don't seem to support autofire for the analog sticks, only for the buttons, unless I'm overlooking it. I'm currently trying to program a lua file to poll the controller input table for that frame and then do xyz thing based on if a button or analog stick isn't at the origin for example is true on that frame. Luckily, it seems Brandon Evans has created a lua file to do most of this work for me for the buttons for the button table, however, even with the documentation I'm not exactly understanding how to poll the (theta?) degree of the analog sticks and it's kind of annoying me at this point so I'd like to ask for help. My goal and reason for doing this is the speed glitch I discovered years ago in Medievil 1 so that it can be incorporated into the new MediEvil 1 TAS (PSX). Having a file to help with the analog stick spam of x on y off will help tremendously. So what I'm wanting the file to do is a few simple things: - If R3 is pressed, disable autofire (as in from the script itself, not the emulator's autofire function) which is done by a boolean of course. I believe the text code for this is ">". - If the right analog stick is NOT at the origin, the left analog stick's input's are blocked, and the right stick (which is the autofire stick) will based on "x on, y off" decide if it will autofire the left analog's inputs at that rate. Basically, the right stick is just going to be an autofire version of the left stick, while the left stick itself works as normal as long as you're not touching the right stick so in moments where autofire isn't desired, you can just decide to not use it by using the left stick as normal. And that's truthfully it. It's that simple. And it's aggravating me trying to figure out how to do this. Can anyone point me in the right direction? Also is there any chance this can be an incorporated feature?
YoshiRulz
Any
Editor, Emulator Coder
Joined: 8/30/2020
Posts: 112
Location: Sydney, Australia
If you're TASing, use TAStudio's autofire to perform the glitch. What you described isn't possible as of 2.5.2 because input.get() only returns the buttons pushed on gamepads and not axes. I'm pretty sure you'd need to build EmuHawk from source, though it might also be possible to use an external tool to hack the feature in.
I contribute to BizHawk as Linux/cross-platform lead, testing and automation lead, and UI designer. This year, I'm experimenting with streaming BizHawk development on Twitch. nope Links to find me elsewhere and to some of my side projects are on my personal site. I will respond on Discord faster than to PMs on this site.
Hey look buddy, I'm an engineer. That means I solve problems. Not problems like "What is software," because that would fall within the purview of your conundrums of philosophy. I solve practical problems. For instance, how am I gonna stop some high-wattage thread-ripping monster of a CPU dead in its tracks? The answer: use code. And if that don't work? Use more code.