11 March 2016 - Forum Rules

Main Menu

How to find a debug menu/room

Started by karik, April 20, 2023, 11:58:13 AM

Previous topic - Next topic



I was looking through the text on the ROM of the DS game "Magical Starsign". There I found several references to a debug room (such as dialogue by a character called "Mr Debug", the names of the debug rooms, as well as the selections you can make there).

My question is, how do rom hackers find out how to get to these debug rooms/menus? I know there are probably multiple ways to get there, but I'd like to know what options there are and what topics I could read more about.

I also know that it's possible that the debug room was removed with the release of the game, and that only the text remained. However, seeing as the debug room from Sword of Mana (which was made by the same studio) is still accessible, I decided to stay hopeful.

Thanks in advance!


I really need to finish up the guide I was writing to this. Mostly still just need pictures and flesh out the examples.

Debug rooms are somewhat rarer than menus, and possibly easier to get to. With the DS being a compiled device rather than all assembly, all the time then a lot of things did get stripped out, especially during the later half of things (EA I think it was had a bit of a scandal with something left in a game and they and most others mandated everything be cleansed before it is pressed).

Means of getting to the rooms tend to be blocked for the final version (any betas are a different matter) which leaves cheats, hacks and glitches as the main approaches.
Debug rooms are then normally just a level/room like any other.

If you can hack the game you might see it in the level layouts somewhere. A basic attempt might be the overwrite an existing level with it and see what happens.

More generally the debug levels tend to be given numbers that normal levels do not (0, 99, last normal level + 1 sort of thing) so if you can make a teleport to room cheat, be it generally (sometimes it is a matter of loading it) or by editing a doorway in the map in memory (which in terms of game design are usually considered teleporters to another room)

Minor note. Sometimes said rooms are gated off parts of an existing location. You might spot them by comparing room layouts to printed guides/gamefaqs walkthroughs and whatever else. You can get to these by doing things like walk through walls cheats, or in level teleport cheats (rather than some level number you instead find the X-Y-Z location in the game (easy cheat search really as you are only moving) and then make a cheat to put you wherever you like (which can be as simple as add a few to your location and thus also achieve a walk through walls cheat for most games*.
Depending upon your knowledge of the level format you might also search for the teleports the levels have and match them up with whatever you know from the main game, if one is hidden in an odd location then you have something to look at.

*I imagine you have fallen through the world at some point in a game, and thus understand how paper thin most levels are.

Debug menus. Two main ways they are found these days.

1) With all this decompilation going on they tend to stick out like a sore thumb when you are pulling something apart (usually a menu function). It might be possible to decompile DS games (most would be still written in C, C++ being rather memory hungry for the little old DS) but I have not seen anything really done yet and if you are asking this you are probably not going to be the one to spearhead the process of DS decompilation.

2) You poke around the various functions for menus, options menus, password entry locations... and see if there are any oddities -- most menus are fairly simple things so if you start seeing timers, it memorising button presses, odd compare and branch (IF ELSE if you prefer more C coder parlance, ) then something is up. Password entry is a separate thing for many as you are seeing what possible outcomes there are vs what is already known (again looking for extras and oddities that are not known).

You mentioned them developing another game with it left in. Such things are worth considering as well; while today the Konami code is a bit of a meme it probably started life as a thing done company wide so any random dev or tester could just do it without looking it up, and coding is all about laziness.

If the text is there you could work backwards from that and try to figure out what might load it and where that is. Say for instance there are signposts you click on which in level data might say look up sign 42, you figure out what the debug text value is (might be an order in the file, might be a value before the text) and figure that out as well. If it is a room rather than a level you might also see it loaded when the level does which could be something good for a more general debug session.

Other than following breadcrumbs from the devs (or outright asking them -- if they or even the testers are antisocial meeja they might still remember something).


No luck at TCRF, GameFAQs or Google. Which means your debug room most likely doesn't exist.

Some easter eggs can be found when disassembling the game (unused code/data). Some of them are found by replacing data (for example, normally you go to room ID X, and you replace X with Y to see what happens).


Thanks for the replies! I usually have trouble figuring out how to start or where to look for information :')

Quote from: FAST6191 on April 20, 2023, 02:18:15 PMDebug rooms are somewhat rarer than menus, and possibly easier to get to.
Pretty sure that it's either debug rooms or both a room and a menu. I found the location names "debug room 1" and "debug room 2", and the dialogue from some of the characters there leads me to believe that you can walk around and iteract with them.

Quote from: Cyneprepou4uk on April 20, 2023, 02:23:54 PMNo luck at TCRF, GameFAQs or Google. Which means your debug room most likely doesn't exist.
Magical Starsign is incredibly unknown with a small (but great) fanbase. I've seen a few cheats around somewhere and that's pretty much it, so the debug room may still be there


bringing this back!

I'd like to try and make cheat codes that work kind of like the warp cheats I saw for Pokemon Emerald. Where once you activate them and walk through a door, it warps you to the location that the code was made for. I'm hoping to get to the debug room this way.

However, I'm not sure where to start. I understand how to search for cheat codes that change stats, money and so on, since for those I have exact values that I can work with.
But when it comes to creating something like a warp cheat to a debug room, I don't really see how exact value search or comparative search could help me.


Doors in games are actually more like teleporters in that you teleport to a new level rather than some kind of continuation of an old one (far easier on the limited memory that way).
If the teleport location is loaded into memory as part of the level itself (sometimes it could be hardcoded into the ROM, though not likely for this) then it becomes viable to alter that, and if the location appears in memory for enough time for the cheat engine to operate on it then that is also an option to target it.

How to find.
If you can find the level layout in the ROM (be aware items, which would include these warps/teleports, can be a different "layer" with possibly a different encoding method**, you might be able to follow that on up to the RAM.
While not the same as a nice on screen 3-2 of NES Mario then somewhere in the memory will be an indicator of what level is in RAM. Find this as per standard cheat finding methods (two doors nearby, maybe a savestate to revert, walk through and see what changed, walk through another and see what changed... revert save maybe, see what changed, idle and see what remains the same to eliminate some other things...) and whatever changes that will necessarily have followed on from the teleport location. Will likely end up as more of a debug session than classic cheat finding but should be fairly light going rather than hardcore "have to know timings and quirks" aspect you might have seen elsewhere. is for an old emulator and locating graphics rather than this but the principles apply, not to mention whatever loads new graphics will also necessarily have been triggered somewhere along the path by the teleporter choice.

**three main approaches being
1) every call it tile is represented in a pattern (50x200 tiles is then 10000 entries however long they might be).
2) coordinates. Every item is given an X-Y spawn location. Probably also further info (contents of chest, direction facing to start, speed maybe, colours and naturally location to teleport to assuming the choice of teleporter is itself not the destination -- 500 different teleporters in the in game item list as it were)
3) crushed axis. You might be given an X location but the Y is handled automagically depending upon game rules. More of a thing for 2d platformers than RPG.
I have had plenty of games do 1) for the background level but 2) or 3) for items, moving enemies and such like.