Code: Select all
<!-- R-Type (World) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>maincpu.mb@2679 = EB</action>
</script>
<script state="off">
<action>maincpu.mb@2679 = 75</action>
</script>
</cheat>
<cheat desc="rapid fire">
<script state="on">
<action>maincpu.mb@25E3 = 21</action> <!-- shot -->
<action>maincpu.mb@2632 = 01</action> <!-- missile -->
</script>
<script state="off">
<action>maincpu.mb@25E3 = 23</action>
<action>maincpu.mb@2632 = 3F</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter>
<item value="0x0100">01 (slow)</item>
<item value="0x0200">02 </item>
<item value="0x0400">03 </item>
<item value="0x0600">04 </item>
<item value="0x0800">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.mb@24F3 = 33</action> <!-- fixed speed -->
</script>
<script state="change">
<action>maincpu.mw@111BE = param</action> <!-- right -->
<action>maincpu.mw@111C2 = -param</action> <!-- left -->
<action>maincpu.mw@111CC = -param</action> <!-- down -->
<action>maincpu.mw@111CE = param</action> <!-- lower-right : right -->
<action>maincpu.mw@111D0 = -param</action> <!-- lower-right : down -->
<action>maincpu.mw@111D2 = -param</action> <!-- lower-left : left -->
<action>maincpu.mw@111D4 = -param</action> <!-- lower-left : down -->
<action>maincpu.mw@111DC = param</action> <!-- up -->
<action>maincpu.mw@111DE = param</action> <!-- upper-right : right -->
<action>maincpu.mw@111E0 = param</action> <!-- upper-right : up -->
<action>maincpu.mw@111E2 = -param</action> <!-- upper-left : left -->
<action>maincpu.mw@111E4 = param</action> <!-- upper-left : up -->
</script>
<script state="off">
<action>maincpu.mb@024F3 = 03 </action>
<action>maincpu.mw@111BE = 0200</action>
<action>maincpu.mw@111C2 = FE00</action>
<action>maincpu.mw@111CC = FE50</action>
<action>maincpu.mw@111CE = 0160</action>
<action>maincpu.mw@111D0 = FEC0</action>
<action>maincpu.mw@111D2 = FEA0</action>
<action>maincpu.mw@111D4 = FEC0</action>
<action>maincpu.mw@111DC = 01B0</action>
<action>maincpu.mw@111DE = 0160</action>
<action>maincpu.mw@111E0 = 0140</action>
<action>maincpu.mw@111E2 = FEA0</action>
<action>maincpu.mw@111E4 = 0140</action>
</script>
</cheat>
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mq@00C5A = 1322E92AF10000EA</action>
<action>maincpu.mq@2AF10 = 88C13A00E41000BB</action>
<action>maincpu.mq@2AF18 = 75FD3C278AF874C1</action>
<action>maincpu.mq@2AF20 = FE0275FE3CCCFE02</action>
<action>maincpu.mq@2AF28 = 10EC800375FB3CC4</action>
<action>maincpu.mq@2AF30 = 8810C4800375F73C</action>
<action>maincpu.mq@2AF38 = EBC48A04757F3C27</action>
<action>maincpu.mq@2AF40 = E6C0320475BF3C06</action>
<action>maincpu.mq@2AF48 = FFFFFFFFFFC8EB00</action>
<!--
2AF10 | BB 00 10 : mov bw,1000h // sound code address ($41000)
2AF13 | E4 00 : in al,0h // read input
2AF15 | 3A C1 : cmp al,cl
2AF17 | 88 C1 : mov cl,al
2AF19 | 74 F8 : be 2AF13h
2AF1B | 8A 27 : mov ah,[bw]
2AF1D | 3C FD : cmp al,0FDh
2AF1F | 75 02 : bne 2AF23h
2AF21 | FE CC : dec ah // decrease code -01
2AF23 | 3C FE : cmp al,0FEh
2AF25 | 75 02 : bne 2AF29h
2AF27 | FE C4 : inc ah // increase code +01
2AF29 | 3C FB : cmp al,0FBh
2AF2B | 75 03 : bne 2AF30h
2AF2D | 80 EC 10 : sub ah,10h // decrease code -10
2AF30 | 3C F7 : cmp al,0F7h
2AF32 | 75 03 : bne 2AF37h
2AF34 | 80 C4 10 : add ah,10h // increase code +10
2AF37 | 88 27 : mov [bw],ah
2AF39 | 3C 7F : cmp al,7Fh
2AF3B | 75 04 : bne 2AF41h
2AF3D | 8A C4 : mov al,ah // play sound
2AF3F | EB 06 : br 2AF47h
2AF41 | 3C BF : cmp al,0BFh
2AF43 | 75 04 : bne 2AF49h
2AF45 | 32 C0 : xor al,al // stop sound
2AF47 | E6 00 : out 0h,al // send sound code
2AF49 | EB C8 : br 2AF13h
-->
</script>
<script state="run">
<output format="----- sound test mode -----" line="10" align="center" />
<output format="left : decrease code -01" line="11" align="center" />
<output format="right : increase code +01" line="12" align="center" />
<output format="down : decrease code -10" line="13" align="center" />
<output format="up : increase code +10" line="14" align="center" />
<output format="button 1 : play sound" line="15" align="center" />
<output format="button 2 : stop sound" line="16" align="center" />
<output format="----------------------------" line="17" align="center" />
<output format="<< sound code %02X >>" line="19" align="center" >
<argument>maincpu.pb@41000</argument>
</output>
</script>
<script state="off">
<action>maincpu.mq@00C5A = 1322E903741E4EFF</action>
<action>maincpu.mq@2AF10 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF18 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF20 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF28 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF30 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF38 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF40 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF48 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
<cheat desc="skip ram/rom check">
<script state="on">
<action>maincpu.md@3F860 = 330083E9</action>
</script>
<script state="off">
<action>maincpu.md@3F860 = 338000B9</action>
</script>
</cheat>
</mamecheat>
Code: Select all
<!-- R-Type (Japan) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>maincpu.mb@269D = EB</action>
</script>
<script state="off">
<action>maincpu.mb@269D = 75</action>
</script>
</cheat>
<cheat desc="rapid fire">
<script state="on">
<action>maincpu.mb@2607 = 21</action> <!-- shot -->
<action>maincpu.mb@2656 = 01</action> <!-- missile -->
</script>
<script state="off">
<action>maincpu.mb@2607 = 23</action>
<action>maincpu.mb@2656 = 3F</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter>
<item value="0x0100">01 (slow)</item>
<item value="0x0200">02 </item>
<item value="0x0400">03 </item>
<item value="0x0600">04 </item>
<item value="0x0800">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.mb@2517 = 33</action> <!-- fixed speed -->
</script>
<script state="change">
<action>maincpu.mw@11396 = param</action> <!-- right -->
<action>maincpu.mw@1139A = -param</action> <!-- left -->
<action>maincpu.mw@113A4 = -param</action> <!-- down -->
<action>maincpu.mw@113A6 = param</action> <!-- lower-right : right -->
<action>maincpu.mw@113A8 = -param</action> <!-- lower-right : down -->
<action>maincpu.mw@113AA = -param</action> <!-- lower-left : left -->
<action>maincpu.mw@113AC = -param</action> <!-- lower-left : down -->
<action>maincpu.mw@113B4 = param</action> <!-- up -->
<action>maincpu.mw@113B6 = param</action> <!-- upper-right : right -->
<action>maincpu.mw@113B8 = param</action> <!-- upper-right : up -->
<action>maincpu.mw@113BA = -param</action> <!-- upper-left : left -->
<action>maincpu.mw@113BC = param</action> <!-- upper-left : up -->
</script>
<script state="off">
<action>maincpu.mb@02517 = 03 </action>
<action>maincpu.mw@11396 = 0200</action>
<action>maincpu.mw@1139A = FE00</action>
<action>maincpu.mw@113A4 = FE50</action>
<action>maincpu.mw@113A6 = 0160</action>
<action>maincpu.mw@113A8 = FEC0</action>
<action>maincpu.mw@113AA = FEA0</action>
<action>maincpu.mw@113AC = FEC0</action>
<action>maincpu.mw@113B4 = 01B0</action>
<action>maincpu.mw@113B6 = 0160</action>
<action>maincpu.mw@113B8 = 0140</action>
<action>maincpu.mw@113BA = FEA0</action>
<action>maincpu.mw@113BC = 0140</action>
</script>
</cheat>
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mq@00B7A = 132BE92AF10000EA</action>
<action>maincpu.mq@2AF10 = 88C13A00E41000BB</action>
<action>maincpu.mq@2AF18 = 75FD3C278AF874C1</action>
<action>maincpu.mq@2AF20 = FE0275FE3CCCFE02</action>
<action>maincpu.mq@2AF28 = 10EC800375FB3CC4</action>
<action>maincpu.mq@2AF30 = 8810C4800375F73C</action>
<action>maincpu.mq@2AF38 = EBC48A04757F3C27</action>
<action>maincpu.mq@2AF40 = E6C0320475BF3C06</action>
<action>maincpu.mq@2AF48 = FFFFFFFFFFC8EB00</action>
<!--
2AF10 | BB 00 10 : mov bw,1000h // sound code address ($41000)
2AF13 | E4 00 : in al,0h // read input
2AF15 | 3A C1 : cmp al,cl
2AF17 | 88 C1 : mov cl,al
2AF19 | 74 F8 : be 2AF13h
2AF1B | 8A 27 : mov ah,[bw]
2AF1D | 3C FD : cmp al,0FDh
2AF1F | 75 02 : bne 2AF23h
2AF21 | FE CC : dec ah // decrease code -01
2AF23 | 3C FE : cmp al,0FEh
2AF25 | 75 02 : bne 2AF29h
2AF27 | FE C4 : inc ah // increase code +01
2AF29 | 3C FB : cmp al,0FBh
2AF2B | 75 03 : bne 2AF30h
2AF2D | 80 EC 10 : sub ah,10h // decrease code -10
2AF30 | 3C F7 : cmp al,0F7h
2AF32 | 75 03 : bne 2AF37h
2AF34 | 80 C4 10 : add ah,10h // increase code +10
2AF37 | 88 27 : mov [bw],ah
2AF39 | 3C 7F : cmp al,7Fh
2AF3B | 75 04 : bne 2AF41h
2AF3D | 8A C4 : mov al,ah // play sound
2AF3F | EB 06 : br 2AF47h
2AF41 | 3C BF : cmp al,0BFh
2AF43 | 75 04 : bne 2AF49h
2AF45 | 32 C0 : xor al,al // stop sound
2AF47 | E6 00 : out 0h,al // send sound code
2AF49 | EB C8 : br 2AF13h
-->
</script>
<script state="run">
<output format="----- sound test mode -----" line="10" align="center" />
<output format="left : decrease code -01" line="11" align="center" />
<output format="right : increase code +01" line="12" align="center" />
<output format="down : decrease code -10" line="13" align="center" />
<output format="up : increase code +10" line="14" align="center" />
<output format="button 1 : play sound" line="15" align="center" />
<output format="button 2 : stop sound" line="16" align="center" />
<output format="----------------------------" line="17" align="center" />
<output format="<< sound code %02X >>" line="19" align="center" >
<argument>maincpu.pb@41000</argument>
</output>
</script>
<script state="off">
<action>maincpu.mq@00B7A = 1426E903741E4EFF</action>
<action>maincpu.mq@2AF10 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF18 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF20 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF28 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF30 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF38 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF40 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF48 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
<cheat desc="skip ram/rom check">
<script state="on">
<action>maincpu.md@3F860 = 330083E9</action>
</script>
<script state="off">
<action>maincpu.md@3F860 = 338000B9</action>
</script>
</cheat>
</mamecheat>
Code: Select all
<!-- R-Type (Japan prototype) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>maincpu.mb@25E7 = EB</action>
</script>
<script state="off">
<action>maincpu.mb@25E7 = 75</action>
</script>
</cheat>
<cheat desc="rapid fire">
<script state="on">
<action>maincpu.mb@2551 = 1D</action> <!-- shot -->
<action>maincpu.mb@25A0 = 01</action> <!-- missile -->
</script>
<script state="off">
<action>maincpu.mb@2551 = 1F</action>
<action>maincpu.mb@25A0 = 3F</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter>
<item value="0x0100">01 (slow)</item>
<item value="0x0200">02 </item>
<item value="0x0400">03 </item>
<item value="0x0600">04 </item>
<item value="0x0800">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.mb@2461 = 33</action> <!-- fixed speed -->
</script>
<script state="change">
<action>maincpu.mw@11340 = param</action> <!-- right -->
<action>maincpu.mw@11344 = -param</action> <!-- left -->
<action>maincpu.mw@1134E = -param</action> <!-- down -->
<action>maincpu.mw@11350 = param</action> <!-- lower-right : right -->
<action>maincpu.mw@11352 = -param</action> <!-- lower-right : down -->
<action>maincpu.mw@11354 = -param</action> <!-- lower-left : left -->
<action>maincpu.mw@11356 = -param</action> <!-- lower-left : down -->
<action>maincpu.mw@1135E = param</action> <!-- up -->
<action>maincpu.mw@11360 = param</action> <!-- upper-right : right -->
<action>maincpu.mw@11362 = param</action> <!-- upper-right : up -->
<action>maincpu.mw@11364 = -param</action> <!-- upper-left : left -->
<action>maincpu.mw@11366 = param</action> <!-- upper-left : up -->
</script>
<script state="off">
<action>maincpu.mb@02461 = 03 </action>
<action>maincpu.mw@11340 = 0200</action>
<action>maincpu.mw@11344 = FE00</action>
<action>maincpu.mw@1134E = FE50</action>
<action>maincpu.mw@11350 = 0160</action>
<action>maincpu.mw@11352 = FEC0</action>
<action>maincpu.mw@11354 = FEA0</action>
<action>maincpu.mw@11356 = FEC0</action>
<action>maincpu.mw@1135E = 01B0</action>
<action>maincpu.mw@11360 = 0160</action>
<action>maincpu.mw@11362 = 0140</action>
<action>maincpu.mw@11364 = FEA0</action>
<action>maincpu.mw@11366 = 0140</action>
</script>
</cheat>
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mq@00BA1 = 1258E92AF10000EA</action>
<action>maincpu.mq@2AF10 = 88C13A00E41000BB</action>
<action>maincpu.mq@2AF18 = 75FD3C278AF874C1</action>
<action>maincpu.mq@2AF20 = FE0275FE3CCCFE02</action>
<action>maincpu.mq@2AF28 = 10EC800375FB3CC4</action>
<action>maincpu.mq@2AF30 = 8810C4800375F73C</action>
<action>maincpu.mq@2AF38 = EBC48A04757F3C27</action>
<action>maincpu.mq@2AF40 = E6C0320475BF3C06</action>
<action>maincpu.mq@2AF48 = FFFFFFFFFFC8EB00</action>
<!--
2AF10 | BB 00 10 : mov bw,1000h // sound code address ($41000)
2AF13 | E4 00 : in al,0h // read input
2AF15 | 3A C1 : cmp al,cl
2AF17 | 88 C1 : mov cl,al
2AF19 | 74 F8 : be 2AF13h
2AF1B | 8A 27 : mov ah,[bw]
2AF1D | 3C FD : cmp al,0FDh
2AF1F | 75 02 : bne 2AF23h
2AF21 | FE CC : dec ah // decrease code -01
2AF23 | 3C FE : cmp al,0FEh
2AF25 | 75 02 : bne 2AF29h
2AF27 | FE C4 : inc ah // increase code +01
2AF29 | 3C FB : cmp al,0FBh
2AF2B | 75 03 : bne 2AF30h
2AF2D | 80 EC 10 : sub ah,10h // decrease code -10
2AF30 | 3C F7 : cmp al,0F7h
2AF32 | 75 03 : bne 2AF37h
2AF34 | 80 C4 10 : add ah,10h // increase code +10
2AF37 | 88 27 : mov [bw],ah
2AF39 | 3C 7F : cmp al,7Fh
2AF3B | 75 04 : bne 2AF41h
2AF3D | 8A C4 : mov al,ah // play sound
2AF3F | EB 06 : br 2AF47h
2AF41 | 3C BF : cmp al,0BFh
2AF43 | 75 04 : bne 2AF49h
2AF45 | 32 C0 : xor al,al // stop sound
2AF47 | E6 00 : out 0h,al // send sound code
2AF49 | EB C8 : br 2AF13h
-->
</script>
<script state="run">
<output format="----- sound test mode -----" line="10" align="center" />
<output format="left : decrease code -01" line="11" align="center" />
<output format="right : increase code +01" line="12" align="center" />
<output format="down : decrease code -10" line="13" align="center" />
<output format="up : increase code +10" line="14" align="center" />
<output format="button 1 : play sound" line="15" align="center" />
<output format="button 2 : stop sound" line="16" align="center" />
<output format="----------------------------" line="17" align="center" />
<output format="<< sound code %02X >>" line="19" align="center" >
<argument>maincpu.pb@41000</argument>
</output>
</script>
<script state="off">
<action>maincpu.mq@00BA1 = 1353E903741E4EFF</action>
<action>maincpu.mq@2AF10 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF18 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF20 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF28 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF30 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF38 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF40 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF48 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
<cheat desc="skip ram/rom check">
<script state="on">
<action>maincpu.md@3F866 = 33006BE9</action>
</script>
<script state="off">
<action>maincpu.md@3F866 = 338000B9</action>
</script>
</cheat>
</mamecheat>
Code: Select all
<!-- R-Type (US) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>maincpu.mb@26AF = EB</action>
</script>
<script state="off">
<action>maincpu.mb@26AF = 75</action>
</script>
</cheat>
<cheat desc="rapid fire">
<script state="on">
<action>maincpu.mb@2619 = 21</action> <!-- shot -->
<action>maincpu.mb@2668 = 01</action> <!-- missile -->
</script>
<script state="off">
<action>maincpu.mb@25E3 = 23</action>
<action>maincpu.mb@2668 = 3F</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter>
<item value="0x0100">01 (slow)</item>
<item value="0x0200">02 </item>
<item value="0x0400">03 </item>
<item value="0x0600">04 </item>
<item value="0x0800">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.mb@2529 = 33</action> <!-- fixed speed -->
</script>
<script state="change">
<action>maincpu.mw@11224 = param</action> <!-- right -->
<action>maincpu.mw@11228 = -param</action> <!-- left -->
<action>maincpu.mw@11232 = -param</action> <!-- down -->
<action>maincpu.mw@11234 = param</action> <!-- lower-right : right -->
<action>maincpu.mw@11236 = -param</action> <!-- lower-right : down -->
<action>maincpu.mw@11238 = -param</action> <!-- lower-left : left -->
<action>maincpu.mw@1123A = -param</action> <!-- lower-left : down -->
<action>maincpu.mw@11242 = param</action> <!-- up -->
<action>maincpu.mw@11244 = param</action> <!-- upper-right : right -->
<action>maincpu.mw@11246 = param</action> <!-- upper-right : up -->
<action>maincpu.mw@11248 = -param</action> <!-- upper-left : left -->
<action>maincpu.mw@1124A = param</action> <!-- upper-left : up -->
</script>
<script state="off">
<action>maincpu.mb@02529 = 03 </action>
<action>maincpu.mw@11224 = 0200</action>
<action>maincpu.mw@11228 = FE00</action>
<action>maincpu.mw@11232 = FE50</action>
<action>maincpu.mw@11234 = 0160</action>
<action>maincpu.mw@11236 = FEC0</action>
<action>maincpu.mw@11238 = FEA0</action>
<action>maincpu.mw@1123A = FEC0</action>
<action>maincpu.mw@11242 = 01B0</action>
<action>maincpu.mw@11244 = 0160</action>
<action>maincpu.mw@11246 = 0140</action>
<action>maincpu.mw@11248 = FEA0</action>
<action>maincpu.mw@1124A = 0140</action>
</script>
</cheat>
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mq@00C5A = 1322E92AF10000EA</action>
<action>maincpu.mq@2AF10 = 88C13A00E41000BB</action>
<action>maincpu.mq@2AF18 = 75FD3C278AF874C1</action>
<action>maincpu.mq@2AF20 = FE0275FE3CCCFE02</action>
<action>maincpu.mq@2AF28 = 10EC800375FB3CC4</action>
<action>maincpu.mq@2AF30 = 8810C4800375F73C</action>
<action>maincpu.mq@2AF38 = EBC48A04757F3C27</action>
<action>maincpu.mq@2AF40 = E6C0320475BF3C06</action>
<action>maincpu.mq@2AF48 = FFFFFFFFFFC8EB00</action>
<!--
2AF10 | BB 00 10 : mov bw,1000h // sound code address ($41000)
2AF13 | E4 00 : in al,0h // read input
2AF15 | 3A C1 : cmp al,cl
2AF17 | 88 C1 : mov cl,al
2AF19 | 74 F8 : be 2AF13h
2AF1B | 8A 27 : mov ah,[bw]
2AF1D | 3C FD : cmp al,0FDh
2AF1F | 75 02 : bne 2AF23h
2AF21 | FE CC : dec ah // decrease code -01
2AF23 | 3C FE : cmp al,0FEh
2AF25 | 75 02 : bne 2AF29h
2AF27 | FE C4 : inc ah // increase code +01
2AF29 | 3C FB : cmp al,0FBh
2AF2B | 75 03 : bne 2AF30h
2AF2D | 80 EC 10 : sub ah,10h // decrease code -10
2AF30 | 3C F7 : cmp al,0F7h
2AF32 | 75 03 : bne 2AF37h
2AF34 | 80 C4 10 : add ah,10h // increase code +10
2AF37 | 88 27 : mov [bw],ah
2AF39 | 3C 7F : cmp al,7Fh
2AF3B | 75 04 : bne 2AF41h
2AF3D | 8A C4 : mov al,ah // play sound
2AF3F | EB 06 : br 2AF47h
2AF41 | 3C BF : cmp al,0BFh
2AF43 | 75 04 : bne 2AF49h
2AF45 | 32 C0 : xor al,al // stop sound
2AF47 | E6 00 : out 0h,al // send sound code
2AF49 | EB C8 : br 2AF13h
-->
</script>
<script state="run">
<output format="----- sound test mode -----" line="10" align="center" />
<output format="left : decrease code -01" line="11" align="center" />
<output format="right : increase code +01" line="12" align="center" />
<output format="down : decrease code -10" line="13" align="center" />
<output format="up : increase code +10" line="14" align="center" />
<output format="button 1 : play sound" line="15" align="center" />
<output format="button 2 : stop sound" line="16" align="center" />
<output format="----------------------------" line="17" align="center" />
<output format="<< sound code %02X >>" line="19" align="center" >
<argument>maincpu.pb@41000</argument>
</output>
</script>
<script state="off">
<action>maincpu.mq@00C5A = 1358E903741E4EFF</action>
<action>maincpu.mq@2AF10 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF18 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF20 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF28 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF30 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF38 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF40 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF48 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
<cheat desc="skip ram/rom check">
<script state="on">
<action>maincpu.md@3F860 = 330083E9</action>
</script>
<script state="off">
<action>maincpu.md@3F860 = 338000B9</action>
</script>
</cheat>
</mamecheat>
Code: Select all
<!-- R-Type (World bootleg) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>maincpu.mb@269D = EB</action>
</script>
<script state="off">
<action>maincpu.mb@269D = 75</action>
</script>
</cheat>
<cheat desc="rapid fire">
<script state="on">
<action>maincpu.mb@2607 = 21</action> <!-- shot -->
<action>maincpu.mb@2656 = 01</action> <!-- missile -->
</script>
<script state="off">
<action>maincpu.mb@2607 = 23</action>
<action>maincpu.mb@2656 = 3F</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter>
<item value="0x0100">01 (slow)</item>
<item value="0x0200">02 </item>
<item value="0x0400">03 </item>
<item value="0x0600">04 </item>
<item value="0x0800">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.mb@2517 = 33</action> <!-- fixed speed -->
</script>
<script state="change">
<action>maincpu.mw@11396 = param</action> <!-- right -->
<action>maincpu.mw@1139A = -param</action> <!-- left -->
<action>maincpu.mw@113A4 = -param</action> <!-- down -->
<action>maincpu.mw@113A6 = param</action> <!-- lower-right : right -->
<action>maincpu.mw@113A8 = -param</action> <!-- lower-right : down -->
<action>maincpu.mw@113AA = -param</action> <!-- lower-left : left -->
<action>maincpu.mw@113AC = -param</action> <!-- lower-left : down -->
<action>maincpu.mw@113B4 = param</action> <!-- up -->
<action>maincpu.mw@113B6 = param</action> <!-- upper-right : right -->
<action>maincpu.mw@113B8 = param</action> <!-- upper-right : up -->
<action>maincpu.mw@113BA = -param</action> <!-- upper-left : left -->
<action>maincpu.mw@113BC = param</action> <!-- upper-left : up -->
</script>
<script state="off">
<action>maincpu.mb@02517 = 03 </action>
<action>maincpu.mw@11396 = 0200</action>
<action>maincpu.mw@1139A = FE00</action>
<action>maincpu.mw@113A4 = FE50</action>
<action>maincpu.mw@113A6 = 0160</action>
<action>maincpu.mw@113A8 = FEC0</action>
<action>maincpu.mw@113AA = FEA0</action>
<action>maincpu.mw@113AC = FEC0</action>
<action>maincpu.mw@113B4 = 01B0</action>
<action>maincpu.mw@113B6 = 0160</action>
<action>maincpu.mw@113B8 = 0140</action>
<action>maincpu.mw@113BA = FEA0</action>
<action>maincpu.mw@113BC = 0140</action>
</script>
</cheat>
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mq@00B7A = 1426E92AF10000EA</action>
<action>maincpu.mq@2AF10 = 88C13A00E41000BB</action>
<action>maincpu.mq@2AF18 = 75FD3C278AF874C1</action>
<action>maincpu.mq@2AF20 = FE0275FE3CCCFE02</action>
<action>maincpu.mq@2AF28 = 10EC800375FB3CC4</action>
<action>maincpu.mq@2AF30 = 8810C4800375F73C</action>
<action>maincpu.mq@2AF38 = EBC48A04757F3C27</action>
<action>maincpu.mq@2AF40 = E6C0320475BF3C06</action>
<action>maincpu.mq@2AF48 = FFFFFFFFFFC8EB00</action>
<!--
2AF10 | BB 00 10 : mov bw,1000h // sound code address ($41000)
2AF13 | E4 00 : in al,0h // read input
2AF15 | 3A C1 : cmp al,cl
2AF17 | 88 C1 : mov cl,al
2AF19 | 74 F8 : be 2AF13h
2AF1B | 8A 27 : mov ah,[bw]
2AF1D | 3C FD : cmp al,0FDh
2AF1F | 75 02 : bne 2AF23h
2AF21 | FE CC : dec ah // decrease code -01
2AF23 | 3C FE : cmp al,0FEh
2AF25 | 75 02 : bne 2AF29h
2AF27 | FE C4 : inc ah // increase code +01
2AF29 | 3C FB : cmp al,0FBh
2AF2B | 75 03 : bne 2AF30h
2AF2D | 80 EC 10 : sub ah,10h // decrease code -10
2AF30 | 3C F7 : cmp al,0F7h
2AF32 | 75 03 : bne 2AF37h
2AF34 | 80 C4 10 : add ah,10h // increase code +10
2AF37 | 88 27 : mov [bw],ah
2AF39 | 3C 7F : cmp al,7Fh
2AF3B | 75 04 : bne 2AF41h
2AF3D | 8A C4 : mov al,ah // play sound
2AF3F | EB 06 : br 2AF47h
2AF41 | 3C BF : cmp al,0BFh
2AF43 | 75 04 : bne 2AF49h
2AF45 | 32 C0 : xor al,al // stop sound
2AF47 | E6 00 : out 0h,al // send sound code
2AF49 | EB C8 : br 2AF13h
-->
</script>
<script state="run">
<output format="----- sound test mode -----" line="10" align="center" />
<output format="left : decrease code -01" line="11" align="center" />
<output format="right : increase code +01" line="12" align="center" />
<output format="down : decrease code -10" line="13" align="center" />
<output format="up : increase code +10" line="14" align="center" />
<output format="button 1 : play sound" line="15" align="center" />
<output format="button 2 : stop sound" line="16" align="center" />
<output format="----------------------------" line="17" align="center" />
<output format="<< sound code %02X >>" line="19" align="center" >
<argument>maincpu.pb@41000</argument>
</output>
</script>
<script state="off">
<action>maincpu.mq@00B7A = 1426E903741E4EFF</action>
<action>maincpu.mq@2AF10 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF18 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF20 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF28 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF30 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF38 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF40 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF48 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
<cheat desc="skip ram/rom check">
<script state="on">
<action>maincpu.md@3F860 = 330083E9</action>
</script>
<script state="off">
<action>maincpu.md@3F860 = 338000B9</action>
</script>
</cheat>
</mamecheat>
Code: Select all
<!-- R-Type (Japan, bootleg M82 conversion) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>maincpu.mb@269D = EB</action>
</script>
<script state="off">
<action>maincpu.mb@269D = 75</action>
</script>
</cheat>
<cheat desc="rapid fire">
<script state="on">
<action>maincpu.mb@2607 = 21</action> <!-- shot -->
<action>maincpu.mb@2656 = 01</action> <!-- missile -->
</script>
<script state="off">
<action>maincpu.mb@2607 = 23</action>
<action>maincpu.mb@2656 = 3F</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter>
<item value="0x0100">01 (slow)</item>
<item value="0x0200">02 </item>
<item value="0x0400">03 </item>
<item value="0x0600">04 </item>
<item value="0x0800">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.mb@2517 = 33</action> <!-- fixed speed -->
</script>
<script state="change">
<action>maincpu.mw@11396 = param</action> <!-- right -->
<action>maincpu.mw@1139A = -param</action> <!-- left -->
<action>maincpu.mw@113A4 = -param</action> <!-- down -->
<action>maincpu.mw@113A6 = param</action> <!-- lower-right : right -->
<action>maincpu.mw@113A8 = -param</action> <!-- lower-right : down -->
<action>maincpu.mw@113AA = -param</action> <!-- lower-left : left -->
<action>maincpu.mw@113AC = -param</action> <!-- lower-left : down -->
<action>maincpu.mw@113B4 = param</action> <!-- up -->
<action>maincpu.mw@113B6 = param</action> <!-- upper-right : right -->
<action>maincpu.mw@113B8 = param</action> <!-- upper-right : up -->
<action>maincpu.mw@113BA = -param</action> <!-- upper-left : left -->
<action>maincpu.mw@113BC = param</action> <!-- upper-left : up -->
</script>
<script state="off">
<action>maincpu.mb@02517 = 03 </action>
<action>maincpu.mw@11396 = 0200</action>
<action>maincpu.mw@1139A = FE00</action>
<action>maincpu.mw@113A4 = FE50</action>
<action>maincpu.mw@113A6 = 0160</action>
<action>maincpu.mw@113A8 = FEC0</action>
<action>maincpu.mw@113AA = FEA0</action>
<action>maincpu.mw@113AC = FEC0</action>
<action>maincpu.mw@113B4 = 01B0</action>
<action>maincpu.mw@113B6 = 0160</action>
<action>maincpu.mw@113B8 = 0140</action>
<action>maincpu.mw@113BA = FEA0</action>
<action>maincpu.mw@113BC = 0140</action>
</script>
</cheat>
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mq@00B7A = 132BE92AF10000EA</action>
<action>maincpu.mq@2AF10 = 88C13A00E41000BB</action>
<action>maincpu.mq@2AF18 = 75FD3C278AF874C1</action>
<action>maincpu.mq@2AF20 = FE0275FE3CCCFE02</action>
<action>maincpu.mq@2AF28 = 10EC800375FB3CC4</action>
<action>maincpu.mq@2AF30 = 8810C4800375F73C</action>
<action>maincpu.mq@2AF38 = EBC48A04757F3C27</action>
<action>maincpu.mq@2AF40 = E6C0320475BF3C06</action>
<action>maincpu.mq@2AF48 = FFFFFFFFFFC8EB00</action>
<!--
2AF10 | BB 00 10 : mov bw,1000h // sound code address ($D1000)
2AF13 | E4 00 : in al,0h // read input
2AF15 | 3A C1 : cmp al,cl
2AF17 | 88 C1 : mov cl,al
2AF19 | 74 F8 : be 2AF13h
2AF1B | 8A 27 : mov ah,[bw]
2AF1D | 3C FD : cmp al,0FDh
2AF1F | 75 02 : bne 2AF23h
2AF21 | FE CC : dec ah // decrease code -01
2AF23 | 3C FE : cmp al,0FEh
2AF25 | 75 02 : bne 2AF29h
2AF27 | FE C4 : inc ah // increase code +01
2AF29 | 3C FB : cmp al,0FBh
2AF2B | 75 03 : bne 2AF30h
2AF2D | 80 EC 10 : sub ah,10h // decrease code -10
2AF30 | 3C F7 : cmp al,0F7h
2AF32 | 75 03 : bne 2AF37h
2AF34 | 80 C4 10 : add ah,10h // increase code +10
2AF37 | 88 27 : mov [bw],ah
2AF39 | 3C 7F : cmp al,7Fh
2AF3B | 75 04 : bne 2AF41h
2AF3D | 8A C4 : mov al,ah // play sound
2AF3F | EB 06 : br 2AF47h
2AF41 | 3C BF : cmp al,0BFh
2AF43 | 75 04 : bne 2AF49h
2AF45 | 32 C0 : xor al,al // stop sound
2AF47 | E6 00 : out 0h,al // send sound code
2AF49 | EB C8 : br 2AF13h
-->
</script>
<script state="run">
<output format="----- sound test mode -----" line="10" align="center" />
<output format="left : decrease code -01" line="11" align="center" />
<output format="right : increase code +01" line="12" align="center" />
<output format="down : decrease code -10" line="13" align="center" />
<output format="up : increase code +10" line="14" align="center" />
<output format="button 1 : play sound" line="15" align="center" />
<output format="button 2 : stop sound" line="16" align="center" />
<output format="----------------------------" line="17" align="center" />
<output format="<< sound code %02X >>" line="19" align="center" >
<argument>maincpu.pb@D1000</argument>
</output>
</script>
<script state="off">
<action>maincpu.mq@00B7A = 1426E903741E4EFF</action>
<action>maincpu.mq@2AF10 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF18 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF20 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF28 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF30 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF38 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF40 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@2AF48 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
<cheat desc="skip ram/rom check">
<script state="on">
<action>maincpu.md@3F860 = 330083E9</action>
</script>
<script state="off">
<action>maincpu.md@3F860 = 338000B9</action>
</script>
</cheat>
</mamecheat>