Main Menu





Search Wiki


 User page | Discussion | View source | History

From Glitch City Laboratories

Jump to: navigation, search

One more place to back up source material I care about and that I feel is related in some way to the site (relevance may be disputable), in text form. If something looks like it should be recopied for importance, it'll be below the link it came from. Feel free to edit articles based on these.

Generation III RNG

Battle Frontier

All information courtesy of Exarion. General FAQ:

Specific frames:

Other notes:

timings on console tower: 35s palace: 34s arena: 37s factory: 23s

Battle Factory

You manipulate the starting rentals and the first trainer's lineup. The RNG starts at 0 as usual, so you save and reset before each round, then time the final input before entering the round. You manipulate 10 Pokemon this way: Slots 1-6 are your rentals, slot 7 is skipped, and slots 8-10 are the first trainer's Pokemon. If you're one frame late, each Pokemon from the target frame will move down one slot -- slot 10 becomes 9, slot 2 becomes 1, etc., slot 1 disappears, and a new Pokemon appears in slot 10. If you're one frame early, each Pokemon moves up one slot. One exception to this rule: There is an item clause that prevents two Pokemon with the same item from appearing in slots 1-6. If this happens, the second Pokemon with the same item is skipped and the next eligible Pokemon takes its place.

So rather than aiming for a single good frame, you can aim for a cluster. The target frame becomes the one in which the best Pokemon are in the middle slots, as this keeps these Pokemon in the lineup for as many consecutive frames as possible. Unlike stat manips outside of the Frontier, you cannot retry a manip if you fail it, as this disqualifies your challenge. So big clusters are extremely important, as the Factory becomes about four times harder if you fail a manipulation.

Here's an example of this behavior from my round 1 cluster:

FRAME RENTAL POKEMON SKIPPED FIRST TRAINER 1877 Luvdisc, Nuzleaf, Plusle, Eevee, Combusken, Graveler Sableye Growlithe, Ivysaur, Spinda 1878 Nuzleaf, Plusle, Eevee, Combusken, Graveler, Sableye Growlithe Ivysaur, Spinda, Yanma 1879 Plusle, Eevee, Combusken, Graveler, Sableye, Growlithe Ivysaur Spinda, Yanma, Beedrill 1880 Eevee, Combusken, Graveler, Sableye, Growlithe, Ivysaur Spinda Yanma, Beedrill, Corsola

The chart below shows the clusters I use for each round.

ROUND POKEMON FRAME WINDOW SWAP FOR 1 Graveler, Combusken, Plusle/Ivysaur 6 (3 for Plusle, 3 for Ivysaur) None 2 Hitmonlee, Swellow, Sharpedo/Plusle 9 (4 for Sharpedo, 5 Plusle) Swellow (all 9 frames) 3 Zangoose, Grumpig, Seviper 6 Zangoose (1 of 6 frames) 4 Kingdra/Flygon, Heracross, Jolteon/Metagross 5 (3 Kingdra/Jolteon, 1 Flygon, 1 Meta) None 5 Heracross, Aerodactyl, Kingdra 7 Aerodactyl (1 of 7 frames) 6 Starmie/Electrode*, Heracross, Swampert 6 (3 Starmie, 3 Electrode) Swampert (1 of 6 frames)

General strategy: Don't switch in rounds 1-2 unless you have a terrible matchup, as the AI is almost entirely random. Switch a little more often in rounds 3-4, as the AI can be predicted to use certain moves such as Rain Dance and Thunder Wave. Switch the most often in rounds 5-6, as the AI is often predictable with 75-100% certainty.

I battle in the L50 division mainly because rounds 5-6 have much smaller pools of Pokemon, allowing me to easily figure out which variant of a Pokemon I'm facing. For example, if I see an Ursaring in round 6 at L50, I know it's the Special variant; if it were L100; it could be any of eight variants.

Battle Pyramid

You can manipulate the layout of the first floor, including the exit location. The RNG starts at 0 as usual, so you save and reset before each round, and then time the final input before starting to save. I've mapped out a cluster of 6 frames with exits close to the entrance, and I have notes on what the starting layout looks like to make sure I execute the correct movement. I've attempted to manip later floors, but my results have been inconsistent for unknown reasons.

Battle Pike

You can manipulate the event in the first room.

Battle Palace

You manipulate every turn of the Spenser battles. The RNG does not advance idly during Frontier battles, so if you know the frame on which you started the battle, you know exactly what will happen on every turn if you perform certain actions (which is limited to attacking or switching at the Palace). Manipulation consists of saving and resetting before the battle, starting the battle within a 10-15 frame cluster, observing the first turn to see which frame you hit, and then executing the fastest winning strategy for that frame. I also time several inputs before entering the battle room, as the manip occasionally fails for unknown reasons if I just mash. The 10-15 frame cluster consists of only 2 battle frames -- one for the odd frames and one for the even frames -- so each manipulation has only two possible outcomes.

Notably, if you save and reset before a fight and then reset again at any point after re-entering the challenge, you're disqualified. So you have one shot at the manip.

It's also possible to manip every single battle, which is worth it in later rounds, but the mechanics are not fully understood and the manips would take hundreds of hours to make.

Method 1 Rayquaza

New cluster (14210/41088/44035): 941 Relaxed 2/31/7/19/5/19 942 Relaxed 19/19/5/30/30/3 943 Brave 3/30/30/25/12/13 944 Adamant 13/25/12/29/28/28 945 Quiet 28/29/28/23/13/20 88% Walrein, 88% Altaria, 94% Flygon 946 Brave 20/23/13/11/9/17

GOOD Skip Master Ball detour -44.5 Good Rayquaza stats -18.0

BAD Save & quit 21.0 Ball wait time 7.5 (can be lower or higher depending on execution) Failure 26.0 (assumes 70% success rate)

TOTAL -8.0

Rayquaza frame Minimum wait time 900 13.0 1020 12.0 1140 11.0 1260 10.0 1380 9.0 1500 8.0 1560 7.5 1620 7.0 1680 6.5 1740 6.0 1800 5.5 1860 5.0 1920 4.5 1980 4.0 2040 3.5 2100 3.0 2160 2.5 2220 2.0 2280 1.5 2340 1.0 (risky) 2400 0.5 (risky)

Cluster options: 943-946 957-960 967-970 (meh) 1083-1086 (meh) 1256-1260 (meh) 1278-1282 (meh) 1381-1384 (meh) 1398-1402 (meh) 1802-1807 2062-2064 2215-2219

Old cluster (31937/49412/52430): 2061 Serious 1/14/9/30/29/18 2062 Quiet 18/30/29/30/7/14 2063 Brave 14/30/7/25/27/3 2064 Brave 3/25/27/18/16/13 2065 Rash 13/18/16/7/6/9

Box Method 4

"Retail Ruby live battery RNG abuse, on Pokémon Box Ruby and Sapphire. That allowed for a Method 4 spread, with the one I chose being impossible with Method 1.​" - Hozu

Live Battery in R/S

static void SeedRngWithRtc(void) {

   u32 seed = RtcGetMinuteCount();
   seed = (seed >> 16) ^ (seed & 0xFFFF);


u32 RtcGetMinuteCount() {

   return (24 * 60) * RtcGetDayCount(&sRtc) + 60 * sRtc.hour + sRtc.minute;



RETIRE's Arceus route writeup

The new route is only 5551 steps, which is a 10 000 step improvement over the old route. It is also 1200 steps from startup, and allows for infinite captures with 'Jubilife City' as capture location. Therefore it's also the best shinyhunt route out there. It's also the first completely consistent route that works for across all releases.

Here is a youtube video showing everything, if you'd like to follow along:

Here are all the locations for [base] in all releases of D/P DS games have randomised RAM layouts. The RAM layout can have 64 patterns, and is assigned on booting of the game. Therefore all calculations for RAM offsets use [base], the value that shows the randomisation.

base = 0x02106FC0 US/EU base = 0x02107100 DE base = 0x02107140 FR base = 0x021070A0 IT base = 0x02108818 JP base = 0x021045C0 KR base = 0x02107160 ES

Expected knowledge is understanding the concepts in this Void Guide:

Route explanation:

All map IDs above 0x22E (558 in decimal), are forced to 3 due to an error handler.

When entering Poketch Co Map Id read from [base] + 22ADA = Matrix_center = 0008 = Poketch Co.

1 S 17 W 22 S

use Bicycle (key item)

32 N 415 W Map Id = over 558 => 0003 = Jubilife City

Save reset Map width 1x1 => 30x30

380 E Explorer kit, back out of message

This writes current Map Id followed by X and Y coordinates at [Base] + 1488 X = FFFF FFE1 but is written as 16 bit => FFE1 Y= 0000 0000 but is written as 16 bit => 0000

480 N 260 E Map Id = 0007 = Jubilife City top floor pokémoncenter

Save reset Map width 30x30 => 1x1

214 W 479 S X = 0000 000C Y = FFFF FFFF

graphic reload Y coordinate is underflowed, collision is now read from a different part of ram, and due to update orders we can move 2 tiles down if we run or move at full speed with bike, into a wall Y = 0000 0001

graphic reload Y coordinate is positive, collision is fixed and we walk down into the room. Y= 0000 0003 3 W

talk to NPC from this spot Reset after the saving is done By talking to the Union Room npc, a Map Id and coordinate check is performed. If it matches, it overwrites data at [base] + 1488 with those values.

It will then warp you to them if you would reset the console. But since the check fails (we are at a wrong Y value) we will warp to our earlier written Explorer kit values at [Base] + 1488 X = FFE1 Y = 0000

Since Explorer Kit is used in an Outdoor map Matrix id 1x1 => 30x30

X ram change (65505/32*2) = 4094 = 0FFE Y ram change (0/32*2*30) = 0 = 0000

We add 0FFE to [base] + 22ADA. This puts us at [base] + 23AD8. This us really close to warp coordinates, sprite coordinates, sprite Id's, events, flagdata,... which we will now abuse heavily.

Register Town Map Town map will be used to refresh graphics, which will unload models in Fake Sinnoh that block our path

100 E 320 S

We have reached warp coordinates, sprite coordinate, Id's, events, flags... which all get loaded when entering a Map. Since their written values are read as Map Id, you can chain entering Maps and writing new ones.

32 E Map Id = 0002 = Underground Writes 0188 and 002D

191 S 32 E 1 S Map Id = 0188 = route 221 Writes 0132 , 0189 and 0028

32 E 1 N 192 E

Town Map

65 S 96 E Map Id = 0028 = Canalave City Library - 03 Writes 01D4

1 N 128 W

Town Map

8 W 14 N

Map ID = 01D4 = route 223 X = FFFF 0138 Y = 0000 0232

Explorer Kit Back out of message

Writes to [base] + 1488 X = 0138 Y = 0232

In the overworld, this equals to above the door of Eterna city's gym

56 W Town Map 1 W 47 S Map Id = 0132 = Galactic HQ Clears a path through ram Writes 0010

1 N 32 E

Town Map

1 E 1 S (cutscene if first time entering) Map Id = 0189 = inside Pal Park Writes 00FB

32 N

Town Map

32 N 64 E (63 if cutscene played)

Town Map

96 N 1 N Cutscene

Map Id = 00FB = outdoors Pal Park Grants the Pal Park menu with RETIRE function

1 S 96 W Map Id = 0010 = Jubilife City Jubilife TV-06 Writes 0006

97 N

Map Id = 0006 = Jubilife City Pokemon Center Writes 0004 + Map Id = 0004 = Jubilife City Mart Writes 0002

1 W Go through map 0002 = Underground Writes 00B9

1 E Go through 00B9 = Cynthia's room Mapscript runs to start battle Lose battle (except for dig, this is the fastest way to leave the void with the Pal Park menu without overwriting [base] + 1488)

We are now in a Pokémoncenter with the Pal Park menu

Take some strong Pokémon from a box

Walk up left elevator Mapscript pushes you into void

4 W 15 N 6 E

graphic reload full speed south graphic reload

2 S 2 E talk to NPC from this spot Reset after the saving is done

This is all the same as earlier, we warp to the values written earlier at [base] + 1488, above Eterna City Gym's door

Graphic reload 1 S enter warp

Map Id read from [base] + 22ADA = Matrixcenter = 0043 = Eterna City Gym

Has matrix ID 00DC

1 S 243 E 332 N Map ID read from [base] + 22AD6 = Matrix ID = 00DC = Spear Pillar RETIRE

X = 0000 00FB Y = FFFF FEC1

When we pressed RETIRE we activated a cutscene that stores our Map id = 00DC X = 0000 00FB but is written as 16 bit => 00FB Y = FFFF FFC1 but is written as 16 bit => FFC1

And warps us back to the void of spear pillar and 16 bit equivalent of the coordinates. This does the following

X ram change: (251/32*2) = 14 = 000E Y ram change: (65217/32*2*2) = 8152 = 1FD8

We add 1FE6 to [base] + 22ADA. This puts us at [base] + 24AC0. This is really close to coordinate, warp, animation, sprite... data. (the thing is a mess) We will be abusing coordinates, and warpdata.

Writes 00FB = Outdoor Pal Park as the X value of a warp

479 N 259 E Adds 0103 to 00FB => X = 01FE 64 N Enter X coordinate data = 01FE = Hall of Origin

HoO Arceus runaway:

RETIRE (runaway) 1 N 3 S repeat until you capture an Arceus

65 N Enter X value of warp = 00FB = Outdoor Pal Park RETIRE

Jubilife Arceus infinite capture: 1 N

RETIRE (capture/runaway) 2 S repeat until you have captures all Arceus you’d like

64 N Enter X value of warp = 00FB = Outdoor Pal Park RETIRE



This route requires [base] = 0x0226e294.

If you can't manipulate your [base], this route has an effective 1/32 chance of working, determined at the moment you bootup up your game/soft reset.

1 S 17 W 18 S bike (key item) 1 N graphic reload 415 Wx Sr 33 E 383 N 14 E graphic reload 128 N 1 E graphic reload 479 S 273 E 256 S 21 E 1 S + Spam menu! 1 N 1 E 1 S + Spam menu! 1 N

choose route:

Darkrai: 213 E 14 S graphic reload 1 N into tree => warp into darkrai’s area


938 E 52 N 47 E

Save reset or press A => battle against shaymin If press A:

6 S 1 E south until Seabreak Path, fly/teleport (other movement may softlock)


Gen II character equivalents for ACE box names

From luckytyphlosion:

french: - ret nc ('d) (d0) - pop de ('l) (d1) - jp nc, ? ('m) (d2) - (invalid) ('r) (d3) - call nc, ? ('s) (d4) - push de ('t) (d5) - sub x ('v) (d6) + ret c (m') (d8) + reti (n') (d9) + jp c, ? (p') (da) + (invalid) (s') (db) + call c, ? ('s) (dc) + (invalid) (t') (dd) + sbc x (u') (de)

- d0, d1, d2, d3, d4, d5, d6 + d8, d9, da, db, dc, dd, de


+ cp d (à) (ba) + cp e (è) (bb) + cp l (ù) (bd) + cp [hl] (À) (be) + cp a (Á) (bf) + add x (È) (c6) + rst $00 (É) (c7) + ret z (Ì) (c8) + ret (Í) (c9) + jp z, ? (Ñ) (ca) + (bit opcodes) (Ò) (cb) + call z, ? (Ó) (cc) + call ? (Ù) (cd) + adc x (Ú) (ce) + rst $08 (á) (cf)

  • ret nc (ì) (d0)
  • pop de (í) (d1)
  • jp nc, ? (ñ) (d2)
  • (invalid) (ò) (d3)
  • call nc, ? (ó) (d4)
  • push de (ú) (d5)
  • sub x (°) (d6)

+ ld [$ff00+x], a (’) (e0) + (invalid) (¿) (e4) + push hl (¡) (e5)

+ ba, bb, bd, be, bf, c6, c7, c8, c9, ca, cb, cc, cd, ce, cf, e0, e4, e5


+ cp [hl] (ß) (be) + ret nz (Ä) (c0) + pop bc (Ö) (c1) + jp nz, ? (Ü) (c2) + jp (ä) (c3) + call nz, ? (ö) (c4) + push bc (ü) (c5) - ret nc ('d) (d0) - pop de ('l) (d1) - jp nc, ? ('m) (d2) - (invalid) ('r) (d3) - call nc, ? ('s) (d4) - push de ('t) (d5) - sub x ('v) (d6)

- d0, d1, d2, d3, d4, d5, d6 + be, c0, c1, c2, c3, c4, c5