Disassemble referenced functions in bank 2

This commit is contained in:
ElectroDeoxys
2021-04-15 17:40:48 +01:00
parent 732a632a94
commit 2fce2e7bd4
14 changed files with 3660 additions and 191 deletions
+15 -6
View File
@@ -128,13 +128,22 @@ DIAMOND EQU $1
STAR EQU $2
PROMOSTAR EQU $ff
; card set constants (set 1)
const_def
const CARD_SET_COLOSSEUM ; $0
const CARD_SET_EVOLUTION ; $1
const CARD_SET_MYSTERY ; $2
const CARD_SET_LABORATORY ; $3
const CARD_SET_PROMOTIONAL ; $4
const CARD_SET_ENERGY ; $5
; CARD_DATA_SET constants (set 1)
COLOSSEUM EQU $0 << 4
EVOLUTION EQU $1 << 4
MYSTERY EQU $2 << 4
LABORATORY EQU $3 << 4
PROMOTIONAL EQU $4 << 4
ENERGY EQU $5 << 4
COLOSSEUM EQU CARD_SET_COLOSSEUM << 4
EVOLUTION EQU CARD_SET_EVOLUTION << 4
MYSTERY EQU CARD_SET_MYSTERY << 4
LABORATORY EQU CARD_SET_LABORATORY << 4
PROMOTIONAL EQU CARD_SET_PROMOTIONAL << 4
ENERGY EQU CARD_SET_ENERGY << 4
; CARD_DATA_SET constants (set 2)
JUNGLE EQU $1
+16 -3
View File
@@ -1813,7 +1813,7 @@ Func_4b60: ; 4b60 (1:4b60)
call ChooseInitialArenaAndBenchPokemon
call SwapTurn
jp c, .asm_4c77
call Func_311d
call DrawPlayAreaToPlacePrizeCards
ldtx hl, PlacingThePrizesText
call DrawWideTextBox_WaitForInput
call ExchangeRNG
@@ -3684,7 +3684,7 @@ Func_5805: ; 5805 (1:5805)
ldtx hl, WillDrawNPrizesText
call DrawWideTextBox_WaitForInput
ld a, [wNumberPrizeCardsToTake]
call Func_310a
call SelectPrizeCards
ld hl, hTemp_ffa0
ld d, [hl]
inc hl
@@ -8523,7 +8523,20 @@ Func_7576: ; 7576 (1:7576)
ret
; 0x757b
INCROM $757b, $758a
Func_757b: ; 757b (1:757b)
farcall Func_19e42
ret
; 0x7580
Func_7580: ; 7580 (1:7580)
farcall Func_1a162
ret
; 0x7585
Func_7585: ; 7585 (1:7585)
farcall Func_1a270
ret
; 0x758a
Func_758a: ; 758a (1:758a)
farcall Func_19eb4
+3489 -83
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1272,7 +1272,7 @@ Func_c877: ; c877 (3:4877)
ldh [hSCY], a
call Set_OBJ_8x16
farcall Func_1288c
farcall Func_ad51
farcall HandlePrinterMenu
call Set_OBJ_8x8
call WhiteOutDMGPals
call DoFrameIfLCDEnabled
+13 -8
View File
@@ -2087,8 +2087,8 @@ Func_1996e: ; 1996e (6:596e)
add hl, de
dec c
jr nz, .asm_199b2
ld a, $2
ld [s0a003], a
ld a, 2
ld [sPrinterContrastLevel], a
ld a, $2
ld [sTextSpeed], a
ld [wTextSpeed], a
@@ -2673,6 +2673,7 @@ CalculateNameHash: ; 19e32 (6:5e32)
ret
; 0x19e42
Func_19e42: ; 19e42 (6:5e42)
INCROM $19e42, $19e5a
; shows message on screen depending on wPrinterStatus
@@ -2955,7 +2956,7 @@ Func_1a035: ; 1a035 (6:6035)
ld a, $10
ld [wce9b], a
call EnableSRAM
ld a, [s0a003]
ld a, [sPrinterContrastLevel]
ld [wce99], a
call DisableSRAM
ldh a, [hBankSRAM]
@@ -3140,7 +3141,13 @@ Func_1a138: ; 1a138 (6:6138)
db $00, $20, $40, $60, $7f
; 0x1a14b
INCROM $1a14b, $1a435
INCROM $1a14b, $1a162
Func_1a162: ; 1a162 (6:6162)
INCROM $1a162, $1a270
Func_1a270: ; 1a270 (6:6270)
INCROM $1a270, $1a435
; compresses $28 tiles in sGfxBuffer5
; and writes it in sGfxBuffer5 + $28 tiles.
@@ -4917,11 +4924,9 @@ KeyboardData_Deck: ; 1b019 (6:7019)
; unknown data.
; needs analyze.
; (6:70d6)
INCROM $1b0d6, $1ba12
INCROM $1b0d6, $1ba14
Func_1ba12: ; 1ba12 (6:7a12)
push af
ld [bc], a
Func_1ba14: ; 1ba14 (6:7a14)
call EnableSRAM
ld a, [wd0a9]
ld l, a
+2 -2
View File
@@ -430,7 +430,7 @@ ENDM
border_medal_tile v0Tiles1 + $23a, $6a, $10
border_medal_tile v0Tiles1 + $23c, $6b, $10
; FIGHTING_MEDAL
; PSYCHIC_MEDAL
border_medal_tile v0Tiles1 + $2b8, $7e, $10
border_medal_tile v0Tiles1 + $2ba, $7f, $10
border_medal_tile v0Tiles1 + $2bc, $80, $10
@@ -452,7 +452,7 @@ ENDM
border_medal_tile v0Tiles1 + $43a, $7c, $10
border_medal_tile v0Tiles1 + $43c, $7d, $10
; PSYCHIC_MEDAL
; FIGHTING_MEDAL
border_medal_tile v0Tiles1 + $4b8, $6c, $10
border_medal_tile v0Tiles1 + $4ba, $6d, $10
border_medal_tile v0Tiles1 + $4bc, $6e, $10
+1 -1
View File
@@ -6660,7 +6660,7 @@ Peek_SelectEffect: ; 2e2b4 (b:62b4)
call SwapTurn
ldh a, [hAIPkmnPowerEffectParam]
xor $80
call Func_30f9
call DrawAIPeekScreen
call SwapTurn
ldtx hl, CardPeekWasUsedOnText
call DrawWideTextBox_WaitForInput
+11 -10
View File
@@ -9315,34 +9315,35 @@ Func_30e7: ; 30e7 (0:30e7)
ld a, b
ret
Func_30f9: ; 30f9 (0:30f9)
DrawAIPeekScreen: ; 30f9 (0:30f9)
ld b, a
ldh a, [hBankROM]
push af
ld a, BANK(Func_8932)
ld a, BANK(_DrawAIPeekScreen)
call BankswitchROM
call Func_8932
call _DrawAIPeekScreen
pop af
call BankswitchROM
ret
Func_310a: ; 310a (0:310a)
ld [wce59], a
; a = number of prize cards for player to select to take
SelectPrizeCards: ; 310a (0:310a)
ld [wNumberOfPrizeCardsToSelect], a
ldh a, [hBankROM]
push af
ld a, BANK(Func_8aaa)
ld a, BANK(_SelectPrizeCards)
call BankswitchROM
call Func_8aaa
call _SelectPrizeCards
pop af
call BankswitchROM
ret
Func_311d: ; 311d (0:311d)
DrawPlayAreaToPlacePrizeCards: ; 311d (0:311d)
ldh a, [hBankROM]
push af
ld a, BANK(Func_8b85)
ld a, BANK(_DrawPlayAreaToPlacePrizeCards)
call BankswitchROM
call Func_8b85
call _DrawPlayAreaToPlacePrizeCards
pop af
call BankswitchROM
ret
+1
View File
@@ -171,6 +171,7 @@ hCurSelectionItem:: ; ffb2
hffb3:: ; ffb3
ds $1
hffb4:: ; ffb4
ds $1
hffb5:: ; ffb5
+3 -1
View File
@@ -3,7 +3,9 @@ SECTION "SRAM0", SRAM
s0a000:: ; a000
ds $3
s0a003:: ; a003
; what was the last option selected by the player
; for the printer contrast level (0 ~ 4)
sPrinterContrastLevel:: ; a003
ds $1
s0a004:: ; a004
ds $1
+22 -22
View File
@@ -1607,15 +1607,15 @@ PleaseSelectDeckText: ; 3ba0d (e:7a0d)
text "Please select deck."
done
Text0225: ; 3ba22 (e:7a22)
ModifyDeckText: ; 3ba22 (e:7a22)
text "Modify deck"
done
Text0226: ; 3ba2f (e:7a2f)
ChangeNameText: ; 3ba2f (e:7a2f)
text "Change name"
done
Text0227: ; 3ba3c (e:7a3c)
SelectDeckText: ; 3ba3c (e:7a3c)
text "Select deck"
done
@@ -1771,7 +1771,7 @@ WhichCardWouldYouLikeToSeeText: ; 3bce5 (e:7ce5)
text "Which card would you like to see?"
done
Text024d: ; 3bd08 (e:7d08)
PleaseChooseAPrizeText: ; 3bd08 (e:7d08)
text "Please choose a Prize."
done
@@ -1792,31 +1792,31 @@ EmptyLineText: ; 3bd42 (e:7d42)
textfw0 " ", " ", " ", " ", " ", " ", " ", " ", " "
done
Text0252: ; 3bd55 (e:7d55)
BoosterPackTitleText: ; 3bd55 (e:7d55)
text "Booster Pack"
done
Text0253: ; 3bd63 (e:7d63)
Item1ColosseumText: ; 3bd63 (e:7d63)
text "1. Colosseum"
done
Text0254: ; 3bd71 (e:7d71)
Item2EvolutionText: ; 3bd71 (e:7d71)
text "2. Evolution"
done
Text0255: ; 3bd7f (e:7d7f)
Item3MysteryText: ; 3bd7f (e:7d7f)
text "3. Mystery"
done
Text0256: ; 3bd8b (e:7d8b)
Item4LaboratoryText: ; 3bd8b (e:7d8b)
text "4. Laboratory"
done
Text0257: ; 3bd9a (e:7d9a)
Item5PromotionalCardText: ; 3bd9a (e:7d9a)
text "5. Promotional Card"
done
Text0258: ; 3bdaf (e:7daf)
ViewWhichCardFileText: ; 3bdaf (e:7daf)
text "View which Card File?"
done
@@ -1824,7 +1824,7 @@ Text0259: ; 3bdc6 (e:7dc6)
textfw0 "-", "-", "-", "-", "-", "-", "-", "-", "-", "-"
done
Text025a: ; 3bdd1 (e:7dd1)
SCardsText: ; 3bdd1 (e:7dd1)
text "'s Cards"
done
@@ -1836,19 +1836,19 @@ DeckSaveMachineText: ; 3bdea (e:7dea)
text " Deck Save Machine "
done
Text025d: ; 3be02 (e:7e02)
SaveADeckText: ; 3be02 (e:7e02)
text "Save a Deck"
done
Text025e: ; 3be0f (e:7e0f)
DeleteADeckText: ; 3be0f (e:7e0f)
text "Delete a Deck"
done
Text025f: ; 3be1e (e:7e1e)
BuildADeckText: ; 3be1e (e:7e1e)
text "Build a Deck"
done
Text0260: ; 3be2c (e:7e2c)
ChooseADeckToSaveText: ; 3be2c (e:7e2c)
text "Choose a Deck to Save."
done
@@ -1861,7 +1861,7 @@ Text0262: ; 3be7d (e:7e7d)
text "for"
done
Text0263: ; 3be82 (e:7e82)
SavedTheConfigurationForText: ; 3be82 (e:7e82)
text "Saved the configuration for"
line ""
text "<RAMTEXT>! "
@@ -1876,21 +1876,21 @@ Text0265: ; 3beb7 (e:7eb7)
line "configuration to delete."
done
Text0266: ; 3bee7 (e:7ee7)
DoYouReallyWishToDeleteText: ; 3bee7 (e:7ee7)
text "Do you really wish to delete?"
done
Text0267: ; 3bf06 (e:7f06)
DeletedTheConfigurationForText: ; 3bf06 (e:7f06)
text "Deleted the configuration for"
line ""
text "<RAMTEXT>."
done
Text0268: ; 3bf29 (e:7f29)
YouMayOnlyCarry4DecksText: ; 3bf29 (e:7f29)
text "You may only carry 4 Decks!"
done
Text0269: ; 3bf46 (e:7f46)
ChooseADeckToDismantleText: ; 3bf46 (e:7f46)
text "Choose a deck to dismantle."
done
@@ -1905,7 +1905,7 @@ Text026b: ; 3bf73 (e:7f73)
line "you wish to Build."
done
Text026c: ; 3bf9e (e:7f9e)
ThisDeckCanOnlyBeBuiltIfYouDismantleText: ; 3bf9e (e:7f9e)
text "This Deck can only be built if"
line "you dismantle another Deck."
done
+12 -12
View File
@@ -1,23 +1,23 @@
Text026d: ; 3c000 (f:4000)
YouDoNotOwnAllCardsNeededToBuildThisDeckText: ; 3c000 (f:4000)
text "You do not own all cards needed"
line "to build this Deck."
done
Text026e: ; 3c035 (f:4035)
BuiltDeckText: ; 3c035 (f:4035)
text "Built"
line "<RAMTEXT>"
done
Text026f: ; 3c03e (f:403e)
TheseCardsAreNeededToBuildThisDeckText: ; 3c03e (f:403e)
text "These cards are needed"
line "to build this Deck:"
done
Text0270: ; 3c06a (f:406a)
DismantleTheseDecksText: ; 3c06a (f:406a)
text "Dismantle these Decks?"
done
Text0271: ; 3c082 (f:4082)
DismantledTheDeckText: ; 3c082 (f:4082)
text "Dismantled the Deck."
done
@@ -25,11 +25,11 @@ OKIfFileDeletedText: ; 3c098 (f:4098)
text "OK if this file is deleted?"
done
Text0273: ; 3c0b5 (f:40b5)
ReadTheInstructionsText: ; 3c0b5 (f:40b5)
text "Read the Instructions"
done
Text0274: ; 3c0cc (f:40cc)
PrintThisCardYesNoText: ; 3c0cc (f:40cc)
text "Print this card?"
line " Yes No"
done
@@ -39,7 +39,7 @@ Text0275: ; 3c0ef (f:40ef)
line "to print."
done
Text0276: ; 3c11d (f:411d)
PrintThisDeckText: ; 3c11d (f:411d)
text "Print this Deck?"
done
@@ -48,7 +48,7 @@ Text0277: ; 3c12f (f:412f)
line " Yes No"
done
Text0278: ; 3c156 (f:4156)
PrintMenuItemsText: ; 3c156 (f:4156)
text "Pokémon Cards"
line "Deck Configuration"
line "Card List"
@@ -56,16 +56,16 @@ Text0278: ; 3c156 (f:4156)
line "Quit Print"
done
Text0279: ; 3c19b (f:419b)
WhatWouldYouLikeToPrintText: ; 3c19b (f:419b)
text "What would you like to print?"
done
Text027a: ; 3c1ba (f:41ba)
PleaseSetTheContrastText: ; 3c1ba (f:41ba)
text "Please set the contrast:"
line " Light 1 2 3 4 5 Dark"
done
Text027b: ; 3c1f7 (f:41f7)
PleaseMakeSureToTurnGameBoyPrinterOffText: ; 3c1f7 (f:41f7)
text "Please make sure to turn"
line "the Game Boy Printer OFF."
done
+34 -34
View File
@@ -550,9 +550,9 @@ TextOffsets:: ; 34000 (d:4000)
textpointer DeckNameKeyboardText ; 0x0222
textpointer NewDeckText ; 0x0223
textpointer PleaseSelectDeckText ; 0x0224
textpointer Text0225 ; 0x0225
textpointer Text0226 ; 0x0226
textpointer Text0227 ; 0x0227
textpointer ModifyDeckText ; 0x0225
textpointer ChangeNameText ; 0x0226
textpointer SelectDeckText ; 0x0227
textpointer CancelText ; 0x0228
textpointer Text0229 ; 0x0229
textpointer ChosenAsDuelingDeckText ; 0x022a
@@ -590,53 +590,53 @@ TextOffsets:: ; 34000 (d:4000)
textpointer InPlayAreaText ; 0x024a
textpointer GlossaryText ; 0x024b
textpointer WhichCardWouldYouLikeToSeeText ; 0x024c
textpointer Text024d ; 0x024d
textpointer PleaseChooseAPrizeText ; 0x024d
textpointer HandText_2 ; 0x024e
textpointer DuelistHandText_2 ; 0x024f
textpointer DuelistDiscardPileText ; 0x0250
textpointer EmptyLineText ; 0x0251
textpointer Text0252 ; 0x0252
textpointer Text0253 ; 0x0253
textpointer Text0254 ; 0x0254
textpointer Text0255 ; 0x0255
textpointer Text0256 ; 0x0256
textpointer Text0257 ; 0x0257
textpointer Text0258 ; 0x0258
textpointer BoosterPackTitleText ; 0x0252
textpointer Item1ColosseumText ; 0x0253
textpointer Item2EvolutionText ; 0x0254
textpointer Item3MysteryText ; 0x0255
textpointer Item4LaboratoryText ; 0x0256
textpointer Item5PromotionalCardText ; 0x0257
textpointer ViewWhichCardFileText ; 0x0258
textpointer Text0259 ; 0x0259
textpointer Text025a ; 0x025a
textpointer SCardsText ; 0x025a
textpointer Text025b ; 0x025b
textpointer DeckSaveMachineText ; 0x025c
textpointer Text025d ; 0x025d
textpointer Text025e ; 0x025e
textpointer Text025f ; 0x025f
textpointer Text0260 ; 0x0260
textpointer SaveADeckText ; 0x025d
textpointer DeleteADeckText ; 0x025e
textpointer BuildADeckText ; 0x025f
textpointer ChooseADeckToSaveText ; 0x0260
textpointer Text0261 ; 0x0261
textpointer Text0262 ; 0x0262
textpointer Text0263 ; 0x0263
textpointer SavedTheConfigurationForText ; 0x0263
textpointer Text0264 ; 0x0264
textpointer Text0265 ; 0x0265
textpointer Text0266 ; 0x0266
textpointer Text0267 ; 0x0267
textpointer Text0268 ; 0x0268
textpointer Text0269 ; 0x0269
textpointer DoYouReallyWishToDeleteText ; 0x0266
textpointer DeletedTheConfigurationForText ; 0x0267
textpointer YouMayOnlyCarry4DecksText ; 0x0268
textpointer ChooseADeckToDismantleText ; 0x0269
textpointer Text026a ; 0x026a
textpointer Text026b ; 0x026b
textpointer Text026c ; 0x026c
textpointer Text026d ; 0x026d
textpointer Text026e ; 0x026e
textpointer Text026f ; 0x026f
textpointer Text0270 ; 0x0270
textpointer Text0271 ; 0x0271
textpointer ThisDeckCanOnlyBeBuiltIfYouDismantleText ; 0x026c
textpointer YouDoNotOwnAllCardsNeededToBuildThisDeckText ; 0x026d
textpointer BuiltDeckText ; 0x026e
textpointer TheseCardsAreNeededToBuildThisDeckText ; 0x026f
textpointer DismantleTheseDecksText ; 0x0270
textpointer DismantledTheDeckText ; 0x0271
textpointer OKIfFileDeletedText ; 0x0272
textpointer Text0273 ; 0x0273
textpointer Text0274 ; 0x0274
textpointer ReadTheInstructionsText ; 0x0273
textpointer PrintThisCardYesNoText ; 0x0274
textpointer Text0275 ; 0x0275
textpointer Text0276 ; 0x0276
textpointer PrintThisDeckText ; 0x0276
textpointer Text0277 ; 0x0277
textpointer Text0278 ; 0x0278
textpointer Text0279 ; 0x0279
textpointer Text027a ; 0x027a
textpointer Text027b ; 0x027b
textpointer PrintMenuItemsText ; 0x0278
textpointer WhatWouldYouLikeToPrintText ; 0x0279
textpointer PleaseSetTheContrastText ; 0x027a
textpointer PleaseMakeSureToTurnGameBoyPrinterOffText ; 0x027b
textpointer ProceduresForSendingCardsText ; 0x027c
textpointer CardSendingProceduresText ; 0x027d
textpointer PleaseReadTheProceduresForSendingCardsText ; 0x027e
+40 -8
View File
@@ -1740,9 +1740,14 @@ wInPlayAreaPreservedPosition:: ; ce57
wInPlayAreaTemporaryPosition:: ; ce58
ds $1
wce59:: ; ce59
; number of prize cards still to be
; picked by the player
wNumberOfPrizeCardsToSelect:: ; ce59
ds $1
; pointer to a $ff-terminated list
; of the prize cards selected by the player
wSelectedPrizeCardListPtr:: ; ce5a
ds $2
wce5c:: ; ce5c
@@ -1917,7 +1922,13 @@ wceaa:: ; ceaa
ds $1
wceab:: ; ceab
ds $4
ds $1
wceac:: ; ceac
ds $2
wceae:: ; ceae
ds $1
wCheckMenuCursorXPosition:: ; ceaf
ds $1
@@ -1974,7 +1985,9 @@ wced0:: ; ced0
wced2:: ; ced2
ds $1
wced3:: ; ced3
; the current filter being used
; from the CardTypeFilters list
wCurCardTypeFilter:: ; ced3
ds $1
wced4:: ; ced4
@@ -2012,7 +2025,10 @@ wcf16:: ; cf16
wcf17:: ; cf17
ds DECK_SIZE
ds $15
wcf53:: ; cf53
ds $1
ds $14
; stores the count number of cards owned
; can be 0 in the case that a card is not available
@@ -2049,14 +2065,27 @@ wCursorAlternateTile:: ; cfde
wcfdf:: ; cfdf
ds $1
ds $3
wcfe0:: ; cfe0
ds $1
wcfe1:: ; cfe1
ds $1
wcfe2:: ; cfe2
ds $1
; a flag indicating whether sfx should be played.
wPlaysSfx:: ; cfe3
ds $1
wcfe4:: ; cfe4
ds $3
ds $1
wcfe5:: ; cfe5
ds $1
wcfe6:: ; cfe6
ds $1
; a name buffer in the naming screen.
wNamingScreenBuffer:: ; cfe7
@@ -2092,9 +2121,12 @@ wd009:: ; d009
ds $4
wd00d:: ; d00d
ds $1
ds $18
ds $78
ds $60
wd085:: ; d085
ds $1
wd086:: ; d086
ds $1