Jump to content

Crystal box name codes: Difference between revisions

TM counts are probably more convenient for long-term ACE.
>Bbbbbbbbba
(Moved a large chunk from 0x1500 control code arbitrary code execution to here.)
 
(TM counts are probably more convenient for long-term ACE.)
 
(2 intermediate revisions by 2 users not shown)
Line 1:
'''Box name codes''' are assembly instructions encoded in the names of boxes. They are used as payloads of [[arbitrary code execution]] exploits, and are usuallyoften the most convenient for that purpose in Generation II (at least for the "first-time ACE", which may be used to perform some further setup, such setting all TM quantities to 255), because the box names are easy to change, the available character set covers a large range of useful assembly instructions, and they are stored in a consecutive memory area (except the 0x50 terminators in between).
 
For a list of hex values for all available characters in Generation II and their corresponding assembly instructions, see [[the Big HEX List]].
Line 31:
or a, d0
 
ld ([f893)],a
 
pop hl
Line 43:
sub b9 ; 47
 
ld ([fb8c)],a
 
xor a
Line 55:
sub 9a ;c3
 
ld ([fa80)],a
 
ei
Line 65:
sub b8 ; 48
 
ld ([fb9c)],a
 
xor a
Line 75:
sub 8b ; 75
 
ld ([fa81)],a
 
xor a
Line 83:
ld d,b
 
ld ([fbac)],a
 
xor a
Line 95:
ld d,b
 
ld ([fa88)],a
 
or a
Line 115:
sub a8
 
ld ([fb88)],a
 
xor a
Line 125:
sub a9
 
ld ([fb8b)],a
 
xor a
Line 133:
ld d,b
 
ld ([f880)],a
 
ld ([f881)],a
 
ld d,b
Line 156:
(Pk)x'd
<tt>xor a</tt>
 
xor a
<tt>or a, 93</tt>
 
sub 80
<tt>sub 80</tt>
ld (fce1),a
 
ld d,b
<tt>ld ([fce1)],a</tt>
pop hl
 
or a
<tt>ld d,b</tt>
ret nc
 
ld d,b
<tt>pop hl</tt>
 
<tt>or a</tt>
 
<tt>ret nc</tt>
 
<tt>ld d,b</tt>
 
==Fly can go anywhere==
Line 181 ⟶ 187:
or a, ff
 
ld ([fca4)],a
 
ei
Line 189 ⟶ 195:
ld d,b
 
ld ([fca5)],a
 
ld ([fca6)],a
 
pop hl
Line 199 ⟶ 205:
ld d,b
 
ld ([fca7)],a
 
ld ([fca8)],a
 
or a
Line 240 ⟶ 246:
sub b2 ;a=4e
 
ld ([fb89)],a
 
xor a
Line 252 ⟶ 258:
sub 80 ;a=01
 
ld ([fb88)],a
 
ld d,b
Line 258 ⟶ 264:
ld d,b
 
ld ([8080)],a
 
xor a
Line 268 ⟶ 274:
ld d,b
 
ld ([fba4)],a
 
xor a
Line 278 ⟶ 284:
ld d,b
 
ld ([fba3)],a
 
xor a
Line 288 ⟶ 294:
ld d,b
 
ld ([8181)],a
 
xor a
Line 334 ⟶ 340:
ld d,b
 
ld ([fbd1)],a
 
xor a
Line 344 ⟶ 350:
ld d,b
 
ld ([fbd0)],a
 
xor a
Line 354 ⟶ 360:
ld d,b
 
ld ([8888)],a
 
or a
Line 369 ⟶ 375:
ld a,01
 
ld ([4e01)],a ;change to SRAM bank 1
 
ld a, 0a
 
ld ([0d01)],a ;this enables writing to SRAM
 
ld a, 0b
 
ld ([be3c)],a ;enable Celebi GS Ball event
 
==Get Master Ball items slot 2==
Line 392 ⟶ 398:
sub 80
 
ld ([f895)],a
 
ld d,b
Line 430 ⟶ 436:
ld d,b
 
ld ([fb88)],a
 
xor a
Line 440 ⟶ 446:
ld d,b
 
ld ([f880)],a
 
or a
Line 466 ⟶ 472:
sub 80
 
ld ([f4b6)],a
 
ld d,b
Line 492 ⟶ 498:
sub 80
 
ld ([f4b6)],a
 
ld d,b
Line 528 ⟶ 534:
ld d,b
 
ld ([fb88)],a
 
xor a
Line 540 ⟶ 546:
ld d,b
 
ld ([fc80)],a
 
pop hl
Line 562 ⟶ 568:
sub 80
 
ld ([fcfa)],a
 
ld d,b
Line 590 ⟶ 596:
sub 80
 
ld ([fcb5)],a
 
ld d,b
Line 600 ⟶ 606:
sub a7 (;59)
 
ld ([fcb6)],a
 
or a
Cookies help us deliver our services. By using our services, you agree to our use of cookies.