Basic Questions and Answers Thread

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

  1. Pacguy

    Pacguy Testing the waters... Member

    Joined:
    Jul 5, 2014
    Messages:
    925
    Location:
    SOMEWHERE!!! OVER THE RAINBOW!!!
    Can't believe I never thought of that before, why look it up when I have the source right in front me :rolleyes:

    Also, if anyone else is curious, based on the simple search MainMemory used, status bit 2 seems to only be used by Sonic, Tails, Sonic and Tails in the Special Stage, and various bosses. Seems like it might just be what I need :D
     
  2. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    381
    Location:
    Town Creek, AL
    Questions concerning loading more levels in sonic 1 (maybe resuming an old project and put Project Richter to the side)
    I know one can use branch commands to load a different character in sonic 1 using an unused offset.
    what about the same with every level instead of adding one? I know there is a size limit to a Genesis rom, is it 4mb or is it 8mb? I forget.
    At one point I was porting Sonic 2 Sonic to Sonic 1 (I have the tutorial on here for art switch and adding super sonic), I was wanting to revamp this project & add Sonic 2's stages with it (maybe 3k's as well in the future) using an unused offset for branching to load Sonic 2's Level & music Data to load with sonic 1.
    Just figured I ask this now before I run into errors.
     
  3. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    745
    I think it'd be simpler to just add them as new level slots, rather than having to manage two sets of lists for level data.
     
  4. Pacguy

    Pacguy Testing the waters... Member

    Joined:
    Jul 5, 2014
    Messages:
    925
    Location:
    SOMEWHERE!!! OVER THE RAINBOW!!!
    EDIT: Sorry, I forgot that placing too many rings in Sonic 2 can cause ridiculous issues due to memory overflow. If you've found this post looking for a quick fix, remove some rings. That said, I can't find anything on this topic because Google is being a pain in ass, so an actual fix that lets me place more or at least know how many I can place would be appreciated.

    EDIT2: Solved my own problem, dug around my old posts and found this, which answers the issue. I'm leaving this here anyways though, just in case it helps a future confused hacker :p

    I've run into two issues that I can't quite explain; one being somewhat annoying but not game breaking, and the other causing broken blobs of graphics to display and even game crashes! And all I did was make some minor edits to the level layout of a vanilla Sonic 2 disassembly o_O

    The first one is simple; When the level starts, instead of the camera starting at Sonic, it scrolls up from the bottom of the level to the player. I guess placing objects below spawn might have caused this? I swear I've heard of this issue and possibly even a fix, but I don't know what to search for (just looking up "ehz camera issues" or similar doesn't seem to bring an answer).

    The second issue is downright baffling to me though. The game appears to just freak out when the End of Level Signpost attempts to load its' graphics and setup the screen barrier. Here's a screenshot of exactly where the crash occurs (this area is unedited EHZ layout, and is just the slope before the Signpost)
    [​IMG]

    Also, rarely the game won't crash here, and instead you'll just see a blob of Hud/rings/etc. graphics hovering above Sonics' head that scrolls with the background layer. I honestly wish I had even the slightest clue of what's going on there. I tried to get a screenshot, but due to the random nature of this issue, I was unable to recreate it in a timely manner.

    I did discover this issue in a disassembly with modified code, but porting nothing but the level layouts, chunk mappings, object locations, and block mappings back to a vanilla disassembly recreated the issue. My best guess would be that there's an align command missing somewhere that causes some art or mappings to go out of alignment, but I'm using the latest Github disassembly as of 12/3/2017 (although I used the link in the Sonic retro page; is that actually them most recent version?). I would be genuinely surprised if the Github disassembly was missing such a simple ease of use feature.
     
    Last edited: Dec 7, 2017
  5. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    657
    Location:
    Portland, Maine
    I don't know what it is in Sonic 2, but Sonic 1 has "lvlsize.bin" that has a value you can modify to change the camera's y position when the level starts. The second issue might be due to how if you place a signpost in an area other than the zone's ending area, also modified using lvlsize.bin, then it will display garbage tiles and fling the player to the edge of the level, killing Sonic.
     
  6. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    381
    Location:
    Town Creek, AL
    I have restarted an old Sonic 1 project, using the Sonic 1 Two-Eight HG disassembly (I think it's a GIT disassembly). Tried adding in Music slots up to $FF as well as fixing the spike bug. when I build I get a few errors, the majority being "Warning : Size of ??? ($6) does not match ZoneCount ($7)." and the separate .asm files they are located in I never touched yet. what's with this error?
     
  7. Pacguy

    Pacguy Testing the waters... Member

    Joined:
    Jul 5, 2014
    Messages:
    925
    Location:
    SOMEWHERE!!! OVER THE RAINBOW!!!
    Could you post the full error log? Also, what specific changes did you make to trigger the error? Does reversing those changes make the error go away? We'll likely need more info then what you've provided to give a good solution for your issue.
     
  8. Clownacy

    Clownacy UP - ON - CPU Staff

    Joined:
    Aug 15, 2014
    Messages:
    759
    Location:
    Englandland
    HG is an ancient version of the Git disasm. You can get a more up-to-date one from the actual Git repo.

    Anyhow, those aren't errors; they're warnings. They shouldn't stop the ROM from building. The reason they're there is because the older versions of the disassembly counted the ending as its own zone, but it's only half-implemented. This disassembly has some checks that make sure every zone-specific table in the game has enough data for all zones, but a lot of those tables don't include data for the ending zone, causing the warnings to appear.

    Nowadays, the disassembly doesn't count the ending as a proper zone, so the warnings shouldn't appear anymore.
     
    Pacguy and MainMemory like this.
  9. Pacguy

    Pacguy Testing the waters... Member

    Joined:
    Jul 5, 2014
    Messages:
    925
    Location:
    SOMEWHERE!!! OVER THE RAINBOW!!!
    How would I disable collision for an enemy in Sonic 2? I want to give an enemy an "invulnerable" state, where Sonic can't hit the enemy and vice versa. Flasher and Grounder (when it's in a wall) appear to do similar things to what I want, but their code is not very well labelled, and I honestly can't tell what the objects are doing from the raw source. Plus, they aren't perfect examples. Grounder becomes solid and remains that way after coming from a wall, and Flasher still hurts Sonic; I want the enemy to start as killable, then enter a state where Sonic/Tails doesn't interact with it at all, then become killable again.

    This seems like it has an easy solution, but I'm still trying to figure out how object collision works in general . My previous attempts at object collision simply avoided the existing system entirely and hackishly used a separate check within each object that was terrible and embarrassing.
     
  10. MarkeyJester

    MarkeyJester Julie knew her killer. Member

    Joined:
    Jun 27, 2009
    Messages:
    2,557
    Location:
    Miss Fox's heart~
    To remove a collision from an object with Sonic and Tails, simply ensure that byte $20 of the object is cleared, I believe the 2007 Sonic 2 disassembly calls it "collision_flags":

    Code:
           sf.b   collision_flags(aX)
     
    ProjectFM and Pacguy like this.
  11. Vanfanel

    Vanfanel Newcomer Trialist

    Joined:
    Dec 8, 2017
    Messages:
    3
    Hello there,

    I would like to convert a file in this archive from VGZ to BIN, or find an alternate version of the song I could use. Since the song is publicly available, maybe it's author or some other person who has used the file to insert it into a ROM can help.

    This is the archive containing the VGZ file. It's the Bridge Zone theme:

    http://info.sonicretro.org/images/4/45/SoniNekoVGM.zip

    I hope that, since those songs by Nineko are freely available to download, asking for them in a proper format is not a problem. As I said, I only need the Bridge Zone song.

    Thanks!
     
    nineko likes this.
  12. Novedicus

    Novedicus Well-Known Member Member

    Joined:
    Aug 26, 2013
    Messages:
    722
    VGZ (compressed VGM files) are just a list of raw instructions for the sound chip(s), so you would need to figure out how you can determine notes, when a coordination flag could be used, etc. from that data alone. IMO that doesn't sound like a whole lot of fun to do by hand, and writing a converter would probably be no fun either.

    You could ask nineko if he has a SMPS version of the song, though, since I think it's very likely the VGM file was created from an SMPS file.
     
    Last edited: Dec 16, 2017 at 5:33 PM
    nineko and AkumaYin like this.
  13. LuigiXHero

    LuigiXHero Pain Director Member

    Joined:
    Mar 22, 2014
    Messages:
    259
    Location:
    Somewhere, Someplace
    nineko likes this.
  14. Vanfanel

    Vanfanel Newcomer Trialist

    Joined:
    Dec 8, 2017
    Messages:
    3
    Thanks, LuigiXHero!
    Do you have some docs on how to add the clapp and cymbal to the drum set of the ROM?
     
  15. LuigiXHero

    LuigiXHero Pain Director Member

    Joined:
    Mar 22, 2014
    Messages:
    259
    Location:
    Somewhere, Someplace
    The easiest way to do it would be to add MegaPCM assuming you are hacking Sonic 1 and then grab the clap and cymbal from S3K's drumset which you can grab a ton of smps rips and stuff from here.

    The guide for MegaPCM should run down how to add more samples once you get it in there and what MegaPCM actually is.
     
  16. Trinitronity

    Trinitronity Well-Known Member Member

    Joined:
    Sep 12, 2016
    Messages:
    92
    Alright, since I wanted to implement a source accurate Drop Dash into Sonic 1, I was reading this thread: http://forums.sonicretro.org/index.php?showtopic=37587

    However, there is one thing that absolutely confuses me, and that thing might be important for a source accurate Drop Dash: what is that so-called "rolljump behaviour"? I'd like to disable that behaviour, but I don't even know what that is, and I can't disable something that I don't know what it is.
     
  17. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    262
    Location:
    UK
    I believe that's bit 4 of Sonic's status which is set if you jump after you roll. It prevents you from controlling your jump. In Sonic_JumpDirection for Github or Sonic_ChgJumpDir for Hivebrain (And Sonic 2) you'll find this check:
    Code:
    (GitHub)
            btst    #4,obStatus(a0)
            bne.s    Obj01_ResetScr2
    
    (Hivebrain)
            btst    #4,$22(a0)
            bne.s    Obj01_ResetScr2
    
    (Sonic 2)
        btst    #4,status(a0)        ; did Sonic jump from rolling?
        bne.s    Obj01_Jump_ResetScr    ; if yes, branch to skip midair control
    
    This check stops you from changing direction while jumping from a roll. You can just get rid of this check and that should work fine, but I'd advise getting rid of other references to bit 4 of Sonic's status.
     
    Xeal likes this.
  18. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,696
    Location:
    italy
    Most of my SMPS songs have been publicly released at one point or another, either on my (now defunct) webspace and/or on the (now defunct) SSRG repository. I can't easily reupload them anywhere as of now, so it's good that someone else provided an alternative, I never meant to stop sharing them, it's just that shit happened.

    To restate, for everyone: you're free to use any songs you want, all I ask for is a line of credit in your hack. For Bridge Zone in particular, you're still free to use it, but you should credit Puto as well, as we did that one together.

    This, obviously, doesn't apply to songs I shared privately. If you're somehow in possession of a song I never released to the public, keep it for yourself. There aren't many cases, though. As I just said above, I released most of my songs at one point or another.

    Also, for the record, the fact that a VGM is available doesn't imply that a certain song is public, it's actually quite the opposite: many people record VGM files to showcase their songs without having to release the source binary files.
     
    Misinko and AkumaYin like this.