Basic Questions and Answers Thread

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

  1. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    You could also take the collision and angle array files (same format in all games, no conversion needed) from S3K and make the game use those when playing a level imported from S3K.
     
  2. Spanner

    Spanner The Tool Member

    Joined:
    Aug 9, 2007
    Messages:
    2,570
    This right here. I made a few level ports from Sonic 1 to Sonic 2 and it worked well.
     
    Last edited by a moderator: May 3, 2013
  3. JoenickROS

    JoenickROS ROS (bug fixing in progress) Member

    Joined:
    Feb 5, 2012
    Messages:
    929
    What folder in the disassembly, do you place the angle array files? misc.?
     
  4. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Your level editor's project files should tell you where the collision arrays are located.
     
  5. JoenickROS

    JoenickROS ROS (bug fixing in progress) Member

    Joined:
    Feb 5, 2012
    Messages:
    929
    I know each zone has their own primary and secondary collision but for the other collisions like,

    Code:
    Angle Array:             ..collisionCurve and resistance mapping.bin
    Collision Array:         ..collisionCollision array 1.bin
    Rotated Collision Array: ..collisionCollision array 2.bin
    
    are shared with all the zones, so are you saying I should add the array files from the s3k disassemly and point to them in the asm file for the converted s3k zones? Am I following you correctly so far?
     
    Last edited by a moderator: May 4, 2013
  6. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Yes. Just put S3K's collision data alongside S2's original files, then have it read the S3K files instead of S2's for S3K zones.
     
  7. JoenickROS

    JoenickROS ROS (bug fixing in progress) Member

    Joined:
    Feb 5, 2012
    Messages:
    929
    Alright thanks Mainmemory and ya first time I followed someone correctly on the first try "pats self on back".
     
  8. fdswerty

    fdswerty Well-Known Member Member

    Joined:
    Apr 10, 2013
    Messages:
    138
    I'd like to know how to replace the DAC samples in Sonic 1, since I searched over the internet, and I didn't found anything, so does anyone know how?

    Thanks.
     
  9. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    The Sonic 1 PCM playback driver is Z80 controlled, the drum samples are stored inside the Z80 driver itself, and the Z80 driver is compressed in the Kosinski format. The samples themselves are compressed in a DPCM lossy format. To replace the samples, you need to decompress the Z80 driver from the Kosinski format, compress your new samples in the DPCM format controlled by the Z80, place the compressed samples inside the Z80, change the sample pointers, and then recompress the Z80 driver. It is important however, to ensure that the Z80 ROM is lower or equal to 2000 (hex) bytes when uncompressed, because the Z80 RAM space is exactly that size. More thorough information on the driver can be found here.

    It is recommended of course, to replace the sound driver with a more flexible driver, such as Jman2050's Sound Driver, or vladikcomper's Sound Driver.

    There are a few other drivers out there, though I do believe they are either private or are just not worth looking at.
     
  10. M.N.K.

    M.N.K. In the River of Darkness... Member

    Joined:
    Feb 22, 2009
    Messages:
    506
    Location:
    Earth...
    OK so i did what I could and i'm still having the same problem. i just cant seem to figure this out. i tried to make the routine the same way it is set for the second act of scrap brain zone by making a 3rd routine to check the position of the card and then make it set to where sonic runs to the right after and this is what i keep getting every time

    [​IMG]

    (sorry for the crap quality)

    anyway that I can fix this or am I missing something here? I have seen no lines that calls for the rest to scroll after the results have been added which makes things a bit more difficult for me.
     
  11. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    You never answered my question, but looking at your animation, it's Sonic 1?

    Anyway, I don't hack Sonic 1, but I just had a quick look at a disassembly and went here "Got_ChkBonus:"  and you'll see this (or similar):


    cmpi.w #(id_SBZ<<8)+1,(v_zone).w

    I literally changed "SBZ" to "GHZ" and I tried the ROM, and it works perfectly in GHZ2.  I guessed that "+1" meant add 1 to the act.  So currently it's doing act 2.  I changed it to "+0" and then it didn't work on GHZ2 but on GHZ1.  I didn't try this, but no doubt +2 means it will do it on act 3.
     
  12. Psycho RFG

    Psycho RFG Well-Known Member Member

    Joined:
    Feb 22, 2011
    Messages:
    234
    Blazer, long time has passed and you still continue copying my project... among other things, the Sonic standing with crossed arms... Now I can see you are using the same title cards font I'm using (mine is a bit edited but you are using the same anyway), and now the runing thing after the pose, same as my hack works... What can I say? Please, be more original...
     
  13. M.N.K.

    M.N.K. In the River of Darkness... Member

    Joined:
    Feb 22, 2009
    Messages:
    506
    Location:
    Earth...
    I don't know where the assumption of you thinking that I am copying you came from but the fact is that I am not. for one I actually did the crossed arms myself and at that time I didn't even know that you did the same thing, and secondly for the title card font, I'm not the only one who uses this font you know. though we may not know it, there are other people including myself who use it as well simply because they like the way it looks, and beside that, if this was in my real disassembly this font would have looked way different than what is shown, so technically the whole be more original thing wouldn't really apply there because there are going to be others that's going to do the same thing. 

    @RHS: yes this is for sonic 1 and I will test this out whenever I can.

    (Edit: Changed it like you said and it worked, though still have some errors to fix but i can do the rest myself of course. thanks for the help)
     
    Last edited by a moderator: May 15, 2013
  14. fdswerty

    fdswerty Well-Known Member Member

    Joined:
    Apr 10, 2013
    Messages:
    138
    OK, So i've coded my own Insta-Shield code in Sonic 1, the code works fine at all, but it doesn't show up when it's activated, because I don't know how.

    Any help?

    Thanks.
     
  15. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    How do you know it works if it doesn't show up?

    Also, do you use Regen's debugging variant?
     
  16. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    I don't know if that's the case, but the code can work even if the shield is invisible: it can still play the sound effect and it can still extend Sonic's attack radius, along as making it possible to kill Orbinauts without being hit by the spiked balls, etc.
     
  17. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    Well, the SLZ Orbinauts, anyway, seeing as one can already kill the LZ Orbinauts without being hit by the spiked balls. But yeah, the Insta-Shield does let you kill those annoying-as-hell Star Light Zone Orbinauts without being hit by the spiked balls, since the SLZ variant doesn't throw the balls at you.

    And yes, I do know something about Sonic 1. *runs*
     
    Last edited by a moderator: May 26, 2013
  18. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    You know, with very precise timing it's actually possible to kill even the SLZ Orbinauts without being hit; it's something that belongs in a TAS for the most part, but I could do that a couple of times in the past (even though I used the Spin Dash in one case). If the timed Youtube link doesn't work, go to 4'16" by hand.
     
    Last edited by a moderator: May 26, 2013
  19. Crash

    Crash Well-Known Member Member

    Joined:
    Jul 15, 2010
    Messages:
    302
    Location:
    Australia
    Basically you're going to have learn how Dynamic PLC's work, and load the instashield graphics into VRAM frame by frame, as the animation is playing, ideally into the shield vram graphic position. That's how it's done in Sonic 3, along with the other elemental shields.The spindash dust and other effects are done in pretty much the same way. I did it myself not long ago, and while I needed to completely rewrite the shield code it made it pretty easy to add more shields once the basic code is in place.
     
  20. JoenickROS

    JoenickROS ROS (bug fixing in progress) Member

    Joined:
    Feb 5, 2012
    Messages:
    929
    Alright I have a question. So a couple days ago I was talking to Thomas about his flight code, well he gave it too me so I could help him finish, I have finished it, (with help from a friend) but I have run into a couple of bugs that I will list.

    1. Tails starts flying as soon as the jump button is pressed.

    2. When you are pressing the jump button to gain height once in a while Tails will show his hanging animations.

    3. When falling off a ledge tails quickly falls to the ground and can sometimes go through the floor.

    4. Tails doesnt get tired.

    Btw I have created 4 flags for Tails flight code and they are,

    Flyswim_flyup =                 ramaddr( $FFFFEE06 )
    Flyswim_timer =                 ramaddr( $FFFFEE08 )
    Flyswim_hitceling =           ramaddr( $FFFFEE0E )
    Flyswim_flag =                  ramaddr( $FFFFEEC5 )

    You can see that I have made them object RAM flags, (had to find free RAM with Regen).

    Another portion of my question is do I need SST's to make Tails flight work correctly?

    Here is a demonstration.



    Edit: Also if I have used RAM that is not free or is not existant let me know lol
     
    Last edited by a moderator: May 28, 2013