| |||
Views: 88,481,827 |
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search | 04-25-24 01:08 PM |
|
Guest: Register | Login |
0 users currently in ROM Hacking | 2 guests |
Main - ROM Hacking - Working on a GB disassembler | New thread | New reply |
Dwedit |
| ||
Red Paratroopa Level: 30 Posts: 149/162 EXP: 163129 Next: 2740 Since: 03-07-07 From: Chicago Last post: 3517 days Last view: 1612 days |
I'm working on a Gameboy disassembler. I've already made a Z80 disassembler for the TI calculators, so converting it to GB shouldn't be too hard.
It will crawl all over the file to locate where the code is, and everything else is tagged as "data". It makes labels for all 16 bit values, whether jumped there or used as a 16 bit load. It will also let you rename the labels, and re-disassemble to use the new names. Any features you want to see in the program? ____________________ |
blackhole89 |
| ||
The Guardian Moloch whose eyes are a thousand blind windows! Level: 124 Posts: 2420/4196 EXP: 21531385 Next: 305216 Since: 02-19-07 From: Ithaca, NY, US Last post: 470 days Last view: 83 days |
|
Dwedit |
| ||
Red Paratroopa Level: 30 Posts: 150/162 EXP: 163129 Next: 2740 Since: 03-07-07 From: Chicago Last post: 3517 days Last view: 1612 days |
It follows jumps and calls, and interrupt vectors. ____________________ |
Kawa |
| ||
CHIKKN NI A BAAZZKIT!!! 80's Cheerilee is best pony Level: 138 Posts: 1748/5344 EXP: 30942631 Next: 720350 Since: 02-20-07 From: The Netherlands Last post: 4497 days Last view: 2632 days |
So... like IDA, then.
This should be interesting. ____________________ Wife make lunch - Shampoo Opera - give it a spin Spare some of your free time? <GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered Kawa rocks — byuu |
Raccoon Sam |
| ||
Cobrat Level: 56 Posts: 617/672 EXP: 1379926 Next: 18250 Since: 02-19-07 From: Hi Last post: 3467 days Last view: 2698 days |
Sounds very snazzy.
I'm also assuming you're going with wxWidgets with this one as well, which is a spark that might light the fire of cross-platform portability yet again. ____________________ |
Dwedit |
| ||
Red Paratroopa Level: 30 Posts: 151/162 EXP: 163129 Next: 2740 Since: 03-07-07 From: Chicago Last post: 3517 days Last view: 1612 days |
I've just noticed that Catrap performs indirect jumps by moving the stack pointer around, and returning.
That's gotta be really hard to add detection for that kind of thing to any disassembler. ____________________ |
RT-55J |
| ||
Armor Guardian Level: 81 Posts: 1115/1562 EXP: 4888847 Next: 104002 Since: 02-23-07 From: Wild Side Arcade Last post: 313 days Last view: 54 days |
Have you figured out how to deal with games that execute code from RAM, or is the GB unable of actually doing that? |
smkdan |
| ||
Ninji Level: 36 Posts: 210/238 EXP: 288628 Next: 19482 Since: 05-26-07 Last post: 4061 days Last view: 4011 days |
Posted by RT-55J there's no reason the GB can't do it, it's actually required to DMA sprite data if it's not in video memory (mostly it isn't). dwedit do you have any details of how comprehensive your code crawl is, i mean something as a common as a jump table i can't see being accountable unless it's a brilliant disassembler that can somehow make sense of the logic used to calculate the addresses used to jump to, or if the disassembler has some help from the user to tag the address tables (if that's what the game uses) and the locations of the code to jump to to disassemble. |
Dwedit |
| ||
Red Paratroopa Level: 30 Posts: 152/162 EXP: 163129 Next: 2740 Since: 03-07-07 From: Chicago Last post: 3517 days Last view: 1612 days |
Whenever the gameboy does sprite DMA, which is the way to get sprites into OAM (sprite memory), the CPU will only correctly execute code stored into high ram at FF80+ until the sprite DMA is complete. So games will always load some delay code into FF80.
Since it's all relative jumps inside, I don't think that little procedure which every game loads is worth automatically disassembling. Besides, you can always add it to the disassembly list for everything it misses. In general though, games don't often load code into ram. Right now, I just added support for simple jump tables (detected as long as they use RST 28, and code is sandwiched between there and the next label) ____________________ |
Main - ROM Hacking - Working on a GB disassembler | New thread | New reply |
© 2005-2023 Acmlm, blackhole89, Xkeeper et al. |
MySQL - queries: 62, rows: 90/91, time: 0.016 seconds. |