[wyvernf0] Wyvern F-0

This forum is for posting M.A.M.E. Work In Progress "Arcade"cheats that are not quite ready for the prime time. If the cheats are buggy or the cheat descriptions are non-standard then please post them here. Help maybe given but there are no guarantees and they will only be added to the cheat file when the cheat file maintainer is happy with them.
Post Reply
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[wyvernf0] Wyvern F-0

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.mb@25f1 = 18</action>
    </script>
    <script state="off">
        <action>maincpu.mb@25f1 = 30</action>
    </script>
</cheat>

<cheat desc="no hit - subunit">
    <script state="on">
        <action>maincpu.mb@4a15 = 18</action>
    </script>
    <script state="off">
        <action>maincpu.mb@4a15 = 30</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mb@1e03 = 01</action> <!-- shot -->
        <action>maincpu.mb@1c94 = 10</action> <!-- missile -->
    </script>
    <script state="off">
        <action>maincpu.mb@1e03 = 1e</action>
        <action>maincpu.mb@1c94 = 30</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter min="0x01" max="0x05" step="0x01" />
    <script state="change">
        <action>maincpu.mb@1b07 =  param</action>
        <action>maincpu.mb@1b27 = -param</action>
    </script>
    <script state="off">
        <action>maincpu.mb@1b07 = 01</action>
        <action>maincpu.mb@1b27 = ff</action>
    </script>
</cheat>

<cheat desc="bullet speed">
    <parameter>
        <item value="0x01">01 (slow)</item>
        <item value="0x08">02       </item>
        <item value="0x10">03       </item>
        <item value="0x18">04       </item>
        <item value="0x20">05 (fast)</item>
    </parameter>
    <script state="change">
        <action>maincpu.mb@1e9c = param</action> <!-- normal -->
        <action>maincpu.mb@1ea6 = param</action> <!-- power up -->
        <action>maincpu.mb@1eb9 = param</action> <!-- shot range -->
    </script>
    <script state="off">
        <action>maincpu.mb@1e9c = 09</action>
        <action>maincpu.mb@1ea6 = 0e</action>
        <action>maincpu.mb@1ea6 = 11</action>
    </script>
</cheat>

<cheat desc="fast missile">
    <script state="on">
        <action>maincpu.mb@1ce6 =               16</action>
        <action>maincpu.mw@1cfb =             8f90</action>
        <action>maincpu.pq@8f90 = 40c6ab7edd1da9cd</action>
        <action>maincpu.pq@8f98 = 00000000c9ab77dd</action>
        <!--
        1ce3 | dd 36 5b 16 : ld   (ix+$5b),$16
        1cfa | cd 90 8f    : call $8f90
        8f90 | cd a9 1d    : call $1da9
        8f93 | dd 7e ab    : ld   a,(ix-$55)
        8f96 | c6 17       : add  a,$40
        8f98 | dd 77 ab    : ld   (ix-$55),a
        8f9b | c9          : ret
        -->
    </script>
    <script state="off">
        <action>maincpu.mb@1ce6 =               00</action>
        <action>maincpu.mw@1cfb =             1da9</action>
        <action>maincpu.pq@8f90 = 0000000000000000</action>
        <action>maincpu.pq@8f98 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="skip rom check">
    <script state="on">
        <action>maincpu.mb@02f9 = bf</action>
    </script>
    <script state="off">
        <action>maincpu.mb@02f9 = c0</action>
    </script>
</cheat>
"fast missile" still need more test. I use empty RAM region instead of ROM to insert the routine so that this area may be overwritten by program code. (fortunately, I don't encounter "bad" case at the moment even in boot sequence)
Last edited by jman on Sat Oct 23, 2021 8:56 am, edited 1 time in total.
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[wyvernf0] sound test mode

Post 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.mq@7ec0 = 22efef3e000021fb</action>
        <action>maincpu.mq@7ec8 = 2020fed6053a8000</action>
        <action>maincpu.mq@7ed0 = 2010fe0b18403e04</action>
        <action>maincpu.mq@7ed8 = d6043a0318803e04</action>
        <action>maincpu.mq@7ee0 = 012004fee3286fbd</action>
        <action>maincpu.mq@7ee8 = 40fe24012008fe25</action>
        <action>maincpu.mq@7ef0 = 032080feef7c0220</action>
        <action>maincpu.mq@7ef8 = b3c234ca18ef003e</action>
        <!--
        7ec0 | fb       : ei
        7ec1 | 21 00 00 : ld  hl,$0000   // initialize sound and input values
        7ec4 | 3e ef    : ld  a,$ef
        7ec6 | ef       : rst $28
        7ec7 | 22 00 80 : ld  ($8000),hl
        7eca | 3a 05 d6 : ld  a,($d605)  // read button input
        7ecd | fe 20    : cp  $20
        7ecf | 20 04    : jr  nz,$7ed5
        7ed1 | 3e 40    : ld  a,$40
        7ed3 | 18 0b    : jr  $7ee0
        7ed5 | fe 10    : cp  $10
        7ed7 | 20 04    : jr  $7edd
        7ed9 | 3e 80    : ld  a,$80
        7edb | 18 03    : jr  $7ee0
        7edd | 3a 04 d6 : ld  a,($d604)  // read stick input
        7ee0 | bd       : cp  l
        7ee1 | 6f       : ld  l,a
        7ee2 | 28 e3    : jr  z,$7ec7
        7ee4 | fe 04    : cp  $04
        7ee6 | 20 01    : jr  nz,$7ee9
        7ee8 | 25       : dec h          // pressed left - code decrement
        7ee9 | fe 08    : cp  $08
        7eeb | 20 01    : jr  nz,$7eee
        7eed | 24       : inc h          // pressed right - code increment
        7eee | fe 40    : cp  $40
        7ef0 | 20 02    : jr  nz,$7ef4
        7ef2 | 7c       : ld  a,h        // pressed button1 - play sound
        7ef3 | ef       : rst $28
        7ef4 | fe 80    : cp  $80
        7ef6 | 20 03    : jr  nz,$7efb
        7ef8 | 3e 00    : ld  a,$00      // pressed button2 - stop sound
        7efa | ef       : rst $28
        7efb | 18 ca    : jr  $7ec7
        -->
    </script>
    <script state="run">
        <output format="----- wyvern f-0 sound test mode -----" line="10" align="center" />
        <output format="left : code decrement"                  line="11" align="center" />
        <output format="right : code increment"                 line="12" align="center" />
        <output format="button 1 : play sound"                  line="13" align="center" />
        <output format="button 2 : stop sound"                  line="14" align="center" />
        <output format="----------------------------"           line="15" align="center" />
        <output format="&lt;&lt; sound code %2.2X &gt;&gt;"     line="17" align="center">
            <argument>maincpu.pb@8001</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mq@7ec0 = 207eeccd68600006</action>
        <action>maincpu.mq@7ec8 = 067fa1211728b8fb</action>
        <action>maincpu.mq@7ed0 = 004011c31021dd07</action>
        <action>maincpu.mq@7ed8 = 1019dd230077dd7e</action>
        <action>maincpu.mq@7ee0 = 067fa821c9fe18f7</action>
        <action>maincpu.mq@7ee8 = 2347807ec9e62007</action>
        <action>maincpu.mq@7ef0 = 12b7cccbc980ee7c</action>
        <action>maincpu.mq@7ef8 = b3c234d101d5dbf9</action>
    </script>
</cheat>
"sound test mode" doesn't work when you set "skip rom check" code.
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[wyvernf0] Wyvern F-0 (update)

Post by jman »

Code: Select all

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mb@1e03 = 01</action> <!-- shot -->
        <action>maincpu.mb@1c94 = 01</action> <!-- missile (normal) -->
        <action>maincpu.mb@1c98 = 01</action> <!-- missile (power-up) -->
    </script>
    <script state="off">
        <action>maincpu.mb@1e03 = 1e</action>
        <action>maincpu.mb@1c94 = 30</action>
        <action>maincpu.mb@1c98 = 10</action>
    </script>
</cheat>
"auto fire" : adjust value for normal missile. add power-up missile.

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@7ec0 = ed810021efef3efb</action>
        <action>maincpu.mq@7ec8 = 27cb30e67ad6045b</action>
        <action>maincpu.mq@7ed0 = 2847b8b17b4f27cb</action>
        <action>maincpu.mq@7ed8 = 08fe35012004feee</action>
        <action>maincpu.mq@7ee0 = 3e042010fe340120</action>
        <action>maincpu.mq@7ee8 = 3e052020fe0618f0</action>
        <action>maincpu.mq@7ef0 = 032080fe78778610</action>
        <action>maincpu.mq@7ef8 = af022040fe78ef7e</action>
        <action>maincpu.mq@7f00 = 24195b3702c418ef</action>
        <!--
        7ec0 | fb          : ei             // enable interrupt
        7ec1 | 3e ef       : ld  a,$EF
        7ec3 | ef          : rst $28
        7ec4 | 21 00 81    : ld  hl,$8100
        7ec7 | ed 5b 04 d6 : ld  de,($D604) // read input
        7ecb | 7a          : ld  a,d
        7ecc | e6 30       : and $30
        7ece | cb 27       : sla a
        7ed0 | cb 27       : sla a
        7ed2 | 4f          : ld  c,a
        7ed3 | 7b          : ld  a,e
        7ed4 | b1          : or  c
        7ed5 | b8          : cp  b
        7ed6 | 47          : ld  b,a
        7ed7 | 28 ee       : jr  z,$7EC7
        7ed9 | fe 04       : cp  $04
        7edb | 20 01       : jr  nz,$7EDE
        7edd | 35          : dec (hl)       // decrease code -01
        7ede | fe 08       : cp  $08
        7ee0 | 20 01       : jr  nz,$7EE3
        7ee2 | 34          : inc (hl)       // increase code +01
        7ee3 | fe 10       : cp  $10
        7ee5 | 20 04       : jr  nz,$7EEB
        7ee7 | 3e f0       : ld  a,$F0      // decrease code -10
        7ee9 | 18 06       : jr  $7EF1
        7eeb | fe 20       : cp  $20
        7eed | 20 05       : jr  nz,$7EF4
        7eef | 3e 10       : ld  a,$10      // increase code +10
        7ef1 | 86          : add a,(hl)
        7ef2 | 77          : ld  (hl),a
        7ef3 | 78          : ld  a,b
        7ef4 | fe 80       : cp  $80
        7ef6 | 20 03       : jr  nz,$7EFB
        7ef8 | 7e          : ld  a,(hl)     // play sound
        7ef9 | ef          : rst $28
        7efa | 78          : ld  a,b
        7efb | fe 40       : cp  $40
        7efd | 20 02       : jr  nz,$7F01
        7eff | af          : xor a          // stop sound
        7f00 | ef          : rst $28
        7f01 | 18 c4       : jr  $7EC7
        -->
    </script>
    <script state="run">
        <output format="----- wyvern f-0 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="&lt;&lt; sound code %2.2X &gt;&gt;"     line="19" align="center"  >
            <argument>maincpu.pb@8100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mq@7ec0 = 207eeccd68600006</action>
        <action>maincpu.mq@7ec8 = 067fa1211728b8fb</action>
        <action>maincpu.mq@7ed0 = 004011c31021dd07</action>
        <action>maincpu.mq@7ed8 = 1019dd230077dd7e</action>
        <action>maincpu.mq@7ee0 = 067fa821c9fe18f7</action>
        <action>maincpu.mq@7ee8 = 2347807ec9e62007</action>
        <action>maincpu.mq@7ef0 = 12b7cccbc980ee7c</action>
        <action>maincpu.mq@7ef8 = b3c234d101d5dbf9</action>
        <action>maincpu.mq@7f00 = 24195b37020d3b04</action>
    </script>
</cheat>
"sound test mode" : rewrite routine. add up/down key (code ±10).
Post Reply