S2 Special Stage problem (I guess it's RAM)

Discussion in 'Discussion and Q&A Archive' started by Painto, Dec 31, 2014.

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

    Painto Arthurus Paintus Erinaceus Member

    Joined:
    Mar 24, 2014
    Messages:
    321
    Location:
    Lublin, Poland
    Hi.

    I dicovered very weird problem with special stage in my hack. In the last stage, in last section, few segments arn't loaded, but instead the last segment is looped and looped over again causing the player to being stuck and reset the game. I discovered too that it's related with my Knuckles + Tails S art. I needed to extend "SSRAM_ArtNem_SpecialSonicAndTails" variable from 353*20 (S+T art tiles) to 38A*20 (K+T tiles number) because it was glitched when playing as Knux (random sprites everywhere). I guess that this caused the problem, because when I changed back to 353, it worked perfectly. SO my question is: how I can extend "SSRAM_ArtNem_SpecialSonicAndTails" so rest of Special Stage won't be broken? I'm almost sure that i need to free up somehow 6E0 ((38A-353)*20) bytes but I absolutely don't have idea how.

    Thanks in advice.
     
  2. Kaz

    Kaz Well-Known Member Member

    Joined:
    Nov 2, 2013
    Messages:
    66
    Last edited by a moderator: Dec 31, 2014
  3. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    The Special Stage loads:

    • Character art into 68k RAM at 0000.
    • Perspective data into 68k RAM at 6A60.
    • Layout data into 68k RAM at 855C.
    • Object Layout data into 68k RAM at 8778.
    The art size being 353 x 20 = 6A60. The only way you're going to fit your new sized art into RAM, is to move the "Perspective", layout, and/or object layout data; further down, or somewhere else.
    An alternative method, is to have the art data uncompressed in the ROM, and performing the DMA transfers directly from the ROM space into VRAM, rather than from RAM into VRAM. Sonic Team did the latter more than likely because of SEGA's request to keep the ROM size to a minimum where possible.
     
    Last edited by a moderator: Dec 31, 2014
Thread Status:
Not open for further replies.