MC6883 (74LS783) SAM and MC6847 VDG interaction

Skip to site navigation

The SAM contains circuitry specifically to assist in providing access to memory to the 6847 VDG. By simulating the VDG's memory access pattern in the SAM, only DA0 from the VDG need be connected (state transitions on this line then being enough information to advance the SAM's simulated counter). To do this accurately, the SAM can be told which mode the VDG has been set to. Usually, both chips will be configured to the same mode, but some extra modes can be produced by mismatching their configurations. The SAM data sheet documents some of these extra modes (Semigraphics 8, 12 and 24) but more are available, including some with non-visible bytes on each scanline.

The actual operation of the SAM's video address counter is fully described in the SAM block diagram (figure 4) and following text in the data sheet, but the combined behaviour of the two chips is only explicable when you know that at the end of each scanline, the VDG actually presents several more addresses before the falling edge of HS: ten more in 32-byte video modes, and six more in 16-byte modes.

Here's a trace of the VDG address lines relative to HS for one scanline in a 32-byte mode where you can see 42 addresses presented (41 transitions) before the falling edge of HS:

Image showing VDG signals for one scanline

Thanks to Phill Harvey-Smith for capturing this trace.

Notes

The "X" and "Y" dividers in the data sheet (figure 5) do not exactly correspond to the X-axis and Y-axis on screen.

When the SAM clears bits of its internal VDG counter at the end of a scanline, if the topmost of the cleared bits was HIGH before, clearing it will toggle the next bit in the chain. This is the behaviour that enables the 48-bytes-per-scanline mode.

Updated 24 Jul 2011