Files
Crystal/src/game/rom/profile.ts
T
2026-09-24 09:33:33 +02:00

297 lines
8.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/** Addresses only, from PRET 7a7881d0d62e0ddbd82dcf10e7116807487ac651.
* RGBDS 1.0.3 crystal11 build was byte-identical to the user-supplied ROM.
* No original graphics, maps, dialogue, music or ROM instructions live here.
* See docs/NATIVE_PORT.md for source references and verification procedure. */
export const SYMBOLS = {
trainerGroups: 0x39999,
trainerClassNames: 0x2c1ef,
trainerClassAttributes: 0x3959c,
trainerClassDVs: 0x270d6,
statusOnlyEffects: 0x385db,
residualMoves: 0x39446,
mapGroups: 0x94000,
tilesets: 0x4d596,
collisions: 0x4ce1f,
environmentColors: 0xb279,
backgroundPalettes: 0xb319,
objectPalettes: 0xb469,
roofPalettes: 0xb569,
roofTypes: 0x1c021,
roofs: 0x1c03c,
housePalettes: 0x495ee,
sprites: 0x14736,
facings: 0x4049,
standardScripts: 0xbc000,
mapScenes: 0x4d01e,
specials: 0xc029,
emotes: 0x1444d,
landmarks: 0x1ca8c3,
weekdayNames: 0x909f2,
whatDayText: 0x90a3f,
isItDayText: 0x90a4f,
dstConfirmText: 0x90a83,
timeConfirmText: 0x90ab7,
baseData: 0x51424,
pokemonNames: 0x53384,
pokemonPics: 0x120000,
picsBanks: 0x511d4,
pokemonPalettes: 0xa8ce,
growthRates: 0x50efa,
evosAttacks: 0x425b1,
moves: 0x41afb,
moveNames: 0x1c9f29,
itemNames: 0x1c8000,
itemAttributes: 0x67c1,
itemPocketNames: 0x9701c,
giveItemScript: 0x96f77,
putItemInPocketText: 0x9705b,
pocketIsFullText: 0x97060,
findItemInBallScript: 0x122ce,
caughtAskNicknameText: 0x4db44,
nicknameStrings: 0x11780,
wildBattleScript: 0x97cf9,
battleWhiteoutScript: 0x124c1,
spawnPoints: 0x152ab,
johtoGrassWildMons: 0x2a5e9,
grassMonProbTable: 0x2a1cb,
grassCollisions: 0x149ea,
fruitTreeScript: 0x44000,
fruitTreeItems: 0x44097,
engineFlags: 0x80462,
spriteMovementData: 0x4273,
marts: 0x160a9,
martWelcomeText: 0x15f83,
martAskMoreText: 0x15fb9,
martComeAgainText: 0x15fb4,
martHowManyText: 0x15e0e,
martFinalPriceText: 0x15e13,
martNoMoneyText: 0x15fa5,
martPackFullText: 0x15faa,
martThanksText: 0x15fa0,
martCantBuyText: 0x15faf,
martSellHowManyText: 0x15f73,
martSellPriceText: 0x15f78,
martBoughtText: 0x15fbe,
} as const;
/** Assembly routines that scripts `callasm` but that do nothing. */
export const EMPTY_ROUTINES = {
giveItemDummy: 0x96f76,
battleBGMap: 0x1250a,
} as const;
/** Assembly routines that scripts `callasm`, translated natively. */
export const NATIVE_ROUTINES = {
halveMoney: 0x12513,
getWhiteoutSpawn: 0x12527,
tryReceiveItem: 0x122f8,
getCurTreeFruit: 0x44041,
tryResetFruitTrees: 0x4404c,
checkFruitTree: 0x44055,
pickedFruitTree: 0x4405f,
} as const;
/** Native handlers are selected by the routine a special index points to,
* so the ROM's own special table remains the source of truth. */
export const SPECIAL_ROUTINES = {
restartMapMusic: 0x3d47,
setDayOfWeek: 0x90913,
initialSetDst: 0x90a54,
initialClearDst: 0x90a88,
toggleDecorationsVisibility: 0x27043,
toggleMaptileDecorations: 0x26feb,
fadeOutToWhite: 0x8c084,
healParty: 0xc658,
healMachineAnim: 0x12324,
checkPokerus: 0xc419,
stubbedTrainerRankingsHealings: 0x1060a2,
warpToSpawnPoint: 0x97c28,
} as const;
/** Work RAM addresses that the event and text formats name as operands. */
export const RAM = {
battleReward: 0xc686,
stringBuffer1: 0xd073,
stringBuffer2: 0xd086,
stringBuffer3: 0xd099,
stringBuffer4: 0xd0ac,
stringBuffer5: 0xd0bf,
playerName: 0xd47d,
momsName: 0xd488,
rivalName: 0xd493,
battleMonNickname: 0xc621,
enemyMonNickname: 0xc616,
curPartyLevel: 0xd143,
monOrItemNameBuffer: 0xd050,
curFruit: 0xd03f,
dailyFlags1: 0xdc1e,
unusedDailyFlag: 0xdc21,
itemQuantityChange: 0xd10c,
/** hMoneyTemp: HRAM, not WRAM like the other entries above. */
moneyTemp: 0xffc3,
} as const;
/** Event constants named directly by translated special routines. */
export const EVENTS = {
playersRoomPoster: 716,
playersHouseConsole: 1857,
playersHouseDoll1: 1858,
playersHouseDoll2: 1859,
playersHouseBigDoll: 1860,
} as const;
/** Engine flag indices named directly by translated routines. */
export const ENGINE_FLAGS = {
allFruitTrees: 84,
} as const;
/** Battle engine tables and texts, keyed by their PRET labels so that
* \`npm run check:reference\` can verify each address by name. */
export const BATTLE = {
WantsToBattleText: 0x807a9,
BattleText_EnemyWasDefeated: 0x809da,
GotMoneyForWinningText: 0x809be,
BattleText_EnemySentOut: 0x80af8,
BattleText_TheresNoEscapeFromTrainerBattle: 0x80b49,
AccuracyLevelMultipliers: 0x34eb2,
AlreadyAsleepText: 0x811c1,
AlreadyConfusedText: 0x80dcc,
AlreadyParalyzedText: 0x81592,
AlreadyPoisonedText: 0x811fa,
AlwaysFleeMons: 0x3c5b1,
AskForgetMoveText: 0x667f,
AttackMissed2Text: 0x81033,
AttackMissedText: 0x81020,
"BattleCommand_StatDownMessage.BattleStatFellText": 0x36415,
"BattleCommand_StatDownMessage.BattleStatSharplyFellText": 0x36410,
"BattleCommand_StatDownMessage.stat": 0x363fe,
"BattleCommand_StatUpMessage.BattleStatWentUpText": 0x363e4,
"BattleCommand_StatUpMessage.BattleStatWentWayUpText": 0x363df,
"BattleCommand_StatUpMessage.stat": 0x363cd,
BattleMonNicknameText: 0x3f2ef,
BattleText_CantEscape: 0x80ba0,
BattleText_CantEscape2: 0x80b3b,
BattleText_EnemyMonFainted: 0x809a8,
BattleText_GotAwaySafely: 0x80b77,
BattleText_ItemHealedConfusion: 0x80dab,
BattleText_MonFainted: 0x80a75,
BattleText_MonHasNoMovesLeft: 0x80c72,
BattleText_StringBuffer1GrewToLevel: 0x80c9c,
BattleText_TargetRecoveredWithItem: 0x80880,
BattleText_TheMoveIsDisabled: 0x80c5b,
BattleText_TheresNoPPLeftForThisMove: 0x80c39,
BattleText_WildFled: 0x807bd,
BecameConfusedText: 0x80d97,
BoostedExpPointsText: 0x3f12c,
ButItFailedText: 0x814f0,
ConfusedNoMoreText: 0x80d81,
ConsumableEffects: 0x271de,
CriticalHitChances: 0x346ab,
CriticalHitMoves: 0x346a3,
CriticalHitText: 0x81086,
DefrostedOpponentText: 0x8124b,
DidNotLearnMoveText: 0x667a,
DidntAffect1Text: 0x8150c,
DidntAffect2Text: 0x81520,
DisabledMoveText: 0x80f02,
DisabledNoMoreText: 0x80d39,
DoesntAffectText: 0x81071,
EnemyText: 0x1295,
ExpPointsText: 0x3f131,
FastAsleepText: 0x80ce7,
FellAsleepText: 0x811b1,
FlinchedText: 0x80d1a,
FrozenSolidText: 0x80d06,
FullyParalyzedText: 0x8157d,
GoMonText: 0x3f2d1,
HasNoPPLeftText: 0x80fba,
HeldStatusHealingEffects: 0x3de44,
HPIsFullText: 0x81534,
HungOnText: 0x80e99,
HurtByBurnText: 0x807f8,
HurtByPoisonText: 0x807e2,
HurtItselfText: 0x80d5f,
IdentifiedText: 0x816b1,
IsConfusedText: 0x80d4f,
"IsHMMove.HMMoves": 0x34f0,
ItemAttributes: 0x67c1,
ItFailedText: 0x81500,
LearnedMoveText: 0x666b,
MoveAskForgetText: 0x6670,
MoveCantForgetHMText: 0x669a,
MoveEffectPriorities: 0x3c5df,
MoveEffectsPointers: 0x271f4,
MoveGrammar: 0x105e7a,
MoveNameText: 0x105e23,
"MoveNameText.endusedmovetexts": 0x105e39,
MustRechargeText: 0x80d27,
NoPPLeftText: 0x80f99,
NothingHappenedText: 0x814d9,
NotVeryEffectiveText: 0x810c1,
OftenFleeMons: 0x3c5a8,
OneHitKOText: 0x81097,
ParalyzedText: 0x81558,
"PrintTempMonStats.StatNames": 0x50bb5,
ProtectedByMistText: 0x81321,
ProtectedByText: 0x815a9,
ProtectingItselfText: 0x8167a,
RageBuildingText: 0x810f3,
RecoilText: 0x8134d,
RecoveredUsingText: 0x80bc2,
RegainedHealthText: 0x8100c,
SafeguardProtectText: 0x81733,
SometimesFleeMons: 0x3c59a,
StatLevelMultipliers: 0x364e6,
StatNames: 0x364a6,
StopLearningMoveText: 0x6675,
SuckedHealthText: 0x81210,
SuperEffectiveText: 0x810aa,
Text_1_2_and_Poof: 0x6684,
"Text_1_2_and_Poof.MoveForgotText": 0x6695,
Text_MonGainedExpPoint: 0x3f11b,
TypeBoostItems: 0x35703,
TypeMatchups: 0x34bb1,
UnaffectedText: 0x81061,
UsedMove1Text: 0x105e04,
UsedMove2Text: 0x105e0b,
UsedMoveText: 0x105db9,
"UsedMoveText_CheckObedience.UsedInsteadText": 0x105e1a,
WasBurnedText: 0x8123c,
WasPoisonedText: 0x811d5,
WildPokemonAppearedText: 0x80746,
WokeUpText: 0x80cfa,
WontDropAnymoreText: 0x8128f,
WontRiseAnymoreText: 0x81272,
} as const;
export const MAP_GROUP_COUNT = 26;
export const NUM_POKEMON = 251;
export const NUM_TRAINER_CLASSES = 67;
export const NUM_ITEMS = 190;
export const NUM_ENGINE_FLAGS = 162;
export const NUM_FRUIT_TREES = 30;
export const NUM_SPRITEMOVEDATA = 37;
/** The last group has no following pointer to bound it. */
export const LAST_MAP_GROUP_SIZE = 11;
/** Areas whose rules, scripts and presentation are ported. Other decoded
* maps remain unavailable; the label only distinguishes interiors that share
* a ROM landmark name. */
export const NATIVE_MAPS: Record<string, string> = {
"24:3": "Route 29",
"24:13": "Route 29 gate",
"24:4": "New Bark Town",
"24:5": "Elm’s lab",
"24:6": "Your home",
"24:7": "Your room",
"24:8": "Neighbor’s house",
"24:9": "Elm’s house",
"26:3": "Cherrygrove City",
"26:4": "Poké Mart",
"26:5": "Pokémon Center",
"26:6": "Gym speech house",
"26:7": "Guide Gent’s house",
"26:8": "Evolution speech house",
};
export const INITIAL_POSITION = { map: "24:7", x: 3, y: 3 } as const;