Clean up all codes.
Code: Select all
<cheat desc="no hit">
<script state="on">
<action>maincpu.mb@6384 = 60</action>
</script>
<script state="off">
<action>maincpu.mb@6384 = 66</action>
</script>
</cheat>
<cheat desc="auto fire">
<script state="on">
<action>maincpu.mb@e093 = 01</action>
</script>
<script state="off">
<action>maincpu.mb@e093 = 3c</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter>
<item value="0x0014">01 (slow)</item>
<item value="0x0028">02 </item>
<item value="0x003c">03 </item>
<item value="0x0050">04 </item>
<item value="0x0064">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.md@103b8 = 4eb86670</action>
<action>maincpu.mq@06670 = 0200000f323c0000</action>
<action>maincpu.mq@06678 = 4a006606323c0028</action>
<action>maincpu.mq@06680 = 4a004e75ffffffff</action>
<!--
6670 | 0200 000f : andi.b #$f,D0
6674 | 323c xxxx : move.w #$xx,D1
6678 | 4a00 : tst.b D0
667a | 6606 : bne $6682
667c | 323c 0028 : move.w #$28,D1
6680 | 4a00 : tst.b D0
6682 | 4e75 : rts
-->
</script>
<script state="change">
<action>maincpu.mw@6676 = param</action>
</script>
<script state="off">
<action>maincpu.md@103b8 = 0200000f</action>
<action>maincpu.mq@06670 = ffffffffffffffff</action>
<action>maincpu.mq@06678 = ffffffffffffffff</action>
<action>maincpu.mq@06680 = ffffffffffffffff</action>
</script>
</cheat>
<cheat desc="bullet speed">
<parameter>
<item value="0x0020">01 (slow)</item>
<item value="0x0040">02 </item>
<item value="0x0060">03 </item>
<item value="0x0080">04 </item>
<item value="0x00a0">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.md@11b52 = 4eb86690</action>
<action>maincpu.mq@06690 = 3829000a4a446706</action>
<action>maincpu.mq@06698 = 6a04383c00004e75</action>
<!--
6690 | 3829 000a : move.w ($a,A1),D4
6694 | 4a44 : tst.w D4
6696 | 6706 : beq $669e
6698 | 6a04 : bpl $669e
669a | 383c xxxx : move.w #$xx,D4
669e | 4e75 : rts
-->
</script>
<script state="change">
<action>maincpu.mw@669c = -param</action>
</script>
<script state="off">
<action>maincpu.md@11b52 = 3829000a</action>
<action>maincpu.mq@06690 = ffffffffffffffff</action>
<action>maincpu.mq@06698 = ffffffffffffffff</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@007ca = 4ef9000396a00c10</action>
<action>maincpu.mq@396a0 = 41f90010010043f9</action>
<action>maincpu.mq@396a8 = 0015001112001029</action>
<action>maincpu.mq@396b0 = 0040b20067f60c00</action>
<action>maincpu.mq@396b8 = 00fd660253100c00</action>
<action>maincpu.mq@396c0 = 00fe660252100c00</action>
<action>maincpu.mq@396c8 = 00fb660404100010</action>
<action>maincpu.mq@396d0 = 0c0000f766040610</action>
<action>maincpu.mq@396d8 = 00100c0000ef6602</action>
<action>maincpu.mq@396e0 = 12900c0000df6604</action>
<action>maincpu.mq@396e8 = 12bc00ff60beffff</action>
<!--
396a0 | 41f9 0010 0100 : lea $100100.l,A0 // sound code address
396a6 | 43f9 0015 0011 : lea $150011.l,A1 // sound latch address
396ac | 1200 : move.b D0,D1
396ae | 1029 0040 : move.b ($40,A1),D0 // read input
396b2 | b200 : cmp.b D0,D1
396b4 | 67f6 : beq $396ac
396b6 | 0c00 00fd : cmpi.b #-$3,D0
396ba | 6602 : bne $396be
396bc | 5310 : subq.b #1,(A0) // decrease code -01
396be | 0c00 00fe : cmpi.b #-$2,D0
396c2 | 6602 : bne $396c6
396c4 | 5210 : addq.b #1,(A0) // increase code +01
396c6 | 0c00 00fb : cmpi.b #-$5,D0
396ca | 6604 : bne $396d0
396cc | 0410 0010 : subi.b #$10,(A0) // decrease code -10
396d0 | 0c00 00f7 : cmpi.b #-$9,D0
396d4 | 6604 : bne $396da
396d6 | 0610 0010 : addi.b #$10,(A0) // increase code +10
396da | 0c00 00ef : cmpi.b #-$11,D0
396de | 6602 : bne $396e2
396e0 | 1290 : move.b (A0),(A1) // play sound
396e2 | 0c00 00df : cmpi.b #-$21,D0
396e6 | 6604 : bne $396ec
396e8 | 12bc 00ff : move.b #$ff,(A1) // stop sound
396ec | 60be : bra $396ac
-->
</script>
<script state="run">
<output format="----- final star force 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 %2.2X >>" line="19" align="center" >
<argument>maincpu.pb@100100</argument>
</output>
</script>
<script state="off">
<action>maincpu.mq@007ca = 41f9001000000c10</action>
<action>maincpu.mq@396a0 = ffffffffffffffff</action>
<action>maincpu.mq@396a8 = ffffffffffffffff</action>
<action>maincpu.mq@396b0 = ffffffffffffffff</action>
<action>maincpu.mq@396b8 = ffffffffffffffff</action>
<action>maincpu.mq@396c0 = ffffffffffffffff</action>
<action>maincpu.mq@396c8 = ffffffffffffffff</action>
<action>maincpu.mq@396d0 = ffffffffffffffff</action>
<action>maincpu.mq@396d8 = ffffffffffffffff</action>
<action>maincpu.mq@396e0 = ffffffffffffffff</action>
<action>maincpu.mq@396e8 = ffffffffffffffff</action>
</script>
</cheat>
<cheat desc="skip rom check">
<script state="on">
<action>maincpu.mb@1ad57 = 56</action> <!-- skip rom check -->
<action>maincpu.mw@1a102 = 0001</action> <!-- skip result screen -->
</script>
<script state="off">
<action>maincpu.mb@1ad57 = 0a</action>
<action>maincpu.mw@1a102 = 012c</action>
</script>
</cheat>
I confirm that all sets for fstarfrc use the same codes and addresses except "sound test mode" for fstarfrcw.
Code: Select all
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mq@00734 = 4ef9000396a00c10</action>
<action>maincpu.mq@396a0 = 41f90010010043f9</action>
<action>maincpu.mq@396a8 = 0015001112001029</action>
<action>maincpu.mq@396b0 = 0040b20067f60c00</action>
<action>maincpu.mq@396b8 = 00fd660253100c00</action>
<action>maincpu.mq@396c0 = 00fe660252100c00</action>
<action>maincpu.mq@396c8 = 00fb660404100010</action>
<action>maincpu.mq@396d0 = 0c0000f766040610</action>
<action>maincpu.mq@396d8 = 00100c0000ef6602</action>
<action>maincpu.mq@396e0 = 12900c0000df6604</action>
<action>maincpu.mq@396e8 = 12bc00ff60beffff</action>
<!--
396a0 | 41f9 0010 0100 : lea $100100.l,A0 // sound code address
396a6 | 43f9 0015 0011 : lea $150011.l,A1 // sound latch address
396ac | 1200 : move.b D0,D1
396ae | 1029 0040 : move.b ($40,A1),D0 // read input
396b2 | b200 : cmp.b D0,D1
396b4 | 67f6 : beq $396ac
396b6 | 0c00 00fd : cmpi.b #-$3,D0
396ba | 6602 : bne $396be
396bc | 5310 : subq.b #1,(A0) // decrease code -01
396be | 0c00 00fe : cmpi.b #-$2,D0
396c2 | 6602 : bne $396c6
396c4 | 5210 : addq.b #1,(A0) // increase code +01
396c6 | 0c00 00fb : cmpi.b #-$5,D0
396ca | 6604 : bne $396d0
396cc | 0410 0010 : subi.b #$10,(A0) // decrease code -10
396d0 | 0c00 00f7 : cmpi.b #-$9,D0
396d4 | 6604 : bne $396da
396d6 | 0610 0010 : addi.b #$10,(A0) // increase code +10
396da | 0c00 00ef : cmpi.b #-$11,D0
396de | 6602 : bne $396e2
396e0 | 1290 : move.b (A0),(A1) // play sound
396e2 | 0c00 00df : cmpi.b #-$21,D0
396e6 | 6604 : bne $396ec
396e8 | 12bc 00ff : move.b #$ff,(A1) // stop sound
396ec | 60be : bra $396ac
-->
</script>
<script state="run">
<output format="----- final star force 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 %2.2X >>" line="19" align="center" >
<argument>maincpu.pb@100100</argument>
</output>
</script>
<script state="off">
<action>maincpu.mq@00734 = 41f9001000000c10</action>
<action>maincpu.mq@396a0 = ffffffffffffffff</action>
<action>maincpu.mq@396a8 = ffffffffffffffff</action>
<action>maincpu.mq@396b0 = ffffffffffffffff</action>
<action>maincpu.mq@396b8 = ffffffffffffffff</action>
<action>maincpu.mq@396c0 = ffffffffffffffff</action>
<action>maincpu.mq@396c8 = ffffffffffffffff</action>
<action>maincpu.mq@396d0 = ffffffffffffffff</action>
<action>maincpu.mq@396d8 = ffffffffffffffff</action>
<action>maincpu.mq@396e0 = ffffffffffffffff</action>
<action>maincpu.mq@396e8 = ffffffffffffffff</action>
</script>
</cheat>