mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-23 06:57:40 -04:00
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 <stdlib.h>
|
||||||
#include <stdio.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
|
#define TABOFFS 2
|
||||||
|
|
||||||
volatile int screen_visible = 1;
|
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 SCRSIZE 6912
|
||||||
#define COLORBEG 6144
|
#define COLORBEG 6144
|
||||||
|
|
||||||
extern struct rgb *spscr_crgb;
|
|
||||||
extern struct rgb custom_colors[];
|
|
||||||
|
|
||||||
extern void spscr_init_mask_color(void);
|
extern void spscr_init_mask_color(void);
|
||||||
extern void spscr_init_line_pointers(int lines);
|
extern void spscr_init_line_pointers(int lines);
|
||||||
extern void spscr_init_colors(void);
|
|
||||||
|
|
||||||
#endif /* SPSCR_P_H */
|
#endif /* SPSCR_P_H */
|
||||||
|
|
|
@ -13,15 +13,16 @@ use for slightly different colors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define N0 0x00
|
#define N0 0x00
|
||||||
#define N1 0xAA
|
#define N1 0xC0
|
||||||
|
|
||||||
#define B0 0x55
|
#define B0 0x00
|
||||||
#define B1 0xFF
|
#define B1 0xFF
|
||||||
|
|
||||||
struct rgb norm_colors[COLORNUM]={
|
struct rgb norm_colors[COLORNUM]={
|
||||||
{0,0,0},{N0,N0,N1},{N1,N0,N0},{N1,N0,N1},
|
{0,0,0},{N0,N0,N1},{N1,N0,N0},{N1,N0,N1},
|
||||||
{N0,N1,N0},{N0,N1,N1},{N1,N1,N0},{N1,N1,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}
|
{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 ? */
|
sp_colors[7] = 3;/* WHITE ? */
|
||||||
|
|
||||||
/* same but 'light/bright' colors */
|
/* same but 'light/bright' colors */
|
||||||
sp_colors[8] = 1;
|
sp_colors[8] = 0;
|
||||||
sp_colors[9] = 1;
|
sp_colors[9] = 1;
|
||||||
sp_colors[10] = 1;
|
sp_colors[10] = 1;
|
||||||
sp_colors[11] = 1;
|
sp_colors[11] = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue