Basic Questions and Answers Thread

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

  1. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    I had the idea to make Wood Zone a special stage :D
    But that hurt, because the act 1 and 2 are 100% completed.
    StephenUk and you are right. I'll look for a solution and at worst, remove (or hidden) the zone.

    Justly, Sonic & Ashuro is my last rom hack, and i will not make others as I would not have learned enough.
    I will do exercises with a clean disasm, read lessons and tutorial, learn the basics, learn how the engine works, I must start all over, everything back to the beginning.
    I am fully aware that it is a handicap not having done this before.
     
  2. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    Double post, sorry!

    I have copied the code from Sonic 2 to decrease the ring counter when Sonic is Super Sonic, and i have changed the code with my labels:

    subq.w #1,($FFFFFF98).w ; subtract 1 from Super Sonic Frame Count
    bpl.w Super_Sonic_End ; branch if plus
    move.w #60,($FFFFFF98).w ; Reset frame counter to 60
    tst.w ($FFFFFE20).w ; Does Sonic have rings?
    beq.w Sonic_RevertToNormal ; if not, branch
    ori.b #1,($FFFFFE1D).w ; Update the rings HUD
    cmpi.w #1,($FFFFFE20).w ; Does Sonic have at least 1 ring?
    beq.s loc20 ; if so, branch
    cmpi.w #10,($FFFFFE20).w ; 10 rings?
    beq.s loc20 ; if so, branch
    cmpi.w #100,($FFFFFE20).w ; 100 rings?
    bne.s loc21 ; if not, branch
    loc20:
    ori.b #$80,($FFFFFE1D).w
    loc21:
    subq.w #1,($FFFFFE20).w ; Subtract 1 from ring count
    bne.w Super_Sonic_End

    But the code doesn't do anything.

    The ring counter loose one ring and don't decrease.
    I have tried to change my RAM adress ($FFFFFF98) to another but still do not change anything.

    i saw several threads (with redhotsonic or psycho) talk about it, i have tried their fixies but still the same.
    Because i'm a noobish, because i haven't learn more about how ASM works, and because, now i'm pissed for all i want to do.
    So if i can't see my errors, can you see it?
     
  3. B. Comet

    B. Comet Is fun still infinite? Member

    Joined:
    Aug 19, 2016
    Messages:
    83
    Location:
    South America Zone
    So... I don't know nothing about changing the Music of my hack. Someone can explain to me how it is done?
     
  4. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    There is many tutorials everywhere in SSRG/Sonic Retro.

    You can also take an SMPS form another game that use the same sound driver of Sonic 1.
    you can port the sound driver of Sonic 2 or Sonic 3 to sonic 1 to import songs from these games.

    You can sequence your own midi file (if you're a good compositor) with FLstudio or Sekaiju and convert them with mid2smps.
    You can find some song archives shared on the sonic hacking forums (many songs of megaman, castelvania, pokemon)...
    But we can hear these songs on every hacks now, so i suggest you to create your own song!

    Sorry for my bad english i'm tired.

    EDIT: For changing you can edit the smps songs with a hex editor (Markey jester's guide can help you.
     
    B. Comet likes this.
  5. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    Where is that code? Is the super sonic frame counter ram modified any where else? Your missing crucial information needed to help solve the issue.
     
  6. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    The code is here:


    Code:
    Super_Sonic_Ring:
            tst.b     ($FFFFFF6A).w ; if super sonic flag?
            beq.s     Super_Sonic_End
            tst.b (Update_HUD_timer).w ; ???
            beq.s Sonic_RevertToNormal ; ?
            subq.w     #1,($FFFFF614).w ; subtract 1 from Super Sonic Frame Count
            bpl.s     Return_Ring
            move.w    #60,($FFFFF614).w ; set    delay time to 1    second
            tst.w     ($FFFFFE20).w ; have 0 ring?
            beq.s Sonic_RevertToNormal
            ori.b     #1,($FFFFFE1D).w     ; update ring
            cmpi.w #1,($FFFFFE20).w ; Does Sonic have at least 1 ring?
            beq.s loc20 ; if so, branch
            cmpi.w #10,($FFFFFE20).w ; 10 rings?
            beq.s loc20 ; if so, branch
            cmpi.w #100,($FFFFFE20).w ; 100 rings?
            bne.s loc21 ; if not, branch
    loc20:
            ori.b #$80,($FFFFFE1D).w
    loc21:
            subq.w #1,($FFFFFE20).w ; Subtract 1 from ring count
            bne.s     Return_Ring
            jmp     Super_Sonic_End
          
    Return_Ring:
            rts
     
  7. jubbalub

    jubbalub Mania fanboy Member

    Joined:
    Dec 25, 2014
    Messages:
    286
    Posting this here because I can't find an answer anywhere.

    upload_2016-10-8_19-51-28.png

    What are these used for? They're in the objpos folder.
     
  8. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    I think SBZ and LZ have extra objpos data for... reasons. Really dumb, hackish reasons. SBZ uses them for it's platforms code, I don't remember what the LZ ones are for though.
     
  9. Devon

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

    Joined:
    Aug 26, 2013
    Messages:
    1,372
    Location:
    your mom
    LZ also uses them for their platforms on conveyor belts, just like SBZ.
     
  10. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,016
    There's kind of a lot to explain...

    Most of the Mega Drive Sonic games (including Sonic 1, Sonic 2, Sonic 3 (& Knuckles), Sonic CD, Sonic 3D Blast, and Knuckles' Chaotix) use variants of what we call "SMPS" - a sound driver. That said, there's a degree of compatibility between those games: you could port Sonic 1 music to Sonic 3, for example. Unfortunately, each game's driver has its quirks (FM voice format, available PSG volume envelopes, 68k or Z80 pointer format), meaning porting is often far from simple.

    Ignoring porting, however, it is possible to create your own SMPS music. I could go into how SMPS music files work internally, but it might be better to point you toward converter tools like mid2smps and xm4smps, which allow you to convert other types of music to SMPS.

    If you're just curious about the process of playing music in-game, then the explanation is far more simple: there are a few subroutines you use to play music/sounds. Depending on the disassembly you're using, they can be called PlayMusic, PlaySound, PlaySound_Special, or even other names. To use them, you store the ID of the song you want to play in d0, and then call the subroutine. What ID a song uses depends on where it is referenced in a certain table within the sound driver. Newer disassemblies provide constants, like 'MusID_EHZ', to make these IDs easier to use. The IDs start at $81, so the 'first' song in the game (GHZ in Sonic 1) has the ID of $81. Then the next one, Labyrinth Zone, has $82, etc.
     
  11. Ziro_

    Ziro_ Mentally Skewed Member

    Joined:
    Aug 1, 2016
    Messages:
    59
    Location:
    What are you a cop
    I have added the animations for a spin kick into sonic 1. I know they work because I replaced the walking animation the spin kick. I am trying to combine it with Selbi's jump dash code. Where should I put it.

    You could either remove the boss entirely. If you can't do that create another zone that is essentially wood zone and edit the level order. http://info.sonicretro.org/SCHG_How-to:Add_a_new_zone_in_Sonic_1

    Staff edit: Merged double-post
     
    Last edited by a moderator: Oct 10, 2016
  12. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
  13. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    To continue what @Clownacy said, I have created a tool that allows easy testing and porting between formats (given you know what to fix and change). The SMPS2ASM format is also useful in Sonic 3 and to a degree Sonic 2, because you have to properly align your song to the bank position it is sitting in (since Z80 uses absolute pointers aligned to current ROM 'bank'), and good luck if you want to change any song that comes before others. Luckily, SMPS2ASM deals with this automatically, which also means porting between games is easier because it can deal with relative pointers too.
     
    Pacca, B. Comet and breakthetargets like this.
  14. Ziro_

    Ziro_ Mentally Skewed Member

    Joined:
    Aug 1, 2016
    Messages:
    59
    Location:
    What are you a cop
    What I was saying you could create a 9th that is woodzone too

    I don't see the issue I might be able to sent my ported code when I get home and you can merge them because I think you pretty much got it:)

    Staff edit: Merged double-post
     
    Last edited by a moderator: Oct 10, 2016
    Ashuro likes this.
  15. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    Yes, i really want :(
     
  16. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,016
    Would you stop double-posting?
     
    Niko, Painto and Soldaten like this.
  17. Niko

    Niko All's well that ends well, right? Member

    Joined:
    Mar 1, 2014
    Messages:
    245
    Location:
    $C800
    Well, the code he has up here assumes that Sonic is already jumping when the script is called, so there is no animation change.
    Simplistically add one in a frame-appropiate line beneath the JumpDash label ("Sonic_JumpDash:") with this line, and change it from id_Roll to the name of the pointer for your spin-kick animation.
    Code:
            move.b    #id_Roll,obAnim(a0) ; use "jumping" animation
     
  18. Ziro_

    Ziro_ Mentally Skewed Member

    Joined:
    Aug 1, 2016
    Messages:
    59
    Location:
    What are you a cop
    I have another question(sorry). I have made the life counter into an emerald counter and life monitors into emerald monitors. So the player does not cheat and continue dying over and over again to collect the emerald monitors, what can I do because I could not find a solution I could use because I am not creative and bad at asm.:)


    I am unsure how to make it so when you die your emeralds disappear when collected in that level, but when you go to the next level if you didn't die before collecting the emeralds they would still be there and if you died in the next level the emeralds you successfully collected in the level before would still be there and the collected before you died in that zone would be lost.(Sorry I could not word it better).




    How would I have a flag for each monitor broken?
     
    Last edited: Oct 12, 2016
  19. Soldaten

    Soldaten The Coilgun Root Admin

    Joined:
    Mar 10, 2016
    Messages:
    267
    EDIT - Delete this post as it is no longer needed.
     
    Last edited: Oct 12, 2016
  20. Niko

    Niko All's well that ends well, right? Member

    Joined:
    Mar 1, 2014
    Messages:
    245
    Location:
    $C800
    @ZiroGX2, one possible method would be to have the monitor's script check for a variable that's designated for the Emerald Monitor.
    Tell it that if it's clear, load the object, and if it's not, then gee..I don't know, not load the object. (rts) I mean, you could have it just load another monitor in it's place.
    When it's broke, add the line to set the variable, and to make it reset, add a 'clear' to the end-of-act routine that the signpost object calls.
    That will fix the next level's emerald monitors, but not clear the flag unless the level is beat.

    In addition, flag-bug "proof" could be added by making the title screen clear the variable.
    Game Over appears before Continue does, so somewhere after either event.

    For more references, try looking at how the ring counter is reset after each level / death.
    I mean, there's way more than one way to implement this idea.

    EDIT:

    Question -
    While completely ignoring the Lego and "Classic" aspects of the model, which 'Sonic' does everyone think the Lego Dimensions Sonic is based of off?
    For sure, it's based on 3D Blast (as Tt said on footage), but judging the model in the same way as like Super Smash Brother's Brawl model is looked at as a Sonic 2006 & Unleased hybrid, or Smash 4's looking like the Colours 'and on' model..

    With that kind of judgement, "what Sonic [model] is this based on?"

    [​IMG]
     
    Last edited: Oct 12, 2016