X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fop.cpp;h=25322c91c6109b280bb2fbf01763924bce537e90;hb=cdc64706c10d3fe005fecff5d000fe60b3980a3b;hp=f9264c50a69d34e65a0f38bb70dae90731c4c452;hpb=d9abe1a157bbd35e8b282927489b687f56048ce6;p=virtualjaguar diff --git a/src/op.cpp b/src/op.cpp index f9264c5..25322c9 100644 --- a/src/op.cpp +++ b/src/op.cpp @@ -20,7 +20,7 @@ #include "gpu.h" #include "jaguar.h" #include "log.h" -#include "m68k.h" +#include "m68000/m68kinterface.h" #include "memory.h" #include "tom.h" @@ -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,27 +185,46 @@ void OPDone(void) WriteLog("\n"); #else +//#warning "!!! Fix lockup in OPDiscoverObjects() !!!" +//temp, to keep the following function from locking up on bad/weird OLs +//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 }; @@ -423,6 +436,7 @@ void DumpBitmapCore(uint64 p0, uint64 p1) (flags&OPFLAG_RELEASE ? "RELEASE" : ""), idx, pitch); } + // // Object Processor main routine // @@ -861,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 // @@ -1325,6 +1340,7 @@ if (firstPix) } } + // // Store scaled bitmap in line buffer //