English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 12 April 2012, 21:40   #1
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,939
A2024 palette not exactly grey

I took a screenshot of an A2024-mode Workbench. Looking at the colours, it looks like WinUAE is using a slightly off-grey palette. Is that an artifact of 16-bit RGB565 colour handling somewhere?

White and black are as expected, but light grey is (R:G:B) 173:170:173 and dark grey is 82:85:82. I'd expect light grey to be 170:170:170 (= %10101010) and dark grey to be 85:85:85 (= %01010101).

Also, not that the A2024 code in specialmonitors.cpp is easy to follow/figure out, so this might well be wrong . But, should this code:
Code:
c1 = (c1 << 6) | (c1 << 4) | (c1 << 2);
c2 = (c2 << 6) | (c2 << 4) | (c2 << 2);
really be
Code:
c1 |= (c1 << 6) | (c1 << 4) | (c1 << 2);
c2 |= (c2 << 6) | (c2 << 4) | (c2 << 2);
mark_k is offline  
AdSense AdSense  
Old 13 April 2012, 13:09   #2
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,939
I got the slightly off-grey colours when testing WinUAE under Wine with the Direct3D graphics API.

I just tested using DirectDraw mode, and the colours are grey. However my code suggestion above looks like it is relevant. In DirectDraw mode, the A2024 palette looks like this:
Code:
black      0:  0:  0 (correct)
dk.grey   84: 84: 84 (should be 85:85:85)
lt.grey  168:168:168 (should be 170:170:170)
white    252:252:252 (should be 255:255:255)
So it looks like WinUAE always sets the low 2 bits of each colour component to 0.

Last edited by mark_k; 13 April 2012 at 15:05.
mark_k is offline  
Old 13 April 2012, 16:00   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 21,501
Yeah, lowest 2 bits should be set too.

I don't really care what happens to colors after emulated bitmap gets uploaded to D3D texture
Toni Wilen is online now  
Old 15 April 2012, 23:27   #4
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,939
I guess the off-grey colours are an artifact of WinUAE R8G8B8 → D3D texture R5G6B5 → graphics driver R8G8B8 conversion.

For example, 170 = %10101010 in binary.
Converting 170:170:170 to R5G6B5, get 10101xxx : 101010xx : 10101xxx.
Converting that back to R8G8B8 by filling in the missing low bits with the upper bits, get 10101101 : 10101010 : 10101101, i.e. 173:170:173.

I could fix that by getting WinUAE to use a 32-bit texture, by setting the 16/32 selection in Display settings to 32. (Looking at the GUI, I thought that only applied to fullscreen mode. But at least running under Wine, it affects the type of texture used in windowed mode too.)
mark_k is offline  
Old 16 April 2012, 19:46   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 21,501
Quote:
Originally Posted by mark_k View Post
I could fix that by getting WinUAE to use a 32-bit texture, by setting the 16/32 selection in Display settings to 32. (Looking at the GUI, I thought that only applied to fullscreen mode. But at least running under Wine, it affects the type of texture used in windowed mode too.)
Yes, it also changes internal texture bit depth, even in windowed mode.
Toni Wilen is online now  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Short Grey DDNI request.Old Rare Games 8 22 July 2018 18:55
Remove A2024 artifacts option mark_k request.UAE Wishlist 4 11 December 2012 13:39
Another A2024-related suggestion mark_k support.WinUAE 2 04 December 2012 15:35
Anyone got an A2024 monitor service manual? mark_k request.Other 0 21 October 2007 14:42
The Short Grey Frog request.Demos 11 15 August 2001 11:19

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:05.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.06101 seconds with 13 queries