Basic Questions and Answers Thread

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

  1. vladikcomper

    vladikcomper Well-Known Member Member

    Joined:
    Dec 2, 2009
    Messages:
    384
    Location:
    Russia
    This also happens to me too and to many people I know. It turns out that Regen is a bit unstable and too sensible to code errors, like, if you try to access some prohibited memory areas, Regen may suddenly through an M68K debugger window that will continue popping up while 68K is doing something it's not supposed to do. It even may crash when running a bad code. Well, everything may happen, I even managed to crash Kega by passing a certain opcode, which crashes both Kega and Regen with no warning (I really should remember this code, it could be useful to have a close emulator option in my hack =P).

    But I don't recall Regen crashing when playing the game itself, if the game's code isn't crashy. It usually crashes when running a debugger or bad code. But, actually, I don't use Regen much, I prefer Kega for playing games and Regen for debugging my stuff and ensuring it'll likely work on hardware.
     
    Last edited by a moderator: Apr 8, 2013
  2. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    291
    Location:
    Wolverhampton UK
    Vlad Thank you for the very interesting insight into the megadrives hardware and emulation pros and cons - I might have a tinker with both regen and maybe even gensgs :)
     
  3. JoenickROS

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

    Joined:
    Feb 5, 2012
    Messages:
    924
    I didn't say my game crashed, Regan just closes.


    Edit: Gens/GS is better than regular Gens.
     
    Last edited by a moderator: Apr 8, 2013
  4. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,779
    Location:
    italy
    ... that's the whole point of it, it's not like GerbilSoft decided to fork it for the lulz, he did so to improve it as much as possible.
     
  5. JoenickROS

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

    Joined:
    Feb 5, 2012
    Messages:
    924
    Yea my bad I just added that so he would consider using it, since it's a good emulator.


    Edit: He doesn't have to use it of course since Kega is a good emulator too.
     
    Last edited by a moderator: Apr 8, 2013
  6. JoenickROS

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

    Joined:
    Feb 5, 2012
    Messages:
    924
    (sorry for double post)
    Quick question what object in sonic 2 controls the earthquake I though it was obj30 but what I tried to do didnt work exatly how I wanted it. I am trying to change the sound, why you may ask because I ported Flamewings Sonic 3 Sounddriver, (with help from Alrightyman) and the sound and music IDs have shifted so the earthquake is loading a sound that is blank which makes the music fade out.
    Edit: Wait is it shared with the MCZ boss?

    Edit: It was part of the level events.
     
    Last edited by a moderator: Apr 9, 2013
  7. Irixion

    Irixion Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    670
    Location:
    Ontario, Canada
    You'd be better off just reassigning the sound IDs to their older counterparts. The earthquake itself is handled by level events, HTZ's level events should tell you which object is being loaded and at what coordinates.
     
  8. JoenickROS

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

    Joined:
    Feb 5, 2012
    Messages:
    924
    Yeah I got it but there is a glitch in HTZ act 1 after I get past the earthquake part when I make it to the spintube all music stops, sounds still sound though. But in HTZ act 2 that doesnt happen, music still plays and everything.

    Edit: Looked in the area around the spintube in the project file and saw no other object that would be loading a blank sound causing the music to stop.
     
    Last edited by a moderator: Apr 9, 2013
  9. redhotsonic

    redhotsonic Also known as RHS Retired Staff

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Seeming as all the ID's have been moved, why not find out which ID is the one that stops music in sound test (play some music in sound test, then try all SFX's until the music stops)?  Once you have your ID, search your ASM file for every instance that ID is being used?

    If there are more than 1 results and you do not know which one it is, comment out one so it doesn't play it, then build and try HTZ1.  Does it still stop?  No?  There's your answer.  If it still stops, then uncomment that line out and try the next one.

    This is trial-and-error.
     
  10. 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
    And that's where the problem begins. That requires ACTUAL WORK. Heaven forbid people attempting to trying to figure out shit themselves before coming on here and asking =P

    Nah, that sounds about right. Object30 handles only, and I mean only, earthquakes. All that jazz with sound effects is found in "LevEvents_HTZ". My only question is why would anybody use the S3 driver in S2 knowing that you'd have all these problems?
     
  11. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,779
    Location:
    italy
    Because the Sonic 3 driver is better.
     
  12. JoenickROS

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

    Joined:
    Feb 5, 2012
    Messages:
    924
    Exactly Nineko and you have more choice of sound effects which is good if you want to add sounds to objects or Badniks that did not have sounds in the original Sonic 2, which I have done.


    Edit: Example when coconuts throws the coconut, another thing SuperEgg is that it can play songs from any of the Sonic Genesis games if they are in ASM format. So that would be Sonic 1, Sonic 2, Sonc 3k, and Sonic 3D.
     
    Last edited by a moderator: Apr 9, 2013
  13. redhotsonic

    redhotsonic Also known as RHS Retired Staff

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    And I have an even better sound driver, muahahaha!

    All ValleyBell's work =P
     
  14. JoenickROS

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

    Joined:
    Feb 5, 2012
    Messages:
    924
    What could be better?? My curiosity is peaked.
     
    Last edited by a moderator: Apr 9, 2013
  15. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,779
    Location:
    italy
    ValleyBell's driver has some new features and a lot of bugs fixed. I think it's based on Sonic 1's, though, so I'd still pick Sonic 3's or Sonic & Knuckles' for processor reasons.
     
  16. ValleyBell

    ValleyBell Well-Known Member Member

    Joined:
    Dec 23, 2011
    Messages:
    155
    Says someone who never used the Sonic 3 sound driver :p

    Anyway, unless you want to use none or only a few of the Sonic 3 SFX, I'd recommend to use the Sonic 2 Clone Driver (which is just a Sonic 1 sound driver with music and SFX from Sonic 2).

    If you intend to use lots of Sonic 3 SFX, using the S3K sound driver is probably a better idea, because you don't need to port them.

    If you want to fix SFX numbers, I recommend the SFX Listings on Sonic Retro, they might be helpful to find equivalent SFX.

    Small note: The Xenowhirl disassembly is a bit inconsistent with sound numbers. You can find:



        move.b  #$79+$80,d0
        move.b  #$F9,d0


        move.b  #-7,d0



    and all 3 lines prepare the same sound effect: sound test 79. (It also varies between move.b, move.w and moveq, btw.)

    Anyway, here are some pros and cons for the Sonic 1 and Sonic 3 drivers:

    Sonic 1

    + It's possible to binclude songs and most tools make SMPS files in S1 format.

    + exchangeable DAC drivers (jman2050, MegaPCM, ...) and very clean DAC sounds (at least on emulators - there still seems to be a bit jitter on real hardware)

    - runs on the 68000 during V_Int, so it takes CPU cycles away

    - disabling interrupts makes the music hang (happens in Sonic 2 when loading the options screen for example, but never during normal gameplay)

    Sonic 3

    + runs completely on the Z80, so you get more CPU time for other things

    + disabling interrupts on the 68k doesn't affect the Z80's sound timing

    - DAC sounds worse (see SEGA sound in S3K sound test)

    - You have to use ASM'ed SMPS files unless you want to fix every single pointer in every SMPS everytime you change a song. And you need to care about 32 KB ROM banks.

    Maybe there are more, but that's all that comes to my mind right now.

    btw: Yes, the sound driver we're using in S2 Recreation is a heavily modified Sonic 2 Clone Driver (i.e. Sonic 1 driver). I guess it would be barely possible to have SMPS Z80 with a DAC driver with volume change support and a decent sample rate anyway.
     
  17. redhotsonic

    redhotsonic Also known as RHS Retired Staff

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Just need the driver in the z80 and you'll have a real winner! Anyway, if someone told me now saying they'd port the S3 driver for me, I'd tell them where to go because what you've done ValleyBell is amazing
     
  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


    And I have an even better sound driver, muahahaha!

    All ValleyBell's work =P



    I assume nobody has seen Vladikcomper's modified S2 Driver. It was initially for S2B4, but I've did a little change of it.
     
  19. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
    While I don't nearly know as much as you probably do about this driver, I have S3's sound driver and can confirm the sega sound could actually be played perfectly in the sound test and in game, as it (now) does in my hack. It's only a problem with stopping the z80 when it isn't necessary. I guess it's probably left over from s2's sound test/level select screen's code.

    Also, asm smps for music and sounds isn't all that bad, it makes it much easier to edit them (at least when not much has to be edited).
     
  20. JoenickROS

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

    Joined:
    Feb 5, 2012
    Messages:
    924
    The main reason I ported the sound driver was to give knuckles his sounds, so since I don't know how to port sounds I decided to port the sound driver. I don't regret doing it either even though I had so much more work to do after it was ported, it helped me learn how the sounds and music are called ingame.


    Edit: It's a win win situation.
     
    Last edited by a moderator: Apr 9, 2013