Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Super Mario World hacking: labmaster | 3 guests
Acmlm's Board - I2 Archive - Super Mario World hacking - SNES Reassembler!<_< | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Sukasa

Boomboom
Error 349857348734534: The system experienced an error.
Level: 57

Posts: 45/1981
EXP: 1446921
For next: 39007

Since: 02-06-05
From: *Shrug*

Since last post: 6 days
Last activity: 1 day
Posted on 02-10-05 08:48 PM Link | Quote
Hey!

I heard about all the talk about reassembling ROMs, And I remembered that I had downloaded a set of SNES game creation tools. One of them was a combination of a compiler and a linker that produces .FIG headerless SNES ROM images. It used to produce .SMCs, but because they were identified as .FIGs, the extesion was changed when outputting.

I'll post the program when I get home.

If someone could update the .bat file when I upload the .zip to use a goodSNES-like program to create a header for the ROM and rename it to xxxxxx.SMC,
I think that this set of programs could be used to modify the ASM without using a hex editor, which would make it easier for newbies and veterans alike!
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 3181/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 02-11-05 04:58 AM Link | Quote
Well the problem with that is you need to have a 100% disassembly before you can re-assemble it, at least after making any changes. That means no line numbers, it has to follow proper ASM syntax. Also, all jumps, calls, and pointers must be converted to labels instead of actual addresses, or else any changes will break it because they won't point to the right place anymore. Finally you'll need to locate every single piece of data and make sure it's stored as data in the ASM or external files rather than as code. It's a LOT of work.
blackhole89

LOLSEALS
Moderator of ROM hacking
EmuNET IRC network admin
Head GM of TwilightRO
Level: 47

Posts: 546/971
EXP: 739208
For next: 26995

Since: 03-15-04
From: Dresden/Germany

Since last post: 14 hours
Last activity: 12 hours
Posted on 02-11-05 08:58 PM Link | Quote
As far as I know there is no real difference between .SMC, .SFC and .FIG, and the extension only depends on which copier software was used and what console the former cartridge was for (SMC=Super MagiCom=US SNES, SFC=Super FamiCom=JAP SNES,FIG=dunno). Then again, I might be wrong. Fact is that far not all .SMC ROMs have a header, neither they must have one, as Evil Peer / Geiger has proven with Temporal Flux and his general crusade against ROM headers.


(edited by blackhole89 on 02-11-05 04:59 PM)
(edited by blackhole89 on 02-11-05 05:00 PM)
bbitmaster

Koopa
Level: 18

Posts: 68/103
EXP: 25264
For next: 4633

Since: 03-28-04
From: Knoxville, tTN

Since last post: 12 days
Last activity: 7 days
Posted on 02-11-05 09:15 PM Link | Quote
hyperhacker pretty much summed it up. You need two things before you can produce a working disassembly:
1. Some method of seperating code from data. This could be a tracing algorithm like what's in snowbro's NESrev, or it could be an external file produced by playing the game like FCEUXD's code/data logger

2. Some method of generating labels for every jump, branch, or data read. Most of these can be generated by the assembler itself, untill you run into indirect jumps and pointer tables. Also in the NES's case, you have bankswitching to worry about which mean's there is no way to know what bank might be swapped in when a particular jump is executed. To solve this, I invented something called an Address Label Logger, which logs every jump that leads to other banks, but I imagine that'd only be needed on the NES, since there is no bankswapping in the SNES.

Now I realize we're talking about SNES here, but these two concepts should be exactly the same. You must have code/data seperated, and you must have labels for everything.

So, In short, it can be done, just not perfectly without some human to fill in labels for any pointer tables.
Sukasa

Boomboom
Error 349857348734534: The system experienced an error.
Level: 57

Posts: 46/1981
EXP: 1446921
For next: 39007

Since: 02-06-05
From: *Shrug*

Since last post: 6 days
Last activity: 1 day
Posted on 02-12-05 12:43 AM Link | Quote
Hey!

Yes, but this is a Reassembler.

Still, you are correct. You would need a good disassembler for this, but this set fof tools is just for once you have all the jumps figured out. I'm no programmer, but for a disassembler, couldn't you set the program to read the different types of jumps and produce the right labels for them?

I know there are a lot of bumps in the road, but wasn't it the same with ILBPE? I guess with time people may be able to do that. I don't know myself.
FuSoYa
Defender of Relm
Level: 26

Posts: 148/255
EXP: 99529
For next: 2746

Since: 03-15-04
From: Moon

Since last post: 7 days
Last activity: 7 hours
Posted on 02-12-05 01:46 AM Link | Quote
Another issue with total reassembly is that if you rely on fixed location utilities or tools (like LM), you have to be careful when making changes to the code. If the rest of the code/data in the bank gets shifted, it can make the ROM incompatible with your editors.

Which is partly why I don't consider reassembling entire SNES ROMs to be very practical... not for anything I do, anyway. I don't do the bulk of my ASM coding in a hex editor as it is. Sure, I'll use a hex editor if I want to adjust something or put in a quick jump to my own code. But if I need to see the original ROM's code or do a minor edit, I'll run a trace or fire up SPASM. And for doing more moderate to heavy work (or hacks I want documented for future reference), I just open up a text editor and code whatever I want, then run only that code through an assembler.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 3213/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 02-12-05 05:44 AM Link | Quote
Originally posted by Darkflight
Hey!

Yes, but this is a Reassembler.

Still, you are correct. You would need a good disassembler for this, but this set fof tools is just for once you have all the jumps figured out.

So... it's just an ordinary SNES assembler then? Once you've disassembled it to that point, it's essentially a re-creation of the game's source code which you could use in any assembler.


I'm no programmer, but for a disassembler, couldn't you set the program to read the different types of jumps and produce the right labels for them?

It's possible to some extent, but it wouldn't be able to make proper labels, just numbers. You'd need a human to go through the code and figure out what does what to make real labels.
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Super Mario World hacking - SNES Reassembler!<_< | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.045 seconds.