FPGA Retro Synth

De Wiki LOGre
Révision datée du 23 juin 2015 à 11:01 par Quicky (discussion | contributions)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Aller à : navigation, rechercher

The PapilioChip is a complete musical solution for "live" musician that want to use retrocomputers soundchips capabilities in their live composition and instead of bringing 10 tons of old computers, only bring this little synthesizer. THe PapilioChip will be available as an autonomous hardware soundbox hat can be connected to a PC Tracker or any MIDI compliant sequencer.

Source code


The VHDL design

It consists in "emulating" real soundchip behavior using hardware descriptino language (VHDL], integrate them into the softcore (zpuino, picoblaze)

The chips

  • Yamaha 2149 (General Instrument AY-3-8910 clone) [done]
  • Atari Pokey (C012294) [done]
  • Texas Instruments SN76489 [done]
  • Ricoh 2A03 (NTSC NES CPU) [to integrate]
  • MOS Technology 6581/8580 SID (C64 Sound Interface Device) [to integrate]
  • Yamaha YM2143 [to integrate]
  • Yamaha YM2612 [to dream]
  • Nintendo Gameboy sound system (PAPU) [to design]
  • Philips SAA 1099 (Sam Coupé soundchip) [to design]


Yamaha 2149

  • 3 channels
  • square tone generator (12bits tp frequency : f=clk/16tp)
  • Noise generator (5bits np frequency : f=clk/16np)
  • Envelope generator (16bits ep frequency f=clk/256ep, 10 predefined CONT/ATT/ALT/HOLD/shapes )
  • Level control (based on individual channel settings or envelope)
  • Tremolo : the Envelope generator acts as a kind of simple LFO applied to the channel volume which can be used to produce the Tremolo effect
  • Vibrato : itself the YM2149 cannot produce a Vibrato effect, it requires the host CPU to modulate slowly (LFO on oscillator frequency) the tone frequency registers
  • Portamento : itself the YM2149 cannot produce a Portamento effect, it requires the host CPU to increase/decrease constantly (pitch bend) the tone frequency registers
Special Effects
  • TB303 like acid waves
  • Musical Techniques
  • Chord versus Arpeggio
  • Transpose

Tremolo or Vibrato ?

Atari Pokey

  • 4 semi-independent audio channels, channels may be configured as one of: ** Four 8-bit channels ** Two 16-bit channels ** One 16-bit channel and two 8-bit channels
  • Per-channel volume, frequency, and waveform (square wave with variable duty cycle or pseudorandom noise)
  • High-pass filter
  • Random noise generator is served by reading 8 bits from top of 17-bit shift register. That registers are driven by frequency 1.79 MHz for NTSC or 1.77 MHz for PAL. Its outputs can by probed independently by four audio channels in channel's divider's rate


  • 4 semi-analog sound channels, each one of the four channels is different in it's own way:
  • Channel 1 is a Square wave channel with volume envelope and frequency sweep functions.
  • Channel 2 is a Square wave channel with volume envelope functions only.
  • Channel 3 is a programmable wave channel with 32 4-bit programmable samples, played in sequence.
  • Channel 4 is a 'white noise' channel with volume envelope functions.
  • Channels 1-3 can produce frequencies of 64hz-131072hz
  • Channel 4 can produce bit-frequencies of 2hz-1048576hz.

Philips sa 1099

  • 8 internal stereo channels :
  • 6 square tone generators with stereo panning and volume attenuation
  • 2 random channels (3 hardcoced frequencies or tone generator based)
  • 2 envelope generators based on tones generators
  • global mixer


Philips SAA 1099

  • 6 internal stereo channels that mix :
  • 6 frequency generators with stereo panning and volume attenuation which can output square tone or modulate noise frequency
  • 2 noise generators (using 3 hardcoced frequencies or frequency generator)
  • 2 envelope generators based on frequency generators or external clock
  • global mixer
Frequency generators

The 6 generators can each select one of the 8 octaves and one of the 256 tones within this octave (which means a linear frequency scale from 31 Hz to 7.81 kHz) Frequency generator can control exclusively square tone, noise or enveloppe generator or be turned off They can be synchronized using the reset bit.

Noise generators
Noise/Frequency mixer
Amplitude controllers
Envelope controllers


datasheet : http://velesoft.speccy.cz/samcoupe/saa1099/saa-1099_data_sheet2.zip

Ricoh 2A03

  • 4 internal channels to it that have the ability to generate semi-analog sound.
  • These channels are:
    • 2 rectangle wave channels
    • one triangle wave channel
    • a random wavelength channel.
  • A fifth sound channel capable of playing samples

Texas Instruments SN76489

  • 4 channels (3 square wave tone and 1 white noise/periodic noise channels)
  • Each 3 tone generator has:
  • their own frequency (10bits n frequency : f=clk/32n)
  • their own attenuation (volume) (4bits value, 0xF (mute) to 0x0 (max vol)
  • The noise generator can produce white noise or periodic (16bits shift register) noise

Maxim's doc


  • a427 : softcore integration, MIDI component
  • Shazz : soundchip integration & design

Hardware Design


Wings are addon PCBs that can be plugged in the Papilio board.


From Rebb:

  • 1 master and optional per soundchip outputs? (Good quality connectors are not free, why not have pcb header for individual soundchip outputs, "plugin what you need")
  • Probably wouldn't miss a knob, as this device is midi/computer driven anyway. We all have tons of midi controllers already.
  • Op-amp buffer stage should fix the low output problem?
  • LED's are great! Lot's of them are better ;) Midi signal and power led's are the ones i usually need (Is this damn thing on? and Does this receive any midi signal?)
  • My ideally machine would have a pcb connector (plug in your favourite analog filter module you found from net!) Saves us the trouble of redesigning stuff that has done already million times, and makes possible user to plugin their favourite synth with filter input or cook their own filter modules (It's more fun than starting Atari, trust me!) Means the pcb connector should have audio out/audio back in, control voltage out(s), gate out. Proper CV out from midi data needs expensive and hard to get chips, but can also achieved with enough resolution by simple loads of resistors. (Check http://www.ucapps.de/mbhp_aout_lc.html)


  • Rebb : PCB, Filter, tests
  • Thomas: PCB

Embedded Software

The embedded software consists in the pieces of code running on the softcore:


  • a427 : logsdk framework, Serial protocol
  • Shazz : logsdk framework, Serial protocol
  • Texane : logsdk framework, Serial protocol
  • Bastian : ST2 player

PC Tracker

The PC Tracker is the music composition tool


  • Bastian : ST2 Tracker
  • a427 : PapilioChip Serial Client