[opaopa] Opa Opa
Posted: Tue Jan 03, 2023 1:16 pm
Code: Select all
<cheat desc="no hit">
<script state="on">
<action>maincpu.od@3755 = 4fffffcd</action>
<action>maincpu.md@3755 = ff148dff</action>
<action>maincpu.oq@148d = ff3ed0fffeff7edd</action>
<action>maincpu.mq@148d = 14ffff0aff05ffff</action>
<action>maincpu.oq@1495 = 37cd3e0e000000c9</action>
<action>maincpu.mq@1495 = b0d79314ffffffff</action>
<!--
148d | dd 7e 05 : ld a,(ix+$05)
1490 | fe 0a : cp $0A
1492 | d0 : ret nc
1493 | 3e 14 : ld a,$14
1495 | c9 : ret
1496 | 00 : nop
1497 | 00 : nop
1498 | 00 : nop
-->
</script>
<script state="off">
<action>maincpu.od@3755 = 4f097edd</action>
<action>maincpu.md@3755 = b6059592</action>
<action>maincpu.oq@148d = c524cbfd0ad736fd</action>
<action>maincpu.mq@148d = ce010ced0300b8c4</action>
<action>maincpu.oq@1495 = 37cd3e0ebaeacbfd</action>
<action>maincpu.mq@1495 = b0d79314be015536</action>
</script>
</cheat>
<cheat desc="auto fire">
<script state="on">
<action>maincpu.mb@360a = 00</action>
</script>
<script state="off">
<action>maincpu.mb@360a = 1e</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter>
<item value="0x0040">01 (slow)</item>
<item value="0x00c0">02 </item>
<item value="0x01c0">03 </item>
<item value="0x02c0">04 </item>
<item value="0x03c0">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.ob@1873 = 21</action>
<action>maincpu.ob@18a1 = 21</action>
</script>
<script state="change">
<action>maincpu.mw@1874 = param</action>
<action>maincpu.mw@18a2 = param</action>
</script>
<script state="off">
<action>maincpu.ob@1873 = fd</action>
<action>maincpu.mw@1874 = 317d</action>
<action>maincpu.ob@18a1 = fd</action>
<action>maincpu.mw@18a2 = 31d9</action>
</script>
</cheat>
<cheat desc="free price">
<script state="on">
<action>maincpu.oq@1d40 = e7a93a005f574faf</action> <!-- calculate price (xor a / ld c,a / ld d,a / ld e,a / nop -->
<action>maincpu.oq@2055 = e1843a005f574faf</action> <!-- calculate price (xor a / ld c,a / ld d,a / ld e,a / nop -->
<action>maincpu.oq@207a = 23083a005f574faf</action> <!-- calculate price (xor a / ld c,a / ld d,a / ld e,a / nop -->
<action>maincpu.oq@209f = a1143a005f574faf</action> <!-- calculate price (xor a / ld c,a / ld d,a / ld e,a / nop -->
<action>maincpu.ob@59bc = 18</action> <!-- display item -->
<action>maincpu.od@79d5 = 6f675faf</action> <!-- display price at round start (xor a / ld e,a / ld h,a / ld l,a) -->
</script>
<script state="off">
<action>maincpu.oq@1d40 = e7a93a5e2356234e</action>
<action>maincpu.oq@2055 = e1843a5e2356234e</action>
<action>maincpu.oq@207a = 23083a5e2356234e</action>
<action>maincpu.oq@209f = a1143a5e2356234e</action>
<action>maincpu.ob@59bc = 30</action>
<action>maincpu.od@79d5 = b7799c06</action>
</script>
</cheat>
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.ib@000f7 = 01</action> <!-- set bank -->
<action>maincpu.oq@00117 = c3ffff32ffd3ff3e</action>
<action>maincpu.mq@00117 = ffc248fff7ff01ff</action>
<action>maincpu.oq@0011f = e61b5d3a0000ffff</action>
<action>maincpu.mq@0011f = 19c1f68cffffbf90</action>
<action>maincpu.oq@0bf90 = 2847b8ffdbffff21</action>
<action>maincpu.mq@17f90 = ffffffe1ffc100ff</action>
<action>maincpu.oq@0bf98 = fffe35ff20fffeff</action>
<action>maincpu.mq@17f98 = f7ffff01fffbfffa</action>
<action>maincpu.oq@0bfa0 = 3eff20fffe34ff20</action>
<action>maincpu.mq@17fa0 = ff04fffdffff01ff</action>
<action>maincpu.oq@0bfa8 = 3eff20fffeff18ff</action>
<action>maincpu.mq@17fa8 = ff05fffeff06fff0</action>
<action>maincpu.oq@0bfb0 = ff20fffe787786ff</action>
<action>maincpu.mq@17fb0 = 05ffefffffffff10</action>
<action>maincpu.oq@0bfb8 = 20fffeff18fff67e</action>
<action>maincpu.mq@17fb8 = ffdfff05ff80ffff</action>
<action>maincpu.oq@0bfc0 = 1eff18ffff32afff</action>
<action>maincpu.mq@17fc0 = ffccffc000ffff04</action>
<action>maincpu.ib@000f7 = maincpu.pb@c248</action> <!-- restore bank -->
<!--
0117 | 3e 01 : ld a,$01
0119 | d3 f7 : out ($F7),a // set bank
011b | 32 48 c2 : ld ($C248),a
011e | c3 90 bf : jp $BF90
0121 | 00 : nop
0122 | 00 : nop
================================
bf90 | 21 00 c1 : ld hl,$C100
bf93 | db e1 : in a,($E1) // read input
bf95 | b8 : cp b
bf96 | 47 : ld b,a
bf97 | 28 fa : jr z,$BF93
bf99 | fe fb : cp $FB
bf9b | 20 01 : jr nz,$BF9E
bf9d | 35 : dec (hl) // decrease code -01
bf9e | fe f7 : cp $F7
bfa0 | 20 01 : jr nz,$BFA3
bfa2 | 34 : inc (hl) // increase code +01
bfa3 | fe fd : cp $FD
bfa5 | 20 04 : jr nz,$BFAB
bfa7 | 3e f0 : ld a,$F0 // decrease code -10
bfa9 | 18 06 : jr $BFB1
bfab | fe fe : cp $FE
bfad | 20 05 : jr nz,$BFB4
bfaf | 3e 10 : ld a,$10 // increase code +10
bfb1 | 86 : add a,(hl)
bfb2 | 77 : ld (hl),a
bfb3 | 78 : ld a,b
bfb4 | fe ef : cp $EF
bfb6 | 20 05 : jr nz,$BFBD
bfb8 | 7e : ld a,(hl) // play sound
bfb9 | f6 80 : or $80
bfbb | 18 05 : jr $BFC2
bfbd | fe df : cp $DF
bfbf | 20 04 : jr nz,$BFC5
bfc1 | af : xor a // stop sound
bfc2 | 32 00 c0 : ld ($C000),a // send sound code
bfc5 | 18 cc : jr $BF93
-->
</script>
<script state="run">
<output format="----- opa opa 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@c100</argument>
</output>
</script>
<script state="off">
<action>maincpu.ib@000f7 = 01</action>
<action>maincpu.oq@00117 = 28cde720b7bcf33a</action>
<action>maincpu.mq@00117 = af5b5b3262c2378e</action>
<action>maincpu.oq@0011f = e61b5d3a4330c331</action>
<action>maincpu.mq@0011f = 19c1f68c00f91b73</action>
<action>maincpu.oq@0bf90 = 8c613b56cdd8dbca</action>
<action>maincpu.mq@17f90 = ffffffffffffffff</action>
<action>maincpu.oq@0bf98 = 8c613b56cdd8dbca</action>
<action>maincpu.mq@17f98 = ffffffffffffffff</action>
<action>maincpu.oq@0bfa0 = bbeed0913a2338e9</action>
<action>maincpu.mq@17fa0 = ffffffffffffffff</action>
<action>maincpu.oq@0bfa8 = bbeed0913a2338e9</action>
<action>maincpu.mq@17fa8 = ffffffffffffffff</action>
<action>maincpu.oq@0bfb0 = 8c613b56cdd8dbca</action>
<action>maincpu.mq@17fb0 = ffffffffffffffff</action>
<action>maincpu.oq@0bfb8 = 8c613b56cdd8dbca</action>
<action>maincpu.mq@17fb8 = ffffffffffffffff</action>
<action>maincpu.oq@0bfc0 = 1e70b98092571899</action>
<action>maincpu.mq@17fc0 = ffffffffffffffff</action>
<action>maincpu.ib@000f7 = maincpu.pb@c248</action>
</script>
</cheat>
"free price" works when you set BEFORE start round. It will be better to set in title screen.