Electronics, coding and hacking. And ADD.

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.

6502 plans revealed


My apologies for not updating the blog as frequently as I once promised to. I'm busy these days as I'm coding a part for a C64 demo, moving to a new house, and taking exams in electronics, in addition to entertaining my wife and kids. So, needless to say, there's not much time to play with the toys. I've been thinking a lot about the 6502 computer, though, and I'm going to let you in on the oh-so-secret plans right away:

CPU and memory: Not surprisingly, it will feature a 6502. More precisely, a Rockwell 6502 CPU accompanied by 32K SRAM and a massive 32K ROM. The ROM will share its address space with the items following.

GPU: I'm planning to do the GPU myself, quite possibly in FPGA, but for now I'll settle with something pre-made. I've ordered a few NOS TMS9928's - old arcade video chips. They have 16K of "internal" RAM and can easily be mapped into the address space without too much hassle, and they also feature multiple screen modes. Yes, even bitmap modes, which make them ideal for my system.

Disk controller and I/O: The disk controller will be performed by an ATmega16 with an SD card interface. That's more than sufficient for this little thing. This controller will also deal with the PS/2 keyboard and RS232 port.

Audio: I'm very inspired by the Micro SwinSID (6581 SID clone), which is based on an overclocked ATmega88. Choosing this approach, and mapping it into the right addresses, I get access to 40K+ SIDs, ready to be played on my system.

Then there's also a CPLD board and programmer on the way from Hong Kong. I think it's time I started learning that stuff, as I've come to the realization that not everything can (or should) be solved using micro controllers. This stuff is reserved for the lazy days, though.

So, those are the plans. Everything will exist in the form of a breadboard project until I get it working just right....

Aiming for the stars.. or satellites..


I'm experiencing an increasing interest in wireless energy and communication, so recently I felt the urge to explore the signals provided from "up there" - satellites. Weather satellites continuously transmit images and weather data via short wave radio. Capturing and decoding a signal is trivial, but the hardware behind it needs a little work.

The satellite NOAA-18 frequents my neighbourhood several times a day, and should be a good candidate for listening. In order to tune in, I need to fix on the 137.9125MHz frequency somehow, for the few minutes it is within my range. The doppler effect also needs to be taken into consideration, but I'll focus on a fixed frequency for now.

Most of the stuff mentioned here are ideas, want-to's, theories and thoughts at the moment, most of which has a very low WAF 1). For example the quadrifilar helicoidal antenna that will decorate our roof top.

If I'm granted the privilege to install all the equipment (which I quite honestly doubt I ever will), the rest is a matter of software development - for example, decoding the satellite image data according to the NOAA APT Frame Format specifications.

And then, who knows, it'd be cool to make a pluggable standalone device with an antenna connector in one end, and a RJ45 (TCP/IP) output in the other, providing live data via an internal web server.

A lot of exciting stuff here, time will show if this will see the day of light or not. But I have my hands on an old satellite receiver already...

1) WAF - Wife Acceptance Factor. Take note of this abbreviation, I'll be using it a lot.

Add to Google