Tuesday, July 7, 2015

Not Quite Dead

I was feeling a bit defeated yesterday, perhaps a bit too much. I may be down, but I'm not totally out! Without a breakout board, my circuits may be a bit more tedious to make and they will require more care in transport. Nevertheless, I can still make a little noise...

Optimistic Tone

I started with a simple circuit, a 555 timer wired as an astable multivibrator. I am feeding the output into the CART line on the CoCo cartridge port, which is intended for use as an interrupt signal. As such, it is tied to the PIA which drives the FIRQ signal on the 6809. This circuit gives me a new timing source to use for programs on the CoCo!

I configured the 555 circuit to generate a continuous square(-ish) wave at approximately 4800 Hz. This would require quite a bit less service than the ~15.7 KHz Hsync signal provided by the CoCo's video chip, and it would still be fast enough to generate a wide range of useful tones and/or sound effects. To illustrate the point, I have a test program using this time source to service the 1-bit audio output on the CoCo in order to produce a lovely 2400 Hz tone.


Extended Play

So, at least I have the basis for some Retrochallenge play. With the current circuit, I might build a more flexible synthesizer or sound effects generator, or I might even expand to playback of sampled sound through the CoCo's DAC. Perhaps a simple game is in order? The possibilities are endless! There are at least a few possibilities, anyway...

So, what is next for my now improvised Retrochallenge entry? I'm unsure...I guess you'll just have to stay tuned!

Monday, July 6, 2015

Breakout Breakdown

Disaster! My cleverly contrived apparatus to break-out the CoCo cartridge port to a breadboard doesn't work!  In fact, it could even damage the CoCo...

Short Circuit

The apparatus I described in the previous post included a breakout board designed for use with the Raspberry Pi 2. This board includes a 40-pin IDC connector and pins in the footprint of a 40-pin DIP. This seemed to be a perfect match for the 40-pin CoCo cartridge port.

Unfortunately, the designer of the breakout board has "helpfully" used his knowledge of the Raspberry Pi 2 GPIO port in order to tie all of the Ground lines together on the breakout board. This might have only been an avoidable nuisance, but it turns-out that the layout of the pins on the board is such that when adapted to the CoCo cartridge port, +5V power is shorted to ground. The traces responsible for the short are not visible, so I don't think the board can easily be modified. Fortunately, at least I don't seem to have damaged any CoCo in the making of this mess!

Retreat

Time was already a bit short for me this month, as I have plans to be at KansasFest. I'm not sure I have time to order any new parts either. I'm not sure where this leaves me.

Maybe I can come-up with a way to save this project? Or perhaps I can hatch another one? I will have to take some time to consider my options.

Stay tuned...

Friday, July 3, 2015

Holiday Weekend

Well, the Retrochallenge 2015/07 event started a couple of days ago. As usual I'm off to a slow start. This weekend started a day early, giving me a little time to get going on my project. So far I've done very little, but I thought it might be useful to review the outline of the project and discuss some possibilities...

Outline

The point of this project is to exploit some features of the CoCo cartridge port for the potential benefit of game cartridges. Therefore it is reasonable to question what such features are available. This includes interrupt signals, address decoding signals, and audio input.

I have discussed the interrupt-based timing sources available on the CoCo in my other blog posts over the years. The Hsync and Vsync signals are a bit inflexible and difficult to use for audio playback in particular. Vsync is too slow to drive the DAC, and Hsync is much faster than needed -- especially since it connects through the PIA that feeds the IRQ signal on the 6809. The CART line on the CoCo cartridge port is actually tied to the PIA that feeds the FIRQ (i.e. "fast IRQ") signal on the 6809, potentially making it a great candidate for an audio playback timer signal.

The cartridge port provides two separate address decoding signals. One is the standard ROM chip select used to access program code on cartridges. The other is designed for accessing the floppy drive controller hardware. But since a game cartridge typically is used without other cartridges, that signal can be used for whatever purpose a cartridge likes. In particular, it can be used to provide access to other hardware bits that a game might need.

The CoCo cartridge also has a line that can feed an audio signal directly back into the CoCo. This could be used to enable audio generation hardware directly in the cartridge itself.

Apparatus

(Note: the apparatus does not work -- do not attempt to replicate this from the picture!)

Breakout Circuit for CoCo Cartridge Port

The purpose of this experiment is really just "proof of concept", so I won't be bothering for now with building PCBs or any other permanent design artifacts. Instead, I only want to have electrical access to the CoCo cartridge port as a means of interfacing to hand-built circuits on a breadboard.

Some time back another CoCo person produced some simple PCBs that breakout the cartridge port to a 40-pin IDC connector. More recently, the popularity of the Raspberry Pi platform has led to the availability of some small PCBs that adapt between a 40-pin IDC connector and a 40-pin DIP connector compatible with a breadboard. I combined these two items to adapt from the CoCo cartridge port to a solderless breadboard.

I often like to use a "monitor" program plugged into the the cartridge port when doing CoCo development. In order to facilitate that, I have added a "Y cable" to the mix. This should allow me both to use the "monitor" program and to have access to the cartridge port signals for circuit development.

Ideas

If I haven't lost you yet, then I probably don't need to tempt you further! Nevertheless, I will provide a couple of teasers to whet your appetite...

In order to facilitate audio playback on the CoCo, a reasonably paced signal is needed. Use of the FIRQ line is desirable, since that can be the most efficient mechanism for handling high frequency events. The more flexible interrupt and timing mechanisms of the CoCo3 illustrate that a moderately paced FIRQ signal can provide pleasing audio playback. So, a simple idea is to use a simple timer circuit (e.g. a 555 wired as an astable multivibrator) to provide such an FIRQ signal.

A normal CoCo cartridge can provide almost 16Kb of program storage. That may seem like plenty(!), but larger programs can easily consume that with graphics assets, audio samples, map data, and even just program code. One approach to extending available storage is bank switching. This can be done by using the I/O address range in the cartridge to control the bank switching hardware in order to multiplex the ROM address range onto a larger memory.

Adding audio hardware to the CoCo seems like a simple way to extend its gaming capabilities. This may have been expensive in the past, but for today's hobbyist I think this option seems quite reasonable and could make for a very collectible game cartridge. Anyway, I hope to conduct the exercise of building such a circuit as the month progresses.

If I get this far, I may have one more idea that would have seems a bit ahead of it's time when the CoCo was in stores. Still, it might be a cool option in today's market. For now I'll keep this last one under my hat...stay tuned!