| |||
Views: 88,487,075 |
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search | 04-26-24 11:21 AM |
|
Guest: Register | Login |
0 users currently in ROM Hacking | 6 guests |
Main - ROM Hacking - New to ASM hacking. Halp! | New thread | New reply |
ggabriel |
| ||
Newcomer Level: 5 Posts: 1/3 EXP: 383 Next: 146 Since: 06-11-09 Last post: 5431 days Last view: 5430 days |
Okay, I am not completely unfamiliar with computer programming, but I know pretty much jack all about working with assembly language. I'm trying to figure out some things in Ogre Battle for SNES so I ran it through TRaCER and started poking around in the disassembled output mostly at random. I've found a few useful bits so far and although I'm slow as heck deciphering this stuff I'm looking at some code that looks like it might be some of the stuff I'm looking for.
The problem is that I keep seeing lots of JSR $1199 commands everywhere, but from my meager understanding of SNES memory this is in LoROM mode and everything should be in $8000-$FFFF of each bank, so all these JSR $1199 are too much for my fragile mind to comprehend. What do they mean?! Are aliens trying to communicate with me through an ASM dump of Ogre Battle? Do these sinister glyphs possibly foretell the return of the Great Old Ones from beyond space and time? Help! (Doh, just realized I had posted this in the wrong forum, sorry; I was browsing this at the same time as the general ROM Hacking forum and put the thread in the wrong one.) |
MathOnNapkins |
| ||
Super Koopa Level: 62 Posts: 671/842 EXP: 1935512 Next: 49174 Since: 02-19-07 From: durff Last post: 4488 days Last view: 4011 days |
Perhaps you could post more of the trace log to have some proper context?
Also, if it is in fact LoROM, don't forget that it's possible to execute code from the work RAM (WRAM), that is, bank $7E and bank $7F. Execution of code in RAM is not unknown among SNES games. FFVI in particular I know uses it. ____________________ Zelda Hacking Forum hobbies: delectatio morosa |
ggabriel |
| ||
Newcomer Level: 5 Posts: 2/3 EXP: 383 Next: 146 Since: 06-11-09 Last post: 5431 days Last view: 5430 days |
Basically I'm looking through a long list of this:
and so on. There's a big list of CMP branches like this. The first two instructions are easy enough: look at the accumulator and if it doesn't equal 9B then skip ahead 8 bytes to $9C1B, check to see if it equals 9C and if not skip ahead, and so on down the line. When it does equal 9B, though, that's where I get lost. I can follow the BNE to $9C1B, but where does a JSR to $1199 even go? The disassembled code only covers $8000-$FFFF of each bank and from what I've read that's all that it's supposed to cover. Looking at the rest of that section it looks like it might be possible the disassembler misinterpreted something as I've got no idea what that SBC is supposed to accomplish and I'm kind of suspicious about that FF, but I've got no clue what it could possibly mean instead. It could be that this whole section is off-kilter, but the general structure is one that makes sense--the values I'm seeing in these CMPs correspond to the values I would expect it to be checking against (they all correspond to usable items, and before this series of CMPs it loads the accumulator with a memory byte corresponding to the item type held in a given slot). |
Cellar Dweller |
| ||
Snifit Level: 39 Posts: 160/287 EXP: 385187 Next: 19584 Since: 02-19-07 From: Arkansas Last post: 4052 days Last view: 3219 days |
At some point after the game was started, the instructions must have been put into RAM. If you use an emulator with a debugger, you may be able to use breakpoints to either break when that address($091199) is called, or when that address is written to. In the former case you can disassemble the subroutine at that address, and in the latter case you can locate the code that puts the subroutine into RAM. |
ggabriel |
| ||
Newcomer Level: 5 Posts: 3/3 EXP: 383 Next: 146 Since: 06-11-09 Last post: 5431 days Last view: 5430 days |
Makes sense I guess. Thanks! |
Main - ROM Hacking - New to ASM hacking. Halp! | New thread | New reply |
© 2005-2023 Acmlm, blackhole89, Xkeeper et al. |
MySQL - queries: 57, rows: 81/82, time: 0.016 seconds. |