Basic Questions and Answers Thread

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

  1. hfdshdgfhgn

    hfdshdgfhgn fdsgfdgfhgfds Member

    Joined:
    Dec 28, 2009
    Messages:
    89
    Why would we help if you didn't even attempt to do it yourself?


    Once you try, come back and try to ask a question to get it working properly. That's always the best thing to do.
     
  2. Animemaster

    Animemaster Lets get to work! Member

    Joined:
    Mar 20, 2009
    Messages:
    1,229
    Location:
    UK
    Saying why should we help you isn't exactly gonna help anyone now is it? it sounds like something a teenager would say, because they are annoyed with someone or something.


    What you should kindly do is maybe relate to a topic that might help them broaden their knowledge, or say things like have a search around the forums to see if you can find things related to your question, things like that. Make it user friendly, I know people get annoyed when people don't do their research, or have ago but we have to just do our best. Deox has asm knowledge, so he's not a noob, just needs a nudge in the right direction :) . Unfortanatly I don't have knowledge of sram(yet) either, so I can't help you there, but when I need to and if I do, I'll ask myself, but I'll sav it for another day.
     
  3. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    Theo worked too hard to just tell you the code, you gotta find out about it. There's a few topics on it on retro.
     
  4. hfdshdgfhgn

    hfdshdgfhgn fdsgfdgfhgfds Member

    Joined:
    Dec 28, 2009
    Messages:
    89
    Theocas did work very hard on it, and not even trying? Meh. He should've at least looked around first.
     
    Last edited by a moderator: Aug 2, 2010
  5. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    I have to agree with Animemaster here, it's one thing to protect your knowledge from others who you might think aren't hard working enough, but another to put them down without setting them a clear direction in which they can learn from, and making them out to be complete utter morrons (Regardless of whether it may be true or not). If you don't want to give the answer to the person, don't reply, no-one's gonna fource you lot.


    Let's have no more of it now shall we?


    Deox: You could try searching this thread for previous questions on the subject, or have a float around the forums for your answer, I do recall this question being asked and answered a few times on Retro too (Though admittedly I'm not sure here as well).
     
  6. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
  7. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    Last edited by a moderator: Aug 2, 2010
  8. FireRat

    FireRat Do Not Interact With This User, Anywhere!!! Exiled

    Joined:
    Oct 31, 2009
    Messages:
    535
    I'm trying to convert my game to a 32X game, by copying data from 32x port created by drx, in Sonic Retro. I have a small ask with the sound driver: The PWM samples is uncompressed or compressed? what's the PWM samples format?


    That's it
     
  9. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    Yeah, me too. So well, I'm just showing you how to do it (taken from that link). It's pretty easy to understand:

    • The first thing you wanna do is to make SRAM actually working, so go the top of the disassembly, and replace this:


      SRAMSupport: dc.l $20202020 ; change to $5241E020 to create SRAM
      dc.l $20202020 ; SRAM start
      dc.l $20202020 ; SRAM end


      With this:

      Code:
      SRAMSupport:	dc.l $5241E020		; change to $5241E020 to create	SRAM
      		dc.l $200000		; SRAM start
      		dc.l $200100		; SRAM end
      
      That location $20202020 is probably just a random number that doesn't do anything, so we need to set a real location for it. Right now we have $100 bytes of space we can use ($200000 to $200100).
    • Next we gotta deal with the SRAM as loading. As a very, very, simply example, let's add a feature that allows you to play a level, close the emulator and start from that level again. So go to the "Level:" routine and put this at the very beginning (probably not the smartest area, but it's an example anyway):

      Code:
      		move.b	#1,($A130F1).l		; enable SRAM (required)
      		lea	($200001).l,a1		; base of SRAM (required)
      		move.w	0(a1),($FFFFFE10).w	; load zone and act
      		move.b	#0,($A130F1).l		; disable SRAM (required)
      
      You might already get an idea from this code. Anyway, save and build now.
    • Go to the level select and select any zone but GHZ 1. Play a bit, then close your emulator. You should see a file called s1built.srm. Open it in a hex editor and you should see the level ID of that level (for example, 0501 for SBZ 2). Edit that value to another VALID one. Save and play. You should now start from the set number.
    If you want to store instead of loading, you basically just have to switch that line from this:



    move.w 0(a1),($FFFFFE10).w ; load zone and act


    To this:

    Code:
    		move.w	($FFFFFE10).w,0(a1)	; save zone and act
    

    But a very important notice: The size is double as big as normal stuff, meaning 1 byte takes 2 in SRAM, 1 word (2 bytes) takes 4 bytes in SRAM, a longword (4 bytes) takes 8 bytes in SRAM.


    Another notice: Could be you need to load and save with something that involves the movep command. I didn't need it, but probably just because I save only one thing. You might take a look at it yourself if you run into any troubles.
     
    Last edited by a moderator: Aug 3, 2010
  10. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    "AND THE TRUTH SHALL SET YE FREE!"


    Cheers selbi for taking the time to explain, infact, you should repost this in the tutorials section.

    Uncompressed, PCM format, if I'm not mistaken.
     
    Last edited by a moderator: Aug 3, 2010
  11. clarisonic1

    clarisonic1 Well-Known Member Member

    Joined:
    Jul 6, 2010
    Messages:
    106
    We're trying to make SLZ2 a speed area level like sonic next gen, but it's so short, you can get through it in 13-14 seconds. Is there a way to extend the level so it takes at least a minute to complete?
     
  12. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    I don't think you can make it THAT long.
     
  13. DeoxysKyogre

    DeoxysKyogre No idea what to put here .-. Member

    Joined:
    Jan 31, 2009
    Messages:
    298
    I'm really sorry for acting like a newbie everyone. I will try to get it working by myself.

    Well, there's a hex file in the misc folder called lvl_size.bin. Turn on the debug mode, and you should look at the numbers of the bottom (but you have to reach to the end of the level) and you search them in that file. I think it should be XX XX YY YY (In GHZ1, It's 24 BF 04 00 if I'm not mistaken.) And you can extend the layout while you are editing it, (not the object mode) and you press Ctrl + Right key. But don't make the layout too long, or when you saved soned2 and when you reopen it, you'll see the layout messed up. Good luck! Hope this helped.

    Once again, I'm sorry.
     
    Last edited by a moderator: Aug 3, 2010
  14. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    Like I told you on IRC - Go into Plane A Level Editor (L)) and repeatedly press Ctrl+Right Arrow. Then you will also have to fix the size in lvl_size.bin in the misc folder. Make use of all the available space by making it fill the entire level. Like shortly before the signpost, you go into a loop and you continue under the previous path with a hell lot of speed. Do that another few times and there you go!
     
  15. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    OK - a new question. When I try to place loops in Star Light Zone 2, they don't work at all, go half way and then Sonic falls down, or go 95% and then don't let you continue. Anyone know why this happens? I need loops in my layout. Any help is appreciated!
     
  16. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    Press "Space" on the loop.
     
  17. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    As you well know sonic 1 does not use pathswappers, insted it's done via a chunk ID being a negative value (80 - FF), placing a chunk onto the playing field in SonED, hovering your mouse so it's high-lighting the chunk, and tapping space will increase that placed chunk's ID by 80 (setting the 7th bit), avast, it's useful for loops.
     
  18. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    Thanks for the help here. I didn't know that. But what exactly does a chunk ID with 80 added to it do except make the loops work?
     
  19. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    Well as no chunks should surpass 54, it'd make sense to have the ID's used for special chunk swapping functions (such as loops) use the negative value of the original two (makes it easier to get the original chunk values), you could check out "Sonic_Loops:" for more information related to Sonic 1 and special chunk related functions, like S-Bends, etc.
     
  20. MikkiMars

    MikkiMars Newcomer Member

    Joined:
    Aug 2, 2010
    Messages:
    12
    I've fallen in love with Sonic CD, after editing the tracks to have the US title theme, and have S/K invincibility in their, but I would love to see knuckles in there as a hack, especially after playing S1K by Stealth. But it seems like a task to put him in there. What are some of the problems you'd encounter, and has anyone tried it? I'd also love to see S/K super/hyper theme with a super Knuckles in there as he did in S1K. The game could be Knuckles saving Sonic, instead of Sonic saving Amy. Of course you wouldn't have Knuckles kissing Sonic like Amy does hahah