Basic Questions and Answers Thread

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

  1. Ziro_

    Ziro_ Mentally Skewed Member

    Joined:
    Aug 1, 2016
    Messages:
    59
    Location:
    What are you a cop
    I am curious. What controls sonics horizontal camera movement. I want to attempt to recreate the extended camera from sonic CD so I can improve the playablility of my hack.
     
  2. Ralakimus

    Ralakimus Going to the store to grab some cigarettes. Member

    Joined:
    Aug 26, 2013
    Messages:
    1,017
    Location:
    The store
    ScrollHoriz2 controls the horizontal camera movement. It is branched to from ScrollHoriz, which is branched to from DeformBgLayer, which is the routine that handles camera scrolling and background deformation. Putting that out there, just in case you need to find anything else relating to camera scrolling.
     
    FохConED and Niko like this.
  3. Ziro_

    Ziro_ Mentally Skewed Member

    Joined:
    Aug 1, 2016
    Messages:
    59
    Location:
    What are you a cop
    Thanks I'll try it out later
     
  4. Clownacy

    Clownacy Well-Known Member Staff

    Joined:
    Aug 15, 2014
    Messages:
    890
    S3K's soundtrack makes frequent use of what's know as the 'Universal Voice Bank', which is a feature exclusive to the driver S3 uses. I think ValleyBell mentioned wanting to make SMPSConv split the voices from the bank into the music file, like in every other driver, but he never got around to it. What the bank is, is a collection of FM voices, which, instead of being stored in the music files, is stored inside the driver itself. You'd need to extract the handful of voices used by the song yourself, add them to the music file, and then correct all the 'SetVoice' coordination flags to match the new voice arrangement.

    @kaz that'd be news to me. I was certain S2B used S2F's format.
     
    Baraksha likes this.
  5. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    879
    For the act clear music, an easy workaround is to port it from Sonic 3D instead, it's mostly the same, but doesn't use the UVB. I'm pretty sure VB did make a version of SMPSConv with that functionality though, I can't think of any other reason why I'd have an InsBank.bin file in my SMPSConv folder.
     
    Baraksha likes this.
  6. Kaz

    Kaz Well-Known Member Member

    Joined:
    Nov 2, 2013
    Messages:
    66
    Trash this post and disregard anything I said about Nick Arcade's mappings format.
     
    Last edited: Oct 15, 2016
  7. ValleyBell

    ValleyBell Well-Known Member Member

    Joined:
    Dec 23, 2011
    Messages:
    155
    The most recent update of SMPSConv can work with the UVB.
    You need to use the option "-insbank File.bin" to specify a file that contains the UVB instruments in S1/S3K format.
    But it uses the instrument bank only if it shows the message "This song seems to use the global Sonic 3 Instrument Bank."
     
    Baraksha likes this.
  8. Baraksha

    Baraksha Well-Known Member Member

    Joined:
    Dec 23, 2015
    Messages:
    99
    I tried doing that, it shows the "This song seems to use the global Sonic 3 Instrument Bank." Massege and thats it, I cannot type anything after that, is it suppose to be like that?
     
    Last edited: Oct 15, 2016
  9. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    879
    S2NA uses S2 format mappings, at least for Sonic. Maybe I broke MappingsConverter. I've been meaning to rewrite that set of tools and put them in with SonLVL...
     
  10. Kaz

    Kaz Well-Known Member Member

    Joined:
    Nov 2, 2013
    Messages:
    66
    Nevermind on that, I tried Sonic 2 format for input and it worked. Disregard anything that I said about it not working. My point still stands for GHZ's compression though.
     
  11. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    530
    Location:
    France
    Holà/Bonjour/Hello/Konichiha:

    I have implemented the S2 menu to my hack, i can select between Sonic, Ashuro, or the level select.
    And here is the problem, i want the level select not selectable if the player have not 6 emeralds.


    Code:
    Menu_LevelSelect:
            cmpi.b     #6,($FFFFFE57).w ; do you have 6 emeralds?
            bne.s     Cancel_LevelSelect
            jmp    Level_Select_Menu; Go to Sonic 2 Level Select
            moveq   #2,d0
            bsr.w   PalLoad2   ; load level select pallet
            lea   ($FFFFCC00).w,a1
            moveq   #0,d0
            move.w   #$DF,d1
    Cancel_LevelSelect:
            move.w    #$B1,d0            ; bzit sound
            jsr    (PlaySound_Special).l    ; play spin sound
            bsr.w          loc_317C
            rts
    Here is the problem, when i select "Level Select", the game play "Bzzzt" sound, and the title screen menu disappear. If i push start again, the "bzzt" play again.

    I want to make the game just play the sound and don't make the menu disappear.
     
  12. Painto

    Painto Samodzierżca Najdłuższego Kija Member

    Joined:
    Mar 24, 2014
    Messages:
    315
    Location:
    Poland
    I think you should change
    Code:
    bsr.w loc_317C
    rts
    to
    Code:
    jmp loc_317C
    If it still will happen, you should check if your menu isn't set to disappear after pressing Start or something.
     
    Ashuro likes this.
  13. redhotsonic

    redhotsonic Also known as RHS Retired Staff

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Why not bra.w (assuming that bsr.w is reaching it's target)? That's smaller/faster than jmp. Also, I don't see how that will solve his issue on the sound.
     
    Ashuro likes this.
  14. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    530
    Location:
    France
    The sound is played, but when the sound plays, the menu (Sonic - Ashuro - Level Select) disappear, and i can't choose any option, and can't start the game, so i have to restart the emulator.
    So i will discuss it later, for now, i learn more about ASM, and i wait for the Contest results :p (Green Hill Trophy pleaaaaaase).
     
  15. StephenUK

    StephenUK Working on a Quackshot disassembly Administrator

    Joined:
    Aug 5, 2007
    Messages:
    993
    Menu_LevelSelect:
    cmpi.b #6,($FFFFFE57).w ; do you have 6 emeralds?
    bne.s Cancel_LevelSelect
    jmp Level_Select_Menu; Go to Sonic 2 Level Select
    moveq #2,d0
    bsr.w PalLoad2 ; load level select pallet
    lea ($FFFFCC00).w,a1
    moveq #0,d0
    move.w #$DF,d1

    Cancel_LevelSelect:
    move.w #$B1,d0 ; bzit sound
    jsr (PlaySound_Special).l ; play spin sound
    bsr.w loc_317C
    rts

    Just to add to what people have already said, the code I've highlighted in red will never run. If you have 6 emeralds it will hit a jump and therefore not run it, and if you don't, it skips over it all. Also, the problem probably lies in the actual menu object code itself, not in this section.
     
    Ashuro likes this.
  16. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    530
    Location:
    France
    All the code highlighted in red is unused, because the instruction above jump to the routine "Level_Select_Menu" here "include s2menu.asm".
     
  17. StephenUK

    StephenUK Working on a Quackshot disassembly Administrator

    Joined:
    Aug 5, 2007
    Messages:
    993
    I know it is unused. I was questioning why it was even there at all if it isn't being used.
     
  18. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    530
    Location:
    France
    I don't know, it's like the "ObjectFall" code, i have the original and the one from the tutorial :/
     
  19. Ziro_

    Ziro_ Mentally Skewed Member

    Joined:
    Aug 1, 2016
    Messages:
    59
    Location:
    What are you a cop
    I want to make something similar to the sonic 2 title screen menu. should I port it or use the level select menu as a base?
     
  20. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    816
    Location:
    Portland, Maine
    The level select menu uses plane mappings instead of sprites which would make it harder to work with because mappings are already being used for both planes. The best thing to do is to port over Sonic 2's object because it is incredibly simple and already has stuff like x and y position defined.