Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Generation II Glitch Discussion

Editing CEE0 for many cool effects (English gold) - Page 1

Editing CEE0 for many cool effects (English gold)

Posted by: 0ErrorYT
Date: 2017-12-11 20:07:33
CEE0 determines the cursor position in most menus. Changing it to values higher that the amount of options in the current menu allows you to select invalid options. Here is the effects I have found:
Access Pokemon beyond the sixth slot:
Using CEE0, you can access Pokemon beyond the sixth slot. You can switch them with real Pokemon (you will lose the Pokemon you switched). So far I have found a Raikou/crobat hybrid, a Rhydon with a very long name, and many ?????. If you choose a blank party space, it appears to be the last Pokemon deposited (?) however the species is changed to ????? (00)
Unlock Mystery gift: Using CEE0 in the start menu doesn't cause many noteworthy effects, except option 00, which is Mystery gift. After opening Mystery gift, the option will be there after you reset.
Glitch names and Sprite glitches when selecting 10+ characters names
Using CEE0 in the introduction when selecting your name allows you to select 10+ character names or blank names. (Example: DriMOMREDGREENMOM) If you select a 10+ character name, sprites will glitch up depending on the amount of characters.

Re: Editing CEE0 for many cool effects (English gold)

Posted by: Parzival
Date: 2017-12-12 08:28:45
"Pokemon" beyond the sixth slot are merely other, unrelated data being expressed as Pokemon.

Re: Editing CEE0 for many cool effects (English gold)

Posted by: 0ErrorYT
Date: 2017-12-12 09:24:47

"Pokemon" beyond the sixth slot are merely other, unrelated data being expressed as Pokemon.

I know that, that's why I said you can switch them with real Pokemon

Re: Editing CEE0 for many cool effects (English gold)

Posted by: ISSOtm
Date: 2017-12-12 18:55:49
The effect of swapping Pokémon past slot 6 is already possible using Bad Clones, so I'm more interested in the other effects.

Maybe they could be doable "legit" (I'm not really interested in memory edit-only glitches, but that's probably me being too much of a purist) using DMA hijacking, and half-resetting the game by jumping in the middle of its init (past the point where it copies the DMA routine, maybe setting a few values beforehand to avoid crashes).

If a modified init is required, the Mail buffer could lend a helpful hand here, by providing a large enough buffer to store the modified init in.

Here's a "guide" that would allow doing that :


1. Run this code (it's inexact because I don't know the labels and lengths)

ld hl, Init ; 0150, IIRC ?
ld de, wMailBuffer
ld bc, MailBufLen
jp CopyMemory ; Copy the "base" init to the buffer

This sets up the code buffer for later.

2. Edit all addresses that have to be patched. You can use the "box names as a memory editor" setup.

3. Write the DMA hijacking routine, which I'll call "SetCEE0ToValue".

4. Run this code.

; Set up DMA hijacking
ld hl, PiggybackSnippet ; Must point to "call SetCEE0ToValue" followed by "ld [c], a"
ld bc, 4 << 8 | LOW(DMARoutine)

.copyDMA
ld a, [hli]
ld [c], a
inc c
dec b
jr nz, .copyDMA

jp wMailBuffer ; Run our modified game init (which should have been tailed with a jp to ROM)


It's required to set DMA hijacking at the same time as "rebooting", since otherwise you can't do ACE due to the cursor being locked.

Re: Editing CEE0 for many cool effects (English gold)

Posted by: Torchickens
Date: 2017-12-20 11:25:13
This is really nice.

Thanks! :)

I feel the name trick in particular is quite interesting.

Re: Editing CEE0 for many cool effects (English gold)

Posted by: 0ErrorYT
Date: 2018-02-20 21:43:38
Woah, I just changed CEE0 to 08 in a link trade with Pokemon Red and saw some weird stuff. When I started the trade, Pokemon Silver went into a Glitch Dimension, but didn't reset. Pokemon red said I was trading a Pidgey for a 'M (00) and Pokemon silver said I was trading a ????? for my own Pidgeot! Unfortunately, both games crashed afterwards.