Basic Questions and Answers Thread

Discussion in 'Discussion & Q&A' started by Malevolence, Jul 7, 2009.

  1. Psi

    Psi Well-Known Member Member

    Joined:
    Dec 20, 2014
    Messages:
    70
    Okay I've got that previous move working, but I want to edit it. Thus far it makes a trail of the same object appear four times in a row with a specific animation:

    Code:
    ; ---------------------------------------------------------------------------
    ; Subroutine for Sonic's hammer spin animation
    ; ---------------------------------------------------------------------------
     
    ; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
     
    Sonic_HammerSpin:
    move.b ($FFFFF603).w,d0 ; move the current button press to d0
    btst #1,($FFFFF602).w ; is Down button pressed?
    beq.s HS_End1 ; if not, return
    and.b #$40,d0 ; get only button A
    beq.s HS_End1 ; if A was pressed, branch
    tst.b ($FFFFFFCC).w ; was jumpdash flag set?
    beq.s HammerSpin_Cont ; if yes, branch
    ;bra.s HammerSpin_Hearts
    HS_End1:
    rts
     
    HammerSpin_Cont:
    move.b  #1,($FFFFFFCC).w                ; set jumpdash flag
    move.b  #$20,$1C(a0)                    ; show hammer animation
    move.w  #$BC,d0                         ; set jumpdash sound
    jsr    (PlaySound).l                   ; play jumpdash sound
     
    HammerSpin_Hearts:
    cmpi.b #$20,$1C(a0) ; is Sonic in the jumping animation? 
    bne.w HS_End2 ; if not, return 
    bsr     SingleObjLoad
    bne     HS_End2
    move.b  #$10,(a1)
    move.l  8(a0),d0
    move.l  $C(a0),$C(a1)
    move.b  #0,$1C(a1) 
    btst    #0,$22(a0)
    beq     @Set1stXPos
    neg     $10(a1)
    move.b  #2,$1C(a1)
    
    @Set1stXPos:
    move.b  #0*2,$2A(a1)
    cmpi.b #$20,$1C(a0) ; is Sonic in the jumping animation? 
    bne.w HS_End2 ; if not, return 
    bsr     SingleObjLoad
    bne     HS_End2 
    move.b  #$10,(a1)
    move.l  8(a0),8(a1)
    move.l  $C(a0),$C(a1)
    move.b  #1,$1C(a1)
    @Set2ndFrameDuration:
    move.b  #2*2,$2A(a1)
    cmpi.b #$20,$1C(a0) ; is Sonic in the jumping animation? 
    bne.w HS_End2 ; if not, return
    bsr     SingleObjLoad
    bne     HS_End2
    move.b  #$10,(a1)
    move.l  8(a0),d0
    move.l  $C(a0),$C(a1)
    move.b  #2,$1C(a1)
    btst    #0,$22(a0)
    beq     @Set3rdXPos
    neg     $10(a1)
    move.b  #0,$1C(a1)
    
    @Set3rdXPos:
    move.b  #4*2,$2A(a1)
    cmpi.b #$20,$1C(a0) ; is Sonic in the jumping animation? 
    bne.w HS_End2 ; if not, return
    bsr     SingleObjLoad
    bne     HS_End2 
    move.b  #$10,(a1)
    move.l  8(a0),8(a1)
    move.l  $C(a0),$C(a1)
    move.b  #3,$1C(a1)
     
    @Set4thFrameDuration:
    move.b  #6*2,$2A(a1)
    
    HS_End2:
    clr.w   $10(a0) ; clear X-velocity to move sonic directly down
    tst.w   $12(a0)                                 ; is Sonic moving upwards?
    bpl.s   HS_End3                                 ; if not, branch
    clr.w   $12(a0)                                 ; clear X-velocity to move sonic directly down
     
    HS_End3:
    rts
    
    What I want it to do is make a trail of these four objects in a never-ending loop until the player's animation changes. Any idea how to keep it going?
     
    Last edited by a moderator: Mar 15, 2015
  2. JoenickROS

    JoenickROS ROS is on hiatus. (...again) Member

    Joined:
    Feb 5, 2012
    Messages:
    919
    Finally someone else who is making unique character move sets! Tired of seeing only the spindash, peelout, or homing attack in other hacks. Wish I could help you with your issue, good luck though, I believe in ya!
     
    Last edited by a moderator: Mar 15, 2015
  3. Psi

    Psi Well-Known Member Member

    Joined:
    Dec 20, 2014
    Messages:
    70
    Well it's really just a tweak of my already quite old Amy hack. I'm making new revisions to make everything work closer to how she did in Advance 1. This will refine the hearts trail from her hammer attacks.
     
  4. JoenickROS

    JoenickROS ROS is on hiatus. (...again) Member

    Joined:
    Feb 5, 2012
    Messages:
    919
    Oh Alright, should be labeled Amy's Hammer attack then lol naw I'm fooling. Also I believe I've played that old version.
     
    Last edited by a moderator: Mar 15, 2015
  5. TheInvisibleSun

    TheInvisibleSun Visible Member

    Joined:
    Jul 2, 2013
    Messages:
    292
    Location:
    Buffalo, NY, USA
    All you need to do now, is create a variable/flag and set it when you hit the capsule (I'm guessing you would just set a unused address to something instead as you are using Hivebrain), and clear it after the restart flag is set in the 'Got Through' Routine. Just tried it myself, and what needs to be done further than that, fixing a lot of screen-locking and art issues, and a few other things in the Signpost Object that prevent it from working properly.
     
  6. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    389
    Location:
    Town Creek, AL
    Got it fixed now. I took some code from the original title screen code & added it to the Splash Title.

    Good thing at TitleScreen i made it JMP SPLASH & not overwrite original title screen.
     
  7. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    792
    Location:
    Portland, Maine
    All you need to do now, is create a variable/flag and set it when you hit the capsule (I'm guessing you would just set a unused address to something instead as you are using Hivebrain), and clear it after the restart flag is set in the 'Got Through' Routine. Just tried it myself, and what needs to be done further than that, fixing a lot of screen-locking and art issues, and a few other things in the Signpost Object that prevent it from working properly.




    I'm actually going with a different plan. I'm going to make it so the animal capsule will also run SBZ 2's code but when Sonic reaches the end of the level right after the animal capsule, he will advance to the next level.
     
  8. Mohammad Sanjakdar

    Mohammad Sanjakdar Newcomer Trialist

    Joined:
    Jan 20, 2015
    Messages:
    12
    Location:
    Aleppo, Syria
    Last edited by a moderator: Mar 16, 2015
  9. Selbi

    Selbi Plug in, baby. Retired Staff

    Joined:
    Jul 20, 2008
    Messages:
    2,398
    Location:
    Northern Germany
    You've importeted the mappings improperly. The simplest way of fixing it is probably to either use SonMapEd or Flex to move each Spindash sprite four pixels downwards (by using the arrow keys and holding Ctrl in SME's case) and then re-save the mappings.
     
    Last edited by a moderator: Mar 16, 2015
  10. Mohammad Sanjakdar

    Mohammad Sanjakdar Newcomer Trialist

    Joined:
    Jan 20, 2015
    Messages:
    12
    Location:
    Aleppo, Syria
    Thanks Selbi it worked
     
  11. jubbalub

    jubbalub Mania fanboy Member

    Joined:
    Dec 25, 2014
    Messages:
    273
    My SonLVL suddenly decided to be a bitch and not save my object layouts.

    [​IMG]

    And when I view it in SovLVL, it's perfectly fine.

    [​IMG]

    The hell is going on? I have no clue as to why this is happening...
     
  12. Pacca

    Pacca Why succeed when you can profit off of failure? Member

    Joined:
    Jul 5, 2014
    Messages:
    1,149
    Location:
    Triton (Moon)
    YOu'll have to reload the layout and start placing your objects over again. This particular glitch got me, too...
     
    Last edited by a moderator: Mar 16, 2015
  13. JoenickROS

    JoenickROS ROS is on hiatus. (...again) Member

    Joined:
    Feb 5, 2012
    Messages:
    919
    Alright Bagumba, how many objects do you have in that level, you could have too many, which can cause all of them to not load? I've never had a glitch like this with SonLVL.

    Edit: Wait, they are loading, sorry I read your question too quickly and didn't look at the pictures very long, guess it is a SonLVL glitch, but it hasn't happened to me before. The limit is still an important thing to know though. S1-S2 255 objects, and if you don't have the ring manager in S1, the rings count towards the object count (I think, don't hesitate to correct me), S3-S3K over 800 or maybe its less not really sure.
     
    Last edited by a moderator: Mar 17, 2015
  14. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    860
    Is it possible that there's a missing terminator at the start of the layout data? If it's the first layout file in the ROM or otherwise not immediately following a previous layout file, you could try putting dc.w -1, 0, 0 before the incbin.

    Otherwise, are you sure SonLVL is editing the right file?
     
    Last edited by a moderator: Mar 17, 2015
  15. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    389
    Location:
    Town Creek, AL
    I'm about to make my Custom Bosses (Yes from the Castlevania series, all in one art hopefully), but before I do, Is there a size limit (Width & Height) to bosses, without having any effect to any other loaded objects? I ask cause a few months back I tried Loading Gaibon, but the size of him had GHZ's platforms vanish, but could still stand on them. this continued till he was gone.
     
  16. MarkeyJester

    MarkeyJester ! % # @ Member

    Joined:
    Jun 27, 2009
    Messages:
    2,760
    You have several limits to account for (this is the scenario for 28 tile horizontal resolution mode).

    The first limit is the sprite count limit, the sprite table in VRAM consists of $280 bytes, holding a potential $50 sprites at any one time. The HUD, the platforms, the main character, they all consist of sprites, so your potential is now lower than $50.

    The second limit is a horizontal display limit, the VDP is capable of displaying up to approximately $20 sprites when drawing a scan-line, the lowest (above $20th) priority sprites displaying on the same scan-line shall become masked (masked is a misnomer, but you get the concept).

    The third limit is Sonic 1's sprite map format, which restricts the sprites on the X and Y position range of $100 pixels ($80 pixels from the centre of the object).
     
  17. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    389
    Location:
    Town Creek, AL
    Alrighty. Guess i'm gonna have to shrink some of them in order for all of them to work.

    also...

    Where in Xenowhirl's Sonic 2 Disassembly is the spindust files? I know where the art is, but at first, looking at s2.asm, I thought mappings & dplc (if any)  they were Obj08, but seen when it looked corrupt that it wasn't. where are those files located
     
    Last edited by a moderator: Mar 19, 2015
  18. 노베디쿠스

    노베디쿠스 Pour your misery down on me Member

    Joined:
    Aug 26, 2013
    Messages:
    919
    Can you please fix your grammar? I don't quite understand what your trying to ask. Are you saying that the files are corrupt or that you can't find the files?
     
    Last edited by a moderator: Mar 19, 2015
  19. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    389
    Location:
    Town Creek, AL
    the question...

    Like i said

    Thinking the Maps & DPLC was obj08, I loaded them with spindust's art & it wasn't it.
     
    Last edited by a moderator: Mar 19, 2015
  20. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    792
    Location:
    Portland, Maine
    I have two questions that I'm pretty sure I've seen answered before but I can't find the answers to. Both questions are for Sonic 1's Hivebrain Disassembly. (The Project 128 version if it matters)

    1. How do you change the duration of the title screen?

    2. How do I make it so the shield art won't flip (I'm not sure if x or y but not both) when you jump?