Basic Questions and Answers Thread

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

  1. Ralakimus

    Ralakimus People suck Member

    Joined:
    Aug 26, 2013
    Messages:
    1,042
    Location:
    Hell
    If it can export .MID files, then it can be converted via mid2smps. MIDI channels 1-5 are used for FM, channel 10 for DAC/PSG noise (basically, PCM samples and hi-hats played via noise), channels 11-13 for PSG, and channel 14 for additional PSG noise controlling.

    Although, it looks like what you are using is for Mac only, and mid2smps is a Windows program. I think there exists Wine for Mac, so you can give that a shot, but I'm not sure how well it will work.
     
    MGHACKS likes this.
  2. MGHACKS

    MGHACKS A member who likes to spam messages. Member

    Joined:
    Aug 7, 2019
    Messages:
    168
    Location:
    Somewhere far from Sonic fanboys
    You can try Wine but driver support may be a hit or miss. If I was you, use a virtual machine to run Windows (7 or later) and then install the driver and FL Studio. If you want to virtualize, I recommend VirtualBox as it is easy and simple to use
     
  3. Kurk

    Kurk mmmm good taco Member

    Joined:
    Jul 30, 2016
    Messages:
    58
    Location:
    New York Shitty
    @Chron Dafter iirc there is support for Midi exporting in Logic Pro X. You can probably compose a song in it, export it to midi, and use mid2smps under wine so you can convert the song to an SMPS.
     
  4. Chron Dafter

    Chron Dafter Newcomer Prospect

    Joined:
    May 8, 2020
    Messages:
    10
    I'll give them all a shot. I've tried the mid2smps way, but I couldn't get it to work. When I convert it back to .bin, it either plays really silently or doesn't play sound at all. Not sure why this happens. I have a Windows PC that I use for the "main" part of ROM hacking, and my Mac is for the music part. This is just the first time I've ever tried to mess with SMPS so I sound like I don't know what I'm done. Cause I don't. Thanks for helping me out here.
     
    MGHACKS likes this.
  5. Ralakimus

    Ralakimus People suck Member

    Joined:
    Aug 26, 2013
    Messages:
    1,042
    Location:
    Hell
    Could you perhaps give an explanation of how you are using Logic Pro?
     
  6. Chron Dafter

    Chron Dafter Newcomer Prospect

    Joined:
    May 8, 2020
    Messages:
    10
    I used the SMPS2MID.exe on my Windows PC to convert the GHZ.bin to GHZ.mid. I made the song I wanted in a different set of instruments and just dragged them to GHZ's instruments. It didn't play any noise when converted back. I'm not sure how to fix that.
     
  7. Angel X

    Angel X Well-Known Member Member

    Joined:
    Sep 15, 2017
    Messages:
    69
    Location:
    Italy
    Hello everyone!
    This is the first time I write in this thread,I hope that I am not writing at an inconvenient time.
    I have a simple question, how can I increase sonic's lives?
    I wish sonic had 99 lives and 0 lives(this project has two versions).
    Thank you in advance:D
     
  8. Tanman Tanner

    Tanman Tanner Well-Known Member Member

    Joined:
    Dec 23, 2016
    Messages:
    95
    Location:
    Buffalo, New York
    Well, here's an example from Sonic 2 that I've developed, although I can't think of Sonic 1's and Sonic 3's way of handling life counter at the title, although I'm pretty sure it's not too different, although the variables will probably have a different name.
    Code:
    ; loc_3C14:
    TitleScreen_Loop:
       move.b    #VintID_Title,(Vint_routine).w
       bsr.w    WaitForVint
       jsr    (RunObjects).l
       jsrto    (SwScrl_Title).l, JmpTo_SwScrl_Title
       jsr    (BuildSprites).l
    
       ; write alternating 0s and 4s, 80 times, at every 4th word,
       ; starting at Sprite_Table+6
       lea    (Sprite_Table+4).w,a1
       moveq    #0,d0
    
       moveq    #79,d6
    -    tst.w    (a1)
       bne.s    +
       bchg    #2,d0
       move.w    d0,2(a1)
    +    addq.w    #8,a1
       dbf    d6,-
    
       bsr.w    RunPLC_RAM
       bsr.w    TailsNameCheat
       tst.w    (Demo_Time_left).w
       beq.w    TitleScreen_Demo
       tst.b    (IntroSonic+objoff_2F).w
       beq.w    TitleScreen_Loop
       move.b    (Ctrl_1_Press).w,d0
       or.b    (Ctrl_2_Press).w,d0
       andi.b    #button_start_mask,d0
       beq.w    TitleScreen_Loop ; loop until Start is pressed
       move.b    #GameModeID_Level,(Game_Mode).w ; => Level (Zone play mode)
    # if you wanted 0
       move.b    #0,(Life_count).w
       move.b    #0,(Life_count_2P).w
    #if you wanted 99
       move.b    #$63,(Life_count).w
       move.b    #$63,(Life_count_2P).w
       moveq    #0,d0
       move.w    d0,(Ring_count).w
       move.l    d0,(Timer).w
       move.l    d0,(Score).w
       move.w    d0,(Ring_count_2P).w
       move.l    d0,(Timer_2P).w
       move.l    d0,(Score_2P).w
       move.b    d0,(Continue_count).w
       move.l    #5000,(Next_Extra_life_score).w
       move.l    #5000,(Next_Extra_life_score_2P).w
       move.b    #MusID_FadeOut,d0 ; prepare to stop music (fade out)
       bsr.w    PlaySound
       moveq    #0,d0
       move.b    (Title_screen_option).w,d0
       bne.s    TitleScreen_CheckIfChose2P    ; branch if not a 1-player game
    
       moveq    #0,d0
       move.w    d0,(Two_player_mode_copy).w
       move.w    d0,(Two_player_mode).w
       if emerald_hill_zone_act_1=0
       move.w    d0,(Current_ZoneAndAct).w ; emerald_hill_zone_act_1
       else
       move.w #emerald_hill_zone_act_1,(Current_ZoneAndAct).w
       endif
       tst.b    (Level_select_flag).w    ; has level select cheat been entered?
       beq.s    +            ; if not, branch
       btst    #button_A,(Ctrl_1_Held).w ; is A held down?
       beq.s    +             ; if not, branch
       move.b    #GameModeID_LevelSelect,(Game_Mode).w ; => LevelSelectMenu
       rts
    ; ---------------------------------------------------------------------------
    +
       move.w    d0,(Current_Special_StageAndAct).w
       move.w    d0,(Got_Emerald).w
       move.l    d0,(Got_Emeralds_array).w
       move.l    d0,(Got_Emeralds_array+4).w
       rts
    
    In Sonic 3, it's virtually the same, although you set it in loc_C110.
    In Sonic 1, you'll want to do move.b #0,(v_lives).w or move.b #$63,(v_lives).w (SonicRetro's Sonic 1 ASM68K version).
    EDIT: Updated. Sonic 2 one is still more descriptive, although I do give you a general gist for Sonic 3 (which has an identical name for Lives) and Sonic 1 (which uses the variabletype_variablename naming scheme unlike the other disassembles).
     
    Last edited: May 21, 2020
    Angel X likes this.
  9. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,838
    Hello Angel X.

    Please be sure to elaborate specifics such as:
    • Fan game engine or hack.
    • If hack, which Sonic game and which disassembly.
    • If fan game, which engine/version.
    I don't want to give you the instructions on how to increase the starting lives count for a hack of a specific game, when all along you wanted to increase the starting lives count for a fan game d=
     
    ProjectFM likes this.
  10. Angel X

    Angel X Well-Known Member Member

    Joined:
    Sep 15, 2017
    Messages:
    69
    Location:
    Italy
    Hi Markey,
    Sorry if I wasn't specific.
    I wanted to make the change to sonic 1 (GitHub).
     
  11. Tanman Tanner

    Tanman Tanner Well-Known Member Member

    Joined:
    Dec 23, 2016
    Messages:
    95
    Location:
    Buffalo, New York
    Ah, then use what I did up there. Although I can't recall WHERE Sonic 1 exactly sets the variables for lives, but I'm guessing since the general theme of Life-counter-setting usually is a part of MainTitleLoop routine or its subroutines, I'd assume you should look around the title screen code for v_lives being set by a value of 3 via a move.b. That's what you'll need to change to either #0 or #$63 (for 99)
     
    Last edited: May 22, 2020
  12. Chron Dafter

    Chron Dafter Newcomer Prospect

    Joined:
    May 8, 2020
    Messages:
    10
    Is there a guide post somewhere that teaches you how to add an act 4 in Sonic 1? Github or HB's Split Disassembly, doesn't matter which.
     
  13. MGHACKS

    MGHACKS A member who likes to spam messages. Member

    Joined:
    Aug 7, 2019
    Messages:
    168
    Location:
    Somewhere far from Sonic fanboys
  14. Chron Dafter

    Chron Dafter Newcomer Prospect

    Joined:
    May 8, 2020
    Messages:
    10
  15. Angel X

    Angel X Well-Known Member Member

    Joined:
    Sep 15, 2017
    Messages:
    69
    Location:
    Italy
    Hi Tanman,
    I did what you told me, but it didn't work!
    This is the code:
    Code:
    LevSel_Level_SS:
            add.w    d0,d0
            move.w    LevSel_Ptrs(pc,d0.w),d0 ; load level number
            bmi.w    LevelSelect
            cmpi.w    #id_SS*$100,d0    ; check    if level is 0700 (Special Stage)
            bne.s    LevSel_Level    ; if not, branch
            move.b    #id_Special,(v_gamemode).w ; set screen mode to $10 (Special Stage)
            clr.w    (v_zone).w    ; clear    level
            move.b  #$63,(v_lives).w  ; set lives to 99
            moveq    #0,d0
            move.w    d0,(v_rings).w    ; clear rings
            move.l    d0,(v_time).w    ; clear time
            move.l    d0,(v_score).w    ; clear score
            if Revision=0
            else
                move.l    #5000,(v_scorelife).w ; extra life is awarded at 50000 points
            endc
            rts
    I saved the file (sonic.asm) and clicked on build, but nothing has changed.
    Sorry if I contact you only now but I was busy:confused:
     
  16. Chron Dafter

    Chron Dafter Newcomer Prospect

    Joined:
    May 8, 2020
    Messages:
    10
    I hope I'm not interrupting anything, but I want to ask something. I have a sprite sheet of Splash Hill Zone.
    (Please, don't judge me, I liked Sonic 4)
    Anyways, how am I able to import tile graphics into some place like Green Hill?

    Basically, all I want to do is import graphic tiles into GHZ. Can someone link me to an article or some sort of help with this?
    Thank you
     
  17. JamesTiberiusMorgan

    JamesTiberiusMorgan Newcomer Trialist

    Joined:
    Apr 21, 2020
    Messages:
    2
    Okay, suppose I was to make a super long Sonic Generations marathon style ROM hack through all the zones of the games (3D will have to be adapted to 2D) and I wanted Knuckles' first encounter with Eggrobo to happen in Green Hill Zone. (You know, where Knuckles is maxing and relaxing with some animals until the Bomb was planted and detonated, Eggrobo is looking for a fight.) what code do I need to have to have the opening cutscene to take place in that zone?

    On a side note, what code and graphics do I need to have to replace Dr. Eggman with Eggrobo in all boss battles when playing as Knuckles?

    This is my first post on the coding side of things, I just need to get my feet wet is all.
     
  18. TheInvisibleSun

    TheInvisibleSun Visible Member

    Joined:
    Jul 2, 2013
    Messages:
    318
    Location:
    Buffalo, NY, USA
    I'd look into SonLVL.
     
  19. Chron Dafter

    Chron Dafter Newcomer Prospect

    Joined:
    May 8, 2020
    Messages:
    10
    Thank you. I'll look into it.
     
  20. TheInvisibleSun

    TheInvisibleSun Visible Member

    Joined:
    Jul 2, 2013
    Messages:
    318
    Location:
    Buffalo, NY, USA
    You've made it so that it works if starting the game from a Special Stage, but you need to change the value for when starting the game on a Level; check out the location 'LevSel_Level' (should be the very next label after 'LevSel_Level_SS').

    EDIT: Looks like I can't make code text bold font, lol
     
    Last edited: May 25, 2020 at 7:45 PM
    Angel X likes this.