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
  2. tilk

    tilk Active Member Member

    Joined:
    Feb 2, 2012
    Messages:
    30
  3. D.A. Garden

    D.A. Garden Sonic CD's Sound Test Member

    Joined:
    Aug 6, 2009
    Messages:
    582
    Location:
    England
    Not only did you double post, but you only waited 6 hours before deciding to ask for help with the same problem again. Please refrain from doing this in future.

    If someone is willing to help you, then they will respond. We do, however, have other things to, both on the forums and off. Please be patient, and if someone can help you, they will.
     
  4. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    416
    Location:
    Town Creek, AL
  5. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    Yes. But the same.
    So i've import art block per block and edit the tiles with the right palette (Sandopolis BG in Marble Zone). It's need more time but it's working, (but the palette isn't right everywhere, damn!)

    I will try again your help.(sorry i'm french, bad english :) )
     
  6. Crash

    Crash Well-Known Member Member

    Joined:
    Jul 15, 2010
    Messages:
    302
    Location:
    Australia
    I'm a bit late with this answer, but the background switching in these sections in Sonic 2 is only a cosmetic effect and no collisions are actually checked against the background plane. Sonic collides with a bunch of large invisible solid objects that line up with where the background appears, as opposed to Sonic 3 & Knuckles where the collisions with both planes are checked.
     
  7. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    Yeah you are too late, I learned that last weekend. Because I don't like way Sonic 2 does that, I used Sonic's 3 way and it's working pretty well. All I have to do now is make it so Sonic moves with the background.
     
  8. tilk

    tilk Active Member Member

    Joined:
    Feb 2, 2012
    Messages:
    30
    Since Flamewing haven't connected in a month, I'm gonna move my question here.
    Flamewing smps sound driver. I recently tried to install it in S3k. So far, I managed to get it compiling... But I needed to add parts that are not there/gone like "Size of sound driver 2 guess" at the exact location where it would be in stock s3k. The thing is, I need to know the new size, otherwise...
    1: It wouldn't plays any if incorrect.
    2: I'm forced to include that variable, as if I don't, the compiler will complain about setting it to a minimal value...
     
  9. GenesisDoes

    GenesisDoes What Nintendont Member

    Joined:
    Jan 2, 2016
    Messages:
    159
    Location:
    Pittsburgh, PA
    So for my Sonic 1 hack, I have modified the special stage loading routines to load normal platforming levels instead of Sonic 1's rotating stages (think Sonic Triple Trouble's special stages). It even has the proper Special Stage results screen showing up depending on if you die or reach the level's signpost (in which you get an emerald), and returning back to the next normal level in the gameplay sequence. Only problem is getting the proper special stage level to load up.

    Quick question, how can I use a byte to load words from an array (I suck at memory addressing)? I'm using v_lastspecial (the current special stage ID) as an index to fetch a word from a binary file called "Level Order Special.bin". This word holds the level zone/act to goto for the special stage ID. This file is in the same format as "misc/Level Order.bin", (ZZAA, Z=Zone ID, A=Act ID).

    Modified Special Stage loading routine:

    Code:
    SS_LoadData:
            subq.b    #1,(v_lastspecial).w            ; Decrement special stage zone. This fixes an odd bug which causes lastspecial to increment by 2 instead of 1
            move.w    (v_lastspecial).w,d0             ; Load special stage ID into d0
            andi.w    #7,d0
            add.w    d0,d0
            ;lsl.w    #2,d0
            move.w    LevelOrderSpecial(pc,d0.w),d0    ; load next SS level from level order array
            move.w    d0,(v_zone).w                    ; set level number
            rts
          
            ;!@Special Stage
            ;Holds special stage order.
            ;ZZAA format like with orig Level Order.
            ;7 slots for the 7 chaos emeralds
            LevelOrderSpecial:    incbin    "misc\Level Order Special.bin"
                even
                zonewarningnoending LevelOrder,8
    
     
  10. Devon

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

    Joined:
    Aug 26, 2013
    Messages:
    1,372
    Location:
    your mom
    You can just clear d0 and then load the byte into d0, and it will work just fine without any other modifications.
     
  11. GenesisDoes

    GenesisDoes What Nintendont Member

    Joined:
    Jan 2, 2016
    Messages:
    159
    Location:
    Pittsburgh, PA
    Found the issue; a byte was being written to the variable as a word in the function above it.
    Changed line from "move.w (v_lastspecial).w,d0" to "move.b (v_lastspecial).b, d0"
     
  12. NoneofyourBusiness

    NoneofyourBusiness Bag of plums. Member

    Joined:
    Apr 27, 2016
    Messages:
    126
    Location:
    The start
    I'm using the Sonic Retro tutorial on porting the spindash to Sonic 1, and I got to the part where you have to code in the actual spindash sound (soundD1), and I managed to do it, but when I play my hack and do a spindash, the sound doesn't play. The only other major thing I did was put in Mega PCM. Maybe that's the reason, and soundD1 only plays on a non-modified Sonic 1 sound? I have no idea.
     
  13. Devon

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

    Joined:
    Aug 26, 2013
    Messages:
    1,372
    Location:
    your mom
    MegaPCM is only a PCM driver (which allows for the drum samples in Sonic). You just didn't follow the tutorial correctly. I say just look over the tutorial again and see what you messed up on.
     
  14. NoneofyourBusiness

    NoneofyourBusiness Bag of plums. Member

    Joined:
    Apr 27, 2016
    Messages:
    126
    Location:
    The start
    Alright, thank you!
     
  15. tilk

    tilk Active Member Member

    Joined:
    Feb 2, 2012
    Messages:
    30
    I'm having trouble porting the debbuger from sonic 1 to Sonic 2 HG/git disassembly. it works. but the thing is, after just porting it and locating it on it's exact place in sonic 2, which is:

    v_regbuffer: ds.b Object_respawn_Table ; 40 bites
    v_spbuffer: ds.b Object_respawn_Table+$40
    v_errortype: ds.b v_spbuffer+4
    the underwater levels don't work anymore. only the especific acts where there is water, the level freezes instantly! Anyone can help me with this?
    PD.: Yes. I already checked in a clean s2 disassembly, and same results
     
  16. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
  17. tilk

    tilk Active Member Member

    Joined:
    Feb 2, 2012
    Messages:
    30
    thanks on advice! Might I ask, how to use ds.b on the correct way, then? Also, the main reason about why I'm using the one from sonic 1 is: if you're lucky, the game will continue playing, usually glitched, if not back to sega, after pushing a few presses. Especially useful since I use the level selector frequently to test my levels. second, is.... I didn't knew about Flamewing's one, in all honestity!
     
  18. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    The ds.b directive reserves space for the specified number of bytes. If you want to have a variable occupy the same space as another variable, you can either insert a label before the label you want to share space with, or just do newvar = oldvar.
     
  19. tilk

    tilk Active Member Member

    Joined:
    Feb 2, 2012
    Messages:
    30
    I'm editing the monitors. Recently, after removing the teleport monitor art (editing directly with sonmaped Art & mappings), the game crashes on the 3rd frame of the monitor breaking (first frame, normal. explosion and icon loads. second, the monitor art (not broken) appears again, too. 3rd frame, I see garbage for less than a split second get a line 1010 emulator error.)
    I'll provide the code; to see if anyone can help... I can't find a solution.


    EDIT: Figured out, had to align the animations. ^^; and 2 or 3 lines
     
    Last edited: May 10, 2016
  20. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France