Kaztalek

Untitled

Jul 30th, 2016
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. --"pausebuffer-revA.lua"
  2. --For use in MM (J1.1) on BizHawk 1.9.1
  3. --
  4. --Addresses:
  5. --0x1FA0F0 is Visual Frame
  6. --0x3FD8CB is A Button
  7.  
  8. local frame = 0x1FA3A0
  9. local a = 0x3FDB8B
  10. local buffer = false
  11.  
  12. while true do
  13.     if memory.readbyte(a) ~= lastA and lastA == 21 then
  14.         x = emu.framecount() + 20
  15.         buffer = true
  16.     elseif buffer and emu.framecount() > x and memory.read_u32_be(frame) > lastFrame then
  17.         joypad.set({Start=1},1)
  18.         buffer = false
  19.     end
  20.     lastA = memory.readbyte(a)
  21.     lastFrame = memory.read_u32_be(frame)
  22.     emu.frameadvance()
  23. end
Add Comment
Please, Sign In to add comment