I have no idea how reliable this is, but it seems to work on the face of it. Use Lua hotkeys 1, 2, 3, and 4 for Player 1 Button 1 auto-hold/auto-fire and Player 2 Button 1 auto-hold/auto-fire respectively.
Download testrr.luaLanguage: lua
local p1b1auto= false
local p2b1auto= false
local p1b1hold= false
local p1b2hold= false
function beforeframe()
keys = joypad.get()
outkeys = {}
if p1b1hold then
outkeys["P1 Button 1"] = true
else
if p1b1auto then
outkeys["P1 Button 1"] = not keys["P1 Button 1"]
end
end
if p2b1hold then
outkeys["P2 Button 1"] = true
else
if p2b1auto then
outkeys["P2 Button 1"] = not keys["P2 Button 1"]
end
end
joypad.set(outkeys)
end
function togglep1b1hold()
p1b1hold = not p1b1hold
if p1b1hold then
emu.message("Auto-holding P1 Button 1")
else
emu.message("Stopped auto-holding P1 Button 1")
end
end
function togglep1b1auto()
p1b1auto = not p1b1auto
if p1b1auto then
emu.message("Auto-firing P1 Button 1")
else
emu.message("Stopped auto-firing P1 Button 1")
end
end
function togglep2b1hold()
p2b1hold = not p2b1hold
if p2b1hold then
emu.message("Auto-holding P2 Button 1")
else
emu.message("Stopped auto-holding P2 Button 1")
end
end
function togglep2b1auto()
p2b1auto = not p2b1auto
if p2b1auto then
emu.message("Auto-firing P2 Button 1")
else
emu.message("Stopped auto-firing P2 Button 1")
end
end
emu.registerbefore(beforeframe)
input.registerhotkey(1, togglep1b1hold)
input.registerhotkey(2, togglep1b1auto)
input.registerhotkey(3, togglep2b1hold)
input.registerhotkey(4, togglep2b1auto)