出招分析_侍魂2

2020-03-26  本文已影响0人  LiuJP
分析过程
实现过程

想到就是每个对象的占大小0x120,并且每个对象结构体第一位是表示类型,通过观察发现player0 的对象结构体开头是0002;然后是5314 302D是唯一,可以通过一个for循环判断

while (true) {
                                for (int i = 0x102fc0; i < 0x105de0; i = i + 0x120) {
                                    final int player0 = NativeUtils.readMemary(i + 1);
                                    if (player0 == 2) {
                                        int player = NativeUtils.readMemary(i + 4);
                                        if (player == 0x30) {
                                            currentAddr = i;
                                            break;
                                        }
                                    }
                                }
                                Logger.e("addr:" + currentAddr);
                                int ret = NativeUtils.readMemary(0x100D0B);
                                Logger.e("id:" + ret);
                                if (currentId != ret) {
                                    currentId = ret;
                                    combineView.post(new Runnable() {
                                        @Override
                                        public void run() {
                                            combineView.addDatas(pluginEntryView.getList(currentId + 100));
                                        }
                                    });
                                }
                                try {
                                    Thread.sleep(4000);
                                } catch (InterruptedException e) {
                                    e.printStackTrace();
                                }
                            }


"0x10801B, 0x09"="天霸封神斩"
"0x10802A, 0x09"="奥义烈震斩"

分析2从mame的金手指分析得出
<cheat desc="Infinite Energy PL2">
    <script state="run">
      <action>maincpu.pb@((maincpu.pd@100A4A)+BB)=80</action>
    </script>
  </cheat>

  <cheat desc="Drain All Energy Now! PL2">
    <script state="on">
      <action>maincpu.pb@((maincpu.pd@100A4A)+BB)=00</action>
    </script>
  </cheat>

  <cheat desc="Always have Maximum Power PL2">
    <script state="run">
      <action>maincpu.pb@((maincpu.pd@100A4A)+F0)=20</action>
    </script>
  </cheat>

  <cheat desc="Always have Minimum Power PL2">
    <script state="run">
      <action>maincpu.pb@((maincpu.pd@100A4A)+F0)=00</action>
    </script>
  </cheat>
image.png

105960 是对象player0;
所以实现方式

                                int big = NativeUtils.readMemary(0x100a47)<<16;
                                int medium = NativeUtils.readMemary(0x100a48)<<8;
                                int low = NativeUtils.readMemary(0x100a49);
                                currentAddr = big+medium+low;
上一篇 下一篇

猜你喜欢

热点阅读