Copy Link
Add to Bookmark
Report

1 Bits Per Pixel Screen Mode

sang's profile picture
Published in 
GP32
 · 9 months ago

Anyone wondered why the 1bpp screen mode does not work? The answer is simple: GP32 BIOS GpGraphicModeSet() call does it wrong and the Samsung data sheet tells incorrect information. That is indeed a good start.

The trick in order to get the 1bpp mode set up correctly is to poke some "not that obvious" values into LCDSADDR3 register. 240 pixels requires 15 half words (15 * 2 * 8 = 240). One might think that LCDSADDR3.OFFSIZE=0 and LCDSADDR3.PAGEWIDTH=15 would produce a 240 pixels high screen without offscreen area. Well no.. The screen starts wandering around. In order to get a stable screen you need to define LCDSADDR3.OFFSIZE=1 and LCDSADDR3.PAGEWIDTH=14. Weird but works. There is one slight side effect though. 16 last pixels along the 240 pixels line get mirrored from the first 16 pixels of the previous line. This effectively cuts out total 32 pixels worth of usable display area along the raster line.

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT