ROM Hack Question Patch to turn on debug menu in Octopath?

  • Thread starter Thread starter SliverSrufer
  • Start date Start date
  • Views Views 3,801
  • Replies Replies 10
  • Likes Likes 2

SliverSrufer

Active Member
Newcomer
Joined
Jun 18, 2018
Messages
40
Reaction score
12
Trophies
0
Age
46
XP
209
Country
United States
I was interested in possible patches for Octopath and so I loaded up the main file in IDA and found a bunch of references to a debug menu. I found one reference in particular seemed interesting

000000710395CB09 aSetdebugmode DCB "SetDebugMode",0

I can change 000000710395CB15 from 00 to 01 and that will set "SetDebugMode",1. Which I assume will enable debug mode, however I have no idea how to access the debug menu. It also looks like there is code in there for remote debugging which seems kind of interesting.
 
A lot of times in software development a large portion of debug tools are only included in development builds of the game.

When compiling the final game, debug menus and cheats are stripped out and skipped by the compiler. That flag may have slipped through and not actually be referenced by anything. Would love to be wrong about that though.
 
A lot of times in software development a large portion of debug tools are only included in development builds of the game.

When compiling the final game, debug menus and cheats are stripped out and skipped by the compiler. That flag may have slipped through and not actually be referenced by anything. Would love to be wrong about that though.

I can tell you there is still a fair amount of code in the game for debugging, like code for drawing debug texts and the menu and various menu states. Let me see if I can find any text that is supposed to be within the menu and see what it does.
 
It'd be really nice if there were hidden graphics settings left in. The bloom and some other effects get pretty aggressive, but the only thing you can adjust in-game is corner shadows.
 
A lot of times in software development a large portion of debug tools are only included in development builds of the game.

When compiling the final game, debug menus and cheats are stripped out and skipped by the compiler. That flag may have slipped through and not actually be referenced by anything. Would love to be wrong about that though.
It would actually be bad to leave in the development tools, they sometimes take up quite a bit of space.
 
000000710395CB09 aSetdebugmode DCB "SetDebugMode",0
I can change 000000710395CB15 from 00 to 01 and that will set "SetDebugMode",1. Which I assume will enable debug mode, however I have no idea how to access the debug menu. It also looks like there is code in there for remote debugging which seems kind of interesting.
it's useless change 00 to 01 here, because with 0 byte string is end. if you change it to 1, you will get string "SetDebugMode\0x1" and next string will continue with garbage until 0 byte is occur
 
it's useless change 00 to 01 here, because with 0 byte string is end. if you change it to 1, you will get string "SetDebugMode\0x1" and next string will continue with garbage until 0 byte is occur

yeah, I noticed that too, its just a null terminator for the string. One thing I did find was a table of pause states where, regular pause is 01 submenu is 02 and debugmenu is 10. I was going to try switching the pause and debug values to see if I could get it to open when paused.

Also I found what looks like command line switches, "-Debug" "-Shipping" "-test". I'm not sure if there is a way to pass arguments to the game when loading though.
 
Last edited by SliverSrufer,
if you can patch the executable, you need no to pass command line args. just find the place in code, there is command line checks for debug, and what is doing in this case, and then you can change needed value in other place.
i am personally think, this value not for debug menu in GUI, just... more logs in console, or something like this
 
if you can patch the executable, you need no to pass command line args. just find the place in code, there is command line checks for debug, and what is doing in this case, and then you can change needed value in other place.
i am personally think, this value not for debug menu in GUI, just... more logs in console, or something like this

It can be tricky looking at the code there is several conditional branches before it starts checking the debug flags. I think there might also be debug levels. I tried changing the pause value to the debug value and the game freezes the switch after starting to load. I tried changing some other code and the same thing happens. I dunno I’m just learning how to use ida so it’s not easy. A switch debugger would be nice.
 

Site & Scene News

Popular threads in this forum