help how to add news levels,add homing and add "s" monitors in sonic 2

Discussion in 'Discussion and Q&A Archive' started by Florian, Jul 7, 2013.

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

    Florian Active Member Exiled

    Joined:
    Jun 29, 2013
    Messages:
    31
    I like add news levels,add homing and add "s" monitors in sonic 2 but I don't know how.Can you help me !
     
  2. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    You need to be more specific. Do you mean add more level slots?
     
  3. Florian

    Florian Active Member Exiled

    Joined:
    Jun 29, 2013
    Messages:
    31
    not, add levels as hidden palace (sorry, I'm not specific because I'm French)
     
  4. Spanner

    Spanner The Tool Member

    Joined:
    Aug 9, 2007
    Messages:
    2,570
    We're not going to do all the work for you. You need to do your research.

    Find out all the parts that make up an entire level. Figure out how a monitor works. Obviously you don't know any of this, so why should we tell you about how to have the homing attack in your hack? Nobody's going to give you everything on a silver platter.

    Look at your disassembly and see how things work.
     
  5. Florian

    Florian Active Member Exiled

    Joined:
    Jun 29, 2013
    Messages:
    31
    I tested something for the monitor "s" but it did not work
     
  6. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Does this "S" monitor turn you into Super Sonic? If so, you can copy (or make branch to subroutine) the code that transforms Sonic into Super into the monitor code, then just draw the "S".

    You can port Hidden Palace from an S2Beta ROM. The homing attack, I don't know, but that's a little bit out of your league right now.
     
  7. Florian

    Florian Active Member Exiled

    Joined:
    Jun 29, 2013
    Messages:
    31
    my code is like that and it did not work


    Code:
    Super_Monitor:
    addq.w #1,(a2)
    cmpi.w #2,(Player_mode).w; is player Tails?
    bls +; if not, branch
    rts
    
    +
    lea (Ring_count).w,a2
    addq.w #32,($FFFFFE20).w; add 50 to rings
    ori.b #$80,(Update_HUD_rings).w
    
    move.b #1,(Super_Sonic_palette).w; set the super form palette
    move.b #$F,(Palette_frame_count).w
    move.b #1,(Super_Sonic_flag).w; switch on the super sonic flag
    move.b #$81,obj_control(a0)
    move.b #$1F,anim(a0); use roll/transformation animation;1F for transform slot
    move.b #$7E,(Object_RAM+$2040).w; load Obj7E (super sonic stars object) at $FFFFD040
    move.w #$A00,(Sonic_top_speed).w
    move.w #$30,(Sonic_acceleration).w
    move.w #$100,(Sonic_deceleration).w
    move.w #0,invincibility_time(a0)
    bset #1,status_secondary(a0); make Sonic invincible
    move.w #$5F+$80,d0
    jsr (PlaySound).l; Play transformation sound effect.
    move.w #$16+$80,d0
    jsr (PlayMusic).l; load the Super Sonic song and return
    ; ============================================================================
    
     
  8. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    Firstly, what doesn't work?

    Secondly, you've only copied the physics. The ring loss code is missing.
     
  9. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Code:
    bls +; if not, branch
    Needs to be blt


    Code:
    lea (Ring_count).w,a2
    I don't think you need this, seeming as nothing is using a2 after anyway.


    Code:
    jsr (PlayMusic).l; load the Super Sonic song and return
    It needs to be jmp instead of jsr, I think. Depends what's after the code (another monitor I'm guessing).
     
  10. Florian

    Florian Active Member Exiled

    Joined:
    Jun 29, 2013
    Messages:
    31
    it work but i have a problem, supersonic is not invincible and I had to delete this one line below, if it does not work.



    addq.w #32,($FFFFFE20).w; add 50 to rings


    except that I would that the monitor add me 50 rings.
     
  11. Irixion

    Irixion Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    670
    Location:
    Ontario, Canada
    When giving yourself rings, you need to do a few things. Give yourself rings, and update the HUD to reflect the changes. Go look and see how this works in the ring monitor.
     
  12. Florian

    Florian Active Member Exiled

    Joined:
    Jun 29, 2013
    Messages:
    31
    I tried some stuff but I haven't found
     
  13. Irixion

    Irixion Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    670
    Location:
    Ontario, Canada
    FE20 is Ring Count. If your code is ran, this would give you 32 rings, not 50. On top of adding to the ring count, you also need to update the HUD. Again, look for the ring monitor code to see how it does this. You've got some of the pieces of what you need, you just need to put them together.

    Invincibility is another thing you need to tell the game to do. Look at the invincibility monitor code. You'll want to search for Obj26 as this is the monitor object.
     
  14. Florian

    Florian Active Member Exiled

    Joined:
    Jun 29, 2013
    Messages:
    31
    I have tried adding stuff 10 rings monitor but it still does not work.Look my file clip0005.rar
     

    Attached Files:

  15. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Irixion, he already has:

    Code:
    ori.b #$80,(Update_HUD_rings).w
    Although, try ori'ing it with #1, or #$81.
     
    Last edited by a moderator: Jul 8, 2013
  16. Florian

    Florian Active Member Exiled

    Joined:
    Jun 29, 2013
    Messages:
    31
    it works but I can put that 1 to 8 rings.How to add 50 rings?



    addq.w #8,($FFFFFE20).w; add 50 to rings


    ps:do you know why re sonic retro forums is inaccessible
     
    Last edited by a moderator: Jul 8, 2013
  17. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    addq is the fastest way to add something to whatever, but it's only able to do values from 1-8. From 9 upwards, addq needs to be addi. So, try this:

    Code:
    addi.w #50,($FFFFFE20).w; add 50 to rings
     
  18. Florian

    Florian Active Member Exiled

    Joined:
    Jun 29, 2013
    Messages:
    31
    thank you redhotsonic , it works!!!!! But how do you make sonic invincible?

    (I understand that your hacks are so cool)
     
  19. Irixion

    Irixion Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    670
    Location:
    Ontario, Canada
    Your question has already been answered. Look, I understand English isn't easy for you--I get it, it's my third language. But I know you understand what I just typed out in bold for you.
     
  20. Florian

    Florian Active Member Exiled

    Joined:
    Jun 29, 2013
    Messages:
    31
    I tried to copy part of the code OBJ26 but it did not work ...
     
Thread Status:
Not open for further replies.