源:
https://www.mamecheat.co.uk/guides.htm需要飞机,对面中国IP做了屏蔽。

- holycheat!.zip (, 下载次数:5)
https://github.com/mamedev/mame/blob/master/src/frontend/mame/cheat.cpp- Cheat XML format:
- <mamecheat version="1">
- <cheat desc="blah">
- <parameter min="minval(0)" max="maxval(numitems)" step="stepval(1)">
- <item value="itemval(previtemval|minval+stepval)">text</item>
- ...
- </parameter>
- <script state="on|off|run|change(run)">
- <action condition="condexpr(1)">expression</action>
- ...
- <output condition="condexpr(1)" format="format(required)" line="line(0)" align="left|center|right(left)">
- <argument count="count(1)">expression</argument>
- </output>
- ...
- </script>
- ...
- <comment>
- ... text ...
- </comment>
- </cheat>
- ...
- </mamecheat>
- ****************************************************************************
- Expressions are standard debugger expressions. Note that & and
- < must be escaped per XML rules. Within attributes you must use
- & and <. For tags, you can also use <![CDATA[ ... ]]>.
- Each cheat has its own context-specific variables:
- temp0-temp9 -- 10 temporary variables for any use
- param -- the current value of the cheat parameter
- frame -- the current frame index
- argindex -- for arguments with multiple iterations, this is the index
- By default, each cheat has 10 temporary variables that are
- persistent while executing its scripts. Additional temporary
- variables may be requested via the 'tempvariables' attribute
- on the cheat.
- ****************************************************************************
- Cheats are generally broken down into categories based on
- which actions are defined and whether or not there is a
- parameter present:
- ---- Actions -----
- On Off Run Chg Param? Type
- === === === === ====== =================================
- N N N ? None Text-only (displays text in menu)
- Y N N ? None Oneshot (select to activate)
- Y Y N ? None On/Off (select to toggle)
- ? ? Y ? None On/Off (select to toggle)
- ? N N Y Any Oneshot parameter (select to alter)
- ? Y ? ? Value Value parameter (off or a live value)
- ? ? Y ? Value Value parameter (off or a live value)
- ? Y ? ? List Item list parameter (off or a live value)
- ? ? Y ? List Item list parameter (off or a live value)
复制代码- <cheat desc="Enable Mobi-Chan Flag">
- <script state="run">
- <action>maincpu.pb@E009=99</action>
- </script>
- </cheat>
复制代码script state,启用方式。on/off为按下回车后启用,但两这项是对立且独立的。通常情况下,on/off搭配temp用于对ROM区的内存操作。on开启cheat后,数据会写入temp。off关闭对应操作后会将temp的数据还原。on可单独使用,用于直接按下后启用,不需要关闭的情况。
run为开关式启用,可选择开或关。
change为多选项切换启用,在多个选项之间按回车启用。
maincpu,主要CPU,CPU 0。一些基板不只一个CPU。比如:主CPU 68K,处理音频的CPU Z80;PGM部分游戏会有ARM CPU。通常情况下用maincpu。
p这个位置表示写入类型。
p=程序写入(写入RAM) m=区域写入(写入ROM) r=RAM写入(适用于p或m无法运作时) o=操作码写入(适用于r或m无法动作时,常用于加密的内存 ) d=数据写入 i=i/o写入 3=SPACE3写入 |
通常情况下用p。
b这个位置表示值的大小。
b=字节,8位
w=字,16位
d=双字,32位
q=四字,64位