From ed7c6365c98db4ca87d3003d2c84696d768b8e66 Mon Sep 17 00:00:00 2001 From: luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com> Date: Tue, 3 Jul 2018 20:03:39 -0400 Subject: Disassemble remainder of ROM0. --- home/misc_3c43.asm | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ home/names.asm | 4 +++ home/tileset.asm | 24 ++++++++++++++ 3 files changed, 119 insertions(+) create mode 100644 home/misc_3c43.asm (limited to 'home') diff --git a/home/misc_3c43.asm b/home/misc_3c43.asm new file mode 100644 index 0000000..0abbd79 --- /dev/null +++ b/home/misc_3c43.asm @@ -0,0 +1,91 @@ +INCLUDE "constants.asm" + +SECTION "home/misc_3c43.asm", ROM0 + +GetPartyParamLocation:: ; 3c43 (00:3c43) +; Get the location of parameter a from wCurPartyMon in hl + push bc + ld hl, wPartyMons + ld c, a + ld b, 0 + add hl, bc + ld bc, PARTYMON_STRUCT_LENGTH + ld a, [wWhichPokemon] + call AddNTimes + pop bc + ret + +UseItem:: ; 3c56 (00:3c56) + jpba _UseItem + +CheckTossableItem:: ; 3c5e (00:3c5e) + push hl + push de + push bc + callab _CheckTossableItem + pop bc + pop de + pop hl + ret + +GetBattleAnimPointer:: ; 3c6d (00:3c6d) + ld a, BANK(BattleAnimationsBankRef) + ld [MBC3RomBank], a + ldh [hROMBank], a + + ld a, [hli] + ld [wBattleAnimAddress], a + ld a, [hl] + ld [wBattleAnimAddress + 1], a + + ld a, BANK(PlayBattleAnim) + ld [MBC3RomBank], a + ldh [hROMBank], a + + ret + +GetBattleAnimByte:: ; 3c84 (00:3c84) + push hl + push de + + ld hl, wBattleAnimAddress + ld e, [hl] + inc hl + ld d, [hl] + + ld a, BANK(BattleAnimationsBankRef) + ld [MBC3RomBank], a + ldh [hROMBank], a + + ld a, [de] + ld [wBattleAnimByte], a + inc de + + ld a, BANK(PlayBattleAnim) + ld [MBC3RomBank], a + ldh [hROMBank], a + + ld [hl], d + dec hl + ld [hl], e + + pop de + pop hl + + ld a, [wBattleAnimByte] + ret + +InitSpriteAnimStruct:: ; 3ca8 (00:3ca8) + ld [wSpriteAnimIDBuffer], a + ldh a, [hROMBank] + push af + ld a, BANK(_InitSpriteAnimStruct) + call Bankswitch + ld a, [wSpriteAnimIDBuffer] + call _InitSpriteAnimStruct + pop af + call Bankswitch + ret + +EmptyFunction3cbe:: ; 3cbe (00:3cbe) + ret \ No newline at end of file diff --git a/home/names.asm b/home/names.asm index d8739e5..7b5b995 100644 --- a/home/names.asm +++ b/home/names.asm @@ -246,6 +246,10 @@ Unreferenced_GetMoveName:: ; 00:37fc SECTION "home/names.asm@GetNick", ROM0 +GetCurNick:: ; 3a91 (00:3a91) + ld a, [wWhichPokemon] + ld hl, wPartyMonNicknames + GetNick: ; 00:3a97 ; Get nickname a from list hl. push hl diff --git a/home/tileset.asm b/home/tileset.asm index 8a6ef44..4bf6a98 100644 --- a/home/tileset.asm +++ b/home/tileset.asm @@ -416,4 +416,28 @@ LoadTileset:: ; 2f48 pop bc pop hl + ret + +ReloadFontAndTileset:: ; 2f6b (00:2f6b) + call DisableLCD + ldh a, [hROMBank] + push af + ld a, [wMapGroup] + ld b, a + ld a, [wMapId] + ld c, a + call SwitchToAnyMapBank + call LoadFontExtra + call LoadMapPart + call LoadTilesetGFX + pop af + call Bankswitch + + call EnableLCD + ret + +LoadTilesetGFX_LCDOff:: ; 2f8d (00:2f8d) + call DisableLCD + call LoadTilesetGFX + call EnableLCD ret \ No newline at end of file -- cgit v1.2.3