X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fop.cpp;h=25322c91c6109b280bb2fbf01763924bce537e90;hb=cdc64706c10d3fe005fecff5d000fe60b3980a3b;hp=8708d9b34418c81a28ca6f279f5a81e65a51d953;hpb=26044acf8a4fe70772bd6e69afb8b8d20b5a6af5;p=virtualjaguar diff --git a/src/op.cpp b/src/op.cpp index 8708d9b..25322c9 100644 --- a/src/op.cpp +++ b/src/op.cpp @@ -42,10 +42,12 @@ #define CONDITION_OP_FLAG_SET 3 #define CONDITION_SECOND_HALF_LINE 4 +#if 0 #define OPFLAG_RELEASE 8 // Bus release bit #define OPFLAG_TRANS 4 // Transparency bit #define OPFLAG_RMW 2 // Read-Modify-Write bit #define OPFLAG_REFLECT 1 // Horizontal mirror bit +#endif // Private function prototypes @@ -125,6 +127,7 @@ void OPInit(void) OPReset(); } + // // Object Processor reset // @@ -134,6 +137,7 @@ void OPReset(void) objectp_running = 0; } + static const char * opType[8] = { "(BITMAP)", "(SCALED BITMAP)", "(GPU INT)", "(BRANCH)", "(STOP)", "???", "???", "???" }; static const char * ccType[8] = @@ -143,6 +147,7 @@ static uint32 numberOfObjects; //static uint32 objectLink[8192]; //static uint32 numberOfLinks; + void OPDone(void) { //#warning "!!! Fix OL dump so that it follows links !!!" @@ -180,31 +185,46 @@ void OPDone(void) WriteLog("\n"); #else -#warning "!!! Fix lockup in OPDiscoverObjects() !!!" +//#warning "!!! Fix lockup in OPDiscoverObjects() !!!" //temp, to keep the following function from locking up on bad/weird OLs -return; +//return; numberOfObjects = 0; +//printf("OPDiscoverObjects...\n"); OPDiscoverObjects(olp); +//printf("OPDumpObjectList...\n"); OPDumpObjectList(); #endif } -void OPDiscoverObjects(uint32 address) + +bool OPObjectExists(uint32 address) { - // Check to see if we've already seen this object + // Yes, we really do a linear search, every time. :-/ for(uint32 i=0; i> 3) & 0x7FF; - uint8 cc = (lo >> 14) & 0x07; // Proper # of bits == 3 - - // Recursion needed to follow all links! + // Recursion needed to follow all links! This does depth-first recursion + // on the not-taken objects OPDiscoverObjects(address + 8); } - if (address == link) // Ruh roh... - { - // Runaway recursive link is bad! - return; - } - + // Get the next object... address = link; - - // Check to see if we've already seen this object, and add it if not - bool seenObject = false; - - for(uint32 i=0; i>32), (uint32)(p1&0xFFFFFFFF)); DumpBitmapCore(p0, p1); } + void DumpBitmapCore(uint64 p0, uint64 p1) { uint32 bdMultiplier[8] = { 64, 32, 16, 8, 4, 2, 1, 1 }; @@ -427,6 +436,7 @@ void DumpBitmapCore(uint64 p0, uint64 p1) (flags&OPFLAG_RELEASE ? "RELEASE" : ""), idx, pitch); } + // // Object Processor main routine // @@ -865,6 +875,7 @@ OP: Scaled bitmap 4x? 4bpp at 34,? hscale=80 fpix=0 data=000756E8 pitch 1 hflipp } } + // // Store fixed size bitmap in line buffer // @@ -1329,6 +1340,7 @@ if (firstPix) } } + // // Store scaled bitmap in line buffer //