XGameStation Game Console Starter Kit 2.0, Lesson 6
This set of labs represents the “front nine” of the XGameStation Game Console Starter Kit. I’ve looked ahead a bit, though, and it’s also fair to say that this is the penultimate lesson on hardware. Lessons 8 and 9 are about prototyping the entire console on a breadboard and assembling the PCB. Lessons 10-12 are on programming for the console. While I do look forward to learning more about coding from the Parallax SX28, as I have wanted to do more embedded systems programming in my spare time, I can’t help but feel that much is missing. There’s a 30-pin expansion header, and no lab that will cover it. I also find it sad that, despite how the lesson slides allude to cartridge-based systems, boot code to load and copy cartridges, etc, that the XGS Pico seems to not have the necessary hardware for it. That is, the XGS Pico appears to require reprogramming to change games. What’s more, the kit ships with a copy of “The Black Art of Video Game Console Design” which was written for and about the XGS Micro, which seems to include a lot of very interesting hardware (like a keyboard), making me feel like I’m not getting the full experience.
Anyway…none of this makes the kit bad. It does, however. Having missed opportunities to teach more doesn’t mean it’s failing to teach.
Lesson 6 is basically all about audio. The three labs deal with making sound first through the old school methods of an oscillator and frequency divider and then with software synthesis techniques– pulse width modulation and pulse code modulation. I actually put off this lesson for a little while because I wanted to buy a second breadboard to put the basic synthesizer on. After placing my SX, I wanted to keep it there, and the first lab requires removing it. A minor frustration, sure, but not insurmountable. If nothing else, it’s good practice for wiring up the SX in a jiffy.
In working on this lab project, I encountered a familiar problem with this kit– the labs are clear and straightforward but lack information that would be invaluable when troubleshooting. In this case, when I first pressed a button, the speaker would “POP” but not make any apparent sound. As I don’t own an oscilloscope and signals in the kilohertz range are too fast to see on a multimeter, I fumbled with some extra capacitors and made the 555 timer IC output a much slower (~1Hz) signal, then replaced the speaker with some LEDs and confirmed each button was providing a correct division of the source signal. Once I knew that the circuit worked, I suspected the speaker, and I found that the tin on the wires (to prevent fraying) looked a little suspect and didn’t seem to fit in the breadboard well. So, I clipped the ends off and used some alligator clips to attach the speaker to some new leads. Pressing a button then gave different faint, almost inaudible buzzes. I still suspect the circuit needs an amplifier in there somewhere, but I’m not trained enough to know.
The next lab features the Parallax SX28 again. In this case, you’re working with Pulse Width Modulation (PWM) audio. I may state this somewhat incorrectly, but essentially, the microcontroller can send square wave pulses of different widths, and as they go through a specially designed RC circuit before reaching the speaker, you gen non-square-wave sounds coming out. It’s neat, though a touch limited, of course. I found that this lab went off without a hitch, and I actually had a great deal of fun playing around with the sample code to generate sounds.
Finally, we come to the PCM audio lab. PCM audio is the kit’s first treatment of an D/A converter. That is, it’s a means of taking a number of digital outputs and converting them into a single analog value. This is, of course, pretty critical in generating stuff like audio and video. The lab itself has an ingenious presentation, offering you the chance to record some audio on your personal computer and play it back in 4-bit PCM on your nascent game console hobby kit. To do this, you first record some audio using a special tool on your PC, then run it through a program provided by the kit’s creator. This generates assembly code that can be programmed onto your SX. I didn’t get the results I expected…the output audio was completely different from the input. I suspect this may be my own fault, however, as I used a different version of the sound recording tool or perhaps just saved my file at the wrong sampling rate or something similar. The lab does come with a ready-made program that contains recorded sound, but I didn’t think to try that until I was at work the next day. My hat is at least off the the authors on including that program, though, as that’s a level of troubleshooting support that the rest of the projects should be at.








