pokecrystal/sram.asm

433 lines
9.2 KiB
NASM
Raw Normal View History

SECTION "Scratch", SRAM
sScratch:: ds $60 tiles
2015-10-04 18:14:51 +00:00
SECTION "SRAM Bank 0", SRAM
2015-10-04 18:14:51 +00:00
2015-11-17 22:56:49 +00:00
sPartyMail::
2021-03-10 01:43:24 +00:00
table_width MAIL_STRUCT_LENGTH, sPartyMail
sPartyMon1Mail:: mailmsg sPartyMon1Mail
sPartyMon2Mail:: mailmsg sPartyMon2Mail
sPartyMon3Mail:: mailmsg sPartyMon3Mail
sPartyMon4Mail:: mailmsg sPartyMon4Mail
sPartyMon5Mail:: mailmsg sPartyMon5Mail
sPartyMon6Mail:: mailmsg sPartyMon6Mail
2021-03-10 01:43:24 +00:00
assert_table_length PARTY_LENGTH
2015-11-18 04:29:14 +00:00
2015-11-17 22:56:49 +00:00
sPartyMailBackup::
2021-03-10 01:43:24 +00:00
table_width MAIL_STRUCT_LENGTH, sPartyMailBackup
2015-11-17 22:56:49 +00:00
sPartyMon1MailBackup:: mailmsg sPartyMon1MailBackup
sPartyMon2MailBackup:: mailmsg sPartyMon2MailBackup
sPartyMon3MailBackup:: mailmsg sPartyMon3MailBackup
sPartyMon4MailBackup:: mailmsg sPartyMon4MailBackup
sPartyMon5MailBackup:: mailmsg sPartyMon5MailBackup
sPartyMon6MailBackup:: mailmsg sPartyMon6MailBackup
2021-03-10 01:43:24 +00:00
assert_table_length PARTY_LENGTH
2015-11-17 22:56:49 +00:00
sMailboxCount:: db
sMailboxes::
2021-03-10 01:43:24 +00:00
table_width MAIL_STRUCT_LENGTH, sMailboxes
sMailbox1:: mailmsg sMailbox1
sMailbox2:: mailmsg sMailbox2
sMailbox3:: mailmsg sMailbox3
sMailbox4:: mailmsg sMailbox4
sMailbox5:: mailmsg sMailbox5
sMailbox6:: mailmsg sMailbox6
sMailbox7:: mailmsg sMailbox7
sMailbox8:: mailmsg sMailbox8
sMailbox9:: mailmsg sMailbox9
sMailbox10:: mailmsg sMailbox10
2021-03-10 01:43:24 +00:00
assert_table_length MAILBOX_CAPACITY
2015-11-18 04:29:14 +00:00
sMailboxCountBackup:: db
sMailboxesBackup::
2021-03-10 01:43:24 +00:00
table_width MAIL_STRUCT_LENGTH, sMailboxesBackup
sMailbox1Backup:: mailmsg sMailbox1Backup
sMailbox2Backup:: mailmsg sMailbox2Backup
sMailbox3Backup:: mailmsg sMailbox3Backup
sMailbox4Backup:: mailmsg sMailbox4Backup
sMailbox5Backup:: mailmsg sMailbox5Backup
sMailbox6Backup:: mailmsg sMailbox6Backup
sMailbox7Backup:: mailmsg sMailbox7Backup
sMailbox8Backup:: mailmsg sMailbox8Backup
sMailbox9Backup:: mailmsg sMailbox9Backup
sMailbox10Backup:: mailmsg sMailbox10Backup
2021-03-10 01:43:24 +00:00
assert_table_length MAILBOX_CAPACITY
2015-11-18 04:29:14 +00:00
sMysteryGiftData::
sMysteryGiftItem:: db
sMysteryGiftUnlocked:: db
sBackupMysteryGiftItem:: db
sNumDailyMysteryGiftPartnerIDs:: db
sDailyMysteryGiftPartnerIDs:: ds MAX_MYSTERY_GIFT_PARTNERS * 2
2015-11-20 16:47:52 +00:00
sMysteryGiftDecorationsReceived:: flag_array NUM_NON_TROPHY_DECOS
ds 4
sMysteryGiftTimer:: dw
2015-10-04 18:14:51 +00:00
ds 1
sMysteryGiftTrainerHouseFlag:: db
2015-11-23 05:21:21 +00:00
sMysteryGiftPartnerName:: ds NAME_LENGTH
sMysteryGiftUnusedFlag:: db
sMysteryGiftTrainer:: ds wMysteryGiftTrainerEnd - wMysteryGiftTrainer
2015-11-18 04:29:14 +00:00
sBackupMysteryGiftItemEnd::
2015-10-04 18:14:51 +00:00
ds $30
2020-11-09 21:38:21 +00:00
sRTCStatusFlags:: db
ds 7
sLuckyNumberDay:: db
sLuckyIDNumber:: dw
2015-10-04 18:14:51 +00:00
SECTION "Backup Save", SRAM
2018-01-23 22:39:09 +00:00
sBackupOptions:: ds wOptionsEnd - wOptions
2015-10-04 18:14:51 +00:00
sBackupCheckValue1:: db ; loaded with SAVE_CHECK_VALUE_1, used to check save corruption
2015-10-04 18:14:51 +00:00
2020-06-21 03:03:40 +00:00
sBackupGameData::
2015-10-04 18:14:51 +00:00
sBackupPlayerData:: ds wPlayerDataEnd - wPlayerData
2018-09-09 19:09:51 +00:00
sBackupCurMapData:: ds wCurMapDataEnd - wCurMapData
2015-10-04 18:14:51 +00:00
sBackupPokemonData:: ds wPokemonDataEnd - wPokemonData
sBackupGameDataEnd::
ds $18a
sBackupChecksum:: dw
sBackupCheckValue2:: db ; loaded with SAVE_CHECK_VALUE_2, used to check save corruption
sStackTop:: dw
2015-10-04 18:14:51 +00:00
if DEF(_DEBUG)
sRTCHaltCheckValue:: dw
sSkipBattle:: db
sDebugTimeCyclesSinceLastCall:: db
sOpenedInvalidSRAM:: db
sIsBugMon:: db
endc
2015-10-04 18:14:51 +00:00
SECTION "Save", SRAM
2015-10-04 18:14:51 +00:00
2018-01-23 22:39:09 +00:00
sOptions:: ds wOptionsEnd - wOptions
2015-10-04 18:14:51 +00:00
sCheckValue1:: db ; loaded with SAVE_CHECK_VALUE_1, used to check save corruption
2015-10-04 18:14:51 +00:00
2020-06-21 03:03:40 +00:00
sGameData::
2015-10-04 18:14:51 +00:00
sPlayerData:: ds wPlayerDataEnd - wPlayerData
2018-09-09 19:09:51 +00:00
sCurMapData:: ds wCurMapDataEnd - wCurMapData
2015-10-04 18:14:51 +00:00
sPokemonData:: ds wPokemonDataEnd - wPokemonData
sGameDataEnd::
ds $18a
sChecksum:: dw
sCheckValue2:: db ; loaded with SAVE_CHECK_VALUE_2, used to check save corruption
2015-10-04 18:14:51 +00:00
SECTION "Active Box", SRAM
sBox:: box sBox
2015-10-04 18:14:51 +00:00
2020-04-23 20:10:46 +00:00
ds $100
SECTION "Link Battle Data", SRAM
sLinkBattleStats::
2020-06-21 03:03:40 +00:00
sLinkBattleWins:: dw
sLinkBattleLosses:: dw
sLinkBattleDraws:: dw
2017-12-14 05:36:24 +00:00
2016-01-13 05:39:41 +00:00
sLinkBattleRecord::
sLinkBattleRecord1:: link_battle_record sLinkBattleRecord1
sLinkBattleRecord2:: link_battle_record sLinkBattleRecord2
sLinkBattleRecord3:: link_battle_record sLinkBattleRecord3
sLinkBattleRecord4:: link_battle_record sLinkBattleRecord4
sLinkBattleRecord5:: link_battle_record sLinkBattleRecord5
2015-10-04 18:14:51 +00:00
sLinkBattleStatsEnd::
SECTION "SRAM Hall of Fame", SRAM
2020-06-21 03:03:40 +00:00
sHallOfFame::
2021-03-10 01:43:24 +00:00
table_width HOF_LENGTH, sHallOfFame
sHallOfFame01:: hall_of_fame sHallOfFame01
sHallOfFame02:: hall_of_fame sHallOfFame02
sHallOfFame03:: hall_of_fame sHallOfFame03
sHallOfFame04:: hall_of_fame sHallOfFame04
sHallOfFame05:: hall_of_fame sHallOfFame05
sHallOfFame06:: hall_of_fame sHallOfFame06
sHallOfFame07:: hall_of_fame sHallOfFame07
sHallOfFame08:: hall_of_fame sHallOfFame08
sHallOfFame09:: hall_of_fame sHallOfFame09
sHallOfFame10:: hall_of_fame sHallOfFame10
sHallOfFame11:: hall_of_fame sHallOfFame11
sHallOfFame12:: hall_of_fame sHallOfFame12
sHallOfFame13:: hall_of_fame sHallOfFame13
sHallOfFame14:: hall_of_fame sHallOfFame14
sHallOfFame15:: hall_of_fame sHallOfFame15
sHallOfFame16:: hall_of_fame sHallOfFame16
sHallOfFame17:: hall_of_fame sHallOfFame17
sHallOfFame18:: hall_of_fame sHallOfFame18
sHallOfFame19:: hall_of_fame sHallOfFame19
sHallOfFame20:: hall_of_fame sHallOfFame20
sHallOfFame21:: hall_of_fame sHallOfFame21
sHallOfFame22:: hall_of_fame sHallOfFame22
sHallOfFame23:: hall_of_fame sHallOfFame23
sHallOfFame24:: hall_of_fame sHallOfFame24
sHallOfFame25:: hall_of_fame sHallOfFame25
sHallOfFame26:: hall_of_fame sHallOfFame26
sHallOfFame27:: hall_of_fame sHallOfFame27
sHallOfFame28:: hall_of_fame sHallOfFame28
sHallOfFame29:: hall_of_fame sHallOfFame29
sHallOfFame30:: hall_of_fame sHallOfFame30
2021-03-10 01:43:24 +00:00
assert_table_length NUM_HOF_TEAMS
2015-10-04 18:14:51 +00:00
sHallOfFameEnd::
SECTION "SRAM Crystal Data", SRAM
2015-10-04 18:14:51 +00:00
2020-06-21 03:03:40 +00:00
sMobileEventIndex:: db
sCrystalData:: ds wCrystalDataEnd - wCrystalData
2018-01-11 03:34:22 +00:00
2020-06-21 03:03:40 +00:00
sMobileEventIndexBackup:: db
SECTION "SRAM Battle Tower", SRAM
; Battle Tower data must be in SRAM because you can save and leave between battles
sBattleTowerChallengeState::
2015-11-18 04:29:14 +00:00
; 0: normal
; 2: battle tower
db
2015-10-04 18:14:51 +00:00
sNrOfBeatenBattleTowerTrainers:: db
sBTChoiceOfLevelGroup:: db
; Battle Tower trainers are saved here, so nobody appears more than once
2018-01-20 17:25:55 +00:00
sBTTrainers:: ds BATTLETOWER_STREAK_LENGTH ; sbe48
sBattleTowerSaveFileFlags:: db
sBattleTowerReward:: db
; team of previous trainer
2020-06-21 03:03:40 +00:00
sBTMonOfTrainers::
sBTMonPrevTrainer1:: db
sBTMonPrevTrainer2:: db
sBTMonPrevTrainer3:: db
; team of preprevious trainer
sBTMonPrevPrevTrainer1:: db
sBTMonPrevPrevTrainer2:: db
sBTMonPrevPrevTrainer3:: db
2015-10-04 18:14:51 +00:00
2019-11-17 18:47:42 +00:00
SECTION "Boxes 1-7", SRAM
sBox1:: box sBox1
sBox2:: box sBox2
sBox3:: box sBox3
sBox4:: box sBox4
sBox5:: box sBox5
sBox6:: box sBox6
sBox7:: box sBox7
2015-10-04 18:14:51 +00:00
SECTION "Boxes 8-14", SRAM
sBox8:: box sBox8
sBox9:: box sBox9
sBox10:: box sBox10
sBox11:: box sBox11
sBox12:: box sBox12
sBox13:: box sBox13
sBox14:: box sBox14
2019-04-10 18:46:16 +00:00
SECTION "SRAM Mobile 1", SRAM
ds $7
2020-06-21 03:03:40 +00:00
s4_a007:: ; struct size $30
ds $c
2019-04-10 18:46:16 +00:00
2020-06-21 03:03:40 +00:00
s4_a013:: ds 36
2019-04-10 18:46:16 +00:00
2020-06-21 03:03:40 +00:00
s4_a037:: ds 4
2020-06-21 03:03:40 +00:00
s4_a03b:: ds 37 * 40
2020-06-21 03:03:40 +00:00
s4_a603:: ds 8
2020-06-21 03:03:40 +00:00
s4_a60b:: db
s4_a60c:: db
s4_a60d:: db
2020-06-21 03:03:40 +00:00
s4_a60e:: dw
ds $1f0
2020-06-21 03:03:40 +00:00
sMobileBattleTimer:: ds 3
2020-06-21 16:21:47 +00:00
ds $7fd
s4_b000:: db
2019-04-10 18:46:16 +00:00
SECTION "SRAM Mobile 2", SRAM
ds 1 ; former location for sMobileEventIndex, moved to 1:BE3C in English
2018-01-11 03:34:22 +00:00
2020-06-21 03:03:40 +00:00
sTrainerRankings::
sTrainerRankingGameTimeHOF:: ds 4
sTrainerRankingStepCountHOF:: ds 4
sTrainerRankingHealingsHOF:: ds 4
sTrainerRankingBattlesHOF:: ds 3
sTrainerRankingStepCount:: ds 4
sTrainerRankingBattleTowerWins:: ds 4
sTrainerRankingTMsHMsTaught:: ds 3
sTrainerRankingBattles:: ds 3
sTrainerRankingWildBattles:: ds 3
sTrainerRankingTrainerBattles:: ds 3
sTrainerRankingUnused1:: ds 3
sTrainerRankingHOFEntries:: ds 3
sTrainerRankingWildMonsCaught:: ds 3
sTrainerRankingHookedEncounters:: ds 3
sTrainerRankingEggsHatched:: ds 3
sTrainerRankingMonsEvolved:: ds 3
sTrainerRankingFruitPicked:: ds 3
sTrainerRankingHealings:: ds 3
sTrainerRankingMysteryGift:: ds 3
sTrainerRankingTrades:: ds 3
sTrainerRankingFly:: ds 3
sTrainerRankingSurf:: ds 3
sTrainerRankingWaterfall:: ds 3
sTrainerRankingWhiteOuts:: ds 3
sTrainerRankingLuckyNumberShow:: ds 3
sTrainerRankingPhoneCalls:: ds 3
sTrainerRankingUnused2:: ds 3
sTrainerRankingLinkBattles:: ds 3
sTrainerRankingSplash:: ds 3
sTrainerRankingTreeEncounters:: ds 3
sTrainerRankingUnused3:: ds 3
sTrainerRankingColosseumWins:: ds 3
sTrainerRankingColosseumLosses:: ds 3
sTrainerRankingColosseumDraws:: ds 3
sTrainerRankingSelfdestruct:: ds 3
sTrainerRankingCurrentSlotsStreak:: ds 2
sTrainerRankingLongestSlotsStreak:: ds 2
sTrainerRankingTotalSlotsPayouts:: ds 4
sTrainerRankingTotalBattlePayouts:: ds 4
sTrainerRankingLongestMagikarp:: ds 2
sTrainerRankingShortestMagikarp:: ds 2
sTrainerRankingBugContestScore:: ds 2
sTrainerRankingsChecksum:: ds 2
2020-06-21 03:03:40 +00:00
sTrainerRankingsEnd::
2018-01-11 03:34:22 +00:00
ds 1 ; Former location for sMobileEventIndexBackup, moved to 1:BE44 in English
2020-06-21 03:03:40 +00:00
sTrainerRankingsBackup:: ds sTrainerRankingsEnd - sTrainerRankings
2019-04-10 18:46:16 +00:00
ds $6fa
2020-06-21 03:03:40 +00:00
s5_a800:: db
2019-04-10 18:46:16 +00:00
ds $24
2020-06-21 03:03:40 +00:00
s5_a825:: db
s5_a826:: db
2019-04-10 18:46:16 +00:00
ds $6d
2021-02-05 17:44:21 +00:00
s5_a894:: ds 6
s5_a89a:: dw
2020-06-21 03:03:40 +00:00
s5_a89c:: ds 22
s5_a8b2:: ds 150
2019-04-10 18:46:16 +00:00
2020-06-21 03:03:40 +00:00
s5_a948:: ds 246
2019-04-10 18:46:16 +00:00
ds $3
2020-06-21 03:03:40 +00:00
s5_aa41:: ds 4
2019-04-10 18:46:16 +00:00
ds $2
2020-06-21 03:03:40 +00:00
s5_aa47:: db
s5_aa48:: db
2019-04-10 18:46:16 +00:00
ds $1
2020-06-21 03:03:40 +00:00
s5_aa4a:: db
2019-04-10 18:46:16 +00:00
2020-06-21 03:03:40 +00:00
sMobileLoginPassword:: ds MOBILE_LOGIN_PASSWORD_LENGTH
2019-04-10 18:46:16 +00:00
ds $1
2020-06-21 03:03:40 +00:00
s5_aa5d:: ds MOBILE_LOGIN_PASSWORD_LENGTH
2019-04-10 18:46:16 +00:00
ds $4
2020-06-21 03:03:40 +00:00
s5_aa72:: db
s5_aa73:: ds 12
s5_aa7f:: ds 12
2019-04-10 18:46:16 +00:00
2020-06-21 03:03:40 +00:00
s5_aa8b:: db
s5_aa8c:: db
s5_aa8d:: db
s5_aa8e:: ds 7 * $cc
2019-04-10 18:46:16 +00:00
ds $1
2020-06-21 03:03:40 +00:00
s5_b023:: ds 105
s5_b08c:: ds 4
s5_b090:: db
s5_b091:: db
s5_b092:: ds 31
ds $100
2020-06-21 03:03:40 +00:00
s5_b1b1:: db
s5_b1b2:: db
s5_b1b3:: db
s5_b1b4:: db
2019-04-10 18:46:16 +00:00
ds $1e
2020-06-21 03:03:40 +00:00
s5_b1d3::
ds $120
2020-06-21 03:03:40 +00:00
s5_b2f3:: db
s5_b2f4:: ds 4
ds $1
2019-04-10 18:46:16 +00:00
2020-06-21 03:03:40 +00:00
s5_b2f9:: db
s5_b2fa:: db
s5_b2fb:: db
2019-04-10 18:46:16 +00:00
ds $b49
2020-06-21 03:03:40 +00:00
s5_be45:: db
s5_be46:: db
ds $1b8
2020-06-21 03:03:40 +00:00
s5_bfff:: db
SECTION "SRAM Mobile 3", SRAM
2020-06-21 03:03:40 +00:00
s6_a000::
SECTION "SRAM Mobile 4", SRAM
2020-06-21 03:03:40 +00:00
s7_a000::
2020-06-21 16:21:47 +00:00
ds $800
s7_a800:: db