SHARE
TWEET

SpiderDave_LagRemover.lua

a guest Dec 27th, 2014 16 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- SpiderDave_LagRemover.lua lua script for FCEUX
  2. --
  3. -- by SpiderDave
  4. --
  5. -- Removes lag from games by speeding things up when lag is detected.  This makes the sound
  6. -- missing, clicky, or garbled.  Can't really fix this since when the game lags, the sound doesn't.
  7.  
  8. turbo=false
  9. emu.registerafter(function()
  10.     if emu.lagged() then
  11.         emu.speedmode("turbo")
  12.         turbo=true
  13.     end
  14. end)
  15.  
  16. emu.registerexit(function(x) emu.message("") end)
  17. while true do
  18.     if turbo then
  19.         turbo=false
  20.         emu.speedmode("normal")
  21.     end
  22.     emu.message("") -- forces removal of "emulation speed" messages
  23.     emu.frameadvance()
  24. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top