Basic Questions and Answers Thread

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

  1. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    Look to Titlescreen:'s Title_LoadText: for move.w    #$178,($FFFFF614).w ; run title    screen for $178    frames

    EDIT: though I warn you, too long & the logo will move upward, then load SegaScreen
     
    Last edited by a moderator: Mar 20, 2015
  2. Devon

    Devon I'm a loser, baby, so why don't you kill me? Member

    Joined:
    Aug 26, 2013
    Messages:
    1,376
    Location:
    your mom
    warr1or2, Obj08 in Sonic 2 is more than the spindash dust. It is also the splash and skid dust. The object just used 1 mappings, DPLCs, and animation file. How it works is that it loads the appropriate art when Sonic skids, jumps in or out of water, or when he spindashes. The art is determined by its current animation.


    If you where to look further into the mappings and DPLCs, you would see the spindash dust frames. Same for the splash and skid dust.


    Hopefully, it makes sense now.
     
  3. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    What if there isn't a specific art_tile set for each one? That would mean the mappings don't point directly to the art, so SonMapEd won't display the Spin Dash frames properly.
     
  4. TheInvisibleSun

    TheInvisibleSun Visible Member

    Joined:
    Jul 2, 2013
    Messages:
    424
    Location:
    Western New York, USA
    Somewhere in the shield's code, it will call to use Sonic's object status. Commenting that line out should do the trick. (Sorry I can't recall the exact line, I don't have a disassembly on me at the moment.)
     
  5. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    Note that the above fix removes the shield's ability to flip horizontally with the player.

    Now, the shield flipping vertically is indeed a bug, but if you want the horizontal flipping, see my quoted post from this topic below.

    Sonic's Status bitfield


    Bit  Hex  Description

    0  $01  Orientation. Clear is left and set is right.
    1  $02  Set if Sonic is in the air (jump counts).
    2  $04  Set if jumping or rolling.
    3  $08  Set if Sonic isn't on the ground but shouldn't fall. (Usually when he is on a object that should stop him falling, like a platform or a bridge.)
    4  $10  Set if jumping after rolling.
    5  $20  Set if pushing something.
    6  $40  Set if underwater.
    7  $80  Unused.

    Notice something? Sonic's 'in air' bit is the same as the object's 'Y orientation' bit. So, when in the air, the object appears upside-down, having inherited the 'in air' bit.

    S3K's shields would combat this by using 'andi.b #1,obStatus(a0)' to limit Status inheritance to the 'X orientation' bit.
     
  6. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    270
    Location:
    UK
    About the Spindash dust, I wondered about this a while ago too. But now I have to ability to read the code and figure out why it wouldn't work in SonMapEd.

    To start with I looked at Obj08 and found this in the PLC code:


    addi.l #ArtUnc_Splash,d1 
    You can see that it loads the Splash art. So where does the Dust get loaded? ArtUnc_Dust doesn't get loaded by itself but with the Splash art:


    ;--------------------------------------------------------------------------------------
    ; Uncompressed art
    ; Splash in water ; ArtUnc_71FFC:
    align $20
    ArtUnc_Splash: BINCLUDE "art/uncompressed/Splash.bin"
    ;--------------------------------------------------------------------------------------
    ; Uncompressed art
    ; Smoke from dashing ; ArtUnc_7287C:
    align $20
    ArtUnc_Dust: BINCLUDE "art/uncompressed/Spindash smoke.bin"

    To fix the problem simply combine the two art files and it will load correctly in SonMapEd. Also remove the Binclude for the dust art as it's no longer needed

    Does anyone know why the two files are split in the first place? Seems like this fix could be implemented to the GitHub version with no problems.

    Edit: It seems like if anything the Skid Dust art should be split as the mappings point to the wrong place both before and after combining the art. This would allow people to easily change the art of the Splash, Spindash Dust and Skid Dust. 
     
    Last edited by a moderator: Mar 20, 2015
  7. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    Somewhere in the shield's code, it will call to use Sonic's object status. Commenting that line out should do the trick. (Sorry I can't recall the exact line, I don't have a disassembly on me at the moment.)




    Thanks! It worked great! I didn't want it mirror when you walk the other direction anyway.
     
  8. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    I'm a bit confused on porting HPZ from sonic 2 to sonic 1 for RIS1:AGBW. the Hidden Palace Zone, when loaded to sonlvl, Looks like it should in game (course I converted the level from S2B). It always crashed when loaded. So i tried deleting some chunks & the level loaded, but the tiles look like those of GHZ. I have the updated sonlvl & i did not copy chunks from GHZ (much less MZ) to HPZ


    Blk16_HPZ:    incbin    HPZBlocks.bin
            even
    Nem_HPZ:    incbin    HPZTiles.bin    ; HPZ primary patterns
            even
    Blk256_HPZ:    incbin    HPZChunks.bin

    But somehow it loads grassy tiles like those from GHZ & MZ & also Richter falls to his death in the level.

    I do have a copy pasted aniart from MZ, but it's never loaded cause i have it

    bra aniart_none
    so that it won't load it, so this can't be the problem.

    Video
     
  9. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    You have to change the main Zone art and mappings pointers to access your included files. If it works anything like S2, there should be a "Main Level Load Block", which does this. Judging from themess you showed, its probably pointing to Ghzs art as well as mappings and chunks from elsewhere.


    Sorry if theres bad grammar, mobile sucks...
     
  10. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    dc.l Nem_HPZ+$4000000
        dc.l Blk16_HPZ+$5000000
        dc.l Blk256_HPZ
        dc.b 0,    $94, $14, $14
      
    straight from Main Level Load Blocks.asm

    EDIT: Sonlvl pik

    [​IMG]
     
    Last edited by a moderator: Mar 22, 2015
  11. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    +$4000000

    +$5000000

    The 68k is 24-bit based addressing (24-bit BUS), meaning that when a 32-bit address is being used, only the lower 24-bits will be accepted, the upper 8-bits are omitted/masked. Sonic Team supplied the + values there to set the 32-bit value as PPAAAAAA. Where AAAAAA is the address of the main art/block data, and PP is the pattern load cue ID. Since the MSB is useless, they put it to use for optimisation reasons.

    In the above case, the PLC ID's 04 and 05 are used. If memory serves me right, that's Green Hill Zone's PLC parts 1 and 2.
     
    Last edited by a moderator: Mar 22, 2015
  12. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    I've changed it out to like +$2000000 & $3000000 & even tried commenting those parts, also tried $10000000 & $11000000 & no change so i'm guessing this part gets ignored
     
  13. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
  14. TheStoneBanana

    TheStoneBanana banana Member

    Joined:
    Nov 27, 2013
    Messages:
    602
    Location:
    The Milky Way Galaxy
    Just move the mappings up a tile or so.


    That should fix it.
     
  15. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
  16. Irixion

    Irixion Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    670
    Location:
    Ontario, Canada
    Because you're probably having sonic's rolling status set when you're in that animation. Rolling status pushes sonic down 4 pixels (I think), so make sure you're not setting that.
     
  17. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    i think me too, so i just have to search the value that i have to change! 
     
  18. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    Ashuro the way your pik describes it, you have to move the peelout's frames in sonmaped, but however Irix is right. there's probably a flag set causing this. I've had this same thing happen when porting the spindash one day. Drove meup the wall. Good thing i scrapped that project (Somewhat)

    EDIT: to find out which is right, make changes in sonmaped (which you've probably done), if it's not it, check for flags. I do recall my problem it set the flag with standing, after jumping fixed it.
     
    Last edited by a moderator: Mar 23, 2015
  19. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    The problem about peelout was fixed!

    Now i have a question, i'm using SonED2 basically, but i want to test SonLVL, and there is a problem:

    http://image.noelshack.com/fichiers/2015/13/1427206588-sans-titre.png

    There is no badnicks or objects from other zone?

    EDIT: In fact, i've try to edit Labyrinthe Zone, in SonLVL there is no badniks, and in other zones, there is no all the object can be existing in the game or in SonED2... Why?
     
  20. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    1. SonLVL's object definitions are very incomplete. I haven't had the time or will to figure out every single object and figure out how to make it display properly, and few others seem willing to step in.

    2. By default, SonLVL will only show the subset of objects whose graphics are actually loaded for the level you're editing. There's no sense in letting you place a Moto Bug in Labyrinth Zone, if you'll just get a broken mess ingame.

    You can still double click or right click and choose "Add Object" and enter an ID manually to place any object in the game.