Main Menu
Main Page
Forums
Recent changes
Random page
Help

Databases
GlitchDex
AttackDex
ItemDex

Major Glitches
Trainer escape glitch
Old man trick
Celebi trick
Select glitches (Japan)
SRAM glitch
CoolTrainer♀ corruption
LOL glitch
Rival LOL glitch
Super Glitch
ZZAZZ glitch
Pomeg corruption glitch (Glitzer Popping)
Tweaking
Elite Four door glitch (Japan)
Pokémon merge glitch
Pokémon cloning
Time Capsule exploit
Arbitrary code execution
Coin Case glitch
More

Other Glitch Categories
Glitches by generation
Glitches between two generations
Japan-only/language specific glitches
Music glitches
Natural glitches
Non-core series glitches
Non-Pokémon glitches
Officially acknowledged glitches
Recurring glitches
Dead glitches

References
Pokémon GameShark codes
The Big HEX List
GB programming
Curiosities
Debugging features
Easter eggs
Error traps
Glitch areas
Glitch myths
Non-glitch exploits
Placeholder texts
Pokémon glitch terminology
Unused content and prerelease information

Useful Tools
8F Helper
GBz80 to Items
Old man trick name generator
PATH (Prama's Advanced Tweaking Heaven)
Save file editors
Special stat/Pokémon converter
Trainer escape Trainer Pokémon finder

Affiliates
Legendary Star Blob 2 (Hakuda)
Pokémon Speedruns wiki
PRAMA Initiative
Become an affiliate!

Search Wiki

 

Search Forums

 

Author Topic: Debug menus in Japanese Crystal  (Read 4196 times)

0 Members and 1 Guest are viewing this topic.

SatoMew

  • Member+
  • *
  • Offline Offline
    • View Profile
Re: Debug menus in Japanese Crystal
« Reply #15 on: March 20, 2016, 10:07:58 am »
While looking up "unlimited battle mobile adapter" elsewhere, I found a thread on The Azure Heights Forums from 2001 and another thread on the Serebii.Net Forums from 2006 with posts mentioning some of the debug text found here. I still don't know what it is, though.

IIMarckus

  • Administrator
  • *****
  • Offline Offline
  • Gender: Male
  • Impersonal Text
    • View Profile
    • iimarck.us
Re: Debug menus in Japanese Crystal
« Reply #16 on: April 08, 2016, 03:39:21 pm »
Looking over it again, another odd track name is 「かち4」 Victory 4, which follows the three standard victory themes (Trainer Battle, Wild Pokémon, and Gym Leader). This track is used for Mt. Moon Square (confusingly called Mt. Moon on the HG/SS soundtrack, whereas the music played inside Mt. Moon is Rock Tunnel). If it was originally written as a victory theme, that would certainly explain why it’s so short.
It’s worth noting that it is used as a victory theme in Stadium 2.

SatoMew

  • Member+
  • *
  • Offline Offline
    • View Profile
Re: Debug menus in Japanese Crystal
« Reply #17 on: April 09, 2016, 04:13:20 pm »
It’s worth noting that it is used as a victory theme in Stadium 2.

Huh :P

Torchickens

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
    • View Profile
Re: Debug menus in Japanese Crystal
« Reply #18 on: May 13, 2016, 02:32:42 pm »
These are incredible finds! Well done Háčky! There are a number of sound effects in the sound test I don't recognize, such as 45, 146, 175, 176-178, 205, 206. Are any of those used?
Hello. I actually identify as gender questioning, but nowadays feel more firmly that I identify as female. My sex is male but I like to express myself as female.  She/her pronouns, please.


Thank you Myri for my avatar! Thank you Aeriixion for the cute sprite above! :) Roelof also made different variations of the sprite (which I animated).

Contact:

Email Youtube Twitter
Skype: Torchickens
Bulbapedia Starfy Wiki

Beyond all philosophies are the things that go best for you; what makes you feel content. It's important to always follow your heart, so unless you feel perfectly happy about it don't just follow something because it is popular, fits a style or is conventional. Sometimes you may reach a point you're not sure who you are, but as things settle I'm convinced things do work out in time.

Háčky

  • Distinguished Member
  • *
  • Offline Offline
  • Pick which packet as an error?
    • View Profile
Re: Debug menus in Japanese Crystal
« Reply #19 on: June 15, 2016, 02:26:36 pm »
Unused
(3F:656E)
Displays the Mobile Adapter connection prompt with an incorrect palette. Maybe it would do more than that if a connection could be made.

This script initiates a Colosseum mobile battle using the first three Pokémon in the party. It can be either a time-limited battle or an unlimited one depending on the “unlimited battle mobile adapter” flag.

The palette of the Mobile Adapter prompt depends on the location where it’s accessed. In an area such as the first floor of the PokéCom Center, the prompt will be the usual dark blue.

Also, I realize I never mentioned how to access those unreferenced scripts. The Game Genie codes ??4-819-D58 · ??4-829-7FB will replace the pointer to テスト1 Test 1.

Quick-start (3F:5983)
Function 3F:5983 seems to be intended as some sort of accelerated start for debugging purposes. It does a bewildering variety of peculiar things:

  • Sets bit 7 of $D83F (StatusFlags). (Pokecrystal identifies this as ENGINE_BUG_CONTEST_ON, but I don’t think it’s related to the Bug-Catching Contest at all. The only place I see that it’s used is in MainMenu_GetWhichMenu, which checks this flag but then does the same thing whether it’s set or not. The flag is set in-game when the Mystery Egg is given to Prof. Elm.)

There’s dummied-out code for the main menu in the English version of Pokémon Crystal? When I say it like that, the reason for it becomes a lot more obvious :P

That flag is used in the Japanese version to hide the Mobile and Mobile Stadium options from the main menu until the Mystery Egg is delivered to Prof. Elm.

These are incredible finds! Well done Háčky! There are a number of sound effects in the sound test I don't recognize, such as 45, 146, 175, 176-178, 205, 206. Are any of those used?

175–178 are used for the moves Moonlight, Encore, Beat Up, and Baton Pass.

206 is used when unlocking the Card Folder. 205 is probably also used for some mobile feature, but I don’t know which one.

045 and 146 don’t seem to be used. Notably, 045 (called SFX_FANFARE in pokecrystal) can be played by a text script, but there don’t appear to be any text scripts that use that command.
« Last Edit: June 15, 2016, 02:31:27 pm by Háčky »

Torchickens

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
    • View Profile
Re: Debug menus in Japanese Crystal
« Reply #20 on: June 15, 2016, 02:59:59 pm »
I see. Thanks for that. :)

Regarding the sound test, may I ask how would we go about activating it with arbitrary code execution (with a trick such as TM15 ACE)? Would it be as simple as bringing up the menu, or are there pointers within the menu code that were changed in the final game?
« Last Edit: June 15, 2016, 03:08:56 pm by Torchickens »
Hello. I actually identify as gender questioning, but nowadays feel more firmly that I identify as female. My sex is male but I like to express myself as female.  She/her pronouns, please.


Thank you Myri for my avatar! Thank you Aeriixion for the cute sprite above! :) Roelof also made different variations of the sprite (which I animated).

Contact:

Email Youtube Twitter
Skype: Torchickens
Bulbapedia Starfy Wiki

Beyond all philosophies are the things that go best for you; what makes you feel content. It's important to always follow your heart, so unless you feel perfectly happy about it don't just follow something because it is popular, fits a style or is conventional. Sometimes you may reach a point you're not sure who you are, but as things settle I'm convinced things do work out in time.

Háčky

  • Distinguished Member
  • *
  • Offline Offline
  • Pick which packet as an error?
    • View Profile
Re: Debug menus in Japanese Crystal
« Reply #21 on: June 15, 2016, 08:50:02 pm »
I see. Thanks for that. :)

Regarding the sound test, may I ask how would we go about activating it with arbitrary code execution (with a trick such as TM15 ACE)? Would it be as simple as bringing up the menu, or are there pointers within the menu code that were changed in the final game?

The sound test makes several calls to functions in the upper part of bank 0 that are offset by $3D bytes, including important ones like PlayMusic and PlaySFX ;)

In order to run it with ACE, you’d have to copy the code (from 3F:72C3–73B1) into RAM and patch those calls. And once the code is moved into RAM, you’d also need to patch calls to the sound test’s own subroutines so they point to the new addresses in RAM. Probably the simplest patching method would be to loop through the code looking for the bytes $CD (call) and $C3 (jp) and checking the high byte of the address that follows. If it’s ≥ $40, then it’s pointing to its own code in bank $3F and needs to be offset to wherever you’ve put the patched code in RAM. If it’s ≥ $2B, then it’s pointing to the upper part of bank 0 and you need to subtract $003D. If it’s < $2B, then the address is fine. (This might not work properly if the bytes $CD or $C3 appeared as an operand rather than an instruction, but luckily they don’t in the sound test code.)

Torchickens

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
    • View Profile
Re: Debug menus in Japanese Crystal
« Reply #22 on: June 16, 2016, 07:28:13 am »
I see. Thanks for that. :)

Regarding the sound test, may I ask how would we go about activating it with arbitrary code execution (with a trick such as TM15 ACE)? Would it be as simple as bringing up the menu, or are there pointers within the menu code that were changed in the final game?

The sound test makes several calls to functions in the upper part of bank 0 that are offset by $3D bytes, including important ones like PlayMusic and PlaySFX ;)

In order to run it with ACE, you’d have to copy the code (from 3F:72C3–73B1) into RAM and patch those calls. And once the code is moved into RAM, you’d also need to patch calls to the sound test’s own subroutines so they point to the new addresses in RAM. Probably the simplest patching method would be to loop through the code looking for the bytes $CD (call) and $C3 (jp) and checking the high byte of the address that follows. If it’s ≥ $40, then it’s pointing to its own code in bank $3F and needs to be offset to wherever you’ve put the patched code in RAM. If it’s ≥ $2B, then it’s pointing to the upper part of bank 0 and you need to subtract $003D. If it’s < $2B, then the address is fine. (This might not work properly if the bytes $CD or $C3 appeared as an operand rather than an instruction, but luckily they don’t in the sound test code.)

Neat! Thanks for information, going to look into writing code that does that.
Hello. I actually identify as gender questioning, but nowadays feel more firmly that I identify as female. My sex is male but I like to express myself as female.  She/her pronouns, please.


Thank you Myri for my avatar! Thank you Aeriixion for the cute sprite above! :) Roelof also made different variations of the sprite (which I animated).

Contact:

Email Youtube Twitter
Skype: Torchickens
Bulbapedia Starfy Wiki

Beyond all philosophies are the things that go best for you; what makes you feel content. It's important to always follow your heart, so unless you feel perfectly happy about it don't just follow something because it is popular, fits a style or is conventional. Sometimes you may reach a point you're not sure who you are, but as things settle I'm convinced things do work out in time.

Háčky

  • Distinguished Member
  • *
  • Offline Offline
  • Pick which packet as an error?
    • View Profile
Re: Debug menus in Japanese Crystal
« Reply #23 on: February 22, 2017, 04:52:26 pm »
I found some more debug code that I’d missed! Okay, I shouldn’t get too excited, it’s only 9 bytes ;D

It’s at the end of bank 1, corresponding to the Predef1 function which is dummied out in the release build. It calls 3F:56DB, which is the debug menu with 「ロム バージョン」 ROM Version on it, and then returns to the title screen:
Code: [Select]
Predef1: ; 7e79
callba $fd6db
jp StartTitleScreen.TitleScreen

Unused Trainer

  • GCLF Member
  • Offline Offline
  • CHARIZRAD 'M ROXORX or is it.
    • View Profile
Re: Debug menus in Japanese Crystal
« Reply #24 on: February 23, 2017, 02:34:23 am »
This is not the same debug menu from other GSC Pokemon game?

Wack0

  • Coder, reverser, beta collector [BetaArchive staff]
  • Staff
  • *****
  • Offline Offline
  • Gender: Male
  • cBRH - Doing nothing since 2k7
    • View Profile
Re: Debug menus in Japanese Crystal
« Reply #25 on: February 23, 2017, 04:09:08 am »
This is not the same debug menu from other GSC Pokemon game?

If you're talking about the trainer/Pokémon sprite viewer, that's actually a part of it.
C H E C K E D . B U I L D S . A R E . A W E S O M E N E S S

BetaArchiveSoftHistory Forumsirc.rol.im #galaxy,#softhistory

Also known as The Distractor.

Shane, please stop telling children that there's a Mew outside under the delivery trucks. - Management

Pokémon: arbitrary code execution 1996-2016

Hexatendo

  • GCLF Member
  • Offline Offline
  • CHARIZRAD 'M ROXORX or is it.
    • View Profile
Re: Debug menus in Japanese Crystal
« Reply #26 on: May 19, 2017, 02:06:09 pm »
Sorry, I'm new here, but, is there any patch that enables all debugging functions? I tried one patch a few months ago, but that didn't work. And the patch I found on TCRF a few days ago only enables the ROM Debug (The one that displays a build date). Maybe in the case of the latter, there were different button combinations to enable the different functions? Also, I tried Game Genie codes to enable the quick start debug, but it didn't work in either. Is there at least different patches for different debug functions? (Although I would rather access all of them at once). And I tested the patches in VBA-M. Thank you.

ISSOtm

  • The French Lord of Laziness (and a huge The Legend Of Zelda fan)
  • Wiki Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Pewter City (B)rocks !
    • View Profile
    • My Little Website
Re: Debug menus in Japanese Crystal
« Reply #27 on: May 19, 2017, 03:20:20 pm »
It also depends on the ROM's localization AFAIK, but I'd need Wakc0 to confirm that.
"THOU SHALL NOT PASS !!"  RIVAL's effect, Gandalf.

Proudly glitching Pokémon Red and Yellow on a Black & White GB, Pocket GB, GB Color, GBA SP and new 3DS.

My Twitter (beware, I'm French)
My YouTube (same warning)

Here is an online tool to build 8F setups : GBz80 to Items !

They see me layzin', they ha-tin'...
Heavy contributor of the global augmentation of entropy (my room's is too damn high !)

Hexatendo

  • GCLF Member
  • Offline Offline
  • CHARIZRAD 'M ROXORX or is it.
    • View Profile
Re: Debug menus in Japanese Crystal
« Reply #28 on: May 20, 2017, 01:10:19 pm »
If you're talking about region, then I used Japanese Crystal.

Hexatendo

  • GCLF Member
  • Offline Offline
  • CHARIZRAD 'M ROXORX or is it.
    • View Profile
Re: Debug menus in Japanese Crystal
« Reply #29 on: June 03, 2017, 02:36:22 pm »
Sorry to double post, but I think I have an idea. Why don't we enable various debug menus with a button combination. I do not want to enable and disable codes everytime I want to use a different debug menu. I think B+left should be the ROM DEBUG (Build date one), B+up for the SUPER debug, and B+right for the quick start debug. Also, is the 5th page of the super debug menu dummied out or removed completely? If the former, we should find the game genie code for it. If my idea is approved, what should be B+down?