WAS IST WAS The Earth Adventure - Find number code in rom sourcecode?

Started by caiolucas, November 30, 2021, 05:07:18 PM

Previous topic - Next topic

caiolucas

In the game "WAS IST WAS The Earth Adventure TESSLOFF VERLAG" you can activate extras in the game if you open the in-game pc and enter a numeric code. Where can I find those codes when I look in the rom source code?

Jorpho

Is this a PC game, or is it for a console?

In either case, you almost certainly don't have the "rom source code".

If you have a video of some sort of what you are referring to, that might help for starters.
This signature is an illusion and is a trap devisut by Satan. Go ahead dauntlessly! Make rapid progres!

caiolucas

It is a nintendo ds game.

I tried to read the game with Tinke but i didn't find those codes

Mod Edit: Links to roms are not allowed.

FAST6191

As above you probably don't have source code, and it is not one I recognise on https://osgameclones.com/ or https://en.wikipedia.org/wiki/List_of_commercial_video_games_with_available_source_code . If it is a Java game, C# game or similar then you stand a reasonable chance of doing some decompilation. If you are asking this question then I would not really expect much to come from you trying your hand at C decompilation (some things have been discovered here -- Kirby N64 having something found the other month by those engaged in decompilation).
If you did have the source code then read the source code as it will tap into whatever code handles the menu. There is a possibility such a thing would be obfuscated (though we tend to see this more in open source world to allow devs to have donator features for open source games such that you can't just read the source and learn it trivially) but eh.

To that end we are back with more traditional methods. As it was a trend with some interest in it (see stuff like the hidden xbox menu easter egg, as well as a kirby thing above) I have a guide about 60% done on the matter and general background for finding hidden cheats, however the remaining 40% I have not done is the tedious assembly aspects with examples so I will hold off on sharing that one.
Do check there is no simple dictionary within the game if you look at its files -- if you can enter codes and know a bunch of them then searching for that within the game (might be ascii, might be hex, might be something else, relative search can help here) is not a bad way to open up such a hacking effort.

After this we get to talk about how menus are coded and what to expect there; 15 IF type checks in a row (be it character by character or for the complete entry) is bad coding but it is not likely to bother anything in the average game so you might encounter it being programmed as such. Said IFs will likely correspond to codes as well so if you have that you are laughing. If it looks things up in its own dictionary then the code will look a bit different still. All this will need to be done in a debugger and as you will want to have a broad appreciation of the methods the game might employ.

Option 2. Savestates, macros, computer vision and brute force.
If a failed attempt will always look the same whereas a success does something different you could relatively easily make a script to enter numbers for you. Depending upon how many inputs and how many numbers this may become impractical though. People have done this for everything from catching shiny pokemon to general number pad brute force efforts. Start with a savestate (virtual machines are good for this if you have no other means) you can restore, get the computer to enter button combos (should not be too hard to make something that iterates over the entire space) and compare results/wait for something different on the screen ( https://www.youtube.com/watch?v=D75ZuaSR8nQ for a funny example of using that) and log everything that it detects as outside normal failures, or if it does audio cue then you have that as well.
Assembly has a fairly steep learning curve, this sort of thing you could probably pull off in a macro language like autohotkey (but I would probably still keep the macros for macros and use something like python to underpin it all).

caiolucas

thank you FAST6191 for your long answer but i didn't understand a lot of those methods. Maybe you or somebody else could try to do it. It's an nds-file and when i watched it with Tinke i could see sound, text and image-files so i'm also not sure what's the difference between that and a sourcecode.

FAST6191

Computers don't do complicated tasks. They do lots of little tasks such that it adds up to a big one.
As trying to manage all those little tasks get very tedious, very quickly and you have to keep track of a lot of things then as soon as they could (the PS1 and N64 were quite famous for it, the GBA was probably the first Nintendo handheld to truly embrace it and by the DS it was the main approach used for most things) developers ditched that and went for more abstract approaches with nice human readable text, ability to port it between systems and make changes more easily. This is source code, it gets compiled to what we see/run as the end game as that is the only thing the computer understands. Compilation historically has been considered to be a one way affair and in many ways it still is, however as a limited number of compilers, libraries and whatever else are used and you can see what is going on then with an incredible amount of effort* you can reverse this process, and occasionally devs release code or suffer leaks. Some languages are more amenable to this than others, even more so the just in time languages (which the DS did see a few games use in commercial releases, see Lua in puzzle quest, el tigre and some others I am forgetting right now).

*the Mario 64 one you might have seen took years from very skilled coders, Zelda Ocarina of time similarly long.

Anyway the code fetches images, feeds the hardware sound it understands, text files might be using formats provided by Nintendo or simple enough to view normally... none of this is the code though. This is what you were seeing with tinke, not all games will be that nice though, and what a lot of ROM hacking is concerned with.
What you want will likely** be buried in the code somewhere which takes a different approach to sort.

**as mentioned there could be a list in the game somewhere, however unless it is blindingly obvious somehow then most will only find them after debugging code which has a fairly high barrier to entry as far as skills seen in ROM hacking world.

Jorpho

My thought: if you can find the game's script in the ROM (using Tinke or whatever), then I would suggest looking for whatever text is displayed when the game prompts you to enter the code. If you're really lucky, the necessary code you need to enter will be stored alongside that text.

Anything beyond that is likely to be much more complicated. Are you sure no one else on the Internet has tried to solve this problem before?
This signature is an illusion and is a trap devisut by Satan. Go ahead dauntlessly! Make rapid progres!

FAST6191

Hunting down unknown codes in a German-English 2009 published game from a children's literature company for the DS and you reckon it might have happened before?

There are way bigger games that have not had such treatment -- one of my examples for the document I mentioned above was going to be for Spectrobes 2 also on the DS that similarly has a hidden password system, there being a rather obvious missing gap in the existing code list for things it should generate, and that thing was rather popular and has hundreds of guides. Searching for this game (albeit with the name in the title which is shares with a ROM and most ROM listers) gets this thread duplicated elsewhere and a bunch of ROM sites.

Jorpho

I mean, where was the code supposed to have come from in the first place..?

If it's actually supposed to be given out at a different point in the game, then it might be easier to cheat somehow to wherever it is one is supposed to get the code.

Quote from: FAST6191 on December 01, 2021, 06:11:19 PMSearching for this game (albeit with the name in the title which is shares with a ROM and most ROM listers) gets this thread duplicated elsewhere and a bunch of ROM sites.
Well, "Was Ist Was Abenteuer Erde" (or variations on that) appears to be pretty common.

ETA: It occurs to me that the passwords used in the Professor Layton games are unique to each DS.  If this is a similar case where you're supposed to get the password from a different "Was Ist Was" game, then that's going to be a problem. Bruteforcing might not be such a bad idea, then.

(I would have thought that someone would have made a password generator for the Layton games, or at least some sort of cheat that would allow any password to work – but a quick search doesn't suggest anyone has made something like that, possibly because the only stuff that gets unlocked is trivially screenshotted.)
This signature is an illusion and is a trap devisut by Satan. Go ahead dauntlessly! Make rapid progres!

Colmines92


Jorpho

This signature is an illusion and is a trap devisut by Satan. Go ahead dauntlessly! Make rapid progres!