Basic Questions and Answers Thread

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

  1. Kaz

    Kaz Well-Known Member Member

    Joined:
    Nov 2, 2013
    Messages:
    66
    I need to know where is the code, on the title screen options, checking if down or up is pressed will pick an option (VS Mode, Options). I'm experimenting with ASM and I need to remove this so I can do a Press Start Button thing on my title screen.

    The Knux in Sonic 2 disassembly was 404'd a long time ago in the repo/svn at Sonic Retro and I cant find other download links.
     
    Last edited by a moderator: Nov 3, 2013
  2. rika_chou

    rika_chou Adopt Member

    Joined:
    Aug 11, 2007
    Messages:
    596
    Last edited by a moderator: Nov 3, 2013
  3. OrdosAlpha

    OrdosAlpha RIGHT! Naebody move! Administrator

    Joined:
    Aug 5, 2007
    Messages:
    1,780
    Location:
    Glasgow, Scotland
    You know, the S2K disasm is the only disasm I've never added to the SSRG repository. I should get round to adding it.
     
    Last edited by a moderator: Nov 6, 2013
  4. EugenTheBoySecond

    EugenTheBoySecond Newcomer Trialist

    Joined:
    Sep 24, 2013
    Messages:
    6
    Location:
    California,United States
    I have a question.How i can change musics? :sorry:
     
  5. 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
    Uhh....Might want to be a bit more specific dear.

    What game are you hacking and from what game is the song from that you want to port is a bit important in this case.
     
  6. Dandaman955

    Dandaman955 Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    859
    Location:
    North Wales
    Change 'musics' of what? If you're working on Sonic 1, then here's a little how to guide:

    http://sonicresearch.org/forums/index.php?showtopic=2026&hl=   <-- That should help you with creating custom music for Sonic 1 and porting to some extent, it's definitely helped me.

    Some people like to use x2smps, but I've never used it and you might want to ask someone else how that works.

    Also, if you really want to go in-depth, try the music hacking guide:

    http://info.sonicretro.org/SCHG:Music_Hacking
     
  7. EugenTheBoySecond

    EugenTheBoySecond Newcomer Trialist

    Joined:
    Sep 24, 2013
    Messages:
    6
    Location:
    California,United States
    For my new Sonic 2 hack.
     
  8. MaDSkull

    MaDSkull Lycanthrope Member

    Joined:
    Apr 3, 2013
    Messages:
    25
    Location:
    Baku
    Hello. I am new on this site. I have 3 or 4 main questions but I shall ask these later.

    My first problem is to add extra characters to sonic 1. Firstly, I read a tutorial about multi characters on sonic retro. But when I added spindash to sonic, It also belong to knuckles. I do not want to add spindash to knuckles. Want only for Sonic.  How I create Knuckles.asm in Sonic 1 Dissasembly ?

    (Sorry for my bad english. Hope you understand my problem.)
     
  9. Dandaman955

    Dandaman955 Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    859
    Location:
    North Wales
    Set a check on the spindash routine to only work with Sonic. What is your character flag/RAM address?

    Should look something like this:

    cmp.b     #$00,('Your character's RAM address).w        ; Is character flag Sonic?     Sonic - #$00,         Knuckles - #$01

    bne.x      To your nearest rts.

    Although it's not completely like that, it's close to what you need and only requires a few tweaks.
     
  10. MaDSkull

    MaDSkull Lycanthrope Member

    Joined:
    Apr 3, 2013
    Messages:
    25
    Location:
    Baku
    Dude. Isn't possible to create knuckles.asm file to work? I have not any programming language. Only works with programs Like SonED, SonMapED. and etc.
     
  11. Novedicus

    Novedicus Pour your misery down on me Member

    Joined:
    Aug 26, 2013
    Messages:
    922
    For my new Sonic 2 hack.




    Porting music in Sonic 2 with its original sound driver is pretty hard. It has a Z80 sound driver that is hard to work with and the music is all compressed and they all have to be within the sound bank limit of $8000.

    What I can recommend is the Sonic 2 Clone Driver. It's a modified version of the Sonic 1 Sound Driver, and it's much easier to work with and the music does not need to be compressed or be within a certain limit.

    Anyways, after you implement it in, you can put music files (.bin extension) without too many problems, even Sonic 1 songs! Just replace the music you are replacing with the music that will replace it.

    NOTE: You can not just change the mp3, wav, mid, ogg, etc. extension to .bin and expect it to work. It MUST be in SMPS format, a music format for the Genesis/Mega Drive.

    If you want to put in your own custom music, this can help. The music uses voices for instruments, in the guide it shows how you can implement them. Many voices can be found in the SMPS archive.

    Sonic 2 Clone Driver: http://info.sonicretro.org/SCHG_How-to:port_the_Sonic_2_Clone_Sound_Driver_to_the_HG_version_of_Sonic_2
     
    Last edited by a moderator: Nov 17, 2013
  12. TheInvisibleSun

    TheInvisibleSun Visible Member

    Joined:
    Jul 2, 2013
    Messages:
    293
    Location:
    Buffalo, NY, USA
    Just learn how to use the programming language then? What Dandaman posted is the simplest and most effective way to do this; there is no reason to have a separate file for Knuckles. 
     
  13. MaDSkull

    MaDSkull Lycanthrope Member

    Joined:
    Apr 3, 2013
    Messages:
    25
    Location:
    Baku
    Does it help to me? To my mind There is no knowladge about my problem on this topic. :mad:
     
  14. JoenickROS

    JoenickROS ROS is on hiatus. (...again) Member

    Joined:
    Feb 5, 2012
    Messages:
    920
    Skull, you need to be patient, and knowing the language will help you fix your problem, it's better for you to learn how to do things by yourself, than others doing them for you. Please respect that people here have lives, and can't always be there to help you.
    Edit: and people definitely will not help you if you give them lip.
     
    Last edited by a moderator: Nov 17, 2013
  15. 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
    Well.....This is pretty true, but adding in banks isn't too particularly hard, not to mention, I doubt anybody ever goes over the $8000 byte limit. To be fair, using the S2 sound driver is a bitch, but.......

     

    No. No, no no. What is it with you people and your ridiculous massive hard on for the S2 clone driver? It is still at the end of the day the shitty S1 m68k driver. We seriously live in the modern times. Why are we still using the m68k driver to run our music? The MD has a great little chip called the Zilog 80 that can run music processing. Why are we not using it and continue to circle jerk to the S2 clone driver as if it's Angelina Jolie?

     

    Newsflash people, it isn't. Though the m68k driver shows that it doesn't use all that much more processing power as the z80, it still has plenty of drawbacks. You know that lag you get sometimes in the game when it's trying to load so much shit? Using a z80 driver could easily just replace that problem all together. The music lag would basically be nonexistent. 

     

    Though you are correct about the S2 driver being a bitch to work with, the S2B z80 driver and the S3K driver don't have those issues, of course you'd have to learn how to implement either or. That being said, the S2B driver is a bit easier to work with, but that is mainly because it runs uncompressed songs naturally, it's just a matter of figuring out how to use the SMPS properly. The other downside is that there is no public disasm of the z80 driver, and I'm too early in jotting down notes and adding fixing too it to release my own personal version.

     

    The S3K driver on the other hand, well specifically flamewings, doesn't have any of these issues, the only downside is that your disasm has to be AS for it to work properly.

     

    And Skull

     


    Fixed you spelling of "knowledge", dear.

     

    Next off, stop being a lazy cum sucking cunt and use the damn search bar. It's bound to be around somewhere. 
     
    Last edited by a moderator: Nov 18, 2013
  16. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,772
    Location:
    italy
    I am glad that SuperEgg is around, I was getting tired to say the same things about the ALMIGHTY Clone Driver over and over. Whenever someone recommends to use it, my faith in umanity decreases a little.
     
  17. Flamewing

    Flamewing Elite Hacker Member

    Joined:
    Aug 28, 2011
    Messages:
    35
    Location:
    Brasil
    You know what is the funniest thing about the S2 driver? It is that it supports uncompressed songs just fine... with just a bit flag in the music table. You are too much of a lazy bum and you don't want to use compressed songs? Then just decompress them all and set the corresponding bits in the table.

    Sure, sound banks can be annoying since the stock S2 driver does not support more than two music banks... but then again, some time ago I posted a guide on Retro explaining how to improve the S2 z80 driver to have dynamic bank switching and a higher limit for songs and sfx; it is here. As a bonus, it even explains how to add new music banks.

    Maybe I should post it in the tutorial section to hasten the long-overdue death of the clone driver...
     
  18. amphobius

    amphobius spreader of the pink text Member

    Joined:
    Feb 24, 2008
    Messages:
    971
    Location:
    United Kingdom
    I don't like z80 drivers myself since it destroys PCM quality, but sure, if you want a more optimized system I guess z80 drivers are cool.
     
  19. 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
    Not everybody uses an AS disasm dear =P

    No, but in all honesty, you've made my job an asston easier. All I have to do is make this work in the my S2B driver and I'll be all happy or whatever.

     


    You obviously haven't talked to Lazzie or Varion =P
     
    Last edited by a moderator: Nov 18, 2013
  20. MarkeyJester

    MarkeyJester ! % # @ Member

    Joined:
    Jun 27, 2009
    Messages:
    2,761
    What the fuck is wrong with all of you?

    Ralakimus posted an honest suggestion, and you all jump down his throat like a bunch of fucking piranhas. The further irony here is that most of you haven't got a clue anyway, you're just ranting without the proper unbiased facts.

    The sub processor is a "Zilog Z80", the Z is included. And the reason for use I shall explain in a moment.

    The main processor is almost twice the speed, and has a flexible instruction set allowing it to perform most operations with less instructions than the Z80 would require. The lag issue is one flaw, but that actually has nothing to do with the driver itself, that's to do with the way the game routines are constructed. Sonic 1 has the sound driver called during the v-blank routine, and in most cases where a new screen is to load data, the interrupts are disabled to prevent the VDP being written to and having it's mode/address changed mid-way through reading/writing data to VDP memory.

    HOWEVER, if a v-blank routine number is not specified (RAM F62A is 00), then the v-blank routine runs through an "acceptable bypass" I guess would be the right terminology. It will skip the VDP updating sections that have potential to alter the VDP mode/address, thus allowing the v-blank routine to be run during VDP memory read/write. One requirement is at "loc_B88", where the game mode gives an additional decision over whether or not the routine should alter the VDP's memory in any way. All you would need to do is directly branch back to "loc_B5E" so it'll call the sound driver and then return, and finally remove the interrupt disable sections.

    This will allow the sound driver to run mid-way through writing data to VDP memory, and removes the music halting process. It is trivial and completely throws your argument out the window.

    PCM quality is often destroyed due to halts of the Z80. The main cause is allowing the Z80 to read data through the bank window, and having frequent DMA transfers. DMA transfers occur multiple times every v-blank in Sonic games, so it cannot be escaped using either; the 68k tracker control with Z80 PCM playback, or the Z80 only. The Z80 sort of escapes it to some degree simply due to the PCM writing routine being interrupted while it performs the tracker controlling routines, but you still end up with a halt on the PCM playback. Additionally, most of the other music data is read through the bank window anyway, so the Z80 still gets halted when a DMA transfer occurs.

    In both cases however, the 68k tracker controlled version will produce less choppy quality PCM samples, however Sonic 1's sound driver mindlessly stops the Z80 before the tracker code is run, and starts it after it has finished, as opposed to only stopping when data is being written to the Z80 memory space or the YM2612. It also mindlessly stops the Z80 in v-blank before and after DMA transfers dispite the fact that it technically doesn't need to. This however can be rectified easily by removal and correction of these mindless halts.

    The Z80's PCM halting for tracker code, can be reduced by fragmenting the interrupt times into smaller seperate sections rather than one huge bulk when v-blank strikes. But then you leave the Z80 open to being halted by DMA much more easily during PCM playback, as the interrupting occurs multiple times at any time.

    The simple fact is based on PCM quality, you're only sure fire way of ensuring no choppy quality is by using the 68k tracker controlled system and then either; transfering data manually to VDP memory instead of using DMA, or have the samples inside the Z80 memory space itself so the Z80 doesn't access the bank window needing a request from the 68k.

    ---

    I am not for or against either driver format, but that's what this is all about.

    You need to sacrifice something, you cannot have it all, you need to assess your game, not the sound driver. And then decide, what do you need music/sound wise for your game? Do you need that extra minor processing time and memory the Z80 could free up? Or do you need the highest quality samples you can get using the 68k tracker (because your character talks or some crap)?

    I for example use a custom 68k tracker controlled sound driver for my homebrew game, and the reason why I use 68k instead of Z80 is down to the game. My character can talk, so I needed to write a Z80 driver capable of playing two samples, anywhere in the ROM, at anysize, at anytime, with a decent enough sound quality. A Z80 only driver will have a tough an possibly impossible task of doing just that. Z80 drivers are generally better mind, but it isn't better for what my game needs.

    Your game's purpose and direction makes the decision, not people with contradicting facts, only you know what your game actually needs.
     
    Last edited by a moderator: Nov 18, 2013