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

SliverSrufer

Active Member
OP
Newcomer
Joined
Jun 18, 2018
Messages
40
Trophies
0
Age
43
XP
179
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.
 

sup3rgh0st

Top Tier Ghost
Member
Joined
Apr 22, 2010
Messages
452
Trophies
1
XP
2,388
Country
United States
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.
 

SliverSrufer

Active Member
OP
Newcomer
Joined
Jun 18, 2018
Messages
40
Trophies
0
Age
43
XP
179
Country
United States
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.
 

Username4321

Well-Known Member
Member
Joined
Jun 10, 2018
Messages
103
Trophies
0
XP
1,007
Country
Brazil
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.
 

Ericthegreat

Not New Member
Member
Joined
Nov 8, 2008
Messages
3,437
Trophies
2
Location
Vana'diel
XP
3,931
Country
United States
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.
 

wl.

Well-Known Member
Newcomer
Joined
Apr 29, 2008
Messages
56
Trophies
1
XP
585
Country
Serbia, Republic of
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
 

SliverSrufer

Active Member
OP
Newcomer
Joined
Jun 18, 2018
Messages
40
Trophies
0
Age
43
XP
179
Country
United States
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,

wl.

Well-Known Member
Newcomer
Joined
Apr 29, 2008
Messages
56
Trophies
1
XP
585
Country
Serbia, Republic of
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
 

SliverSrufer

Active Member
OP
Newcomer
Joined
Jun 18, 2018
Messages
40
Trophies
0
Age
43
XP
179
Country
United States
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.
 
General chit-chat
Help Users
    SylverReZ @ SylverReZ: Hope they made lots of spaget