Basic Questions and Answers Thread

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

  1. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    At least in Sonic 3 & Knuckles, they are every so often programmed to ignore floor collision, presumably to save on processing time and to make the game seem less laggy. This of course means, that rings are able to go down far enough in this frame and the next frame that the floor collision will no longer correctly catch the ring to bounce it back, making it fall through. The unfortunate effect probably not foreseen by the developers, is that the player may lose simply because the ring unexpectedly does this. There are better ways to get around this, but I doubt none of them will be desirable for all possible cases.
     
  2. SteamPoweredPixel

    SteamPoweredPixel Newcomer Member

    Joined:
    Aug 2, 2015
    Messages:
    10
    Location:
    ...
    Hi. I'm fairly new to the technical side of hacking so this is probably a rookie mistake. I'm using the Hivebrain disassembly and SonEd2 and whenever I try to edit a special stage layout this happens:
    [​IMG]
    Tiles just go "randomly" all over the place. The stages I haven't modified work fine even with modified code. Anyone know how to fix this?
     
  3. Pineapple Arse

    Pineapple Arse I ironically hate cold temperatures. Member

    Joined:
    Jun 19, 2016
    Messages:
    129
    Location:
    A cold place.
  4. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    NiphFM likes this.
  5. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    Hi, i just can't get it:

    What is this value into the MegaPCM.asm file?
    Code:
    ; ---------------------------------------------------------------
    ; DAC Samples Table
    ; ---------------------------------------------------------------
        DAC_Entry    $08, Kick, dpcm            ; $81    - Kick
        DAC_Entry    $08, Snare, dpcm        ; $82    - Snare
        DAC_Entry    $1B, Timpani, dpcm        ; $83    - Timpani
    ...
    And what is their functions?
    Because i've added a new "SEGAAAA" sound with a wav, but when i play a level, i can hear the "SEGA" sound into the music.
     
  6. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    the number on the left is the pitch, and number on the right, in the comments, are the actual ID of the sample. This is what SMPS music will use in order to play the desired sample, and if you wanna play a sample just separately, you also use this ID to reference it.
     
  7. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    Oh, ok thanks!

    Code:
    Sega_WaitPallet:
            move.b    #2,($FFFFF62A).w                                ;
            bsr.w    DelayProgram                                    ;
            bsr.w    PalCycle_Sega                                   ;
            bne.s    Sega_WaitPallet                                 ;                                                       ;
            ;move.b    #$E1,d0                                         ;
            ;bsr.w    PlaySound_Special ; play "SEGA"    sound           ;
            moveq     #$FFFFFF84,d0
            jsr     PlaySample
            move.b    #$14,($FFFFF62A).w                              ;
            bsr.w    DelayProgram                                    ;
            move.w    #$FF,($FFFFF614).w                              ;
    My SEGA sample uses the slot $84.
    But why can i hear this sample into my level's songs?
     
  8. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    Because those songs use $84? Maybe whoever made them, had a DAC at $84. It seems rather typical people use cymbal samples as addition to other samples, no reason not to think they'd use slot $84 as that is logically after the original samples, anyway.
     
    Ashuro likes this.
  9. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    I changed it to $86 and, for what i've see, i fixed my issue... (for now xD)
     
  10. Bluestreak

    Bluestreak Lady in red, living in dread. Member

    Joined:
    Apr 1, 2016
    Messages:
    227
    Location:
    Eastwatch Island
    Is there a help wanted thread? I am wondering if someone would like to help me out on the music and some sound effects in Sonic: Project Aspect for SMS. I have zero idea how to hack the music and sound, and never really used anything like Deflemask before. If this is the wrong thread, I apologize greatly.
     
  11. EMK-20218

    EMK-20218 The Fuss Maker Exiled

    Joined:
    Aug 8, 2008
    Messages:
    1,067
    Location:
    Jardim Capelinha, São Paulo
  12. Jefftastic

    Jefftastic n00blet Member

    Joined:
    Jul 23, 2017
    Messages:
    45
    Location:
    In Antartica
    Hey there, i'm using the Hivebrain 2005 disassembly, and was having some issues with custom art. (I use SonLVL of course)

    [​IMG]
    [​IMG]
     
  13. vladikcomper

    vladikcomper Well-Known Member Member

    Joined:
    Dec 2, 2009
    Messages:
    415
    In Sonic 1, Green Hill Zone is a bit special in terms of art, which is why you may have troubles editing it unless you do a few changes to how the game handles this art.
    You see, this very art is also shared with the Title Screen, however, it doesn't need half of the tiles used on the foreground, since it loads "foreground" of its own and big Sonic tiles which take quite a lot of VRAM actually. So to avoid overlapping tiles and speed up title screen loading, they decided to split GHZ art into two separate "banks". Title screen loads only bank 1, and the actual level loads both banks 1 and 2.

    Level editors, at least their older versions, won't work correctly with art separated in pieces like that (SonEd2 supports it since v11, if configured correctly).
    It's recommended that you merge GHZ art into one file and make the game load it as a whole.
    This guide may help you: http://info.sonicretro.org/SCHG_How-to:Separate_title_art_from_GHZ/make_GHZ_load_alternate_art
     
  14. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    SonLVL has had better support for multiple art files than SonED2 for years now (HTZ, WFZ). I would still recommend merging the art files though, makes it easier to work with.
     
  15. Samey

    Samey Le Bored Hedgie Member

    Joined:
    May 3, 2017
    Messages:
    57
    Hi again! so, i'm trying to get Sonic to use a different walking animation when he's underwater.
    I managed to get it to work, but it has this weird side effect on land where whenever Sonic walks left, he uses the animation for when he's underwater (though walking right seems perfectly fine).
    Here's the code I used:
    I'm using the Hivebrain dissassembly
    Code:
    loc_13A9C:
            lea    (SonAni_SuperPeelout).l,a1    ; use peelout animation
            cmpi.w    #$A00,d2    ; is Sonic at Dashing speed?
            bcc.s    loc_13AB4    ; if yes, branch
            lea    (SonAni_Run).l,a1 ; use    running    animation
            cmpi.w    #$600,d2    ; is Sonic at running speed?
            bcc.s    loc_13AB4    ; if yes, branch
            lea    (SonAni_WtrWalk).l,a1 ; use water walking animation
            cmpi.w    #6,$22(a0)        ; is sonic underwater?
            bcc.s    loc_13AB4    ; if not, branch
            lea    (SonAni_Walk).l,a1 ; use walking animation
    Edit: Just noticed the same animation happens when I walk off anything.
     
  16. Devon

    Devon Down you're going... down you're going... Member

    Joined:
    Aug 26, 2013
    Messages:
    1,372
    Location:
    your mom
    For objects, the $22nd byte relative to its given object space in RAM is their status bitfield, in which each bit represents a certain flag. Sonic uses bit 6 in the bitfield for the underwater flag.

    So, you're supposed to use BTST (Bit TeST) to check bit 6 of $22(a0) to check if Sonic is underwater. To branch when the bit is clear, use BEQ, to branch when the bit is set, use BNE.
     
    TheInvisibleSun and vladikcomper like this.
  17. Samey

    Samey Le Bored Hedgie Member

    Joined:
    May 3, 2017
    Messages:
    57
    Oh, thanks! I'm a bit new to asm coding, so sorry if it was a bit of a dumb question. :D
     
  18. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    Hello, i want to make the screen flash white, just like when i using the hyper jump in S3K, while i'm hyper sonic, in sonic 1 hivebrain.
    I searched a method to do it in a s3K disassembly, and trying to work with Pal_MakeWhite, Pal_towhite ect, and it makes crash the game.

    How does it works in S3K? And how can i do this in Sonic 1??
    Thanks.
     
  19. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    From memory, the Hyper-Sonic dash sets a flag, that will get checked in v-int, which will then keep the screen completely white for few frames (basically, instead of loading the level palette, it just loads white), and then it lets the normal palette come back in. All the Sonic object does, is activate this flag.
     
  20. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    I knew it, that you'll be the first person who answer my question xD

    So i have to create a flag and branch to a "pal_white" for a few frames?