Actions

PocketSPC

From GameBrew - a wiki dedicated to Video Game Homebrew.

PocketSPC
Pocketspcds.jpg
General
Author(s)gladius (Gary Linscott)
TypeAudio Player
Version1.0
LicenceMixed
Links
[0.9 1.0 Download]
Website
Source
Advertisements


PocketSPC player for the Nintendo DS. It is a SNES sound chip emulator on DS.

Currently, the only supported method of using this program is by using a flashcart with the PocketSPC.ds.gba file.

User guide

Version 1.0 is the NDS version of pocketspc. It has a space restriction, user is able to use roughly 2 megabytes of songs due to ram limitations.

Use to build an nds, add spcs to pocketspc.arm9 using the builder (there is a c++ builder by MottZilla). Then run creatends.bat and it will output a shiny new nds to use (wifi, gba mp, etc...).

There are a few example songs included if you don't want to go hunting for SPC's to play.

Rom Builder

The rom builder requires the .NET framework version 1.1 or greater to be installed.

Run it in the same directory as the PocketSPC.ds.gba file and it will automatically find the current songs you have added. Then click "add files" to add in more spc's.

User can multi-select here as well. Select one or more files and click delete files to remove them from the .ds.gba file.

Add files from the command line using "pocketspcbuilder -add blah.spc blah2.spc". User may use wildcards as well, such as "pocketspcbuilder -add *.spc"

Controls

Menu:

Up/Down - move the current selection
A - start the current selection playing

While the SPC is playing:

Select - turn randomize next song on/off
B - stop the SPC and go back to the menu system
Left - previous song
Right - next song
Up - increase Preamp (volume)
Down - decrease Preamp (volume)

Changelog

Version 0.9

  • Rewrote timer code, it is now both faster and more accurate
  • Fixed KON register issue with Der Langrisser
  • Updated the builder with add directory support

Version 0.8.1

  • Removed sample caching on arm9 version, caused errors in a few songs like mega man x
  • Fixed bug with screen display going wild on songs like star ocean (caused by negative volumes)
  • Fixed bug that multiplied master echo volume by master volume. (fixes legend, and echo volume on a lot)

Version 0.8

  • Optimized timer updating, new key on/off code, cpu usage down by a fair bit
  • Allowed writes to envx/outx
  • Fixed stupid bug with direct envelope setting (fixes super turrican)
  • Improved accuracy of envelope and channel volume multiplication, better sound quality
  • Fixed bug (again) with going backwards before the first song
  • More bug fixes and speed increases to the SnesDS version

Version 0.7

  • Added Gaussian interpolation - samples sound much nicer
  • Increased accuracy of DSP/APU integration
  • Better emulation of key-on and key-off registers
  • Changed around dsp register writes, should be more accurate
  • Envx and Outx are cleared on key-on now
  • Changed DSP ram to have 256 bytes, so reads are no longer mirrored
  • Fixed stupid bug with DSP register reads - any songs that read from envx were broken (fixes dq1, doom, rnh, bt&dd, a lot more)
  • Fixed bugs and added echo emulation to SnesDS version

Version 0.6

  • Reverted change that should have fixed bugs, but instead seems to break more songs(fixes bt&dd, rudra no hihou, others)
  • Fixed bug in builder with long filenames
  • Randomize works better, like winamp now, uses rtc to seed random as well
  • Fixes for arm7 version (snesds)
  • Added sync code to arm7 version (snesds)

Version 0.5

  • Added timer speed up hack to CPU core
  • Changed timer updating code, quite a nice speed gain from that
  • Fixed dumb bug with note key on not setting envelope up properly
  • Fixed bug when changing envelope while sample was playing (FF2)
  • HUGE bug fixed on looping samples.. wasn't resetting the block pointer on first looped block. This fixes a lot of the crackling/buzzing samples finally. FF3 Edgar&Sabin for example (many others)
  • Rewrote BRR decoding yet again, should hopefully be the last time
  • Fixed bug on loading SPC state, fixes actraiser, soul blader, metroid, others
  • Fixed sample volume bug, fixes star ocean

Version 0.4

  • Backported to arm9 for increased speed (arm7 version still being updated for snesds)
  • Moved mixing rate back up to 32000Hz
  • Removed echo hack, added proper echo emulation and FIR filtering, feel the reverb :)
  • Recoded most of the mixer for increased speed
  • Fixed modifying kon,koff,endx when sample was turned off, fixes some samples ending too soon
  • Fixed SPC666 song length being off sometimes - the spc format sucks
  • Fixed BRR decoding bug - wasn't clamping format 2&3, fixes samples that sounded really strange

Version 0.3

  • Enabled preamp which I forgot to do in last release
  • Added PCALL/SLEEP opcodes, should help compatibility
  • KON/KOFF were being trashed on write, fixed
  • Fixed setting of ADSR when note was in release state
  • When note is finished, envelope state is set to none now
  • Fixed TCALL opcode, Rudra no Hihou now works (probably others as well...)
  • End of sample block decoding bug(s) fixed - finally fixes errant samples playing in zelda & many others
  • Added echo hack so that songs that were silent before now play back (earthbound) This hack can also cause some issues with songs that use the echo with some wierd filters, such as some of the final fantasy 3 songs.
  • Improved accuracy of BRR decoding, samples are more accurate now
  • Dropped mixing rate to 24000Hz, gets rid of crackling during intense songs (legend of the mystical ninja)

Version 0.2

  • Added SPC666 extra info display
  • Ported to Arm7 and rewrote BRR decoding & mixing in asm
  • Implemented EOR1/AND1/OR1/TCALL, fixes games that use them
  • Added support for inport/outport handling - you can now see this in snesDS :)
  • Added ENVX & OUTX handling, fixes samples looping forever on some games
  • Fixed crash bug writing to high 0x40 bytes of memory - fixes fzero
  • Fixed DSP mirroring of address > 0x7f
  • Attack ENVX now starting at 0 (was starting at 1)
  • Push/Pop PSW was messed up (Not using/setting DP or H flag)
  • DSP KOFF register was broken, not setting envelope speed when setting Release state, fixes quite a few games that had infinite looping sounds.
  • Fixed MUL YA, was not clearing Z flag when A was 0x80
  • Fixed DIV, was not setting V flag when Y >= X, fixes Mariokart and StarOcean!
  • Removed 'optimization' that didn't do any register checking sometimes, caused bugs
  • Bug fixed in op (X),(Y) form instructions, didn't take DP into account
  • Bug fixed in op DP+reg form instructions, could access outside DP
  • Bug fixed in SBC (X),(Y), reversed the order of the subtraction
  • Bug fixed in op #,(X) instruction, (X) address was not using DP flag

Version 0.1

  • Ported from GBA, rewrote CPU core, rewrote DSP core
  • Support for stereo added
  • Mixing rate set to SNES's 32000Hz
  • Still missing echo/filter emulation for the DSP
  • CPU bugs/unimplemented opcodes remain, if you encounter a song that plays very poorly, e-mail me

Credits

Snes9X Authors, Loopy, TRAC, Antiresonance, Zsnes Authors, WinterMute, Flubba