Table of Contents
ECB Sprite Color Graphics
Video Display Interface Board
The Sprite Color Graphics (SCG) board provides Sprite and Color Graphics from the TMS9918 Video Display Processor and sound from the AY-3-8910 Programmable Sound Generator chip. It is meant as a supplemental display for games and multimedia presentation. The board supports two joysticks and paddles.
Current Version: “002”
Manufacturing Files: :boards:ecb:scg:sgc-002_gerbers.zip
For information on prior board versions, see the Legacy Wiki SCG Folder.
The TMS9918 is an NTSC format chip. A PAL version of this chip is available (TMS9928A) but it is not totally compatible per the following from the datasheet.
“The TMS9928A/9929A VDP's are functionally identical to the TMS9918A except that the NTSC color encoding circuitry has been removed and replaced with luminance and color difference signals. The TMS9918A is pin-for pin compatible with the TMS9928A/9929A, except for three pins, the composite vide output, the external video input and the CPU clock output. These pins are replaced with the Black,White luminance and composite sync (Y) output and two color difference pins, Blue (B-Y), and Red (R-Y) outputs, respectively. The color difference outputs allow the user to generate Red-Green-Blue (R-G-B) drive for direct color gun control, or composite video for use with NTSC or PAL video color monitor. However, to connect these three outputs to R-G-B or monitor requires additional R-G-B or encoder circuity”
So maybe that is something for the next iteration…
A 2Mhz crystal is specified for the sound chip clock but on board dividers can be configured to use a higher frequency crystal. Also common serial and colour burst frequency crystals can be used depending on your need for frequency accuracy and compatibility.
Low cost LM386 based amplifier boards can be use to finalize the sound output and can be found very cheaply on alibaba.com.
Capacitors C7 and C45 are not critical values and 33uF or 47uF should work as well.
- Earlier runs of this board required a patch for sound to work. This patch is documented in the Legacy Wiki SCG Folder.
- Install either Q3 or P2, but not both. These are mutually exclusive options for the video amplifier circuit.
- Crystal X2 must be parallel resonant.
- The TMS9918 video controller is sensitive to CPU clock speeds. In general, I have found all software posted here to function well at 4MHz. Higher CPU speeds may or may not work.
- Joystick interface is digital. The up, down, left, right, and button switches should be normally open and shorted to ground to activate. An Atari 2600 joystick can be readily adapted. PC-style game controllers use potentiometers for up/down and left/right and are therefore not appropriate.
- Per John Coffman, the I/O select circuit on this board is qualified only by IORQ# (low). It should be further qualified by M1# (high). The board will erroneously select on an Interrupt Acknowledge (IORQ# low, M1# low).
- Proposed circuit board version 003 (untested):
- version 003 boards have been manufactured and are listed in the board inventory page.
- To update version 002 board (untested):
- Cut track between pin 13 and pin 14 on IC U10.
- Link pin A20 on ECB connector to pin 13 on IC U10.
J20: Board ID / Base I/O Address
1-2: 0x80 * 3-4: 0x40 * 5-6: 0x20 7-8: 0x10 9-10: 0x08
The base i/o address is determined by shorting the pins listed above such that the additive value of the unshorted pins is equal to the desired address. So, for the default base port address of 0x98, you would short pins 3-4 and 5-6. Pins 1-2, 7-8, and 9-10 would remain open.
J5: Sound Config
1-2: All channels merged onto channel C 3-4: All channels merged onto channel A
The sound chip drives a total of three audio channels (A-C). The center channel (B) is hard-wired to mix it's output into channels A & C (left & right). If you want to bridge all three channels to produce monophonic output, you can short pins 1-2 and/or 3-4.
5-7: Audio Oscillator / 8 7-9: Audio Oscillator / 2 * 6-8: Audio Oscillator 8-10: Audio Oscillator / 4
You must short one (and only one) set of pins above. These pins allow scaling the audio chip oscillator input. The default configuration is no scaling with an osciallator frequency of 2.0MHz which is the maximum frequency allowed by the AT-3-8910 chip.
JP1: TEST2 Enable
Shorting 1-2 will ground the TEST2 pin of the sound controller, otherwise the pin will be disconnected. You would normally leave this jumper open. Refer to AY-3-8910 datasheet.
J21: Interrupt Enable
Shorting J21 will enable vertical blanking interrupts to the /INT line of the host CPU. You would generally leave this jumper open unless the software being used needs it. Note that the MSX software requires this jumper to be shorted.
J1: Video Output
1: External VDP Input 2: External VDP Input Sync Input 3: Color Burst Freq Clock Output 4: /SYNTMS??? 5: Composite Video Output 6: +5V 7: Ground 8: Composite Video Output (amplified) 9: Ground 10: Composite Video Output (amplified)
J18: Joystick A
1: Up 2: Button 1 3: Down 4: +5V 5: Left 6: Ground 7: Right 8: Botton 3 9: Button 2 10: +5V
J19: Joystick B
1: Up 2: Button 1 3: Down 4: +5V 5: Left 6: Ground 7: Right 8: Botton 3 9: Button 2 10: +5V
P1: Video Output (RCA)
1: Composite Video Output 2: Ground
J9: Audio Output
1: +5V 2: +5V 3: Right Channel Audio 4: No Connect 5: Ground 6: No Connect 7: Ground 8: ACR5 General Purpose TTL Output 9: Left Channel Audio 10: Ground
RV12: Left Channel Audio Output Volume
RV9: Right Channel Audio Output Volume
Notes on Operation
The SCG board is not intended to be a general purpose terminal controller like the VDU, CVDU, and VGA3 boards. It does not have a keyboard interface and text output is limited to 40 characters per row. So, the typical way to use the board would be to add it to an existing system already running CP/M (RomWBW, UNA, etc.) and then run programs that utilize the graphics and sounds capabilities of the board. The MSX games and programs described below do exactly this. You start your system in normal CP/M, then run the MSX game/program desired.
RomWBW (v2.8.5+) provides support for text output to this board when TMS support is enabled. The board is accessed as the CRT device, so sending output to CRT: will work.
It is not possible to read from the CRT: device because the board has no text input capability. It is not necessary to have the TMS driver enabled in RomWBW to launch the MSX software – the MSX emulator below includes it's own driver for the board.
Two programs are available to test basic video operation of the card in the tms9918-test package. Refer to images below.
HW9918.COM will display the “HELLO WORLD” text on the screen.
TSTSPR.COM will display sprites and allow background colour changes.
Sound functionality can be tested with the ay-test package.
AY-TEST.COM will output a descending tone to each sound channel.
Note that the SBCV2 with the SCG card is not 100% MSX compatible. That said, there is enough compatibility and enough flexibility built into the MSX BIOS that some cartridge ROMS will work fairly well. In the zip file there is a selection of MSX cartridge images that do work with the SBCV2 and SCG card, but please make note of the following:
- The MSX computer is clocked from the TMS9918 chip (3.579545MHz) and not a separate oscillator, so timing will be off and this may cause glitches and odd behavior (moon patrol is a good example). The AY-3-8910 has a maximum clock rate of 2Mhz, so the MSX sound chip uses half the clock rate i.e. 1.7897725MHz.
- The Keyboard on the MSX is entirely different from the way the keyboard works on the SBC, and although some work has been done to make the serial keyboard functional, it does not typically work – so a joystick is almost always required
- I have not personally verified all of these images, so if one is found that is supposed to work but does not (or is not supposed to work, but does), please note that on the wiki (or better yet, fix it!!)
- The work done on the SCG MSX CBIOS was really more of a proof of concept – so it is not really “fully baked”, the “Home Computer” aka N8, is in a much better state.
- Note that the Video Interrupt MUST BE ENABLED (J21 shorted) for any of the MSX software to run!!
- There is no mechanism to “return” to CP/M once you have launched an MSX application. You will need to perform a hardware reset.
The AY-3-8910 is a widely supported sound chip and there is a large library of sound files that can be played on this board. Included in ROMWBW is a sound file player called TUNE which can play Protracker 2/3 and .MYM format PSG files. A collection of demonstration files is also included.
|ay-test.zip||6.2 KiB||2017/10/09 14:47|
|ecb_scg-002.zip||137.4 KiB||2017/10/05 22:45|
|scg-002-bom.pdf||383.5 KiB||2017/10/05 22:54|
|scg-002-bom.xlsx||19.8 KiB||2017/10/05 22:45|
|scg-002_board.pdf||4.3 MiB||2017/10/05 22:45|
|scg-002_schematic.pdf||258.4 KiB||2017/10/05 22:45|
|scg-003_gerbers.zip||222.1 KiB||2018/06/26 07:47|
|scg-003_kicad.zip||183.8 KiB||2018/06/26 07:47|
|scgmsxstuff.zip||9.4 MiB||2017/10/07 13:06|
|sgc-002_gerbers.zip||209.1 KiB||2018/06/24 07:52|
|tms9918-test.zip||11.2 KiB||2017/10/08 15:01|