Posts for ruadath

1 2
8 9 10
14 15
Post subject: Debugger for 3DS ROMS
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
Not sure that this is the right place to post this, but does anyone have any good resources for this? Citra's debugger doesn't work properly (beta emulator, you wouldn't expect it to), but despite that I have had success in figuring out stuff for the Fire Emblem and several other 3DS speedrunning communities using Cheat Engine. Anyone who has ever debugged emulators using CheatEngine, however, knows what a pain this is, due to the fact that individual instructions in the emulator get converted into a slew of simple commands in x86 that often leave the meaning of the original instruction vague and unclear. Things as simple as move operations take 10-20 steps due to memory getting shifted around in places by the emulator, and more complex operations (especially considering we are emulating ARM) get turned into a mass of logic operations that are pretty much unintelligible to the human eye. I recall trying to use IDA Free with some GNU toolchains for ARM a while back but it didn't work properly (also Windows DansGame). If anyone has some experience with this stuff, would love to hear how you go about completing tasks of this nature.
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
My pirating skills seem to be rather weak this time, and I have not been able to get myself a decrypted ROM of Shadows of Valentia despite the fact that there are videos of people running the game on Citra on YouTube. If someone who does manage to get their hands on the ROM would like to check if the game uses the same RNG as teh previous 3DSFE games and FE12 (which I suspect is the case), the process is fairly straightforward. Open the game in Citra and plug Cheat Engine into the application. If you can find the 4 byte hex string "6c078965" (in big ending form, etc.) using the search function then that is pretty much confirmation that this is the case. I hope that someone who has access to the ROM will do this since its pretty low effort and will give us some good insight into RNG in the new game (important for speedrunners/LTC)
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
Something I've noticed across consoles: TASstudio "turbo seek" has trouble with soft resets and occasionally loading files for some reason.
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
Just a heads up, link is broken in the above post.
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
Damn. Is that still snes9x? Or was this made on BizHawk? Also how do you get nico videos to embed properly?
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
Good job! Awaiting temp encode before voting.
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
No.
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
As one might have guessed, the same phenomenon of uninitialized RAM being used to generate RNG occurs with Star Ocean (SNES); the addresses in question this time are 0xB8-0xB9
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
Apologies, I am dumb and accidentally hexed the boss fight onto the core of my movie incorrectly. Please replace the movie file with this submission which is 43 frames faster, bringing the total time down to 1:10.87. EDIT: Encode has been replaced.
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
Dang, how did you guys put so much work into a project and then not finish it off? In the meantime... improvements to the glitched category! Link to video
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
Octoshock randomly crashes (and occasionally when trying to save as well) when TAStudio is open. Does not give error message. Bizhawk 1.12.1
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
Omnigamer wrote:
I am neither an expert in the game nor have I...
Neither am I, to be honest. From what I'm aware, the version differences only account for a <3 second time save due to the title screen being shorter (actual gameplay is unaffected since the only dialogue occurs during the waiting period). Also note that the SDA run is fairly well optimized; the current speedrun.com WR is only 2 or 3 seconds faster than the run provided.
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
Just saw this thread, and suppose for documentation purposes we should add Tales of Phantasia to this list. It uses the uninitialized values at 0x83-0x84 to seed its RNG, and also appears to save the uninitialized value at 0x3c9 and use it for something (haven't checked what, it is at least not the primary RNG, but movies do desync if you hex that value at the beginning).
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
^ basically my thoughts (and vote) on this as well.
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
Quick test shows that RNG for this port is located and updated similarly to SNES version at addresses $800-$803 of IRAM. However, games starts burning RNs on title screen instead of after new game, and also the "pointer" address of the RNG appears to be missing (although its not like I actually tried that hard to look for it).
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
For what it's worth I took a look at this game's RNG the other day. Relevant addresses are $D0-$D4: $D1, $D2, $D3, $D4 increment every frame by 1, 3, 5, 7, respectively. $D0 is a pointer to which of those for bytes the next RN will come from. When RN is used pointer increases by one (or drops back down to zero), and extra RN burned from relevant counter. RNG does not start until after new game is selected. It is also apparent that the (U) version of the game may actually have less text (and thus be faster) than the JP version, as the latter is written solely in hiragana and has additional dialogue that was removed from the English version. I have not thoroughly tested this, however. EDIT: Also forgot to mention this, but steps since last encounter is at $1090. Whether or not you get into an encounter on a given step appears to be some weird function of $1090 and RNG. In particular, it takes RN value, bit shifts it some, uses that as index for some array in the system bus, and then yeah...
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
Why was this never submitted?
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
A temprorary solution to the above issue; whenever you want to make an edit that will cause TAStudio to go back to the start of the movie (and desync), first export to bk2, play the bk2 past the bootup phase of the movie, and then reimport into TAStudio. It is useful to disable automatic saving in TAStudio when doing this.
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
PikachuMan wrote:
The "New from current saveram" function doesn't work. As of now, we start recording from saveram, then open TAStudio.
I have tried that, but as soon as I edit the input in TAStudio, it wipes the SRAM clean (as in, if I playback the movie from the start, it does so from clean SRAM). This also happens if I edit the bk2 file. What's wrong?
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
According to natt, the sound effects from the game are too hardcore for bsnes to handle properly, hence the extreme lag variation that occurs on certain cutscenes. However, I've now narrowed down the initial RNG generation and luck manipulation that was different on lsnes/snes9x and bizhawk to the values of exactly two uninitialized memory addresses. Since these manipulations are 100% reproducible on console, it seems to me that this information can be used to reverse engineer the values of these RAM addresses on console at power on (for a given SNES model).
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
Interesting. Do those titles break on BizHawk's not 0x55?
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
So after extensive discussion on IRC, and some testing with a physical console, it turns out that even putting aside RAM initialization issues, the game is not being emulated correctly. There are apparently some issues (among other things) with the sound effects in this game that bsnes cannot emulate properly, and therefore I will (most likely) be discontinuing this project. Even if I were to continue, new realizations from disassembly means that some relatively significant route improvements can be made... so yeah. Hopefully we will eventually have emulators that run this game (and by extension, Star Ocean) properly... until then... time to try out some other JRPGs! Actually, after talking it through with some people, I've come to the following conclusion. Even though the run is not accurate, the strats I've been developing and the mechanics I have been discovering have been of considerable benefit to the RTA community. For that reason, I think I might continue the run, although I will not sustain the same level of optimization that I had previously intended to carry out. In particular, I will not go back and redo the early parts of the run with the new RNG improvement techniques I found, and I will skip incorporating the stutter step in catacombs.
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
But what is the "conservative route?" Taking one (or two) specific strings of RAM and declaring them to be the "legitimate ones" (even though we have no idea whether or not they are actually valid)?
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
My point exactly. We are giving arbitrary preference to some literally random configurations (which is what both BizHawk and lsnes do; there is no rationale that I can find behind setting everything to 0x55 either) without any good reason for it (as far as I can tell).
Post subject: Unitialized RAM values and games that use them
Experienced Forum User, Published Author, Active player (256)
Joined: 12/13/2016
Posts: 352
There was some discussion on the irc today about certain SNES JRPGs (like Tales of Phantasia) having different initial RNG configurations based on whether BizHawk or lsnes was used. After doing some digging, it turned out that the source of the discrepancy was that the game seeds its initial RNG state with values of the RAM prior to initialization. lsnes sets its uninitialized RAM to all 0x55s, while BizHawk apparently uses some fixed pseudorandomly generated RAM state. This brings up the question of what counts as a "proper," "valid," or "acceptable" initial WRAM configuration. I could not find any documentation on this topic so I thought that I would make a thread for people to discuss their philosophy with regard to this issue and perhaps even some actual data (if anyone has it)! After some contemplation, I justified the "legitimacy" of my BizHawk run to myself by arguing that since the random number generation only depends on two bytes, the entropy is low enough (65536 states) that it is possible for a snes to power on with the RNG seed that BizHawk generates for it. But that begs the question, why is it the case that adjusting the initial RAM values is not allowed by site rules? Why is the particular set of random values generated by BizHawk (which more likely than not do not correspond in any way to the values that a physical console would produce) preferred over some customized starting configuration? Just wondering what people's thoughts are on this matter.
1 2
8 9 10
14 15