Jump to content

Unterminated name glitch item: Difference between revisions

m
 
(5 intermediate revisions by the same user not shown)
Line 25:
== Obtaining the effects with other types of items ==
{{Incomplete}}
'''WARNING:''' The method explained below poses the risk of save corruption in the [[Nintendo 3DS Virtual Console]] releases, since it requires being performed right after saving and resetting. withoutRead thefurther possibilityfor ofmethods lookingfor atavoiding the stats of a non-glitchsave Pokémoncorruption.
 
It's possible to obtain the effects of pressing A on unterminated name glitch items with both normal items and non-unterminated glitch items.
 
For this, it's necessary to have glitch item [[ItemDex/RGBY:255|0xFF (CANCEL)]] at the beginning of the item pack, and the item to be used in the second or third slot, so that the item name is hidden by the CANCEL option and the screen does not scroll down when selecting them. Another requirement is to perform this right after saving and resetting, and not having opened any other menus (Pokémon, Pokédex, PC item/Pokémon boxes etc. - except for the trainer card, see below) before opening the item menu or the PC item box where the setup is performed.
 
By fulfilling these requirements, and pressing A on the item that's hidden by the CANCEL button, the same effects described earlier can be obtained without the use of an unterminated name glitch item.
 
'''NOTE:''' This method may not work for [[ItemDex/RB:000|glitch item 0x00]] or glitch items with high index numbers depending on the game state and the condition of the save file, since the game can end up landing on the actual table of item names for those by chance.
 
=== Avoiding save corruption ===
'''To avoid save corruption in [[Nintendo 3DS Virtual Console]]:''' before performing the glitch, open the trainer card screen to load the player's sprite, which will load [[SRAM]] bank 0 and avoid the save file from being corrupted without disrupting the glitch.
 
Another alternative to avoid save corruption in the [[Nintendo 3DS Virtual Console|3DS VC]] is to view the sprite of one of the Museum fossils in Pewter City, which will also load [[SRAM]] bank 0.
 
=== Explanation ===
When the player selects the item in the item list using the A button, the game fetches the name of the item to be later copied to the internal buffer at [[memory address]] CF4B. For this, the game uses a routine called GetName, which is used not only for item names but also for names of Pokémon, moves and trainers. This routine uses a variable called wNameListType to distinguish which kind of name should be fetched (where valid values range from 1 to 7 - some values are unused).
 
It turns out that in this case, however, that the game does not set the value of this variable before calling this function, because it would have already been set to the correct value when reading item names to draw to the screen when showing the item list. By having the CANCEL button at the beginning of the item list, however, no actual item names are drawn to the screen and this variable is left uninitialized, containing whatever value it had before the item list was brought up. After a reset, it holds the value 0, which is invalid and leads to the game trying to read item names from an invalid location, reading garbage data which results in the names copied afterwards being unterminated.
 
If the method is performed without first saving and resetting, but right after a battle, names of moves will be used. If the item below the CANCEL button is [[ItemDex/RB:000|item 0x00]], the move ID used will be for [[Move 0x00 corruption (Generation I)|move 0x00]], which will also cause the unterminated name effects.{{clr}}
20

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.