From 4092ef120744a3eecb30f5b3ad3a5630d558db40 Mon Sep 17 00:00:00 2001 From: Zumi Daxuya Date: Thu, 10 Dec 2020 13:43:06 +0700 Subject: Disassemble G/S intro --- ram/hram.asm | 1 + ram/wram.asm | 27 ++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) (limited to 'ram') diff --git a/ram/hram.asm b/ram/hram.asm index 4acfbfa..8f86a2a 100644 --- a/ram/hram.asm +++ b/ram/hram.asm @@ -124,6 +124,7 @@ ENDU ds 3 ; TODO +hCurSpriteYCoord:: hFFC0:: ds 1 ds 6 diff --git a/ram/wram.asm b/ram/wram.asm index da6d364..f579aa6 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -89,6 +89,10 @@ UNION wTileMapBackup:: ds SCREEN_HEIGHT * SCREEN_WIDTH +NEXTU + +wSpriteAnimDict:: ds 10 * 2 ; NUM_SPRITEANIMDICT_ENTRIES * 2 + NEXTU ds 1 @@ -115,7 +119,10 @@ wSpriteAnimIDBuffer:: db ds 6 +wGlobalAnimYOffset:: wc4c7:: db + +wGlobalAnimXOffset:: wc4c8:: db ds 7 @@ -229,13 +236,31 @@ wca0a:: ds 1 ds 5 ; TODO +wIntroJumptableIndex:: wca10:: ds 1 + +UNION +wIntroBGMapPointer:: ds 2 ; ca11 +NEXTU wca11:: ds 1 wca12:: ds 1 +ENDU + +UNION +wIntroTilemapPointer:: ds 2 ; ca13 +NEXTU wca13:: ds 1 wca14:: ds 1 +ENDU + +wIntroTilesPointer:: ds 2 ; ca15 + +wIntroFrameCounter1:: ds 1 ; ca17 +wIntroFrameCounter2:: ds 1 ; ca18 + +wIntroSpriteStateFlag:: ds 1 ; ca19 - ds $22 ; TODO + ds $1d ; TODO wca37:: ds 1 wca38:: ds 1 -- cgit v1.2.3 From f79810c82ce57d913638427ea425cb693cd5b8af Mon Sep 17 00:00:00 2001 From: Zumi Daxuya Date: Thu, 10 Dec 2020 15:26:37 +0700 Subject: Disassemble Game Freak logo animation --- ram/wram.asm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ram') diff --git a/ram/wram.asm b/ram/wram.asm index f579aa6..2ca1311 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -356,10 +356,12 @@ SECTION "CB5E", WRAM0[$CB5E] wJumptableIndex:: db wFlyDestination:: +wIntroSceneFrameCounter:: wBattleTransitionCounter:: db wBattleTransitionSineWaveOffset:: wBattleTransitionSpinQuadrant:: +wIntroSceneTimer:: wcb60:: ds 1 wcb61:: ds 1 -- cgit v1.2.3 From de3c0631f0dca7f911f01e95d3180ad8afdfc9a8 Mon Sep 17 00:00:00 2001 From: Zumi Daxuya Date: Thu, 10 Dec 2020 21:14:56 +0700 Subject: Remove address comments in wram.asm --- ram/wram.asm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ram') diff --git a/ram/wram.asm b/ram/wram.asm index 2ca1311..5c07810 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -240,25 +240,25 @@ wIntroJumptableIndex:: wca10:: ds 1 UNION -wIntroBGMapPointer:: ds 2 ; ca11 +wIntroBGMapPointer:: ds 2 NEXTU wca11:: ds 1 wca12:: ds 1 ENDU UNION -wIntroTilemapPointer:: ds 2 ; ca13 +wIntroTilemapPointer:: ds 2 NEXTU wca13:: ds 1 wca14:: ds 1 ENDU -wIntroTilesPointer:: ds 2 ; ca15 +wIntroTilesPointer:: ds 2 -wIntroFrameCounter1:: ds 1 ; ca17 -wIntroFrameCounter2:: ds 1 ; ca18 +wIntroFrameCounter1:: ds 1 +wIntroFrameCounter2:: ds 1 -wIntroSpriteStateFlag:: ds 1 ; ca19 +wIntroSpriteStateFlag:: ds 1 ds $1d ; TODO -- cgit v1.2.3 From 87ae0e358884f4156f9e5afd2e836c9b19041364 Mon Sep 17 00:00:00 2001 From: Zumi Daxuya Date: Fri, 11 Dec 2020 17:05:58 +0700 Subject: Start labelling Pikachu minigame --- ram/wram.asm | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) (limited to 'ram') diff --git a/ram/wram.asm b/ram/wram.asm index 5c07810..6e8b4e6 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -168,8 +168,69 @@ wLYOverrides2:: ds SCREEN_HEIGHT_PX wLYOverrides2End:: NEXTU -; Battle-related +; Pikachu minigame + +wc600:: ds 1 +wc601:: ds 1 +wc602:: ds 1 +wc603:: ds 1 +wc604:: ds 1 +wc605:: ds 1 +wc606:: ds 1 +wc607:: ds 1 +wc608:: ds 1 +wPikachuMinigameScore:: ds 2 +wc60b:: ds 1 +wc60c:: ds 1 +wc60d:: ds 1 +wc60e:: ds 1 +wc60f:: ds 1 +wPikachuMinigameNoteCaught:: ds 1 + +; Time keeping +wPikachuMinigameTimeFrames:: ds 1 +wPikachuMinigameTimeSeconds:: ds 1 + +wc613:: ds 1 +wc614:: ds 1 +wc615:: ds 1 +wc616:: ds 1 +wPikachuMinigameScrollSpeed:: ds 1 +wc618:: ds 1 +wc619:: ds 1 +wc61a:: ds 1 +wc61b:: ds 1 +wc61c:: ds 1 +wc61d:: ds 1 +wc61e:: ds 1 +wPikachuMinigameSceneTimer:: ds 1 +wPikachuMinigameJumptableIndex:: ds 1 +wPikachuMinigameBGMapPointer:: ds 2 +wc622:: ds 2 +wc623:: ds 2 +wc624:: ds 1 +wc625:: ds 1 +wc626:: ds 1 +wc627:: ds 1 +wc628:: ds 1 +wc629:: ds 1 +wc62a:: ds 1 +wc62b:: ds 1 +wc62c:: ds 1 +wc62d:: ds 1 +wc62e:: ds 1 +wc62f:: ds 1 +wc630:: ds 1 +wc631:: ds 1 +wc632:: ds 1 +wc633:: ds 1 +wc634:: ds 1 +wc635:: ds 1 +wc636:: ds 1 + +NEXTU +; Battle-related ds $1ea wActiveBGEffects:: -- cgit v1.2.3 From 7ce11f0e85198bb2a8458181370b5e631ec393f6 Mon Sep 17 00:00:00 2001 From: Zumi Daxuya Date: Fri, 11 Dec 2020 20:26:49 +0700 Subject: More progress on disassembling Pikachu minigame --- ram/wram.asm | 64 ++++++++++++++++++++++++------------------------------------ 1 file changed, 25 insertions(+), 39 deletions(-) (limited to 'ram') diff --git a/ram/wram.asm b/ram/wram.asm index 6e8b4e6..8ff99b1 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -171,21 +171,23 @@ NEXTU ; Pikachu minigame -wc600:: ds 1 -wc601:: ds 1 -wc602:: ds 1 -wc603:: ds 1 -wc604:: ds 1 -wc605:: ds 1 +wPikachuMinigamePikachuObjectPointer:: ds 2 +wPikachuMinigamePikachuTailObjectPointer:: ds 2 +wPikachuMinigamePikachuNextAnim:: ds 1 + +wPikachuMinigameControlEnable:: ds 1 + wc606:: ds 1 -wc607:: ds 1 -wc608:: ds 1 + +wPikachuMinigamePikachuYOffset:: ds 1 +wPikachuMinigameNoteTimer:: ds 1 wPikachuMinigameScore:: ds 2 -wc60b:: ds 1 -wc60c:: ds 1 -wc60d:: ds 1 -wc60e:: ds 1 -wc60f:: ds 1 +wPikachuMinigameNoteCounter:: ds 2 ; not used for anything meaningful? + +wPikachuMinigameSpawnTypeIndex:: ds 1 +wPikachuMinigameSpawnDataIndex:: ds 1 +wPikachuMinigameScoreModifier:: ds 1 + wPikachuMinigameNoteCaught:: ds 1 ; Time keeping @@ -194,40 +196,24 @@ wPikachuMinigameTimeSeconds:: ds 1 wc613:: ds 1 wc614:: ds 1 -wc615:: ds 1 +wPikachuMinigameRedrawTimer:: ds 1 wc616:: ds 1 wPikachuMinigameScrollSpeed:: ds 1 wc618:: ds 1 wc619:: ds 1 wc61a:: ds 1 -wc61b:: ds 1 -wc61c:: ds 1 -wc61d:: ds 1 -wc61e:: ds 1 +wPikachuMinigameColumnPointer:: ds 2 +wPikachuMinigameSavedColumnPointer:: ds 2 + wPikachuMinigameSceneTimer:: ds 1 + wPikachuMinigameJumptableIndex:: ds 1 + wPikachuMinigameBGMapPointer:: ds 2 -wc622:: ds 2 -wc623:: ds 2 -wc624:: ds 1 -wc625:: ds 1 -wc626:: ds 1 -wc627:: ds 1 -wc628:: ds 1 -wc629:: ds 1 -wc62a:: ds 1 -wc62b:: ds 1 -wc62c:: ds 1 -wc62d:: ds 1 -wc62e:: ds 1 -wc62f:: ds 1 -wc630:: ds 1 -wc631:: ds 1 -wc632:: ds 1 -wc633:: ds 1 -wc634:: ds 1 -wc635:: ds 1 -wc636:: ds 1 +wPikachuMinigameTilemapPointer:: ds 2 +wPikachuMinigameTilesPointer:: ds 2 + +wPikachuMinigameColumnBuffer:: ds 16 NEXTU ; Battle-related -- cgit v1.2.3 From 4f0e8ce39c6c8f0b7bb087a7911077e9fac0008a Mon Sep 17 00:00:00 2001 From: Zumi Daxuya Date: Sat, 12 Dec 2020 13:56:19 +0700 Subject: Label more stuff in the Pikachu minigame --- ram/wram.asm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'ram') diff --git a/ram/wram.asm b/ram/wram.asm index 8ff99b1..287d044 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -177,7 +177,7 @@ wPikachuMinigamePikachuNextAnim:: ds 1 wPikachuMinigameControlEnable:: ds 1 -wc606:: ds 1 +wc606:: ds 1 ; written to, but is this read from? wPikachuMinigamePikachuYOffset:: ds 1 wPikachuMinigameNoteTimer:: ds 1 @@ -194,16 +194,20 @@ wPikachuMinigameNoteCaught:: ds 1 wPikachuMinigameTimeFrames:: ds 1 wPikachuMinigameTimeSeconds:: ds 1 +; are these two used? wc613:: ds 1 wc614:: ds 1 + wPikachuMinigameRedrawTimer:: ds 1 wc616:: ds 1 wPikachuMinigameScrollSpeed:: ds 1 -wc618:: ds 1 -wc619:: ds 1 -wc61a:: ds 1 -wPikachuMinigameColumnPointer:: ds 2 + +wPikachuMinigameColumnFlags:: ds 1 wPikachuMinigameSavedColumnPointer:: ds 2 +wPikachuMinigameColumnPointer:: ds 2 + +wPikachuMinigameRepeatColumnCounter:: ds 1 +wPikachuMinigameRepeatColumnCounter2:: ds 1 wPikachuMinigameSceneTimer:: ds 1 -- cgit v1.2.3 From 1a131d1ce01bfd12cdb3cf61719e41bff7b699db Mon Sep 17 00:00:00 2001 From: Zumi Daxuya Date: Sat, 12 Dec 2020 14:37:11 +0700 Subject: Some adjustments --- ram/wram.asm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ram') diff --git a/ram/wram.asm b/ram/wram.asm index 287d044..95ac322 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -93,6 +93,22 @@ NEXTU wSpriteAnimDict:: ds 10 * 2 ; NUM_SPRITEANIMDICT_ENTRIES * 2 +wSpriteAnimationStructs:: +; field 0: index +; fields 1-3: loaded from SpriteAnimSeqData +wSpriteAnim1:: sprite_anim_struct wSpriteAnim1 +wSpriteAnim2:: sprite_anim_struct wSpriteAnim2 +wSpriteAnim3:: sprite_anim_struct wSpriteAnim3 +wSpriteAnim4:: sprite_anim_struct wSpriteAnim4 +wSpriteAnim5:: sprite_anim_struct wSpriteAnim5 +wSpriteAnim6:: sprite_anim_struct wSpriteAnim6 +wSpriteAnim7:: sprite_anim_struct wSpriteAnim7 +wSpriteAnim8:: sprite_anim_struct wSpriteAnim8 +wSpriteAnim9:: sprite_anim_struct wSpriteAnim9 +wSpriteAnim10:: sprite_anim_struct wSpriteAnim10 +wSpriteAnimationStructsEnd:: + +wSpriteAnimCount:: db NEXTU ds 1 -- cgit v1.2.3 From 039a2bd71576f96e0819f4657fc3ef44fd8ae4d2 Mon Sep 17 00:00:00 2001 From: Zumi Daxuya Date: Thu, 17 Dec 2020 23:41:14 +0700 Subject: Suggested changes to #83 --- ram/wram.asm | 1 + 1 file changed, 1 insertion(+) (limited to 'ram') diff --git a/ram/wram.asm b/ram/wram.asm index 95ac322..c861704 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -172,6 +172,7 @@ wMapBufferEnd:: UNION +wc600:: wOverworldMapBlocks:: ds 1300 wOverworldMapBlocksEnd:: -- cgit v1.2.3