don't click here

Basic Questions & Answers thread

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

  1. Dark Sonic

    Dark Sonic

    Member
    14,631
    1,610
    93
    Working on my art!
    How do you add a milliseconds counter to Sonic 1 and 2. These are for possible time trial purposes at SCD.

    Also same question for S3&K if at all possible.
     
  2. HighFrictionZone

    HighFrictionZone

    Hi. Member
    855
    0
    16
    Katy, Texas
    Nothing
    Right, so. I really am not sure how to go about doing this one. How would I go about spitting some text out to the screen? Like, lets say I want a text box to spew out some story or something, or a help text. Ideally, this would be something that I can use in regular levels. Failing that, something I could use in a training level, or even as a pre-title screen demo that could explain the story.

    If it helps, it doesn't matter if this is for Sonic 1 or Sonic 2 (or both), whichever is easiest. It is for a newish hack I'm planning.
     
  3. TheBarAdmin

    TheBarAdmin

    Member
    107
    0
    16
    I'm trying to get the lava graphics from htz to work on mcz... but I don't understand how it works. I mean, in the soned view it takes some of the graphics from the waterfall art. I just dunno
     
  4. qiuu

    qiuu

    Tech Member
    144
    9
    18
    Blue Ball & Blocks
    As HTZ and EHZ share most of the graphics, in order to save space, HTZ loads the EHZ graphics and mappings ingame, and partly overwrites these with its own 8x8 graphics and block mappings.
    (The additional blocks are loaded in loadZoneBlockMaps after the check for (Current_Zone) to be 7, I.e. HTZ; the 8x8 tiles are loaded in routine sub_4E98 after a similar check.)

    SonED's project files don't regard these patches though and simply load the unpatched EHZ files. To view HTZ properly, use the already patched files HTZ(8x8) and HTZ(16x16) for tiles and block mapping respectively.

    Note though that if you only have your HTZ project files refer to the new tiles and block mappings, edits on them won't affect the actual game, changing 128x128 chunks will change EHZ's chunks though. You'd have to change some parts of the disassembly to make HTZ completely independent from EHZ.
     
  5. Afti

    Afti

    ORIGINAL MACHINE Member
    3,521
    0
    0
    Does anyone have a list of all the water-related routines/subroutines in the Sonic 1 disassembly? I'm trying to port water to SBZ, and it'd be immensely helpful- the water right now doesn't work right at all, and I have a feeling that I passed over something.
     
  6. FraGag

    FraGag

    Tech Member
    Just search the code for a comparison to the zone:
    Code (ASM):
    1.         cmpi.b  #1,($FFFFFE10).w
    This instruction appears 20 times, but only 9 of them are related to water (others control the behaviour of objects). One of them is in the Sonic player object and controls the water physics. Other places control the water levels, palettes and other stuff.
     
  7. Fluffy Clouds

    Fluffy Clouds

    WAS A KID. Member
    45
    0
    0
    San Fernando Valley, California
    GTA San Andreas trainer SCM hook.
    This is in Sonic 3 alone:

    I did something today, which involved changing all of AIZ2's tiles to AIZ1's tiles. Now I have a problem, Plane B is garbled and I need an editor to fix this. SonED doesn't support it, and ESEII can't edit Plane B. Am I at a dead end?

    Thanks.
     
  8. TheBarAdmin

    TheBarAdmin

    Member
    107
    0
    16
    Aha it worked! Thanks qiuu!

    Anyway, I was looking forward to extend the level slots. I extended all the arrays except I don't know how adding new title cards works... It just displays "zone zone" on the new level.
     
  9. FraGag

    FraGag

    Tech Member
    First, you'll have to edit the sprite mappings for the title card object (object $34) to add frames for the new levels. You may not be able to get them to show the proper art in SonMapEd as they use many different sources for that. When you've added frames for each zone, you need to edit some of the code for the title card object to handle those new frames: those mappings have frames not only for the text, but for other elements on screen (e.g., the ZONE text, the act number, the SONIC THE HEDGEHOG text and the red triangles with a shadow) and the code references these frames by their index. If you placed your new frames at the end, you'll need to tell the code to skip the existing frames for zones with IDs > $10. However, if you placed your new frames in the middle of the mappings (I.e. just after the existing frames for each zone, but before the "common" frames), you'll need to edit the indices for the other frames so the object shows the proper frames.
     
  10. Dr. Kylstein

    Dr. Kylstein

    Member
    86
    0
    6
    An annoying glitch that only shows up in Kega:
    View attachment 2359
    It occurs consistently, about every other frame of Tails's spinning animation.
     
  11. Quexinos

    Quexinos

    Since 1997 Oldbie
    1,677
    10
    18
    K, I got one.

    [​IMG]
    Tails doesn't follow these slopes properly. I know it's very hard to get him to do so (according to Tweaker) but if anyone can tell me how to get him to follow them without flying off, it'd be greatly appreciated. (The circled ones) It's Sonic 2 BTW.
     
  12. SMTP

    SMTP

    Tech Member
    Rika did that in his hack.. No idea how he got it to work though...
     
  13. Evil Hedgehog

    Evil Hedgehog

    Member
    32
    0
    6
    I have a question:
    How I can edit the title card and level select text in Sonic 2 if I am using a disassembly?
     
  14. Tweaker

    Tweaker

    Banned
    12,387
    2
    0
    That's because he didn't. :(

    (It was Stealth)
     
  15. Quexinos

    Quexinos

    Since 1997 Oldbie
    1,677
    10
    18
    I did PM stealth but didn't get a response, and I was hoping someone else knew.
     
  16. GasparXR

    GasparXR

    I'm back! Member
    I just figured out how to alter Obj2E_ChkShoes' to load music instead of speeding up the music.

    I changed

    Code (Text):
    1. move.b #1,($FFFFFE2E).w; speed up the BG music
    to

    Code (Text):
    1.  move.w #$94,d0
    and deleted

    Code (Text):
    1. move.w #$E2,d0
    (Track 94 is my speed shoes song.)

    It works fine, except now, neither the speed shoes effect OR the music stop. How would I go about stopping the music and speed effect?

    EDIT: Oh god, I should stop pulling all-nighters. I completely forgot this topic was here. =P
     

  17. ...Check the wiki? I recall there being some info about sonic 2 text editing.

    Check the code that the drown count uses to resume level music. I don't know what it is in s1, it should be something like resume music or something.
     
  18. Quexinos

    Quexinos

    Since 1997 Oldbie
    1,677
    10
    18
    Do people not know how to speed up the music for speed shoes? I know Rob figured it out...
     
  19. roxahris

    roxahris

    Everyone's a hypocrite. Take my word for it. Member
    1,224
    0
    0
    Doing anything at all
    You check the wiki. That information applies to Sonic 2 ROMs.

    I also would like to know how to edit, or indeed make my own title card.
     
  20. qiuu

    qiuu

    Tech Member
    144
    9
    18
    Blue Ball & Blocks
    The foreground data of the level select is stored in mappings/misc/Level Select.bin
    It is an Enigma compressed file, use TDSC to decompress it. The screen is 40x28 8x8 tiles large, and each 2 bytes in the file corresponds to one of these tiles. If the value stored for a certain tile is $4000, it is empty, other values correspond to the letters/numbers as listed in the wiki. At the bottom you'll also find some other values that make up the stage icon sign at the bottom right of the level select.

    When you press a key in the level select, the selected level number is changed, down/up increases/decreases it by 1, left/right looks up the table byte_95A2 to check which zone to switch to, check the code in LevSelControls to see what's exactly done. You can also expand the table editing two values there and extending the relevant tables. Pressing start will take you to the zone according to the table Misc_9454

    Now there's still the graphics that should change (I.e. level icon and color of selected level text). For the Icons, edit the table byte_96D8, each value has a byte entry there.
    For the text colors to be changed, edit the table byte_96EE. Each value has a 4-byte entry in this table (I recommend to re-format it therefore). Whenever you have a level selected, the zone name and the act number are marked. The first two bytes in that table are the position of the zone text, the next two the position of the act number. At the position the second two bytes point to, exactly one field will be marked yellow, at the position the first two bytes point to 14 fields will be marked (changing these amounts will need a closer look into the code I guess). First byte is the line, second byte the column. E.g. 3, 6, 3, $24 means that 14 fields beginning with the 'E' of Emerald Hill, I.e. (6, 3), will be marked yellow, and the field the act number is located, I.e. ($24, 3).