don't click here

Basic Questions & Answers thread

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

  1. Selbi

    Selbi

    The Euphonic Mess Tech Member
    1,541
    155
    43
    Northern Germany
    Sonic ERaZor
    Sonic 1: WTF Lame has a "WTF LAME" text coming from the left on the title screen. Since it's open-sourced, you might want to take a look at it (Obj19).
     
  2. E-122-Psi

    E-122-Psi

    Member
    2,538
    729
    93
    What's open-sourced?
     
  3. nineko

    nineko

    I am the Holy Cat Tech Member
    6,421
    585
    93
    italy
    http://en.wikipedia.org/wiki/Open_source

    It means that you can download the source code used in that particular hack (from the link provided by Selbi), look at how things are done, and replicate them by your own in your hack, either by copying and pasting or (preferably) by figuring out how their code works and improving it by your own.
     
  4. E-122-Psi

    E-122-Psi

    Member
    2,538
    729
    93
    Ah I see. Which download should I click for the ASM code then, binary or source?
     
  5. Selbi

    Selbi

    The Euphonic Mess Tech Member
    1,541
    155
    43
    Northern Germany
    Sonic ERaZor
    Binary = s1built.bin
    Source = Open-Source

    If that helps. If not, click on source.
     
  6. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    Hello everybody is my first post here and I really need help. For the past 3 days I've been reading and re-reading tutorials about how to hack Sonic roms, applications and whatnot. My main goal is to make something like the awesome user E-122-Psi is doing: replacing Sonic from Sonic 1 with a custom character. I have half the sprite sheet done and I'd so wanted to test it in Sonic 1. Then well, I went ahead, I downloaded SonikSprite and realized that doesn't work properly. Then I went and downloaded SonMap Ed, SonEd 1 and 2, and a bunch more of files but still I'm very very lost with all the information served here and I'm very confused on as how where/should I start. So if someone could help me on this I would be very grateful...if someone could direct me to the right place on this forum or instructions on how to do this it would be very appreciated because as I said I'm really lost and I'm not sure what to do even after reading everything...thank you in advance and I'm sorry if I posted in the wrong section, and excuse me if I made mistakes in my speech, I try to speak english as correctly possible, but I'm spanish and my english is not very good yet ^^U
     
  7. Ravenfreak

    Ravenfreak

    Meredith is best girl. Tech Member
    3,199
    261
    63
    O'Fallon Mo
    Hacking Sonic Drift
    Well since you want to add a new character in Sonic 1, check out this guide: http://info.sonicretro.org/SCHG_How-to:Use_SonMapEd/Part_1, read both parts so you can understand how to use SonMapEd.
     
  8. FraGag

    FraGag

    Tech Member
    Just to make sure you didn't miss any steps, I'll start from the very beginning.

    First off, I recommend you start with a split disassembly. You can find the disassemblies on the wiki here: <wiki>Disassemblies</wiki>. For Sonic 1, I suggest you take either the ASM68K or the AS one. (The SVN is not working, so unfortunately you cannot use the new version.) Extract the contents of the archive in a new folder. The split disassemblies do not contain any binary data; to get it, you must first get a plain Sonic 1 ROM (REV00) on your own (in .bin or .gen format, not .smd!), put it in that folder and rename it s1.bin. Then, execute split.bat. This will extract the binary data from the ROM into smaller files, which you can edit with SonED2 and SonMapEd later (the original SonED works on ROMs directly, which is not as flexible). If everything went well, you will see several new folders alongside your disassembly.

    Once this is done, you can follow the guide Ravenfreak pointed to to edit the main character's sprites. If you want to edit the levels in SonED2, get the project files from the disassemblies page, if the projects are not provided with the disassembly you chose. SonED2 might seem a bit complicated to use initially, so make sure to read the provided documentation; this will help you understand how the data in Sonic 1 (and the other Sonic games) is structured (tiles, blocks, chunks/metatiles, etc.).

    Have fun! :)
     
  9. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    Yeah, I read but I think I'm missing something...I don't understand this part: "Because I'm using a Sonic 1 Disassembly for this example, I'm going to set it to Sonic 1" and this too: "For this tutorial, we'll be editing Sonic's art, so go to File -> Load Data File. A list of data options should pop up, and the option you want here is "Load Uncompressed Tile Graphics". The file browser window will pop up and you'll have to locate the tile graphics in your disassembly, which are usually in the "artunc" folder labeled "sonic.bin"."
    Perhaps can you explain me what it means? I think I downloaded the dissasembly file but I'm not really sure if I did it right or not...Thank you very much again and for your quick response as well

    @Fragag: thank you very much for your quick response as well and all the detailed information! I'll try to do that, thank you again
     
  10. Ravenfreak

    Ravenfreak

    Meredith is best girl. Tech Member
    3,199
    261
    63
    O'Fallon Mo
    Hacking Sonic Drift
    After you follow the steps FraGag mentioned, in the folder you downloaded the disassembly to, there should be sub folders that contain all the data the split.bat file extracted from the Sonic 1 Rom. One of the folders is named "artunc" which stands for "art uncompressed". This is where Sonic's art is located. Now open up SonMapEd, set it to Sonic 1 since you are editing art from that game. Follow the steps you've listed above, and locate the file "sonic.bin" in the "artunc" folder. The rest is explained in the guide, I hope that helps a bit. And you're welcome. :)
     
  11. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    Thank you. I got it to work, but I have a slight problem now...I can't really understand how to make to work the palletes...I mean, I imported my custom sprite there (replacing the first of Sonic just like the guide said) and uhm...the colours are kinda messed. I used Hivepal to draw my sprite in Photoshop, I picked the colours from there but yet when I replace my sprite the colours looks odd...is there a solution to that?
     
  12. FraGag

    FraGag

    Tech Member
    Make sure you load the palette in SonMapEd before importing your sprites. The palette is in the "pallet" or "palette" folder, called sonic.bin. If the colors are a bit off in your source image, SonMapEd might get confused and import it incorrectly. I've never tried importing art myself though, so I can't really help you much more there.
     
  13. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    Oh it's ok. I did all the steps including loading the palettes of sonic.bin, but when I imported my custom sprite all colours went "poof" XD.Thank you anways, I'll try to figure it sometime, I'll read the tutorial once again
     
  14. E-122-Psi

    E-122-Psi

    Member
    2,538
    729
    93
    Are the colors all multiples of 32? The game's pallette needs all R,G and B totals to be multiples of 32, eg. R=64 G=128 B=96. In addition you can just edit the pallette in SonMapEd since it is likely the first line you're editing and thus can be displayed on you sprites as you edit them. Just load your sprites and the right pallette and then click on the color you want to edit. Keep in mind though Sonic's pallette is used for other sprites and objects (such as the HUD and badniks) so you may have to edit them too. Also Sonic's pallette for gameplay, special stage and endings,etc are separate.

    Oh, and I'm flattered you mentioned me, FeliciaVal.
     
  15. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    Yes I think all of them are multiple of 32, I mean, I used HivePal for making the colours of it, so I think there isn't a problem there but I'm not sure...

    Oh actually I was gonna send you a note on DeviantArt asking for directions on how you did your Sally hack because you once again really inspired me to make something, but then I felt bad for bothering you and I asked here instead ^^U (you may remember me from DA...I did a SA style pic of one of my chars because I was inspired by yours)

    EDIT: ok so xD my boyfriend figured how to make the pallettes and we have it working now with all the colours ^^ although I have the same problem as you and now I have pink badniks xDD
     
  16. E-122-Psi

    E-122-Psi

    Member
    2,538
    729
    93
    I can give you ASM coding on how some attacks work if you want. Don't feel bad, I'm more guilty than anyone of badgering people to do my programming for me so I would like to give something back for once. Yes I remember you and I'm flattered you consider me inspiration in such aspects.

    The pink badniks can be solved merely by editing their sprites to use the right colors (export the sprites and then import them over the originals with the right colors used).
     
  17. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    Thank you, thank you!! ^_^ it would be awesome if you can, since I'd like my character to have at least a homming attack :3 she is not really special and doesn't have fancy movements like Sally's kick or the hammer from Amy, but I picture her having homming attack and a high jump

    Btw, perhaps can you tell me how to change Sonic's intro in the title screen? I'd like to do like you did as well and put my own chara there since it's gonna be her game ^^
     
  18. E-122-Psi

    E-122-Psi

    Member
    2,538
    729
    93
    I have no idea how to implement homing attack, you'll have to ask someone more advanced for that one. I'm trying to implement highjump right now actually, its not working out well, but supposedly only because I'm using a non-jump activating control scheme (it works fine with a jump assigned button last time I checked). Give me a note when when you want to implement it and I'll PM you through it (though there might be some notes about it a couple odd pages back if you want to work from that).

    The tiles to edit for Sonic's title animation are the artnem file ttlson while the mappings are in the _map file as obj0E.asm. In addition if you wish to edit the ending and continue animations they are contson and endson (they might be spelt slightly different from how I remember but either way they are blatantly identified) while the mappings are obj80.asm (continue) and obj87.asm (ending).
     
  19. Armada

    Armada

    Sometimes I do things Member
    338
    0
    0
    Homing attack is fairly simple to conceptualize. I wrote some notes down when I was trying to work it out in my head, they may help you in some way. This isn't anything but a rough outline. I only partially proved it.

    1. Check proximity of an enemy (or object, if you want some sort of targetable object) compared to Sonic's in positive and negative x and y. If close enough, continue. Else, air dash.
    2. Run through all objects in a level. Compare that object's ID to the range of enemy IDs (or whatever you want to target).
    3. Move towards the enemy's position. You can calculate the slope between Sonic and the object with a simple formula, but that's rather rudimentary. Curving into it needs some trig functions, maybe sine?
     
  20. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    Thank you very much for all your help once again! I'll look to find those sprites.

    And uhm...actually that sounds really complicated for me yet ^^U but thanks for your help too :3 I'm quite happy that this thing is advancing ^^ now I have to finish my sprite sheet, but I'm having problems with the "loop" frames...you know, the ones when the character is running inside a loop, if I rotate them on Photoshop they get blurry and I'm not sure how to redraw them in that angle...