Galaksija: Fine tuning

05.02.2007 21:19

I've been having a lot of fun recently with Galaksija in the past few days (mostly playing Galaksija's version of Jumping Jack, a simple and addictive game I used to play on Spectrum)

Anyway, here's some details about hardware problems I've had with my redesigned board:


My initial tests of the video part (I tested it separately, with the CPU and other integrated circuits removed from the board) showed that switching transistors that were mixing the video signal with the sync impulses weren't able to switch on and off fast enough to show a clear picture and provide good sync pulses.

My original plans were to use BC547 transistors. These are designed for audio-frequency operation, however SPICE simulations showed that they should be more than fast enough to be used in this way. Unfortunately it turned out that SPICE was awfully wrong this time. I'm not exactly sure why. It could be that either SPICE doesn't take into account base charge storage time in it's bipolar transistor models (unlikely) or that SPICE model parameters for BC547 I got from the manufacturer's web site didn't include this information (i.e. who would be stupid enough to use these transistors in an application where switching times are important).

So the mixing stage now uses 2N2222 switching transistors which work perfectly.


The digital part of the circuit had something like 5 wrong connections. They were mostly because of my sloppiness (three times for example I connected an "active-low" reset signal to the ground instead of Vcc). Fortunately these errors were pretty easy to find with my equipment - a wrong connection in the address decoder for example would be much harder locate without a good digital oscilloscope.


After I fixed these things a picture appeared on the TV screen for the first time. Blurred and flipped, but a picture nonetheless :).

The characters were flipped either because the data lines of the character generator ROM were connected to the shift register in the wrong order or there was a bug in the character generator ROM contents. Since I'm a hardware guy and I tend to blame the software for bad things I would say the second reason is more correct :).

Seriously, the scans of the original Galaksija schematics were a bit ambiguous about how the character ROM is connected to the shift. I assumed that MSB on the ROM gets connected to MSB on the shift register. I should have checked if the ROM contents agree with this assumption, but once I got them I already forgot about this problem. In the end it turned out that the original ROM was programmed to be connected the other way around. Since I didn't want to make a new PCB just because of such a trivial mistake I only reprogrammed the ROM with the bit order reversed.

From the software point of view this fix doesn't break any compatibility with the original Galaksija. The character generator ROM isn't directly accessible to the CPU and the reversed bit order of the ROM contents perfectly compensates for the error on the circuit board. The only problem is that a character ROM from an original Galaksija won't work in my version.


After getting the display to work I focused on the only other peripheral device - the audio cassette interface. The output was working correctly on the first test. The input however had a small problem. The original schematics had an RC high-pass filter on the audio input which I directly copied to my design with any checking. Now it turned out that I should have also double-checked this part of the circuit. The original filter was blocking signals with frequencies lower than around 16kHz which meant that it was blocking practically everything that came from the recorder. A quick replacement of one resistor and one capacitor fixed this.

The audio input still requires a relatively high amplitude of the input signal (something like 2 Vpp from my experience) to work reliably. If I knew that before I would add a small audio amplifier to the board - some devices (for example my laptop) won't produce such high levels on their audio outputs.


I also spent quite some time tinkering with the common-collector video amplifier. The blurry picture on the TV made me think that it didn't have enough bandwidth (although SPICE again showed that the high-frequency limit should be well into 10 MHz range - but I wasn't going to be deceived twice). After spending two nights on figuring this out I finally connected Galaksija to a TV that cost more than 20€... And the picture was crystal clear. It turned out that the fantastic TV I bought on the sale had bandwidth problems, not my video amplifier.


The final thing (which I'm still working on) is the little switched-capacitor voltage inverter that provides a low-noise -5V supply for the video amplifier. I obviously miscalculated something when designing it because its transistors are overheating. So far nothing blew out, but transistors are clearly working outside their safe temperature range. I'm certainly not prepared to unleash another unreliable overheating power supply to the wild (although on the second thought, unreliable overheating power supplies seem to be present in all computers I really like - remember TR4 in spectrum?)

Posted by Tomaž | Categories: Digital

Add a new comment


(No HTML tags allowed. Separate paragraphs with a blank line.)