It works in mspacman. But I don't understand why do you read $2b32.
Code: Select all
8768 | ED 5F : ld a,r
876A | E6 1F : and $1F
876C | 90 : sub b
876D | 30 FD : jr nc,$876C
876F | 80 : add a,b
8770 | 21 9D 87 : ld hl,$879D
8773 | 47 : ld b,a
8774 | 87 : add a,a
8775 | 80 : add a,b
8776 | D7 : rst $10
In $8768, read "r" register so that $2b32 seems to be unneeded.
Simplified code is the following.
Code: Select all
<cheat desc="banana for all random fruit boards">
<script state="on">
<action>maincpu.mw@18768 = 063e</action> <!-- 06=Banana, 05=Pear ... 00=Cherry -->
</script>
<script state="off">
<action>maincpu.mw@18768 = 5fed</action>
</script>
</cheat>