SonLVL

Discussion in 'Engineering & Reverse Engineering' started by MainMemory, Feb 7, 2011.

  1. Relick

    Relick

    Member
    197
    0
    0
    England
    C++/DX10 Engine (not sonic related)
    I'm horribly looking forward to the S3K one, however I reckon a complete disassembly is going to be needed first. :P (Unless there is one. In which case I'm slooooow.)
     
  2. Azu

    Azu

    I must be stupid. Member
    There is a Sonic and Knuckles disassembly , but I don't know of a complete one.
     
  3. MainMemory

    MainMemory

    Every day's the same old thing... Same place, diff Tech Member
    4,287
    2
    18
    SonLVL
    Beta 4 is here:
    <ul><li> Added object definitions for Casino Night.</li><li> Added support for CNZ's special bumpers.</li><li> Added support for Sonic 1.</li></ul>
    <img src="http://i764.photobucket.com/albums/xx282/sonicmike2/S1LVLcomplete.png" border="0" class="linked-image" />
    INI files for the 2005 disassembly can be found with the download, SVN version, on the SVN in the Sonic 1 Split Disassembly folder. However, due to the large number of differences between the two disassemblies, I don't think I'll be able to continue supporting both disassemblies. It took about as long to make the 2005 INIs as the originals.

    You'll also notice that in Sonic 1, rings only show up as one sprite, and give no information related to subtype. I have an idea to fix this and other objects that don't display properly, by having C# code files (.cs) for each object, but this would make the properties a bit more difficult to edit for people that don't know C# (which I'm assuming is most of you). And it would increase load time a bit, compiling all the files. But it's pretty much that, or live with the limits the system has now.

    As for S3K, I have access to a private disassembly :ssh:
     
  4. Skeledroid

    Skeledroid

    Member
    227
    0
    0
    Best new app beside the Special Stage editor, fo sho.
     
  5. MainMemory

    MainMemory

    Every day's the same old thing... Same place, diff Tech Member
    4,287
    2
    18
    SonLVL
    Rewriting the object definitions so that they can control how they draw (to fix S1 rings, EHZ bridge, etc), I've also made it possible for objects to define custom properties:
    <img src="http://i764.photobucket.com/albums/xx282/sonicmike2/objprop.png" border="0" class="linked-image" />
     
  6. FeliciaVal

    FeliciaVal

    Member
    690
    0
    0
    Spain
    looks nice so far. Too bad I tried to open up the S1 level editor and it crashed :(
     
  7. MainMemory

    MainMemory

    Every day's the same old thing... Same place, diff Tech Member
    4,287
    2
    18
    SonLVL
    Did it pop up a message box, or just crash? If it did, what did it say?
     
  8. FeliciaVal

    FeliciaVal

    Member
    690
    0
    0
    Spain
    <!--quoteo(post=561890:date=Feb 23 2011, 02:20 PM:name=MainMemory)--><div class='quotetop'>QUOTE (MainMemory @ Feb 23 2011, 02:20 PM) <a href="index.php?act=findpost&pid=561890"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->Did it pop up a message box, or just crash? If it did, what did it say?<!--QuoteEnd--></div><!--QuoteEEnd-->
    popped up a message box.
    I can't remember the message, but I remember it was caused when I tried to remove or add a new chunk
     
  9. MainMemory

    MainMemory

    Every day's the same old thing... Same place, diff Tech Member
    4,287
    2
    18
    SonLVL
    You can't add or remove chunks in S2LVL...
     
  10. FeliciaVal

    FeliciaVal

    Member
    690
    0
    0
    Spain
    ow no idea then...I just remember clicking on some chunk and then the message appeared. Ill try looking at it again soon
     
  11. sonicblur

    sonicblur

    Oldbie
    1,295
    0
    16
    Here is a <b>very</b> <a href="http://www.sappharad.com/junk/S2LVLb4_osx_crap.zip" target="_blank">experimental Mac OS X port</a> if anyone wants it. (Requires OS 10.6 or higher)
    <img src="http://www.sappharad.com/junk/s2lvl_osx.png" border="0" class="linked-image" />
    You can load data, but you can't save. (I've only re-written the decompression parts of the Windows COM DLL's into .NET, not the compression parts yet.) Fairly useless, but you can use it to export level maps at least. It's also very unstable.

    This was mostly an experiment to see how quickly I could decompile someone else's code and get it to build again. (About 2 hours, minus the effort to rewrite the decompression routines from the DLL's) If there is any interest, I can continue working on this port until it's usable. Or I can at least provide native .NET (de)compression DLL's if MM wants them, so that it would be possible to make it work anywhere Mono can run.
     
  12. theocas

    theocas

    Tech Member
    346
    0
    0
    <!--quoteo(post=562164:date=Feb 23 2011, 09:54 PM:name=sonicblur)--><div class='quotetop'>QUOTE (sonicblur @ Feb 23 2011, 09:54 PM) <a href="index.php?act=findpost&pid=562164"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->Here is a <b>very</b> <a href="http://www.sappharad.com/junk/S2LVLb4_osx_crap.zip" target="_blank">experimental Mac OS X port</a> if anyone wants it. (Requires OS 10.6 or higher)
    <img src="http://www.sappharad.com/junk/s2lvl_osx.png" border="0" class="linked-image" />
    You can load data, but you can't save. (I've only re-written the decompression parts of the Windows COM DLL's into .NET, not the compression parts yet.) Fairly useless, but you can use it to export level maps at least. It's also very unstable.

    This was mostly an experiment to see how quickly I could decompile someone else's code and get it to build again. (About 2 hours, minus the effort to rewrite the decompression routines from the DLL's) If there is any interest, I can continue working on this port until it's usable. Or I can at least provide native .NET (de)compression DLL's if MM wants them, so that it would be possible to make it work anywhere Mono can run.<!--QuoteEnd--></div><!--QuoteEEnd-->
    *flails arms*
    Mac ports make me feel happy. I must try and report back. *teleports off with a copy of the programme*

    INB4 .NET
     
  13. MainMemory

    MainMemory

    Every day's the same old thing... Same place, diff Tech Member
    4,287
    2
    18
    SonLVL
    FraGag is working on porting Flamewing's C++ port of KENS to C# after I failed to do so (KENSSharp on the SVN). I've always intended to have it cross-platform.
     
  14. flamewing

    flamewing

    Emerald Hunter Tech Member
    1,138
    0
    16
    France
    Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
    <!--quoteo(post=562240:date=Feb 24 2011, 12:21 PM:name=MainMemory)--><div class='quotetop'>QUOTE (MainMemory @ Feb 24 2011, 12:21 PM) <a href="index.php?act=findpost&pid=562240"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->FraGag is working on porting Flamewing's C++ port of KENS to C# after I failed to do so (KENSSharp on the SVN). I've always intended to have it cross-platform.<!--QuoteEnd--></div><!--QuoteEEnd-->
    FYI, I found a small bug in my Nemesis decompressor for the case of mode 1 decompression. I still haven't updated SVN with it, but the changes are as follows:
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Index: src/lib/nemesis.cc
    ===================================================================
    --- src/lib/nemesis.cc&nbsp;&nbsp;&nbsp;&nbsp;(revision 28)
    +++ src/lib/nemesis.cc&nbsp;&nbsp;&nbsp;&nbsp;(working copy)
    @@ -406,13 +406,11 @@
    &nbsp;&nbsp;&nbsp;&nbsp;{
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// For alternating decoding, we must now incrementally XOR and output
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// the lines.
    -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dst.seekg(0, std::ios::end);
    -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;std::streampos sz = dst.tellg();
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dst.seekg(0);
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dst.clear();
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unsigned long in = LittleEndian::Read4(dst);
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LittleEndian::Write4(Dst, in);
    -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while (dst.tellg() < sz)
    +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while (dst.tellg() < rtiles << 5)
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in ^= LittleEndian::Read4(dst);
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LittleEndian::Write4(Dst, in);<!--c2--></div><!--ec2-->

    To avoid being completely off-topic, I have a suggestion for handling HTZ, WFZ and DEZ zone tiles (and maybe levels in other Sonic games that work similar to these). These levels work by patching the art of another level with zone-specific tiles. So what you need to do is support some form of art patching that works (schematically) like this (using HTZ as example):
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->VRAM tile:&nbsp;&nbsp;$0000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $01FC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $037E&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $0393
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; v&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; v&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; v
    Buffer 1:&nbsp;&nbsp;&nbsp;&nbsp; <----------------------- EHZ tiles ----------------------->
    Buffer 2:&nbsp;&nbsp;&nbsp;&nbsp; <--- passthrough ---><-- HTZ tiles --><--- passthrough ---><!--c2--></div><!--ec2-->
    Here, the passthrough regions simply forward the tile requested to the EHZ tile buffer, while the HTZ tiles are used instead of the EHZ ones in those regions. This allows editing of EHZ and HTZ tiles and allows them to be saved independently on changes to either, without the HTZ tiles gaining duplicate copies of all EHZ tiles and without the EHZ tiles being overwritten by HTZ tiles. (by the way, Rexon uses tiles starting from $037E, so you may want to keep this indirection further along).
     
  15. MainMemory

    MainMemory

    Every day's the same old thing... Same place, diff Tech Member
    4,287
    2
    18
    SonLVL
    I have a setup for palette entries that allows any number of entries from any location in any number of files to be loaded, but the problem I have with this is that you can't add or delete palette entries, but you will be able to add and remove tiles.
     
  16. Uberham

    Uberham

    King Of Oblivion Member
    Any idea why it's chucking this at me?
    <img src="http://i56.tinypic.com/2ugc5rd.png" border="0" class="linked-image" />
    And yes the file is there.

    EDIT I'm on XP BTW, 32 bit, SP2.
     
  17. sonicblur

    sonicblur

    Oldbie
    1,295
    0
    16
    <!--quoteo(post=562374:date=Feb 24 2011, 05:23 PM:name=Uberham)--><div class='quotetop'>QUOTE (Uberham @ Feb 24 2011, 05:23 PM) <a href="index.php?act=findpost&pid=562374"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->Any idea why it's chucking this at me?
    <img src="http://i56.tinypic.com/2ugc5rd.png" border="0" class="linked-image" />
    And yes the file is there.

    EDIT I'm on XP BTW, 32 bit, SP2.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Because he spelled "Kosinski" wrong in his INI files.
    The split disassembly produces a kosinski folder, while his INI file expects 'kozinski'
    You can fix this by opening the INI file in Notepad and fixing it.
     
  18. MainMemory

    MainMemory

    Every day's the same old thing... Same place, diff Tech Member
    4,287
    2
    18
    SonLVL
    For some reason, the copy of the 2007 disassembly I have calls it kozinski. If I'm the only one that has it, then I'll change it (and then the SVN INIs will work for both).
     
  19. Uberham

    Uberham

    King Of Oblivion Member
    well mine says kosinski too.

    just one of those weird things I could've sworn I checked, lol

    EDIT:
    nope, renamed and it still chucks the error.
     
  20. sonicblur

    sonicblur

    Oldbie
    1,295
    0
    16
    <!--quoteo(post=562386:date=Feb 24 2011, 05:52 PM:name=MainMemory)--><div class='quotetop'>QUOTE (MainMemory @ Feb 24 2011, 05:52 PM) <a href="index.php?act=findpost&pid=562386"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->For some reason, the copy of the 2007 disassembly I have calls it kozinski. If I'm the only one that has it, then I'll change it (and then the SVN INIs will work for both).<!--QuoteEnd--></div><!--QuoteEEnd-->
    The copy I grabbed from the wiki just last week has kosinski, so I assume it's correct.

    <!--quoteo(post=562240:date=Feb 24 2011, 08:21 AM:name=MainMemory)--><div class='quotetop'>QUOTE (MainMemory @ Feb 24 2011, 08:21 AM) <a href="index.php?act=findpost&pid=562240"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->FraGag is working on porting Flamewing's C++ port of KENS to C# after I failed to do so (KENSSharp on the SVN). I've always intended to have it cross-platform.<!--QuoteEnd--></div><!--QuoteEEnd-->
    I ported from the original C code to C#. Wasn't aware there was a C++ port. And this is exactly why I released as soon as I had it far enough along to work, instead of finishing it first. Because this is the 2nd time I've posted something that someone else was working on but didn't bother to post it in a public place where I can read it. It only took about an hour to do each of the decompressors, it should be feasible for me to do the compression this weekend if there's still a reason for me to do so.