don't click here

S3, S&K and S3k Dissassemblies.

Discussion in 'Engineering & Reverse Engineering' started by Varion Icaria, Dec 16, 2005.

Thread Status:
Not open for further replies.
  1. Varion Icaria

    Varion Icaria

    He's waiting.... Tech Member
    1,019
    11
    18
    S4: Cybernetic Outbreak
    I wonder in the future if somebody or if somebody already has made an S3, S&K and S3k dissassemblies. seeing as it'd make things more unique if more hackers hacked S3k and S&K alone.
     
  2. Hivebrain

    Hivebrain

    Administrator
    3,086
    212
    43
    53.4N, 1.5W
    Github
    Those ROMs are huge, so it'll take several months to properly* disassemble each one. You might have to wait a few years.


    *Running them through IDA doesn't count as proper disassembly.
     
  3. LocalH

    LocalH

    roxoring your soxors Tech Member
    3,314
    37
    28
    Nunya
    Rock Band 3 Deluxe
    Why disassemble S3&K? I would think you could disassemble them separately to save yourself a lot of work, and even make a smaller combined S3&K ROM by excising the superfluous code in the upper 2MB.
     
  4. Orion

    Orion

    Member
    That'd be a good project - getting Sonic 3K down to 16 Mbit. If possible that'd be excellent for people with flashcarts I think.
     
  5. Shade

    Shade

    Member
    I think it would be a project worth spending time on. I'd do it, but I don't have a clue as to how. Sorry guys, I'm not THAT good yet :P

    But gaining more knowledge as to how Sonic 3/Knuckles works, and possibly making hacking it a ton easier, might breath some new life into hacks. I love Sonic 2 as much as the next person, but there must be like fifty Sonic 2 hacks now, and if you could work with it properly, Sonic 3 has the potential for some truly awesome hacks.
     
  6. Varion Icaria

    Varion Icaria

    He's waiting.... Tech Member
    1,019
    11
    18
    S4: Cybernetic Outbreak
    I can attempt it after I finish some things in CO.

    Edit: One thing in IDA Pro that I don't understand is how to make offset index's show how they're supposed to. IE:

    Sprite_Index:

    dc.w Radon_A1-Sprite_Index

    Etc. If somebody could help tell me how to make it like that in IDA Pro then I could try to begin the S3 Dissassembly.
     
  7. LocalH

    LocalH

    roxoring your soxors Tech Member
    3,314
    37
    28
    Nunya
    Rock Band 3 Deluxe
    I don't know if it'll be possible to do it in 16Mb, even after getting rid of the extra shit, because S3, as it is, is already 16Mb, and while there might be a bit of space inside the S3 ROM that can be reclaimed, I don't think it's much. I think 24Mb or less would be a respectable goal. And if you have a Tototek cart, it's at least 32Mb, so you're good there anyway. It's people like me, with 16Mb copiers, that can't run S3&K from a ROM (but I don't need to, as I own the carts =P)
     
  8. ICEknight

    ICEknight

    Researcher Researcher
    A smaller S3&K? That's been done already...
     
  9. jman2050

    jman2050

    Teh Sonik Haker Tech Member
    634
    4
    18
    I'm sure a disassembly could be made rather nicely, it's just figuring out what to do with it afterwards. Is the engine markely different from what we see in S1 and S2? I thought I read something here about S3&K doing crazy things regarding sprites, but I don't recall.
     
  10. Korama

    Korama

    Tech Member
    272
    2
    0
    First, define the first table entry (aka offset index entry) as 16 bit word, eg. by using the "d" key.
    Then, with the text cursor being on the word you just defined, press "Ctrl+R". A dialog should pop up, containing a bunch of radio buttons and three text fields. The radio item "OFF16" should be selected by default. "Target address" should be 0xFFFFFFFF and "Target delta" should be 0 by default. So all you have to do is enter the table's base in the "Base adress" field and press OK. In your example, you could simply enter "Sprite_Index", since this is the label that corresponds to the table's base address.
    Repeat until you've covered all entries of the table.

    Instead of doing it entry by entry, you can of course convert all entries at once, but that requires that you know in advance how many entries the table has.


    Anyway, the easiest way is to use this little script of mine. :rolleyes:
    Download the file to your PC, load it in IDA (File -> IDC file...). Position the text cursor at the base address of the jump table/offset index, nevermind if some data or code there has already been defined, it will be redefined by the script. Then press (Shift+F2), a dialog will popup that takes IDC commands. Simply enter "MakeJmpTable(0);", that will invoke my script, press OK and you are done.
     
  11. Varion Icaria

    Varion Icaria

    He's waiting.... Tech Member
    1,019
    11
    18
    S4: Cybernetic Outbreak
    Thanks alot, This will help greatly ^_^.
     
  12. drx

    drx

    mfw Researcher
    2,254
    351
    63
    :rolleyes:
    I managed to do a S2K one once... I may continue that. But who knows, maybe some day I'll work on a s3k disasm. It would require lots of work though.
     
Thread Status:
Not open for further replies.