Platform - Miscellaneous » ATmega88
From the homepage of [artist]60[/artist]:
"Normally, when you create a chiptune, you start with an existing chip (such as the SID chip or the YM2149) and write a tune for it. We decided to start from scratch, and create a chip and a tune.
It all started at St. Lars Meeting III, an oldschool demo party held in Lund. Yarrick, flex and I were there. I had gotten the idea for the project on the day before the party, so things were a bit spontaneous, and we had to make do with whatever components I had laying around.
We wrote all the sound-reproducing software at the St. Lars meeting. One particularly interesting bug that kept us wondering was the fact that when we tried to multiply two integers on a particular source code line in the interrupt routine, all sorts of weird things would occur. If we commented out the multiplication, things would work. However, there were other multiplications in the interrupt routine that did work. The "weird things" were that, for instance, we wrote a constant to an output port at startup, and never wrote to that port anywhere else in the program; but when we un-commented the multiplication in the interrupt routine, that output port emitted a quite different signal.
This confused us to no end, until we looked at the generated machine code and started counting the clock cycles. Apparently, the multiplication was the final straw that caused the interrupt routine to run for too long. Before the interrupt routine would finish, another interrupt would occur, causing a new frame to be pushed onto the stack. The stack would fill up and the new stack frames would overwrite RAM and eventually the I/O registers.
This meant that we would have to rewrite the interrupt routine in assembly language.
Once we had the software up and running, we had to compose a chiptune. I had been experimenting with chip trackers before, so I re-used some code, and hooked it up to the sound routine, which was quickly ported from the AVR.
Eventually, we managed to cram it all into 8 KB. We couldn't use any standard compression algorithms, since we were so low on RAM (i.e. there was no room for the unpacked data). Instead, we devised a solution involving variable bit-length data structures and lots of bit shifting. We also removed one of the command tracks; as you can see in the tracker screenshot, every note can be followed by two effect commands. To save space, we removed support for the second command, and edited the tune to cope with this new limitation.
At this point we had decided to bring the project to Birdie 17, and participate in the wild compo."
More information on this amazing project can be found at http://www.linusakesson.net/hardware/chiptune.php
|Song Title||Artist||Song Length||Status||Vote||Queue||Last Request|
|Craft||LFT (Linus Åkesson) lft||3:33||Active||4.8||2020-03-29|
|Power Ninja Action Challenge||LFT (Linus Åkesson)||3:32||Active||4.5||2020-03-31|
|The Hardware Chiptune Project Song||LFT (Linus Åkesson) lft||1:40||Active||4.8||2020-04-06|