Guides:SRAM Glitch ACE Setups (EN): Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
mNo edit summary |
mNo edit summary |
||
Line 564: | Line 564: | ||
0E 80 ld c, $80 ; Ensure checksum consistency |
0E 80 ld c, $80 ; Ensure checksum consistency |
||
21 4B CF ld hl, wStringBuffer ; Address where new name gets written to |
21 4B CF ld hl, wStringBuffer ; Address where new name gets written to |
||
D1 pop de |
D1 pop de ; Continue writing from last saved de |
||
.newChar |
.newChar |
||
2A ld a, (hli) |
2A ld a, (hli) |
||
Line 589: | Line 589: | ||
1F rra ; Shift all bits to the right, transfer former bit 7 to bit 1 and store status of this bit in c flag |
1F rra ; Shift all bits to the right, transfer former bit 7 to bit 1 and store status of this bit in c flag |
||
38 CF jp c, .loop ; Is A is pressed, start new nickname |
38 CF jp c, .loop ; Is A is pressed, start new nickname |
||
1B dec de ; If another button outside of A is pressed, either we're using the correction function, executing or stopping |
1B dec de ; If another button outside of A is pressed, either we're using the correction function, executing or stopping |
||
1F rra ; is B pressed? |
1F rra ; is B pressed? |
||
38 E7 jp c, .terminator |
38 E7 jp c, .terminator ; If B is pressed, de has been decremented once so continue just displaying the new value de points towards |
||
1F rra |
1F rra |
||
1F rra ; Is START pressed? |
1F rra ; Is START pressed? |
||
Line 599: | Line 599: | ||
1B dec de |
1B dec de |
||
1B dec de ; de's value has been decremented a total of 5 times, equal to a full nickname's worth of data |
1B dec de ; de's value has been decremented a total of 5 times, equal to a full nickname's worth of data |
||
17 rla ; Shift all bits to the left, transfer former bit 7 to bit 1 and store status of this bit in c flag. Is SELECT pressed? |
17 rla ; Shift all bits to the left, transfer former bit 7 to bit 1 and store status of this bit in c flag. Is SELECT pressed? |
||
30 C1 jp nc, loop |
30 C1 jp nc, loop ; If SELECT NOT pressed and dpad pressed instead, start new mail after de has been decremented a total of 5 times. Basically undoes a full nickname's worth of data |
||
E1 pop hl ; Otherwise, pop the stored address of $D89C from the stack |
E1 pop hl ; Otherwise, pop the stored address of $D89C from the stack |
||
C9 ret ; Since $D89C was popped, return to normal execution without executing newly written code |
C9 ret ; Since $D89C was popped, return to normal execution without executing newly written code |
||
Line 641: | Line 641: | ||
<pre> |
<pre> |
||
21 AE D5 ld hl, $D5AE |
21 AE D5 ld hl, $D5AE ; Part of wMissableObjectFlags |
||
CB AE res 5, (hl) |
CB AE res 5, (hl) ; Reenable Eevee's poké ball |
||
AF xor a ; a = $00 |
AF xor a ; a = $00 |
||
EA 56 D3 ld (wObtainedBadges), a |
EA 56 D3 ld (wObtainedBadges), a ; Reset badges |
||
21 80 DA ld hl, wBoxCount |
21 80 DA ld hl, wBoxCount |
||
22 ldi (hl), a |
22 ldi (hl), a ; Set amount of pokémon in box to 0 |
||
3D dec a |
3D dec a ; a = $FF |
||
22 ldi (hl), a |
22 ldi (hl), a ; Add proper terminator to wBoxSpecies |
||
AF xor a ; a = $00 |
AF xor a ; a = $00 |
||
01 26 00 ld bc, 0026 |
01 26 00 ld bc, 0026 |