Electronics, coding and hacking. And ADD.

The jungle of synthesized design


I finally got my Altera CPLD board in the mail yesterday. I was really looking forward to start playing with it immediately, but as it turned out, I had to download 3 gigabytes(!) worth of development tools in order to start. With an intensively shared internet connection, the playtime had to wait until tonight. I can't wait until I have my own private line.

What I received was an Altera board with a MAXII family (more specifically the EPM240T100C5) CPLD, coupled with an external 50MHz clock available to turn the wheel around. The programmer itself is a Chinese knock-off which is, supposedly, compatible with the original USB-Blaster from Altera. From what I have heard, it works just fine. Here's the hardware I'm playing with:

CPLD board and USB-Blaster

After installing the software, the first impressions vary from "WOW!" to "holy shit, how the hell am I going to learn this?" - but I'm determined to master this, once and for all.

After fiddling around with the controls for a bit, I finally got the essence of it and wrote a simple program that divided the clock down to blink an LED. This simple Youtube clip shows the board in action:

(I just had a mild cold, and I'm sniffing like crazy, so I did a short audioswap on Youtube to spare you the nasal sounds)

All in all, I'm quite pleased with the progress - a couple of hours from installing to having the first synthesized design up and running is more than satisfying. Really looking forward to play some more with it tomorrow.

We made it!


The C64 demo was finished at the party, several hours after the deadline. I didn't realize so much work remained; finishing the twist scroller, implementing the loader, adding and fading out the music, etc. I guess I spent about 12 hours coding at the party, in total. We were happy with the product, and landed on a 4th place in the Oldskool Demo Compo. Without further ado, here is our most recent demo, Naked Grinder by Hoaxers. A longplay of the demo can be seen on Youtube.

We will now be getting ready for X'2012. We'll have the demo ready before the party next time.

Meanwhile, a lot of goodies arrived. The ATmega, 24MHz crystals, PCB's and more, actually most parts for the Swinsid chip are in, so I'll probably start soldering up some prototypes tonight. Still haven't received the TDA1543's, so unless I do some creative hacking with the Swinsid code, I won't be hearing any sound just yet.

Pause for one week


Can someone please hit the pause button for, say, one week?

I really have to focus on my part for the C64 demo now. All other projects are put on hold, despite the fact that I received my video chip crystals and an Altera FPGA programmer in the mail the other day. And a lot of other components are also expected in the mail the next few days, so I'll have to stay strong.

The party I'm attending is Kindergarden 2011, and I'll be coding a (hopefully) spectacular shaded twistscroller on the C64. I'll really have to punish that 6502 and the VIC in order to get it done.

A lot of work still remains, and I guess that I will be coding on this party as well, just like every year before. And, hey, to top it all we're starting moving into the new house this week too. My precious evenings are shortened even more.

I'll let you know how it went next week.

Breadboard SID player (part deux)


I should be kept on a leash for my own safety, because I'm apparently quite stupid. I intentionally chose to avoid using RAM in this project, because I wanted a minimalist design with less wires, thus easier to debug. I also thought that the 6502 would work fine without RAM (which it theoretically does) since all the code is in ROM.

Guess what the first thing I do in my ROM code? Why, JSR to $E000, naturally, where the SID player is initialized. This instruction pushes the caller's address to the stack which is in... ah yes, RAM. Since this failed, the CPU could never return properly from the RTS and went into a very unpredictable state where it eventually got stuck.

Last night I started wiring up everything from scratch, this time with the complete quartet; RAM, ROM, SID and CPU. I'll try again and will let you know how it turns out this time.

Unless I'm choking on my leash, of course.

Breadboard SID player


Just a quick update for you all here. As you may remember, I will be using the 6581 SID emulator by Swinkels for my 6502 computer project. Yes, it's final now, my weak spot for the 6581 is just too.. darn.. weak.

But, before I begin experimenting with the Swinsid, I wanted to make sure that the real 6581 works with the circuit first, since they both are (ideally) pin-to-pin compatible. Here is last night's crochet work on the breadboard:

SID player

Top left corner: R6502, EPROM right next to it, under all the wires.
The SID chip is the one with the heat sinks.

This system obviously lacks the $d012 register, so syncing the tune was solved by looping through enough NOPs to waste approximately 50ms between each call to the SID player.

Unfortunately, though, I didn't have the time to finish it -- but I will get it up and running today. As far as I can tell, the only thing left is to add an op-amp to amplify the audio signal. Curious me had to try it yesterday, and I did see some activity on the audio line....

So, if this works fine, I'll continue with testing the Swinsid on an ATmega128. Not really sure if that will work, and if it doesn't I won't waste any more time on it and just buy the chips it was designed for. If it does work, I will try to eliminate the TDA1543 and rather use my own ADC.

Let's hope that little speaker will shake vigorously tonight.

Add to Google