Sonic and Sega Retro Message Board: Sonic 2 Split Disassembly - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 8 Pages +
  • ◄ First
  • 6
  • 7
  • 8
    Locked
    Locked Forum

Sonic 2 Split Disassembly

#106 User is offline MainMemory 

Posted 04 May 2013 - 12:52 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 4203
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
So, I've just made some modifications to the disassembly that would give users the option to use macros for the title card mappings, allowing them to simply type the level's name as a string.
However, these macros cannot exactly duplicate the original mappings, and it makes editing other parts of the mappings a bit difficult, so I thought I would get your opinions before I commit it.
Here's a diff file for the latest revision b33615dd25a9 of the disassembly.
Just to be clear, the original mappings are still there, and are enabled by default, so chkbitperfect.bat still returns no differences.

Edit: should mention it requires SpritePiece.asm from the MapMacros branch in order to build.
This post has been edited by MainMemory: 04 May 2013 - 01:05 PM

#107 User is offline Caverns 4 

Posted 07 May 2013 - 01:05 PM

  • Posts: 338
  • Joined: 07-December 12
  • Gender:Male
  • Project:Sanik Quest: Journey To The Right
As long as the original mappings are allowed to be used I don't see a problem with it.

Though there is one part that bothers me.

Quote

However, these macros cannot exactly duplicate the original mappings, and it makes editing other parts of the mappings a bit difficult, so I thought I would get your opinions before I commit it.


Can we see a comparison image of the original and the Macro version? depending on how that impacts the appearance, I may well be against it.

#108 User is offline MainMemory 

Posted 08 May 2013 - 03:40 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 4203
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
Posted ImagePosted Image

#109 User is offline MoDule 

Posted 09 May 2013 - 11:37 AM

  • Posts: 308
  • Joined: 03-October 07
  • Gender:Male
  • Project:Procrastinating from writing bug-fix guides
  • Wiki edits:52
I'm not sure if it's in line with the project's philosophy to include something that can make the build non-bit-perfect, even if it's optional. I could be wrong, though.
The feature does sound useful, so why not turn it into a guide, instead?

#110 User is offline MainMemory 

Posted 09 May 2013 - 01:14 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 4203
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
At that point, I might as well just keep pointing people to Sonic 2 Text Code Generator.

#111 User is offline Caverns 4 

Posted 13 May 2013 - 12:19 PM

  • Posts: 338
  • Joined: 07-December 12
  • Gender:Male
  • Project:Sanik Quest: Journey To The Right

View PostMainMemory, on 09 May 2013 - 01:14 PM, said:

At that point, I might as well just keep pointing people to Sonic 2 Text Code Generator.


I dunno, I actually think it looks alright; the alignment issue isn't that bad. Maybe it could be tweaked slightly to fix it? Either way, I think it's fine, I'd use it.

While the end result isn't "bit perfect" to Sonic 2, neither is a complete hack, and that's what this ASM is geared to, hacking.

#112 User is offline KingofHarts 

Posted 13 May 2013 - 01:23 PM

  • Posts: 1610
  • Joined: 07-August 10
  • Gender:Male
  • Project:Project Sonic 8x16
  • Wiki edits:1

View PostCaverns 4, on 13 May 2013 - 12:19 PM, said:

While the end result isn't "bit perfect" to Sonic 2, neither is a complete hack, and that's what this ASM is geared to, hacking.


That is well and good, but one of the main goals towards this ASM is also retaining a bit-perfect build.

#113 User is offline MainMemory 

Posted 13 May 2013 - 03:19 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 4203
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
There are already options in the disassembly that aren't bit-perfect: optimizing 0(aN) to (aN), extending the water table to encompass all zones, disabling the checksum check...

#114 User is offline MoDule 

Posted 13 May 2013 - 06:03 PM

  • Posts: 308
  • Joined: 03-October 07
  • Gender:Male
  • Project:Procrastinating from writing bug-fix guides
  • Wiki edits:52
Oh, I forgot about that. In that case, I'd say, go for it.

#115 User is offline KingofHarts 

Posted 14 May 2013 - 12:58 AM

  • Posts: 1610
  • Joined: 07-August 10
  • Gender:Male
  • Project:Project Sonic 8x16
  • Wiki edits:1
Then there should be no issue with making your macro an optional addition, then. I suppose?
I'd personally prefer to use something like this over the original method...
This post has been edited by KingofHarts: 14 May 2013 - 12:59 AM

#116 User is offline Aerosol 

Posted 14 May 2013 - 10:29 PM

  • FML and FU2
  • Posts: 10017
  • Joined: 27-April 08
  • Gender:Male
  • Location:Not where I want to be.
  • Project:Sonic (?): Coming summer of 2055...?
How hard would the mappings be to tweak afterwards, anyhow?

#117 User is offline Clownacy 

Posted 07 August 2015 - 09:46 AM

  • Posts: 718
  • Joined: 06-July 13
  • Gender:Not Telling
Since I've already merged REV00 and REV02 into the disassembly, should I look into merging Knuckles in Sonic 2?

Personally, I'm leaning less towards a toggle, like REV00/REV02, and more towards a branch, if only because of how major KiS2's changes are (the removal of just about all art, switching to S3K's mapping format, Knuckles). I'd rather it not be in a separate repository, so it can still be synced with S2 (though, I might be misunderstanding how Git works, here).

I would still like a way to point out the differences from S2REV02, for the sake of documentation, maybe through comments containing a keyword like 'KiS2'.

The disasm may also need some prominent labelling, to point out that it only produces the UPMEM, so people don't get confused and complain about the lack of SonLVL/SonED2 files, or that the assembled file doesn't work in emulators... though, I suppose a batch/python script can be provided along with S2+S&K's ROMs, which would build into an actual working copy of KiS2.

Anyway, thoughts?

#118 User is offline MainMemory 

Posted 07 August 2015 - 10:33 AM

  • Every day's the same old thing... Same place, different day...
  • Posts: 4203
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
How would you handle things like reshuffled code and variables (remember, the level select flag in S2 is the demo flag in KiS2)? I wouldn't necessarily be opposed to adding some of the modifications KiS2 has into the disassembly as options, but I don't know if you can make a disassembly that can build S2 or KiS2 and have it make any sense to look at.

#119 User is offline Clownacy 

Posted 07 August 2015 - 10:58 AM

  • Posts: 718
  • Joined: 06-July 13
  • Gender:Not Telling
That's why I'd prefer a branch, so one can be 'just S2', while the other is 'just KiS2'. Shuffling the RAM for S2REV02 while making it toggleable was an ugly mess I'd rather avoid getting into again.

#120 User is offline Clownacy 

Posted 17 August 2015 - 04:09 PM

  • Posts: 718
  • Joined: 06-July 13
  • Gender:Not Telling
Speaking of shuffling RAM...

I compared Sonic Classics' version of S1 to the usual S1 REV00, and I think it's safe to say there are some properties of Classics we can safely set apart from S2REV02. First up, Classics' S1 has no checksum code, its RAM is arranged differently, and it writes 'SEGA' to FFFFFFE4. The copy of S2 in Classics does all of this, too. I'm thinking of removing these from gameRevision 2, to get as accurate a version of S2REV02 as possible. On a similar note, ErrorTrap is different in Classics:

   if gameRevision<2
ErrorTrap:
	nop
	nop
	bra.s	ErrorTrap
    else ; REV02
ErrorTrap:
	bra.s	ErrorTrap
	nop
	bra.s	ErrorTrap
    endif


I don't think this was a part of S2REV02; I'm certain S3 was based on S2REV02 (it has the JmpTos removed), and it uses the old ErrorTrap. Based on that, I'm thinking of giving this one the sack as well.

I think I might start crossposting these as issues on GitHub.
This post has been edited by Clownacy: 17 August 2015 - 08:10 PM

  • 8 Pages +
  • ◄ First
  • 6
  • 7
  • 8
    Locked
    Locked Forum

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