don't click here

Hack Want to learn rom hack

Discussion in 'Engineering & Reverse Engineering' started by BadGrK, Jul 18, 2024.

Tags:
  1. BadGrK

    BadGrK

    Member
    3
    0
    1
    Hi, I'm making this post hoping someone might be able to help me. For almost 2 years I've been learning a bit about rom hacking with pokémon mainly. However, while replaying Sonic the Hedgehog 1, a desire came over me to learn how to rom hack Sonic. Basically, I'd like to replace Sonic with this old French mascot, eggman, change the zone names and modify the music (I don't think I'll touch the game design because I won't be good enough). I hope people will be able to help me with tools or sprite advice (i already made some try or research) but i didn't understand everything). Thanks in advance!​
     

    Attached Files:

  2. RetroKoH

    RetroKoH

    Member
    1,735
    118
    43
    S1Fixed: A successor to ReadySonic
  3. Devon

    Devon

    Do not contact me. Tech Member
    1,584
    1,966
    93
    Regarding learning 68000 programming, it should be noted that the best way to make the most out of it is to also learn the fundamentals of programming logic and flow alongside the syntax. It's like learning spoken language, in which vocabulary and grammar work together to form coherent sentences. In this case, the vocabulary is the language syntax, and the grammar is the actual programming logic. Markey's site is a fantastic resource for learning the fundamental syntax and how each instruction works, but ultimately, you will gain the most by actually practicing programming, and you will go a long way by learning the basics of how the game engine works, and also the basics of how the Genesis works, too.

    As for what @BadGrK wants to do, learning 68000 assembly actually won't be effective, because what they want to do is edit the assets. In that case, there are tools such as Flex 2 and ClownMapEd (based on SonMapEd) for modifying sprites, though the current Sonic 1 disassembly now uses macros for sprite mappings, so I think only ClownMapEd works for that at the moment (I'm not sure if Flex 2 supports them, I know SonMapEd doesn't, since that has not been updated in years). As for the zone names, while they are stored as sprites for the title cards, the sprite data isn't separated into its own file (it has to do with how sprite mappings were created by hand in the original source code). What you can use as an alternative is Sonic 1 Text Code Generator (it's actually quite old and only officially supports the old 2005 disassembly, see below for label equivalencies. Luckily, you can still use the draw generated, as long as you update the labels).

    As for music modification, right now, mid2smps is the best we have for converting MIDI songs (you can find a guide for that here). There is also a tool called vgm2smps, but, it's not the most stable option, as VGM files are basically raw sound chip register dumps while SMPS (the name of the sound driver given by the community) is sequenced note data in which the sound driver will translate into YM2612/PSG register data as the song plays (while technically impressive, it can only handle so much). Alternatively, there's xm4smps, which converts XM formatted songs, which may be more useful if you prefer working with trackers, which actually aligns with SMPS better than MIDI (MIDI is a standard designed more for controlling MIDI devices such as synthesizers or effects and getting them to communicate with each other for music production. MIDI files hold data that is meant to be sent to MIDI devices).

    • Map_obj34 -> Map_Card
    • byte_C9FE -> M_Card_GHZ
    • byte_CA2C -> M_Card_LZ
    • byte_CA5A -> M_Card_MZ
    • byte_CA7A -> M_Card_SLZ
    • byte_CAA8 -> M_Card_SYZ
    • byte_CADC -> M_Card_SBZ
    • byte_CB10 -> M_Card_Zone
    • byte_CB8A -> M_Card_FZ
    • Map_obj3A -> Map_Got
    • byte_CBEA -> M_Got_SonicHas
    • byte_CC13 -> M_Got_Passed
    • Map_obj7E -> Map_SSR
    • byte_CD6B -> M_SSR_Chaos
    • byte_CDA8 -> M_SSR_GotAll

    Hope this helps!
     
    Last edited: Jul 24, 2024
  4. BadGrK

    BadGrK

    Member
    3
    0
    1
    Thank you very much, I was desperate because despite research and attempts with software like flex 2, I couldn't get anywhere. Thanks to your advice, I was able to import my entire character and even modify eggman. I was also able to change the music! Thank you very much. There's just one last little problem: in the artnem folder, I've been able to find the HUD but I can't find it in map to change the life icon and replace the word rings. I also can't figure out where the sonic palette is in the intro in the palette folder. And finally I'm still having trouble with the zone names, I've tried the software but I don't have the right files and I can't find the ones you gave me, maybe I'm using the wrong disasm...
     
  5. Devon

    Devon

    Do not contact me. Tech Member
    1,584
    1,966
    93
    "_maps/HUD.asm". I should note that if you open it in a sprite editor, the pieces where the numbers go will appear blank, because the game uses that space in VRAM to dynamically load the number graphics into them.
    The entire title screen palette (including Sonic's) is in "palette/Title Screen.bin"
    In both the 2005 and current GitHub disassemblies, the title card mappings are in the main code file (sonic1.asm for 2005, sonic.asm for GitHub). If you are using the latter, then you should use the label reference I provided to help you out.
     
    Last edited: Jul 25, 2024