CRTC6845
   HOME

TheInfoList



OR:

The Motorola 6845, or MC6845, is a
display controller A video display controller or VDC (also called a display engine or display interface) is an integrated circuit which is the main component in a video-signal generator, a device responsible for the production of a TV video signal in a computing ...
that was widely used in
8-bit computer In computer architecture, 8-bit integers or other data units are those that are 8 bits wide (1 octet). Also, 8-bit central processing unit (CPU) and arithmetic logic unit (ALU) architectures are those that are based on registers or data buses o ...
s during the 1980s. Originally intended for designs based on the
Motorola 6800 The 6800 ("''sixty-eight hundred''") is an 8-bit microprocessor designed and first manufactured by Motorola in 1974. The MC6800 microprocessor was part of the M6800 Microcomputer System (latter dubbed ''68xx'') that also included serial and para ...
CPU and given a related part number, it was more widely used alongside various other processors, and was most commonly found in machines based on the
Zilog Z80 The Z80 is an 8-bit microprocessor introduced by Zilog as the startup company's first product. The Z80 was conceived by Federico Faggin in late 1974 and developed by him and his 11 employees starting in early 1975. The first working samples were ...
and
MOS 6502 The MOS Technology 6502 (typically pronounced "sixty-five-oh-two" or "six-five-oh-two") William Mensch and the moderator both pronounce the 6502 microprocessor as ''"sixty-five-oh-two"''. is an 8-bit microprocessor that was designed by a small te ...
. The 6845 is not an entire display solution on its own; the chip's main function is to properly time access to the display memory, and to calculate the memory address of the next portion to be drawn. Other circuitry in the machine then uses the address provided by the 6845 to fetch the pattern and then draw it. The implementation of that hardware is entirely up to the designer and varied widely among machines. The 6845 is intended for character displays, but could also be used for pixel-based graphics, with some clever programming. Among its better-known uses is the
BBC Micro The British Broadcasting Corporation Microcomputer System, or BBC Micro, is a series of microcomputers and associated peripherals designed and built by Acorn Computers in the 1980s for the BBC Computer Literacy Project. Designed with an emphas ...
,
Amstrad CPC The Amstrad CPC (short for ''Colour Personal Computer'') is a series of 8-bit home computers produced by Amstrad between 1984 and 1990. It was designed to compete in the mid-1980s home computer market dominated by the Commodore 64 and the Si ...
, and
Videx Videx, Inc. is a Corvallis, Oregon manufacturer of computer hardware such as access control products and data collection terminals. Its initial success came with the first release of the $345 Videoterm (80 column) display card in March 19 ...
VideoTerm display cards for the Apple II. It is also part of many early graphics adapter cards for the IBM PC, including the
MDA MDA, mda, or ''variation'', may refer to: Places * Moldova, a country in Europe with the ISO 3166-1 country code MDA Politics * Meghalaya Democratic Alliance (2018), ruling coalition government in the Indian State of Meghalaya led by National Pe ...
,
Hercules Graphics Card The Hercules Graphics Card (HGC) is a computer graphics controller made by Hercules Computer Technology, Inc. that combines IBM's text-only MDA display standard with a bitmapped graphics mode. This allows the HGC to offer both high-quality text a ...
(HGC), Color Graphics Adapter (CGA) and the
Plantronics Colorplus The Plantronics Colorplus is a graphics card for IBM PC computers, first sold in 1982. It is a superset of the then-current CGA standard, using the same monitor standard and providing the same pixel resolutions. It was produced by Frederick Ele ...
. Its functionality was duplicated and extended by custom circuits in the EGA and
VGA Video Graphics Array (VGA) is a video display controller and accompanying de facto graphics standard, first introduced with the IBM PS/2 line of computers in 1987, which became ubiquitous in the PC industry within three years. The term can no ...
PC video adapters. Originally designed by Hitachi as the HD46505, Hitachi-built versions are in a wide variety of Japanese computers, from Sony, Sharp, Panasonic, and Casio. It is also known as the 6845 CRTC or the CRTC6845, meaning " cathode ray tube controller". This version was used on the
Apricot PC The Apricot PC (originally called the ''ACT Apricot'') is a personal computer produced by Apricot Computers, then still known as Applied Computer Techniques or ACT. Released in late 1983, it was ACT's first independently developed microcomputer, ...
and
Victor 9000 The name Victor or Viktor may refer to: * Victor (name), including a list of people with the given name, mononym, or surname Arts and entertainment Film * ''Victor'' (1951 film), a French drama film * ''Victor'' (1993 film), a French shor ...
to provide a 800x400 resolution monochrome display. A common clone of this CRT controller is the
United Microelectronics Corporation United Microelectronics Corporation (UMC; ) is a Taiwanese company based in Hsinchu, Taiwan. It was founded as Taiwan's first semiconductor company in 1980 as a spin-off of the government-sponsored Industrial Technology Research Institute (ITRI) ...
(UMC) UM6845E CRT controller. During the time of cold war technology embargoes, the 6845 was cloned in Bulgaria under the designation CM607.


Overview

The chip generates the signals necessary to interface with a raster display but does not generate the actual
pixel In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a raster image, or the smallest point in an all points addressable display device. In most digital display devices, pixels are the ...
s, though it does contribute cursor and video-blanking information to the pixel video (intensity) signals. It is used to produce correctly timed horizontal and vertical sync and provide the address in memory from which the next pixel or set of pixels should be read. The process of reading that value, converting it into pixels, and sending it to a CRT is left to other circuits. Because of this, systems using the 6845 may have very different numbers and values of colors, or may not support color at all.
Interlaced Interlaced video (also known as interlaced scan) is a technique for doubling the perceived frame rate of a video display without consuming extra bandwidth. The interlaced signal contains two fields of a video frame captured consecutively. This ...
and non-interlaced output modes are supported, as is a hardware text cursor. The sync generation includes generation of horizontal and vertical video blanking signals, which are used to condition the external pixel generation circuits. Also, an internal latch is provided which when triggered will duplicate and retain a copy of the video address so that it can later be read back by the CPU. This is useful for
light pen A light pen is a computer input device in the form of a light-sensitive wand used in conjunction with a computer's cathode-ray tube (CRT) display. It allows the user to point to displayed objects or draw on the screen in a similar way to a tou ...
s and
light gun A light gun is a pointing device for computers and a control device for arcade and video games, typically shaped to resemble a pistol. Early history The first light guns were produced in the 1930s, following the development of light-sensin ...
s which can function by sending a pulse to the 6845 when the electron beam passes, allowing a running program to read back the location that was pointed at. Because of this feature, most computer video adapters using a 6845 included a light pen interface, though it was usually an internal connector on the board itself, not on the outside of the computer, and it was usually undocumented in the user manual. Because all aspects of video timing are programmable, a single machine can switch between
NTSC The first American standard for analog television broadcast was developed by National Television System Committee (NTSC)National Television System Committee (1951–1953), Report and Reports of Panel No. 11, 11-A, 12–19, with Some supplement ...
and
PAL Phase Alternating Line (PAL) is a colour encoding system for analogue television. It was one of three major analogue colour television standards, the others being NTSC and SECAM. In most countries it was broadcast at 625 lines, 50 fields (25 ...
timings in software. The 6845 can be used to drive
monitor Monitor or monitor may refer to: Places * Monitor, Alberta * Monitor, Indiana, town in the United States * Monitor, Kentucky * Monitor, Oregon, unincorporated community in the United States * Monitor, Washington * Monitor, Logan County, West ...
s or any other raster display.


Internals

The chip has a total of registers controlling all aspects of video timings. Only two addresses are exposed to external components - one to select which internal register is to be read or written to and another to access that register. The 6845 is intended for character based displays. Every address it generates is composed of two parts - a 14 bit character address and a 5 bit row address. Using the full address range RA0-RA4:CA0-CA13 the 6845 can address words of memory, where a word may be any number of bits chosen by the system designer as the memory width. If the word size is one byte, as is often the case, the 6845 can address 512
KiB The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable unit ...
. If the word size is 32 bits, e.g. for 32-bit color graphics with one pixel per word, then the 6845 can address 2048 kiB; for 64-bit words, it can address twice as much. These limits arise from the combination of the 6845 and the design of the external memory connected to it, not from the 6845 alone. Though the number of unique addresses that the 6845 can address is limited to , the amount of memory that the 6845 can address may be significantly larger than might be assumed because the 6845 imposes no limit on the size of each memory location that it addresses. It is also significant that each word addressed by the 6845 does not have to equal one pixel or one character. As an example, consider the use of the 6845 in the IBM CGA, where the word size is one byte and each word represents four or eight pixels in the medium- or high-resolution graphics modes respectively, or one-half character. In CGA alphanumeric (text) mode, there are two bytes per character, accessed sequentially by the 6845—the first byte is a character code byte and the second byte is a character attribute byte. The character address increases linearly. When the chip signals horizontal sync it increases the row address. If the row address does not equal the programmatically set number of rows per character, then the character address is reset to the value it had at the beginning of the scan line that was just completed. Otherwise the row address is reset to zero and the memory address continues increasing linearly. This causes the same sequence of character values to be re-read from the memory for each raster line of each character row, before the 6845 advances the memory address to the next character row and repeats the same pattern. Therefore, if a character occupies one "word" in the video buffer, a display of ''l'' lines and ''c'' columns of characters with ''s'' scan lines per character requires ''l'' × ''c'' words of memory to represent a full screen of characters but takes ''s'' times that many memory accesses to complete one refresh cycle: each line of character words is repeatedly read ''s'' times before the next line is read. This means that character displays using the 6845, compared to all-points-addressable graphics displays of the same resolution, require much less memory but still require high memory bandwidth on the order of the bandwidth required for graphics. A different video display controller that buffers one whole line of character data internally can avoid this repeated reading of each line of characters from the display buffer RAM, reducing the required memory bandwidth and allowing either slower, less expensive memory chips to be used, more time for a system CPU to access the memory, or a combination of both. In the 1970s, 1980s, and to a lesser extent the 1990s, memory was expensive, fast memory was especially so, and this was an important concern. In the 1970s and early to mid-1980s, chip circuit densities were not very high either, and putting an 80-byte or larger character buffer into a chip like the 6845 might have enlarged the chip die by 50-100%, in turn making it more expensive by a few times that factor due to the exponential growth of chip defect rates and the consequent decline of production yield with die size. Therefore, adding such a character buffer to the 6845 was not a cost-effective approach when the chip was introduced. Now that memory is very inexpensive, fast memory included, there is little motivation to reduce the memory bandwidth required by a video display controller, so this is no longer an important engineering consideration. At the same time, chip densities have skyrocketed—which is actually the main reason for today's low memory prices—and many chips used in computers have large buffers and caches; a chip like the 6845 designed today could easily use a character line cache to avoid reading and re-reading characters for each video scan line within a character line. For low-power handheld devices, which would be the main ones likely to use character displays now, the power used for high-bandwidth memory access would be good reason to reduce the memory bandwidth for display refresh through the use of a line cache in the display controller. If the character address is used to look up a character reference in
RAM Ram, ram, or RAM may refer to: Animals * A male sheep * Ram cichlid, a freshwater tropical fish People * Ram (given name) * Ram (surname) * Ram (director) (Ramsubramaniam), an Indian Tamil film director * RAM (musician) (born 1974), Dutch * ...
and the row address to index a table of character graphics in
ROM Rom, or ROM may refer to: Biomechanics and medicine * Risk of mortality, a medical classification to estimate the likelihood of death for a patient * Rupture of membranes, a term used during pregnancy to describe a rupture of the amniotic sac * ...
an ordinary
text mode Text mode is a computer display mode in which content is internally represented on a computer screen in terms of characters rather than individual pixels. Typically, the screen consists of a uniform rectangular grid of ''character cells'', each ...
display is constructed. The character reference read from memory must be combined with the row address to form the address for the character graphics ROM, with the character reference selecting a set of scan line patterns that forms one character and the row address indexing into that set to select one scan line. In other words, the ROM address is split into two parts in order to use the ROM as a two-dimensional array: the first dimension selects a character, and the second selects a row of that character's graphic pattern.


Linear framebuffers

As described above, the 6845 is not ordinarily able to provide large linear framebuffers. A design could use only the character address and set the number of rows per character to 1 but it would be constrained to of addressable memory. A solution is found in the
Amstrad CPC The Amstrad CPC (short for ''Colour Personal Computer'') is a series of 8-bit home computers produced by Amstrad between 1984 and 1990. It was designed to compete in the mid-1980s home computer market dominated by the Commodore 64 and the Si ...
, which combines the row address and character address to provide linear scanlines within a non-linear buffer. It maps row address RA0-RA2 to memory address MA11-MA13 and character address CA0-CA10 to memory address MA0-MA10. This has the advantages of easier programming for non-character display and easy smooth horizontal scrolling but can impede smooth vertical scrolling.


Differences from the 6545

Although overwhelmingly compatible, a number of small variations exist between the 6845 and 6545. The biggest difference is that the 6545 may be configured so that it has sole access to the address bus for video memory. Two additional registers are included for setting any address the CPU wishes to read and the chip alternates between outputting addresses for display generation and the display set for CPU access. Smaller changes are that the
MOS Technology MOS Technology, Inc. ("MOS" being short for Metal Oxide Semiconductor), later known as CSG (Commodore Semiconductor Group) and GMT Microelectronics, was a semiconductor design and fabrication company based in Audubon, Pennsylvania. It is mos ...
and one variation of the Rockwell 6545 lack interlaced output support and all 6545s include an optional address skew, which delays display enable for one character cycle if set. This second feature was incorporated into later variations of the
Motorola Motorola, Inc. () was an American multinational telecommunications company based in Schaumburg, Illinois, United States. After having lost $4.3 billion from 2007 to 2009, the company split into two independent public companies, Motorol ...
6845. The 6545 may be set to work in linear 14 bit mode using a status bit. On the 6845 the same thing requires adjustment of the character height.


Tricks

The 6845 reads the start address for its display once per
frame A frame is often a structural system that supports other components of a physical construction and/or steel frame that limits the construction's extent. Frame and FRAME may also refer to: Physical objects In building construction *Framing (con ...
. However, if the internal timing values on the chip are altered at the correct time it can be made to prepare for a new frame without ending the current one - creating a non-continuous break in generated addresses midway through the display. This is commonly used by demos and much more rarely games to provide one moving area of the display (usually the play field) and one static (usually a status display). Vertical scrolling appears constrained because only the character start address can be set and the row address is always zeroed at frame start, but by adjusting border times it is possible to shift the position the framebuffer is shown on the raster display for increments in between whole characters. With drawing of blank pixels at the screen edges, this can be made invisible to the user creating just the illusion of a smooth vertical scroll.


See also

* Motorola 6847, a complete video display generator *
List of home computers by video hardware This is a list of home computers, sorted alphanumerically, which lists all relevant details of their video hardware. Home computers are the second generation of desktop computers, entering the market in 1977 and becoming common during the 1980s. ...


References


External links


HTML documentation of the 6845 registers

Zipped TIFs of the 6845 data sheets



Synertek 6545 Application Note

MC6845 Timing Calculator, calculate register values

Amstrad CPC CRTC 6845 Compendium
{{MOS Video/Sound Graphics chips 6845