I was actually looking at doing this as my next project, I didn't realise you guys were still interested. I've been the following lua script for displaying information, feel free to make use of it. I'd only actually tased the first area of stage one and the only improvement I found over your old wip was a couple of frames in the menu. If you're interested in working together I'd like to help, but I don't mind leaving this one to you if you'd rather not.
Language: lua
address = {
X_Speed = 0xFF1CF4,
X_Subspeed = 0xFF1CF6,
X_Position = 0xFF1CEC,
X_Subposition = 0xFF1CEE,
Y_Speed = 0xFF1CF8,
Y_Subspeed = 0xFF1CFA,
Y_Position = 0xFF1CF0,
Y_Subposition = 0xFF1CF2,
Boss_HP = 0xFF3601
}
value = {
X_Speed = 0,
X_Subspeed = 0,
X_Position = 0,
X_Subposition = 0,
Y_Speed = 0,
Y_Subspeed = 0,
Y_Position = 0,
Y_Subposition = 0,
Boss_HP = 0
}
lagCount = 0
lagCountY = 0
lastX = 0
lastXS = 0
lastY = 0
lastYS = 0
function LagCounter()
XCSpeed = value.X_Speed * 256 + value.X_Subspeed
YCSpeed = value.Y_Speed * 256 + value.Y_Subspeed
XCPos = value.X_Position * 256 + value.X_Subposition
YCPos = value.Y_Position * 256 + value.Y_Subposition
if (lastX == XCPos and lastXS ~= 0) then
lagCount = lagCount + 1
end
if (lastY == YCPos and lastYS ~= 0) then
lagCountY = lagCountY + 1
end
lastX = XCPos
lastY = YCPos
lastXS = XCSpeed
lastYS = YCSpeed
if gens.framecount() == 1 then
lagCount = 0
lagCountY = 0
end
end
function GetInfo()
value.X_Speed = memory.readwordsigned(address.X_Speed)
value.X_Subspeed = memory.readbyte(address.X_Subspeed)
value.X_Position = memory.readwordsigned(address.X_Position)
value.X_Subposition = memory.readbyte(address.X_Subposition)
value.Y_Speed = memory.readwordsigned(address.Y_Speed)
value.Y_Subspeed = memory.readbyte(address.Y_Subspeed)
value.Y_Position = memory.readwordsigned(address.Y_Position)
value.Y_Subposition = memory.readbyte(address.Y_Subposition)
end
function Draw()
GetInfo()
if value.X_Subspeed == 0 then value.X_Subspeed = ""
elseif value.X_Subspeed == 128 then value.X_Subspeed = ".5"
else value.X_Subspeed = ": " .. value.X_Subspeed
end
if value.X_Subposition == 0 then value.X_Subposition = ""
elseif value.X_Subposition == 128 then value.X_Subposition = ".5"
else value.X_Subposition = ": " .. value.X_Subposition
end
gui.box(10, 195, 150, 220, 'black', 'black')
gui.text( 90, 200,"pos", 'cyan')
gui.text( 130, 200,"spd", 'yellow')
gui.text( 70, 209,"X")
gui.text( 87, 209, value.X_Position .. value.X_Subposition, 'cyan')
gui.text( 128, 209, value.X_Speed .. value.X_Subspeed, 'yellow')
gui.text( 70, 220,"Y")
gui.text( 87, 220, value.Y_Position .. ": " .. value.Y_Subposition, 'cyan')
gui.text( 128, 220, value.Y_Speed .. ": " .. value.Y_Subspeed, 'yellow')
gui.text(8,32,lagCount,"#00FF00")
gui.text(8,40,lagCountY,"#00FF00")
end
savestate.registersave(function(slotnumber)
return lagCount, lastX, lastY, lagCountY, lastXS, lastYS
end)
savestate.registerload(function(slotnumber)
local a, b, c, d, e, f = savestate.loadscriptdata(slotnumber)
if a and b and c then
lagCount = a
lastX = b
lastY = c
end
if d then
lagCountY = d
end
if e and f then
lastXS = e
lastYS = f
else
lastXS = 0
lastYS = 0
end
end)
gui.register ( function()
Draw()
end)
gens.registerafter(function()
GetInfo()
LagCounter()
end)