Sonic 1, having the emeralds unlock techniques

Discussion in 'Discussion and Q&A Archive' started by warr1or2, Oct 21, 2011.

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

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    How do I make it so a certain number of Chaos Emeralds unlock Sonic's Techniques, like all Emeralds unlock Super sonic and use up rings, and certain Techniques uses a certain amount of rings at a time?
     
  2. Animemaster

    Animemaster Lets get to work! Member

    Joined:
    Mar 20, 2009
    Messages:
    1,229
    Location:
    UK
  3. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    Used the guides but it killed it. (keep in mind i'm using s1 hacking studio 2)


    I wanted one use 50 rings and all emeralds, another to use 1 emerald.
     
    Last edited by a moderator: Oct 22, 2011
  4. Spanner

    Spanner The Tool Member

    Joined:
    Aug 9, 2007
    Messages:
    2,570
    There is literally no point to using this Sonic Hacking Studio, all it does is promote laziness.


    If you want to modify something in your hack, do it yourself.
     
  5. ProfessorRenderer

    ProfessorRenderer Certified Bear Scientist Member

    Joined:
    Sep 28, 2011
    Messages:
    102
    Location:
    Willoughby, Ohio
    Yeah, Spanner's right. There's no point of using S1 Hacking Studio by vladikcomper. It's all made using ASM. If you need to know ASM, here's a guide by redhotsonic: http://sonicresearch.org/forums/index.php?showtopic=141


    I learned ASM thanks to Qjimbo's Simple Spindash video on the SSRG.


    If you still have trouble, drop me a PM.
     
  6. vladikcomper

    vladikcomper Well-Known Member Member

    Joined:
    Dec 2, 2009
    Messages:
    415
    Yes, I agree with you. S1 Hacking Studio was done for lazy people, who don't want to add Spin Dash and such manually. But actually, I can't say laziness is always a bad thing. In fact, all the tools on this planet are done for lazy people. But what laziness does? Progress.


    SonED2 is designed for lazy people, who don't want to edit chunks, block, tiles and other complicated level data manually.


    SonMapEd is for lazy people, who don't want to deal with raw sprite mappings.


    Sonic 1 Text Code Generator is for lazy people, who don't want to use SonMapEd (which is for less lazy people) to edit title cards mappings.


    ASM68K assembler is for lazy people, who don't want to program using machine code directly.


    There are thousands of other examples, not even among hacking tools, just everywhere. Can we say they are all bad? Indeed, if you don't use SonMapEd, for example, then you'll edit sprite mappings manually. You will gain much experience in manipulating byte arrays, you will learn their format quickly, which is also useful knowledge.


    But neither SonMapEd, nor SonEd2 didn't pervert me from learning sprite mappings format or chunks, blocks and layouts formats. For example, I often write sprite mappings data manually, without using SonMapEd, as I find making some simple sprite mappings easier this way.


    You always can choose, which way of doing stuff is the best for you. Someone wants to use S1HS2, someone starts from a clean disassembly. I'm absolutely sure there will be people, who can do amazing levels and art stuff, but can't even apply simple ASM guides (let alone Spin Dash guide) as ASM is not their cup of tea.


    You can also complain about S1HS being poorly designed. To my view, this is the weighty argument not to use it, not the one about promoting laziness. Indeed, poor tools may learn you some bad habits. Unfortunately, there is only old 1.1 English version available and it's quite poor. Many bugs, crappy pseudo-S3 sprites, option to increase Sonic's max speed, which makes the game unwise. I agree, there are many points to be against it, because it's just poor.


    But things have changed. S1 Hacking Studio 2 was completely rewritten and redesigned. I got rid of some poor features, added a documentation on every tool and disassembly changes. I hope when I finally release it, you will look at it differently.

    S1 Hacking Studio 2's disasm isn't much different from original Hivebrain's Disassembly, expect for more code being annotated and few macros to make it even more readable.


    Most guides for ordinary disassembly will work without any issues, as code and labels are the same. That simple guide about emeralds will work for sure. Did you even try it? If you can't make something work, it may be your fail, not S1HS's.


    I agree with Jake92 here, you should learn ASM at least a bit, to understand what you're doing and apply guides without any problems.
     
  7. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    To be honest, the entire point of that program was indeed to give lazy arses a kick so they could finally chose a different name than GREEN HILL ZONE for their new levels. So it actually was a tool to promote laziness, though it was in a more or less good way. I mean, did you miss out a lot by ignoring how the text system works? Not really.


    My point is, while some (if not all) tools somehow promote laziness, isn't it only to give yourself a little time boost? What's the point of learning for hours how something works when there's a tool that is able to do it for you in a few clicks? After all, most tools are only for the little extras in a hack, they aren't supposed to build the hack itself. Their only purpose is to be able to quickly create some extra content for your hack so you don't need to waste any precious time on that, while you can focus on the actual part of your hack.


    To say it straight, you pwned SOTI, vladikcomper. :p
     
  8. Irixion

    Irixion Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    670
    Location:
    Ontario, Canada
    Having a tool do something for you != Having a tool help you in doing something.
     
  9. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    Ok. So far i've done sonic 2's level select in sonic 1 with it. but am Migrating to Sonic 1 (Hivebrain 2005-asm68k), i split, then i build to see if the game'll start and it crashed game after build. Once this is out of the way, Migrating will be sucessful.
     
  10. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    The most simplest way would be to check the number of emeralds the character has, and then if true, set the necessary flags for your new move, observe below one of the most basic ways forms of checking the number of emeralds you have and then not allowing a technique if Sonic does not have that number of emeralds:



    CheckTechnique02:
    cmpi.b #$02,($FFFFFE57).w ; does Sonic have 2 emeralds?


    bne NoTechnique02 ; if not, branch


    ; Set move flags/triggers/etc here


    NoTechnique02:


    rts ; return



    Edit: and fuck IPB for converting tabs to space characters causing my comments to unalign.


    Edit2: and somehow it converted it back to tabs, eh?
     
    Last edited by a moderator: Oct 26, 2011
  11. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    Thank you. when i read the guide it said to bne.s (guess i didn't need the .s cause everytime i done it that way, it killed it.)


    now that's out of the way. now for only a certain amount of rings to activate.


    tried this




    cmpi.b #$32, ($FFFFE20).w ; IS 50 RINGS?


    bne Sonic_Super_Rts ; if not, branch



    and it kills it every time
     
  12. Crash

    Crash Well-Known Member Member

    Joined:
    Jul 15, 2010
    Messages:
    302
    Location:
    Australia
    3 things:


    Your ram address should be $FFFFFE20 (you're missing an F)


    This code still won't work though, because your cmpi.b should be cmpi.w. You're comparing the first byte at that address, and the rings are actually stored as a word. So for your code to work you would actually need to have 12800 rings.


    Once you fix this you also need to change "bne" to "bcs".


    bne will branch when you have any amount other than exactly 50 rings. bne means "branch on not equal". bcs means "branch on carry set" which for all intents and purposes means "branch on less than" which is what I assume you want.
     
    Last edited by a moderator: Oct 27, 2011
  13. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    There actually is a command called "Branch if Less Than", blt. Of course in this case, it doesn't make any difference because you can't hold more than 30000 rings at a time and also can't have negative rings, meaning signed/unsigned stuff doesn't matter at all.


    I just figured to point this out to show my incredible knowledge and rub it all into your face..... not. :V
     
    Last edited by a moderator: Oct 27, 2011
  14. Crash

    Crash Well-Known Member Member

    Joined:
    Jul 15, 2010
    Messages:
    302
    Location:
    Australia
    yeah, blt is signed, and rings are never negative, so I figured bcs was more appropriate :)
     
  15. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    bingo. now on to 1.decreasing the rings, 2.turning off once at 0 rings, and 3.ignoring Obj2E_ChkInvinc for a super sonic.


    tried 1,



    subq.w #1,($FFFFFE20).w



    Code:
     sub.w #$1,($FFFFFE20).w 
    

    Code:
     DeleteRings:
    cmpi.w #$32,($FFFFFE20).w
    
    
    bne.s Sonic_Super_Rts ;end it
    
    
    sub.b #1, ($FFFFFE20).w ;subtract 1 off rings
    
    
    and it done nothing.
    tried 3,


    Code:
     neg Obj2E_ChkInvinc 
    
    and this done nothing
     
Thread Status:
Not open for further replies.