Preamble
Everyone is talking about Chiptunes these days, the retro sound obtained from the games devices, and home computers of the 80s:
- Music from Game Boys –
- For the original Game Boys are best, see Game Boy Sound System, and for more details Gameboy sound hardware.
- Instructables – The ultimate guide to creating chiptunes on the game boy, an excellent guide, which also features a DIY repair guide for GameBoys.
- Note that GameBoy Advance, or Nintendo DS are not so useful when trying to make music
- Magical Game Boys: Demystifying The Live Chiptune Performance
- C64 SID, MOS Technology 6581 and 6582/8580R5, see SID and MOS Technology SID. See also, Video chip 6567 (VIC20) – Datasheets are here.
- General Instruments AY-3-8910
- YM2149F, a derivative of the AY-3-8910
- Texas Instruments SN76489
- Texas Instruments SN76496 – competitor of the AY-3-8910, identical to the SN76489 but with sound in.
- From Why did the IBM PC need a sound card?, both the SoundBlaster and ZXSpectrum128k used a AY-8912, see AY-3-8910 Variants
- Intel 8253 and 8254 is a basic timer chip used by the PC internal speaker (not soundcard)
- From Building my Dream Computer – Part 2 @ 40:02
- AY = 3 8910
- YM-2151
- SAA-1099
Featured image courtesy of Button Masher T.O.
See also
- MIDI on OSX
- Battered GameBoy
- Barebones Arduino
- ByteBeat on Arduino (sort of vaguely related)
- ArduinoBoys and others
- Making your own ArduinoBoy
- ArduinoBoy build
- GameBoy Flashers
- Making your own GameBoy Flash cartridges
- DMG internals
- DMG music cartridge
- ArduinoBoy LSDj (from LSDJmi)
- Oh Node you don’t!
- Breakout!
Links
- The original writer for the Arduino, Linus Akesson, The hardware chiptune project
- A customarily bad guide from Instructables – Arduino Chiptunes
SID
-
Why do programmable sound generators like SID include a noise generator?
- Why did the IBM PC need a sound card?
ArduinoBoy
TeensyBoy
The hot devices
From The ultimate chiptune producers’ gear guide
- Commodore64
- MSSIAH – for C64
- GameBoy
- LSDj and Nanoloop
- Magical 8bit plug – VST
- VOPM
- NES
- MIDInes – for NES
- Famitracker
- Chipsounds by Plouge – VST
- KORG DS-10
- Anything with an AY-3-8910 in it – Spectrum128, Intellivision
Synth-in-a-MIDI-plug
Whilst not strictly chiptunes, in the retro sense, this is still cool, MIDI on the ATtiny,
See also, An even smaller, even sillier synth
MOS 6581 and 6582/8580
From MOS Technology SID
SID chip versions
The first version was the 6581 followed by the 8580, (in the later flat grey Commodore C64C). The 6582 was sold as replacement for defective 8580s, and sounds very similar. The main difference is the supply voltage and filter caps. The 6581 takes 12V and requires 470pF caps while the 8580 and 6582 take 9V and require 22nF caps.[3]
There are also sound differences. The filter of the 6581 sounds more moody and dirty, while the 8580/6582 filter sounds more precisely. Resonance has nearly no effect on the 6581, some mixed waveforms are not working, and it has a much higher background noise. The 8580/6582 is normally the preferred choice.[3]
6581
From Commodore 64 Pseudo Stereo Dual SID boards

6582
The 6582 is found usually on a C64 motherboard:
8580
From Commodore 64 Pseudo Stereo Dual SID boards
It’s location on a C64 motherboard is (from Commodore 64 C64C motherboard has Fault. Assy no. 252311 Rev B-Boots Up Ok.):
and from Index of /~rcarlsen/cbm/c64/SCHEMATICS/250469
8581
From SID 6581 / 8580
Signal Description
(Click here for ASCII version)
Pin(s) Signal Dir Description 1-2 CAP 1A/B ? Capacitor #1 for the programmable filters. 6581: 470pF, 8580: 22nF*. Note that both capacitors (see pin 3-4) should have the same value. [1] recommends 2200pF for normal operation, which was AFAIK never used in the C64. 3-4 CAP 2A/B ? Capacitor #2 for the programmable filters. See pin 1-2. 5 /RES in RESet. If this line remains LOW for at least 10 ø2 cycles, all internal registers reset to zero and the audio output is turned off. 6 ø2 in Phi2**. System clock cycle. All data bus action takes place only when ø2=1. 7 R/-W in Read/Write. 0=write access, 1=read access. 8 /CS in Chip select.0=data bus valid, 1=data bus high impedance state (tri-state). 9-13 A0-A4 in Address bits 0-4 for selecting one of the 29 registers. 14 GND – GrouND (0V). To reduce noise, this line should be connected separately to the power supply. 15-22 D0-D7 in / out Data bits 0-7. 23 POT Y in POTentiometer Y. Analog input #2 for paddles. (ADC#2) 24 POT X in POTentiometer X. Analog input #1 for paddles. (ADC#1) 25 Vcc – Supply voltage. +5V. 26 EXTERN IN in External Input. Max. input 0.6V. 27 AUDIO OUT out Audio output of all voices. 28 Vdd – Secondary voltage. +12V (6581) or +9V (6582, 8580). * You might find 330pF in some boards, too.
** The ‘ø’ is used as Greek ‘phi’ here.6581 / 8580 Signal Description ------------------------------ Pin(s) Signal Dir Description 1-2 CAP ? Capacitor #1 for the programmable filters. 1A/B 6581: 470pF, 8580: 22nF*. Note that both capacitors (see pin 3-4) should have the same value. [1] recommends 2200pF for normal operation, which was AFAIK never used in the C64. 3-4 CAP ? Capacitor #2 for the programmable filters. See 2A/B pin 1-2. 5 /RES in RESet. If this line remains LOW for at least 10 ø2 cycles, all internal registers reset to zero and the audio output is turned off. 6 ø2 in Phi2**. System clock cycle. All data bus action takes place only when ø2=1. 7 R/-W in Read/Write. 0=write access, 1=read access. 8 /CS in Chip select.0=data bus valid, 1=data bus high impedance state (tri-state). 9-13 A0-A4 in Address bits 0-4 for selecting one of the 29 registers. 14 GND - GrouND (0V). To reduce noise, this line should be connected separately to the power supply. 15-22 D0-D7 in / out Data bits 0-7. 23 POT Y in Potentiometer Y. Analog input #2 for paddles. (ADC#2) 24 POT X in Potentiometer X. Analog input #1 for paddles. (ADC#1) 25 Vcc - Supply voltage. +5V. 26 EXTERN in External Input. Max. input 0.6V. IN 27 AUDIO out Audio output of all voices. OUT 28 Vdd - Secondary voltage. +12V (6581) or +9V (8580). * You might find 330pF in some boards, too. ** The 'ø' is used as Greek 'phi' here. ------------------- [1] C64 Programmer's Reference Guide (excerpt) Author: Marc-Jano Knopp <mjk@c64.org> on 97/11/21 Source: http://mjk.c64.orgTechnical info
The SID 6581 was first used in the Commodore 64. It is a synthesizer with many synthesis controls and filters; additionally, it has two builtin A/D converters (used for the paddles and analog mice in the C-64). It needs both 5V (Vcc) and 12V (Vdd) supply voltage, the latter generated from the 9VAC delivered by the power supply by using a rectifier bridge with a 12V voltage regulator after it.
With the new boards (C64G and late flat case-C64s), Commodore introduced a new version of the VIC and the SID. The new SID 8580 only needs 5V (Vcc) and 9V (Vdd) for operation.The sound of the two SID versions differs, partly due to different filter capacitors, partly due to the greater number of possible waveform combinations with the new SID. Alas, the filters in the new SID have less effect than the ones in the old SID.
The 8580’s digital sound output is quite soft, but you can easily increase the digital volume to make it sound like the old 6581.
Programming info
In the Commodore 64, the SID is mapped to $d400-d7ff. For more programming information, you should refer to Mr. SID’s Technical SID documentation.
[1] C64 Programmer’s Reference Guide (excerpt)
SWINSID
As MOS Technology SID states, under Hardware Emulation, there is an Arduino (Nano, or ATmega328PU) based replacement for the MOS 6582/8580. However, it does not sound the same.
From COMMODORE 64 128 SWINSID SID MOS CSG 6581, 6581r3 , 8580, 8580r5 , 6581r4ar, €18

From Swinsid commodore 6581 8580 sid replacement, £10.50
It sits on the motherboard like this:
SID links
- Datasheets, from http://sid.kubarth.com/files.html
- [SID 6582] PDF, 1496kB PDF:ds_6582
- [SID 6581] PDF, 1694kB PDF: ds_6581
From C64 Soundchip SID 6581 with Arduino Duemilanove
- http://cpansearch.perl.org/src/LALA/Audio-SID-3.02/SID_file_format.txt
- http://little-scale.blogspot.com/2010/03/how-to-make-commodore-64-midi-interface.html
- http://www.midibox.org/dokuwiki/wilba_mb_6582
- http://www.ucapps.de/mbhp_sid.html
- A_SID Serial Synth Kit : C64 Synth chip emulator:
http://www.straytechnologies.com/products-page/breadboard-kits/a_sid-serial-synth-kit-c64-synth-chip-emulator/ - Let’s control a sid via arduino:
http://little-scale.blogspot.com/2009/12/lets-control-asid-via-arduino.html - Code:
http://milkcrate.com.au/_other/downloads/arduino/ - Homebrew 8080 Computer – MIDI
- Arduino SID Interface
Schematic
SID with Arduino (ATmega8) as MIDI device
From Homebrew 8080 Computer – MIDI, (original image)
See also Arduino SID Interface (Source and Schematic)
76489/76496
Application manual for SN76496, link, PDF: SN76494,_SN76494A,_SN76496,_SN76496A_Application_Manual
Available on eBay:
- 1pcs SN76496N DIP-16, $1.90
- 5pcs SN76496N DIP-16, $5.11
- 2PCS SN76489 SN76489AN DIP-16 Digital complex sound generator NEW, $0.99
- 5PCS Digital complex sound generator IC TI DIP-16 SN76489AN, $1.70
AliExpress: 5pcs/lot SN76489AN SN76489 76489AN DIP16, £1.28
EagleCAD parts:
Note that the two ICs are identical, apart from pin 9:
The simplest hookup
See Experimenting with an Arduino and a SN76489, for the simplest set up:
Code
//typedef uint8_t PROGMEM prog_uint8_t; // may be required const int PIN_D0 = 2; const int PIN_D1 = 3; const int PIN_D2 = 4; const int PIN_D3 = 6; const int PIN_D4 = 7; const int PIN_D5 = 12; const int PIN_D6 = 11; const int PIN_D7 = 10; const int PIN_NotWE = 5; const int PIN_NotCS = 8; void SendByte(byte b) { digitalWrite(PIN_D0, (b&1)?HIGH:LOW); digitalWrite(PIN_D1, (b&2)?HIGH:LOW); digitalWrite(PIN_D2, (b&4)?HIGH:LOW); digitalWrite(PIN_D3, (b&8)?HIGH:LOW); digitalWrite(PIN_D4, (b&16)?HIGH:LOW); digitalWrite(PIN_D5, (b&32)?HIGH:LOW); digitalWrite(PIN_D6, (b&64)?HIGH:LOW); digitalWrite(PIN_D7, (b&128)?HIGH:LOW); digitalWrite(PIN_NotWE, HIGH); digitalWrite(PIN_NotWE, LOW); digitalWrite(PIN_NotWE, HIGH); }
Use two ICs for stereo, with or without glue logic.
Derived from simplest
A derivation from the above, using a Nano, Arduino and the Texas Instruments SN76489
Github: MusicSequencerTest
Arduino Shield for SN76489
SN76489 arduino shield – part 1 testing the chip, using an ATtiny45 as the clock. The ATtiny45 can be set to be a ATtiny15 by setting CKSEL
fuses to 0011
, which puts the ATtiny45 Timer1 into ATtiny15 compatible mode. See A tiny oscillator for more details.
There doesn’t seem to be any other parts (only part 1), unfortunately, as it was written in 2013 and there are no further articles.
VGM
See this video ESP8266 SN76489 PSG VGM Player. The code and schematic are on Github: AidanHockey5/ESP8266_VGM_Player.
Parts required:
- NodeMCU
- SN76489, PDF: SN76489
- EagleCAD: 76489
- LTC6903, PDF: 69034fe – oscillator, only in SOP and not a DIL package, as well as being pricey – obviously this could be replaced by a ATtiny15 (45/85), as used in Arduino Shield for SN76489 above (see Audio Oscillator in AVR).
- EagleCAD: https://www.diymodules.org/eagle-show-library?type=usr&id=1793
- See also Arduino controlled Frequency Generator 1kHz – 68 MHz, PCB
- See SP0256-AL2 pitch control for putting the LTC6903 on a breakout board.
- See Breakout!
- 74HC595 – Shift register
Improved schematic (and stripboard) at GitLab: .


The PIC is not necessary and can use the ESP8266 SPI (original image):
The NodeMCU can apparently struggle to keep up (although this may be a bug (overly long delay) in the firmware that has now been fixed apparently). Requires a µC with 4 MB flash, and fast clock.
See also this video, for an excellent improved sound: ESP8266 YM2612 SN76489 VGM player prototype part 3 (Audio mixer/amp)
Squareinator
Squareinator – a SN76489 Monosynth
YM2612
An Arduino Uno is insufficient. Arduino test project:
https://github.com/skywodd/avr_vgm_player/tree/master/ym2612_test
See also this video, for an excellent improved sound: ESP8266 YM2612 SN76489 VGM player prototype part 3 (Audio mixer/amp)
Noticed you linked our ShieldBoy, which works great!
I experimented on a few things though, such as if I could make a rackmount version (easier to use multiple ArduinoBoys in a 1U) but ended up settled on what I call the StageBoy (https://github.com/m00dawg/stageboy). This is what we use for both recording and live performances of the GameBoy with the band.
It combines an ArduinoBoy with the PISS Box design (though with a MUCH bigger and better transformer) into a single metal box. I had meant to make 3D printed panels for it but the open sides haven’t been enough of a bother to mess with it (if I do, I’ll be sure to add them to the project).
LikeLike
HI there, thanks for the comment. Yes, I like your design. Do you actually sell the board (either as a kit or assembled)? You should really add a few photos of the board (at different angles) to the page, as the only image of it is a brief blurred shot of it in the video. By the way, there is an unfortunate typo in your menu item, and URL, of the AdvanceRack (Ardunio) page, the “i” is in the wrong place.
LikeLike