CheatMaker 论坛

注册

 

发新话题 回复该主题

Cheat Engine 6.4+设置内存区域(LUA脚本) [复制链接]

1#
DeSmuME 0.9.11(x86)的PC内存区域通过ArtMoney可得知是固定的032A0EB8--036A0EB8




如果要运行DeSmuME 后CE自动编辑内存区域,如图设置下CE,



然后单击CE6.4的"表单"----"显示CT表的lua脚本",将下面的代码输入到编辑框,单击"运行脚本"并保存为 任意名称的.CT 表,如“恶魔城.ct”所以下次打开“恶魔城.ct”时也会自动输入区域。
  1. set_scanrange = (function(frmMain)
  2.    -- Enclosed in an anonymous function call in order to
  3.    -- cache the result of getMainForm while avoiding the
  4.    -- need to pollute the script's locals.
  5.    local function find(name)
  6.       return frmMain.findComponentByName(name)
  7.    end

  8.    local function dec2hex(nValue, maybe_size)
  9.       local size = maybe_size or 0
  10.       local fmt = '%'
  11.       if type(nValue) == 'string' then nValue = tonumber(nValue) end
  12.       if size ~= 0 then fmt = fmt .. '0' .. tostring(size) end
  13.       fmt = fmt .. 'X'
  14.       return string.format(fmt, nValue)
  15.    end

  16.    -- Pretty sure we can cache the results of the 'find'
  17.    -- calls, but whatever.
  18.    return function(fromaddr, toaddr)
  19.       local fromctrl = find('FromAddress')
  20.       local toctrl = find('ToAddress')
  21.       if type(fromaddr) ~= 'string' then
  22.          fromaddr = dec2hex(fromaddr)
  23.       end
  24.       if type(toaddr) ~= 'string' then
  25.          toaddr = dec2hex(toaddr)
  26.       end
  27.       fromctrl.Lines.Text = fromaddr
  28.       toctrl.Lines.Text = toaddr
  29.    end
  30. end)(getMainForm())

  31. set_scanrange('032A0EB8', '036A0EB8')  
  32. --上面的区域设置,DeSmuME 0.9.11官方正式版通用
  33. --你也可以自行修改起始位置和终止位置。
  34. --ePSXe 1.9.25的起始地址是:00A8B6A0 终止地址是:00C8B6A0
  35.     --Note: This only works once Cheat Engine has attached to a process, so you'll most likely need to add the call to the handler for onOpenProcess.
复制代码
NDS合金弹头7示范设置区域后的搜索效果图:
首次扫描


再次扫描

最后编辑dfzetcc 最后编辑于 2015-10-03 13:20:59
分享 转发
TOP
2#

  不会用。不过还是支持下。
TOP
3#

固定地址的可以
但有些模拟器是变动内存地址的,比如dosbox
就不怎么方便了
还是需要给出指针后来锁定内存区域较好
TOP
发新话题 回复该主题