Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Planar (computer graphics)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Refimprove|date=February 2015}} In [[computer graphics]], '''planar''' is the method of arranging [[pixel]] data into several ''[[bit plane|bitplanes]]'' of [[Random Access Memory|RAM]]. Each bit in a bitplane is related to one pixel on the screen. Unlike [[Packed pixel|packed]], [[high color]], or [[Color depth#True color (24-bit) | true color]] graphics, the whole dataset for an individual pixel is not in one specific location in RAM, but spread across the bitplanes that make up the display. Planar arrangement determines how pixel data is laid out in memory, not how the data for a pixel is interpreted; pixel data in a planar arrangement could encode either [[indexed color|indexed]] or direct color. This scheme originated in the early days of computer graphics. The memory [[Integrated circuit|chips]] of this era can not supply data fast enough on their own to generate a picture on a TV screen or monitor from a large [[framebuffer]].<ref>{{cite book | first = David F. | last = Rogers | title = Procedural Elements for Computer Graphics | publisher = McGraw-Hill | year = 1985 | page = [https://archive.org/details/proceduralelemen00davi/page/13 13] | isbn = 0-07-053534-5 | url-access = registration | url = https://archive.org/details/proceduralelemen00davi/page/13 }}</ref> By splitting the data up into multiple planes, each plane can be stored on a separate memory chip. These chips can then be read in parallel at a slower rate, allowing graphical display on modest hardware, like game consoles of the [[Third generation of video game consoles|third]] and [[Fourth generation of video game consoles|fourth]] generations and home computers of the 80s. The [[Enhanced Graphics Adapter|EGA]] video adapter on early [[IBM PC]] computers uses planar arrangement in color graphical modes for this reason. The later [[Video Graphics Array|VGA]] includes [[Mode 13h|one non-planar mode]] which sacrifices memory efficiency for more convenient access.<ref>{{cite web|url=http://wiki.osdev.org/VGA_Hardware|title=VGA Hardware - OSDev Wiki|website=wiki.osdev.org|accessdate=September 4, 2017}}</ref> == Hardware with planar graphics == Game consoles with a planar display organization include Sega´s [[Master System]] and [[Game Gear]], Nintendo´s [[Nintendo Entertainment System|NES]] / [[Super Nintendo Entertainment System|SNES]], and the [[TurboGrafx-16|PC Engine]]. <ref>{{cite web|url=https://www.sega-16.com/forum/printthread.php?t=9265&pp=15&page=1|title=Planar vs Chunky Pixel organization|accessdate=June 27, 2022}}</ref> The Slovak [[PP 01]] includes a 24KB plane-based 8-colour graphics mode with a resolution of 256x256 pixels. The 16-bit [[Atari ST]] and [[Amiga]] platforms from the 80s and 90s were exclusively based on a planar graphics configuration alongside a powerful [[blitter]]. Amiga´s [[Original_Amiga_chipset|OCS graphics chipset]] works with 5 bitplanes which allows 2^5=32 colors per pixel, while later models with the [[Amiga_Advanced_Graphics_Architecture|AGA chipset]] can handle eight bitplanes (2^8=256 colors). For the Sinclair (Amstrad) [[ZX Spectrum]] computer family and compatible systems, a graphics expansion named HGFX was developed in 2019. In 2022 it was implemented in [[Field-programmable gate array|FPGA]]-based hardware. The HGFX enables a memory organization that is compatible with the original ZX Spectrum system while taking up only 6144 bytes of the original video RAM. In addition, it provides two video-buffers, 256 indexed colours, a truecolour palette, and an HDMI output. The HGFX works with eight bitplanes.<ref>{{cite web|url=https://wiki.ilnx.cz/doku.php/hgfx:start|title=HGFX|website=wiki.ilnx.cz|accessdate=June 22, 2022}}</ref> Currently it is implemented as part of the eLeMeNt ZX computer.<ref>{{cite web|url=http://128land.com/|title=eLeMeNt ZX|website=sites.google.com/view/elementzx/home|accessdate=June 22, 2022}}</ref> [[File:Diagram of planar computer graphics.svg|thumb|Combining four one-bit planes into a final "four bits per pixel" (16-color) image]] == Examples == On a [[Packed pixel|chunky]] display with 4-[[bits-per-pixel]] and a [[List of monochrome and RGB color formats#4-bit RGBI|RGBI]] palette, each byte represents two pixels, with 16 different colors available for each pixel. Four consecutive pixels are stored in two consecutive bytes as follows: {|class="wikitable" ! Byte index || colspan=2 | 0 || colspan=2| 1 |- | Byte value (decimal) || colspan=2 | 1 || colspan=2 | 35 |- | Byte value (hexadecimal) || colspan=2 | 0x01 || colspan=2 | 0x23 |- | Nibble value (binary) || 0000 || 0001 || 0010 || 0011 |- | Nibble value (decimal) || 0 || 1 || 2 || 3 |- | Resulting pixel |style="background-color: #000000; color: white;"| Black |style="background-color: #0000AA; color: white;"| Blue |style="background-color: #00AA00; color: white;"| Green |style="background-color: #00AAAA; color: white;"| Cyan |} Whereas a planar scheme could use 2 bitplanes, providing for a 4 color display. Eight pixels would be stored as 2 bytes non-contiguously in memory: {|class="wikitable" ! Byte index ||colspan=8| 0 ||colspan=2| Byte value |- ! Bit index || 0 || 1 || 2 || 3 || 4 || 5 || 6 || 7 || hexadecimal || decimal |- | Plane 0 || 0 || 1 || 0 || 1 || 0 || 0 || 0 || 0 || style="text-align: center;" | 0x50 || style="text-align: center;" | 80 |- | Plane 1 || 0 || 0 || 1 || 1 || 0 || 0 || 0 || 0 || style="text-align: center;" | 0x30 || style="text-align: center;" | 48 |- | Resulting pixel |style="background-color: #000000; color: white;"| 0 |style="background-color: #0000AA; color: white;"| 1 |style="background-color: #00AA00; color: white;"| 2 |style="background-color: #00AAAA; color: white;"| 3 |style="background-color: #000000; color: white;"| 0 |style="background-color: #000000; color: white;"| 0 |style="background-color: #000000; color: white;"| 0 |style="background-color: #000000; color: white;"| 0 |} In the planar example, 2 bytes represent 8 pixels with 4 available colors, where the packed pixel example uses 2 bytes to represent fewer pixels but with more colors. Adding planes will increase the number of colors available at the cost of requiring more memory. For example, using 4 planes makes 2<sup>4</sup>=16 colors available, but it would then take 4 bytes to represent 8 pixels (making it equivalent in terms of memory usage and available colors to the packed arrangement example). ==Advantages and disadvantages== Planar arrangements offer space and time efficiencies over packed arrangements at bit depths that are not powers of 2. As an example, consider 3 {{abbr|bpp|bits-per-pixel}}, allowing 8 colors. With planar arrangements, this simply requires 3 planes. With packed arrangements, supporting exactly 3 bpp would require either allowing pixels to cross byte boundaries (incurring time costs due to complications with addressing and unpacking pixels) or padding (incurring space costs, as each byte would store 2 pixels and have 2 unused bits); historically, this is one reason (though not necessarily the main one) packed pixels used bit depths that fit evenly into bytes. Planar arrangements allow for faster bit depth switching: planes are added or discarded and (if colors are indexed) the palette is extended or truncated. Consequently, support for higher bit depths can be added with little to no impact on older software. Ease of bit depth switching also allow elements with different bit depths to be easily used together. A disadvantage of planar arrangements is that more RAM address cycles are needed for [[scrolling]] and [[animation]]s. ==See also== *[[Packed pixel]] *[[Original_Amiga_chipset#Amiga_graphics_chipset_roadmap|Amiga graphics chipset roadmap]] == References == {{reflist}} {{DEFAULTSORT:Planar (Computer Graphics)}} [[Category:Computer graphics]] [[Category:Amiga]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Abbr
(
edit
)
Template:Cite book
(
edit
)
Template:Cite web
(
edit
)
Template:Refimprove
(
edit
)
Template:Reflist
(
edit
)