Page 1 of 1
[dogfight] Dog Fight
Posted: Wed Jun 30, 2021 2:29 pm
by jman
Code: Select all
<cheat desc="no hit">
<script state="on">
<action>maincpu.mb@1910 = c9</action>
</script>
<script state="off">
<action>maincpu.mb@1910 = 21</action>
</script>
</cheat>
<cheat desc="auto fire">
<script state="on">
<action>maincpu.mb@1af5 = 01</action>
</script>
<script state="off">
<action>maincpu.mb@1af5 = 1a</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter min="0x01" max="0x08" step="0x01" />
<script state="on">
<action>maincpu.mb@1a89 = 00</action>
</script>
<script state="change">
<action>maincpu.mb@1a7c = param</action>
<action>maincpu.mb@1a82 = -param</action>
</script>
<script state="off">
<action>maincpu.mb@1a89 = 01</action>
<action>maincpu.mb@1a7c = 01</action>
<action>maincpu.mb@1a82 = fe</action>
</script>
</cheat>
<cheat desc="bullet spped">
<parameter>
<item value="0x01">01 (slow)</item>
<item value="0x06">02 </item>
<item value="0x0c">03 </item>
<item value="0x12">04 </item>
<item value="0x18">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.md@1c11 = 86cfb0cd</action>
<action>maincpu.mq@cfb0 = ffffffc92b2b003e</action>
<!--
1c11 | cd b0 cf : call $cfb0
cfb0 | 3e xx : ld $xx
cfb2 | 2b : dec hl
cfb3 | 2b : dec hl
cfb4 | c9 : ret
-->
</script>
<script state="change">
<action>maincpu.mb@cfb1 = param</action>
</script>
<script state="off">
<action>maincpu.md@1c11 = 862b2b1a</action>
<action>maincpu.mq@cfb0 = 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.mw@0006 = 0599</action> <!-- skip some boot sequences -->
<action>maincpu.md@062d = 09cfc0c3</action>
<action>maincpu.mq@cfc0 = 843a590022000021</action>
<action>maincpu.mq@cfc8 = 2080fef6286fbd60</action>
<action>maincpu.mq@cfd0 = fe24012008fe2501</action>
<action>maincpu.mq@cfd8 = 20fe06187c032040</action>
<action>maincpu.mq@cfe0 = 18609032f23e0520</action>
<action>maincpu.mq@cfe8 = ffffffffffffffda</action>
<!--
cfc0 | 21 00 00 : ld hl,$0000 // initialize sound and input values
cfc3 | 22 00 59 : ld ($5900),hl
cfc6 | 3a 84 60 : ld a,($6084) // read input
cfc9 | bd : cp l
cfca | 6f : ld l,a
cfcb | 28 f6 : jr z,$cfc3
cfcd | fe 80 : cp $80
cfcf | 20 01 : jr nz,$cfd2
cfd1 | 25 : dec h // decrease code
cfd2 | fe 08 : cp $08
cfd4 | 20 01 : jr nz,$cfd7
cfd6 | 24 : inc h // increase code
cfd7 | fe 40 : cp $40
cfd9 | 20 03 : jr nz,$cfde
cfdb | 7c : ld a,h // play sound
cfdc | 18 06 : jr $cfe4
cfde | fe 20 : cp $20
cfe0 | 20 05 : jr nz,$cfe7
cfe2 | 3e f2 : ld a,$f2 // stop sound
cfe4 | 32 90 60 : ld ($6090),a // send sound code
cfe7 | 18 da : jr $cfc3
-->
</script>
<script state="run">
<output format="----- dog fight sound test mode -----" line="10" align="center" />
<output format="left : decrease code" line="11" align="center" />
<output format="right : increase code" line="12" align="center" />
<output format="P1 button 1 : play sound" line="13" align="center" />
<output format="P2 button 1 : stop sound" line="14" align="center" />
<output format="----------------------------" line="15" align="center" />
<output format="<< sound code %2.2X >>" line="17" align="center">
<argument>maincpu.pb@5901</argument>
</output>
</script>
<script state="off">
<action>maincpu.mw@0006 = 4bf3</action>
<action>maincpu.md@062d = 09001001</action>
<action>maincpu.mq@cfc0 = ffffffffffffffff</action>
<action>maincpu.mq@cfc8 = ffffffffffffffff</action>
<action>maincpu.mq@cfd0 = ffffffffffffffff</action>
<action>maincpu.mq@cfd8 = ffffffffffffffff</action>
<action>maincpu.mq@cfe0 = ffffffffffffffff</action>
<action>maincpu.mq@cfe8 = ffffffffffffffff</action>
</script>
</cheat>
<cheat desc="skip ram/rom check">
<script state="on">
<action> maincpu.mw@4c03 = 2b18</action> <!-- maincpu : ram -->
<action> maincpu.mw@4d35 = 1f18</action> <!-- maincpu : rom -->
<action>audiocpu.mw@0b9c = 2818</action> <!-- audiocpu : ram -->
<action>audiocpu.mw@0be2 = 1518</action> <!-- audiocpu : rom -->
</script>
<script state="off">
<action> maincpu.mw@4c03 = 21dd</action>
<action> maincpu.mw@4d35 = 0021</action>
<action>audiocpu.mw@0b9c = 21dd</action>
<action>audiocpu.mw@0be2 = 0021</action>
</script>
</cheat>
[dogfight] Dog Fight (update)
Posted: Tue Dec 06, 2022 1:35 pm
by jman
Code: Select all
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mw@0006 = 0599</action> <!-- skip some boot sequences -->
<action>maincpu.mq@062d = 234f362006900121</action>
<action>maincpu.mq@0635 = 833a590021fa1023</action>
<action>maincpu.mq@063d = e660843a4f01e660</action>
<action>maincpu.mq@0645 = 80fef02847b8b1e8</action>
<action>maincpu.mq@064d = 34012008fe350120</action>
<action>maincpu.mq@0655 = 0618f03e0420a0fe</action>
<action>maincpu.mq@065d = 7786103e052028fe</action>
<action>maincpu.mq@0665 = 06187e032040fe78</action>
<action>maincpu.mq@066d = 9032f23e052001fe</action>
<action>maincpu.mq@0675 = eda0eda0edc31860</action>
<!--
062d | 21 01 90 : ld hl,$9001 // paint screen black
0630 | 06 20 : ld b,$20
0632 | 36 4f : ld (hl),$4F
0634 | 23 : inc hl
0635 | 23 : inc hl
0636 | 10 fa : djnz $0632
0638 | 21 00 59 : ld hl,$5900 // sound code address
063b | 3a 83 60 : ld a,($6083) // read start button
063e | e6 01 : and $01
0640 | 4f : ld c,a
0641 | 3a 84 60 : ld a,($6084) // read other inputs
0644 | e6 e8 : and $E8
0646 | b1 : or c
0647 | b8 : cp b
0648 | 47 : ld b,a
0649 | 28 f0 : jr z,$063B
064b | fe 80 : cp $80
064d | 20 01 : jr nz,$0650
064f | 35 : dec (hl) // decrease code -01
0650 | fe 08 : cp $08
0652 | 20 01 : jr nz,$0655
0654 | 34 : inc (hl) // increase code +01
0655 | fe a0 : cp $A0
0657 | 20 04 : jr nz,$065D
0659 | 3e f0 : ld a,$F0 // decrease code -10
065b | 18 06 : jr $0663
065d | fe 28 : cp $28
065f | 20 05 : jr nz,$0666
0661 | 3e 10 : ld a,$10 // increase code +10
0663 | 86 : add a,(hl)
0664 | 77 : ld (hl),a
0665 | 78 : ld a,b
0666 | fe 40 : cp $40
0668 | 20 03 : jr nz,$066D
066a | 7e : ld a,(hl) // play sound
066b | 18 06 : jr $0673
066d | fe 01 : cp $01
066f | 20 05 : jr nz,$0676
0671 | 3e f2 : ld a,$F2 // stop sound
0673 | 32 90 60 : ld ($6090),a // send sound code
0676 | 18 c3 : jr $063B
-->
</script>
<script state="run">
<output format="----- dog fight 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="P2 button 1 + left : decrease code -10" line="13" align="center" />
<output format="P2 button 1 + right : increase code +10" line="14" align="center" />
<output format="P1 button 1 : play sound" line="15" align="center" />
<output format="start : 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@5900</argument>
</output>
</script>
<script state="off">
<action>maincpu.mw@0006 = 4bf3</action>
<action>maincpu.mq@062d = 5a0521eb09001001</action>
<action>maincpu.mq@0635 = 003e1f3814fe7e34</action>
<action>maincpu.mq@063d = 301f581e3a710032</action>
<action>maincpu.mq@0645 = 0032013e700032f5</action>
<action>maincpu.mq@064d = 5a0521581e32af71</action>
<action>maincpu.mq@0655 = 22eb4e5a16114777</action>
<action>maincpu.mq@065d = dc07ca30077e581f</action>
<action>maincpu.mq@0665 = 7e09030ec43806d9</action>
<action>maincpu.mq@066d = 581f2a346220b735</action>
<action>maincpu.mq@0675 = eda0eda0ed5a0611</action>
</script>
</cheat>
"sound test mode" : rewrite routine. add "P2 button 1 + left/right" key (code ±10) because this game doesn't have up/down key. change sound stop button from P2 button 1 to start.
[dogfight]+ Dog Fight
Posted: Fri Feb 16, 2024 12:12 am
by jman
dogfight.xml
Code: Select all
<!-- Dog Fight (Thunderbolt) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>maincpu.mb@1910 = C9</action>
</script>
<script state="off">
<action>maincpu.mb@1910 = 21</action>
</script>
</cheat>
<cheat desc="auto fire">
<script state="on">
<action>maincpu.mb@1AF5 = 01</action>
</script>
<script state="off">
<action>maincpu.mb@1AF5 = 1A</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter>
<item value="0x01">01 (slow)</item>
<item value="0x02">02 </item>
<item value="0x04">03 </item>
<item value="0x06">04 </item>
<item value="0x08">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.mb@1A89 = 00</action>
</script>
<script state="change">
<action>maincpu.mb@1A7C = param</action>
<action>maincpu.mb@1A82 = -param</action>
</script>
<script state="off">
<action>maincpu.mb@1A89 = 01</action>
<action>maincpu.mb@1A7C = 01</action>
<action>maincpu.mb@1A82 = FE</action>
</script>
</cheat>
<cheat desc="bullet spped">
<parameter>
<item value="0x01">01 (slow)</item>
<item value="0x06">02 </item>
<item value="0x0c">03 </item>
<item value="0x12">04 </item>
<item value="0x18">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.md@1C11 = 86CFB0CD </action>
<action>maincpu.mq@CFB0 = FFFFFFC92B2B003E</action>
<!--
CFB0 | 3E xx : ld a,$xx
CFB2 | 2B : dec hl
CFB3 | 2B : dec hl
CFB4 | C9 : ret
-->
</script>
<script state="change">
<action>maincpu.mb@CFB1 = param</action>
</script>
<script state="off">
<action>maincpu.md@1C11 = 862B2B1A </action>
<action>maincpu.mq@CFB0 = 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.mw@0006 = 0599 </action> <!-- skip some boot sequences -->
<action>maincpu.mq@062D = 234F362006900121</action>
<action>maincpu.mq@0635 = 833A590021FA1023</action>
<action>maincpu.mq@063D = E660843A4F01E660</action>
<action>maincpu.mq@0645 = 80FEF02847B8B1E8</action>
<action>maincpu.mq@064D = 34012008FE350120</action>
<action>maincpu.mq@0655 = 0618F03E0420A0FE</action>
<action>maincpu.mq@065D = 7786103E052028FE</action>
<action>maincpu.mq@0665 = 06187E032040FE78</action>
<action>maincpu.mq@066D = 9032F23E052001FE</action>
<action>maincpu.mq@0675 = EDA0EDA0EDC31860</action>
<!--
062D | 21 01 90 : ld hl,$9001 // paint screen with black
0630 | 06 20 : ld b,$20
0632 | 36 4F : ld (hl),$4F
0634 | 23 : inc hl
0635 | 23 : inc hl
0636 | 10 FA : djnz $0632
0638 | 21 00 59 : ld hl,$5900 // sound code address
063B | 3A 83 60 : ld a,($6083) // read start button
063E | E6 01 : and $01
0640 | 4F : ld c,a
0641 | 3A 84 60 : ld a,($6084) // read other inputs
0644 | E6 E8 : and $E8
0646 | B1 : or c
0647 | B8 : cp b
0648 | 47 : ld b,a
0649 | 28 F0 : jr z,$063B
064B | FE 80 : cp $80
064D | 20 01 : jr nz,$0650
064F | 35 : dec (hl) // decrease code -01
0650 | FE 08 : cp $08
0652 | 20 01 : jr nz,$0655
0654 | 34 : inc (hl) // increase code +01
0655 | FE A0 : cp $A0
0657 | 20 04 : jr nz,$065D
0659 | 3E F0 : ld a,$F0 // decrease code -10
065B | 18 06 : jr $0663
065D | FE 28 : cp $28
065F | 20 05 : jr nz,$0666
0661 | 3E 10 : ld a,$10 // increase code +10
0663 | 86 : add a,(hl)
0664 | 77 : ld (hl),a
0665 | 78 : ld a,b
0666 | FE 40 : cp $40
0668 | 20 03 : jr nz,$066D
066A | 7E : ld a,(hl) // play sound
066B | 18 06 : jr $0673
066D | FE 01 : cp $01
066F | 20 05 : jr nz,$0676
0671 | 3E F2 : ld a,$F2 // stop sound
0673 | 32 90 60 : ld ($6090),a // send sound code
0676 | 18 C3 : jr $063B
-->
</script>
<script state="run">
<output format="----- dog fight 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="P2 button 1 + left : decrease code -10" line="13" align="center" />
<output format="P2 button 1 + right : increase code +10" line="14" align="center" />
<output format="P1 button 1 : play sound" line="15" align="center" />
<output format="P1 start : stop sound" line="16" align="center" />
<output format="----------------------------" line="17" align="center" />
<output format="<< sound code %02X >>" line="19" align="center" >
<argument>maincpu.pb@5900</argument>
</output>
</script>
<script state="off">
<action>maincpu.mw@0006 = 4BF3 </action>
<action>maincpu.mq@062D = 5A0521EB09001001</action>
<action>maincpu.mq@0635 = 003E1F3814FE7E34</action>
<action>maincpu.mq@063D = 301F581E3A710032</action>
<action>maincpu.mq@0645 = 0032013E700032F5</action>
<action>maincpu.mq@064D = 5A0521581E32AF71</action>
<action>maincpu.mq@0655 = 22EB4E5A16114777</action>
<action>maincpu.mq@065D = DC07CA30077E581F</action>
<action>maincpu.mq@0665 = 7E09030EC43806D9</action>
<action>maincpu.mq@066D = 581F2A346220B735</action>
<action>maincpu.mq@0675 = EDA0EDA0ED5A0611</action>
</script>
</cheat>
<cheat desc="skip ram/rom check">
<script state="on">
<action> maincpu.mw@4C03 = 2B18</action> <!-- ram -->
<action> maincpu.mw@4D35 = 1F18</action> <!-- rom -->
<action>audiocpu.mw@0B9C = 2818</action> <!-- ram -->
<action>audiocpu.mw@0BE2 = 1518</action> <!-- rom -->
</script>
<script state="off">
<action> maincpu.mw@4C03 = 21DD</action>
<action> maincpu.mw@4D35 = 0021</action>
<action>audiocpu.mw@0B9C = 21DD</action>
<action>audiocpu.mw@0BE2 = 0021</action>
</script>
</cheat>
</mamecheat>
dogfightp.xml
Code: Select all
<!-- Dog Fight (Orca, prototype) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>maincpu.mb@1920 = C9</action>
</script>
<script state="off">
<action>maincpu.mb@1920 = 21</action>
</script>
</cheat>
<cheat desc="auto fire">
<script state="on">
<action>maincpu.mb@1B12 = 01</action>
</script>
<script state="off">
<action>maincpu.mb@1B12 = 1A</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter>
<item value="0x01">01 (slow)</item>
<item value="0x02">02 </item>
<item value="0x04">03 </item>
<item value="0x06">04 </item>
<item value="0x08">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.mb@1AA7 = 00</action>
</script>
<script state="change">
<action>maincpu.mb@1A8E = param</action>
<action>maincpu.mb@1A94 = -param</action>
</script>
<script state="off">
<action>maincpu.mb@1AA7 = 01</action>
<action>maincpu.mb@1A8E = 01</action>
<action>maincpu.mb@1A94 = FE</action>
</script>
</cheat>
<cheat desc="bullet spped">
<parameter>
<item value="0x01">01 (slow)</item>
<item value="0x06">02 </item>
<item value="0x0c">03 </item>
<item value="0x12">04 </item>
<item value="0x18">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.md@1C2E = 866000CD </action>
<action>maincpu.mq@6000 = 000000C92B2B003E</action>
<!--
6000 | 3E xx : ld a,$xx
6002 | 2B : dec hl
6003 | 2B : dec hl
6004 | C9 : ret
-->
</script>
<script state="change">
<action>maincpu.mb@6001 = param</action>
</script>
<script state="off">
<action>maincpu.md@1C2E = 862B2B1A </action>
<action>maincpu.mq@6000 = 0000000000000000</action>
</script>
</cheat>
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mw@04C2 = 6010 </action>
<action>maincpu.mq@6010 = 234F362006900121</action>
<action>maincpu.mq@6018 = 0032F10021FA1023</action>
<action>maincpu.mq@6020 = F62847B8F0033AE0</action>
<action>maincpu.mq@6028 = 2002FE35012001FE</action>
<action>maincpu.mq@6030 = F03E042008FE3401</action>
<action>maincpu.mq@6038 = 103E052004FE0618</action>
<action>maincpu.mq@6040 = 7E032010FE787786</action>
<action>maincpu.mq@6048 = F23E052020FE0618</action>
<action>maincpu.mq@6050 = 000000C918F00032</action>
<!--
6010 | 21 01 90 : ld hl,$9001 // paint screen with black
6013 | 06 20 : ld b,$20
6015 | 36 4F : ld (hl),$4F
6017 | 23 : inc hl
6018 | 23 : inc hl
6019 | 10 FA : djnz $6015
601B | 21 00 F1 : ld hl,$F100 // sound code address
601E | 32 00 E0 : ld ($E000),a // watchdog
6021 | 3A 03 F0 : ld a,($F003) // read input
6024 | B8 : cp b
6025 | 47 : ld b,a
6026 | 28 F6 : jr z,$601E
6028 | FE 01 : cp $01
602A | 20 01 : jr nz,$602D
602C | 35 : dec (hl) // decrease code -01
602D | FE 02 : cp $02
602F | 20 01 : jr nz,$6032
6031 | 34 : inc (hl) // increase code +10
6032 | FE 08 : cp $08
6034 | 20 04 : jr nz,$603A
6036 | 3E F0 : ld a,$F0 // decrease code -10
6038 | 18 06 : jr $6040
603A | FE 04 : cp $04
603C | 20 05 : jr nz,$6043
603E | 3E 10 : ld a,$10 // increase code +10
6040 | 86 : add a,(hl)
6041 | 77 : ld (hl),a
6042 | 78 : ld a,b
6043 | FE 10 : cp $10
6045 | 20 03 : jr nz,$604A
6047 | 7E : ld a,(hl) // play sound
6048 | 18 06 : jr $6050
604A | FE 20 : cp $20
604C | 20 05 : jr nz,$6053
604E | 3E F2 : ld a,$F2 // stop sound
6050 | 32 00 F0 : ld ($F000),a // send sound code
6053 | 18 C9 : jr $601E
-->
</script>
<script state="run">
<output format="----- dog fight 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@F100</argument>
</output>
</script>
<script state="off">
<action>maincpu.mw@04C2 = 04C7 </action>
<action>maincpu.mq@6010 = 0000000000000000</action>
<action>maincpu.mq@6018 = 0000000000000000</action>
<action>maincpu.mq@6020 = 0000000000000000</action>
<action>maincpu.mq@6028 = 0000000000000000</action>
<action>maincpu.mq@6030 = 0000000000000000</action>
<action>maincpu.mq@6038 = 0000000000000000</action>
<action>maincpu.mq@6040 = 0000000000000000</action>
<action>maincpu.mq@6048 = 0000000000000000</action>
<action>maincpu.mq@6050 = 0000000000000000</action>
</script>
</cheat>
<cheat desc="skip ram/rom check">
<script state="on">
<action>maincpu.mw@5B91 = 2B18</action> <!-- ram -->
<action>maincpu.mw@5CC3 = 1F18</action> <!-- rom -->
<action> sub.mw@0CCC = 1518</action> <!-- rom -->
</script>
<script state="off">
<action>maincpu.mw@5B91 = 21DD</action>
<action>maincpu.mw@5CC3 = 0021</action>
<action> sub.mw@0CCC = 0021</action>
</script>
</cheat>
</mamecheat>