Quantcast

Page 4 of 27 FirstFirst 1234567814 ... LastLast
Results 46 to 60 of 401

Thread: Street Fighter 2 - new Z80 PCM sound driver project

  1. #46
    Bite my shiny, metal ***! Hero of Algol retrospiel's Avatar
    Join Date
    Mar 2008
    Location
    Cologne, FRG
    Posts
    7,816
    Rep Power
    92

    heart

    Quite the opposite, really: it might even sound too good and thus not at all faithful to the original MD port................. - So let's find them!!


    @Stef: If I reconstruct the WAV source file you provided exactly the way it was but with new samples, you can work with that, yes ? (Just checking here to get confirmation before starting such a tedious task)
    The Mega Drive was far inferior to the NES in terms of diffusion rate and sales in the Japanese market, though there were ardent Sega users. But in the US and Europe, we knew Sega could challenge Nintendo. We aimed at dominating those markets, hiring experienced staff for our overseas department in Japan, and revitalising Sega of America and the ailing Virgin group in Europe.

    Then we set about developing killer games.

    - Hayao Nakayama, Mega Drive Collected Works (p. 17)

  2. #47
    Hero of Algol TrekkiesUnite118's Avatar
    Join Date
    May 2010
    Age
    32
    Posts
    8,217
    Rep Power
    128

    Default

    Quote Originally Posted by Chilly Willy View Post
    Given that any PS1 SF2 samples will be in PSX ADPCM format, are they really going to be any better than the original arcade ADPCM as far as playing on the MD DAC goes? Granted, Sony's ADPCM is better than the old ADPCM used in the arcade, but once you convert both to 8-bit samples, I doubt you'll hear the difference.
    I don't know about SF2, but for the Alpha games there was definitely a noticeable difference. Hence why it might be worth checking. If they didn't use higher quality samples then no big deal.

  3. #48
    Bite my shiny, metal ***! Hero of Algol retrospiel's Avatar
    Join Date
    Mar 2008
    Location
    Cologne, FRG
    Posts
    7,816
    Rep Power
    92

    Default

    I did a few quick resampling tests with the arcade recordings using different parameters but yeah, not much better than what I got when tweaking the original MD PCM source. It's too early to give up but I am not quite as sure as before that we'll get something better out of the arcade/PS1 source material in comparison to what Capcom did.
    The Mega Drive was far inferior to the NES in terms of diffusion rate and sales in the Japanese market, though there were ardent Sega users. But in the US and Europe, we knew Sega could challenge Nintendo. We aimed at dominating those markets, hiring experienced staff for our overseas department in Japan, and revitalising Sega of America and the ailing Virgin group in Europe.

    Then we set about developing killer games.

    - Hayao Nakayama, Mega Drive Collected Works (p. 17)

  4. #49
    Hero of Algol
    Join Date
    Aug 2010
    Posts
    7,814
    Rep Power
    177

    Default

    I may be saying shit but it would probably better to wait for a first version of Stef's driver prior trying to convert all the samples to an arbitrary frequency.
    I mean, it's good to know which source could give us the best quality and which tools are good for the task, but the target frequency of the samples will depend on the Stef's implementation AFAIK.
    Actually, I think both the bitness and the frequency will depend on the efficiency of his code and the way he will be handling the PCM playback. And Stef probably will have to try several different options to be able to state which one will be the ideal for his driver.

  5. #50
    Bite my shiny, metal ***! Hero of Algol retrospiel's Avatar
    Join Date
    Mar 2008
    Location
    Cologne, FRG
    Posts
    7,816
    Rep Power
    92

    Default

    Well on the positive side is that while it doesn't sound much better at first glance it certainly sounds less scratchy
    The Mega Drive was far inferior to the NES in terms of diffusion rate and sales in the Japanese market, though there were ardent Sega users. But in the US and Europe, we knew Sega could challenge Nintendo. We aimed at dominating those markets, hiring experienced staff for our overseas department in Japan, and revitalising Sega of America and the ailing Virgin group in Europe.

    Then we set about developing killer games.

    - Hayao Nakayama, Mega Drive Collected Works (p. 17)

  6. #51
    Road Rasher Bibin's Avatar
    Join Date
    Jun 2010
    Posts
    437
    Rep Power
    31

    Default

    This is a great project! I was thinking of something similar (but much sillier) involving an external sample playback circuit, where you'd just write a byte to some odd memory address to trigger a voice sample. That would leave the current sound engine in place, and just replace the voice playback calls with writes to this configuration. Of course your idea is much better and I look forward to seeing it in action.

    I don't think the source is going to matter a lot. You won't be reaching 44.1KHz playback on the MD in real-time anyway, so ripping from MAME, the real arcade board, or the arcade ROM won't make a big difference here as they will all be substantially better than the original MD one even if down-sampled.

  7. #52
    Outrunner Stef's Avatar
    Join Date
    Aug 2011
    Location
    France
    Posts
    616
    Rep Power
    27

    Default

    Quote Originally Posted by Christuserloeser View Post
    Quite the opposite, really: it might even sound too good and thus not at all faithful to the original MD port................. - So let's find them!!


    @Stef: If I reconstruct the WAV source file you provided exactly the way it was but with new samples, you can work with that, yes ? (Just checking here to get confirmation before starting such a tedious task)
    Sorry for the late reply... I would say yes, the samples i published are directly ripped from the rom so if you provide yours exactly in the same format (exact same sample rate, duration and position) i would be able to replace them byte as byte in the rom But i guess it's almost impossible to set them exactly as they were originally !

  8. #53
    Outrunner Stef's Avatar
    Join Date
    Aug 2011
    Location
    France
    Posts
    616
    Rep Power
    27

    Default

    Quote Originally Posted by Barone View Post
    I may be saying shit but it would probably better to wait for a first version of Stef's driver prior trying to convert all the samples to an arbitrary frequency.
    I mean, it's good to know which source could give us the best quality and which tools are good for the task, but the target frequency of the samples will depend on the Stef's implementation AFAIK.
    Actually, I think both the bitness and the frequency will depend on the efficiency of his code and the way he will be handling the PCM playback. And Stef probably will have to try several different options to be able to state which one will be the ideal for his driver.
    Actually i don't really plan to change the sample rate and doing funzies things. I want to keep sort of compatibility with the actual driver and so keep the same rom size. As there is not much blank areas left in ROM i would use the exact same locations and sizes for the samples. The only difference i can operate is to use 4 bits ADPCM encoding instead of the actual 8 bit PCM one and so have sample rate @ 9.54Khz (4.77 * 2) but again i am not sure that 9.54Khz ADPCM will sound any better than 4.77Khz PCM, ADPCM does not work well on low rate and almost time it's better to stay on PCM. To be honest, maybe the actual samples are not that bad after all, it's 8 bits PCM @4.77 Khz and maybe we cannot get any better from that :-/ Rom size limitation definitely hurts for this... still, remove the DMA contention will already improve *a lot* the playback quality compared to original game

  9. #54
    ding-doaw Raging in the Streets tomaitheous's Avatar
    Join Date
    Sep 2007
    Location
    Sonoran Desert
    Age
    43
    Posts
    3,981
    Rep Power
    76

    Default

    Stef: If you're sticking with the original rom size, and there's not much free space- if any, maybe you could compress them PCE style and then raise the playback rate?

    8bit@4.8khz is 4800bytes per second for the original rom. PCE is doing 4370bytes per second, and they sound pretty clear; 7khz@5bit per sample. The bit unpacking isn't that bad, the z80 should be able to handle it. The sample stream is in packets. The first byte contains eight 1bit (LSbit), then followed by 4 bytes. The following four bytes are the upper 4bits to each sample. So each byte holds two samples. At room for 4800bytes per second, that would allow you to do 7.6khz playback rate at 5bit (shift/padded to 7bit for mixing).

  10. #55
    Hero of Algol Kamahl's Avatar
    Join Date
    Jan 2011
    Location
    Belgium
    Age
    30
    Posts
    8,597
    Rep Power
    142

    Default

    What about doing some basic real-time interpolation? Out of the question? It should reduce the amount of noise a bit.

  11. #56
    Outrunner Stef's Avatar
    Join Date
    Aug 2011
    Location
    France
    Posts
    616
    Rep Power
    27

    Default

    Quote Originally Posted by Kamahl View Post
    What about doing some basic real-time interpolation? Out of the question? It should reduce the amount of noise a bit.
    Interpolation is not that great, it usually sound very "low rate" when you interpolate from a such low rate. Without taking in account that will be huge for the Z80...

    Stef: If you're sticking with the original rom size, and there's not much free space- if any, maybe you could compress them PCE style and then raise the playback rate?

    8bit@4.8khz is 4800bytes per second for the original rom. PCE is doing 4370bytes per second, and they sound pretty clear; 7khz@5bit per sample. The bit unpacking isn't that bad, the z80 should be able to handle it. The sample stream is in packets. The first byte contains eight 1bit (LSbit), then followed by 4 bytes. The following four bytes are the upper 4bits to each sample. So each byte holds two samples. At room for 4800bytes per second, that would allow you to do 7.6khz playback rate at 5bit (shift/padded to 7bit for mixing).
    That might be a solution but in this case i think i would go for 4 bits sample instead (even easier to unpack), i think the out quality should be on par.
    Maybe that could be a good test : take the original CPS-1 samples and compare different conversion without any filtering :
    - 8 bits @4.77KHz
    - 7 bits @5.45KHz
    - 6 bits @6.36KHz
    - 5 bits @7.63KHz
    - 4 bits @9.54KHz

    Honestly i don't know what is the best... The voices in Space Harrier are played from the PSG and so are 4 bits (not really as it uses log level) and they sound really nice ! So maybe 4 bits at higher rate could be a better choice.

  12. #57
    Bite my shiny, metal ***! Hero of Algol retrospiel's Avatar
    Join Date
    Mar 2008
    Location
    Cologne, FRG
    Posts
    7,816
    Rep Power
    92

    Default

    Quote Originally Posted by Stef View Post
    Sorry for the late reply... I would say yes, the samples i published are directly ripped from the rom so if you provide yours exactly in the same format (exact same sample rate, duration and position) i would be able to replace them byte as byte in the rom But i guess it's almost impossible to set them exactly as they were originally !
    Great! Did you try to fit these in? It should make some difference in context of the game.

    Quote Originally Posted by Christuserloeser View Post
    Here, this is slightly less scratchy. Maybe it works in the context of the game?

    http://www.mediafire.com/listen/f18f...s_scratchy.wav



    Quote Originally Posted by Stef View Post
    4 bits @9.54KHz
    Sounds like a plan! :-)
    The Mega Drive was far inferior to the NES in terms of diffusion rate and sales in the Japanese market, though there were ardent Sega users. But in the US and Europe, we knew Sega could challenge Nintendo. We aimed at dominating those markets, hiring experienced staff for our overseas department in Japan, and revitalising Sega of America and the ailing Virgin group in Europe.

    Then we set about developing killer games.

    - Hayao Nakayama, Mega Drive Collected Works (p. 17)

  13. #58
    ding-doaw Raging in the Streets tomaitheous's Avatar
    Join Date
    Sep 2007
    Location
    Sonoran Desert
    Age
    43
    Posts
    3,981
    Rep Power
    76

    Default

    - 5 bits @7.63KHz
    - 4 bits @9.54KHz
    Either of those two should sound the best. Raise the amplitude over the overall samples to the max (clip if you need to). The human ear can't hear 'noise' in loud parts of samples as much (like yelling and such), and none of the SF2 samples have quiet parts. So prep them as such. Whatever noise you hear from the lower bit depth, will be covered up by the other music that's playing anyway. And the high frequency also makes up for the difference in depth/resolution.

  14. #59
    Hero of Algol
    Join Date
    Aug 2010
    Posts
    7,814
    Rep Power
    177

    Default

    Well, let me ask you some weird questions:
    Let's suppose we have a 2 PCM channel driver, from Stef, running in SFIICE.

    In Dhalsim's stage there are those elephants making noise.
    Their noise gets cut when the 2 PCM channels are busy (sometimes just one is enough in the actual version, since there seems to be a bug in the original driver according to Stef), but let's suppose we want to preserve their noise...
    Is it doable (taking efficiency and cycles into account) to "route" at least one of the noisy elephants to play its sample through the PSG *only* when there's not enough PCM channels available?

    Furthermore, if we used 4-bit samples only for the elephants', could the same samples be "compatible" with both the FM chip and PSG sample playback? Or we would need to have a copy (using different format) of each sample we wanted to possibly route to the PSG?
    Last edited by Barone; 07-22-2014 at 12:56 AM.

  15. #60
    Road Rasher
    Join Date
    Apr 2013
    Location
    SF Bay Area, California
    Posts
    301
    Rep Power
    21

    Default

    Mixing samples in software is way cheaper than trying to play them on the PSG. Mixing 3 channels at 4.77KHz seems quite doable since there's a 4-channel 16KHz PCM driver Stef wrote for SGDK (though that one might have some limitations that are not appropriate for SF2). Actually using the 3rd channel would require some modifications on the 68K side though.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •