in Telephony

Super Mario meets the SPA-941

The default ring tones that come with the Sipura SPA 941 IP phone are a bit lame, and actually the "Classic" tone is very jarring. I’ve been playing with my Super Nintendo (yes, that 16-bit dinosaur) again recently, and I must say that the sound effects and music in Super Mario Brothers 2 are very catchy. I decided to see if I could make a ringtone out of some key tunes.

Nintendo sound files are commonly stored in an NSF sound format after they have been ripped from a Nintendo system. NSF isn’t a standard or a format created by Nintendo; it’s just a format created by an enthusiast and has spread widely. Unfortunately, development on most NSF players and plugins ceased many years ago, so it was difficult for me to find an acceptable “made-on-Unix” solution for converting NSF files to WAV. The only NSF player I was able to find was Nosefart, whose source tree was a mess. I managed to build the gnosefart standalone application, but the XMMS plugin was a disaster area. The plugin basically fork()s the nosefart CLI, but since you have no way of sending TTY input to a plugin from a graphical interface (yes, it’s that dumb), it’s consequently impossible to play anything but the first track in an NSF.

Festalon looked promising but I couldn’t get it to build on a 64-bit Linux. So I resorted to retrieving a WinAmp plugin and installing WinAmp under a VMWare guest environment. Using Nullsoft’s Disk Writer Plugin I was able to generate WAV files of the appropriate sound effects.

Using a Windows guest was fortuitous because the Sipura utility which converts WAV files and downloads them to the phone is Windows-only. The ringtone is limited to 6000ms and needs to be downsampled for use on the phone. The aforementioned utility does all this work for you, and also sends the converted output to the phone itself. (There must be a way to do this without using the utility e.g. putting a completed ringtone on a TFTP server and having the phone load it, but I haven’t found it yet.)

The SPA-941 only supports two user-defined ringtones, so I converted both the Game Over music and the music which plays when you choose a character to be my custom ringtones. One problem with using autoprovisioned phones is that when the phone refreshes its config from the TFTP server, your ringtone selection will be lost (although the actual WAV files are stored on the phone itself and aren’t lost). It’s necessary to edit the phone’s .cfg file on the TFTP server to ensure that the changes are made permanent, e.g.

 <Default_Ring_1_ ua="na"> User 1
 </Default_Ring_1_>

And that’s it! Every time someone calls my IP phone now, it’s “Game Over”.

Write a Comment

Comment