Vector / Oscilloscope / CRT Display ––––––––––––––––––––––––––––––––––– unscaled display area: 255 x 255 pixel (-127 … +127) maximum display area: 1k x 1k (10 bit DACs) ram for drawing commands: 8k x 16 bit (shared memory with host) drawing speed: 6,000,000 pixel/s (raw speed, may vary) 60,000 lines/s (approximately) The vector drawing display is split into two logical parts: The computer (maybe a terminal) which stores data in a video ram and the CRTC which reads data from the video ram and draws the frames. Writing to and reading from the video ram is asynchronous. The image can be scaled, distorted and rotated in hardware. The display has 255 x 255 'pixels'. HW and SW scaling can be used to achieve 2x or 4x resolution. CRTC –––– The drawing engine reads drawing commands from the video ram and draws lines at a fixed speed. Drawing speed: (estimation) The drawing engine CRTC is clocked at 6 MHz. Raw drawing speed is 1 pixel every 1 clock cycles (6,000,000 pixels per second). Each ram (2 bytes) read takes 6 clock cycles. This results in approx. 60,000 lines per second or 1,000 lines per frame of 1/60 second. As the drawing engine draws _pixels_ at a fixed speed, the number of lines per second decreases with higher HW resolution. Registers: Host-accessible registers are used to set HW scaling and the start address of a frame. The four 1-bit flags are part of each drawing 'control' command. Width After Host Name [bits] reset r/w Description ––––––––– ––––––– ––––––––––– ––––––– –––––––––––––––––––––––––––––– a,b,c,d 8 x 4 undefined -/w HW scaling (transformation) A 13 undefined -/w address register (program counter) RR 13 x 2 undefined -/- return stack (2 levels) X, Y 10 x 2 undefined -/- beam position (DAC input values) xx, yy 2 x 2 0, 0 -/- SW scaling (width and height) R 1 0 -/- addressing mode (0=absolute / 1=relative) C 1 0 -/- cathode ray beam enable I 1 0 -/- interrupt enable E 1 0 -/- clock enable Register 'E': Clock enable This bit can only be cleared in control commands. All control commands must set this bit to 1. If a control command clears this bit, then the CRTC clock is stopped and, depending on the setting of bit 'I' in the same command, an interrupt is generated. The only time stopping the clock is desired is at the end of a frame. Then a NOP with E=0 is executed, which is called 'end of frame'. Register 'I': 'end of frame' interrupt enable This bit can only be set in control commands. Some commands change this bit accidentially. It only takes effect if a command also stops the CRTC clock, which is done at the end of a frame: If the clock is stopped and bit 'I' is set, then the CRTC issues an interrupt. The interrupt will persist until the CRTC clock is restarted by writing a starting address into register 'A'. Register 'C': Cathode ray beam enable This bit is set by all line drawing commands, and it can only be cleared in control commands. Bit 'C' switches the cathode ray beam on or off for the _next_ command. Normally line drawing commands draw lines. But if a line drawing command is prefixed with a NOP (or other control command) which switches off the beam, then it will only move the current drawing position. Register 'R': Addressing mode This bit can only be set in control commands. Coordinates (dx,dy) in all following line drawing commands are 'absolute' (R=0) or 'relative' (R=1). Register xx and yy: Software scaling These bits can only be set in a special control command. Software scaling can be programmed separately for width and height. SW scaling can be used to compensate HW scaling and, starting from the HW zoom factor, to draw at a higher resolution or to draw enlarged symbols and letters. Coordinates (dx,dy) in all following line drawing commands are scaled to (dx<