Anonymous user
Remote control Pikachu: Difference between revisions
→Notes
>Torchickens (Created page with "'''Remote control Pikachu''' is a ws m (hex:63) code for {{Yellow}}, created by Torchickens (ChickasaurusGL). This program allows the user to control Pikach...") |
(→Notes) |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 1:
'''Remote control Pikachu''' is a
This program allows the user to control Pikachu with the d-pad, provided the player is stuck in a wall in all four directions (or for the directions they wish to move Pikachu).
==Steps==
1. Trap yourself in
2. Use a method (such as [[TheZZAZZGlitch's memory editor]], [[offgao's memory editor]]) to write the following bytes at a place in RAM.
Line 13:
0B 3E 04 EA 37 D4 3E 01 EA 36 D4 C9 FA B3 FF D6 04 FE 01 38 02 30 04 AF EA F1
C1 C9
As code:
xor a
ld a,[d436]
or a
ld a,[ffb3]
sub a,80
cp a,01
jr c,$02
jr nc,$09
ld a,01
ld [d436],a
ld [d437],a
ret
ld a,[ffb3]
sub a,40
cp a,01
jr c,$02
jr nc,$0A
ld a,02
ld [d437],a
ld [d436],a
ret
ld a,[ffb3]
sub a,20
cp a,01
jr c,$02
jr nc,$0b
ld a,03
ld [d437],a
ld a,01
ld [d436],a
ret
ld [ffb3],a
sub a,10
cp a,01
jr c,$02
jr nc,$0b
ld a,04
ld [d437],a
ld a,01
ld [d436],a
ret
ld a,[ffb3]
sub a,04
cp a,01
jr c,$02
jr nc,$04
xor a
ld [c1f1],a
ret
3. Change D36D/D36E (map script pointer) to point to the little-endian (smaller byte first) address where you wrote your code. For example, if you wrote your code at DB7D the values would be 7D and DB.
===Notes===
This code reads from FFB3; a joypad address in the HRAM.
The value in FFB3 is determined by the combination of the bits set when pressing buttons, for example, moving down enables bit 0x7 (+0x80 to the value). If one wanted to modify the code for an input with (for instance) down and left at the same time, FFB3 would read 0xA0 (0x80+0x20).
<pre>
Bit 0x7/+0x80 - Down
Bit 0x6/+0x40 - Up
Bit 0x5/+0x20 - Left
Bit 0x4/+0x10 - Right
Bit 0x3/+0x08 - Start
Bit 0x2/+0x04 - Select
Bit 0x1/+0x02 - B
Bit 0x0/+0x01 - A
</pre>
==How to move Pikachu==
Line 28 ⟶ 143:
[[Category:Arbitrary code execution]]
[[Category:Arbitrary code execution programs]]
|