The following is code in SuperCollider for some retro video game style chiptunes that I composed. The beginning of the code is a simulation of the synths that were used on the original Gameboy (with some influences from other sources). The second part is three original tracks composed using these tools.
Listen here (or in SuperCollider directly): https://soundcloud.com/antonis-christou-813126471/sets/chiptunes