don't click here

Basic Questions & Answers thread

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

  1. Thorn

    Thorn

    Tech Member
    335
    19
    18
    Home
    Sonic 2 Retro Remix
    Let me Wiki that for you.
    SCHG_How-to:Extend_the_water_tables_in_Sonic_2

    After that, you'll need to do two more things. One is to create an underwater palette for the level. After creating the palette in SonED2, you can look at the way water palettes are usually loaded in the ASM file and follow suit, or you can write it directly into the appropriate spot in RAM if that gives you trouble. The other thing to do is to put one of the two Water Surface object graphics in VRAM and edit the object's code (Obj04) to load it. A third, optional thing to do is to give it a dynamic water routine such as the one in Chemical Plant 2.
     
  2. Tidbit

    Tidbit

    Member
    One problem with those steps you gave me. Asm and I don't work out. And by that I mean that I cant do any thing in asm on my own >.<.
     
  3. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    Hey everyone, been a while, huh?

    Anyway, I have one quick question. I have been messing around here and there with Sonic 2 and I was wondering. How I could add in a sort of "Look Forward" move into S2? I understand how look up and ducking work, however I have not been able to find a way to make the screen scroll forward like it does vertically.
     
  4. Selbi

    Selbi

    The Euphonic Mess Member
    1,497
    48
    28
    Northern Germany
    Sonic ERaZor
    Welcome back. =)

    So basically an extended camera? In Sonic 1 you would want to edit ScrollHoriz, which is in Sonic 2 sub_D704. To be excact: loc_D732 contains:
    Code (ASM):
    1.     subi.w  #$90,d0
    Which somehow centers the camera on Sonic. Increase the value to make the camera go more to the left and decrease it for the opposite. Basically, do your checks there and edit d0.
     
  5. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Does anyone know where the coding for the Wing Fortress cutscene is (where Sonic jumps onto the Tornado to catch up with Eggman' jet) in the current Sonic 2 asm? I've managed to **** it up by inserting a new move into the game that it activates instead of jumping (my guess is the cutscene jump is assigned to A button).
     
  6. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,735
    334
    63
    SonLVL
    At loc_3AA74 and below, change all occurences of "move.w #$4040,(Ctrl_1_Logical).w" to "move.w #$2020,(Ctrl_1_Logical).w". There's also one that uses #$4848, change that to #$2828. Then the cutscene will use the C button.
     
  7. Hanoch

    Hanoch

    Also known as TheKnock, Birashot Member
    491
    0
    0
    Israel
    everything
    Hey I have a problem with sonic 1 (regarding to level layouts) I recently redrew a new level, but when placing chunk 00, it actually loads the colour used by the background sky, and not the transprent colour. So whenever this chunk is onscreen, the background gets removed. Any way how to fix that? I cant find a proper solution,
     
  8. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Yay, it works. The oddest thing happens however. When Amy clings onto Eggman's ship she seems to take a hit and lose her rings. My only guess is that there is some obstacle that the latch is made of that Sonic's spin jump would usually protect the player from.

    Forgot to mention, nice avatar. Is it planned to become a reality?
     
  9. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,735
    334
    63
    SonLVL
    It IS real, but this isn't the place to discuss it. I might make a thread for it, maybe.
     
  10. A quick and dirty way to fix this would be to keep Amy's invincibility flag set throughout the whole cutscene (bset #1,status_secondary(a0)).
     
  11. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Oddly when I put this code in it screws up the timing of the jump and leads the player to fall to their death. Don't suppose there is an exact position it needs to be put in for it to work properly?
     
  12. Selbi

    Selbi

    The Euphonic Mess Member
    1,497
    48
    28
    Northern Germany
    Sonic ERaZor
    Instead of making the code relative, you can make it absolute and put it whereever you like:
    Code (ASM):
    1.     bset    #1,($FFFFB02B).w    ; make player 1 invincible
    If you want to keep S2's label thingy, you could also use this:
    Code (ASM):
    1.     bset    #1,(MainCharacter+status_secondary).w   ; MainCharacter + status_secondary = $FFFFB02B
     
  13. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Got the first one to work. Thanx. :D
     
  14. amphobius

    amphobius

    doing more important things with my life Member
    2,120
    0
    16
    life
    Using the Sonic 2 Clone Driver, is there any way I can add another PCM Table? I'd like to use more than $9B samples, as every time I add more to the table it's always static or crashing the Z80.
     
  15. GT Koopa

    GT Koopa

    Member
    2,021
    18
    18
    Elgin, IL
    Flicky Turncoat DX, T.L.W.S. Vs M.G.W.
    So I am right now making it so Flicky appears in every zone while each other little animal gets their own zone. I have edited the code to something like this:

    Code (ASM):
    1.  
    2. Obj28_VarIndex: dc.b 0, 5, 2, 5, 6, 5, 3, 5, 4, 5, 1, 5
    3.  
    4. Obj28_Variables:dc.w $FE00, $FC00 ;(Pocky)
    5.         dc.l Map_obj28
    6.         dc.w $FE00, $FD00   ; horizontal speed, vertical speed (Flicky SYZ) AKA CUCKY
    7.         dc.l Map_obj28a     ; mappings address
    8.         dc.w $FE80, $FD00 ;penguins
    9.         dc.l Map_obj28
    10.         dc.w $FEC0, $FE80 ;Flicky (LZ) AKA REAL SEAL
    11.         dc.l Map_obj28a
    12.         dc.w $FE40, $FD00 ;Seal AKA PIG
    13.         dc.l Map_obj28b
    14.         dc.w $FD00, $FC00 ;Flicky (1st level)
    15.         dc.l Map_obj28a
    16.         dc.w $FD80, $FC80 ;Ricky
    17.         dc.l Map_obj28b
    18.  
    =================
    =================
    As well as the pattern load cues like this:

    Code (ASM):
    1. ; ---------------------------------------------------------------------------
    2. ; Pattern load cues - GHZ animals
    3. ; ---------------------------------------------------------------------------
    4. PLC_GHZAnimals: dc.w 1
    5.         dc.l Nem_Rabbit     ; rabbit
    6.         dc.w $B000
    7.         dc.l Nem_Flicky     ; flicky
    8.         dc.w $B240
    9. ; ---------------------------------------------------------------------------
    10. ; Pattern load cues - LZ animals
    11. ; ---------------------------------------------------------------------------
    12. PLC_LZAnimals:  dc.w 1
    13.         dc.l Nem_BlackBird  ; blackbird
    14.         dc.w $B000
    15.         dc.l Nem_Flicky     ; flicky
    16.         dc.w $B240
    17. ; ---------------------------------------------------------------------------
    18. ; Pattern load cues - MZ animals
    19. ; ---------------------------------------------------------------------------
    20. PLC_MZAnimals:  dc.w 1
    21.         dc.l Nem_Squirrel   ; squirrel
    22.         dc.w $B000
    23.         dc.l Nem_Flicky     ; flicky
    24.         dc.w $B240
    25. ; ---------------------------------------------------------------------------
    26. ; Pattern load cues - SLZ animals
    27. ; ---------------------------------------------------------------------------
    28. PLC_SLZAnimals: dc.w 1
    29.         dc.l Nem_Seal       ; seal
    30.         dc.w $B000
    31.         dc.l Nem_FLicky     ; flicky
    32.         dc.w $B240
    33. ; ---------------------------------------------------------------------------
    34. ; Pattern load cues - SYZ animals
    35. ; ---------------------------------------------------------------------------
    36. PLC_SYZAnimals: dc.w 1
    37.         dc.l Nem_Pig        ; pig
    38.         dc.w $B000
    39.         dc.l Nem_Flicky     ; flicky
    40.         dc.w $B240
    41. ; ---------------------------------------------------------------------------
    42. ; Pattern load cues - SBZ animals
    43. ; ---------------------------------------------------------------------------
    44. PLC_SBZAnimals: dc.w 1
    45.         dc.l Nem_Chicken    ; chicken
    46.         dc.w $B000
    47.                 dc.l Nem_Flicky     ; flicky
    48.         dc.w $B240
    When it is all said and done most work, however when I try Starlight Zone with an imported seal, I get this:

    [​IMG]

    I know it is hard to tell, but Flicky is taking up both the regular spot AND the seal. When I switch it around the SEAL takes up both spots. So yeah. High flyin' Rocky. Both animals' art is loaded at the same time. What went wrong?

    I am also looking into fixing those out of control hitboxes on the little animals as well. $16 $17 and all that. But where should I put it within the animals' code so it can actually work? So far I have had no luck.
     
  16. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    I have a problem with the lamp post on my hack. It seems that everytime I perform an spindash the lamp post gets screwed, and while you perform the spindash you can clearly see the spindust on the lamp as well. If you don't use the spindash this bug doesn't activate. Anyone knows how to fix it? Thank you~
     
  17. The spin dash porting guide has steps on how to fix that problem. See SCHG How-to:Add Spin Dash to Sonic 1/Part 2#Problem_4:_Spin_Dash_Dust.
     
  18. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    ah yes, I followed that one. The problem is that im using the adress $D800 for other stuff, otherwise the badniks won't display the points once you kill them and I'm not sure which one I should be using now
     
  19. StephenUK

    StephenUK

    Liquor in the front, poker in the rear Tech Member
    1,678
    0
    16
    Manchester, UK
    Quackshot Disassembly
    From what you've said, my guess would be that the mappings for the animals are looking in the same location in VRAM. In their respective zones, they probably both occupied the same spot in VRAM. Just tweak the mappings for the seal to use the new VRAM location and you should be good to go.
     
  20. Selbi

    Selbi

    The Euphonic Mess Member
    1,497
    48
    28
    Northern Germany
    Sonic ERaZor
    Unless you already used this location as well, you could use $F400. It's big enough for the lamppost stuff. Just follow the guide and everywhere it says $D800 just put $F400 instead.