VDG Tricks

Or How does the APF and NecTrek DO THAT!

The quick answer is that they don't use the SAM (MC6883 Synchronous Address Multiplexer) chip. In the case of the APF, it wasn't out yet.

First lets look at the VDG and SAM as used in the COCO and Dragon computers.

The VDG modes are:

Mode Comment
Internal Text 8x8 characters on an 8x12 space. Green or Orange depending on pallet set.
Inverted Text Same Text with the colours/intensities reversed.
Semigraphics 4 2x2 blocks in black plus one of 8 colors. Size of text block.
External Text Only the Nec Trek uses this mode. 8x12 characters. User Definable.
Inverted Ext. Same text with colours/intensities reversed.
Semigraphics 6 2x3 blocks in black plus one of 4 colors from 2 pallets
In the COCO, Dragon, and APF this mode isn't much used as the text covers 2 of the color selections. The Nec Trek however manages to show the entire set of 8 colours on one screen.
Color Graphics 4 color choices from 1 of 2 pallets. In various resolutions 128x192 being highest.
Raster Graphics 2 color choices from 1 of 2 pallets.In various resolutions 256x192 being highest.

First thing to notice, is that Semigraphics are actually a separate mode from text. They are merged by connecting a ram line to the SG select line. Same deal for Inverted text.

This shows that you can switch modes across the screen.

The SAM Modes:

Semigraphics 8 to 24 are added to the VDG

Strangely, these 'Semigraphics' can change colour per line, AND include sections of Text!? How does that work?

Close inspection of how to implement these modes reveals some interesting truths.

What you do, is set the VDG to Text/Semigraphics mode, then set the SAM to feed it as if it were in Graphics mode.

This works because the VDG actually had no buffer. It requires the Memory Manager (What ever it may be) to feed it.

In Text and Semigraphics modes the VDG signals and expects to see the same 32 bytes (one line of text) 12 times. Once for each scanline of the text mode. With the SAM merrily incrementing through lines of RAM rather than closely following the direction of the VDG, the VDG displays the relevant line of whatever Text or Semigraphics character its fed for that line.

APF M/MP1000 and Imagination Machine

The M/MP1000 Only has 1k of RAM. There is NO WAY that just Text and Semigraphics would have competed with the Atari 2600 (or anything else for that matter).

So they Had to use the most impressive modes, Color Graphics 6 (128x192) and Raster Graphics 6 (256x192). Which would normally require 6K each.

To get around this problem,(Providing 6K of info from 1K of RAM) they set-up there VDG memory management system to use the scratch pad as an offset into the screen RAM + scanline count, to feed the VDG.

This gives the system a virtual programmable graphics system of 32 8x16 characters.

For good measure, they toggle the 6th bit to now set the CSS flag on the VDG. This gives them ALL 8 colors in the Color Graphics mode and 4 in the Raster Graphics mode. With the side effect of changing Inversed characters in text mode to now be Orange/Yellow when the VDG is still in Text/Semigraphics mode.

More Tricks!

Some APF games have a Text Mode display at the top of the screen. On the COCO, Dragon and VZ200 this is imposable.

The APF does this by changing the mode after the last text line they intend to display.

The Graphics Memory Manager, expecting to start at the top of the screen, then starts generating the Graphics characters as if it were. That is, the first line of graphics character pointers is read regardless how many text lines have been displayed already.

Now you might think this would cause a problem when the Graphics reached the bottom of the screen and thought it still had some lines to display, but the VDG will ignore any data after the 192th line, until Vertical Retrace is compleated.

Nec Trek

Arriving Soon.