火焰之纹章吧 关注:286,537贴子:4,598,289
  • 5回复贴,共1

带乱数显示的模拟器(我又来火星了)

只看楼主收藏回复

嫌挡屏幕可以用simple版或者自己改脚本


IP属地:贵州1楼2024-10-24 12:28回复
    IP属地:贵州2楼2024-10-24 12:29
    收起回复
      有人问,我就贴一下

      function nextrng(r1, r2, r3)
      return AND(XOR(SHIFT(r3, 5), SHIFT(r2, -11), SHIFT(r1, -1), SHIFT(r2,15)),0xFFFF)
      end
      function rngsim(n)
      local rngbase=0x03000000
      local result = { memory.readword(rngbase+4), memory.readword(rngbase+2), memory.readword(rngbase+0) }
      for i = 4, n do
      result[i] = nextrng(result[i-3],result[i-2],result[i-1])
      end
      return result
      end
      local phit = 0x0203A550
      local pdmg = 0x0203E1BE
      local pcrt = 0x0203A556
      local ehit = 0x0203A5D0
      local edmg = 0x0203E1BC
      local ecrt = 0x0203A5D6
      no255 = function (addr)
      local ret = memory.readbyte (addr)
      if ret == 255 then
      return ""
      else
      return ret
      end
      end
      nolong = function (addr)
      local ret = no255 (addr)
      if ret == 100 then
      return "100"
      else
      return " " .. ret
      end
      end
      gui.register (function ()
      local nsim = 20
      local rngs = rngsim(nsim)
      for i = 1, nsim do
      gui.text(228, 8*(i-1), string.format("%3d", rngs[i]/655))
      end
      gui.text(224,0,"1:")
      gui.text(224,8,"2:")
      gui.text(224,16,"3:")
      gui.text(224,24,"N:")
      -- emu.frameadvance()
      end)


      IP属地:贵州3楼2024-10-26 09:19
      回复
        大佬链接没了能再发一个吗


        IP属地:广东来自Android客户端4楼2024-11-06 21:08
        回复