u8 r, g, b;
u16 pal;
If (pal & (1 << 15))
{
r = ((pal >> 10) & 5) << 3;
g = ((pal >> 5) & 5) << 3;
b = (pal & 5) << 3;
}
else
...
always_comb
case (pal) // this is for each r,g,b - bits 14..10, 9..5, 4..0
5'd0: lut = 8'd0;
5'd1: lut = 8'd10;
5'd2: lut = 8'd21;
5'd3: lut = 8'd31;
5'd4: lut = 8'd42;
5'd5: lut = 8'd53;
5'd6: lut = 8'd63;
5'd7: lut = 8'd74;
5'd8: lut = 8'd85;
5'd9: lut = 8'd95;
5'd10: lut = 8'd106;
5'd11: lut = 8'd117;
5'd12: lut = 8'd127;
5'd13: lut = 8'd138;
5'd14: lut = 8'd149;
5'd15: lut = 8'd159;
5'd16: lut = 8'd170;
5'd17: lut = 8'd181;
5'd18: lut = 8'd191;
5'd19: lut = 8'd202;
5'd20: lut = 8'd213;
5'd21: lut = 8'd223;
5'd22: lut = 8'd234;
5'd23: lut = 8'd245;
5'd24: lut = 8'd255;
default: lut = 8'd255;
endcase
chernandezba wrote:the first part (u8 r, g, b;
u16 pal
chernandezba wrote:does it mean that 5 bit values from 24 to 31 are all these translated to 255
chernandezba wrote:Si, vivo en España, Madrid
chernandezba wrote:2) "with VDAC", extending from 0..31. Do you have these conversion values?
r = ((pal >> 10) & 5) << 3;
g = ((pal >> 5) & 5) << 3;
b = (pal & 5) << 3;
chernandezba wrote:Which of these combinations match my options "with vdac" and "without vdac"?
chernandezba wrote:the bit 15 (C Video output control). And I don't understand how is this bit used
TS-Labs wrote:
- Code: Select all
r = ((pal >> 10) & 5) << 3;
g = ((pal >> 5) & 5) << 3;
b = (pal & 5) << 3;
chernandezba wrote:Which of these combinations match my options "with vdac" and "without vdac"?
"without vdac" - 0 (000)
"with vdac" - 3 (011) or 7 (111)
chernandezba wrote:the bit 15 (C Video output control). And I don't understand how is this bit used
Selects one of two above conversion tables (0 - no VDAC, 1 - with VDAC)
chernandezba wrote:So same conversion as mine
chernandezba wrote:So... Every colour on the palette can decide if using vdac or not?
chernandezba wrote:The problem is my indexes to the full palette of the emulator is a 16 bit value
u32 pal[256];
chernandezba wrote:I have a display buffer of 16-bit indexed colours.
chernandezba wrote:is there any other website, apart from http://prods.tslabs.info/
TS-Labs wrote:chernandezba wrote:I have a display buffer of 16-bit indexed colours.
I really see no reason for this.
.
VBI wrote:chernandezba, sorry, but - 256 colors * 15 bit = 512 bytes...
and again - sorry, but very strange decigion with "entries" for any known colors in system.
Users browsing this forum: Majestic-12 [Bot] and 1 guest