Jump to content

Guides:SRAM Glitch ACE Setups (Yellow): Difference between revisions

m
Line 581:
===Explanation===
 
The item code itself consists of two components. The first 10 items are used to write a program that takes text characters from the nicknames of characters currently within the active box, converts them, then writes the resulting values to unused memory starting from $D66AD66E.
 
Pairs of text characters are converted to single values through a [(2a + b)%256] formula, where a is the value of the first character and b the value of the second. text terminators are skipped, the code will stop and execute the newly written code once it either reads a $00 value or if values are being read past $DEFF.
 
<pre>
11 6F6E D6 ld de, UNUSED_MEMORY ; Memory between $D66F and $D6F4 goes unused
D5 push de
21 0B0A DE ld hl, wBoxNicks
.loop
2A ldi a, (hl)
Line 604:
</pre>
 
The last item, the LeafX StoneAccuracy, simply form a pointer to $F32FF32E. Due to echo RAM this address is equivalent to $D32FD32E, which correspond to item #67's item ID, the start of the item code. By replacing the map script pointer with this item, we can redirect the map script routine to execute the item code instead. This routine is executed on every frame, as long as the start menu isn't open.
 
===Raw Assembly===
 
<pre>
11 6F6E Max Potion x111x110
D6 D5 TM14 x213
21 0B0A Thunderstone x11x10
DA 2A TM22 x42
03 87 Great Ball x135
Line 620:
F4 C9 TM44 x201
 
2F2E F3 Leaf Stone x243
</pre>
 
1,514

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.