BlargSPC - Play SNES SPC-dumped files on your 3DS

Discussion in '3DS - Homebrew Development and Emulators' started by DiscostewSM, Feb 25, 2016.

  1. DiscostewSM
    OP

    DiscostewSM GBAtemp Guru

    Member
    5,024
    2,659
    Feb 10, 2009
    United States
    Sacramento, California
    Many people have asked for something of this nature, and having fiddled with the SPC/DSP cores of blargSNES enough to improve and get some understanding of them, I figured that this would be a good way to understand it even further without having to deal with everything else the emulator wraps around it. So, I present to you BlargSpc.


    Download: https://github.com/DiscostewSM/blargSpc/releases
    Source: https://github.com/DiscostewSM/blargSpc

    [​IMG]

    Be aware, this is my first release of this, so don't expect everything to be perfect. Some SPCs may not play, and some may have clicks in them, but the majority that I've tested seem to play fine.

    Expected questions

    Q: Why is there no CIA release?

    A: The reason for no CIA release is because I had an idea about integrating this into blargSNES (which does have CIA releases), but currently, the way audio is handled there differs from how it is handled here (outside of the cores). So I'm gonna look into that. Plus a few other things are required for producing a CIA file, and I really don't feel like messing with them.

    Q: I get a message saying "NDSP could not initialize". What does that mean?

    A: BlargSPC uses the NDSP firmware for audio playback instead of the old CSND methods. This means you will either need to run a more recent version of *hax with relevant payloads (2.5 or greater) to have access to the "hb:dsp" service, or you need to dump the binary from an existing retail game or eShop title. The firmware is copyright data, so it cannot be supplied. If you wish to go with the dump method, then please go to the DSP Firmware Dumper page and follow the instructions.

    Q: This can play SPC files of games that currently have no audio in blargSNES. Does that mean a fix for blargSNES is coming soon?

    A: Unfortunately, no, not because of this anyways. The reason why blargSNES has trouble with some audio in games is because of communication/sync problems (among other things) between the main CPU and SPC cores. SPC files you may find online were dumped by other emulators that don't have this problem. But, at least this shows that the audio can process/play once this issue with blargSNES is resolved.

    Q: Wait, I can play SPC files of games with enhancement chips in them. Does that mean.....

    A: No, it does not. The SPC/DSP cores are completely independant from the rest of the system with the exception of a couple of lines to the main CPU used for SPC uploading/downloading.
     
    Last edited by DiscostewSM, Mar 8, 2016


  2. DjoeN

    DjoeN Captain Haddock!

    Member
    5,167
    1,485
    Oct 21, 2005
    Belgium
    Somewhere in this potatoland!
    This is cool :)
    Maybe a start for a good mod player on 3DS :)
     
    SLiV3R and VinsCool like this.
  3. Dartz150

    Dartz150 GBATemp Official Lolicon Onii-chan™

    Member
    1,406
    844
    May 5, 2010
    Mexico
    On a Strange Journey
    Exactly what I wanted, this kind of feature was something I loved from NDS's moonshell2, among with the nes sound format, it would be cool to have that one as well, because there are some wonderfull chiptunes in 8 bit out there.
     
  4. Lucar

    Lucar Professional Ferret

    Member
    506
    1,030
    Sep 12, 2015
    Canada
    New Donk City
    Does this play at 48000kHZ? If so, HELLLLLLLLLLLLLLL YEAHHHHHHHHHHHHHHH!
     
  5. weatMod

    weatMod GBAtemp Advanced Maniac

    Member
    1,928
    603
    Aug 24, 2013
    United States
    whats an SPC?
     
  6. DiscostewSM
    OP

    DiscostewSM GBAtemp Guru

    Member
    5,024
    2,659
    Feb 10, 2009
    United States
    Sacramento, California
    Nah, it plays at 32kHz, the rate at which the SNES plays audio at.

    http://www.vgmpf.com/Wiki/index.php?title=SPC
     
    SLiV3R likes this.
  7. Lucar

    Lucar Professional Ferret

    Member
    506
    1,030
    Sep 12, 2015
    Canada
    New Donk City
    -_- That sucks. Is there interpolation options or anything? ANYTHING AT ALL? I NEED MY GAUSSY SPC's!
     
  8. DiscostewSM
    OP

    DiscostewSM GBAtemp Guru

    Member
    5,024
    2,659
    Feb 10, 2009
    United States
    Sacramento, California
    32kHz, imo, is fine, considering this is based on cores from blargSNES, an emulator that can run on an o3DS. As far as options, pretty much everything found in blargSNES's SPC/DSP cores are found here, which includes Gaussian interpolation and such.
     
    SLiV3R likes this.
  9. CeeDee

    CeeDee hm?~

    Member
    3,822
    5,373
    May 4, 2014
    United States
    somewhere
    So this is a SPC player, correct? If so, that's pretty damn awesome!
     
  10. TechyTurtle

    TechyTurtle GBAtemp Regular

    Member
    295
    53
    Jan 23, 2016
    United States
    MY ASS!
    cool, good job now I can play more snes titles, make the interface cooler on future updates though
     
  11. Pandaxclone2

    Pandaxclone2 Pokemon Sprite Artist Hobbyist

    Member
    1,000
    395
    Aug 17, 2015
    noun; a particular place or position.
    Good job with this sir! Now I can play those SPCs I had laying in my SD card when I naively thought Nintendo Music could play them. (I was experimenting, okay?)

    Gonna keep an eye on this and blargSNES in the near future.
     
  12. VinsCool

    VinsCool Comfortably Numb

    Member
    GBAtemp Patron
    VinsCool is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    11,851
    28,339
    Jan 7, 2014
    Canada
    Another World
    Awesome! Thanks a lot!
     
  13. Lucar

    Lucar Professional Ferret

    Member
    506
    1,030
    Sep 12, 2015
    Canada
    New Donk City
    That's Good. :3
     
  14. SLiV3R

    SLiV3R 3DS Friend Code: 0473-9069-2206

    Member
    2,202
    1,044
    Jan 9, 2006
    Any news on this project? Do you think you could add other 8/16 bit formats as well? (I know SNES sound is sample based and most others are chip based, but it would perhaps work to implement?)
     
  15. DiscostewSM
    OP

    DiscostewSM GBAtemp Guru

    Member
    5,024
    2,659
    Feb 10, 2009
    United States
    Sacramento, California
    It is simply running with what blargSNES uses. Nothing more. Nothing less.
     
    SLiV3R likes this.
  16. SLiV3R

    SLiV3R 3DS Friend Code: 0473-9069-2206

    Member
    2,202
    1,044
    Jan 9, 2006
    Ok. But is it possible to listen when the 3DS is closed?
     
  17. DiscostewSM
    OP

    DiscostewSM GBAtemp Guru

    Member
    5,024
    2,659
    Feb 10, 2009
    United States
    Sacramento, California
    That is something I've thought about, but haven't taken the initiative to implementing. My main reason for making the player was for easier testing of the SPC700/DSP cores when I wanted to make changes, using SPCs instead of having to run games to test the audio. For instance, I wouldn't have known that there's a big inaccuracy with pulse modulation with Mario's "whistling-in-the-shower" audio in SMRPG because, well........blargSNES has no support for enhancement chips at this time.
     
    SLiV3R likes this.
  18. SLiV3R

    SLiV3R 3DS Friend Code: 0473-9069-2206

    Member
    2,202
    1,044
    Jan 9, 2006

    Cool! Hope you will implement that and shuffle play! Then we can use this as a SNES radio :D
     
  19. SLiV3R

    SLiV3R 3DS Friend Code: 0473-9069-2206

    Member
    2,202
    1,044
    Jan 9, 2006
    When I load BlargSPC it says: "NDSP could not initialize". Anyone know how to solve the problem?
     
  20. DiscostewSM
    OP

    DiscostewSM GBAtemp Guru

    Member
    5,024
    2,659
    Feb 10, 2009
    United States
    Sacramento, California
    Sounds like you're running an older version of *hax + payloads, which doesn't have the NDSP service, and that you don't have the NDSP binary dumped. I would recommend that you dump the NDSP binary from a game you have using a tool like DSP Firmware Dumper.

    I'll make a note of that in the OP.
     
    SLiV3R likes this.