S100 Computers

Home S-100 Boards History New Boards Software Boards For Sale
Forum Other Web Sites News Index    

An MSX Style VDP S-100 Video Board.  
  VDP Board (Final)

Introduction
In 1982 Microsoft, working with a group called ASCII Corp. of Japan (headed up by a Mr. Kazuhiko Nishi), developed a new hardware and software standard which Microsoft called MSX for a soon to be announced 8-bit home computer.  Microsoft, taking a cue from IBM and it’s “standardized PC,” saw a need for a standard as an opportunity to wipe out the competition. Microsoft convinced some of Japan’s largest consumer electronics and computer manufacturers (Sony, Toshiba, Pioneer, Hitachi, and Yamaha) to license its technology to build MSX machines.   This was a time when Commodore, Atari, Mattel, Coleco and Radio Shack, even Apple, were flooding the US market with cheap 8 bit home computers.

The MSX standard was built around an 4Mhz, 8-bit Z80A CPU, and included other popular, and cheap components. In particular the Texas Instruments TMS9918A video chip and the General Instruments AY-3-8910 programmable sound chip. Standard configurations included 16K, 32K or 64K of RAM, BASIC and a BIOS in 32K of ROM, along with 16K of video RAM. All systems had a version of BASIC, MSX BASIC, which was quite good  allowing easy programming access to the computer’s sound and video capabilities.

However the systems were cassette and cartridge based to load programs. Once the IBM-PC disk based systems caught hold these MSX based systems lost momentum in the US.  In Japan and Europe however they developed a loyal following and support.  Indeed  a 16-bit the MSX II (1985) and MSX II-Turbo (1988) standard was announced. 

In 2001, Kazuhiko Nishi initiated a 'MSX Revival'  around an official MSX emulator called MSXPLAYer. This was claimed to be the only official MSX emulator at the time. All MSX copyrights are maintained by a group called the MSX Association. I seems to have gone a number or rearrangements and owners.

Today the main difference between the MSX and its contemporary counterparts is the presence of a very well-developed hardware abstraction layer implemented as the MSX-BIOS.  This BIOS is structured to provide device independence and instant plug & play with zero user intervention to use the system.

A number of early Z80 based video games first originated in these MSX systems.   For many it was their first exposure to computer programming.  A number of people suggested we do a S-100 video and sound board to allow these programs to run is an S-100  system.

Overview
The V9938 Video Chip

The S-100 VDP will contain all the circuitry necessary to generate tan MSX style video display. It appears to the S-100 bus Z80 as two I/O ports called the Data Port and the Command Port. Although the VDP has its own 16 KB of VRAM (Video RAM), the contents of which define the screen image, this cannot be directly accessed by the Z80. Instead it must use the two I/O ports to modify the VRAM and to set the various VDP operating conditions. The VDP video chip we use is the Yamaha V9938 chip. It is similar to the Texas Instruments TMS9918A chip. The screen has 16 colors, and four screen modes. The resolution is always 256 x 192.  It also has a sprite system which can control 32 sprites, with a maximum of four sprites on a single horizontal line.   The I/O ports that address the chip on this board are completely configurable. I use the following I/O ports to communicate with the VDP.
 
Port # Read/Write Description
98H W Data Write
99H W Command Write
98H R Data Read
99H R Command Read

Please note the 64 pins on the V9938 have a 0.75" spacing. The chip requires an uncommon 64 pin socket.  Fortunately Digi-Key sells these sockets (#LA10242).

The V9938 video chip is capable of displaying in a number of graphic or text based modes.  The maximum text mode is 80/24 lines.
 
Video example

Programming the chip is a complex process. The V9938 programmers manual which can be obtained here, will require many hours of studying.

The V9938 (and this board), can directly drive a Composite Video monitor, but more normally we use its output to drive a RAMDAC to produce EGA style video displays.  For this we use Bt478  RAMDAC.  This chip has a 256 X 24 color lookup table with triple 8 bit video D/A converters.  Further information about this chip can be obtained here.

The board also contains an AY-3-8910/8912 Programmable Sound Generator (PSG) chip. This is an LSI chip that can produce a wide variety of complex sounds under software control. Its operation requires only a single 5V power supply, a TTL compatible clock, and a microprocessor controller. Its flexibility makes it useful in applications such as music synthesis, sound effects generation, audible alarms, tone signaling and FSK modems. The analog sound outputs can each provide 4 bits of logarithmic digital to analog conversion, greatly enhancing the dynamic range of the sounds produced.

The AY-3-8910 has two general purpose 8-bit I/O ports and is supplied in a 40 lead package. The I/O ports that address the chip on this board are completely configurable. I use the following I/O ports to communicate with the AY-3-8910.
    
Port # Read/Write Description
48H W Data Write
49H W Latch Address
48H R Unused
49H R Data Read

The AY-3-8910 datasheet and manual which can be obtained here, will also require quite a few hours of studying to get the chip working correctly.

The initial prototype board can be seen here:-
 
Prototype Board 1
Much of the initial work on this board was done with Leon Byles.  The schematic for this board can be found here.   We ran into a number of difficulties with the initial layout design.   While the V9938 chip I/O behaves in a traditional "Intel" style,  the AY-3-8910 chip did  not.  Presumably because of its General Instrument/Honeywell CP1600 CPU family based heritage, the chip data lines became active at times when they should not and conflicted with the V9938 on the boards bidirectional data bus.  The board had to be modified as shown here:-
  
  AY_Schematic
      
For the next prototype board (see below) the V9938 and AY-3-8910 are completely separate on the board and interact free of each other and directly with the S-100 bus.

In contrast the V9938 interfaces with the S-100 bus in a typical manner:-
    
  V9938 Schematic

This chip utilizes 16K of DRAM on board (4X D41464's).  Unfortunately there was also an error in interfacing the chip with the RAMDEC.  Because of the way the V9938 and Bt478 define the MSB and LSB the data lines were inverted.  This lead unfortunately to quite a bit of hacking of the board. 

A final complication was that the Composite video signal circuit had to be modified slightly.  Here is a simple example of the boards composite video output.  You can see that the txt and graphics is duplicated around the middle of the screen.  I do not understand why.
   
  VDP Board Comp Output
   
The very simple demo software to activate the video board and sound chips can be obtained here:-

V9938 Demo.pdf
V9938 Demo.zip
AY Demo.pdf
AY Demo.zip

A Second VDP Prototype Board
A second prototype board was made. In this prototype board the data lines to the sound and video sections were completely separate with their own buffers. 
Here is a picture of this board:-
  
  V2 VDP
    
Here is the S-100 bus buffer interface:-
  
  V2 Buffers
    
V2 Sound Circuit
Because of the strange way the AY-3-8910 sound chip interfaces to (any) bus,  both the data in and data out bus lines need to be latched (U31 & U32) using 74LS 374's.
Using ports 48H and 49H the small demo program (here) can be used to show how the chip can be programmed to make different sounds.    I have not spent a lot of time understanding how to program this chip. It's not easy, to generate music etc. will require considerable learning if you are starting from scratch.  That said, the chip is an extremely powerful sound generator. 

The dual channel outputs from the chip (socket U17 or P3) are sufficient to drive a headphone but not speakers. I devised the following amplifier (shown in the above prototype board patch area) which will be incorporated in the next version of the board).
 
  VDP Speaker Circuit
 
V2 Video Circuit
Getting the V9938 video chip to display MSX compatible video on the other hand was not as easy. The V9938 contains over 40 registers which have numerous configuration bits which must be set just to get a simple display.  As I played around with the chip it became clear that the slow HSync output will never be able to drive a typical PC/VGA LCD monitor.  You will have to use a RGB to VGA converter. Fortunately there are many.  Here is a picture of my current setup.  It uses a GBS-8200 CGA/EGA/YUV TO VGA currently available on eBay here
Here is a picture of the setup and display.
 
  40X24 Display
   
 

Thanks to help from "flyguille" on the MSX.org forum,  I have now gotten this board to work in 80X24 (TEXT 2) display mode.
Will update software etc. soon,  but here is an example:-
 
  80X24 Display Mode



The software for this board is currently still being written. 
Below is an interim version.  There are a number of bugs. First to get a 80X24 display you need to initialize with a 40X24 display (see code in the .zip file below). Then if you load the 80X24 mode version, things are correct. Clearly still some register(s) not setup correctly.

A Third VDP Prototype Board
A third prototype board was made. In this prototype board the data lines to the sound and video sections are still  completely separate with their own buffers. 
Here is a picture of this board:-
    
  V3 VDP Board
  
You will notice we no longer utilize the BT478 RAMDAC.  Instead we run the Horz. & Vert. Sync lines and the Red, Green & Blue lines directly to an external RGB to VGA converter.   As best I can tell most LCD displays will not work directly with the 15 MHz signal the VDP board (actually the V9938 chip)  puts out.  We need a "RGB to VGA converter adaptor" that will take these low frequencies and upgrade them (about 2X) to the VGA frequencies.  There are several such converters available on the Web.   I am currently using this one:-

http://www.amazon.com/Arcade-Video-Converter-Board-Output/dp/B005G8KSP8

  RGB Converter
 
The other option would be to work with the older CRT’s though these are getting hard to find these days.  

Using directly the V9938 chip output pins, CYSNC, HSYNC, ROJO, VERDE, AZUL (pins 6, 5, 21, 22 & 23),  via a 2N3904 transistor in each case as inputs to the RGB converter we a very stable output signal.    Here is the relevant circuit:-
 
  
  RGB Circuit

Here is a picture of an 80  X 24 line text mode display. 
   
  80 X 24 Text Mode 2
 
One problem remains, I have not figured out how to get characters with decenders to display properly for letters like "y", "q", "g". 
Clearly this board now needs some serious software input starting with things like a simple TTY terminal etc.

I have written two very basic programs to test out the board.
AY.COM just issues two different sounds from the AY-3-8910 chip. This should allow you to test the  chip, and the Op Amps.
HW9938.COM allows you to enter text on the screen in 80 X 24 character mode.  Note there are no routines for CR, LF, scroll etc.

Both programs can be downloaded from here

Step By Step Building the VDP Video Board.
As always, first examine the bare board carefully for scratches or damaged traces, use a magnifying glass if need be. Unfortunately there are three minor layout problems with the board. The trace near one of the pins to the Pot 10K1 was too close to its plated through via and fused with it during board fabrication.  I noticed this when I assembled the board, but it is easier to correct it on the bare board.  To do so,  cut the trace both sides of the via. Scrape the solder mask off the thin tracks and solder a small wire to bypass the via.  Here is a picture of how it should look:-
   
  Patch 1
  
I use one or two stands of hookup wire, touch one exposed trace with solder, then the other, then cut the excess wire.  Check there is an electrical connection between pin 3 of P3 and the right most pin or the 10K1 Pot.

Second, the ground lines for both OpAmps circuits (U34 & U35) are floating. They need to be connected to the whole boards ground line.  This is easily done by scraping off a little of the solder mask on the back of the board and using a small solder bridge (I use a seed of a small piece of wire).   Here is a picture:-
      
  Ground Patch

These changes should actually be made after the board is assembled.  Fortunately the is a large ground fill on the back of the board, so any point can be used.  Other than the board is fine.

Let's get started...

I find it useful to carefully slide a file at 45 degrees along the edges (front & back) of the S100 connector at the bottom of the board for easier insertion of the board  into the bus. Carefully, just one or two strokes.
   
Next solder in all the required IC sockets, resistors, resistor arrays, capacitors, jumpers, the 21.47727 MHz crystal and the voltage regulator.  Do not add the LED's  yet. Be sure you put the resistor array in with the correct orientation of pin 1. Check their values before  soldering (they are difficult to remove). 
  
For this board there are no traces under the LM323K 5V regulator heat sink so a mica insulator is not required but always a good thing to add.  Be sure to test your TO-3 regulator for 5 volts before adding it to the board, there are many out of specs out there -- particular on eBay. Anchor Electronics has reliable ones I know - I use them.
  
For prototype boards I generally use "double swipe" IC sockets. For a critical board like this I prefer to use "Machine Tooled" IC sockets.  However they are more expensive and you have to be particularly careful not to bend the IC pins.  The V9938 chip socket is hard to find. I got mine from ( a great source of IC sockets) King-Cart (#HW4643). 
 
Next insert the 3 LED's. Before soldering them in place ground the appropriate pin on the U11 & U21 socket to make sure it lights up.   I use red  for the AY3 chip select, yellow for interrupts, and green for the V9938 chip select.    Keep in mind these LED's do not have 74LS123 style pulse stretcher that some of our other S100 boards have, so the LEDs will only light up with repeated CPU access to the board ports (or a diagnostic test loop).  Here is a picture of the board at this stage:-
   
  Initial Board

Check the voltage to sockets on the board is above 5V by placing the board in your S-100 system using an extender board. With no load you will typically get 5.00V  (+/- 0.25V).  BTW, your system should boot and run correctly with its Z80 master CPU board. If not, you have a serious solder bridge somewhere on the board.  Before you do anything else with a magnifying glass go over every socket on the board and examine for a proper solder joint. I like to "reheat" each joint just to be on the safe side. The silk screen/varnish on these boards us quite thick. It's easy not to have a good solder joint for the ground pins.  Double check.   Extra time here will save you hours later, (been there done that! ).    

We normally build these S100 boards up in functional steps, we will start with the sound circuit. 
Insert U3, U2, U22 and jumper K5 connecting pins 1-2. Insert the three dip switches.   For MSX compatibility we will use ports 90H-9FH (video) and 48H & 49H (sound).

Switch settings (left to right) are:-
SW1  Closed,closed,closed,closed,open,closed, closed, open.
SW2  All closed.
SW3  Closed,closed,closed,open,closed, closed,open, closed.

Next insert U24, U31, U32, U6, U29, U5 and U11.
Insert U33, U4 and U8.
Insert the board into your S100 system and confirm you get a low to high pulse when you input from I/O port 48H with your monitor.

Add U10, U34, U35 and if you are using them the two board speakers.
Jumper P1 1-2 and 3-4 (both vertical).
Add U18, U19 and U30. 
Next carefully add U12 (the U9938), take care the pins are fragile and hard to align with the socket.
Next add all remaining chips including the 4 RAM chips.

This is how the board should look:-
  VDP Board (Final)
     

Test the board for sound with the very basic (two tones), use the AY-DEMO.COM CPM  program (see below).
Test the board video circuit use the very basic VDP.COM CPM program (see below).

I am still looking around for two small speakers to fit on the board.  (If somebody locates one please let me know). Currently I'm using two 8 Ohm 10 mm round circuit board speakers from DigiKey (102-2493-ND).  However they are really too small and barely audible.  This can be fixed by adding a 10K ohm resistor across the speaker terminals on the back of the board .


You are now ready to write software for this board!

A Production S-100 Board
Realizing that a number of people might want to utilize a board like this together with a group of people on the  Google Groups S100Computers Forum, "group purchases" are made from time to time.  Contact and join the group if you would like to be involved in this project.  Please see here for more information.

The links below will contain the most recent schematic of this board.
Note, it may change over time and some IC part or pin numbers may not correlate exactly with the text in the article above.

MOST CURRENT VDP VIDEO BOARD SCHEMATIC 
(V5   11/12/2014)
MOST CURRENT VDP VIDEO BOARD LAYOUT 
(V5,   11/12/2014)
Most current KiCAD files for this board    (VDP V5 Board KiCAD.zip    11/12/2014)
VDP VIDEO BOARD BOM            (Supplied by Jordi Solis   V4/5   11/12/2014)


Other pages describing my S-100 hardware and software.
Please click here to continue...

This page was last modified on 12/03/2021