Bride of Son of Cheap Video, appendix: Cheap Video Resurfaces
KK Video Overview
"Cheap Video" basics are explained here.
|Cheap Video is
a means of outputting video without the need for DMA hardware or a
Video Controller chip. The basics of Cheap video are explained on a separate
Briefly, the main difference between KIM-1 and KimKlone video is the
means for triggering the video circuitry.
My KIM-1 uses an ordinary JSR instruction but requires video data to be
held within a special block of addresses;
those addresses trigger the circuit. But the KimKlone lets you keep
video data anywhere, since a
special JSR instruction is what triggers the circuitry.
Specific details of the KK implementation are described below.
The SCAN Instruction
The KK Cheap Video instruction is called K3_SCAN. Its 33h op-code is intercepted and replaced with 20h, the JSR Absolute op-code. The accompanying two-byte operand specifies the destination address, an arbitrary location where pixel data is stored.
The CPU does a jump-to-subroutine to that location and seemingly finds a program of all NOPs. But of course as the CPU bus is getting stuffed with illusory NOPs, the actual memory data is getting copied into a shift register (D15, a 74HC166) and shipped out as video.
Microcode treats each entire scan as a single instruction, temporarily freezing itself as the string of NOPs is produced. Eventually the freeze is lifted by a periodic signal that's generated by a timer in one of the KK's 65C22 multi-function peripheral chips. (The timer runs at the CRT's horizontal scan rate, roughly 16kHz.) An RTS (60h) replaces the final two NOPs of the scan, and the CPU returns from the subroutine.
It's noteworthy that, since K3 is used, the JSR and RTS are "far" operations, meaning that memory anywhere in the 16 MB space can contain the video bitmap. It's easy to switch between multiple bitmaps if you want zero-overhead updates of the entire screen. And a hi-res bitmap could theoretically be allowed to exceed 64K as long as none of the individual scans has to cross a bank boundary.
sends a monochrome, composite video signal to an RCA
output jack. Usually I used a small, modified TV as my monitor. But
there's also an interface for a bitmapped LCD panel I bought on
the surplus market.
Servicing the unserviceable