News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Pokemon TCG2 Debug Menu  (Read 4046 times)

Drenn

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
Pokemon TCG2 Debug Menu
« on: January 20, 2013, 11:57:27 am »
UPDATE: Here are some game genie codes.

Enable Boot debug menu:
  BE0-37B-08C
In-game debug menu: (replaces "coins" in regular menu)
  418-50B-91B
  508-4FB-800
  048-4EB-F76
Shinario menu: (replaces "status" in regular menu)
  116-0BB-F7A
  A86-0CB-91C
  496-0DB-E63
  C96-0EB-5D5

In-game debug menu: (replaces entire regular menu - it's recommended to use the other code instead)
  411-B1B-F77
  501-B0B-2A3



This game has practically been translated twice and people found some debug text, but it looks like I'm the first to figure out how to trigger it. I searched for the text index of some debug text, where I found it in a format I couldn't identify - but next to several other indices of debug text. After some more poking around I found that the structure was very similar to the structure used by menu text. Once I figured out the starting offset of that structure I found the code that uses it - again very similar to the code which displays the menu. I replaced the "display menu" call with a "display debug menu" call, and there it was!

It looks like there's still some debug text which isn't in that menu. Maybe there's 2 debug menus like in the first game. I'll look into it some more.

Just replace byte 0xc1b0 with 0x50 and 0xc1b1 with 0x41. Press start in-game and the debug menu will pop up.
« Last Edit: January 21, 2013, 07:09:34 pm by Drenn »
Zeldahacking.net: The hub for Zelda: Oracle of Ages and Seasons hacking. We have a discord!

danke

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 2064
    • View Profile
Re: Pokemon TCG2 Debug Menu
« Reply #1 on: January 20, 2013, 12:09:18 pm »
I've been trying to get it to display for a while. Thanks for finding it.


Edit: There should be a debug menu that appears on boot. I think that's the one you're missing.

Drenn

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
Re: Pokemon TCG2 Debug Menu
« Reply #2 on: January 20, 2013, 02:46:14 pm »
It's my pleasure. :)

More progress:


I'm definitely NOT invoking it properly. Maybe it's supposed to be accessed from a "master debug menu" from boot which is why it didn't clear the sprites.

This reminds me of another debug-related thing I found: set [cad3] to a nonzero value and the game will freeze when you press select. But that's all, there aren't any key combos from there to access debug features... I checked.
Zeldahacking.net: The hub for Zelda: Oracle of Ages and Seasons hacking. We have a discord!

danke

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 2064
    • View Profile
Re: Pokemon TCG2 Debug Menu
« Reply #3 on: January 20, 2013, 03:43:09 pm »
You might want to check to see how the original game did it:

http://tcrf.net/Pok%C3%A9mon_Trading_Card_Game#Start-Up_Debug_Menu

But that is, indeed, another debug menu. There is likely a master list that will point to standard, scenario, etc. (Seems to be another one hidden in there to warp locations). And a "Yoshida Debug", according to the Japanese script.

Drenn

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
Re: Pokemon TCG2 Debug Menu
« Reply #4 on: January 20, 2013, 03:55:33 pm »
Yes, I was looking at the first game's debug menu to find the boot-up menu. In particular, the string "POWER ON" led me to this:



How many debug menus does this game have?!? There's at least one more to go if the "Yoshida" menu hasn't been stubbed.

This is definitely the one that's supposed to be displayed when powered on, but I'm still calling it by replacing the pause menu. It's similar to the first one I found as you can see.
Zeldahacking.net: The hub for Zelda: Oracle of Ages and Seasons hacking. We have a discord!

danke

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 2064
    • View Profile
Re: Pokemon TCG2 Debug Menu
« Reply #5 on: January 20, 2013, 05:00:06 pm »
I believe there should be one more. Check out around 0x0EBFEE in the script, I guess. I don't have access to that translation. Those seem to be map/location strings.

Drenn

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
Re: Pokemon TCG2 Debug Menu
« Reply #6 on: January 20, 2013, 06:04:49 pm »
It's hard to tell what you mean... the english script was moved to bank 0x80+ (and the rom was expanded). it would be more helpful if you could give me the text index, if that's possible. There are these 2:
Code: [Select]
"GO TO STARTING ISLAND"
"GO TO GR ISLAND"
Which are right after "CHANGE PLAYER GENDER", but they're actually part of "MODIFY EVENT" in the second menu I found. (They don't work - a lot of things in that menu are glitchy right now.) I don't see any other location strings other than ones that are used in-game, in the bottom-right corner of the map screen.

These are the pieces of unidentified debuggish-looking text I've found. Please correct me if they're actually used in-game:

Code: [Select]
Index 009c: (this looks like it could be a whole menu by itself, maybe in a duel... but I can't find it.)
"GAME WIN"
"GAME LOSS"
"GAME DRAW"
"LIMITED ENVIRONMENT"
"PAUSE MODE"
"CHANGE COMPUTER BATTLE"
"MAKE PLAYER 2 A COMPUTER"
"FLIP 20 COINS"
"SAVE THE CURRENT STATE"
"LOAD FILE"

Index 009f: (This must be for what I mentioned in post #3)
"PAUSE MODE IS ON."
"PRESS SELECT TO PAUSE."

Index 00a1: "COMPUTER MODE IS OFF."
Index 00a2: "COMPUTER MODE IS ON."
Index 00a7: "TEST COIN FLIP"
Index 00a9: "RAM BACKUP SUCCESSFUL. TERMINATE?"

Index 058f: "CARTRIDGE 7 MAP TABLE TEST"
Index 0590: "CARTRIDGE 7 CHARACTER TABLE TEST"
Index 0591: "MR. YOSHIDA TEST"
Index 05bf: "DEBUGGING"
Index 05c3: "V COUNT" (perhaps analagous to the first game's "V EFFECT?")
Index 05c4: "V HOOK COUNT:"
Index 05c6: "STATE OF THE SYSTEM"
Index 05c7: "No. OF OBJ CHARS DURING USE:"
Index 05c8: "MAP No. BEING USED:"
Index 05c9: "MAP CHIPSET BEING USED:"
Index 062a: "MIKAMI PROG."
Index 07fff: "DUMMY LINE"
Index 0800: "YOSHIDA DEBUG MENU"


Some of those translations are kind of shoddy, seeing as it's a machine translation and he had no context. I should have enough to work with, but I haven't found anything more yet.
« Last Edit: January 20, 2013, 07:20:53 pm by Drenn »
Zeldahacking.net: The hub for Zelda: Oracle of Ages and Seasons hacking. We have a discord!

danke

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 2064
    • View Profile
Re: Pokemon TCG2 Debug Menu
« Reply #7 on: January 20, 2013, 06:16:58 pm »
As far as I know, they don't appear in-game. 009C looks like a debug battle menu, or a menu to bring up during a battle. It's possible it's meant for link battles, as well. ("Make player 2 a computer.")

As for the Yoshida Debug Menu, I'm not sure what it's meant to be. In the Japanese script, it literally says (in English) "Yoshida Debug Menu". He was likely one of the programmers or something.

As for my previous message, you found the string anyway. Index 05F8. I believe they are meant to be map viewers. Not sure where the translator got "Cartridge 7", though. The script doesn't indicate that at all.

Drenn

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
Re: Pokemon TCG2 Debug Menu
« Reply #8 on: January 20, 2013, 06:44:03 pm »
I figured out the proper way of displaying the boot menu. I made codes for the 2 menus that work (the STANDARD DEBUG ones) in the first post.

I'll keep searching for the Yoshida menu, but probably not today... 3 debug menus in 1 day is pretty good, I think. Fun fact: there are 3 people named Yoshida in the credits. It looks like 1 was a programmer and the other 2 were card illustrators.

Edit: Also that was a typo, it should have been text index 0x58f, not 0x5f8, not that it matters now.

January 21, 2013, 06:19:58 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I'm starting to think that the Yoshida menu was removed, or at least it's beyond my skills to find it. It has a text index of 0800, which is way to common a number to search for in the rom. I tried some other debug text but my method of searching for clumps of debug text isn't working anymore. In fact I'm starting to think some of those text indices aren't used at all, and that the matches I found were just coincidences. If that's true, their corresponding menus were probably removed.

What's more, I have no idea where the Shinario menu fits in. For anyone who's curious the function's address is 11:49a8. A search for a849 (after byteswap) brought up only one result, which was also in bank 11, but I can't tell if it's a coincidence or not. But it looks abandoned, not invoked from anywhere. The shinario debug menu is probably completely separate from the other menus, and I bet the Yoshida menu is too - or, was. In any case, it's about time I made a shinario code for whoever's curious. It has the handy ability to change the cards you have.

I'm still going to be hacking this game so maybe something else will turn up, but I think I'm done looking for debug menus unless/until I find a new lead. Thanks for your help and interest, danke.

Edit: made some new codes which don't replace the entire menu. Screen is cleared properly before the Shinario menu now.
« Last Edit: January 21, 2013, 07:03:54 pm by Drenn »
Zeldahacking.net: The hub for Zelda: Oracle of Ages and Seasons hacking. We have a discord!