<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://gbdev.gg8.se/wiki/index.php?action=history&amp;feed=atom&amp;title=LCDC</id>
		<title>LCDC - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://gbdev.gg8.se/wiki/index.php?action=history&amp;feed=atom&amp;title=LCDC"/>
		<link rel="alternate" type="text/html" href="https://gbdev.gg8.se/wiki/index.php?title=LCDC&amp;action=history"/>
		<updated>2026-04-16T04:32:36Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.25.1</generator>

	<entry>
		<id>https://gbdev.gg8.se/wiki/index.php?title=LCDC&amp;diff=846&amp;oldid=prev</id>
		<title>ISSOtm: Create detailed page about LCDC to de-clobber Video Display</title>
		<link rel="alternate" type="text/html" href="https://gbdev.gg8.se/wiki/index.php?title=LCDC&amp;diff=846&amp;oldid=prev"/>
				<updated>2019-02-02T23:29:40Z</updated>
		
		<summary type="html">&lt;p&gt;Create detailed page about LCDC to de-clobber &lt;a href=&quot;/wiki/articles/Video_Display&quot; title=&quot;Video Display&quot;&gt;Video Display&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''LCDC''' is the main '''LCD C'''ontrol register. Its bits toggle what elements are displayed on the screen, and how.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
== LCDC.7 - LCD Display Enable ==&lt;br /&gt;
This bit controls whether the LCD is on and the PPU is active. Setting it to 0 turns both off, which grants immediate and full access to VRAM, OAM, etc.&lt;br /&gt;
&lt;br /&gt;
'''CAUTION''': Stopping LCD operation (Bit 7 from 1 to 0) may be performed during [[VBlank]] ONLY, disabling the display outside of the V-Blank period may damage the hardware by burning in a black horizontal line similar to that which appears when the GB is turned off. This appears to be a serious issue, Nintendo is reported to reject any games that do not follow this rule.&lt;br /&gt;
&lt;br /&gt;
When the display is disabled the screen is blank, which on DMG is displayed as a white &amp;quot;whiter&amp;quot; than color #0.&lt;br /&gt;
&lt;br /&gt;
On SGB, the screen doesn't turn white, it appears that the previous picture sticks to the screen. (TODO: research this more.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When re-enabling the LCD, the PPU will immediately start drawing again, but the screen will stay blank during the first frame.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LCDC.6 - Window Tile Map Display Select ==&lt;br /&gt;
This bit controls which background map the Window uses for rendering. When it's reset, the $9800 tilemap is used, otherwise it's the $9C00 one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LCDC.5 - Window Display Enable ==&lt;br /&gt;
This bit controls whether the window shall be displayed or not. (TODO : what happens when toggling this mid-scanline ?) This bit is overridden on DMG by [[#LCDC.0_-_BG.2FWindow_Display.2FPriority|bit 0]] if that bit is reset.&lt;br /&gt;
&lt;br /&gt;
Note that on CGB models, setting this bit to 0 then back to 1 mid-frame may cause the second write to be ignored. (TODO : test this.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LCDC.4 - BG &amp;amp; Window Tile Data Select ==&lt;br /&gt;
This bit controls which [[Video_Display#VRAM_Tile_Data|addressing mode]] the BG and Window use to pick tiles.&lt;br /&gt;
&lt;br /&gt;
Sprites aren't affected by this, and will always use $8000 addressing mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LCDC.3 - BG Tile Map Display Select ==&lt;br /&gt;
This bit works similarly to [[#LCDC.6 - Window Tile Map Display Select|bit 6]]: if the bit is reset, the BG uses tilemap $9800, otherwise tilemap $9C00.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LCDC.2 - OBJ Size ==&lt;br /&gt;
This bit controls the sprite size (1 tile or 2 stacked vertically).&lt;br /&gt;
&lt;br /&gt;
Be cautious when changing this mid-frame from 8x8 to 8x16 : &amp;quot;remnants&amp;quot; of the sprites intended for 8x8 could &amp;quot;leak&amp;quot; into the 8x16 zone and cause artifacts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LCDC.1 - OBJ Display Enable ==&lt;br /&gt;
This bit toggles whether sprites are displayed or not.&lt;br /&gt;
&lt;br /&gt;
This can be toggled mid-frame, for example to avoid sprites being displayed on top of a status bar or text box.&lt;br /&gt;
&lt;br /&gt;
(Note: toggling mid-scanline might have funky results on DMG? Investigation needed.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LCDC.0 - BG/Window Display/Priority ==&lt;br /&gt;
LCDC.0 has different meanings depending on Gameboy type and Mode:&lt;br /&gt;
&lt;br /&gt;
=== Monochrome Gameboy, SGB and CGB in Non-CGB Mode: BG Display ===&lt;br /&gt;
When Bit 0 is cleared, both background and window become blank (white), and the [[#LCDC.5 - Window Display Enable|Window Display Bit]] is ignored in that case. Only Sprites may still be displayed (if enabled in Bit 1).&lt;br /&gt;
&lt;br /&gt;
=== CGB in CGB Mode: BG and Window Master Priority ===&lt;br /&gt;
When Bit 0 is cleared, the background and window lose their priority - the sprites will be always displayed on top of background and window, independently of the priority flags in OAM and BG Map attributes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Using LCDC =&lt;br /&gt;
&lt;br /&gt;
LCDC is a powerful tool: each bit controls a lot of behavior, and can be modified at any time during the frame.&lt;br /&gt;
&lt;br /&gt;
One of the important aspects of LCDC is that unlike VRAM, the PPU never locks it. It's thus possible to modify it mid-scanline!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Faux-layer textbox/status bar ==&lt;br /&gt;
A problem often seen especially in NES games is sprites rendering on top of the textbox/status bar. It's possible to prevent this using LCDC if the textbox/status bar is &amp;quot;alone&amp;quot; on its scanlines:&lt;br /&gt;
* Set LCDC.1 to 1 for gameplay scanlines&lt;br /&gt;
* Set LCDC.1 to 0 for textbox/status bar scanlines&lt;br /&gt;
Usually, these bars are either at the top or bottom of the screen, so the bit can be set by the [[VBlank handler]]&lt;/div&gt;</summary>
		<author><name>ISSOtm</name></author>	</entry>

	</feed>