Basic Questions & Answers thread

Discussion in 'Engineering & Reverse Engineering' started by Tweaker, May 29, 2008.

  1. cleverking

    cleverking

    Member
    5
    0
    1
    I wanted to add Dinobot badnik (from Hidden Palace Zone) to Sonic 1. If the badnik is placed in air, then it should teleport to the ground. However, it doesn't happen. Many badniks use exactly the same code! Here it is:
    Code (Text):
    1. ; ---------------------------------------------------------------------------
    2. ; Object 4F - Dinobot (isn't finished yet)
    3. ; ---------------------------------------------------------------------------
    4.  
    5. Obj4F:
    6.     moveq #0, d0
    7.     move.b obRoutine(a0), d0
    8.     move.w Obj4F_Index(pc, d0.w), d1
    9.     jmp Obj4F_Index(pc, d1.w)
    10.    
    11. Obj4F_Index:
    12.     dc.w Obj4F_Main-Obj4F_Index
    13.     dc.w Obj4F_Action-Obj4F_Index
    14.    
    15. Obj4F_Main:
    16.     move.w #$480, obGfx(a0)
    17.     move.b #4, obRender(a0)
    18.     move.l #Dino_Map, obMap(a0)
    19.     move.b #4, obPriority(a0)
    20.     move.b #$10, obHeight(a0)
    21.     move.b #6, obWidth(a0)
    22.     move.b #$10, obActWid(a0)
    23.     move.b #$C, obColType(a0)
    24.     jsr     (ObjectFall).l
    25.     jsr     (ObjFloorDist).l
    26.     tst.w   d1
    27.     bpl.s   @floor_ret
    28.     add.w   d1,obY(a0)  ; match object's position with the floor
    29.     move.w  #0,obVelY(a0)
    30.     addq.b  #2,obRoutine(a0)
    31.     bchg    #0,obStatus(a0)
    32.  
    33. @floor_ret:
    34.     rts
    35.    
    36. Obj4F_Action:
    37.     bsr DisplaySprite
    38.     rts
    Please tell me what I did wrong.
     
  2. Caverns 4

    Caverns 4

    Member
    342
    0
    16
    Sanik Quest: Journey To The Right
    Does anyone know of tool/converter that can change a WAV file to the 4-bit DPCM samples I would need to make a DAC sample?
    Thanks to anyone who can help.

    @cleverking:
    The bad news is, I don't know the answer to your question. However, Motobug behaves almost exactly the same as Redz; Looking at how Motobug does it will help you.

    Also:
    Obj4F_Action: bsr DisplaySprite rts

    Could be just a little more optimized as:

    Obj4F_Action: bra DisplaySprite

    Edit: I looks at Motobug, only to see that nothing looks wrong.. Where are you placing the badnik, precisely?
     
  3. how does one decrypt the sonic 3K disassembly .bin files?
    sorry if this has been asked before
     
  4. MarkeyJester

    MarkeyJester

    ♡ ! Resident Jester
    2,040
    101
    43
    Japan
    I assume by "decrypt" you mean, just to understand the format in which they're composed of. The problem is, not all .bin files in the disassembly are the same format, they are each individual formats depending on what they are, and how they're used.

    You'll have some files which are composed of the word map format, often used in plane mappings and sprite segments.
    You'll have some files which are composed of map data, with X and Y positions, and shaping, for sprites.
    You'll have some files which are composed of art data, forming 8x8 tiles of pixels.
    You'll have some files which are composed of a tracker based system for playing back music or SFX.

    Much of this data you will also find will be "compressed" to save on space, using one of many different compression formats developed by SEGA's technical department. These compression algorithms are mostly LZSS based or RLE based, with either Entropy or Huffman dictionary tables to help reduce on size even further, these algorithms are documented on site, in fact, you can google these compression names and get immediate first result links to the site; searching "Kosinski Compression", "Nemesis Compression", "Enigma Compression", etc...

    -------------------

    HOWEVER, you are in luck, since many programs around already handle compression, and even the various formats. Which I'd argue that understanding the formats would supply you with a great advantage over most others, if you just want to make edits and get on with it without the technical specifics, then this would be more up your street.

    SonLVL is a great example, you are able to open entire levels of .bin files, it'll handle decompressing them, and allow you to edit them in clear visual control. Once saved, it'll compact it back, and recompress it again, saving you the trouble.

    SonMapEd and Flex are two known sprite mapping editors, they can open up uncompressed mappings, and PLC for sprites, as well as compressed art. Allowing you to modify the mappings (and/or art), and then save the result. Again, it'll handle the compression, and formats for you.

    PlaneEd is another one, I haven't used this tool myself, but, as far as I'm aware, it'll handle the mapping and art for standard display screens for you, on your behalf. Giving you a clear visual GUI control over it.

    If you're a beginner, you'll find a lot of tools and programs around will be your friends. Run a google search for the program names I suggested, and have a deeper look (I would've linked some, but, I'm not able to right now).

    -------------------

    If you want to understand the format of something specific, then name what it is, and someone will be able to give you a clear documentation on it. But, you have to be very clear on what it is. What the .bin file is called, where it is in the disassembly, etc, so we know what binary file you're talking about.
     
  5. Pokepunch

    Pokepunch

    Member
    82
    0
    6
    UK
    A Sonic 2 Hack
    Can anybody tell me where the art files for the HUD are in the Sonic and Knuckles GitHub disassembly, I can't seem to find them anywhere.
     
  6. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,445
    79
    28
    SonLVL
    The uncompressed numbers/colon/E are byte_E18A in sonic3k.asm, the uncompressed life counter is byte_E48A in sonic3k.asm, and the compressed part is in General/Sprites/Ring/Ring.bin (yes, really). The first two should be split into binary files, and the latter should probably be renamed to RingAndHUD.bin (and possibly the folder as well).
     
  7. Azu

    Azu

    I must be stupid. Member
    In Sonic 3K (Or any Sonic Game with a debug) is it possible to add object to the cycle list? (I feel like I asked this before)
     
  8. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,445
    79
    28
    SonLVL
    No, out of all the things in the game, the debug lists are completely uneditable by any means. I don't know how they managed to do it, but there you are.

    + - Yes, you can edit them, they're all stored in the ASM after the debug mode routines, usually using macros. In the current S3K disassembly, look for DebugOffs in sonic3k.asm.  
     
  9. Haxhabte

    Haxhabte

    Member
    10
    0
    0
    USA
    Can anyone here guide me to info on how i could extract data from sonic unleashed? I want to rip model and animation assets to be able to use from that game but i cant find anything on how to actually do that. I know you can hack generations and export models and animations from that game via tools that are already developed but is there a way to use it for unleashed? I know it's possible since I see so many gens mods that use assets from that game i just don't know where to find that info. If someone could link me to a post that has an explaination that would be amazing.
     
  10. TheBlueBlur GAMER

    TheBlueBlur GAMER

    Nerples Member
    12
    0
    1
    People are already figuring out how to modify the Special Stages in Sonic Mania. They've been mainly messing with the polygonal models, and doing stuff like replacing them with other models etc. I've been wondering if anyone has actually managed to rip the models from the Special Stages, and dump them online. If anyone knows, I'd be grateful if you could let me know. Thanks!
     
  11. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,445
    79
    28
    SonLVL
    This probably belongs in the Basic Questions & Answers thread in Engineering & Reverse Engineering.

    To answer your question, I don't know that anyone's posted the models online, but there is a Python script that converts the models to STL format (whatever that is), and a 3DS Max script for importing the model files into that program.
     
  12. Iso Kilo

    Iso Kilo

    Local Wolf-Fox Member
    30
    27
    18
    Small Town, BC
    The Elementalists
    I rushed myself onto the site in my previous post. Some users told me to learn hacking on my own, so that's what I planned to do. I downloaded SonED2, a clean ROM of Sonic 1 and WinRAR. Now I have no clue whatsoever what I need to do. There seems to be no tutorial anywhere and I'm dying to make a proof of concept for project Syndrom. Mind helping out a beginner? Once I have SonED2 loaded up I might need some more help, but we'll have to see. Based on what I've seen the interface looks simple to use. Anyways, I'll just sit here with a random folder labeled as "STHHack" sitting here on my desktop.
    -Bye :P
     
  13. sparkpinretro

    sparkpinretro

    Twice the tails, double the fun Member
    13
    0
    1
    This guide should help you get situated. The Sonic Community Hacking Guide is an excellent resource for getting started and even helping you understand ASM to a point.

    Also, questions like this should probably go in Basic Questions & Answers.
     
  14. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,445
    79
    28
    SonLVL
    As loath as I am to help someone to set up SonED2, what you need is a disassembly. There are generally two options for Sonic 1: Hivebrain's 2005 disassembly and the GitHub disassembly. More guides are written with the 2005 disassembly in mind, and more people have experience with the 2005 disassembly, but the 2005 disassembly is not as well labelled as the GitHub disassembly. The GitHub disassembly is set up for editing right out of the box, while the 2005 disassembly requires you to place a Sonic 1 ROM named s1.bin in the folder and run split.bat to extract the data files. You may also need project files for the 2005 disassembly, which can be found here and should be extracted into the disassembly's folder. You can start editing by opening SonED2 and loading one of the project files from the project files folder. Once you have finished editing, you can create a new ROM file using build.bat, which will generate an 's1built.bin' file.

    Also, just so you're aware, SonED2 is not the only level editor available.
     
  15. Jeffery Mewtamer

    Jeffery Mewtamer

    Blind Bookworm Member
    1,580
    7
    18
    No idea if its the same format, but .stl files are typically what one exports from 3D CAD software as a first step towards making a 3D print, and is also the common format for sharing printable models online for those unwilling to share their actual project files(The .stl is, as I understand it, just the raw mesh data while the project files for most CAD programs typically include information on the components that make up the mesh as well as a record of primitives and operations used to generate components). I believe the extension is derived from stereo lithograph.

    So, it's quite possible that what the python script is producing is a file that would allow people to 3D print Sonic Mania figurines.
     
  16. flarn2006

    flarn2006

    Member
    277
    3
    18
    SA2 Cheat Table
    I agree your editor is a lot better, but why are you loath to help someone with a different editor? Maybe they'd prefer that one.
     
  17. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,445
    79
    28
    SonLVL
    You do know that you don't have to quote the post immediately above yours, right? Well I guess it's not anymore now that the discussion's been moved.

    The reason I'm loath to do it is because so often, people just see SonED2 first and never even look for alternatives, but I don't want to be that guy who answers "how do I use SonED2" with "you should use SonLVL instead, it's better". If I help them with SonED2, they may become so invested in the program that they don't feel like they can afford to drop it and learn a different program.
     
  18. TheBlueBlur GAMER

    TheBlueBlur GAMER

    Nerples Member
    12
    0
    1
    Ah, okay. I wasn't really sure if this belonged in the Technical Discussion forum anyway. Thanks
     
  19. Iso Kilo

    Iso Kilo

    Local Wolf-Fox Member
    30
    27
    18
    Small Town, BC
    The Elementalists
    Ok, I've followed a descriptive tutorial no offense, writers of the tutorials for this website, but; The tutorials are FAR too vague Anyways, I've fallen upon (yet another) issue; I open up the split.bat file, and it pops up then shuts down immediately afterwards. Possible explanations or solutions?
     
  20. sparkpinretro

    sparkpinretro

    Twice the tails, double the fun Member
    13
    0
    1
    As far as I know, split.bat generates a new split disassembly from a given ROM. If you already have the split disassembly, you don't need to use split.bat. If you don't have the disassembly, make sure your ROM is named correctly and you actually have the program that split.bat is running.