[smsj/astrow] Astro Warrior

This forum is for posting cheats for any non-arcade game in M.A.M.E. ( aka the M.E.S.S. games ) including any softwarelist game. Requests will be fulfilled here....but please keep the requests to the requests forum.
Post Reply
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[smsj/astrow] Astro Warrior

Post by jman »

Code: Select all

<cheat desc="no hit (wip)">
	<script state="on">
		<!-- objects -->
		<action>slot:cart:rom.mw@01a7d =             8000</action>
		<action>slot:cart:rom.mq@18000 = fe08380ffe007efd</action>
		<action>slot:cart:rom.mq@18008 = a7c91a88cd043013</action>
		<action>slot:cart:rom.mq@18010 = ffffffffffffffc9</action>
		<!--
		8000 | fd 7e 00 : ld   a,(iy+$00)
		8003 | fe 0f    : cp   $0f
		8005 | 38 08    : jr   c,$800f
		8007 | fe 13    : cp   $13
		8009 | 30 04    : jr   nc,$800f
		800b | cd 88 1a : call $1a88
		800e | c9       : ret
		800f | a7       : and  a
		8010 | c9       : ret
		-->
		<action>slot:cart:rom.mb@02528 = e3</action> <!-- boss -->
	</script>
	<script state="off">
		<action>slot:cart:rom.mw@01a7d =             1a88</action>
		<action>slot:cart:rom.mq@18000 = ffffffffffffffff</action>
		<action>slot:cart:rom.mq@18008 = ffffffffffffffff</action>
		<action>slot:cart:rom.mq@18010 = ffffffffffffffff</action>
		<action>slot:cart:rom.mb@02528 =               34</action>
	</script>
</cheat>

<cheat desc="auto fire (wip)">
	<script state="on">
		<action>slot:cart:rom.mb@0950 = 01</action>
		<action>slot:cart:rom.mb@0964 = 01</action>
	</script>
	<script state="off">
		<action>slot:cart:rom.mb@0950 = 20</action>
		<action>slot:cart:rom.mb@0964 = 20</action>
	</script>
</cheat>

<cheat desc="player speed (wip)">
	<parameter>
		<item value="0x01">01 (slow)</item>
		<item value="0x03">02       </item>
		<item value="0x06">03       </item>
		<item value="0x09">04       </item>
		<item value="0x0c">05       </item>
		<item value="0x0f">06       </item>
		<item value="0x12">07       </item>
		<item value="0x15">08 (fast)</item>
	</parameter>
	<script state="on">
		<action>slot:cart:rom.md@0a3e = 7d00002e</action>
	</script>
	<script state="change">
		<action>slot:cart:rom.mb@0a3f = param</action>
	</script>
	<script state="off">
		<action>slot:cart:rom.md@0a3e = 7d136edd</action>
	</script>
</cheat>

<cheat desc="information display (wip)">
	<script state="run">
		<action>temp0 = maincpu.pb@c102 band 0x01</action>
		<action condition="maincpu.pb@c23f == 0">temp1 = 0</action>
		<action condition="maincpu.pb@c23f != 0">temp1 = tobcd(frombcd(maincpu.pb@c23f - 1))</action>
		<action condition="maincpu.pb@c120 == 0">temp2 = 0</action>
		<action condition="maincpu.pb@c120 != 0">temp2 = tobcd(frombcd(maincpu.pb@c120 - 1))</action>
		<action condition="maincpu.pb@c121 == 0">temp3 = 0</action>
		<action condition="maincpu.pb@c121 != 0">temp3 = tobcd(frombcd(maincpu.pb@c121 - 1))</action>
		<output condition="temp0 == 1" format="Player1 &lt; %x &gt; %6X     HighScore : %6X     Player2 &lt; %x &gt; %6X" line="1" align="center">
			<argument>temp1</argument>
			<argument>(maincpu.pb@c232 * 10000) + (maincpu.pb@c233 * 100) + (maincpu.pb@c234)</argument>
			<argument>(maincpu.pb@c030 * 10000) + (maincpu.pb@c031 * 100) + (maincpu.pb@c032)</argument>
			<argument>temp3</argument>
			<argument>(maincpu.pb@c133 * 10000) + (maincpu.pb@c134 * 100) + (maincpu.pb@c135)</argument>
		</output>
		<output condition="temp0 == 0" format="Player1 &lt; %x &gt; %6X     HighScore : %6X     Player2 &lt; %x &gt; %6X" line="1" align="center">
			<argument>temp2</argument>
			<argument>(maincpu.pb@c130 * 10000) + (maincpu.pb@c131 * 100) + (maincpu.pb@c132)</argument>
			<argument>(maincpu.pb@c030 * 10000) + (maincpu.pb@c031 * 100) + (maincpu.pb@c032)</argument>
			<argument>temp1</argument>
			<argument>(maincpu.pb@c232 * 10000) + (maincpu.pb@c233 * 100) + (maincpu.pb@c234)</argument>
		</output>
	</script>
</cheat>

<cheat desc="sound test mode (wip)">
	<comment>reset the game (F3) to enter sound test mode</comment>
	<script state="on">
		<action>slot:cart:rom.mq@1d40 = b810c3ffff32033e</action>
		<action>slot:cart:rom.mq@f810 = d5b81411810021fb</action>
		<action>slot:cart:rom.mq@f818 = c86fbddcdbc10022</action>
		<action>slot:cart:rom.mq@f820 = 20f7fe250120fbfe</action>
		<action>slot:cart:rom.mq@f828 = 187c0320effe2401</action>
		<action>slot:cart:rom.mq@f830 = dc0032afc0dffe04</action>
		<action>slot:cart:rom.mq@f838 = ffffffffffffffc9</action>
		<!--
		1d40 | 3e 03    : ld   a,$03
		1d42 | 32 ff ff : ld   ($ffff),a  // set bank
		1d45 | c3 10 b8 : jp   $b810
		b810 | fb       : ei
		b811 | 21 00 81 : ld   hl,$8100   // initialize sound and input value
		b814 | 11 14 b8 : ld   de,$b814
		b817 | d5       : push de
		b818 | 22 00 c1 : ld   ($c100),hl
		b81b | db dc    : in   a,($dc)    // read input
		b81d | bd       : cp   l
		b81e | 6f       : ld   l,a
		b81f | c8       : ret  z
		b820 | fe fb    : cp   $fb
		b822 | 20 01    : jr   nz,$b825
		b824 | 25       : dec  h          // pressed left - code decrement
		b825 | fe f7    : cp   $f7
		b827 | 20 01    : jr   nz,$b82a
		b829 | 24       : inc  h          // pressed right - code increment
		b82a | fe ef    : cp   $ef
		b82c | 20 03    : jr   nz,$b831
		b82e | 7c       : ld   a,h        // pressed button 1 - play sound
		b82f | 18 04    : jr   $b835
		b831 | fe df    : cp   $df
		b833 | c0       : ret  nz
		b834 | af       : xor  a          // pressed button 2 - stop sound
		b835 | 32 00 dc : ld   ($dc00),a  // send sound code
		b838 | c9       : ret
		-->
	</script>
	<script state="run">
		<output format="----- astro warrior 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@c101</argument>
		</output>
	</script>
	<script state="off">
		<action>slot:cart:rom.mq@1d40 = cd05f4cddffe31f3</action>
		<action>slot:cart:rom.mq@f810 = ffffffffffffffff</action>
		<action>slot:cart:rom.mq@f818 = ffffffffffffffff</action>
		<action>slot:cart:rom.mq@f820 = ffffffffffffffff</action>
		<action>slot:cart:rom.mq@f828 = ffffffffffffffff</action>
		<action>slot:cart:rom.mq@f830 = ffffffffffffffff</action>
		<action>slot:cart:rom.mq@f838 = ffffffffffffffff</action>
	</script>
</cheat>
"information display" outputs score for player 1, 2, hiscore and life for player 1 and 2 on current screen.
Post Reply