Sonic and Sega Retro Message Board: Planning to hack Sonic 1? - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

Planning to hack Sonic 1? UPDATE #2: "stitch.exe" - unsplitting split disassemblies

#16 User is offline Mercury 

Posted 30 January 2011 - 02:03 PM

  • His Name Is Sonic
  • Posts: 1710
  • Joined: 13-November 08
  • Gender:Not Telling
  • Location:Location Location
  • Project:AeStHete
  • Wiki edits:130
The whole point of my opening post was that you can easily find the routines and offsets using the list files because it seems like no one's ever going to get around to putting them in as comments.

Heck, I don't want to do it, I can't blame anyone else for not doing it.

QUOTE (Andlabs @ Jan 29 2011, 05:25 PM)
Finally, and this is for Mercury: before you make that sonic.lst, make sure you fix all the zero offset "forced optimizations". I just tried the current svn build myself, and it doesn't match the final ROM because lines like
CODE
move.w #4,0(d0)
get optimized to
CODE
move.w #4,(d0)
which has a completely different encoding when assembled. (This happens because the 0 might be a macro in the original source code — and watch, it might be a macro now.)

Noted. I will be sure to do that.

#17 User is offline Andlabs 

Posted 30 January 2011 - 04:58 PM

  • 「いっきまーす」
  • Posts: 2175
  • Joined: 11-July 08
  • Gender:Male
  • Project:Writing my own MD/Genesis sound driver :D
  • Wiki edits:7,061
Here's an open question: what's better, Obj45_938FA: or Rings_SpreadAbout:? If anything, the new labeling system only makes things easier, meaning all that needs to be done is update the guides that already exist.

The only real problem with the svn is getting the disassembly — the websvn tarball feature seems to be disabled for some reason... It could probably be just instructions on a wiki page or some bot-maintained archive mirror on the wiki.

And as for people who are already using the 2005 disassembly, they most likely have everything done by now... and if not, the project is most likely still in early enough stages to warrant moving to the SVN one.

#18 User is offline Selbi 

Posted 30 January 2011 - 07:12 PM

  • Tief.Tiefer
  • Posts: 1402
  • Joined: 12-May 08
  • Gender:Male
  • Location:Northern Germany
  • Project:Sonic ERaZor
  • Wiki edits:320
QUOTE (Andlabs @ Jan 30 2011, 10:58 PM)
Here's an open question: what's better, Obj45_938FA: or Rings_SpreadAbout:? If anything, the new labeling system only makes things easier, meaning all that needs to be done is update the guides that already exist.

My problem is, that I'm already used to the 2005 disassembly. Sure, the new labels make a lot more sense and mainly make things easier, but when I type in a loc_XXXX routine I know by hard, I expect to land where I want, instead of getting the "not found" error. This is also why I'd add the old labels in comment format (as said in my last post).

The problem about the SVN disassembly is that it's only a good choice if you are a new user to the hacking scene. It's not switching-friendly, not at all. I once tried using the SVN disassembly when I was making a new project. It failed because of all the reasons I said in my posts in this topic.

#19 User is offline Mercury 

Posted 07 February 2011 - 02:16 PM

  • His Name Is Sonic
  • Posts: 1710
  • Joined: 13-November 08
  • Gender:Not Telling
  • Location:Location Location
  • Project:AeStHete
  • Wiki edits:130
So I made this equivalency list of labels. This should supersede what I said in the opening post about scouring .lst files - you can just use this.

I think it should be added to the Wiki, but I'm not sure where it should it go.

Stay tuned because I've things planned that will address the other complaints with the SVN disassembly as well. Honestly, everyone should use it - or at least have the option more easily available.

Labels

Variables and Constants

(These are raw text files, so you can click on them and they should open in your browser.)


#20 User is offline Aquaslash 

Posted 07 February 2011 - 06:49 PM

  • Super Mega
  • Posts: 2793
  • Joined: 17-November 04
  • Gender:Male
  • Location:Hampton, VA
  • Project:The S Factor: Sonia and Silver
  • Wiki edits:1,144
The only problem I have with the new SVN is that the Sonic object is broken into dozens of parts. This is a problem when you want to add another character by cloning the Sonic object. Anywho, I'm sure excellent progress will be made here

#21 User is offline Mercury 

Posted 15 February 2011 - 05:02 AM

  • His Name Is Sonic
  • Posts: 1710
  • Joined: 13-November 08
  • Gender:Not Telling
  • Location:Location Location
  • Project:AeStHete
  • Wiki edits:130
C'mon guys, this is a complete equivalency list that would have taken somebody a lot of work to do manually... no love? *sniffle*

QUOTE (Aquaslash @ Feb 8 2011, 12:49 AM)
The only problem I have with the new SVN is that the Sonic object is broken into dozens of parts. This is a problem when you want to add another character by cloning the Sonic object. Anywho, I'm sure excellent progress will be made here

You lucky ladies and gents are in... well, luck, in this regard because of this:

stitch.exe

(source)

It's a program that will stitch together your asm files into one long one. (It's written in Game Maker so I could hastily throw it together, but I'm working on a C++ version which will be smaller and more portable. It's just that I have very little experience with C++'s string library, so it's not done yet.)

Anyway, here's how to use it:

Pop it in the directory with your main asm file (which I'm assuming around here will be called "sonic.asm") and make a text file in the same directory called "stitch.bat" with this in it:

CODE
stitch "sonic.asm" "output.asm" "blacklist.txt"

"output.asm" is the name of the outputted (is that a word?) asm file that will have every "include" line of the original replaced with the contents of the files to be included. (The original "include" line will be preserved as a comment, so you can still identify the code by filename, and at the end of each include is an "end" tag to keep them delimited properly. Also, it's able to go more than 1 level deep, so if an included file includes another file while includes another file, etc, it will still work (but I wouldn't go overboard with this, if I were you, because GM can only open 32 files simultaneously).)

"blacklist.txt" is an optional parameter. It's the name of a text file that you can fill with strings that, if found in the filename to be included, will prevent that file from being included, like so:

CODE
_maps\
_anim\
Nemesis Decompression

That way you can include just what you want in the output file and not everything.

I put this together in my spare time, and as with everything else I've been uploading lately it seems, it'll probably have a bug or two. But I did test it, and was able to build a byte-accurate ROM using the file it exported, so...

Give it a try! I hope it'll cut down on the whining about the SVN disasm. =P


#22 User is offline Alriightyman 

Posted 16 February 2011 - 10:11 AM

  • !!!!!!!!!!!!!!!!!
  • Posts: 350
  • Joined: 27-November 07
  • Gender:Male
  • Location:Largo, Fl
  • Project:0101001101101111011011100110100101100011 00000010: 0101001100000011 01000101011001000110100101110100011010010110111101101110
  • Wiki edits:5
That could come in handy. The only thing I found annoying with the split was sonic being split into pieces.
Otherwise I like its format for the most part.

  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users