ThomasSpeedrunner Help Thread

Discussion in 'Discussion and Q&A Archive' started by ThomasThePencil, Jan 29, 2013.

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

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    Well then, MainMemory, I'm also trying to add a homing attack ability for Sonic in my hack. How can I do this?

    (And before you even ask, I do intend for my hack to eventually become the sequel to Sonic Megamix.)
     
  2. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    With much difficulty.

    I think the homing attack is still one of those things where if you can't figure it out on your own, you're not "worthy" of having it. I might give you my code, but I don't want to give it to you and then you just paste it in and have no idea what it actually does.
     
  3. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    I can definitely understand that. Still, I do require the homing attack and Tails' flying (among other things). I think I can figure out what said code does if I were to study it for a few hours, maybe a day or two.
     
  4. SuperEgg

    SuperEgg I'm a guy that knows that you know that I know Member

    Joined:
    Oct 17, 2009
    Messages:
    Location:
    THE BEST GOD DAMN STATE OF TEXAS
    I believe we have a Homing Attack tutorial somewhere in the forums...
     
  5. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    Ah, my 20th post as a Trialist so I might as well go off with a BANG!

    Point #1: A lot of guides on adding new moves only cover Sonic 1, not Sonic 1 + Sonic 2. This is what is keeping me from adding Tails' flying, as well as Sonic's Super Peelout and Homing Attack/Jump Dash moves, and that's not even counting the (nearly) endless possibilities for Super Sonic (Sonic Unleashed reference FTW!)

    Point #2: Not many people make a sequel to a hack, as it usually takes too long and by the time you have something reasonable ready, it's time to release the next version of the original hack. I'm currently thinking of having updates to what I hope will become Sonic Megamix 2 released in the same style as Minecraft: snapshots (Not sure if it's really the best idea, though). The ideal format for said snapshot updates if used:

    AAw??a

    OR

    AAw??b

    AA = 2-digit year number

    ?? = week number

    a = initial snapshot

    b = bugfix snapshot

    You get the idea.

    Point #3: About 65% of hackers still use the somewhat outdated Xenowhirl 2007 disassembly, which was released OVER 5 YEARS AGO. This makes for a difficult time finding a guide to do something with the Hg disassembly, which forces me to try to figure out some stuff on my own. I hope that more and more people begin to use the Hg disassembly so more guides are made using it.

    I hope that made some sense to you guys...

    Until I am made a member, I bid you farewell.

    -ThomasSpeedrunner
     
  6. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    This. All those +s and -s are pointless and confusing. I can't understand how anyone would find them easier to use, or a good idea to begin with.

    Also, if I remember correctly, the new Sonic 1 disassembly uses a myriad of tiny files, forcing you to edit at least 4 or 5 files even if you want to edit the simplest things in the world, everything is scattered all over the place so you have to keep on looking everywhere to find what you're looking for.


    There is a third thing I don't like, but I know this one is a matter of personal preference and I'm in the minority in this particular case. I don't like how RAM addresses use names now, I find RAM addresses easier to use, such as

    Code:
    cmpi.w	#$0502,($FFFFFE10).w	; is this Final Zone?
    But as I said, I know I'm in the minority here.
     
  7. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Generally speaking, well-labeled variables are considered a good thing in programming.
     
  8. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    Since I am now a member, I can now ask the final question for Knuckles' porting (among others :mellow: )!

    What in the world do these mean?


    > > >s2.asm(60457): error: symbol undefined
    > > > SK_PLC_Knuckles
    > > > lea (SK_PLC_Knuckles).l,a2 ; SK_PLC_Knuckles
    > > >s2.asm(60457): error: addressing mode not allowed here
    > > > lea (SK_PLC_Knuckles).l,a2 ; SK_PLC_Knuckles



    Anyone who can explain how these can be fixed, please do not hesitate to do so.

    EDIT: Also, I'm trying to change Emerald Hill's title card text so it says Winter Hill instead, but said title card shows really fucked-up graphics. Any ideas on how that can be fixed?
     
    Last edited by a moderator: Feb 4, 2013
  9. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Well the first one means that a symbol (label, constant or variable) is nonexistant, in this case SK_PLC_Knuckles, or Knuckles' DPLC file from S&K (this one can just be copied, since S3K players use the same DPLC format as S2). The second error is a side-effect of the first, and will go away when you fix that.

    What you probably did was just edit the argument to the titleCardLetters (or whatever it was) macro, which only changes the art that gets loaded. The text itself is sprite mappings, in order to edit them in SonMapEd, you'll have to take a VRAM dump at the title card and load that as uncompressed art. Or you can try Selbi's Sonic 2 Text Code Generator.
     
  10. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    Okay, but does Selbi's Sonic 2 Text Code Generator work with the Hg disassembly?
     
  11. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    Just check it out. I never used it, but the "setup guide" will probably answer your question.


    edit: actually, nevermind. Apparently all the download links are dead, hurr.


    edit2: here, it's on the Sonic Retro Wiki. And apparently no, it doesn't. Then again, I don't think it would be impossible to get it to work with small modifications; after all, the different disassemblies are just slightly different ways to say the same thing.
     
    Last edited by a moderator: Feb 4, 2013
  12. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Assuming you're using the latest Hg disassembly, the title card mappings are in ASM format in s2.asm at Obj34_MapUnc_147BA. The first 16 lines below that point to the labels for the mappings for each zone's name. In this case, Emerald Hill Zone is zone 0, and the first line after the offsetTable (frame 0) refers to word_147E8.

    Open up the Sonic 2 Text Code Generator, click the Zone Title Cards button, type WINTER HILL in the box, and click Generate Text. You can ignore the first text box, because the macros you already found deal with that. In s2.asm, highlight everything after word_147E8: until the next label, delete it, go to S2TCG and select everything in the second text box after TC_EHZ:, and paste it into s2.asm where you deleted the old mappings.
     
  13. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    IT WORKS!

    But, do I have to add any equates or anything for Knuckles' DPLC?
     
  14. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    All you need is an include directive and a label.

    Like SK_PLC_Knuckles: include "mappings/spriteDPLC/Knuckles pattern load cues.asm"
     
  15. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    Thanks! I'll see if this works. If so, I can begin porting Knuckles to the actual hack itself. You see, I have three separate disassemblies, each for a different purpose.

    Initial disassembly: For the hack itself (duh).

    First copy of disassembly: For testing of major features, such as Knuckles.

    Second copy of disassembly: For any spare files, or if I have to revert a section of code.

    Also, before I screw any more title cards up, can someone give me a list of all the different zones relating to their positions in Obj34_MapUnc_147BA?

    EDIT: WHAT THE HELL? IF I GET ONE MORE FREAKING ERROR, I AM GOING TO FLIP OUT!


    > > >s2.constants.asm(1604): error: The RAM variable declarations are too large by $180 bytes.
    > > > fatal "The RAM variable declarations are too large by ${*} bytes."
    fatal error, assembly terminated
    WHAT IS THIS?

    EDIT 2: Apparently my disassembly can't play ball with spin dash dust, shield, and invincibility variables for Knuckles.

    EDIT 3: I know I'm being a bit of a pain right now, and I apologize for that, but apparently, the character select doesn't want to play ball; it loads Glitchy Tails instead of Knuckles. HELP ME PLEASE :(
     
    Last edited by a moderator: Feb 5, 2013
  16. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Why do you need separate variables for Knuckles? He should be able to just use Sonic's...
     
  17. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    I don't know why I keep thinking that Knuckles can't use any of Sonic's variables. Anyway, as I stated before, the character select doesn't want to play ball, as in "it doesn't want to load Knuckles." Any ideas on how this can be fixed?
     
  18. JeffCharizardFlame

    JeffCharizardFlame Escape Reality and Play Video Games Member

    Joined:
    Jan 27, 2013
    Messages:
    37
    Location:
    United States
    I wouldn't mind helping you figure the thing out. I'd like to help because I wanna learn more about assemblies and how they work, if you know what I mean. I mean, sure I could read the tutorial on disASMs but I'm more of the person that learns from hands on experience instead of reading about it.
     
  19. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    My guess is you didn't add a check for Knuckles to the player loading routine. As far as how, look at InitPlayers and try to copy what it does.
     
  20. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    That's the thing. Here's what "InitPlayers_Alone:" looks like from a clean disassembly:





    ; ===========================================================================

    ; loc_44BE:

    InitPlayers_Alone: ; either Sonic or Tails but not both

        subq.w    #1,d0

        bne.s    InitPlayers_TailsAlone ; branch if this is a Tails alone game

     

        move.b    #ObjID_Sonic,(MainCharacter+id).w ; load Obj01 Sonic object at $FFFFB000

        move.b    #ObjID_SpindashDust,(Sonic_Dust+id).w ; load Obj08 Sonic's spindash dust/splash object at $FFFFD100

        rts





    How am I supposed to copy that? Do I change the top half of it?
     
    Last edited by a moderator: Feb 5, 2013
Thread Status:
Not open for further replies.