don't click here

Basic Questions & Answers thread

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

  1. Having trouble getting the spindash rev sound to work. I did everything the guide said, but I get one error.

    Code (Text):
    1. > > >s2.asm(91619): error: invalid symbol name
    2. > > > @cont
    3. > > > @cont:
    I've found out that you can change @cont to something else to get it to work. However, I still can't get the spindash rev to work (even if it does compile).

    Anyone? D:
     
  2. If you're working with Sonic 2, you'll probably be using AS, so either replace all instances of @cont with $$cont (and if there are any other @labels you'll have to change those to $$labels as well), or else just use nameless temporary symbols (which are awesome for this sort of stuff).

    EDIT: Completely missed the part saying that even if it does compile it doesn't work - if you are using Sonic 2 (which I think you are), that's most probably caused by the RAM variables I've used in the S1 code being used for other stuff in Sonic 2. You'll have to use some other addresses for them - $FEB0-$FEBF is unused for example.
     
  3. Thanks, I'll change the addresses and see how that works out.
     
  4. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    I'm porting an enemy from sonic 1, yet, I can't seem to get it to flip the other way correctly.

    in S1 it uses this:
    Code (ASM):
    1.         move.w  d0,$30(a0)  ; set turn delay time
    2.         move.w  d0,$32(a0)
    Yet in S2 those are used for

    Code (ASM):
    1. invulnerable_time = $30 ; and $31 ; time remaining until you stop blinking
    2. invincibility_time =    $32 ; and $33 ; remaining
    So yeah, that fails...
     
  5. Malevolence

    Malevolence

    Tech Member
    274
    0
    16
    From what I can tell, all it's doing is setting a timer. I'm pretty sure you can still use $30 and $32, as those are invulnurable and invincible when used for sonic. If it doesn't work, you could try using a different SST that isn't being used by the object.
     
  6. FraGag

    FraGag

    Tech Member
    That's for Sonic and Tails only, so you're free to use them on other objects. The same offsets are used in Sonic 1 for Sonic.
     
  7. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    I tried to use them, yet the enemy would spaz, and flip back and forth in place.
     
  8. Malevolence

    Malevolence

    Tech Member
    274
    0
    16
    Which enemy are you porting?
     
  9. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    Jaws.
     
  10. FraGag

    FraGag

    Tech Member
    Well, make sure the subtype is not 0, because the object uses the subtype to determine the distance it will travel before turning around.
     
  11. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    All I did was change SpeedToPos to the S2's ObjectMove and port the mapping, art and animations. Besides that, nothing was changed, so I am not sure why it won't work correctly.

    Edit: I even looked at the S2NA disassembly, and that didn't help.

    Edit2: here's what it looks like:

    [​IMG]
     
  12. I had that problem while moving my EHZ boss, I was missing a few x_pos and y_pos but in your case they should be adding to the current pos. You sure you didn't miss anything?
     
  13. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    Positive, all that needed to be changed was the object number, and a few lines, along with the mappings, So I am not too sure why it would do this.
     
  14. stormislandgal

    stormislandgal

    It's not a phase! Tech Member
    4,534
    10
    18
    Married life <3
    If I recall, the jaws badnik gets it's movement from it's sub-object number. 00 is gonna make it do that, put it to $40 and it should move a bit.
     
  15. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    The subtype was normally set up at #0

    Code (ASM):
    1.         moveq   #0,d0
    2.         move.b  $28(a0),d0  ; load object subtype number
    3.         lsl.w   #6,d0       ; multiply d0 by 64
    4.         subq.w  #1,d0
    5.         move.w  d0,turn_delay(a0)   ; set turn delay time
    6.         move.w  d0,turn_delay2(a0)
    Changing it also seems to make no difference.
     
  16. Spanner

    Spanner

    The Tool Member
    Probably a stupid question, was the collision in S2&K modified for Knuckles' wall climbing?
     
  17. MoDule

    MoDule

    Tech Member
    327
    24
    18
    Procrastinating from writing bug-fix guides
    Do you mean level collision or collision testing? If it's the former, I'm pretty sure it wasn't, because my port works perfectly fine.
     
  18. Spanner

    Spanner

    The Tool Member
    I meant level collision, my Knuckles port sometimes ends up getting trapped or falling to the bottom of the screen.
     
  19. I have a question.

    How difficult is it to reprogram bosses (Sonic 1 OR 2)? Not fully remake, but let's say, remove the checkerball swing from the GHZ boss and make it shoot Buzzbomber projectiles. How hard would something like that be?

    Purely for curiosity's sake.
     
  20. Spanner

    Spanner

    The Tool Member
    To disable the swinging wrecking ball remove:
    Code (ASM):
    1. move.b  #$48,0(a1)  ; load swinging ball object
    From Obj3D_MakeBall. I tried commenting out the subroutine but then Robotnik would only move a bit and the defeat fucked up a bit.