Advertisement
EliteAnax17

Untitled

May 9th, 2017
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. -- mGBA on Bizhawk is unstable restarting/rebooting core script v1.0 --
  2.  
  3. -- to use: this script will reboot the current emu core and hang frame advance. please stop and restart the script infrequently every few seconds and eventually it'll crash. --
  4.  
  5. client.reboot_core()
  6.  
  7. print("Restart me a few times to crash.")
  8.  
  9. function drawguitext()
  10. gui.text(1,10,string.format("Test %i",1))
  11. end
  12.  
  13. function checkEmu()
  14. check = console.getavailabletools --this returns an error if not on Bizhawk
  15. end
  16.  
  17. if pcall(checkEmu) then
  18. print("Loaded script on Bizhawk, setting memory domain to IWRAM")
  19. memory.usememorydomain("IWRAM");
  20. else
  21. print("VBA-RR or other emulator detected - will not switch memory domain.") -- dont do anything else, only bizhawk needs the memory domain set
  22. end
  23.  
  24. repeat
  25. drawguitext()
  26. emu.frameadvance()
  27. until false
  28.  
  29. gui.register(drawguitext)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement