Shitwave - A PRNG based drone generator for Gameboy

March 23rd, 2009

Shitwave vis 1 Shitwave vis 2
Little-scale recently posted All 4-bit Waveforms That Have 32 Samples, a Max patch that would generate all possible wave frames that could be used with LSDj, given gazillions years. However, the result was a little boring because it would start out as a 1/32 PWM and slowly progress towards a longer and longer PWM. Even within many years, chances are you’d still have a very low duty PWM.
So I decided to find an algorithm that would produce more interesting sounds and still cycle through all 1632 possibilities. My choice was a pseudo random number generator using a linear feedback shift register. Actually not completely unlike the one in the Gameboy’s noise generator.
However, where the GB’s generator goes through a small number of states, and the buffer constitutes one sample, I’m using the full 16 bytes (32 samples) used in the Gameboy’s wave channel as my shift register. (Equivalent of one frame in the LSDj softsynth)
The shift register is a regular Fibonacci where the two topmost bits are xor’d with each other and shifted in at the bottom. The program is written in spaghetti style hardcore assembly language and the code is 256 bytes big. (The file header is another 80 bytes. So all in all, the program is 336 bytes.) The rest of the 32 kB is zeros, so there’s room for additional functionality. (Suggestions, anyone?)
The visuals are showing the currently playing waveform. The background pattern for the visuals are generated with a simple xor algorithm to make it appear random.

Unfortunately I don’t have a camera with a microphone, or even editing software that can handle the non-standard MOV file that my DSC gives me. So the audio is recorded separately from the video.


Shitwave  by  nitro2k01(Gameboy Genius)

Video: (No sound :( )

And last but not least… The ROM for those who dare and desire to try the program themselves. (637 bytes, zip)
A and B (Or left and right) controls the type of visualization used. Select (Or up) re-seeds the PRNG. Preferably, run this program on real hardware, not in an emulator. If you must use an emulator, use no$gmb.

Oh, the name “Shitwave”? I mispelled “Shiftwave” when creating the folder for the project, and then I decided it was a fitting name.
shitwave in BGB

Shitwave in a hex editor

32 Responses to “Shitwave - A PRNG based drone generator for Gameboy”

  1. Mr Tomczak says:

    “it’s boring waaah”. Awesome work, Nitro! Very, very impressive.

  2. 10k says:

    can’t wait to give this a go.
    Ima use it in my set as a reference to you both!

  3. Mr Tomczak says:

    do it as i will be there with you in spirit. im sorry i can’t make it. and nitro, i’m going to be using this as part of a performance if that is okay with you.

  4. nitro2k01 says:

    You m may proceed, sir!

  5. dotdummy says:

    Sounds good in emulator thru PC speaks at work… can’t WAIT to hear it DMG-> amp at home!!!!!!

  6. reiyano says:

    fuckin amazing. How do I get as smart as you guys? little scale and nitro awesome work!

  7. infradead says:

    amazing stuff man.. really cool

  8. TRUE CHIP TILL DEATH » Shitwave - A PRNG based drone generator for Gameboy says:

    [...] Gameboy Genius » Blog Archive » Shitwave - A PRNG based drone generator for Gameboy. Share [...]

  9. Bud says:

    You and little scale are sick individuals.

    Love it.

  10. got80 says:

    great work! so, is there a recording with both audio+visuals available yet? i wanted to show it off somewhere…

  11. analog says:

    amazing, i’m tryin’ it and i love the sound!

  12. jumpingfox says:

    no$gmb with bios and firmware

  13. Gameboy Genius » Blog Archive » Shitwave+Ableton Live (Brian Green) says:

    [...] Shitwave running in KiGB, fed into Live. At times like these I feel ashamed that I haven’t added support for any kind of MIDI control yet. It would make Shitwave much more useful for actual composition. But at the point it was more of a proof of concept. [...]

  14. New Stairlift says:

    Great work. Sounds good in emulator thru PC speaks at work. Thanks

  15. Johan Larsby says:

    Very funny to work with!

  16. werto says:

    That’s lovely!
    But unfortunately link to download it is not working…

  17. Shitwave synced to LSDj - Data Airlines says:

    [...] of a LTC1799 variable oscillator which is contralling the clock frequency of the DMG running Shitwave. (Don’t forget that Shitwave sucks [...]

  18. infradead » G1 and shiftwave: a match made in heaven? says:

    [...] First off a confession. Shiftwave as a name was totally lifted from the blog of the creator of shitwave. [...]

  19. DVELOP says:

    this is effin great work! I love it.

  20. Twitter Trackbacks for Gameboy Genius » Blog Archive » Shitwave - A PRNG based drone generator for Gameboy [] on says:

    [...] Gameboy Genius » Blog Archive » Shitwave - A PRNG based drone generator for Gameboy – view page – cached * Bill Hicks on Rick Astley, creationists and positive drug stories * Regarding the message on the 8bitcollective front page… * 3 new tracks (+1 old one) * Twuttr * Shitwave synced to LSDj * Figma - Drossel von Flügel * Best g’damn action scene ever! * LittleFM on GBC * ReBub * Red onion macro and photo dump! * 漢字 test Tweets about this link [...]

  21. EM__Dash says:

    Amazing work. Just wanted to say that I’ve been using this for generating visuals. Through No$GB on a PC or using an EMS cart in a Super Game Boy and SNES, you can change the four shades of gray to whatever colors you wish and project this as a background of pixelated static that can be controlled, to some extent, by pressing A, B, and Select, more so if used with an emulator with an adjustable frame rate or a LTC1799-pitch bent SuperGB.

  22. nitro2k01 says:

    Oh cool. Knowing that someone is actually using it after so long almost makes me want to take up development again.

  23. EM__Dash says:

    It’s a fantastic piece of code. If you’re willing to share the source, I’d love to work on it some more and add controls (such as pause, reverse sequence, etc.).

  24. nitro2k01 says:

    Let me put it this way, the disassembled code looks cleaner the original source code. And the code is written to be esoteric and weird.

  25. Gameboy Genius » Blog Archive » Untitled installation featuring Shitwave says:

    [...] An untitled collaboration between Simon Mattisson and Marcus Olsson. A Gameboy in a dark room is overclocked until it crashes. I’m almost getting Saw vibes from this. The Gameboy is modded by NeX and is actually being overclocked. The sound is produced by Shitwave. [...]

  26. Travis Hallenbeck says:


  27. Jonny says:

    going to be using shitwave for a noise/drone performance soon. I’ve been wanting an excuse to use it like that since it was released. cheers nitro2k01!

  28. Timmy's sick. says:

    I invented a theramin controller for shitwave.

  29. Timmy's sick. says:

    ok, just kidding. but think of how cool that would be.

  30. jz says:

    So cool! I could listen to it forever!! I really love that warm, fuzzy sound!!

    Hope a next version will add more controls to add some entropy/variations to the whole!


  31. Video: Shitwave /// Game Boy Music Software (3/30) | Retro says:

    [...] Tronimal erklärt die Game Boy Musiksoftware Shitwave. [...]

  32. Composition Blog #4 – ben_making_sounds says:

    [...] able to get out of just the two Gameboys alone, one running mGB and the other droning the glitchy Shitwave. I now have a fairly good basis on what I want to do for my composition and [...]

Leave a Reply

If you'd rather contact me directly, please use the following e-mail address: It appears that you have Javascript disabled. Please enable it to see my e-mail address.