Simple questions

Discussion in 'Discussion and Q&A Archive' started by Mohammad Sanjakdar, Jan 26, 2015.

Thread Status:
Not open for further replies.
  1. Mohammad Sanjakdar

    Mohammad Sanjakdar Newcomer Trialist

    Joined:
    Jan 20, 2015
    Messages:
    12
    Location:
    Aleppo, Syria
    Hi everybody i just got trail membership YAY and i am here for knowledge

    I have some simple questions to ask

    1-In the level size.bin in the misc folder how to modify the sides boundarys i got confused when i tried to edit it

    2- Many of the tutorials in Sonicretro are for Hivebrain,s disassembly

    and i am using Github (SVN) disassembly and when i try to transfer the code to Github code i get into problems

    3-How to import the Super peel out?

    4-How to import the jump dash?

    5-I made a double jump by simply copying the jump subroutine and rename it than put it in mdjump1 and mdjump2 in Sonic.asm but it doesn`t have jump direction nor jump hight and its infinite i need help fixing this and a new code can do it too

    6-how to modify where the level should end?

    thanks for any help :)
     
    Last edited by a moderator: Jan 26, 2015
  2. Misinko

    Misinko Oh SHIT it's the Biolizard! Member

    Joined:
    Apr 30, 2013
    Messages:
    722
    Location:
    Ohio
    #2: What kind of errors exactly? We can't (or rather, others can't) help you if you aren't specific. 

    #3: Here's a guide from Sonic Retro.

    The rest are issues I haven't the first inkling on how to fix/help you with.  
     
    Last edited by a moderator: Jan 26, 2015
  3. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    1 - They're screen coordinates. You can find out what the screen coordinates of each zone are and what you want to change them to by using debug, IIRC.

    2 - Change the labels to match the SVN ones.

    3 - You can easily modify a simple spindash from the Sonic 2's Early Prototype disassembly. I've not made one in ages, but you might have to remove a few things, like the rolling state, which is $22 if I remember correctly.

    4 - There's a guide somewhere on here.

    5 - It isn't that easy, sorry.

    6 - See #1.

    Also, I think it's worth it that I point you here. Assembly is quite complex if you've had no prior experience, and a decent head start will do you well. You should be able to make a simple double-jump and peelout on your own if you spend a few hours on the link and familiarising yourself with Sonic 1/2/Whatever's flags. Good luck!
     
  4. Psi

    Psi Well-Known Member Member

    Joined:
    Dec 20, 2014
    Messages:
    102
    Here's a jump dash tutorial:

    http://sonicresearch.org/forums/index.php?showtopic=972

    Concerning the double jump, notice on the tutorial there's a RAM address referred to as the jump dash flag? When that's set in the code it limits how many times you can perform the move. Add the branches for it into your double jump routine and then simply add a clr.b for the flag at the top Sonic_ResetOnFloor so it is active again when you land as the tutorial shows.

    It may perhaps be easiest to just use the jump dash code and modify it to go vertically (eg. instead of "move.w    d0,$10(a0)for the standard speed alter it to "move.w    d0,$12(a0)" and change the clr.b $12 to $10.
     
    Last edited by a moderator: Jan 26, 2015
  5. Mohammad Sanjakdar

    Mohammad Sanjakdar Newcomer Trialist

    Joined:
    Jan 20, 2015
    Messages:
    12
    Location:
    Aleppo, Syria
    Thanks everybody for the help i have some other questions to ask: 

    1-now i am trying to make a power up monitor after i read the guide Dandaman955 gave me and its just not working

    I modyfied he goggle monitor powerup to this:

    Pow_ChkGoggles:

                    cmpi.b #8,d0 ; does monitor contain Goggles?

                    bne.s Pow_ChkEnd

                    cmpi.b #id_SLZ,(v_zone).w

                    beq.w   SLZ_Is_The_Level

     

    SLZ_Is_The_Level:

                    move.b  #$01,($FFEEDDCC) 

    And modyfied the spin dash subroutine to this:

    ; ---------------------------------------------------------------------------

    ; Subroutine allowing Sonic to Spindash

    ; ---------------------------------------------------------------------------

     

    ; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||

     

     

    Sonic_SpinDash:

     tst.b $39(a0)

    bne.s loc_1AC8E

    cmpi.b #8,$1C(a0)

    bne.s locret_1AC8C

    move.b ($FFFFF603).w,d0

    andi.b #$70,d0

    beq.w locret_1AC8C

    cmpi.b #id_SLZ,(v_zone).w

    beq.w   Level_Is_SLZ

    bra.w:   SpinDash_cont

     

    SpinDash_cont:

    move.b #2,$1C(a0)

    move.w #$BE,d0

    jsr (PlaySound_Special).l

    addq.l #4,sp

    move.b #1,$39(a0)

    move.w #0,$3A(a0)

    cmpi.b #$C,$28(a0)

    bcs.s loc_1AC84

    move.b #2,($FFFFD11C).w

     

    Level_Is_SLZ:

    cmpi.b  #$01,($FFEEDDCC)

    beq.w   SpinDash_Cont

     

    loc_1AC84:

    bsr.w Sonic_LevelBound

    bsr.w Sonic_AnglePos

     

    locret_1AC8C:

    rts

    ; ---------------------------------------------------------------------------

     

    loc_1AC8E:

    move.b ($FFFFF602).w,d0

    btst #1,d0

    bne.w loc_1AD30

    move.b #$E,$16(a0)

    move.b #7,$17(a0)

    move.b #2,$1C(a0)

    addq.w #5,$C(a0)

    move.b #0,$39(a0)

    moveq #0,d0

    move.b $3A(a0),d0

    add.w d0,d0

    move.w Dash_Speeds(pc,d0.w),$14(a0)

     

    loc_1ACD0:

    move.w $14(a0),d0

    subi.w #$800,d0

    add.w d0,d0

    andi.w #$1F00,d0

    neg.w d0

    addi.w #$2000,d0

    move.w d0,($FFFFEED0).w

    btst #0,$22(a0)

    beq.s loc_1ACF4

    neg.w $14(a0)

     

    loc_1ACF4:

    bset #2,$22(a0)

    move.b #0,($FFFFD11C).w

    move.w #$BC,d0

    jsr (PlaySound_Special).l

    bra.s loc_1AD78

    ; ===========================================================================

    Dash_Speeds: dc.w  $A80 ; 0

    dc.w  $AFF ; 1

    dc.w  $B40 ; 2

    dc.w  $BFF ; 3

    dc.w  $C40 ; 4

    dc.w  $CFF ; 5

    dc.w  $DFF ; 6

    dc.w  $EFF ; 7

    dc.w  $FFF ; 8

    ; ===========================================================================

     

    loc_1AD30: ; If still charging the dash...

    tst.w $3A(a0)

    beq.s loc_1AD48

    move.w $3A(a0),d0

    lsr.w #5,d0

    sub.w d0,$3A(a0)

    bcc.s loc_1AD48

    move.w #0,$3A(a0)

     

    loc_1AD48:

    move.b ($FFFFF603).w,d0

    andi.b #$70,d0 ; 'p'

    beq.w loc_1AD78

           ;move.w #$900,$1C(a0)

    move.w #$BE,d0 ; 'à'

    jsr (PlaySound_Special).l

    addi.w #$200,$3A(a0)

    cmpi.w #$800,$3A(a0)

    bcs.s loc_1AD78

    move.w #$800,$3A(a0)

     

    loc_1AD78:

    addq.l #4,sp

    cmpi.w #$60,($FFFFEED8).w

    beq.s loc_1AD8C

    bcc.s loc_1AD88

    addq.w #4,($FFFFEED8).w

     

    loc_1AD88:

    subq.w #2,($FFFFEED8).w

     

    loc_1AD8C:

    bsr.w Sonic_LevelBound

    bsr.w Sonic_AnglePos

    move.w #$60,($FFFFF73E).w

    rts

    ; End of subroutine Sonic_SpinDash

     

    when i take the goggle monitor nothing happens.

     

    Edit:I fixed it and now it works but if i take it in act1 it wont work in act2 how to make it work in the whole Zone if i take it?

     

    2-In the jump dash tutorial that psi gave me how can i know where to compare the byte so sonic cant double jump again

     

    3-In the same jump dash tutorial it check,s if A,B or C is pressed i want it only to check for C how can i do that?

     

    4-I don`t understand anything in the peelout guide that misinko gave me

     

    Thanks for any help again :)
     
    Last edited by a moderator: Jan 28, 2015
  6. presto

    presto Raised from the dead... Member

    Joined:
    Oct 12, 2014
    Messages:
    40
    Location:
    Cluj-Napoca
    2: What are you talking about?

    3: Read this.

    4: Tip: Learn ASM. Don't except people to do the work for you. Afterwards, you can do your own code, and you will feel more satisfied with yourself, in the end. :D

    Just to make it simple for you, here's a list of basic ASM guides:

    - MarkeyJester's ASM Tutorial (best one out there, really recommending this)

    - redhotsonic's ASM Tutorial (good tutorial, but I still recommend the above more)

    If you have any questions considering ASM, feel free to ask. :)
     
  7. Mohammad Sanjakdar

    Mohammad Sanjakdar Newcomer Trialist

    Joined:
    Jan 20, 2015
    Messages:
    12
    Location:
    Aleppo, Syria
    Thanks Presto for your help but i already read that guide and my problem is that sonic disassembly usally uses addresses like (v_Zone) not ones like ($22FFEE88)

    Thats why i am having problems

    And i want to use an address for my new monitor that is like the (v_EmrdList) address so it dont get deleted at all  
     
  8. TheInvisibleSun

    TheInvisibleSun Visible Member

    Joined:
    Jul 2, 2013
    Messages:
    424
    Location:
    Western New York, USA
    Last edited by a moderator: Jan 29, 2015
  9. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    1. I think that it's in XXYY format for each zone. one is horizontal, one is vertical ( i think in one of my projects i have mine as dc.w since XXYY values instead of .bin)

    2. All, if i'm not mistaken... wait... some of them have have macros live V_joypad & whatnot.

    3. Go find a sprite sheet with a peelout with rotated sprites. There's a tutorial for a 3rd run on here. & use the spindash tutorial, just change the animation to whatever peelout is, Be sure to use sonmaped to add peelout sprites, & chance down to up, & no dust unless you plan it.

    4. there's a tutorial on here somewhere on a jumpdash

    5. Jumpdash tutorial again, just change x_vel to y_vel (i think)

    6. maybe you're referring to levelorder.bin, in mine i've commented out levelorder.bin & have

    ;dc.w zzaa = zone zone act act
    dc.w 0000 ; GHZ1
    dc.w 0100 ; LZ1
    ... more zones

    edit this
     
  10. Mohammad Sanjakdar

    Mohammad Sanjakdar Newcomer Trialist

    Joined:
    Jan 20, 2015
    Messages:
    12
    Location:
    Aleppo, Syria
    Thanks TheInvicibleSun and Warr1or2

    For the level end thing i mean where the level should end not the level order
     
    Last edited by a moderator: Feb 5, 2015
  11. Mohammad Sanjakdar

    Mohammad Sanjakdar Newcomer Trialist

    Joined:
    Jan 20, 2015
    Messages:
    12
    Location:
    Aleppo, Syria
    Since nobody posted here for some time ill ask some other questions:

    1-Should i ask all these questions in the pinned basic questions post?

    2-After following the dynamic tilesets guide in Sonic retro i ended up with nothing because as i said before i am using Github disassembly and its for Hivebrain,s disassembly and when i tried to do some fixes i made everything go wrong (almost all act2 and act3 does not work and if it worked the tiles are all just a mess)

    3-After porting the spindash from the tutorial on Sonic retro it all gone right but Sonic is above the ground by about 4 pixels when i perform a spindash

    And again thanks for all the help
     
  12. presto

    presto Raised from the dead... Member

    Joined:
    Oct 12, 2014
    Messages:
    40
    Location:
    Cluj-Napoca
    1. Probably


    2. Nevermind.


    3. You probably did the mappings wrong. The sprite must be 4 pixels higher than the other sprites.
     
    Last edited by a moderator: Feb 6, 2015
  13. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    2. Of course. The first thing on the way to being a half-decent hacker is being able to port code between disassemblies. It requires knowledge of equates, and the instructions and addressing modes that use them. My first experience was porting Knuckles from KiS2 to the Git S2 disassembly, which required I equate the SSTs, otherwise the object would break upon following other guides. It's also vital that you understand differing labels.
     
  14. Mohammad Sanjakdar

    Mohammad Sanjakdar Newcomer Trialist

    Joined:
    Jan 20, 2015
    Messages:
    12
    Location:
    Aleppo, Syria
    Thanks for the help about:

    no.2-I tried my best porting the code between disassemblys i didn`t just copy past the code but it didn`t work becuase i noticed the Github disassembly has more things than hivebrain,s

    no.3-This happend even when i use the rolling animation so i don`t know were the problem is

    And i have some other questions:

    1-in the music hacking guide (other games and data locations section) i tried to find the MJ.Moonwalker beat it sound location but when i go to location givin in the guide i didnt find anything and in the music pointers location everything is just FF

    2-How to check that sonic got a gameover and he don`t have any continues?

    Thanks for the help and thanks for any other help
     
    Last edited by a moderator: Feb 6, 2015
Thread Status:
Not open for further replies.