Jump to content

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

m
Line 544:
.newMail
D5 push de
06 01 ld b, 01
21 5C 65 ld hl, DisplayNameRaterScreen
CD D622 3539 call BankSwitch$3922 ; Changesets romb banksto and01, callthen jumps to Bankswitch, calling b:hl
0E 80 ld c, $80 ; Ensure checksum consistency
21 4B CF ld hl, wStringBuffer ; Address where new name gets written to
Line 563 ⟶ 562:
18 F3 jp .newChar
.terminator
21 29 C4 ld hl, $C429 ; Corresponds to screen tile
0E 01 ld c, 01
D5 push de
21 2901 C4 ld hl, $C429C401 ; Corresponds to screen tile
CD DF 15 call PrintBCDNumber.loop ; Prints c amount of bytes at de to hl in binary coded decimal format, prints checksum
4D ld c, l ; How many bytes printed as numbers?
CD DF 15 call PrintBCDNumber.loop
.numLoop
1B2D dec del
CB FE set 7, (hl)
20 FB jp nz, .numLoop ; Repeat until hl == $C400
75 ld (hl), l ; Nulls out $C400
.inputLoop
CD 31 38 call JoypadLowSensitivity ; Halt execution until frame has passed, get joypad status and store result in hJoy5
F0 B5 ld a, (hJoy5)
E6 0F and $04 ; Set z flag if A, B, START, SELECT not pressed
28 F7 jp z, .inputLoop
1F rra ; isIs BA pressed? If yes, set c flag
D1 pop de
F038 B5CB ldjr ac, (hJoy5).newMail
A7 and a ; Check if no buttons are pressed
28 EE jp z, .terminator ; If no buttons pressed, keep displaying checksum
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
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?
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 ; Is START pressed?
D8 ret c ; Jump to $D89C, which was pushed to the stack at the start of the code and execute newly written code
1B dec de
1B dec de
1B dec de
1F rra ; Is STARTB pressed? If yes, set c flag
1B dec de ; de's value has been decremented a total of 5 times, equal to a full nickname's worth of data
38 E1 jr c, .terminator
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?
1F rra ; Is SELECT pressed? If yes, set c flag
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 storedstarting address of $D89C from theto stackhl
C9D8 ret c ; SinceIf $D89CSELECT was poppedpressed, simply return to normal execution without executing newly written codeoperations
E9 jp hl ; If START pressed, jump to hl to execute newly written code
</pre>
 
Line 594 ⟶ 592:
<pre>
11 9C D8 D5 D5
06 01 21 5C 65 CD 22
CD D6 3539 0E 80 21 4B
21 4B CF D1 2A 87 30
87 30 09 86 12 13 23
13 23 81 12 4F 18 F3
18 F3D5 21 2901 C4 4D
0ECD 01DF D515 CD2D DFCB
15FE CD20 31FB 3875 D1CD
F031 B538 A7F0 28B5 EEE6
1F0F 3828 CFF7 1B1F 1FD1
38 E7CB 1F1B 1F D838
1BE1 1B1F 1BE1 1BD8 17E9
30 C1 E1 C9 00
</pre>
 
1,537

edits

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