don't click here

Basic Questions & Answers thread

Discussion in 'Engineering & Reverse Engineering' started by Tweaker, May 29, 2008.

  1. Caverns 4

    Caverns 4

    Member
    346
    0
    16
    Sonic: Retold
    It probably relates to a boundry in the ROM being crossed in the ROM or something, and the Assembler being stupid with it.
    It seems like when I get the error, adding a simple nop or two above the problem area fixes it.
     
  2. OddlyHyperNewbie

    OddlyHyperNewbie

    Member
    5
    0
    0
    I don't even know anymore
    I will just ask my stupid question and hopefully won't get banned. I've been changing the level layout of Sonic 2 with SonLVL,
    but I ran into a problem. I have no idea how the Path Swapper works. How does the left/up and down/right paths, 1 and 2, and priority, low and high, work?
    Also how does everything else work with the Path Swapper? I'm sorry for this dumb question, but I can't find any explanation.
     
  3. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,735
    334
    63
    SonLVL
    In Sonic 2 and Sonic 3 & Knuckles, the game has two collision paths, which can be viewed in SonLVL by pressing the W and E keys (or from the View menu). If a pathswapper's Left/Up Path is set to Path 1, then when Sonic passes the pathswapper moving left or up (depending on the Direction of the pathswapper), he will interact with the solidity for path 1 until he runs through another pathswapper. If the Left/Up Priority is set to Low Sonic will be drawn behind the high priority foreground tiles (use the Y and U keys to turn on and off the low and high priority tiles, respectively). The Direction setting determines whether the pathswapper is oriented vertically or horizontally, the Size setting determines how large of an area it will cover, if Priority only is set to True, the pathswapper will only affect Sonic's priority, not his path, and if Ground only is true, Sonic must be touching the ground for the pathswapper to activate (to prevent Sonic from being able to jump through loops).
     
  4. OddlyHyperNewbie

    OddlyHyperNewbie

    Member
    5
    0
    0
    I don't even know anymore
    Thanks.
    https://youtu.be/y6iEnuybWII
    Now, I might sound like one of those lazy people (please forgive me, I have no experience whatsoever), but in the end of the video I died, where there was supposed to be a bottom path.
    I tried to resize the level through SonLVL, but it said that it does not allow me to resize levels for Sonic 2. Do I need to edit the code itself or something else?
    I need help on the most simple things...
    I'm sorry.
     
  5. jubbalub

    jubbalub

    #1 Sonic Superstars defender Member
    995
    1,222
    93
    Something weird happens when I try to edit Scrap Brain's PLCs...

    [​IMG]

    [​IMG]

    I'm using the Hivebrain disasm, if it matters, also like to note that this doesn't happen in the Git disasm. Lost as to what to do.
     
  6. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,735
    334
    63
    SonLVL
    I'm assuming that you mean the bottom path exists in SonLVL, but the game won't let you go to it. Find LevelSize: in s2.asm and change the fourth value for the level you're editing to be large enough to include the bottom path.

    Edit: ninja post
     
  7. Caverns 4

    Caverns 4

    Member
    346
    0
    16
    Sonic: Retold
    The HiveBrain Disassembly? Isn't that from like, 2006?
    You're probably better off using the GiT disasm.
    And with that said, remember that PLC's are only allowed to have a max of 16 entries per cue. That could be your problem.
     
  8. jubbalub

    jubbalub

    #1 Sonic Superstars defender Member
    995
    1,222
    93
    I find the Git disasm a pain in the dick to work with..
     
  9. Caverns 4

    Caverns 4

    Member
    346
    0
    16
    Sonic: Retold
    I know, I hate the Git disassembly too. It's horribly set up IMO.
    But it's the only really modern option we have, and your error is probably down to something you overlooked.

    EDIT: Which Sound Driver is easier on the Z80? Sonic 2's or Sonic 3K's? I'd guess Sonic 3K's, since was made FOR the Z80 rather than just being a hackish port, but I'm not exactly sure about this.

    Another edit: Also, which is faster on the 68K? Move.b #1,address , or bset #0, address? tst.b, or btst?
     
  10. Unlimited Trees

    Unlimited Trees

    we Do a Little Mischief, Mischief... Member
    95
    73
    18
    When
    UNITRES, Project Time, etc.
    Question: Is there a way to change what palette an object loads? For example, what if I wanted the ballhog enemy (1E) to load Sonic's palette instead of the SBZ palette.

    Edit: I'm using the Hivebrain Sonic 1 disassembly.
     
  11. OddlyHyperNewbie

    OddlyHyperNewbie

    Member
    5
    0
    0
    I don't even know anymore
    This is odd...

    [​IMG]

    My amazing screenshot skills...



    Okay now, this is what is going on. When I get to a star post, it is already in blinking like it has been passed. It also behaves like it has been passed as well, expect it doesn't act like a check point.
    What could be going on?
     
  12. jubbalub

    jubbalub

    #1 Sonic Superstars defender Member
    995
    1,222
    93
    You have to set the subtypes of the star posts to 1-9, in the order they are placed in the level.
     
  13. Clownacy

    Clownacy

    Tech Member
    1,053
    581
    93
    I believe WFZ in S2REV00 had a similar problem, which stemmed from the signposts not having their 'remember state' flag set, so be sure to do that as well.
     
  14. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,735
    334
    63
    SonLVL
    Under Obj1E_Main, you'll find the line move.w #$2302,2(a0) which set's the object's art tile field. Bits 13-14 control the palette line used ($0000, $2000, $4000, $6000). Since you want to use Sonic's palette, which is line 0, simply subtract the $2000 that indicates it should display on line 1.
     
  15. Steelrush

    Steelrush

    Every good deed has its reward. Member
    19
    0
    1
    A humid place
    Blaze the Cat in Sonic 2
    I got yet another Sonic 2 porting issue that I need assistance with.

    In terms of boss porting, I managed to get just about everything right with the Sonic 1 Labyrinth Zone boss except for one little issue in regards to porting...

    While I found a program that successfully converted the mappings to a Sonic 2 format, I could not find a method of correctly porting the artwork or palette. There were no tutorials or tools anywhere that could assist me. :\
     
  16. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,735
    334
    63
    SonLVL
    That's probably because the art and palette formats are native to the MD, not specific to any one game. The Nemesis compression used for the art is used in all the Sonic games also. All you need to do is find the data, copy it over, then set up a level event routine to load the data at a certain point in the level.
     
  17. Campbellsonic

    Campbellsonic

    Member
    19
    0
    1
    You may or may not remember me asking about porting Sonic's sprites from Sonic 3 to Sonic 1 about a year ago, and yes, I've taken this long to actually get around to doing it. Don't judge my laziness.

    Well anyhow, after porting the DMA queue from Sonic 2, it's working like a charm, except for one issue; the score points that pop out of badniks when they're destroyed appear to be loading Sonic's art for a reason I can't determine. At first I thought it was an issue of Sonic 3's larger art file overwriting the point graphics, but in my efforts to fix this I tried swapping Sonic's DPLCs with his original S1 ones, and the points displayed just fine even with the S3 art in the game...

    So... Anybody know how to fix this? This is likely a problem due to me not knowing in the slightest how the DPLCs actually work; all I know is that they dynamically load Sonic's art as its needed rather than all at once. I think. All I did after porting the DMA queue was use SonMapEd to load Sonic's art, mappings, and DPLCs in S3K format, then export them all to my disassembly in S1 format.
     
  18. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,735
    334
    63
    SonLVL
    The problem is that the game only reserves so much space for Sonic's art in VRAM, with the art for the point bonuses being loaded right after it via PLC on level load. The S1 DPLCs all load a number of tiles less than or equal to the amount reserved for Sonic's art, but the S3 sprites use more tiles in each frame, so it ends up overflowing the reserved space and overwriting the points graphics.

    The solution is to somehow rearrange the art locations in VRAM to give Sonic's art enough space to fit all his animation frames in it. How exactly you would do that, I don't know, but it will involve editing the art locations in the PLC lists and some objects.
     
  19. Clownacy

    Clownacy

    Tech Member
    1,053
    581
    93
    I ran into this issue in my Super/Hyper Sonic in Sonic 1 hack, which uses S2 Super Sonic sprites. I believe I wound up relocating the points art, from its old VRAM location, to the 'free' location described in the Sonic 1 Spin Dash guide: $D800. Since my hack didn't have the Spin Dash, I didn't have to worry about this space already being used.

    If you want a quick step-by-step, assuming you're using the Git disasm...

    Change the write to obGfx in Poi_Main (_incObj/29 Points.asm) from $2797 to $26C0. This changes the VRAM address the object goes to, to find its art. Then change the value next to 'Nem_Points' in PLC_Main (_inc/Pattern Load Cues.asm) from $F2E0 to $D800. This changes where the points art is loaded to, in VRAM.
     
  20. Campbellsonic

    Campbellsonic

    Member
    19
    0
    1
    I have the SpinDash implemented, so I can't put it in that location since I already used it for the lamppost art. However, could I put it in the approximate $200 bytes freed up by porting the DMA queue? I don't know how many bytes the point art uses up since I don't have a sense of bytes in graphics, but assuming it does fit it presents me with one other issue/question:

    What exactly is the correlation between the number used to locate the graphics and the actual location it's loaded? (In this case, $2797 and $F2E0 respectively.) The SpinDash tutorial did something like this for relocating the lamppost art, but it had me use #($D800/$20) which is the actual location divided by $20? (That part of the tutorial felt very copy+paste tbh.)