Basic Questions & Answers thread

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

  1. Uberham

    Uberham

    King Of Oblivion Member
    I added a fair few :P

    It's odd though, I've gone over that limit in my other stages and everything seems to be hunky-dory on those stages.....

    I haven't actually :P thought I did on Chemical plant....
     
  2. RetroKoH

    RetroKoH

    Member
    1,661
    17
    18
    Project Sonic 8x16
    So... I'm having a slight dilemma. I'm gonna preface this by stating outright that I'm a hacking noob, still... I think that I at least have an idea of what I'm trying to do.

    Now, I'm working on what I am codenaming "Sonic 2, REV C" One of my REVC series hacks that is really just the original games with bugfixes, enhancements, extra levels/characters... etc. Essentially it will also be a preview of sorts for what kinds of things I would like to have in Sonic Trilogy Enhanced.

    One things I'm trying to do with Sonic 2 REV C is implement Hidden Palace Zone. I have the Simon Wai prototype of Sonic 2, with all of the tiles and everything intact. NOW, I am trying to copy the hex code for these tiles over to my S2 Rev C disassembly cuz I'm SURE AS HELL NOT editing all of these 8x8 tiles by hand... SO I searched for the hex offset where the HPZ art was, copied it, and inserted the code into its own .bin file in my disassembly. but I am running into a road block.

    When I copy the stuff over, and reload the project file into SonEd2, the tiles look nothing like they do in the Sonic 2 beta ROM. Obviously I'm missing a step, or going about this all wrong... but the question is, what?

    Any help would be grand... and appreciated. :D
     
  3. redhotsonic

    redhotsonic

    Also known as RHS Tech Member
    1,587
    9
    18
    United Kingdom
    YouTuber
    098B76? Was that where you extracted it from?


    Sonic 2's 8x8's is Kosinski compressed. Whereas in Simon Wai's S2 beta, the 8x8's seem to be Nemesis compressed. If you're raw copying via a hex editor as you've mentioned, that's your problem.


    If I were you, I'd get a decompressor (This is the one I use), pick decompress Nemesis, then decompress HPZ main level patterns (098B76) to a new file and call it "unHPZ.bin".


    Then with that file, compress it again via Kosinski naming the new file "HPZ.bin"


    See if that works.
     
  4. RetroKoH

    RetroKoH

    Member
    1,661
    17
    18
    Project Sonic 8x16
    Just so happens I have such tools... My Triad editor loads them externally (temporary solution) to edit the compressed art...

    That would explain the problem, in theory. I'll give it a go when I grab my laptop today.
     
  5. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,556
    147
    43
    SonLVL
    You could also grab SuperEgg's Sonic 2 Nick Arcade disassembly from SSRG (need to be logged in) and use SonLVL's LevelConverter to convert the data to Sonic 2 format.
     
  6. RetroKoH

    RetroKoH

    Member
    1,661
    17
    18
    Project Sonic 8x16
    Ah... That woulda saved time... Oh wells, I've already started, and got all of the art imported and Act 1 layout completed. Ill check it out, regardless though. While we are on the subject, I'm wondering where to put HPZ, I feel like after Mystic Cave, or after Oil Ocean would be great.

    Oh, and MainMemory, thank you again for SonLVL... It's miles ahead of SonED, and a good reference for what an editor should be.
     
  7. E-122-Psi

    E-122-Psi

    Member
    2,133
    345
    63
    Speaking of SonicLVL, I'm trying it out, but it won't load for me, I get an error saying the remote name cannot be resolved: 'mm.reimuhakueri.net'. Any idea what the problem is?

    Also on a lesser and completely unrelated note, I'm trying to edit the coding for this in the S3 ASM:

    Code (ASM):
    1. Obj_ICZBreakableWall:
    2.  
    3.         lea ObjDat3_8A406(pc),a1
    4.         jsr SetUp_ObjAttributes(pc)
    5.         move.l  #loc_8A280,(a0)
    6.         jmp (Sprite_OnScreen_Test).l
    7. ; ---------------------------------------------------------------------------
    8.  
    9. loc_8A280:
    10.         moveq   #$2B,d1
    11.         moveq   #$40,d2
    12.         moveq   #$70,d3
    13.         move.w  $10(a0),d4
    14.         jsr (SolidObjectFull).l
    15.         cmpi.b  #2,($FFFFB038).w
    16.         bne.s   loc_8A2A0
    17. AmySmashICZ2:
    18.         swap    d6
    19.         andi.w  #1,d6
    20.         bne.s   loc_8A2E2
    21.  
    22. loc_8A2A0:
    23.         movea.w ($FFFFFAA4).w,a1
    24.         cmpi.l  #loc_89F38,(a1)
    25.         bne.s   loc_8A2DC
    It's the coding for the walls in Ice cap that can only be broke with Knuckles or the sliding blocks. Basically I've tried adding branches over the code so Sonic can use certain flags or animations to break through but it doesn't work (the $FFFFB038 flag is seemingly what limits it to Knuckles and uncommenting it allows any other character to walk through them in a similar manner, but trying to branch past it by recongnising particular character actions doesn't work). Any idea what the problem here is?
     
  8. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,556
    147
    43
    SonLVL
    It seems that your DNS is not working properly with my website. If that link doesn't work, you can try opening the command prompt as an administrator and running "ipconfig /flushdns".
    I'll make it so it won't crash in the future, but if you can't even access my website, then the updater won't work either.

    Edit: um... it looks like I already have it set up that way, unless you're talking about the Updater crashing, or you're using r568.1 or something?
     
  9. E-122-Psi

    E-122-Psi

    Member
    2,133
    345
    63
    Never mind got it running now. Might have been a connection problem on my part. :P

    Pretty impressive editor I must admit. One thing I've noticed however is that for both this and SonED is that I can't reverse the changes made to a level, as in even when I replace with an unaltered file or edit the object placement files in the disassembly the changes remain. Is there any way around this?
     
  10. Spanner

    Spanner

    The Tool Member
    3,313
    118
    43
    United Kingdom
    Sonic Hacking Contest
    This is about Flamewing's SMPS2ASM tool and equates. How do I exactly utilise this in Sonic 2 (using the Clone Driver)? What do I include to ensure that the correct conversions are used?
    Also, my disassembly includes a shitload of ASM music files converted with xm4smps which uses the s1smps2asm equates. It seems that I can't just use smps2asm here. I must be doing things wrong here.
     
  11. Ryuki

    Ryuki

    Member
    96
    0
    6
    Not 100% sure on my wording here, but here goes.

    1:How does Xenowhirl's Sonic 2 Dissassembly determine what lives counter image (Sonic, Tails, Knuckles) appears in the bottom left of the in game screen?

    2: Similar question but with regards to Signpost art.

    3: Any ideas on where I can find the mappings to the "Sonic Got Through" message in the results screen?

    Any help would be greatly appreciated. :)
     
  12. redhotsonic

    redhotsonic

    Also known as RHS Tech Member
    1,587
    9
    18
    United Kingdom
    YouTuber
    Find the label "Level:" and find this bit:

    Code (ASM):
    1.     moveq   #1,d0
    2.     bsr.w   LoadPLC
    3.     bsr.w   sub_4450
    4.     moveq   #6,d0
    5.     tst.w   (Two_player_mode).w
    6.     bne.s   +
    7.     cmpi.w  #2,(Player_mode).w
    8.     bne.s   Level_ClrRam
    9.     addq.w  #1,d0
    You have to make a new PLC so it can load up your new life icons.




    Find label "CheckLoadSignpostArt:"

    Again, you have to make a new PLC so it can load up your new signpost.




    This is at label "loc_140CE:"
     
  13. E-122-Psi

    E-122-Psi

    Member
    2,133
    345
    63
    Note if you want to edit what the results text you will likely need the Sonic 2 Text Code Generator since the mappings aren't fully editable from the ASM.
     
  14. redhotsonic

    redhotsonic

    Also known as RHS Tech Member
    1,587
    9
    18
    United Kingdom
    YouTuber
    I did mine in ASM =P
     
  15. Selbi

    Selbi

    The Euphonic Mess Member
    1,485
    10
    18
    Northern Germany
    Sonic ERaZor
    :psyduck:

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

    Little question by myself, can anybody tell me if there are any logical mistakes in the following code? Because only the first block does what it should:

    Code (ASM):
    1.         cmpi.b  #$41,1(a1)
    2.         bne.s   @cont1
    3.         move.b  #0,1(a1)
    4.         move.b  #3,8(a2)
    5.         move.l  a1,12(a2)
    6.         addq.l  #1,12(a2)
    7.  
    8. @cont1:
    9.         cmpi.b  #$41,-1(a1)
    10.         bne.s   @cont2
    11.         move.b  #0,-1(a1)
    12.         move.b  #3,-8(a2)
    13.         move.l  a1,-12(a2)
    14.         subq.l  #1,-12(a2)
    15.  
    16. @cont2:
    17.         cmpi.b  #$41,2(a1)
    18.         bne.s   @cont3
    19.         move.b  #0,2(a1)
    20.         move.b  #3,16(a2)
    21.         move.l  a1,24(a2)
    22.         addq.l  #2,24(a2)
    23.  
    24. @cont3:
    25.         cmpi.b  #$41,-2(a1)
    26.         bne.s   Obj09_CG_End
    27.         move.b  #0,-2(a1)
    28.         move.b  #3,-16(a2)
    29.         move.l  a1,-24(a2)
    30.         subq.l  #2,-24(a2)
    31.  
    32. Obj09_CG_End:
    33.         rts
    By the way, this is about Sonic 1's special stages.
     
  16. Ryuki

    Ryuki

    Member
    96
    0
    6
    Works a treat, thanks redhotsonic. :)
     
  17. RetroKoH

    RetroKoH

    Member
    1,661
    17
    18
    Project Sonic 8x16
  18. dsrb

    dsrb

    Member
    3,149
    0
    0
    About that fading routine/Hopeless noob question:

    Is there any way to have all three channels (R/G/B) of any given colour fade in from the beginning, at a rate that depends upon their intensity?

    With this method (at least according to the example at the start, since I can't parse ASM :british:), dimmer channels don't fade in any slower: they just don't start fading in until the brighter channels are almost completely visible.

    Is there some reason that we can't have, ''e.g.'', the colour RGB:36C fading in over 12 frames, with B incrementing once per frame, G incrementing once every two frames, and R incrementing once every three frames? Of course, in reality, you'd have to round and approximate the frequency of changes, and suit it to the number of frames in question, but it seems to me that would be far more uniform.

    [insert disclaimer about my total lack of knowledge, especially in comparison to the author of the guide]
     
  19. Ryuki

    Ryuki

    Member
    96
    0
    6
    Scratch that, back from work and have a few theories as to what's causing my problem; if I still can't fix it I'll add my post again; until then I won't hassle you guys again. :specialed:
     
  20. E-122-Psi

    E-122-Psi

    Member
    2,133
    345
    63
    I have a couple of queries about putting non-2P stages into split screen in Sonic 2:

    1. Is there any way to implement a signpost into an Act 2 of such a zone? I tried placing one via a level editor but when one character passes, the other's screen pans forward and gives them an instant game over.

    2. This is a more complex one I don't know is fixable. I've noticed an odd glitch with the lifts in Hill Top Zone, in split screen only a few randomly work, the others move okay at first, but then disappear just as they near the end of their route and are about to fall (this also screws up the players collision and makes them walk on air until they jump or get hit). Is this a glitch caused by 2p mode and is there a way to fix it?