ThomasSpeedrunner Help Thread

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

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

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    At the start of the routine, it moves the player mode to d0, right? Then if it's not 0, the bne makes it branch to InitPlayers_Alone. There, it subtracts 1 from d0, and if it's still not 0 (which would have meant we started with 1), it branches to InitPlayers_TailsAlone. When it reaches InitPlayers_TailsAlone, it knows the original value must have been 2, since there's nothing higher than that in the regular game.


    What you need to do, is copy the first two lines after InitPlayers_Alone and paste them after InitPlayers_TailsAlone, and change the bne to branch to InitPlayers_KnucklesAlone or whatever you want to call it. That way, it will only load Tails if the player mode is Tails Alone.


    Then, after the rts, add that label you put in the bne and copy and paste the last three lines from InitPlayers_Alone and change ObjID_Sonic to ObjID_Knuckles.
     
    Last edited by a moderator: Feb 5, 2013
  2. ThomasThePencil

    ThomasThePencil resident psycho Member

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

    Now the character select can play ball, but Emerald Hill stops loading once the title screen comes up. It just...hangs there indefinitely. How is that fixed?

    Also, I've noticed that this keeps generating problems left and right. Hopefully, we're getting close to the end of this craziness.
     
    Last edited by a moderator: Feb 5, 2013
  3. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    I believe we have reached the end of my psychic debugging abilities. I cannot help you with no access to your modified disassembly.
     
  4. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
  5. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    I can't seem to find Knuckles' sprite mappings anywhere, and you put the tile number of his art in VRAM where the address of his mappings should be (that's 4(a0) under Obj4C_Init, as indicated by this table).
     
  6. ThomasThePencil

    ThomasThePencil resident psycho Member

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

    I can't seem to find Knuckles' sprite mappings anywhere, and you put the tile number of his art in VRAM where the address of his mappings should be (that's 4(a0) under Obj4C_Init, as indicated by this table).

    Hmm...did I do something wrong here? I think I either

    (a) Did something I wasn't supposed to, or

    (b) Forgot something.

    Which one is it?

    EDIT: Of course! Stupid me!

    I forgot to put in Knuckles' mappings! That must be what's causing the problem!

    EDIT 2: Okay, Knuckles works, but...well, just download and watch this quick video of me playing EHZ1 as Knux:

    http://www.mediafire.com/?e7dxfsanxef3e72
     
    Last edited by a moderator: Feb 6, 2013
  7. 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
  8. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Here's how to fix your Knuckles port: under KPLC_ReadEntry you move ArtTile_ArtUnc_Knuckles to a1. ArtTile_ArtUnc_Knuckles is the tile number for Knuckles' art in VRAM. You should have moved ArtUnc_Knuckles instead, which is the ROM address of his art. You'll have to add that label and binclude Knuckles' art file.
     
  9. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    Can anyone supply me with a FIXED version of Knuckles' palette?

    Also, FOUR bugs I've noticed:

    -Gliding doesn't always work (never works underwater)

    -Gliding into an enemy or monitor doesn't do anything (in the case of a badnik, it will actually hurt YOU instead)

    -The End Of Level text still says "SONIC GOT THROUGH" instead of "KNUCKLES GOT THROUGH"

    -The life icon of Sonic is present when playing as Knuckles (that goes for 1-up monitors too)

    If anyone knows how to fix these four bugs, please let me know.
     
    Last edited by a moderator: Feb 6, 2013
  10. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Knuckles' palette is



    dc.w  0,    0, $206, $20C,  $80, $64E, $EEE, $AAA, $888, $444, $8AE, $46A, $E,    8,  $AE,  $8E


    I'm assuming you don't want to overwrite Sonic's palette right? In that case, you'll have to add a new palette to the index and change the Level routine so it loads Knuckles' palette when he's selected.

    That and the four bugs you mentioned are things that really need to be written down in a guide, rather than in a post in this thread.
     
  11. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    How is that done?

    As in, how do I add a palette to the index using the Hg disassembly?
     
    Last edited by a moderator: Feb 7, 2013
  12. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    Okay, I'll put it this way:

    Do I:

    (a) copy Knuckles' S3K palette to my disassembly

    (b) add the line mentioned earlier somewhere in s2.asm

    Which one?
     
  13. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    B. Knuckles' S3K palette will not only make several objects look wrong, it'll make Knuckles look wrong because of code in his DPLC function that dynamically recolors his sprites from S3K to S2 palette indexes (you could convert the art file yourself and remove this code to save CPU time ingame).

    I was hoping you would at least try to figure this out on your own before asking me. I'll even give you a hint: try searching for Sonic's palette file (SonicAndTails.bin).
     
  14. ThomasThePencil

    ThomasThePencil resident psycho Member

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

    B. Knuckles' S3K palette will not only make several objects look wrong, it'll make Knuckles look wrong because of code in his DPLC function that dynamically recolors his sprites from S3K to S2 palette indexes (you could convert the art file yourself and remove this code to save CPU time ingame).

    I was hoping you would at least try to figure this out on your own before asking me. I'll even give you a hint: try searching for Sonic's palette file (SonicAndTails.bin).

    Hold up a sec.

    Actual file: weird thing with only two lines of text

    Only search result: shows both SonicAndTails.bin and SonicAndTails2.bin

    Where is said line supposed to be placed?

    (a) Somewhere in the same line as the .bin files mentioned earlier

    (b) Somewhere near it

    Hopefully this is the final major problem I'll have with my Knuckles port. Sure, there are some minor bugs (I mentioned them earlier), but I'm sure I can figure out how to fix those myself.
     
  15. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    You know what, why don't you just wait for me to finish writing my guide, then I won't have to spend the next three pages explaining things to you.
     
  16. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    The verdict? THE CAKE IS NOT A LIE!

    I take it, however, that you have not yet deciphered how to get Knuckles to be red?

    Still, this guide of yours will save me a ton of time re-porting the code to my hack! Thank you so much!
     
  17. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    I have, in fact, "deciphered how to get Knuckles to be red". I've already ported him once, it just takes a bit to remember exactly what I did, and put it into a guide.
     
    Last edited by a moderator: Feb 7, 2013
  18. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    ...Maybe the cake was a bit of a lie.

    Winter Hill gets past its title card, then it freezes. I have all the correct files, so just in case I did something wrong, here's my hack's disassembly so you can build and test for yourself:

    http://www.mediafire.com/?bbw28jj8b144va2

    Tell me what I did wrong, if anything, if you figure it out.
     
  19. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Well, it's crashing in BuildSprites, which usually means invalid mappings. I tried replacing your mappings file with mine, I tried putting an even in front of it, I tried replacing the Knuckles object entirely with mine, nothing worked.
     
  20. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    ...Well, damn.

    Hey...maybe there's a reason for that last bit of Knuckles' KiS2 code being there? For if something like this were to happen? Something tells me that reverting the last bit to normal will fix the problem.

    EDIT: Nope. Doesn't solve the problem. I wonder how we're supposed to go around fixing this...

    EDIT 2: Hold on a second. How the hell is it that this worked fine on a clean Sonic 2 disassembly, yet not with my hack? Maybe it has something to do with the fact that I ported S3K's Priority Manager to my hack before attempting this, perhaps?
     
    Last edited by a moderator: Feb 8, 2013
Thread Status:
Not open for further replies.