[General] Beginner ASM guide

Discussion in 'Approved' started by redhotsonic, Aug 27, 2007.

Thread Status:
Not open for further replies.
  1. otherworldbob

    otherworldbob Newcomer Trialist

    Joined:
    Aug 28, 2007
    Messages:
    2
    The guide works a treat - now I just need to figure out how to get a big ring sprite there.


    One very minor bug, when you trigger the Specialring object, right at the end of the level score screen, the "1" from Sonic has Passed changes to a "2" very briefly before the special stage begins. The reverse happens on Act 2.


    Thanks for the tutorial RHS, it's very useful.
     
  2. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Does it really? Hmm, I'll look into that, thanks for pointing that out.
     
  3. Sephiroth

    Sephiroth WHY SO CURIOUS?!? Member

    Joined:
    Aug 11, 2007
    Messages:
    507
    Location:
    Qatar, M.E.
    This might be what the problem is with yours, Bob. It doesn't happen to me because I changed the clr.b command to a clr.w comand.
     
  4. otherworldbob

    otherworldbob Newcomer Trialist

    Joined:
    Aug 28, 2007
    Messages:
    2
    Gave that change of yours a go Sephiroth, but it didn't seem to change anything.
     
  5. Sephiroth

    Sephiroth WHY SO CURIOUS?!? Member

    Joined:
    Aug 11, 2007
    Messages:
    507
    Location:
    Qatar, M.E.
    I chekced mine and I thought that it went there and came back, not changed number. I get that problem too. I don't think it really matters though. Just a small niche. And PM me if you ever find out how to edit the art. I'll return the favour if I find out.
     
  6. puto

    puto Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    52
    Uhm, no. If you put a clr.w in there, you'll be word-accessing an odd address, which isn't allowed, meaning the resulting hack won't work on hardware as well as a bunch of emulators.
     
  7. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    It doesn't over-write anything so .w should be fine.
     
  8. Tweaker

    Tweaker OI! MIRON! Member

    Joined:
    Aug 10, 2007
    Messages:
    324
    Erm... Apparently you don't understand what Puto said. Referencing an odd address with word addressing is NOT ALLOWED. The hardware doesn't support it, and neither do any emulators that properly support all limitations of the actual hardware.


    This same problem occurs if you use both even and odd addressing on SRAM. It won't work on hardware and it'll make the game crash every time SRAM is accessed. Don't do it.
     
  9. Sephiroth

    Sephiroth WHY SO CURIOUS?!? Member

    Joined:
    Aug 11, 2007
    Messages:
    507
    Location:
    Qatar, M.E.
    Well thanks for telling meabout that.I don't know anything much about SRAM, so I wouldn't have known.
     
  10. shobiz

    shobiz Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    198
    Location:
    Karachi, Pakistan
    Which reminds me, why does Gens act so weirdly on odd addresses? Entering a PAR code FFFFAF:0703 seems to put 07 in $FFFFB1 and 03 in $FFFFAE :S
     
  11. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Ah, I see. So should the FFEB9 be .b on all commands?
     
  12. SMTP

    SMTP Active Member Member

    Joined:
    Aug 10, 2007
    Messages:
    32
    Strange, why would you make a "special stage ring" type object when Sonic 1's Big ring object is in Sonic 2?? [​IMG]


    Also, I used Sonic 1's object in my hack, and it does the same " the "1" from Sonic has Passed changes to a "2" very briefly before the special stage begins. The reverse happens on Act 2." glitch too. :p
     
  13. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    It's doesn't act like the big ring. You've got to find the key before the end of the level or you do not go to the special. Kind of the same way Sonic Heroes work, except when you get hurt, you still have the key.


    No way to solve the glitch?
     
  14. GasparXR

    GasparXR Rides the metal monster Member

    Joined:
    Aug 10, 2007
    Messages:
    84
    Location:
    Ontario, Canada
    I'm not lying when I say this: I checked Sonic Retro, Hacking-culT, S2B and Hidden-Palace and I can't find the Nemesis ASM build anywhere. Serious. Was it trashed or something?
     
  15. shobiz

    shobiz Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    198
    Location:
    Karachi, Pakistan
    http://info.sonicretro.org/Disassemblies


    For the love of God, don't use it though, use Xenowhirl's instead.
     
  16. puto

    puto Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    52
  17. insulfrog

    insulfrog Active Member Member

    Joined:
    Aug 10, 2007
    Messages:
    40
    Location:
    Boston, Lincolnshire, England
    The giude is excellent, I could do with learning ASM, however still 1 question remains, how do you re-assemble the rom? :p


    Surely there is a way to put the rom back together after you have taken it apart and edited it. :p
     
  18. shobiz

    shobiz Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    198
    Location:
    Karachi, Pakistan
    Well, there's a file called build.bat that comes with every disassembly - click it and it re-assembles the ROM.


    To be more specific, build.bat calls the assembler (usually SNASM68K, AS or ASM68K) with specific parameters to actually re-assemble the ROM, and may perform other steps as well (for example header fixing in Xenowhirl's, or binary file inclusion in Nemesis's)
     
  19. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    If you copy the CMD from SYSTEM32 and double click on it then type build, if you have errors, you can read it, rather it displaying the errors then quickly going again.
     
  20. shobiz

    shobiz Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    198
    Location:
    Karachi, Pakistan
    You could also add a "pause" command to the end of build.bat - in fact, Xenowhirl's does this in case of an error.
     
Thread Status:
Not open for further replies.