galaga.xml
Code: Select all
<!-- Galaga (Namco rev. B) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>sub.mb@06E4 = 18</action>
</script>
<script state="off">
<action>sub.mb@06E4 = 30</action>
</script>
</cheat>
<cheat desc="rapid fire">
<script state="on">
<action>maincpu.mb@1F17 = 6E</action>
</script>
<script state="off">
<action>maincpu.mb@1F17 = 66</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="change">
<action>maincpu.mb@1FB0 = param</action>
</script>
<script state="off">
<action>maincpu.mb@1FB0 = 01</action>
</script>
</cheat>
<cheat desc="bullet speed">
<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="change">
<action>sub.mb@070D = param</action> <!-- speed -->
<action>sub.mb@078B = param</action> <!-- collision range -->
</script>
<script state="off">
<action>sub.mb@070D = 06</action>
<action>sub.mb@078B = 06</action>
</script>
</cheat>
<cheat desc="sound test mode">
<!-- valid sound code seems to be from 0x01 to 0x19 -->
<!-- explosion sound is played at boot -->
<!-- you can't stop explosion sound (0x19) by sound stop button -->
<comment>set "skip ram/rom check" then reset the game (F3)</comment>
<script state="on">
<action>maincpu.mw@3723 = 4418 </action> <!-- disble device check -->
<action>maincpu.md@0338 = 363BA0CD </action>
<action>maincpu.mq@3BA0 = E62F99B53A910021</action>
<action>maincpu.mq@3BA8 = AAE62F99B63A4F05</action>
<action>maincpu.mq@3BB0 = 2008FEEE2847B8B1</action>
<action>maincpu.mq@3BB8 = FE34012002FE3501</action>
<action>maincpu.mq@3BC0 = FE0618F03E042080</action>
<action>maincpu.mq@3BC8 = 787786103E052020</action>
<action>maincpu.mq@3BD0 = 9AA0217E092001FE</action>
<action>maincpu.mq@3BD8 = 2004FE7801366F85</action>
<action>maincpu.mq@3BE0 = B818C13A46CDC505</action>
<!--
3BA0 | 21 00 91 : ld hl,$9100 // sound code address
3BA3 | 3A B5 99 : ld a,($99B5) // read buttons
3BA6 | 2F : cpl
3BA7 | E6 05 : and $05
3BA9 | 4F : ld c,a
3BAA | 3A B6 99 : ld a,($99B6) // read joysticks
3BAD | 2F : cpl
3BAE | E6 AA : and $AA
3BB0 | B1 : or c
3BB1 | B8 : cp b
3BB2 | 47 : ld b,a
3BB3 | 28 EE : jr z,$3BA3
3BB5 | FE 08 : cp $08
3BB7 | 20 01 : jr nz,$3BBA
3BB9 | 35 : dec (hl) // decrease code -01
3BBA | FE 02 : cp $02
3BBC | 20 01 : jr nz,$3BBF
3BBE | 34 : inc (hl) // increase code +01
3BBF | FE 80 : cp $80
3BC1 | 20 04 : jr nz,$3BC7
3BC3 | 3E F0 : ld a,$F0 // decrease code -10
3BC5 | 18 06 : jr $3BCD
3BC7 | FE 20 : cp $20
3BC9 | 20 05 : jr nz,$3BD0
3BCB | 3E 10 : ld a,$10 // increase code +10
3BCD | 86 : add a,(hl)
3BCE | 77 : ld (hl),a
3BCF | 78 : ld a,b
3BD0 | FE 01 : cp $01
3BD2 | 20 09 : jr nz,$3BDD
3BD4 | 7E : ld a,(hl) // play sound
3BD5 | 21 A0 9A : ld hl,$9AA0
3BD8 | 85 : add a,l
3BD9 | 6F : ld l,a
3BDA | 36 01 : ld (hl),$01
3BDC | 78 : ld a,b
3BDD | FE 04 : cp $04
3BDF | 20 05 : jr nz,$3BE6
3BE1 | C5 : push bc // stop sound
3BE2 | CD 46 3A : call $3A46
3BE5 | C1 : pop bc
3BE6 | 18 B8 : jr $3BA0
-->
<action>51xx:mcu.mb@00A3 = A4</action> <!-- enable input check -->
</script>
<script state="run">
<output format="----- sound test mode -----" line="10" align="center" />
<output format="1P left : decrease code -01" line="11" align="center" />
<output format="1P right : increase code +01" line="12" align="center" />
<output format="2P left : decrease code -10" line="13" align="center" />
<output format="2P right : increase code +10" line="14" align="center" />
<output format="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 %02X >>" line="19" align="center">
<argument>maincpu.pb@9100</argument>
</output>
</script>
<script state="off">
<action> maincpu.mw@3723 = FA30 </action>
<action> maincpu.md@0338 = 36A00521 </action>
<action> maincpu.mq@3BA0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BA8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BB0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BB8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BC0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BC8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BD0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BD8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BE0 = FFFFFFFFFFFFFFFF</action>
<action>51xx:mcu.mb@00A3 = BE </action>
</script>
</cheat>
<cheat desc="skip ram/rom check">
<script state="on">
<!-- ram -->
<action>maincpu.md@337F = 063435C3</action>
<action>maincpu.mb@348E = C9 </action>
<!-- roms -->
<action>maincpu.mb@352B = C9 </action>
<action> sub.md@0583 = 0E183DAF</action> <!-- xor a / dec a / jr $0595 -->
<action> sub2.md@0091 = 0E183DAF</action> <!-- xor a / dec a / jr $00A3 -->
</script>
<script state="off">
<action>maincpu.md@337F = 06683032</action>
<action>maincpu.mb@348E = C5 </action>
<action>maincpu.mb@352B = E5 </action>
<action> sub.md@0583 = 10016F67</action>
<action> sub2.md@0091 = 10016F67</action>
</script>
</cheat>
</mamecheat>
galagao.xml
Code: Select all
<!-- Galaga (Namco) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>sub.mb@06E4 = 18</action>
</script>
<script state="off">
<action>sub.mb@06E4 = 30</action>
</script>
</cheat>
<cheat desc="rapid fire">
<script state="on">
<action>maincpu.mb@1F0D = 6E</action>
</script>
<script state="off">
<action>maincpu.mb@1F0D = 66</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="change">
<action>maincpu.mb@1FA6 = param</action>
</script>
<script state="off">
<action>maincpu.mb@1FA6 = 01</action>
</script>
</cheat>
<cheat desc="bullet speed">
<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="change">
<action>sub.mb@070D = param</action> <!-- speed -->
<action>sub.mb@078B = param</action> <!-- collision range -->
</script>
<script state="off">
<action>sub.mb@070D = 06</action>
<action>sub.mb@078B = 06</action>
</script>
</cheat>
<cheat desc="sound test mode">
<!-- valid sound code seems to be from 0x01 to 0x19 -->
<!-- explosion sound is played at boot -->
<!-- you can't stop explosion sound (0x19) by sound stop button -->
<comment>set "skip ram/rom check" then reset the game (F3)</comment>
<script state="on">
<action>maincpu.mw@3719 = 4418 </action> <!-- disble device check -->
<action>maincpu.md@0338 = 363BA0CD </action>
<action>maincpu.mq@3BA0 = E62F99B53A910021</action>
<action>maincpu.mq@3BA8 = AAE62F99B63A4F05</action>
<action>maincpu.mq@3BB0 = 2008FEEE2847B8B1</action>
<action>maincpu.mq@3BB8 = FE34012002FE3501</action>
<action>maincpu.mq@3BC0 = FE0618F03E042080</action>
<action>maincpu.mq@3BC8 = 787786103E052020</action>
<action>maincpu.mq@3BD0 = 9AA0217E092001FE</action>
<action>maincpu.mq@3BD8 = 2004FE7801366F85</action>
<action>maincpu.mq@3BE0 = B818C13A3CCDC505</action>
<!--
3BA0 | 21 00 91 : ld hl,$9100 // sound code address
3BA3 | 3A B5 99 : ld a,($99B5) // read buttons
3BA6 | 2F : cpl
3BA7 | E6 05 : and $05
3BA9 | 4F : ld c,a
3BAA | 3A B6 99 : ld a,($99B6) // read joysticks
3BAD | 2F : cpl
3BAE | E6 AA : and $AA
3BB0 | B1 : or c
3BB1 | B8 : cp b
3BB2 | 47 : ld b,a
3BB3 | 28 EE : jr z,$3BA3
3BB5 | FE 08 : cp $08
3BB7 | 20 01 : jr nz,$3BBA
3BB9 | 35 : dec (hl) // decrease code -01
3BBA | FE 02 : cp $02
3BBC | 20 01 : jr nz,$3BBF
3BBE | 34 : inc (hl) // increase code +01
3BBF | FE 80 : cp $80
3BC1 | 20 04 : jr nz,$3BC7
3BC3 | 3E F0 : ld a,$F0 // decrease code -10
3BC5 | 18 06 : jr $3BCD
3BC7 | FE 20 : cp $20
3BC9 | 20 05 : jr nz,$3BD0
3BCB | 3E 10 : ld a,$10 // increase code +10
3BCD | 86 : add a,(hl)
3BCE | 77 : ld (hl),a
3BCF | 78 : ld a,b
3BD0 | FE 01 : cp $01
3BD2 | 20 09 : jr nz,$3BDD
3BD4 | 7E : ld a,(hl) // play sound
3BD5 | 21 A0 9A : ld hl,$9AA0
3BD8 | 85 : add a,l
3BD9 | 6F : ld l,a
3BDA | 36 01 : ld (hl),$01
3BDC | 78 : ld a,b
3BDD | FE 04 : cp $04
3BDF | 20 05 : jr nz,$3BE6
3BE1 | C5 : push bc // stop sound
3BE2 | CD 3C 3A : call $3A3C
3BE5 | C1 : pop bc
3BE6 | 18 B8 : jr $3BA0
-->
<action>51xx:mcu.mb@00A3 = A4</action> <!-- enable input check -->
</script>
<script state="run">
<output format="----- sound test mode -----" line="10" align="center" />
<output format="1P left : decrease code -01" line="11" align="center" />
<output format="1P right : increase code +01" line="12" align="center" />
<output format="2P left : decrease code -10" line="13" align="center" />
<output format="2P right : increase code +10" line="14" align="center" />
<output format="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 %02X >>" line="19" align="center">
<argument>maincpu.pb@9100</argument>
</output>
</script>
<script state="off">
<action> maincpu.mw@3719 = FA30 </action>
<action> maincpu.md@0338 = 36A00521 </action>
<action> maincpu.mq@3BA0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BA8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BB0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BB8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BC0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BC8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BD0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BD8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BE0 = FFFFFFFFFFFFFFFF</action>
<action>51xx:mcu.mb@00A3 = BE </action>
</script>
</cheat>
<cheat desc="skip ram/rom check">
<script state="on">
<!-- ram -->
<action>maincpu.md@3375 = 06342BC3</action>
<action>maincpu.mb@3484 = C9 </action>
<!-- roms -->
<action>maincpu.mb@3521 = C9 </action>
<action> sub.md@0583 = 0E183DAF</action> <!-- xor a / dec a / jr $0595 -->
<action> sub2.md@007F = 0E183DAF</action> <!-- xor a / dec a / jr $0091 -->
</script>
<script state="off">
<action>maincpu.md@3375 = 06683032</action>
<action>maincpu.mb@3484 = C5 </action>
<action>maincpu.mb@3521 = E5 </action>
<action> sub.md@0583 = 10016F67</action>
<action> sub2.md@007F = 10016F67</action>
</script>
</cheat>
</mamecheat>
galagamw.xml
Code: Select all
<!-- Galaga (Midway set 1) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>sub.mb@06E4 = 18</action>
</script>
<script state="off">
<action>sub.mb@06E4 = 30</action>
</script>
</cheat>
<cheat desc="rapid fire">
<script state="on">
<action>maincpu.mb@1F13 = 6E</action>
</script>
<script state="off">
<action>maincpu.mb@1F13 = 66</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="change">
<action>maincpu.mb@1FAC = param</action>
</script>
<script state="off">
<action>maincpu.mb@1FAC = 01</action>
</script>
</cheat>
<cheat desc="bullet speed">
<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="change">
<action>sub.mb@070D = param</action> <!-- speed -->
<action>sub.mb@078B = param</action> <!-- collision range -->
</script>
<script state="off">
<action>sub.mb@070D = 06</action>
<action>sub.mb@078B = 06</action>
</script>
</cheat>
<cheat desc="sound test mode">
<!-- valid sound code seems to be from 0x01 to 0x19 -->
<!-- explosion sound is played at boot -->
<!-- you can't stop explosion sound (0x19) by sound stop button -->
<comment>set "skip ram/rom check" then reset the game (F3)</comment>
<script state="on">
<action>maincpu.mw@3719 = 4418 </action> <!-- disble device check -->
<action>maincpu.md@0338 = 363BA0CD </action>
<action>maincpu.mq@3BA0 = E62F99B53A910021</action>
<action>maincpu.mq@3BA8 = AAE62F99B63A4F05</action>
<action>maincpu.mq@3BB0 = 2008FEEE2847B8B1</action>
<action>maincpu.mq@3BB8 = FE34012002FE3501</action>
<action>maincpu.mq@3BC0 = FE0618F03E042080</action>
<action>maincpu.mq@3BC8 = 787786103E052020</action>
<action>maincpu.mq@3BD0 = 9AA0217E092001FE</action>
<action>maincpu.mq@3BD8 = 2004FE7801366F85</action>
<action>maincpu.mq@3BE0 = B818C13A3CCDC505</action>
<!--
3BA0 | 21 00 91 : ld hl,$9100 // sound code address
3BA3 | 3A B5 99 : ld a,($99B5) // read buttons
3BA6 | 2F : cpl
3BA7 | E6 05 : and $05
3BA9 | 4F : ld c,a
3BAA | 3A B6 99 : ld a,($99B6) // read joysticks
3BAD | 2F : cpl
3BAE | E6 AA : and $AA
3BB0 | B1 : or c
3BB1 | B8 : cp b
3BB2 | 47 : ld b,a
3BB3 | 28 EE : jr z,$3BA3
3BB5 | FE 08 : cp $08
3BB7 | 20 01 : jr nz,$3BBA
3BB9 | 35 : dec (hl) // decrease code -01
3BBA | FE 02 : cp $02
3BBC | 20 01 : jr nz,$3BBF
3BBE | 34 : inc (hl) // increase code +01
3BBF | FE 80 : cp $80
3BC1 | 20 04 : jr nz,$3BC7
3BC3 | 3E F0 : ld a,$F0 // decrease code -10
3BC5 | 18 06 : jr $3BCD
3BC7 | FE 20 : cp $20
3BC9 | 20 05 : jr nz,$3BD0
3BCB | 3E 10 : ld a,$10 // increase code +10
3BCD | 86 : add a,(hl)
3BCE | 77 : ld (hl),a
3BCF | 78 : ld a,b
3BD0 | FE 01 : cp $01
3BD2 | 20 09 : jr nz,$3BDD
3BD4 | 7E : ld a,(hl) // play sound
3BD5 | 21 A0 9A : ld hl,$9AA0
3BD8 | 85 : add a,l
3BD9 | 6F : ld l,a
3BDA | 36 01 : ld (hl),$01
3BDC | 78 : ld a,b
3BDD | FE 04 : cp $04
3BDF | 20 05 : jr nz,$3BE6
3BE1 | C5 : push bc // stop sound
3BE2 | CD 3C 3A : call $3A3C
3BE5 | C1 : pop bc
3BE6 | 18 B8 : jr $3BA0
-->
<action>51xx:mcu.mb@00A3 = A4</action> <!-- enable input check -->
</script>
<script state="run">
<output format="----- sound test mode -----" line="10" align="center" />
<output format="1P left : decrease code -01" line="11" align="center" />
<output format="1P right : increase code +01" line="12" align="center" />
<output format="2P left : decrease code -10" line="13" align="center" />
<output format="2P right : increase code +10" line="14" align="center" />
<output format="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 %02X >>" line="19" align="center">
<argument>maincpu.pb@9100</argument>
</output>
</script>
<script state="off">
<action> maincpu.mw@3719 = FA30 </action>
<action> maincpu.md@0338 = 36A00521 </action>
<action> maincpu.mq@3BA0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BA8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BB0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BB8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BC0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BC8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BD0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BD8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BE0 = FFFFFFFFFFFFFFFF</action>
<action>51xx:mcu.mb@00A3 = BE </action>
</script>
</cheat>
<cheat desc="skip ram/rom check">
<script state="on">
<!-- ram -->
<action>maincpu.md@3375 = 063435C3</action>
<action>maincpu.mb@3484 = C9 </action>
<!-- roms -->
<action>maincpu.mb@3521 = C9 </action>
<action> sub.md@0583 = 0E183DAF</action> <!-- xor a / dec a / jr $0595 -->
<action> sub2.md@0087 = 0E183DAF</action> <!-- xor a / dec a / jr $0099 -->
</script>
<script state="off">
<action>maincpu.md@3375 = 06683032</action>
<action>maincpu.mb@3484 = C5 </action>
<action>maincpu.mb@3521 = E5 </action>
<action> sub.md@0583 = 10016F67</action>
<action> sub2.md@0087 = 10016F67</action>
</script>
</cheat>
</mamecheat>
galagamk.xml
Code: Select all
<!-- Galaga (Midway set 2) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>sub.mb@06E4 = 18</action>
</script>
<script state="off">
<action>sub.mb@06E4 = 30</action>
</script>
</cheat>
<cheat desc="rapid fire">
<script state="on">
<action>maincpu.mb@1F17 = 6E</action>
</script>
<script state="off">
<action>maincpu.mb@1F17 = 66</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="change">
<action>maincpu.mb@1FB0 = param</action>
</script>
<script state="off">
<action>maincpu.mb@1FB0 = 01</action>
</script>
</cheat>
<cheat desc="bullet speed">
<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="change">
<action>sub.mb@070D = param</action> <!-- speed -->
<action>sub.mb@078B = param</action> <!-- collision range -->
</script>
<script state="off">
<action>sub.mb@070D = 06</action>
<action>sub.mb@078B = 06</action>
</script>
</cheat>
<cheat desc="sound test mode">
<!-- valid sound code seems to be from 0x01 to 0x19 -->
<!-- explosion sound is played at boot -->
<!-- you can't stop explosion sound (0x19) by sound stop button -->
<comment>set "skip ram/rom check" then reset the game (F3)</comment>
<script state="on">
<action>maincpu.mw@3719 = 4418 </action> <!-- disble device check -->
<action>maincpu.md@0338 = 363BA0CD </action>
<action>maincpu.mq@3BA0 = E62F99B53A910021</action>
<action>maincpu.mq@3BA8 = AAE62F99B63A4F05</action>
<action>maincpu.mq@3BB0 = 2008FEEE2847B8B1</action>
<action>maincpu.mq@3BB8 = FE34012002FE3501</action>
<action>maincpu.mq@3BC0 = FE0618F03E042080</action>
<action>maincpu.mq@3BC8 = 787786103E052020</action>
<action>maincpu.mq@3BD0 = 9AA0217E092001FE</action>
<action>maincpu.mq@3BD8 = 2004FE7801366F85</action>
<action>maincpu.mq@3BE0 = B818C13A3CCDC505</action>
<!--
3BA0 | 21 00 91 : ld hl,$9100 // sound code address
3BA3 | 3A B5 99 : ld a,($99B5) // read buttons
3BA6 | 2F : cpl
3BA7 | E6 05 : and $05
3BA9 | 4F : ld c,a
3BAA | 3A B6 99 : ld a,($99B6) // read joysticks
3BAD | 2F : cpl
3BAE | E6 AA : and $AA
3BB0 | B1 : or c
3BB1 | B8 : cp b
3BB2 | 47 : ld b,a
3BB3 | 28 EE : jr z,$3BA3
3BB5 | FE 08 : cp $08
3BB7 | 20 01 : jr nz,$3BBA
3BB9 | 35 : dec (hl) // decrease code -01
3BBA | FE 02 : cp $02
3BBC | 20 01 : jr nz,$3BBF
3BBE | 34 : inc (hl) // increase code +01
3BBF | FE 80 : cp $80
3BC1 | 20 04 : jr nz,$3BC7
3BC3 | 3E F0 : ld a,$F0 // decrease code -10
3BC5 | 18 06 : jr $3BCD
3BC7 | FE 20 : cp $20
3BC9 | 20 05 : jr nz,$3BD0
3BCB | 3E 10 : ld a,$10 // increase code +10
3BCD | 86 : add a,(hl)
3BCE | 77 : ld (hl),a
3BCF | 78 : ld a,b
3BD0 | FE 01 : cp $01
3BD2 | 20 09 : jr nz,$3BDD
3BD4 | 7E : ld a,(hl) // play sound
3BD5 | 21 A0 9A : ld hl,$9AA0
3BD8 | 85 : add a,l
3BD9 | 6F : ld l,a
3BDA | 36 01 : ld (hl),$01
3BDC | 78 : ld a,b
3BDD | FE 04 : cp $04
3BDF | 20 05 : jr nz,$3BE6
3BE1 | C5 : push bc // stop sound
3BE2 | CD 3C 3A : call $3A3C
3BE5 | C1 : pop bc
3BE6 | 18 B8 : jr $3BA0
-->
<action>51xx:mcu.mb@00A3 = A4</action> <!-- enable input check -->
</script>
<script state="run">
<output format="----- sound test mode -----" line="10" align="center" />
<output format="1P left : decrease code -01" line="11" align="center" />
<output format="1P right : increase code +01" line="12" align="center" />
<output format="2P left : decrease code -10" line="13" align="center" />
<output format="2P right : increase code +10" line="14" align="center" />
<output format="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 %02X >>" line="19" align="center">
<argument>maincpu.pb@9100</argument>
</output>
</script>
<script state="off">
<action> maincpu.mw@3719 = FA30 </action>
<action> maincpu.md@0338 = 36A00521 </action>
<action> maincpu.mq@3BA0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BA8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BB0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BB8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BC0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BC8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BD0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BD8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BE0 = FFFFFFFFFFFFFFFF</action>
<action>51xx:mcu.mb@00A3 = BE </action>
</script>
</cheat>
<cheat desc="skip ram/rom check">
<script state="on">
<!-- ram -->
<action>maincpu.md@3375 = 063435C3</action>
<action>maincpu.mb@3484 = C9 </action>
<!-- roms -->
<action>maincpu.mb@3521 = C9 </action>
<action> sub.md@0583 = 0E183DAF</action> <!-- xor a / dec a / jr $0595 -->
<action> sub2.md@0091 = 0E183DAF</action> <!-- xor a / dec a / jr $00A3 -->
</script>
<script state="off">
<action>maincpu.md@3375 = 06683032</action>
<action>maincpu.mb@3484 = C5 </action>
<action>maincpu.mb@3521 = E5 </action>
<action> sub.md@0583 = 10016F67</action>
<action> sub2.md@0091 = 10016F67</action>
</script>
</cheat>
</mamecheat>
galagamf.xml
Code: Select all
<!-- Galaga (Midway set 1) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>sub.mb@06E4 = 18</action>
</script>
<script state="off">
<action>sub.mb@06E4 = 30</action>
</script>
</cheat>
<cheat desc="rapid fire">
<script state="on">
<action>maincpu.mb@1F13 = 6E</action>
</script>
<script state="off">
<action>maincpu.mb@1F13 = 66</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="change">
<action>maincpu.mb@1FAC = param</action>
</script>
<script state="off">
<action>maincpu.mb@1FAC = 01</action>
</script>
</cheat>
<cheat desc="bullet speed">
<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="change">
<action>sub.mb@070D = param</action> <!-- speed -->
<action>sub.mb@078B = param</action> <!-- collision range -->
</script>
<script state="off">
<action>sub.mb@070D = 0D</action>
<action>sub.mb@078B = 06</action>
</script>
</cheat>
<cheat desc="sound test mode">
<!-- valid sound code seems to be from 0x01 to 0x19 -->
<!-- explosion sound is played at boot -->
<!-- you can't stop explosion sound (0x19) by sound stop button -->
<comment>set "skip ram/rom check" then reset the game (F3)</comment>
<script state="on">
<action>maincpu.mw@3719 = 4418 </action> <!-- disble device check -->
<action>maincpu.md@0338 = 363BA0CD </action>
<action>maincpu.mq@3BA0 = E62F99B53A910021</action>
<action>maincpu.mq@3BA8 = AAE62F99B63A4F05</action>
<action>maincpu.mq@3BB0 = 2008FEEE2847B8B1</action>
<action>maincpu.mq@3BB8 = FE34012002FE3501</action>
<action>maincpu.mq@3BC0 = FE0618F03E042080</action>
<action>maincpu.mq@3BC8 = 787786103E052020</action>
<action>maincpu.mq@3BD0 = 9AA0217E092001FE</action>
<action>maincpu.mq@3BD8 = 2004FE7801366F85</action>
<action>maincpu.mq@3BE0 = B818C13A3CCDC505</action>
<!--
3BA0 | 21 00 91 : ld hl,$9100 // sound code address
3BA3 | 3A B5 99 : ld a,($99B5) // read buttons
3BA6 | 2F : cpl
3BA7 | E6 05 : and $05
3BA9 | 4F : ld c,a
3BAA | 3A B6 99 : ld a,($99B6) // read joysticks
3BAD | 2F : cpl
3BAE | E6 AA : and $AA
3BB0 | B1 : or c
3BB1 | B8 : cp b
3BB2 | 47 : ld b,a
3BB3 | 28 EE : jr z,$3BA3
3BB5 | FE 08 : cp $08
3BB7 | 20 01 : jr nz,$3BBA
3BB9 | 35 : dec (hl) // decrease code -01
3BBA | FE 02 : cp $02
3BBC | 20 01 : jr nz,$3BBF
3BBE | 34 : inc (hl) // increase code +01
3BBF | FE 80 : cp $80
3BC1 | 20 04 : jr nz,$3BC7
3BC3 | 3E F0 : ld a,$F0 // decrease code -10
3BC5 | 18 06 : jr $3BCD
3BC7 | FE 20 : cp $20
3BC9 | 20 05 : jr nz,$3BD0
3BCB | 3E 10 : ld a,$10 // increase code +10
3BCD | 86 : add a,(hl)
3BCE | 77 : ld (hl),a
3BCF | 78 : ld a,b
3BD0 | FE 01 : cp $01
3BD2 | 20 09 : jr nz,$3BDD
3BD4 | 7E : ld a,(hl) // play sound
3BD5 | 21 A0 9A : ld hl,$9AA0
3BD8 | 85 : add a,l
3BD9 | 6F : ld l,a
3BDA | 36 01 : ld (hl),$01
3BDC | 78 : ld a,b
3BDD | FE 04 : cp $04
3BDF | 20 05 : jr nz,$3BE6
3BE1 | C5 : push bc // stop sound
3BE2 | CD 3C 3A : call $3A3C
3BE5 | C1 : pop bc
3BE6 | 18 B8 : jr $3BA0
-->
<action>51xx:mcu.mb@00A3 = A4</action> <!-- enable input check -->
</script>
<script state="run">
<output format="----- sound test mode -----" line="10" align="center" />
<output format="1P left : decrease code -01" line="11" align="center" />
<output format="1P right : increase code +01" line="12" align="center" />
<output format="2P left : decrease code -10" line="13" align="center" />
<output format="2P right : increase code +10" line="14" align="center" />
<output format="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 %02X >>" line="19" align="center">
<argument>maincpu.pb@9100</argument>
</output>
</script>
<script state="off">
<action> maincpu.mw@3719 = FA30 </action>
<action> maincpu.md@0338 = 36A00521 </action>
<action> maincpu.mq@3BA0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BA8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BB0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BB8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BC0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BC8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BD0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BD8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@3BE0 = FFFFFFFFFFFFFFFF</action>
<action>51xx:mcu.mb@00A3 = BE </action>
</script>
</cheat>
<cheat desc="skip ram/rom check">
<script state="on">
<!-- ram -->
<action>maincpu.md@3375 = 063435C3</action>
<action>maincpu.mb@3484 = C9 </action>
<!-- roms -->
<action>maincpu.mb@3521 = C9 </action>
<action> sub.md@0583 = 0E183DAF</action> <!-- xor a / dec a / jr $0595 -->
<action> sub2.md@0087 = 0E183DAF</action> <!-- xor a / dec a / jr $0099 -->
</script>
<script state="off">
<action>maincpu.md@3375 = 06683032</action>
<action>maincpu.mb@3484 = C5 </action>
<action>maincpu.mb@3521 = E5 </action>
<action> sub.md@0583 = 10016F67</action>
<action> sub2.md@0087 = 10016F67</action>
</script>
</cheat>
</mamecheat>