Poké Mart data structure (Generation I)

This is the Poké Mart data structure in Generation I games.
==Overview==
In each game, there is a data block containing the list of items sold in each Poké Mart.
When the player talks to a Poké Mart clerk, the data pertaining to the current Poké Mart (the total number of items, as well as the list of items) is copied to the RAM to be used (even before the player enters the "Buy" option and sees the list of items). These values remain in the RAM even after the player leaves the Poké Mart.
The fourth Poké Mart found in the game code is simply set up to sell a Bicycle, but this data remains unused. The Miracle Cycle in Cerulean City delivers the Bicycle using a separate script, which does not use this Poké Mart data.
===FE value===
The hexadecimal FE value is found at the start of each Poké Mart in the game data. This value is not copied to the RAM data used for the current Poké Mart.
===Total number of items===
At the start of the data for each Poké Mart (after the FE value, except in the data copied to the RAM), there is a value for the number of items available. The game starts counting from 00, but the "Cancel" button at the end counts as an additional item.
For instance, the Vermilion City Poké Mart has the value "06" for the number of items. This Poké Mart stores seven items in the game's memory (counting from 00 to 06): the six regular items (, Super Potion, Ice Heal, Awakening, Parlyz Heal, and Repel), as well as the "Cancel" button as the seventh item.
===List of items===
After the number of items, all the following values are the index numbers of items sold in this Poké Mart. (for instance, Potion's index number is hexadecimal 14)
In all Poké Marts, the "Cancel" button is stored as the item FF at the end, which represents the unobtainable .
If the last item is changed to any item index number other than FF, the respective item name will appear at the end instead of the "Cancel" button, and some glitched data may appear below the last item. However, even if the last item is not "Cancel", the player will still be unable to buy it.
==List of Poké Marts==
This is the list of all Poké Marts found in the Generation I game data. The item index numbers are formatted in bold.
Order	Place 	Data 	Items
1 	Viridian City Poké Mart 	FE 04 0B 0F 0C 
FE 05 14 0B 0F 0C	, Potion, Antidote, Parlyz Heal, and Burn Heal
2 	Pewter City Poké Mart 	FE 07 14 1D 0B 0C 0E 0F 	, Potion, Escape Rope, Antidote, Burn Heal, Awakening, and Parlyz Heal
3 	Cerulean City Poké Mart 	FE 07 14 1E 0B 0C 0E 0F 
FE 08 14 1D 1E 0B 0C 0E 0F	, Potion, Escape Rope, Repel, Antidote, Burn Heal, Awakening, and Parlyz Heal
4 	(unused; possibly intended for Miracle Cycle)	FE 01 06 	Bicycle
5 	Vermilion City Poké Mart 	FE 06 13 0D 0E 0F 1E 	, Super Potion, Ice Heal, Awakening, Parlyz Heal, and Repel
6 	Lavender Town Poké Mart 	FE 09 03 13 35 1D 38 0B 0C 0D 0F	Great Ball, Super Potion, Revive, Escape Rope, Super Repel, Antidote, Burn Heal, Ice Heal, and Parlyz Heal
7 	Celadon Department Store 2F 	FE 09 03 13 35 38 0B 0C 0D 0E 0F	Great Ball, Super Potion, Revive, Super Repel, Antidote, Burn Heal, Ice Heal, Awakening, and Parlyz Heal
8 	Celadon Department Store 2F 	FE 09 E8 E9 CA CF ED C9 CD D1 D9	, , , , , , , , and
9 	Celadon Department Store 4F 	FE 05 33 20 21 22 2F 	Poké Doll, Fire Stone, Thunder Stone, Water Stone, and Leaf Stone
10 	Celadon Department Store 5F 	FE 07 2E 37 3A 41 42 43 44 	X Accuracy, Guard Spec., Dire Hit, X Attack, X Defend, X Speed, and X Special
11 	Celadon Department Store 5F 	FE 04 24 25 26 27 
FE 05 23 24 25 26 27	HP Up, Protein, Iron, Carbos, and Calcium
12 	Fuchsia City Poké Mart 	FE 06 02 03 13 35 34 38 
FE 06 02 03 12 35 34 38	Ultra Ball, Great Ball, Super Potion, Hyper Potion, Revive, Full Heal, and Super Repel
13 	(unused) 	FE 05 03 12 13 34 35 	Great Ball, Hyper Potion, Super Potion, Full Heal, and Revive
14 	Cinnabar Island Poké Mart 	FE 07 02 03 12 39 1D 34 35 	Ultra Ball, Great Ball, Hyper Potion, Max Repel, Escape Rope, Full Heal, and Revive
15 	Saffron City Poké Mart 	FE 06 03 12 39 1D 34 35 	Great Ball, Hyper Potion, Max Repel, Escape Rope, Full Heal, and Revive
16 	Indigo Plateau Poké Mart 	FE 07 02 03 10 11 34 35 39 	Ultra Ball, Great Ball, Full Restore, Max Potion, Full Heal, Revive, and Max Repel
==Poké Mart data locations==
This is where the Poké Mart data block is stored in each Generation I game.
===All Poké Marts===
This is where the list of all Poké Marts is stored in each game.
Game 	Language 	Data start(start of Viridian City Poké Mart)	Data end(end of Indigo Plateau Poké Mart)	Data size(bytes)
 	Japanese 1.0 	0x0ED6 	0x0F68 	147
 	Japanese 1.1 	0x0EC4 	0x0F56 	147
Pokémon Blue	Japanese 	0x2422 	0x24B5 	148
 	English, German, Italian	0x2442 	0x24D5 	148
 	French 	0x243E 	0x24D1 	148
 	Spanish 	0x2441 	0x24D4 	148
 	Japanese 1.0 	0x2368 	0x23FD 	150
 	Japanese 1.1, 1.2 	0x236D 	0x2402 	150
 	English, Italian 	0x233B 	0x23D0 	150
 	French 	0x2337 	0x23CC 	150
 	German 	0x2340 	0x23D5 	150
 	Spanish 	0x233A 	0x23CF 	150
===Current Poké Mart===
This is the RAM location that stores data for the Poké Mart currently used by the player.
Game 	Language 	Number of items 	Item index numbers
All Generation I games 	Japanese 	0xCF62 	0xCF63 onwards
 	English 	0xCF7B 	0xCF7C onwards
 	French, German,Italian, and Spanish	0xCF80 	0xCF81 onwards
 	English 	0xCF7A 	0xCF7B onwards
 	French, German,Italian, and Spanish	0xCF7F 	0xCF80 onwards
Example: Vermilion City Poké Mart	Example: Vermilion City Poké Mart 	Example: Vermilion City Poké Mart	Example: Vermilion City Poké Mart
— 	— 	06 	13 0D 0E 0F 1E
==Related articles==