25% scanlines (meaning that they are 75% transparent) looks great for doubled pixels mode in WinUAE. That would be nice to have, yes.
See: http://i47.tinypic.com/r8ukbt.png
See: http://i47.tinypic.com/r8ukbt.png
Yes, shouldn't make it notably slower. Here's the simple2x-function used for the doubled pixels mode:SteveM said:Probably not overly expensive to do in software for the pixel-doubled (quadrupled?) mode by shifting the colour values for every second line.
void Simple2x(unsigned char *srcPtr, unsigned int srcPitch, unsigned char *deltaPtr, unsigned char *dstPtr, unsigned int dstPitch, int width, int height)
{
unsigned char *nextLine, *finish;
nextLine = dstPtr + dstPitch;
do
{
unsigned int *bP = (unsigned int *) srcPtr;
unsigned int *dP = (unsigned int *) dstPtr;
unsigned int *nL = (unsigned int *) nextLine;
unsigned int currentPixel;
finish = (unsigned char *) bP + ((width+2) << 1);
currentPixel = *bP++;
do
{
#ifdef BIG_ENDIAN
unsigned int color = currentPixel >> 16;
#else
unsigned int color = currentPixel & 0xffff;
#endif
color = color | (color << 16);
*(dP) = color;
*(nL) = color;
#ifdef BIG_ENDIAN
color = currentPixel & 0xffff;
#else
color = currentPixel >> 16;
#endif
color = color| (color << 16);
*(dP + 1) = color;
*(nL + 1) = color;
currentPixel = *bP++;
dP += 2;
nL += 2;
}
while ((unsigned char *) bP < finish);
srcPtr += srcPitch;
dstPtr += dstPitch << 1;
nextLine += dstPitch << 1;
}
while (--height);
}
So in order to get the 3/4-value should I then do the bit-shifting again with the 1/2 value and then just add the 1/2- and 1/4-values (or is there a quicker way)?SteveM said:you'd typically mask the top five bits (&0xf800) and shift them right one.
[...]
don't forget that 1/2 + 1/4 == 0.75 ;-)
//make color half bright
unsigned int red = (color & 0xf800) >> 1;
unsigned int green = (color & 0x07e0) >> 1;
unsigned int blue = (color & 0x001f) >> 1;
color = red + green + blue;
//get values for 1/4 brightness
red = (color & 0xf800) >> 1;
green = (color & 0x07e0) >> 1;
blue = (color & 0x001f) >> 1;
//add them to get 3/4 bright color
color += red + green + blue;
john4p said:Does this look correct?
(Currently don't have my Pandora available so can't test this.)Code://make color half bright unsigned int red = (color & 0xf800) >> 1; unsigned int green = (color & 0x07e0) >> 1; unsigned int blue = (color & 0x001f) >> 1; color = red + green + blue; //get values for 1/4 brightness red = (color & 0xf800) >> 1; green = (color & 0x07e0) >> 1; blue = (color & 0x001f) >> 1; //add them to get 3/4 bright color color += red + green + blue;
color = ((color & 0xF7DE) >> 1); // 50 %
color = ((color & 0xF7DE) >> 1) + ((color & 0xE79C) >> 2); // 75%
color = ((color & 0x7BDE) >> 1); // 50 %
color = ((color & 0x7BDE) >> 1) + ((color & 0x739C) >> 2); // 75%
john4p said:I'll just load a savestate of some colorful game to test this (when I get my Pandora back which currently is on a journey).
What?! That's incredible (just sent it to you yesterday afternoon) - thanks a lot.EvilDragon said:john4p said:I'll just load a savestate of some colorful game to test this (when I get my Pandora back which currently is on a journey).
It's already alive and kicking - but I missed UPS pickup by 5 minutes, so you won't get it back tomorrow, but on Friday
:lol: (goes well with your avatar too)TitanUranus said:to see how/if something is accessing a dick
urjaman said::lol: (goes well with your avatar too)TitanUranus said:to see how/if something is accessing a dick
Yeah that is mostly due to the lower dot-pitch of the Amiga monitor. The aperature grille of the Amiga monitor was much larger than PC monitors creating a type of filter almost. This helped round off the edges of the pixels. The grille was much finer on PC monitors and you could see the edges of the square pixels making them look blocky.john4p said:I remember not being impressed when a friend showed me Prince of Persia, Xenon 2 and Monkey Island on his 286 PC.
Preferred the smoothness of my RGB Amiga monitor (where you didn't see the single pixels) over the blockiness of the PC screen.