"reality" is a set of new features in BGB 1.6 to realisticly simulate the look of the LCD screen of the gameboy (DMG) and gameboy color, and hi-res border images to go with it. The design is "modular", in that the different aspects of the simulation are separate features that can be chosen independently, and color choices are independent from screen filter choices. There is however one intended way to combine the features, to get the intended effect.
To automatically have the correct "reality" doubler and frame blending for DMG and GBC mode, choose "auto LCD" for either one.
A new colorscheme is added to the built in colorschemes, "DMG reality". It has the 4 shades and LCD disabled color, sampled accurately from a real gameboy.
For all photos and color measurements for this project, the gameboys are illuminated by highly color accurate light, and photos are corrected, using a colorchecker, to true colors and brightness in sRGB gamma 2.2 space.
To sample LCD colors, a photo is taken at 1/60th second shutter speed (so one frame is sampled, to average out scanning) and enough out of focus that a color patch blends to its average color without visible pixels.
With care, avoiding reflections, and averaging from multiple photos, The following colorscheme (with LCD disabled color) was derived:
For BGB 1.6.3, the gameboy pocket (MGB) colors were also sampled, and a "MGB reality" colorscheme has been added:
Doublers are screen filters that increase the screen resolution, giving effects such as scanlines, "HQ2X", etc. A new doubler, "dot matrix", is added to simulate the gameboy LCD.
If you could look at the gameboy LCD from very close, it would look somewhat like this:
I don't have a way to actually zoom in like this and found nothing on internet (except for a gameboy pocket) so i don't know how wide the edges actually are. Because the edge is yellow, and the average color is a certain green, the pixel square is more bluish. Also the pixels cast a shadow on the background, this is not simulated. This ideal/simplified representation is now rendered at a few practical scales for the emulator.
The dot matrix doubler works at x1, x2, x3, and x4 scales, it automatically scales depending on the window size.
Pixels are rendered as small squares with an edge in between. The edge has the configured "LCD disabled" color in gameboy mode, or black in SGB or GBC mode. The average color of a pixel in the output (square + edge) is the color of that pixel in the input.
The intensity of the edges can be controlled by a setting in the ini file, DotMatrixIntensity. 0 sets the default. Otherwise it is the width of the edge, compared to the whole pixel, for example 0.1 makes the edge 10% of the total width and the square 90% of the width. The edge will not be wider than one output pixel.
Since BGB 1.6.3, a version for gameboy pocket, "MGB matrix", has been added, which has thinner edges. The MGB matrix edge intensity can separately be controlled with MgbMatrixIntensity
Frame blenders mix the current and previous frames to simulate types of motion blur. The DMG reality frame blend accurately simulates the motion blur of the original gameboy (DMG) LCD based on research/test roms. The below screenshots show motion blur.
The 5 configured GB LCD colors (top left, 4 + the LCD disabled color) are turned into a smooth gradient (bottom left), analogous to the continuous range of shades of an LCD pixel. Then these shades are used for blending, so for example an in between shade made by flickering will look correctly as on the real LCD. In the below image, The top right shows a middle shade made by mixing the darkest and lightest LCD shade (naive blending), the bottom right shows the middle shade taken from the smooth gradient.
Because it works this way, the DMG reality frame blend can only work in gameboy mode, not GBC or SGB mode, and when used, separate colorschemes for the window and sprites don't work. A setting in the ini, DmgLcdBlendReduceBlur, default 0, can be set to 1 to make the blur faster, for example to compensate for a slow LCD monitor. on fast (gaming or IPS with overdrive) LCD monitors the default is correct. The "MGB reality" frame blend simulates the response of the gameboy pocket LCD, which is a bit faster than the DMG LCD.
There is simulation of the contrast wheel of the gameboy. To use it, in the control panel, tab "GB colors", slide the contrast wheel slider to change it in real time. The contrast wheel can be enabled or disabled (checkbox, then "Apply")
As in reality, the lightest shade is the "LCD disabled" color, and darkest shade if the contrast is darker than normal, is darker than the darkest shade with normal contrast.
The gameboy color has RGB colors, just like for example a PC has RGB colors, but the GBC RGB colors are different, so if the colors were displayed as-is, the colors look wrong. So emulators have to do color correction, so the colors look more as on a GBC.
BGB 1.6 introduces a new color correction method, "GBC reality". It is made by taking photos of all colors in an 8x8x8 cube, using a test rom, under a highly color accurate light source, and interpolating the other colors. The colors were also tuned by hand/eye, by looking at the GBC running various test roms and games, under the same light, as well as daylight, and comparing with BGB on an sRGB calibrated monitor, to get the colors matching closer.
Uncorrected colors | BGB 1.5 default | BGB 1.6 default (a bit deeper blue) | GBC reality (light, default) | GBC reality (dark, true brightness) |
Two settings of GBC reality colors can be changed: The whitepoint (GBC reality has its own whitepoint separate from the normal BGB color correction). The default whitepoint has the same color as measured from the GBC screen displaying white (although this isn't an exact thing and can vary a bit), but made brighter so it is easier to see. In the colors dialog, you see two saved color presets. This lighter shade, and a second darker shade. This is the true reflective brightness of the GBC screen, which is quite dark.
Also, the black level, or how much the blacks are "lifted", can be adjusted. The GBC's real black level (as well as gamma, or how light midtones look) varies depending on viewing angle and incoming light angle.
Also of interest is that the GBC's blue primary is outside the sRGB gamut, so colors close to pure blue can not be displayed on a PC (assuming sRGB). To display them correctly would require a negative value for red. However, a trick is possible to approximate it: If the black level is lifted (becomes dark grey) then the red component of blue can be darker than the black level. The following picture illustrates the effect, with a very light "black" to make it more obvious:
Without out of gamut blue | With out of gamut blue |
With the default black level setting, it is not this extreme but the effect is still there. If BGB can not display a blue color as-is, then it is desaturated (preserving hue and luminance) until it can be displayed.
The gameboy color LCD, zoomed in very close, looks somewhat like this:
It has RGB subpixels, which individually block more or less light to produce colored pixels. BGB's "GBC RGB" doubler simulates the subpixels, and works at x2, x3 and x4 scales. In GBC graphics modes, the subpixels have the primary colors of the GBC color correction used. in DMG and SGB graphics modes, the subpixels have normal RGB primaries.
To be able to render bright colors and also have subpixels means that primary colors can "overflow" into the next subpixel, so for example you may see green subpixels that are yellow or red. The average color of an output pixel is the same as the color of the input pixel.
The intensity of the subpixels effect can be controlled by a setting in the ini file, GbcRgbIntensity. 0 sets the default. Otherwise, 1 is maximum intensity, and lower values (between 0 and 1) blend the subpixels together more.
I made high res (x4 scale) borders for DMG and GBC mode, by taking photos of real gameboys, and editing to make the borders. The borders are true color and brightness (calibrated). To use, drag the PNG file into the screen window while the correct emulated system is active, or alternatively configure it in the settings window, tab Graphics. The screen area is a single color rectangle of 640x576 pixels (4x the GB screen resolution) so BGB can detect where the screen goes, and that it's a 4x scale border. Below are low-res previews of the borders.
Gameboy (DMG) border |
GBC border (true color) |
GBC border (lens made lighter) |
Gameboy pocket (MGB) border |
These borders work in BGB 1.6 and later, running on windows XP or later. For older windows, you can convert the borders to BMP format.
Since BGB 1.6, SGB mode can show a border image file until the game sets a border, for a better SGB experience (in tab "graphics", enable the setting "SGB if set"), and also, the doubler can be applied to it. SGB border images are easy to find.
As of BGB 1.6.3, you can have a pair of any two colorschemes, and two borders, for DMG and MGB, for example "DMG reality" and "MGB reality", and "dmgborderx4.png" and "mgbborderx4.png", and enable the setting "MGB auto border/colors" in tab "Graphics". Then select the colorscheme and border. From then on, changing the setting "detect GB pocket / SGB2" in tab "System" will automatically choose the right colorscheme and border. Also the "auto LCD" filters will automatically choose the right version for DMG and MGB, so you can fully switch with a single setting.