|
||||||||
|
||||||||
| Cette page est aussi disponible en français | ||||||||
| Overview | [cacher] |
One of the most important component inside the Snes is the
Audio Processing Unit (APU). The APU is responsible for
playing music and sound effects. The APU is made with a processor (SPC700),
some memory (64Kb), a DSP and a Digital/Analog converter. The Snes's
main CPU communicates with the APU using 4 ports.Here is a page explaining in greater details what's inside the APU: How sound on the SNES works The .spc format Snes music files are 'save states' of the APU components, similar to the save states of the whole Snes we obtain by pressing F2 in zsnes, but this time, only the APU memory, CPU and DSP registers are saved. This is sufficient to playback game music because most games simply load a playback program in the spc which once started, plays music endlessly. When asked, the program also plays sound effects. We can playback .spc files with a spc player(standalone or plugin). A spc player is a simplified Snes emulator (APU emulation only). I had been hoping for a long time to be able to use a real APU to play spc's to get a perfect reproduction of how it sounded on a real Snes (Of course emulators can do a better job than the real Snes APU, by using higher sample rates, better resampling, better interpolation, etc... but here, it is a matter of authenticity and cool factor). I found how to connect a Snes APU on a parallel port on CaitSith2's website , as well as a simple program to upload .spc files to the module and play them back. |
| Schematic | [cacher] |
Here is the schematic:
And here is a file containing the pinout of the Snes APU: APU_pinout.txt The schematic and pinout comes from the archive APU Interface.zip, available on caitsith2's website. If you build this project, please contact me. I'd like to add pictures to the image gallery. For the 5 volts power supply, you can use a lm7805 voltage regulator. The module consumes 62mA from digital VCC when idle or playing and 36mA when reset is low. The module always consumes 1.3mA from Audio VCC. A user reports that his unit would not work until he grounded the APU chassis. |
| Pictures | [cacher] |
| Software | [cacher] |
| I first tried using CaitSith2 software, but it did not work. By looking at the signals
with an oscilloscope, I deduced that the computer did not wait long enough for
the logic levels to settle(rising was slow, this is probably due to the way my
parallel port is designed). Fortunately, the source code was available. Adding
small delays at the right places made it work. The user interface is written in VB, and the low level parts are in C/C++ in a separate dll. I had to recompile the dll to add the deleays. If you get errors such as "Error Loading SPC", try my dll after confirming that everything is wired correctly. Here is my dll: APU_DLL.dll and the file I modified: apuplay.c. I did not want to be forced to run Windows in order to use the APU, so once everything was working well, I adapted the dll code for Linux (just a iopl call and a macros for doing port io) and I rewrote the VB code in C.(ouch..) Xmms plugin screenshot:
The source code for my Linux program is available here:
|
| Next | [cacher] |
I'm not done yet with this project. Here are a few things I'd like to do:
|
| Gallery | [cacher] |
| This will become (I hope) a gallery full of pictures of this project assembled by other people. May 2005: Christopher Cox sent me pictures of how he assembled his spc player inside a lunch box!
![]() March 2006: Jon Batt sent me 4 pictures:
January 2008: Matthew sent me 5 pictures: He also posted a video on youtube! |
| Music | [cacher] |
| Here is a recording of a tune played with my APU:
aquatic_ambiance.ogg The best places to get game soundtracks in spc format are: snesmusic.org Zophar's spc archive. |
| Disclaimer | [cacher] |
|
I cannot be held responsible for any damages that could occur to you
or your equipment while following the procedures present on this page.
Also, I GIVE ABSOLUTELY NO WARRANTY on the correctness and usability
of the informations on this page. Please note, however, that the procedures
above have worked in my case without any damages or problems. Now you cannot say that I did not warn you :) |
Coded manually using
|