Post subject: Gens debug mode
Joined: 8/27/2006
Posts: 883
Hi, I would like to start messing around with luck manipulation of a game, and I would like to know if I need to access the debug menu because it is not working for the moment. If there are any alternative for the moment, it would be kind if you could tell me some. I plan on reading some of the assembly code.
Joined: 2/15/2005
Posts: 246
Location: Torquay, England
Nothing in the debug menu is good for luck manipulation. The best way to manipulate luck is to make a savestate, do something, and see if what you wanted to happen happened. If it didn't, go back to your savestate, frame advance, save, and try again.
Joined: 8/27/2006
Posts: 883
Yeah but I need to see the RNG value so that luck manipulation will be easier. I don't want to make a tas and doing this method 1 000 000 for a 4 hours video.
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
How do you plan to find the RNG value from the debug menu? (Note: I have no idea about any "debug menu" in gens at all.)
Joined: 8/27/2006
Posts: 883
Actually I don't know either... I just didn't found much information about gens. I need to have a way to access the memory to look at some value, and with trial and error, and the list of change from one frame to another, I might find something useful for luck manipulation. I was also planing after that to see how luck could be manipulated. But I found out that there is the version 9j which the download link is broken. I'll wait to download this release. But if you have an idea on the way to manipulate luck without trial and error (this would be very long). Because I would like to start Shining Force 2, not that it's official, but I want to see how the games work. Even if I don't do a TAS of it (but I would like to) Anyway I hope you could help me, and thank for your time :)
Joined: 2/15/2005
Posts: 246
Location: Torquay, England
ZeXr0 wrote:
Yeah but I need to see the RNG value so that luck manipulation will be easier. I don't want to make a tas and doing this method 1 000 000 for a 4 hours video.
Sorry, but the debug menu is of no use to you. I don't even think you can look at the RAM from it, and besides, you need to know exactly where to look. There are usually ways in-game of finding out values used for RNGs, but how you read the RNG depends what game you're playing.
Joined: 8/27/2006
Posts: 883
That will be Shining Force 2. There's a lot of luck manipulation to do, and before I start doing a stategy for the game itself, I need to know how I can manipulate luck, and how often I will success. Even if the debug menu is of no help, is there another way to see the ram, because i'm planning on looking at the assembly code (if I find out how I can read at it) to find exactly how random is generate.
Emulator Coder, Skilled player (1310)
Joined: 12/21/2004
Posts: 2687
It's a requested feature, I think Upthorn was working on it. Currently it is possible to see the RAM in a different version that does not have movie recording (see this post), which is better than nothing, at least for testing purposes.
Joined: 2/15/2005
Posts: 246
Location: Torquay, England
ZeXr0 wrote:
Even if the debug menu is of no help, is there another way to see the ram, because i'm planning on looking at the assembly code (if I find out how I can read at it) to find exactly how random is generate.
You can make a savestate and open it in a hex editor. XVI32 is a good freeware hex editor. I'm not sure where exactly the RAM starts in the savestate, but you can probably find out from google.
Joined: 8/27/2006
Posts: 883
I could modify gens a little to make save stave when using maybe frame advance or something so it could save a savestate each frame so I could see in another software (that I could, and would surely do to help me find the values)
Editor, Expert player (2073)
Joined: 6/15/2005
Posts: 3282
If you're planning on disassembling the RNG in a game, it's pretty hard. You have to know exactly where the relevant values are (after much guessing) and how (and when exactly) they affect randomness. Acmlm and I have worked out the RNG in NES Monopoly, and it wasn't easy.
Joined: 8/27/2006
Posts: 883
Yeah I know, I don't think it will be easy, but I'm a computer programmer, and that's a great opportunity to learn assembly with something interresting, because I won't be using it much in my life. Anyway, I just want to mess around with it to see what's possible. It is not a serious TAS for the moment, but it might become one.
Player (81)
Joined: 3/11/2005
Posts: 352
Location: Oregon
If you want to add a RAM search to Gens/win32, it shouldn't be too hard. I've already got one in my Linux version. If you know a little win32 GUI programming you can probably use my code as a basis for what needs to happen. If you do this, make sure to coordinate with Upthorn, who seems to be the current Gens/win32 coder.
ideamagnate| .seen aqfaq <nothing happens> DK64_MASTER| .seen nesvideoagent * DK64_MASTER slaps forehead
Joined: 8/27/2006
Posts: 883
Yeah i'll look at that, but i'm not sure, i'll work for the moment on comparing two save state so i'll be able to see what changes when i try to manipulate luck, if i'm lucky, there shouldn't be a lot of thing. And I'll do also the structure of the file, with some information I'll found on the internet, so that way it will be easy, and if I find something usefull, I might just release what I have done, and make it customizable so that others could see the difference between two save save state and annoting some value so that they will see the changes, anyway, I'll look at that.