void Wwss::draw()
{
if (format == Video::PAL) drawPAL();
-// else if (format == Video::NTSC) drawNTSC();
+ // else if (format == Video::NTSC) drawNTSC();
}
void Wwss::drawPAL()
Colour c;
UINT value;
+ Surface* mysurface = getSurface();
for(UINT q = 0; q < Nd; q++)
{
value = (UINT)(dst[q] * 182); // Apparently this is a better number than 255 for the colour value
c.set(value, value, value);
- getSurface()->drawPixel(q, 6, c);
+ mysurface->drawPixel(q, 6, c);
}
}
void Wwss::drawNTSC()
{
-/*
+ /*
static UCHAR startCode[] = {1,0,0,0,0,0,0};
static UCHAR aspect43[] = {0};
static UCHAR aspect169[] = {1};
static UCHAR theRest[] = {0,0,0,0,0,0,0,0};
static UCHAR crc43[] = {0,0,0,0,0,0};
static UCHAR crc169[] = {0,0,1,1,0,0};
-*/
+ */
/*
Real NTSC pixel frequency: 13.5 MHz
WSS bit frequency: 447.443125 kHz
const UINT Ns = 22; // Num pix src
const UINT Nd = 664; // Num pix dst
-// const UINT Nd = 518; // Num pix dst
+ // const UINT Nd = 518; // Num pix dst
UINT Nl = lcm(Ns, Nd); // Num pix in lcm
UINT Ss = Nl / Ns; // Source split (how many lcm px = 1 src px)
UINT Sd = Nl / Nd; // Dst split
-// UCHAR src[Ns];
+ // UCHAR src[Ns];
-/*
+ /*
memcpy(&src[0], startCode, 7);
if (wide) memcpy(&src[7], aspect169, 1);
else memcpy(&src[7], aspect43, 1);
memcpy(&src[8], theRest, 8);
if (wide) memcpy(&src[16], crc169, 6);
else memcpy(&src[16], crc43, 6);
-*/
+ */
-static UCHAR src[22] = {1,0, 0,0,0,0,1,1, 0,0,0,0, 0,0,0,0, 0,0,1,0,0,1 };
+ static UCHAR src[22] = {1,0, 0,0,0,0,1,1, 0,0,0,0, 0,0,0,0, 0,0,1,0,0,1 };
float dst[Nd];
Colour c;
UINT value;
-// This one is the real one
-/*
+ // This one is the real one
+ /*
+ Surface* mysurface = getSurface();
for(UINT q = 0; q < Nd; q++)
{
value = (UINT)(dst[q] * 182); // Apparently this is a better number than 255 for the colour value
c.set(value, value, value);
- getSurface()->drawPixel(q, 6, c);
+ mysurface->drawPixel(q, 6, c);
}
-*/
+ */
-// This one is testing active
-for(int yy = 0; yy < 100; yy++)
-{
- for(UINT q = 0; q < Nd; q++)
+ // This one is testing active
+ Surface* mysurface = getSurface();
+ for(int yy = 0; yy < 100; yy++)
{
- value = (UINT)(dst[q] * 182); // Apparently this is a better number than 255 for the colour value
- c.set(value, value, value);
- getSurface()->drawPixel(q+0, yy, c);
+ for(UINT q = 0; q < Nd; q++)
+ {
+ value = (UINT)(dst[q] * 182); // Apparently this is a better number than 255 for the colour value
+ c.set(value, value, value);
+ mysurface->drawPixel(q+0, yy, c);
+ }
}
}
-
-
-}
-
/*
x6 + x + 1