Sonic and Sega Retro Message Board: S2 Disassembly 2007 - Sonic and Sega Retro Message Board

Jump to content

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

S2 Disassembly 2007

#1 User is offline Xenowhirl 

  Posted 28 September 2007 - 05:35 AM

  • Posts: 175
  • Joined: 26-November 06
  • Gender:Male
  • Wiki edits:30
That's right, here's a new Sonic 2 disassembly: s2dasm2007.zip

The steps to build it are: Take a final sonic 2 rom from somewhere, name it s2.bin, stick it in the directory with split.bat and run that, then run build.bat. You don't have to download AS (that's included this time). The main file to edit is called s2.asm.

Bullet points:
- Unmodified, it assembles to be perfectly identical to Sonic 2 final, even with the unchanged (source) version of AS like the one I included, and it assembles fairly fast (1-5 seconds depending on the computer).
- The Z80 sound driver is disassembled and integrated into the build process such that it gets assembled and compressed into the rom when you build. It uses labels from the 68k code to choose the correct pointers to use and banks to switch to, so you don't have to worry about breaking the sound by adding unrelated stuff anymore.
- I identified more objects and addresses, split more things to file like the sprite mappings, added lots of comments, named some labels, added more equates, fixed disassembly mistakes here and there, etc. etc. just look at it already.

Extra downloads (the above download is needed first in any case):
Linux build tools
Mac build tools
s2.asm split into many little included asm files

Enjoy.

Thanks to shobiz for reviewing my changes and providing invaluable feedback and numerous suggestions, Puto for compiling the build tools for Linux and Mac and giving some suggestions, Tweaker for recommending I use Hivebrain's terminology and answering some questions that helped a little, Varion Icaria for answering some questions and showing me some labels, Hivebrain for his 2005 S1 disassembly, everyone behind the Sonic 2 articles on SCHG, everyone that contributed to Kens, and Nemesis and Aurochs and everyone who made the previous S2 disassembly possible.
This post has been edited by Xenowhirl: 28 September 2007 - 10:54 AM

#2 User is offline shobiz 

Posted 28 September 2007 - 06:43 AM

  • Posts: 863
  • Joined: 27-March 05
  • Gender:Male
  • Location:Karachi, Pakistan
  • Wiki edits:4,411
As I've said many times before, this is absolutely brilliant. The extra labeling and commenting makes the code a hell lot clearer, adding equates for SST values (and a lot of RAM values) was an excellent idea, and of course the numerous simplifying macros added make the code a lot cleaner (especially creditText, rom_ptr_z80 and levartptrs)

#3 User is offline Chimpo 

Posted 28 September 2007 - 03:58 PM

  • Posts: 7172
  • Joined: 26-July 06
  • Gender:Not Telling
Xenowhirl

I love you man.

No seriously, this pretty much confirms my decision to switch from S1 to S2 since I found the other disassemblies to be confusing as fuck. Fucking awesome.
This post has been edited by Chimpo: 28 September 2007 - 04:04 PM

#4 User is offline Puto 

Posted 02 October 2007 - 07:33 PM

  • Shin'ichi Kudō, detective.
  • Posts: 2007
  • Joined: 31-July 05
  • Gender:Male
  • Location:Portugal, Oeiras
  • Project:Part of Team Megamix, but haven't done any actual work in ages.
  • Wiki edits:51
For the hell of it, here's the Win64 build tools. It seems to crash when "phase" is used though, so you'll have to change this to use pre-assembled Z80 init code if you use them, and there's not much of an advantage, if any, of using 64-bit tools vs the normal 32-bit ones. Still, it's here in case anyone is interested.

#5 User is offline Sonic Hachelle-Bee 

Posted 04 October 2007 - 12:01 PM

  • Lost in Wood zone
  • Posts: 716
  • Joined: 03-March 04
  • Gender:Male
  • Location:Paris, France
  • Project:Sonic 2 Long Version
I'm using it starting now. Excellent work!

#6 User is offline Dracula 

Posted 08 October 2007 - 02:34 PM

  • Posts: 590
  • Joined: 03-March 03
  • Gender:Male
  • Location:I'm watching you!
  • Project:Learning NES 6502 and hacking NES ROMs.
  • Wiki edits:12
Awesome work! Makes me wanna hack again.

#7 User is offline Bibin 

  Posted 27 October 2007 - 08:32 PM

  • DON'T LET THE SUN LAUGH AT YOU.
  • Posts: 881
  • Joined: 05-January 07
  • Gender:Male
  • Location:New York City
  • Project:Ghost in the Machine
Hmm, something's not right, I split Sonic the Hedgehog 2 (W) (REV00).bin, renamed to s2.bin of course, and it gets to the sega screen, and 3 frames in it crashes and makes a strange little blip. The area all around the sega logo is blue also, and the sega logo is visible from the start.

EDIT: Got it, I used REV001.
This post has been edited by Bibin: 27 October 2007 - 08:41 PM

#8 User is offline SoullessSentinel 

Posted 16 December 2007 - 05:28 AM

  • Posts: 243
  • Joined: 01-October 05
  • Gender:Male
  • Location:Grimsby, England
  • Project:Sonic 1 32X Remix
I can't get this to build on my Kubuntu Linux 7.10 setup
./build.sh ends with the following output

Quote

PROT_EXEC|PROT_WRITE failed.

The same happens when I directly run ./asl from the linux folder

Also when using a self compiled version of as from sources, I get the following:

Quote

macro assembler 1.41r5
C-Version
© 1992,1997 Alfred Arnold
TMS320C2x-Generator © 1994/96 Thomas Sailer
TMS320C5x-Generator © 1995/96 Thomas Sailer

assembling s2.asm
PASS 1
: error : error in writing listing
> > > Not a typewriter
fatal error, assembly terminated


Any help would be appreciated.

#9 User is offline Puto 

Posted 16 December 2007 - 08:31 AM

  • Shin'ichi Kudō, detective.
  • Posts: 2007
  • Joined: 31-July 05
  • Gender:Male
  • Location:Portugal, Oeiras
  • Project:Part of Team Megamix, but haven't done any actual work in ages.
  • Wiki edits:51
PROT_EXEC|PROT_WRITE? Have you tried chmodding the entire source dir to 755 or 777 or something?

#10 User is offline SoullessSentinel 

Posted 16 December 2007 - 09:27 AM

  • Posts: 243
  • Joined: 01-October 05
  • Gender:Male
  • Location:Grimsby, England
  • Project:Sonic 1 32X Remix
chmodding seems to have no effect.
I assume its a problem with the asl executable because all the other binaries in the ./linux folder run.

Edit:
Fixed,
I compiled asl from the latest source snapshot instead of the stable release.

here is the working asl build in case anyone else experiences this problem.
MegaUpload
This post has been edited by lukeusher123: 16 December 2007 - 10:01 AM

#11 User is offline Quickman 

Posted 03 April 2008 - 10:58 PM

  • Posts: 5584
  • Joined: 03-December 03
  • Gender:Male
  • Location::x
  • Project:omg porjcet
  • Wiki edits:10
For anyone else using the Linux build tools: you need to escape the space in the folder name "mappings/special stage" in s2.txt - just replace line 12 with this.
#dir	"mappings/special stage"
Afterthought: this might also work, though I haven't tried it.
#dir	mappings/special\ stage
(Note that I use a four-space tab; you should too, but if you care about neatness replace the four spaces in my example with a tab character.)
This post has been edited by Quickman: 03 April 2008 - 11:00 PM

#12 User is offline Flygon 

Posted 08 May 2008 - 12:43 AM

  • Dem Melons
  • Posts: 2448
  • Joined: 10-February 06
  • Gender:Not Telling
  • Location:Victoria, Australia
  • Project:Pending
  • Wiki edits:10
Excuse me, does anyone know where I can get the project files for this Disasm?

#13 User is offline Irixion 

Posted 08 May 2008 - 01:24 AM

  • Posts: 1414
  • Joined: 30-December 04
  • Gender:Male
  • Location:Ontario, Canada
  • Project:Life
  • Wiki edits:152
Get it on the dissasemblies wiki page, there should be another download there, or one that includes them.

#14 User is offline Flygon 

Posted 08 May 2008 - 01:56 AM

  • Dem Melons
  • Posts: 2448
  • Joined: 10-February 06
  • Gender:Not Telling
  • Location:Victoria, Australia
  • Project:Pending
  • Wiki edits:10
Thanks, I found it.

It took me a while but I found it.

#15 User is offline Spanner 

Posted 08 May 2008 - 10:04 AM

  • Not much I can do on here nowadays...
  • Posts: 2873
  • Joined: 02-June 07
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic the Hedgehog Hacking Contest, Other Stuff
  • Wiki edits:2,193

View Postflygon, on May 8 2008, 06:43 AM, said:

Excuse me, does anyone know where I can get the project files for this Disasm?

Um...they are included with the disassembly in the "soned2proj" zipped folder.

  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

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