In 0.267, new yamato set was added. Old yamato was renamed to yamatou and yamato2 was renamed to yamatoa.
yamato.xml
Code: Select all
<!-- Yamato (set 1) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>maincpu.ob@2A36 = C9</action>
</script>
<script state="off">
<action>maincpu.ob@2A36 = AF</action>
</script>
</cheat>
<cheat desc="rapid fire">
<script state="on">
<action>maincpu.ob@16E7 = 00</action> <!-- cannon -->
<action>maincpu.ob@4A1D = 00</action> <!-- vulcan -->
</script>
<script state="off">
<action>maincpu.ob@16E7 = C0</action>
<action>maincpu.ob@4A1D = C0</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter min="0x01" max="0x05" step="0x01" />
<script state="on">
<action>maincpu.mw@47CB = 7000 </action>
<action>maincpu.oq@7000 = 10C1FFFFCDC5FF06</action>
<action>maincpu.mq@7000 = FFFF28E1FFFF007F</action>
<action>maincpu.oq@7008 = FFFFFFFFFFFFC9FF</action>
<action>maincpu.mq@7008 = FFFFFFFFFFFFFFF9</action>
<!--
7000 | 06 xx : ld b,$xx
7002 | C5 : push bc
7003 | CD E1 28 : call $28E1
7006 | C1 : pop bc
7007 | 10 F9 : djnz $7002
7009 | C9 : ret
-->
</script>
<script state="change">
<action>maincpu.mb@7001 = param</action>
</script>
<script state="off">
<action>maincpu.mw@47CB = 28E1 </action>
<action>maincpu.oq@7000 = 2020202020202020</action>
<action>maincpu.mq@7000 = 2888288828882888</action>
<action>maincpu.oq@7008 = 2020202020202020</action>
<action>maincpu.mq@7008 = 2888288828882888</action>
</script>
</cheat>
<cheat desc="fast vulcan">
<script state="on">
<action>maincpu.ob@4A08 = C3</action>
</script>
<script state="off">
<action>maincpu.ob@4A08 = CA</action>
</script>
</cheat>
<cheat desc="no delay cannon">
<script state="on">
<action>maincpu.ob@1694 = C3</action>
</script>
<script state="off">
<action>maincpu.ob@1694 = CA</action>
</script>
</cheat>
<cheat desc="sound test mode">
<!-- you can't stop sound codes 0x01 - 0x08 by sound stop button -->
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.ob@00B1 = C9 </action> <!-- disable credit display -->
<action>maincpu.mw@090E = 7010 </action>
<action>maincpu.oq@7010 = 47B8FFFF3AFFFF21</action>
<action>maincpu.mq@7010 = FFFFA000FF6000FF</action>
<action>maincpu.oq@7018 = FE35FF20FFFEFF28</action>
<action>maincpu.mq@7018 = FFFF01FF40FFF9FF</action>
<action>maincpu.oq@7020 = FF20FFFE34FF20FF</action>
<action>maincpu.mq@7020 = 04FF20FFFF01FF80</action>
<action>maincpu.oq@7028 = FF20FFFEFF18FF3E</action>
<action>maincpu.mq@7028 = 05FF10FF06FFF0FF</action>
<action>maincpu.oq@7030 = 20FFFE787786FF3E</action>
<action>maincpu.mq@7030 = FF04FFFFFFFF10FF</action>
<action>maincpu.oq@7038 = FF20FFFEFF187EFF</action>
<action>maincpu.mq@7038 = 11FF08FF05FFFF03</action>
<action>maincpu.oq@7040 = FF3085FFFF2187AF</action>
<action>maincpu.mq@7040 = 01FFFF7053FFFFFF</action>
<action>maincpu.oq@7048 = D37E23FFD37E6F24</action>
<action>maincpu.mq@7048 = FFFFFF00FFFFFFFF</action>
<action>maincpu.oq@7050 = FFFFFFFFFFFF18FF</action>
<action>maincpu.mq@7050 = 0200010000BDFF01</action>
<action>maincpu.oq@7058 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@7058 = 2000100008000400</action>
<action>maincpu.oq@7060 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@7060 = 0001000080004000</action>
<action>maincpu.oq@7068 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@7068 = 0010000800040002</action>
<action>maincpu.oq@7070 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@7070 = FFFFFF8000400020</action>
<!--
7010 | 21 00 60 : ld hl,$6000 // sound code address
7013 | 3A 00 A0 : ld a,($A000) // read input
7016 | B8 : cp b
7017 | 47 : ld b,a
7018 | 28 F9 : jr z,$7013
701A | FE 40 : cp $40
701C | 20 01 : jr nz,$701F
701E | 35 : dec (hl) // decrease code -01
701F | FE 80 : cp $80
7021 | 20 01 : jr nz,$7024
7023 | 34 : inc (hl) // increase code +01
7024 | FE 20 : cp $20
7026 | 20 04 : jr nz,$702C
7028 | 3E F0 : ld a,$F0 // decrease code -10
702A | 18 06 : jr $7032
702C | FE 10 : cp $10
702E | 20 05 : jr nz,$7035
7030 | 3E 10 : ld a,$10 // increase code +10
7032 | 86 : add a,(hl)
7033 | 77 : ld (hl),a
7034 | 78 : ld a,b
7035 | FE 04 : cp $04
7037 | 20 03 : jr nz,$703C
7039 | 7E : ld a,(hl) // play sound
703A | 18 05 : jr $7041
703C | FE 08 : cp $08
703E | 20 11 : jr nz,$7051
7040 | AF : xor a // stop sound
7041 | 87 : add a,a // convert sound code
7042 | 21 53 70 : ld hl,$7053
7045 | 85 : add a,l
7046 | 30 01 : jr nc,$7049
7048 | 24 : inc h
7049 | 6F : ld l,a
704A | 7E : ld a,(hl)
704B | D3 00 : out ($00),a // send sound code ($00)
704D | 23 : inc hl
704E | 7E : ld a,(hl)
704F | D3 01 : out ($01),a // send sound code ($01)
7051 | 18 BD : jr $7010
-->
7053 - 7074 : sound code conversion table
code $00 $01
00 00 00 stop $01 sounds (not $00)
01 01 00 sfx
02 02 00 (none?)
03 04 00 sfx
04 08 00 sfx
05 10 00 (none?)
06 20 00 sfx
07 40 00 (none?)
08 80 00 (none?)
09 00 01 main theme
0a 00 02 (none?)
0b 00 04 sfx
0c 00 08 sfx
0d 00 10 (none?)
0e 00 20 (none?)
0f 00 40 (none?)
10 00 80 (none?)
-->
</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@6000</argument>
</output>
</script>
<script state="off">
<action>maincpu.ob@00B1 = C8 </action>
<action>maincpu.mw@090E = 2CAE </action>
<action>maincpu.oq@7010 = 28A028A028A028A0</action>
<action>maincpu.mq@7010 = 2020202020202020</action>
<action>maincpu.oq@7018 = 28A028A028A028A0</action>
<action>maincpu.mq@7018 = 2020202020202020</action>
<action>maincpu.oq@7020 = 2020202020202020</action>
<action>maincpu.mq@7020 = 2888288828882888</action>
<action>maincpu.oq@7028 = 2020202020202020</action>
<action>maincpu.mq@7028 = 2888288828882888</action>
<action>maincpu.oq@7030 = 28A028A028A028A0</action>
<action>maincpu.mq@7030 = 2020202020202020</action>
<action>maincpu.oq@7038 = 28A028A028A028A0</action>
<action>maincpu.mq@7038 = 2020202020202020</action>
<action>maincpu.oq@7040 = 2020202020202020</action>
<action>maincpu.mq@7040 = 2888288828882888</action>
<action>maincpu.oq@7048 = 2020202020202020</action>
<action>maincpu.mq@7048 = 2888288828882888</action>
<action>maincpu.oq@7050 = 28A028A028A028A0</action>
<action>maincpu.mq@7050 = 2020202020202020</action>
<action>maincpu.oq@7058 = 28A028A028A028A0</action>
<action>maincpu.mq@7058 = 2020202020202020</action>
<action>maincpu.oq@7060 = 2020202020202020</action>
<action>maincpu.mq@7060 = 2888288828882888</action>
<action>maincpu.oq@7068 = 2020202020202020</action>
<action>maincpu.mq@7068 = 2888288828882888</action>
<action>maincpu.oq@7070 = 28A028A028A028A0</action>
<action>maincpu.mq@7070 = 2020202020202020</action>
</script>
</cheat>
</mamecheat>
yamatoa.xml
Code: Select all
<!-- Yamato (set 2) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>maincpu.ob@2A36 = C9</action>
</script>
<script state="off">
<action>maincpu.ob@2A36 = AF</action>
</script>
</cheat>
<cheat desc="rapid fire">
<script state="on">
<action>maincpu.ob@16E7 = 00</action> <!-- cannon -->
<action>maincpu.ob@4A1D = 00</action> <!-- vulcan -->
</script>
<script state="off">
<action>maincpu.ob@16E7 = C0</action>
<action>maincpu.ob@4A1D = C0</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter min="0x01" max="0x05" step="0x01" />
<script state="on">
<action>maincpu.mw@47CB = 7000 </action>
<action>maincpu.oq@7000 = 10C1FFFFCDC5FF06</action>
<action>maincpu.mq@7000 = FFFF28E1FFFF007F</action>
<action>maincpu.oq@7008 = FFFFFFFFFFFFC9FF</action>
<action>maincpu.mq@7008 = FFFFFFFFFFFFFFF9</action>
<!--
7000 | 06 xx : ld b,$xx
7002 | C5 : push bc
7003 | CD E1 28 : call $28E1
7006 | C1 : pop bc
7007 | 10 F9 : djnz $7002
7009 | C9 : ret
-->
</script>
<script state="change">
<action>maincpu.mb@7001 = param</action>
</script>
<script state="off">
<action>maincpu.mw@47CB = 28E1 </action>
<action>maincpu.oq@7000 = 2020202020202020</action>
<action>maincpu.mq@7000 = 2888288828882888</action>
<action>maincpu.oq@7008 = 2020202020202020</action>
<action>maincpu.mq@7008 = 2888288828882888</action>
</script>
</cheat>
<cheat desc="fast vulcan">
<script state="on">
<action>maincpu.ob@4A08 = C3</action>
</script>
<script state="off">
<action>maincpu.ob@4A08 = CA</action>
</script>
</cheat>
<cheat desc="no delay cannon">
<script state="on">
<action>maincpu.ob@1694 = C3</action>
</script>
<script state="off">
<action>maincpu.ob@1694 = CA</action>
</script>
</cheat>
<cheat desc="sound test mode">
<!-- you can't stop sound codes 0x01 - 0x08 by sound stop button -->
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.ob@00B1 = C9 </action> <!-- disable credit display -->
<action>maincpu.mw@090E = 7010 </action>
<action>maincpu.oq@7010 = 47B8FFFF3AFFFF21</action>
<action>maincpu.mq@7010 = FFFFA000FF6000FF</action>
<action>maincpu.oq@7018 = FE35FF20FFFEFF28</action>
<action>maincpu.mq@7018 = FFFF01FF40FFF9FF</action>
<action>maincpu.oq@7020 = FF20FFFE34FF20FF</action>
<action>maincpu.mq@7020 = 04FF20FFFF01FF80</action>
<action>maincpu.oq@7028 = FF20FFFEFF18FF3E</action>
<action>maincpu.mq@7028 = 05FF10FF06FFF0FF</action>
<action>maincpu.oq@7030 = 20FFFE787786FF3E</action>
<action>maincpu.mq@7030 = FF04FFFFFFFF10FF</action>
<action>maincpu.oq@7038 = FF20FFFEFF187EFF</action>
<action>maincpu.mq@7038 = 11FF08FF05FFFF03</action>
<action>maincpu.oq@7040 = FF3085FFFF2187AF</action>
<action>maincpu.mq@7040 = 01FFFF7053FFFFFF</action>
<action>maincpu.oq@7048 = D37E23FFD37E6F24</action>
<action>maincpu.mq@7048 = FFFFFF00FFFFFFFF</action>
<action>maincpu.oq@7050 = FFFFFFFFFFFF18FF</action>
<action>maincpu.mq@7050 = 0200010000BDFF01</action>
<action>maincpu.oq@7058 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@7058 = 2000100008000400</action>
<action>maincpu.oq@7060 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@7060 = 0001000080004000</action>
<action>maincpu.oq@7068 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@7068 = 0010000800040002</action>
<action>maincpu.oq@7070 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@7070 = FFFFFF8000400020</action>
<!--
7010 | 21 00 60 : ld hl,$6000 // sound code address
7013 | 3A 00 A0 : ld a,($A000) // read input
7016 | B8 : cp b
7017 | 47 : ld b,a
7018 | 28 F9 : jr z,$7013
701A | FE 40 : cp $40
701C | 20 01 : jr nz,$701F
701E | 35 : dec (hl) // decrease code -01
701F | FE 80 : cp $80
7021 | 20 01 : jr nz,$7024
7023 | 34 : inc (hl) // increase code +01
7024 | FE 20 : cp $20
7026 | 20 04 : jr nz,$702C
7028 | 3E F0 : ld a,$F0 // decrease code -10
702A | 18 06 : jr $7032
702C | FE 10 : cp $10
702E | 20 05 : jr nz,$7035
7030 | 3E 10 : ld a,$10 // increase code +10
7032 | 86 : add a,(hl)
7033 | 77 : ld (hl),a
7034 | 78 : ld a,b
7035 | FE 04 : cp $04
7037 | 20 03 : jr nz,$703C
7039 | 7E : ld a,(hl) // play sound
703A | 18 05 : jr $7041
703C | FE 08 : cp $08
703E | 20 11 : jr nz,$7051
7040 | AF : xor a // stop sound
7041 | 87 : add a,a // convert sound code
7042 | 21 53 70 : ld hl,$7053
7045 | 85 : add a,l
7046 | 30 01 : jr nc,$7049
7048 | 24 : inc h
7049 | 6F : ld l,a
704A | 7E : ld a,(hl)
704B | D3 00 : out ($00),a // send sound code ($00)
704D | 23 : inc hl
704E | 7E : ld a,(hl)
704F | D3 01 : out ($01),a // send sound code ($01)
7051 | 18 BD : jr $7010
-->
7053 - 7074 : sound code conversion table
code $00 $01
00 00 00 stop $01 sounds (not $00)
01 01 00 sfx
02 02 00 (none?)
03 04 00 sfx
04 08 00 sfx
05 10 00 (none?)
06 20 00 sfx
07 40 00 (none?)
08 80 00 (none?)
09 00 01 main theme
0a 00 02 (none?)
0b 00 04 sfx
0c 00 08 sfx
0d 00 10 (none?)
0e 00 20 (none?)
0f 00 40 (none?)
10 00 80 (none?)
-->
</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@6000</argument>
</output>
</script>
<script state="off">
<action>maincpu.ob@00B1 = C8 </action>
<action>maincpu.mw@090E = 2CAE </action>
<action>maincpu.oq@7010 = 28A028A028A028A0</action>
<action>maincpu.mq@7010 = 2020202020202020</action>
<action>maincpu.oq@7018 = 28A028A028A028A0</action>
<action>maincpu.mq@7018 = 2020202020202020</action>
<action>maincpu.oq@7020 = 2020202020202020</action>
<action>maincpu.mq@7020 = 2888288828882888</action>
<action>maincpu.oq@7028 = 2020202020202020</action>
<action>maincpu.mq@7028 = 2888288828882888</action>
<action>maincpu.oq@7030 = 28A028A028A028A0</action>
<action>maincpu.mq@7030 = 2020202020202020</action>
<action>maincpu.oq@7038 = 28A028A028A028A0</action>
<action>maincpu.mq@7038 = 2020202020202020</action>
<action>maincpu.oq@7040 = 2020202020202020</action>
<action>maincpu.mq@7040 = 2888288828882888</action>
<action>maincpu.oq@7048 = 2020202020202020</action>
<action>maincpu.mq@7048 = 2888288828882888</action>
<action>maincpu.oq@7050 = 28A028A028A028A0</action>
<action>maincpu.mq@7050 = 2020202020202020</action>
<action>maincpu.oq@7058 = 28A028A028A028A0</action>
<action>maincpu.mq@7058 = 2020202020202020</action>
<action>maincpu.oq@7060 = 2020202020202020</action>
<action>maincpu.mq@7060 = 2888288828882888</action>
<action>maincpu.oq@7068 = 2020202020202020</action>
<action>maincpu.mq@7068 = 2888288828882888</action>
<action>maincpu.oq@7070 = 28A028A028A028A0</action>
<action>maincpu.mq@7070 = 2020202020202020</action>
</script>
</cheat>
</mamecheat>
yamatou.xml
Code: Select all
<!-- Yamato (US) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>maincpu.ob@2B8D = C9</action>
</script>
<script state="off">
<action>maincpu.ob@2B8D = AF</action>
</script>
</cheat>
<cheat desc="rapid fire">
<script state="on">
<action>maincpu.ob@1834 = 00</action> <!-- cannon -->
<action>maincpu.ob@4B7F = 00</action> <!-- vulcan -->
</script>
<script state="off">
<action>maincpu.ob@1834 = C0</action>
<action>maincpu.ob@4B7F = C0</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter min="0x01" max="0x05" step="0x01" />
<script state="on">
<action>maincpu.mw@492D = 7A90 </action>
<action>maincpu.oq@7A90 = 10C1FFFFCDC5FF06</action>
<action>maincpu.mq@7A90 = FFFF2A38FFFF007F</action>
<action>maincpu.oq@7A98 = FFFFFFFFFFFFC9FF</action>
<action>maincpu.mq@7A98 = FFFFFFFFFFFFFFF9</action>
<!--
7A90 | 06 xx : ld b,$xx
7A92 | C5 : push bc
7A93 | CD 38 2A : call $2A38
7A96 | C1 : pop bc
7A97 | 10 F9 : djnz $7A92
7A99 | C9 : ret
-->
</script>
<script state="change">
<action>maincpu.mb@7A91 = param</action>
</script>
<script state="off">
<action>maincpu.mw@492D = 2A38 </action>
<action>maincpu.oq@7A90 = 08A808A808A808A8</action>
<action>maincpu.mq@7A90 = 0000000000000000</action>
<action>maincpu.oq@7A98 = 08A808A808A808A8</action>
<action>maincpu.mq@7A98 = 0000000000000000</action>
</script>
</cheat>
<cheat desc="fast vulcan">
<script state="on">
<action>maincpu.ob@4B6A = C3</action>
</script>
<script state="off">
<action>maincpu.ob@4B6A = CA</action>
</script>
</cheat>
<cheat desc="no delay cannon">
<script state="on">
<action>maincpu.ob@17E1 = C3</action>
</script>
<script state="off">
<action>maincpu.ob@17E1 = CA</action>
</script>
</cheat>
<cheat desc="sound test mode (test)">
<!-- you can't stop 0x01 - 0x08 sounds by sound stop button -->
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.ob@00B1 = C9 </action> <!-- disable credit display -->
<action>maincpu.mw@0A5B = 7AA0 </action>
<action>maincpu.oq@7AA0 = 47B8FFFF3AFFFF21</action>
<action>maincpu.mq@7AA0 = FFFFA000FF6000FF</action>
<action>maincpu.oq@7AA8 = FE35FF20FFFEFF28</action>
<action>maincpu.mq@7AA8 = FFFF01FF40FFF9FF</action>
<action>maincpu.oq@7AB0 = FF20FFFE34FF20FF</action>
<action>maincpu.mq@7AB0 = 04FF20FFFF01FF80</action>
<action>maincpu.oq@7AB8 = FF20FFFEFF18FF3E</action>
<action>maincpu.mq@7AB8 = 05FF10FF06FFF0FF</action>
<action>maincpu.oq@7AC0 = 20FFFE787786FF3E</action>
<action>maincpu.mq@7AC0 = FF04FFFFFFFF10FF</action>
<action>maincpu.oq@7AC8 = FF20FFFEFF187EFF</action>
<action>maincpu.mq@7AC8 = 11FF08FF05FFFF03</action>
<action>maincpu.oq@7AD0 = FF3085FFFF2187AF</action>
<action>maincpu.mq@7AD0 = 01FFFF7AE3FFFFFF</action>
<action>maincpu.oq@7AD8 = D37E23FFD37E6F24</action>
<action>maincpu.mq@7AD8 = FFFFFF00FFFFFFFF</action>
<action>maincpu.oq@7AE0 = FFFFFFFFFFFF18FF</action>
<action>maincpu.mq@7AE0 = 0200010000BDFF01</action>
<action>maincpu.oq@7AE8 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@7AE8 = 2000100008000400</action>
<action>maincpu.oq@7AF0 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@7AF0 = 0001000080004000</action>
<action>maincpu.oq@7AF8 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@7AF8 = 0010000800040002</action>
<action>maincpu.oq@7B00 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@7B00 = FFFFFF8000400020</action>
<!--
7AA0 | 21 FF FF : ld hl,$6000 // sound code address
7AA3 | 3A FF FF : ld a,($A000) // read input
7AA6 | B8 : cp b
7AA7 | 47 : ld b,a
7AA8 | 28 FF : jr z,$7AA3
7AAA | FE FF : cp $40
7AAC | 20 FF : jr nz,$7AAF
7AAE | 35 : dec (hl) // decrease code -01
7AAF | FE FF : cp $80
7AB1 | 20 FF : jr nz,$7AB4
7AB3 | 34 : inc (hl) // increase code +01
7AB4 | FE FF : cp $20
7AB6 | 20 FF : jr nz,$7ABC
7AB8 | 3E FF : ld a,$F0 // decrease code -10
7ABA | 18 FF : jr $7AC2
7ABC | FE FF : cp $10
7ABE | 20 FF : jr nz,$7AC5
7AC0 | 3E FF : ld a,$10 // increase code +10
7AC2 | 86 : add a,(hl)
7AC3 | 77 : ld (hl),a
7AC4 | 78 : ld a,b
7AC5 | FE FF : cp $04
7AC7 | 20 FF : jr nz,$7ACC
7AC9 | 7E : ld a,(hl) // play sound
7ACA | 18 FF : jr $7AD1
7ACC | FE FF : cp $08
7ACE | 20 FF : jr nz,$7AE1
7AD0 | AF : xor a // stop sound
7AD1 | 87 : add a,a // convert sound code
7AD2 | 21 FF FF : ld hl,$7AE3
7AD5 | 85 : add a,l
7AD6 | 30 FF : jr nc,$7AD9
7AD8 | 24 : inc h
7AD9 | 6F : ld l,a
7ADA | 7E : ld a,(hl)
7ADB | D3 FF : out ($00),a // send sound code ($00)
7ADD | 23 : inc hl
7ADE | 7E : ld a,(hl)
7ADF | D3 FF : out ($01),a // send sound code ($01)
7AE1 | 18 FF : jr $7AA0
7AE3 - 7B04 : sound code conversion table
code $00 $01
00 00 00 stop $01 sounds (not $00)
01 01 00 sfx
02 02 00 (none?)
03 04 00 sfx
04 08 00 sfx
05 10 00 (none?)
06 20 00 sfx
07 40 00 (none?)
08 80 00 (none?)
09 00 01 main theme
0a 00 02 (none?)
0b 00 04 sfx
0c 00 08 sfx
0d 00 10 (none?)
0e 00 20 (none?)
0f 00 40 (none?)
10 00 80 (none?)
-->
</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@6000</argument>
</output>
</script>
<script state="off">
<action>maincpu.ob@00B1 = C8 </action>
<action>maincpu.mw@0A5B = 2E05 </action>
<action>maincpu.oq@7AA0 = 8008800880088008</action>
<action>maincpu.mq@7AA0 = 0000000000000000</action>
<action>maincpu.oq@7AA8 = 8008800880088008</action>
<action>maincpu.mq@7AA8 = 0000000000000000</action>
<action>maincpu.oq@7AB0 = 08A808A808A808A8</action>
<action>maincpu.mq@7AB0 = 0000000000000000</action>
<action>maincpu.oq@7AB8 = 08A808A808A808A8</action>
<action>maincpu.mq@7AB8 = 0000000000000000</action>
<action>maincpu.oq@7AC0 = 8008800880088008</action>
<action>maincpu.mq@7AC0 = 0000000000000000</action>
<action>maincpu.oq@7AC8 = 8008800880088008</action>
<action>maincpu.mq@7AC8 = 0000000000000000</action>
<action>maincpu.oq@7AD0 = 08A808A808A808A8</action>
<action>maincpu.mq@7AD0 = 0000000000000000</action>
<action>maincpu.oq@7AD8 = 08A808A808A808A8</action>
<action>maincpu.mq@7AD8 = 0000000000000000</action>
<action>maincpu.oq@7AE0 = 8008800880088008</action>
<action>maincpu.mq@7AE0 = 0000000000000000</action>
<action>maincpu.oq@7AE8 = 8008800880088008</action>
<action>maincpu.mq@7AE8 = 0000000000000000</action>
<action>maincpu.oq@7AF0 = 08A808A808A808A8</action>
<action>maincpu.mq@7AF0 = 0000000000000000</action>
<action>maincpu.oq@7AF8 = 08A808A808A808A8</action>
<action>maincpu.mq@7AF8 = 0000000000000000</action>
<action>maincpu.oq@7B00 = 0008000800080008</action>
<action>maincpu.mq@7B00 = 0000000000000000</action>
</script>
</cheat>
</mamecheat>