don't click here

Questions about a sonic 1 object

Discussion in 'Engineering & Reverse Engineering' started by AbsoluteG, Apr 5, 2006.

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

    AbsoluteG

    disgusted by origins plus Oldbie
    182
    4
    18
    A black Hole
    life and shit..., a sonic 1 remake
    Is it possible to modify how fast it goes when sonic is running? I would like to make them go slower, kinda like the similar object in CPZ from sonic 2. I tried modifying several instructions, but that did nothing, or caused really strange results.

    [​IMG]
     
  2. Tweaker

    Tweaker

    Banned
    12,387
    2
    0
    I *think* it's part of the background layer deformation. You'd do good to check around that area and see what you can come up with.
     
  3. Rika Chou

    Rika Chou

    Tech Member
    5,276
    169
    43
    If it's anything like the one used in S2 CPZ, then it's a special object that's loaded only for that level slot.

    If this is the case, it's speed would not be defined in the deformation data, but in the object code itself.
     
  4. drx

    drx

    mfw Researcher
    2,254
    350
    63
    :rolleyes:
    All I have found out so far is that this graphics is a sprite, so it's loaded by an object. But this object is not connected with Dynamic Level Event or ("background layer deformation", as Tweaker said). I think it's an object placed at the beginning of SLZ, I need to check.
     
  5. LOst

    LOst

    Tech Member
    4,891
    8
    18
    Yes it is possible. But the girder (it is only one repeating itself) uses the viewport position to set its position, and not Sonic's position. Remember that this object is a screen object used for background effects only. No clipping is necessary, since it would just slow down the game.

    If you are not good at assembler, it is the two "add.l d1,d1"'s that you need to change to make it move slower or faster. This is done with asr (slower) or lsl (faster)!

    Code (Text):
    1. ROM:0001106E                 move.l  ($FFFFF700).w,d1; Get X viewport 16.16 precision
    2. ROM:00011072                 add.l   d1,d1 ; Let girder move double the X viewport position
    3. ROM:00011074                 swap    d1  ; Use only the integer part
    4. ROM:00011076                 neg.w   d1  ; Move backwards
    5. ROM:00011078                 move.w  d1,8(a0)  ; Store into screen object X (wrappoint 512)
    6. ROM:0001107C                 move.l  ($FFFFF704).w,d1; Get Y viewport 16.16 precision
    7. ROM:00011080                 add.l   d1,d1 ; Let girder move double the Y viewport position
    8. ROM:00011082                 swap    d1  ; Use only the integer part
    9. ROM:00011084                 andi.w  #$3F,d1   ; Set wrappoint 64
    10. ROM:00011088                 neg.w   d1  ; Move backwards
    11. ROM:0001108A                 addi.w  #$100,d1  ; Fix the screen object Y onto the display area
    12. ROM:0001108E                 move.w  d1,$A(a0) ; Store into screen object Y
    Good luck!
     
  6. Tweaker

    Tweaker

    Banned
    12,387
    2
    0
    LOst, you're back! =D

    Very interesting info, by the way.
     
  7. stormislandgal

    stormislandgal

    It's not a phase! Tech Member
    4,534
    10
    18
    Married life <3
    Hmm... this could be useful. And congratulations, LOst!
     
Thread Status:
Not open for further replies.