Guides:SRAM Glitch ACE Setups (Yellow): Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
Line 581: | Line 581: | ||
===Explanation=== |
===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 $ |
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 $D66E. |
||
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. |
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> |
<pre> |
||
11 |
11 6E D6 ld de, UNUSED_MEMORY ; Memory between $D66F and $D6F4 goes unused |
||
D5 push de |
D5 push de |
||
21 |
21 0A DE ld hl, wBoxNicks |
||
.loop |
.loop |
||
2A ldi a, (hl) |
2A ldi a, (hl) |
||
Line 604: | Line 604: | ||
</pre> |
</pre> |
||
The last item, the |
The last item, the X Accuracy, simply form a pointer to $F32E. Due to echo RAM this address is equivalent to $D32E, which correspond to item #7'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=== |
===Raw Assembly=== |
||
<pre> |
<pre> |
||
11 |
11 6E Max Potion x110 |
||
D6 D5 TM14 x213 |
D6 D5 TM14 x213 |
||
21 |
21 0A Thunderstone x10 |
||
DA 2A TM22 x42 |
DA 2A TM22 x42 |
||
03 87 Great Ball x135 |
03 87 Great Ball x135 |
||
Line 620: | Line 620: | ||
F4 C9 TM44 x201 |
F4 C9 TM44 x201 |
||
2E F3 x243 |
|||
</pre> |
</pre> |
||