Why I Cannot Sell These
Click on any picture for a larger view.



This is one of my best projects I think. It took the longest to complete since I went through so many revisions. I first made a working SID player some time in 1995 that was very limited; only allowed 50Hz or 60Hz playback rate, the processor frequency was fixed to 1Mhz, and it could only play IRQ style tunes. That has all changed with the advent of my new SID player shown above.

Features


True PAL and NTSC processor speed, changable on the fly. Error is 0.00% for NTSC rate, and 0.01% for PAL rate. A PLL is used to generate this along with a PIC microcontroller and an oscillator.
True and Pseudo Stereo sound. Mono tunes are played back on two SID chips, each sharing the same data, however one SID has a slightly different set of caps on the filter pins, so when you listen it sounds like the notes are bouncing around and other crazy stuff. It will also play true stereo tunes that use two SID chips, though I have no tunes to test this with.
Stereo Channel Seperation. On mono tunes, you can disable certain channels on the left and/or right SID to make say, channel 1 come out the left side only, channel 2 come out the right side only, and channel 3 come out both sides to add real seperation effects. Channels can also be muted entirely.
Real Time Pause. Pressing pause will stop the SID that is playing, and mute the audio. Pressing the button again will resume play.
Popless Start/Stop. Starting and stopping tunes causes very loud and annoying pops in the audio, so when a tune is started, it is muted for a couple interrupt cycles. This prevents those annoying POP sounds when you are hooked to a stereo!!
Songs are stored on cartridges, up to 8Mbytes of songs can be stored on one cartridge.
Full PSID-style SID Support. This box accepts unmodified PSID-style .SID files, and will play them in the same fashion as say, SIDAmp. The only restriction is the digi sound is not supported but I don't think this is a great loss since the SID really wasn't designed for it, its implementation is a hack that doesn't work on real C64's, and it sounds like crap. (In my opinion)
The tune's playback rate is actually calculated in real time and shown on the display. This is useful to see what rate that tune is *really* using. The calculation takes into account PAL and NTSC rates.
RCA jacks of the raw SID output on the back allow the cleanest sound transfer, while a headphone jack on the front, and an internal speaker allow other listening options. The volume control used is digital. Believe it or not, I made a car adaptor for this thing and have used it to prove music on trips using a tape adaptor!
The IR remote control can be used to change songs, tunes, volume, and play the next song, or turn power on/off.

Guts



The above picture is the top half of the SID Player's enclosure, which is holding (clockwise, from 12 o'clock) :

Around 1 or 2 O'clock is the audio amplifier, digi volume, IR remote, keypad reading and power supply board.
At 6 O'clock is the Vaccum Flourescent Display (VFD) which is held in by 2 custom-made aluminum brackets. The grey cable is the display's power and data connections.
At 7 O'clock, mounted to the front is the IR receiver for the remote control. It looks like a silver box; I stole it out of a dead VCR :-)
Around 9 O'clock near the centre of the box is the greenish bottom of the keypad.
And finally, at 11 O'clock is the 1 chip mute circuit that shuts up those pesky POPs from the SIDs.


The above picture is the bottom half of the SID Player's enclosure, and houses most of the electronics.

On the left side, the silvery box, chip with the white sticker on it marked "DIV", and the chip below that comprise the clock generator. The silvery box is a 14.318181Mhz oscillator, running an 8 pin PIC microcontroller which is acting as a programmable divider to run the PLL, which generates the final system clock of either ~1.02Mhz or ~0.98Mhz for NTSC and PAL, resp. Below this is a small mess which makes up the reset circuitry.
At the very bottom is the black cartridge connector and next to it the blue display connector where the VFD display plugs in. In the right-hand bottom corner sits the internal speaker.
Above the blue connector is the 40 pin port and timer, which is a simple 65C22. It runs some I/O and provides the IRQ pulses which time the music. Next to this is the 20 pin 74LS573 8 bit latch for the 65816's upper 8 address bits.
Above the big black connector is the square 84 pin FPGA, which does most of the work. It holds all the "glue" logic and some other fun things. It is a chip that can be custom-programmed. (Yes, that's an Intel logo on there, but no, it is not a processor :-)
Directly above the FPGA is the 65816 which runs the show.
To the right of the '816 towards the top (with the green label marked "CODE") is the EPROM which contains the player's menu/control code. Below that is the 128K RAM chip which provides system memory, and a 64K virtual C64 instance.
And finally, in the upper right hand corner are the two SIDs, very carefully placed so they do not pick up any noise, and carefully shielded, grounded, connected, with guard bands on everything. They even have seperate linear 5V and 12V supplies.


Theory


The theory of operation is fairly complicated and takes a bit of explaination. The hardware is set up in such a way to allow two distinct memory maps.
In "Control" mode, there is 16K of RAM mapped in at 0000-3FFF, the port chip is at 4000-7FFF, and 32K of control ROM sits at 8000-FFFF. The "virtual C64" RAM space sits at 10000h-1FFFFh, and the cartridge ROM maps in at 800000h-FFFFFFh.
In "Emulation" mode, the "virtual C64" RAM space is mapped in at 0000-FFFFh, and everything else is disabled. *everything*. with exception of 0001h which is the bankswitch register, and D400h-D7FFh for SID one, and DE00h-DFFFh for SID two (not tested, no programs to try).

Switching to emulation mode is easy, you toggle a bit by writing to the port. Getting out of emulation mode, however is not. There is only one way to do it, and that is to make use of the COP instruction. This causes a "Vector Pull" output on the 65816, which pops the thing out of emulation mode and back into control mode. As a bonus it causes us to go into an interrupt handler in the control code, which undoes the damage and returns us to the control code.
The mechanics of running a tune are fairly simple: At the very end of the C64 RAM space you write the following code: "JSR music_addr : COP". it takes 4 bytes and I've never had it interfere with a song yet. To run this turkey, there's some code at the end of the control ROM that saves the stack pointer, fixes the pointer to FFh, then drops to emulation mode. Since the RAM is switched in and the control code is switched out, we "drop" onto the JSR, which then runs the code, comes back, causes a COP, which pops the Vector Pull line, brings us back to control mode, and runs the COP interrupt routine. The COP interrupt routine pulls our saved stack and fixes it up so it's what it was before going to emulation mode.
I've glossed over the finer details, but that's basically how it works. I've had 400hz tunes play on here without much problem so it seems to be a good system. Likewise, I've not had any tunes crash the player after making a few code mods to the COP return interrupt that checks for re-entry (nasty problem where the play loop kept getting called and wouldn't stop). I have come across a couple silent tunes that use invalid opcodes which the 65816 doesn't like, but I've only found maybe 6 of those out of the 6-8 thousand tunes that I've listened to on it.

More Pictures


Top of the SID Player.

Back view of the SID Player.


Listen to some sample tunes!

Cryogenic - Note cool stereo effect.
The Riddler - Note pseudo audio panning.
Force - General all around cool tune.
The Big City - This is a 4-speed tune, 200Hz.
Nightmare - This is a 9-speed tune! 450Hz.
Distant Echoes - Very neat-o techno SID.
Procession - Bassy and cool.

The above files were played on the SID Player with all channels enabled. The "stereo" effects heard are 100% the result of slightly differing filters on the two SIDs.

Tetroid - For this tune, I did some channel disabling. Channel 1 comes out both L and R, channel 2 comes out R only, and channel 3 comes out L only. The stereo seperation is very nice on this tune.

Here is my progress file I made during the production of the SID Player.


All HTML and graphics designed and © by Kevin Horton .