// NOTE: Would subtract 2 if in interlaced mode...!
// uint64 height = ((p0 & 0xFFC000) - 0x4000) & 0xFFC000;
// if (height)
- height--;
+ height--;
uint64 data = (p0 & 0xFFFFF80000000000LL) >> 40;
uint64 dwidth = (p1 & 0xFFC0000) >> 15;
//WriteLog("\t\tOld OP: %08X -> ", op_pointer);
//Temp, for testing...
//No doubt, this type of check will break all kinds of stuff... !!! FIX !!!
+//And it does! !!! FIX !!!
if (op_pointer > ((p0 & 0x000007FFFF000000LL) >> 21))
return;
{
WriteLog("OP: Scaled line. SP=%i, EP=%i, clip=%u, iwidth=%u, hscale=%02X, depth=%u, firstPix=%u\n", startPos, endPos, clippedWidth, iwidth, hscale, depth, firstPix);
DumpScaledObject(p0, p1, p2);
+ if (iwidth == 7)
+ {
+ WriteLog(" %08X: ", data);
+ for(int i=0; i<7*8; i++)
+ WriteLog("%02X ", JaguarReadByte(data+i));
+ WriteLog("\n");
+ }
}
// If the image is sitting on the line buffer left or right edge, we need to compensate
// by decreasing the image phrase width accordingly.
// uint32 lbufAddress = 0x1800 + (!in24BPPMode ? startPos * 2 : startPos * 4);
uint32 lbufAddress = 0x1800 + startPos * 2;
uint8 * currentLineBuffer = &tom_ram_8[lbufAddress];
-uint8 * lineBufferLowerLimit = &tom_ram_8[0x1800],
- * lineBufferUpperLimit = &tom_ram_8[0x1800 + 719];
+//uint8 * lineBufferLowerLimit = &tom_ram_8[0x1800],
+// * lineBufferUpperLimit = &tom_ram_8[0x1800 + 719];
// Render.
currentLineBuffer += lbufDelta;
- horizontalRemainder -= 0x20; // Subtract 1.0f in [3.5] fixed point format
+/* horizontalRemainder -= 0x20; // Subtract 1.0f in [3.5] fixed point format
while (horizontalRemainder & 0x80)
+ {
+ horizontalRemainder += hscale;
+ pixCount++;
+ pixels <<= 1;
+ }//*/
+ while (horizontalRemainder <= 0x20) // I.e., it's <= 0 (*before* subtraction)
{
horizontalRemainder += hscale;
pixCount++;
pixels <<= 1;
}
+ horizontalRemainder -= 0x20; // Subtract 1.0f in [3.5] fixed point format
if (pixCount > 63)
{
currentLineBuffer += lbufDelta;
- horizontalRemainder -= 0x20; // Subtract 1.0f in [3.5] fixed point format
+/* horizontalRemainder -= 0x20; // Subtract 1.0f in [3.5] fixed point format
while (horizontalRemainder & 0x80)
+ {
+ horizontalRemainder += hscale;
+ pixCount++;
+ pixels <<= 2;
+ }//*/
+ while (horizontalRemainder <= 0x20) // I.e., it's <= 0 (*before* subtraction)
{
horizontalRemainder += hscale;
pixCount++;
pixels <<= 2;
}
+ horizontalRemainder -= 0x20; // Subtract 1.0f in [3.5] fixed point format
if (pixCount > 31)
{
currentLineBuffer += lbufDelta;
- horizontalRemainder -= 0x20; // Subtract 1.0f in [3.5] fixed point format
+/* horizontalRemainder -= 0x20; // Subtract 1.0f in [3.5] fixed point format
while (horizontalRemainder & 0x80)
+ {
+ horizontalRemainder += hscale;
+ pixCount++;
+ pixels <<= 4;
+ }//*/
+ while (horizontalRemainder <= 0x20) // I.e., it's <= 0 (*before* subtraction)
{
horizontalRemainder += hscale;
pixCount++;
pixels <<= 4;
}
+ horizontalRemainder -= 0x20; // Subtract 1.0f in [3.5] fixed point format
if (pixCount > 15)
{
currentLineBuffer += lbufDelta;
- horizontalRemainder -= 0x20; // Subtract 1.0f in [3.5] fixed point format
- while (horizontalRemainder & 0x80)
+ while (horizontalRemainder <= 0x20) // I.e., it's <= 0 (*before* subtraction)
{
horizontalRemainder += hscale;
pixCount++;
pixels <<= 8;
}
+ horizontalRemainder -= 0x20; // Subtract 1.0f in [3.5] fixed point format
if (pixCount > 7)
{
currentLineBuffer += lbufDelta;
- horizontalRemainder -= 0x20; // Subtract 1.0f in [3.5] fixed point format
+/* horizontalRemainder -= 0x20; // Subtract 1.0f in [3.5] fixed point format
while (horizontalRemainder & 0x80)
+ {
+ horizontalRemainder += hscale;
+ pixCount++;
+ pixels <<= 16;
+ }//*/
+ while (horizontalRemainder <= 0x20) // I.e., it's <= 0 (*before* subtraction)
{
horizontalRemainder += hscale;
pixCount++;
pixels <<= 16;
}
+ horizontalRemainder -= 0x20; // Subtract 1.0f in [3.5] fixed point format
if (pixCount > 3)
{
}
}
}
-/*if (depth == 3 && startPos == 13)
-{
-if (op_start_log)
-WriteLog("OP: Writing in the margins...\n");
- for(int i=0; i<100*2; i+=2)
-// for(int i=0; i<14*2; i+=2)
- tom_ram_8[0x1800 + i] = 0xFF,
- tom_ram_8[0x1800 + i + 1] = 0xFF;
-}*/
-// uint32 lbufAddress = 0x1800 + (!in24BPPMode ? startPos * 2 : startPos * 4);
-// uint8 * currentLineBuffer = &tom_ram_8[lbufAddress];
}