Basic Questions and Answers Thread

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

  1. Animemaster

    Animemaster Lets get to work! Member

    Joined:
    Mar 20, 2009
    Messages:
    1,229
    Location:
    UK
    Yes your right, artunc is art uncompressed loaded in game. Artnem is art compressed loaded in game.
     
  2. DarkLeach

    DarkLeach Well-Known Member Member

    Joined:
    Jul 3, 2011
    Messages:
    193
    Location:
    In the middle of desert heat
    Hey, I want to ask something, I found what looks like Garbage Wasted VRAM (Outlined in RED), but I want to know for sure what it is. I see it move occasionally when I move and It loads after the First GHZ Tiles do, so what do the Tiles (Outlined in RED) do? Also I found some free GHZ Tiles (Outlined in GREEN), but not enough for the rippling water, the Shield art overwrites the last few tiles. And I see no free art other than that little area (Outlined in GREEN), so I'll try to shrink the Spring Art or the Shield Art and Re-Map it. So what should I do?


    /monthly_01_2012/post-1593-0-34766300-1326844969_thumb.png


    Oh and why does GHZ Freeze upon loading when I change:



    Code:
    
    PLC_GHZ: dc.w $B
    
    


    to this:





    Code:
    
    PLC_GHZ: dc.w $C ; or any other value than $B
    
    
    [/CODE]
     

    Attached Files:

    Last edited by a moderator: Jan 18, 2012
  3. OrdosAlpha

    OrdosAlpha RIGHT! Naebody move! Root Admin

    Joined:
    Aug 5, 2007
    Messages:
    1,793
    Location:
    Glasgow, Scotland
    The red highlighted stuff ain't wasted VRAM. That's level layout related shit.
     
  4. FinkMac

    FinkMac Swëdish Chef Member

    Joined:
    Jan 14, 2012
    Messages:
    54
    Location:
    Walk down the street. You will see a car. Tell the
    Which is Nemesis compressed... To save ROM space I guess.
     
  5. DarkLeach

    DarkLeach Well-Known Member Member

    Joined:
    Jul 3, 2011
    Messages:
    193
    Location:
    In the middle of desert heat
    Alright. Now I know what it is. Thanks! However what does it do exactly? The Green Highlighted Area is free VRAM right?
     
  6. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    The VDP has three main memory spaces, VS-Ram (for vertical scroll data), C-Ram (for colour palette data) and V-Ram (for art, plane A mappings, plane B mappings, window mappings, horizontal scroll data and sprite data).


    This means that you have to manage how you use your V-Ram and what for, you may chose where in V-Ram you'd like the VDP to read the plane A/B, window, horizontal and sprite in V-Ram, but of course, you have to be careful not to write art to those same spaces.


    That first section you highlighted red is at V-Ram address C000, that is the Plane A map field, every word is a value that sets what tile is to display, and whether it is flipped/mirrored, what colour line it uses, and if it is high or low plane. That second section you highlighted red is at V-Ram address E000, that is the Plane B map field, every word is the same format as Plane A.


    These are both responsible for displaying the art tiles on screen for the FG and BG, anything you write to those spaces WILL be overwritten by the level tile drawing algorithm known in the Sonic sources as "LoadTilesAsYouMove".


    Just to list out a few V-Ram spaces you should not write art to:


    C000 - CFFF Plane A


    E000 - EFFF Plane B


    F800 - FA7F Sprite Table


    FC00 - FF7F Scroll Table


    On subject of seeing what's in V-Ram, what I do is I write FF's to the entire V-Ram space near the beginning of the routine "Level" so it clears out all of the previous art that's in there, so when the new art is written, the free tiles will always be F (using the end colour), and once I've found the space I'm looking for, I then remove the code that writes FF's.

    You know what, that is actually a brilliant idea, why didn't I think of that, I always used to make a savestate and then delete the first 12478 hex bytes and view in a standard tile editor, but using SonED obviously doesn't require having to do that, and shows all current palette lines.


    Thanks for sharing this method, you may have helped me save time for future projects =)
     
    Last edited by a moderator: Jan 18, 2012
  7. vladikcomper

    vladikcomper Well-Known Member Member

    Joined:
    Dec 2, 2009
    Messages:
    415
     
    Last edited by a moderator: Jan 19, 2012
  8. Psycho RFG

    Psycho RFG Well-Known Member Member

    Joined:
    Feb 22, 2011
    Messages:
    234
    @vladikcomper: Interesting fix, I never noticed it. Thanks for let us know about it. Nice code for fixing it :D
     
  9. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    270
    Location:
    UK
    Ok so I added some custom animations to my game and instead of looping back to the start the animation just stops at the last frame. Here is my animation:




    SonAni_Spring: dc.b 4, $75, $76, $77, $78, $79, $7A, $7B, $7C, $7D, $7E, $7F, $80, $FE, $C



    If it is important, the animation is for using a spring.


    And also how do you use the ASM code box?
     
    Last edited by a moderator: Jan 19, 2012
  10. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
  11. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    270
    Location:
    UK
    Nope I have extended the limit using that guide.
     
  12. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    270
    Location:
    UK
    Mabye its this change from the spindash code:




    SPLC_ReadEntry:


    moveq #0,d1


    move.b (a2)+,d1


    lsl.w #8,d1


    move.b (a2)+,d1


    move.w d1,d3


    lsr.w #8,d3


    andi.w #$F0,d3


    addi.w #$10,d3


    andi.w #$0FFF,d1


    lsl.l #5,d1


    add.l d6,d1


    move.w d4,d2


    add.w d3,d4


    add.w d3,d4


    jsr (QueueDMATransfer).l


    dbf d5,SPLC_ReadEntry ; repeat for number of entries



    Sorry for the double post


    Edit: It is somthing with the $80 frame, the animation works fine when I leave it out
     
    Last edited by a moderator: Jan 19, 2012
  13. Animemaster

    Animemaster Lets get to work! Member

    Joined:
    Mar 20, 2009
    Messages:
    1,229
    Location:
    UK
    I could be wrong, but have you tried $FE, $B instead?. I could be wrong but counting I think its B you want rather C.
     
  14. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    270
    Location:
    UK
    Nevermind i'm a dummy followed the guide wrong.
     
  15. DarkLeach

    DarkLeach Well-Known Member Member

    Joined:
    Jul 3, 2011
    Messages:
    193
    Location:
    In the middle of desert heat
    Could I have some help porting the S2 Beta Running Animation to Sonic 1? The Split format Simon Wai Beta doesn't have and Mappings or tiles for Sonic other than Sonic.nem which I can assume is Nemesis Compressed Graphics and then the S2 Nick Arcade Proto Split Disassembly has All of Sonic's Art uncompressed (And I load it into SonMapEd) but It has no sprite mappings or DPLC's that I can use (However the Sonic 1 Palette works), which makes it so I can't tell anything apart. I can load the Mappings and DPLC's from Sonic 1 but then it's still un-editable and looks like crap, could someone show me the correct Art to take out of the S2NA proto (And how to to take it out and If you have them Could I get Some S2NA Mappings or DPLC's?) and where to put it in in my Sonic 1 Hacks Mappings and which Animation it would use? Note I have to Spin Dash Mappings in there, so do I no longer have room? Any help would be greatly appreciated! :)
     
  16. SuperEgg

    SuperEgg I'm a guy that knows that you know that I know Member

    Joined:
    Oct 17, 2009
    Messages:
    Location:
    THE BEST GOD DAMN STATE OF TEXAS
    What in God's name are you talking about there is no mappings or DynPLC? It's all there, I know, I put it there. It is all in the mappings folder.


    Sonic's Mappings file is callled SonicMap.txt (I'll update it to .asm, but it will still load), and Sonic's DynPLC are in the DynPLC in the mappings folder under the name of SonicDyn.txt. Make sure the settings are Sonic 2 mapping format in SMED, otherwise it will fuck up. Otherwise, everything else should be fine. Once it is open in S2 format, change the format to Sonic 1, and save it to wherever. That should do it. Have fun.
     
  17. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    270
    Location:
    UK
    Wouldnt it just replace the normal running frames? If so it would be a simple swapping of sprites. SonMapEd is your friend.
     
    Last edited by a moderator: Jan 20, 2012
  18. SuperEgg

    SuperEgg I'm a guy that knows that you know that I know Member

    Joined:
    Oct 17, 2009
    Messages:
    Location:
    THE BEST GOD DAMN STATE OF TEXAS
    ehh, it's not that simple. See, the walking and running frames share pieces. If my memory is correct, the pieces are different from Sonic 1, but I could be wrong and it could all work out in the end.
     
  19. DarkLeach

    DarkLeach Well-Known Member Member

    Joined:
    Jul 3, 2011
    Messages:
    193
    Location:
    In the middle of desert heat
    I already tried renaming the ".txt"'s to ".asm" (Should have said that originally sorry) and it didn't work, I swear I did it before. Anyway the Mappings will load now but the DynPLC won't for whatever reason.

    The Running and walking share Sonic's Face (In Sonic 1) (Which probably means I'll have to import the walking animation too. Oh well.) But the feet are completely different mappings.
     
  20. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    270
    Location:
    UK
    Well I dont see what the fuss is about, Im not busy at the moment so if you want send me you Sonic art, mapping and DPLC and I will do it.