Multimedia expansion card for 6507 SBC

Tags

, , , , ,

Introduction

I`ve decided to make a multimedia expansion card for my 6507 SBC. The card upgrades the system with TMS9118 Video Display Processor and also gives the computer sound capabilities thanks to Philips SAA1099 Programmable Sound Generator. The finished expansion card looks like this:

fullview

The card consists of the following key components and subsystems (presented from top to bottom and from left to right) :

  • Popular CP1202 based USB to UART converter, used to download code to the computer`s RAM memory
  • 21.47727Mhz crystal + Attiny24A forms a 10.738635MHz clock source required by TMS9118
  • USB power connector for powering up optional AV2HDMI converter
  • 3x RCA sockets for composite video output and stereo audio output
  • Expansion bus connector directly pluggable to 6507 SBC
  • TMS9118 VDP and 2x TMS44C256-10N DRAM ICs
  • SAA1099 PSG with 8Mhz crystal generator
  • Audio output filter circuit, PAM8403 amplifier module
  • Stereo speakers

Regarding device addressing, the onboard 74HCT138 decoder nicely places the VDP and PSG in available memory space of 6507 SBC system:

  • 0f601h: TMS9118 MODE1 (write to video register)
  • 0f600h: TMS9118 MODE0 (write to VRAM)
  • 0f608h: SAA1099 write register data
  • 0f609h: SAA1099 register select

Remarks about the design

Why I went for TMS9118 instead of much more popular TMS9918 ? The answer is simple – less chip count in final product.

TMS9118 and rest of the same VDP family uses a 10.738635MHz crystal to generate internal timings. This crystal value is nearly unobtainable anywhere. The easiest option was to buy much widely available 21.47727Mhz crystal, generate a clock signal with it and divide it by two. I`ve implemented the clock circuity with Attiny24A microcontroller, who has just one thing to do: output f/2 signal on pin PA6. If one could get a proper  10.738635MHz crystal, the Attiny24A would be unnecessary.

I`ve decided to include an USB socket to provide power for optional cheap chinese AV2HDMI converter. This eliminates the need for separate power supply for the converter.

Next to the bus connector, I`ve added a goldpin terminal for easy access to UART signals from the 6507 SBC board. This could be useful for taking the advantage of INT signal generated by VDP (a pin is provided on the board). 6507 does not have any physical INT pin, but it might be possible to check the INT signal by pooling.

As for the DRAM selection: TMS9118 requires 2x 4416 chips. However I had a lot of 44256 laying around and I decided to use them instead of 4416. 44256 is a much more common chip, used for example in old PC VGA cards.

SAA1099 circuit and output filters are taken directly from SAM Coupe design. Just for convenience I`ve added a stereo speaker set along with PAM8403 amplifier module, so I can work with sound generation without a need of connecting actual TV or external amplifier.

Prototyping, testing and PCB production.

Below are photos of the prototype set that I was using during the development:

testing1testing2

During the initial tests I was using a 10.752MHz crystal, which value was close enough to generate a more or less stable video signal, but only in black and white.

While trying to make the VDP display anything on the screen I identified a mistake on the original 6507 SBC board design. The expansion bus should include the /RESET signal. Due to my mistake, I`ve routed wrong (active high) RESET signal to the bus pin. Now I had to correct this by cutting a track and routing  the proper signal with a thin wire on the bottom side of the board.

The documentation I used during the prototyping was the “Video Display Processors Programmer`s guide” by Texas Instruments. ( available at https://hansotten.file-hunter.com/uploads/files/Video%20Display%20Processors%20-%20Programmer%27s%20Guide.pdf )

And also a very nice `82 Byte Magazine article  about Apple II sprite card featuring TMS9918:

http://www.classiccmp.org/cini/pdf/byte/Hi-Res%20Graphics%20TMS9918%20BYTE%200882.pdf.pdf

One of the most confusing things about TMS9xxx series (and TI processors as well)  is that Texas Instruments for whatever reason, decided to use a reverse signal  numbering of data and address buses. Please be aware of it before you start prototyping, otherwise you will loose a lot of time …

The PCB was designed in an old version of Cadsoft Eagle. I etched the board using photoresistive process for the very first time, and the results was indeed great, much better and cleaner than thermotransfer method.  Below are  the circuit schematics and PCB layout design in PDF formats:

Multimedia Board_sch

Multimedia Board

If you need original Eagle files – please contact me.

Final notes

Below you can see the complete set running a video mode 1 demo with moving sprites and sound:

featured

A short YouTube video to illustrate the program:

I`m attaching two simple programs (source, binary and listings ) used for testing the textmode and video mode 1 :

https://drive.google.com/file/d/1yH641DXja2Wo-c1EcIkZN514uKalrf8V/view?usp=sharing

I`m very happy with the build. Thanks to multimedia functionality, the expansion card takes the 6507 SBC project to a whole new level. Though the tile/sprite based programming concept of the VDP is not easy for me at the moment, I`ll try to implement some simple game for the system in near future.