From 721c70166c8116ff890716c47b298f75597497de Mon Sep 17 00:00:00 2001 From: joevt Date: Wed, 24 Apr 2024 01:12:23 -0700 Subject: [PATCH] control: Fix 1280x960 and 1280x1024 15bpp. Change the fb_ptr. This also affects the hardware cursor. Tested with 4MB of VRAM. --- devices/video/control.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/devices/video/control.cpp b/devices/video/control.cpp index f5f183f..efc6f50 100644 --- a/devices/video/control.cpp +++ b/devices/video/control.cpp @@ -591,7 +591,10 @@ void ControlVideo::enable_display() } this->pixel_depth = this->radacal->get_pix_width(); - if (swatch_params[ControlRegs::HAL-1] != swatch_params[ControlRegs::PIPE_DELAY-1] + 1 || this->pixel_depth == 32) { + if (swatch_params[ControlRegs::HAL-1] != swatch_params[ControlRegs::PIPE_DELAY-1] + 1 || + this->pixel_depth == 32 || + (this->pixel_depth == 16 && this->active_width == 1280) + ) { // don't know how to calculate offset from GBASE (fb_base); it is always hard coded as + 16 in the ndrv. this->fb_ptr += 16; // first 16 bytes are for 4 bpp HW cursor }