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.

Project "Gotta Document 'Em All"

JapDex : Glitch Items - Page 1

JapDex : Glitch Items

Posted by: Couldntthinkofaname
Date: 2017-12-20 23:43:17
"JapDex" is a project started by me and coloradohugge in an attempt to document glitch-like aspects of Japanese green.

I am covering glitch items. Here is what I have so far (each item was tested twice for accuracy, and this was done on v1.1):

Hex: $54
Name: ち2 (B2F)
Effects: Seemingly nothing
Battle effects: Seemingly nothing
Jumps to WRAM? No.
Can be used for ACE? No.
Other notes: None
————————-
Hex: $55
Name: ち1 (B1F)
Effects: Regarding the data from $D080 onward, but most likely the game just hangs/crashes
Battle effects: See above
Jumps to WRAM? Not directly, $F080, which is ECHO for $D080
Can be used for ACE? No.
Other notes: None
————————————————————————
Hex: $56
Name: 1 (1F)
Effects: Same as B1F
Battle effects: See above
Jumps to WRAM? See above
Can be used for ACE? No.
Other notes: None
——————————
Hex: $57
Name: 2 (2F)
Effects: Game hangs for a brief period of time, then resumes normal behavior
Battle behavior: Immediately relinquishes your turn to the opponent, game does not hang
Jumps to WRAM? No.
Can be used for ACE? No.
Other notes: None
—————————–
Hex $58
Name: 3 (3F)
Effects: Same as B1F
Battle behavior: Same as above
Jumps to WRAM? No.
Can be used for ACE? No.
Other notes: None
—————————–
Hex $59
Name: 4 (4F)
Effects: Executes code from $FA67 ($DA67). To my knowledge, this is a mere "nop" slide to OAM
Battle effects: Same
Jumps to WRAM? Not directly, $Fa67, which echos $Da67
Can be used for ACE? I'm uncertain FTTB, but probably not.
Other notes: In the english releases, this was ACE exploitable. See here for details
```````````````````````````````````````````````````
Hex $5A
Name: 5 (5F)
Effects: This is entirely dependent on your party.
Battle effects: Same behavior
Jumps to WRAM? Yes, $D123
Can be used for ACE? Yes, i'll go into detail tommorow
Other notes: Essentially 8f for the Japanese releases
—————————————-
Hex $5B
Name: 6  (6F)
Effects: Game crashes/hangs
Battle behavior: Same behavior, though different jump location
Jumps to WRAM? Yes, $C4E1 (tilemap) or $E002 during battle (flag determining whether or not sound is muted)
Can be used for ACE? No.
Other notes: None
—————————–
Hex $5C
Name: 7 (7F)
Effects: Psuedo-random effects. Game can sometimes crash,restart,hang,do nothing, or something else entirely
Battle Behavior: Game crashes/hangs
Jumps to WRAM? Not directly, and only guaranteed during battle. $F080
Can be used for ACE? No.
Other notes: Effects are consistent during battle
——————————————
hex $5D
Name: 8 (8F)
Effects: Game hangs/Crashes
Battle behavior: Same behavior
Jumps to WRAM? Not directly, $F080
Can be used for ACE? No.
Other notes: None:
————————————-
Hex $5E
Name: 9 (9F)
Effects: Game crashes/hangs
Battle behavior: Same Behavior
Jumps to WRAM? Not directly, $F080
Can be used for ACE? No.
Other notes: None
————————————-
Hex $5f
Name: 10 (10F)
Effects: Game simply hangs on the item menu, or executes code from $CA1E
Battle behavior:  Same behavior
Jumps to WRAM? Yes, $CA1E
Can be used for ACE? No.
Other notes: None
—————————–
Hex $60
Name: 11 (11F)
Effects: Brings up the generic "You can't use that here" message
Battle behavior: Same behavior
Jumps to WRAM? No.
Can be used for ACE? No.
other notes: None
————————
Hex $61
Name: ち4 (B4F)
Effects: Game hangs/Crashes
Battle behavior: Same behavior
Jumps to WRAM? Not directly, $EAAF
Can be used for ACE? No.
Other notes: None
———————————-
Hex $62
Name: みな (w m)
Effects: Dependant on data starting from $D0E1 onward
Battle behavior: Same behavior
Jumps to WRAM? Yes, $D0E1
Can be used for ACE? Sometimes. It's entirely dependent on the data at $D0E1 (wMoveStrings). Should the user be lucky, the data here creates a slide to Pokemon party data. See below for details.
Other notes: Don't try using this for ACE, 5f is an alternative that lands directly on Pokemon data
—————————————————-
Hex: $63
Name: (ws m)
Effects: Game simply hangs on the item menu
Battle behavior: Game crashes/hangs
Jumps to WRAM? Yes, but only during battle, and not directly. $F080
Can be used for ACE? No.
Other notes: None
———————————-
Hex: $64
Name: つ (v t m)
Effects: Game hangs/Crashes
Battle behavior: Same behavior
Jumps to WRAM? Not directly, $F080
Can be used for ACE? No.
—————————————–
Hex $65
Name: はぶ ('d m)
Effects: Game simply hangs on the item menu
Battle behavior: Same behavior
Jumps to WRAM? No.
Can be used for ACE? No.
———————————–
Hex $66
Name: ひ (m)
Effects: Causes the screen to fade out to white, then hangs game
Battle behavior: Very odd. Causes game to force-exit battle, but then forces the player into a completely dark map that doesn't seem to have an exit.
Jumps to WRAM? No.
Can be used for ACE? No.
—————————————
Hex $67
Name: なL. (w 'l m)
Effects: Execute code based on event flags. Even if all of your event flags are $00, game will still hit an rst vector.
Battle behavior: Same behavior
Jumps to WRAM? Yes, $D983
Can be used for ACE? No
—————————————–
Hex $68
Name: (f m)
Effects: Game hangs/Crashes
Battle behavior: Same behavior
Jumps to WRAM? Yes, $CD35
Can be used for ACE? No.
—————————————-
Hex $69
Name: ひのま (m)
Effects: Seemingly nothing
Battle behavior: Relinquishes your turn
Jumps to WRAM? No.
Can be used for ACE? No.
——————————————
Hex $6A
Name: (-g m)
Effects: Game simply hangs on the item menu. You can escape this by mashing a, but you will still be in a softlock-like state
Battle behavior: Behavior is interesting. Upon mashing a to escape the items menu, the battle will continue as normal, however you will not be able to see the screen. There can sometimes be brief periods in which the screen can be seen, but sprites are severely corrupted. After this, you enter a softlock-like state
Jumps to WRAM? No.
Can be used for ACE? No.
———————————————
Hex $6B
Name: ま
Effects: Executes code from tilemap. This will probably crash the game.
Battle behavior: Same behavior
Jumps to WRAM? Not directly, $E3EA
Can be used for ACE? No.
——————————-
Hex $6C
Name: ひ (é)
Effects: Executes code from a backup of the tilemap. This will probably crash the game
Battle behavior: Same behavior
Jumps to WRAM? Yes, $CDD0
Can be used for ACE? No.
—————————————–
Hex $6D
Name: (il)
Effects: Seemingly nothing
Battle behavior: Relinquishes turn
Jumps to WRAM? No.
Can be used for ACE? No.
——————————————
Hex $6E
Name:
Effects: Game hangs/Crashes
Battle behavior: Same behavior
Jumps to WRAM? Not directly, $F080
Can be used for ACE? No.
——————————-
Hex $6F
Name:
Effects: Jumps into data such as flag data. This will probably crash the game.
Battle behavior: Same behavior
Jumps to WRAM? Yes, $CD68
Can be used for ACE? No.
————————————
Hex $70
Name:
Effects: Draws a glitch textbox. Pressing a on this textbox will execute code from $D1F0
Battle Behavior: Same behavior f
Jumps to WRAM? Yes, $D1F0
Can be used for ACE? No.
Other notes: Corrupted screen that appears after returning is rather interesting. I will attach it to this thread.
—————————————————————————————————————-

I have more, just allow me to secure some time. Also, the Japanese names are probably a little off. Apologies if they are.

[size=14pt]Getting Started With 5f[/size]
5 (known as 5f in the English releases) is a glitch item that executes code from $D123, which controls the number of Pokemon in your party. This essentially makes it a carbon copy of 8f from the English releases. Just like 8f, you will need a bootstrapper to use 5f practically. If you wish to direct traffic to the third bag slot, you may do so with:

// Exactly 5 Pokemon
Pidgey // 233 HP
Parasect
Raticate
Tentacool
Nidoran (male)


With this, the state of the registers will probably be:

af = 2300
bc = FFB2
de = 0001
hl = D2A6


"So what can I do with this" - You can now use 8f -like scripts. I can assure you almost no script from English R/B will work here due to a shift in data, but most codes can be ported.

Example "Get x255 Master Balls in first slot"

(Lemonade) x1
き34 (TM34)    x162
き10 (TM10)  x201


——————————————–

"So why do glitch items tend to jump to $F080" - For whatever reason, there is a jump instruction at $0038 to $F080. Since all rst vectors in Japanese Red/Green go to $0038, the code will end up at $F080 whenever an rst vector is hit.

Re: JapDex : Glitch Items

Posted by: Torchickens
Date: 2017-12-21 07:52:29
This is really nice. Thanks Epsilon and coloradohugge!

Which revision of Japanese Green is this for, v1.0 or v1.1? Not all glitch items work the same between revisions.

To test the revision you can check if you can perform the Select glitch from solely within battle (Select on an item, exit with B, open Pokémon menu and choose a Pokémon). If you can it's a v1.0.

Re: JapDex : Glitch Items

Posted by: Couldntthinkofaname
Date: 2017-12-21 08:06:11

This is really nice. Thanks Epsilon and coloradohugge!

Which revision of Japanese Green is this for, v1.0 or v1.1? Not all glitch items work the same between revisions.

To test the revision you can check if you can perform the Select glitch from solely within battle (Select on an item, exit with B, open Pokémon menu and choose a Pokémon). If you can it's a v1.0.


This was done on Revision 1.1. Thanks for pointing that out!

Re: JapDex : Glitch Items

Posted by: Torchickens
Date: 2017-12-21 10:45:50
You're welcome! :)

I don't know many that are different yet, but GoldBadge () hex:6A is an example of a glitch item that differs in use between v1.0 and v1.1 of Red/Green (and Japanese Yellow as well interestingly).

The ROM for v1.1 is usually called Pocket Monsters Midori Rev A online.

Re: JapDex : Glitch Items

Posted by: Couldntthinkofaname
Date: 2017-12-21 14:11:16
I have confirmed with coloradohugge that he is also using v1.1.