Tweak ZXBox colours: 1) 'Bright' black is the same as normal black on a real Spectrum, so make it so here too. 2) Use more accurate RGB values in the 16bpp driver (taken from the FUSE emulator). 3) Remove some confusing duplicate definitions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17638 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ae4b677736
commit
b57b779fbc
4 changed files with 11 additions and 69 deletions
|
@ -28,42 +28,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int color_type = 0;
|
||||
|
||||
#define N0 0x04
|
||||
#define N1 0x34
|
||||
|
||||
#define B0 0x08
|
||||
#define B1 0x3F
|
||||
|
||||
|
||||
struct rgb *spscr_crgb;
|
||||
|
||||
static struct rgb norm_colors[COLORNUM]={
|
||||
{0,0,0},{N0,N0,N1},{N1,N0,N0},{N1,N0,N1},
|
||||
{N0,N1,N0},{N0,N1,N1},{N1,N1,N0},{N1,N1,N1},
|
||||
|
||||
{0x15,0x15,0x15},{B0,B0,B1},{B1,B0,B0},{B1,B0,B1},
|
||||
{B0,B1,B0},{B0,B1,B1},{B1,B1,B0},{B1,B1,B1}
|
||||
};
|
||||
|
||||
static struct rgb gray_colors[COLORNUM]={
|
||||
{0,0,0},{20,20,20},{26,26,26},{32,32,32},
|
||||
{38,38,38},{44,44,44},{50,50,50},{56,56,56},
|
||||
|
||||
{16,16,16},{23,23,23},{30,30,30},{36,36,36},
|
||||
{43,43,43},{50,50,50},{56,56,56},{63,63,63}
|
||||
};
|
||||
|
||||
struct rgb custom_colors[COLORNUM]={
|
||||
{0,0,0},{N0,N0,N1},{N1,N0,N0},{N1,N0,N1},
|
||||
{N0,N1,N0},{N0,N1,N1},{N1,N1,N0},{N1,N1,N1},
|
||||
|
||||
{0x15,0x15,0x15},{B0,B0,B1},{B1,B0,B0},{B1,B0,B1},
|
||||
{B0,B1,B0},{B0,B1,B1},{B1,B1,B0},{B1,B1,B1}
|
||||
};
|
||||
|
||||
|
||||
#define TABOFFS 2
|
||||
|
||||
volatile int screen_visible = 1;
|
||||
|
@ -240,22 +204,3 @@ void spscr_init_line_pointers(int lines)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void spscr_init_colors(void)
|
||||
{
|
||||
spscr_crgb = norm_colors;
|
||||
|
||||
switch(color_type) {
|
||||
case 0:
|
||||
spscr_crgb = norm_colors;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
spscr_crgb = gray_colors;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
spscr_crgb = custom_colors;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,11 +30,7 @@ struct rgb {
|
|||
#define SCRSIZE 6912
|
||||
#define COLORBEG 6144
|
||||
|
||||
extern struct rgb *spscr_crgb;
|
||||
extern struct rgb custom_colors[];
|
||||
|
||||
extern void spscr_init_mask_color(void);
|
||||
extern void spscr_init_line_pointers(int lines);
|
||||
extern void spscr_init_colors(void);
|
||||
|
||||
#endif /* SPSCR_P_H */
|
||||
|
|
|
@ -13,15 +13,16 @@ use for slightly different colors
|
|||
*/
|
||||
|
||||
#define N0 0x00
|
||||
#define N1 0xAA
|
||||
#define N1 0xC0
|
||||
|
||||
#define B0 0x55
|
||||
#define B0 0x00
|
||||
#define B1 0xFF
|
||||
|
||||
struct rgb norm_colors[COLORNUM]={
|
||||
{0,0,0},{N0,N0,N1},{N1,N0,N0},{N1,N0,N1},
|
||||
{N0,N1,N0},{N0,N1,N1},{N1,N1,N0},{N1,N1,N1},
|
||||
|
||||
{0x15,0x15,0x15},{B0,B0,B1},{B1,B0,B0},{B1,B0,B1},
|
||||
{0,0,0},{B0,B0,B1},{B1,B0,B0},{B1,B0,B1},
|
||||
{B0,B1,B0},{B0,B1,B1},{B1,B1,B0},{B1,B1,B1}
|
||||
};
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ void init_spect_scr(void)
|
|||
sp_colors[7] = 3;/* WHITE ? */
|
||||
|
||||
/* same but 'light/bright' colors */
|
||||
sp_colors[8] = 1;
|
||||
sp_colors[8] = 0;
|
||||
sp_colors[9] = 1;
|
||||
sp_colors[10] = 1;
|
||||
sp_colors[11] = 1;
|
||||
|
@ -79,13 +79,13 @@ void update_screen(void)
|
|||
srcy &= 0xffff; /* set up the y-coordinate between 0 and 1 */
|
||||
}
|
||||
#elif LCD_PIXELFORMAT == VERTICAL_PACKING
|
||||
int shift;
|
||||
int shift;
|
||||
for(y = 0; y < LCD_HEIGHT; y++)
|
||||
{
|
||||
frameb = rb->lcd_framebuffer + (y/4) * LCD_WIDTH;
|
||||
srcx = 0; /* reset our x counter before each row... */
|
||||
shift = ((y & 3 ) * 2 );
|
||||
mask = ~pixmask[y & 3];
|
||||
shift = ((y & 3 ) * 2 );
|
||||
mask = ~pixmask[y & 3];
|
||||
for(x = 0; x < LCD_WIDTH; x++)
|
||||
{
|
||||
frameb[x] = (frameb[x] & mask) | ((image[(srcx>>16)]&0x3) << shift );
|
||||
|
@ -96,13 +96,13 @@ void update_screen(void)
|
|||
srcy &= 0xffff; /* set up the y-coordinate between 0 and 1 */
|
||||
}
|
||||
#elif LCD_PIXELFORMAT == VERTICAL_INTERLEAVED
|
||||
int shift;
|
||||
int shift;
|
||||
for(y = 0; y < LCD_HEIGHT; y++)
|
||||
{
|
||||
frameb = rb->lcd_framebuffer + (y/8) * LCD_WIDTH;
|
||||
srcx = 0; /* reset our x counter before each row... */
|
||||
shift = (y & 7);
|
||||
mask = ~pixmask[y & 7];
|
||||
shift = (y & 7);
|
||||
mask = ~pixmask[y & 7];
|
||||
for(x = 0; x < LCD_WIDTH; x++)
|
||||
{
|
||||
frameb[x] = (frameb[x] & mask) | (pixval[image[(srcx>>16)]&0x3] << shift );
|
||||
|
|
Loading…
Reference in a new issue