don't click here

Basic Questions & Answers thread

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

  1. snkenjoi

    snkenjoi

    Tech Member
    89
    7
    8
    In sonic 1, you need to edit misc\sloc_lev.bin in a hex editor.

    In sonic 2, just go to WrdArr_StartLoc and edit the values.

    Go to loc_37B6 and comment out these lines for a dirty fix;

    Code (Text):
    1. lea (Nem_TitleCard).l,a0; load title card patterns
    2. bsr.w   NemDec
    I don't really look at the sonic 1 disassembly, so I'll let you know if I find anything better.
     
  2. OverKlockD

    OverKlockD

    Member
    14
    0
    0
    When I use the hivebrain sonic1 dissasmbly split.bat in vista it just freezes halfway through and doesn't decompress all the art needed. got any ideas to help it work. (yes I tried the compatibility and administrator settings (and followed the video tutorial))

    *bump* sorry I just fixed it. it seems the dissassembly didnt extract from the zip properly.
     
  3. STE

    STE

    Member
    221
    0
    16
    I've taken an interest into hacking Sonic 2, and I decided to Port the S1 Sound Driver to Sonic 2, but I'm getting errors.

    I would post the errors, but there is 11, and I have no log. Anyways, if somebody else has ported the sound driver, then please, Help?
     
  4. Spanner

    Spanner

    The Tool Member
    It would be useful to see the errors you know. Even though this keeps on getting reverted on the wiki version, changing KosDec to KozDec fixes one error.
     
  5. amphobius

    amphobius

    doing more important things with my life Member
    2,120
    0
    16
    life
    Thing is, his build.bat doesn't give an error.log.

    Attached is an edited build.bat so that it produces an error.log. :)
     
  6. Twilight

    Twilight

    Member
    51
    0
    6
    Michigan
    A Sonic the Hedgehog hack
    Alright, at first glance it looks like disabling the title cards worked. I commented out those two lines at loc_37B6 and built the rom. I started a game and the title cards didn't show up. But at the end of the level after it showed the score and moved on to act 2, the title cards for the level showed up. Why?
     
  7. STE

    STE

    Member
    221
    0
    16
    Thanks to Dalek, I can now show you my errors.

    Code (Text):
    1. > > >s2.asm(817): error: symbol undefined
    2. > > > Init_Sonic1_Sound_Driver
    3. > > >   jsr Init_Sonic1_Sound_Driver; init Sonic 1 sound driver
    4. > > >s2.asm(817): warning: address is not properly aligned
    5. > > >   jsr Init_Sonic1_Sound_Driver; init Sonic 1 sound driver
    6. > > >s2.asm(817): error: addressing mode not allowed here
    7. > > >   jsr Init_Sonic1_Sound_Driver; init Sonic 1 sound driver
    8. > > >s2.asm(1665): error: symbol undefined
    9. > > > Kos_Z80
    10. > > >   lea (Kos_Z80).l,a0
    11. > > >s2.asm(1665): error: addressing mode not allowed here
    12. > > >   lea (Kos_Z80).l,a0
    13. > > >s2.asm(1667): error: symbol undefined
    14. > > > KoDec
    15. > > >   bsr.w   KoDec
    16. > > >s2.asm(12727): error: addressing mode not allowed on 68000
    17. > > >   move.l  word_A656(pc,d0.w),d1
    18. > > >s2.asm(12727): error: addressing mode not allowed here
    19. > > >   move.l  word_A656(pc,d0.w),d1
    20. > > >s2.asm(12781): error: addressing mode not allowed on 68000
    21. > > >   move.l  word_A766(pc,d0.w),d1
    22. > > >s2.asm(12781): error: addressing mode not allowed here
    23. > > >   move.l  word_A766(pc,d0.w),d1
    24. > > >s2.asm(51397): error: addressing mode not allowed on 68000
    25. > > >   lea byte_28726(pc,d1.w),a1
    26. > > >s2.asm(51397): error: addressing mode not allowed here
    27. > > >   lea byte_28726(pc,d1.w),a1
    Also, I know about that typo with the KozDec thing. I put KoDec by accident. >__>
     
  8. Um, it's KosDec in Xeno's disassembly not KozDec, and that's the disasm the guide targets, so KosDec is right.

    EDIT: Also, the errors just say that Init_Sonic1_Sound_Driver and Kos_Z80 don't exist, probably because you forgot to include the sound driver ASM file (the separate download in the guide)

    EDIT 2: All right, for some insane reason the version of the disasm on the wiki isn't the most recent one and has KozDec instead of KosDec. My bad, and someone needs to upload the latest version.
     
  9. Phoenix

    Phoenix

    Has really been far even as decided to use even go Member
    I've been experiencing some strange glitches on SonED. Obviously, since this is my first attempt at a hack, I'm going to have glitches, but I need help fixing them. There's four problems:

    ---

    1) Strictly aesthetic. Certain 16x16 blocks have somehow been imported into a 128x128 tile that they aren't supposed to be in (blocks from the background in the top of tile 71), as seen in this picture:

    View attachment 2348

    How am I supposed to fix that?

    ---

    2) A VERY bad glitch: Waterfall tile AA is messing up very badly, keeping me from jumping while running on it. That's right, I try to jump while on top of this waterfall, but it won't let me. Same with trying to jump onto it from the side. What's with this?

    ---

    3) This can definitely be fixed with a hex editor. No matter how I try, I can't lower the bottom of the level. If I look at it in SonED, this is what I see:

    View attachment 2349

    But here's what happens when I play it (since I can't upload anything else): I die right there. EDIT: After using debug to test the rest of my level from there, I've found that I also cannot go past where the original signpost was, and where it originally was, springs and spikes load 16x16 tiles from the sign. All I need is a code, right?

    ---

    4) Finally, this is just wierd. I put a normal yellow spring in, facing upwards, but it goes upside-down in the game. It behaves just like a normal right-side-up spring, though.
     
  10. Spanner

    Spanner

    The Tool Member
    Were there any other fixes in the latest version? Just asking.
     
  11. fc reveals a few differences other than the Kos/Koz thing actually. I'm trying to upload the actual release but for some insane reason it isn't working (unless my cache is royally screwing up, though I doubt that since I cleared it multiple times and downloaded with IE as well), so if someone else can upload it please do so (it can be downloaded from the forum release thread).
     
  12. Shibunoa

    Shibunoa

    Banned
    329
    0
    0
    Italy
    Maybe trying SonED 2 will help? Never used it myself, but it might.
    After all, I haven't hacked a Sonic megadrive rom in ages.
     
  13. FraGag

    FraGag

    Tech Member
    You'd better use a split disassembly instead of editing the ROM directly.

    1) Emerald Hill Zone and Hill Top Zone share many tiles. The tileset is for EHZ and some tiles are patched when HTZ is loaded in the game. If a chunk shows wrong tiles, it may be only usable in HTZ.

    2) You may need to edit the collision data for the chunk. I don't remember if SonED can edit it, but I'm sure SonED2 can.

    3) SonED doesn't allow you to edit the level boundaries (neither does SonED2), but you can easily edit the level boundaries in the split disassembly (hint: the boundaries are under WrdArr_LvlSize).
     
  14. KingKombat

    KingKombat

    Member
    19
    0
    0
    Now I'm making my hack. Now before you go any further, let me remind you that im on a mac, so the only way I found is Hex Editing. Here's what I need help with.

    I want to change the max speed in Sonic The Hedgehog 1 (or to clarify, turn off speed cap). And I went to the correct value, which I believe is 011BD8.
    It took me straight to the value I needed to be. And, you will get mad at me for this but...I can't remember what it originally was. But in this tutorial, it said the max speed value was FF. so I changed it to FF, I saved the bin file (I realized that may have a been a stupid idea...) and when I played, it started up well. Ok, good.
    But...did I do it right? Or, is there some sort of tutorial for this? Please help, I want to contribute, but of course that's really hard.
     
  15. Phoenix

    Phoenix

    Has really been far even as decided to use even go Member
    Thanks, fragag. Now, I'm guessing that I could edit the level layout with SonED after using the disassembler? Or would it be easier to just do it all on a single program? By the way, which disassembler would be the best for me to use? (and why am I asking so many questions in a single post?)
     
  16. muteKi

    muteKi

    Fuck it Member
    7,851
    131
    43
    Well, the type of project files produced in an S2 or S1 disassembly are designed to be compatible with the project files used in SonEd 2.
    Therefore you should use that over SonEd.
     
  17. NemUK

    NemUK

    Probably lurkin'. Member
    Edit: Thanks to the admin who moved the post to the appropriate place :colbert:.

    Alright, I have been working on the resurrection of my old hack, Hammerhead. Everything was going great with no problems until now. Basically, after editing the level layout to my own specification, I nulled all the objects I wasn't using (00 00 00 in SonED) and moved them to the bottom left hand corner of the zone. Now when I load the ROM and attempt to play it, I'm greeted by a garbled version of the level, which looks like so:

    [​IMG]

    Any ideas as to what I may have done wrong? Thanks in advance ;).
     
  18. STE

    STE

    Member
    221
    0
    16
    Well, I searched Init_Sonic1_Sound_Driver: and Kos_Z80: in my dissasembly, and they both exist. I copy and pasted the contents of the S1 Sound Driver ASM file into my S2 ASM file, at the end of the ROM.
     
  19. You wouldn't have happened to paste it after the END directive in the ASM file would you? AS doesn't process anything after that directive.
     
  20. STE

    STE

    Member
    221
    0
    16
    And guess what I did? Pasted it AFTER the END. Thanks.