- uint16 ypos = (lo >> 3) & 0x7FF;
- uint8 cc = (lo >> 14) & 0x07; // Proper # of bits == 3
- WriteLog(" YPOS=%u, CC=%s, link=$%08X", ypos, ccType[cc], link);
-
- // Recursion needed to follow all links!
- WriteLog("\n");
- OPDumpObjectList(address + 8);
-
- // Do the sanity check after recursive call: We may have already seen this...
- // Sanity checking: If we've already visited this link, bail out!
-//disnowok: we added ourself above
-// for(uint32 i=0; i<numberOfLinks; i++)
-// {
-// if (address == objectLink[i])
-// return;
-// }
+ // Recursion needed to follow all links! This does depth-first recursion
+ // on the not-taken objects
+ OPDiscoverObjects(address + 8);
+ }
+
+ // Get the next object...
+ address = link;
+ }
+ while (objectType != 4);
+}
+
+
+void OPDumpObjectList(void)
+{
+ for(uint32_t i=0; i<numberOfObjects; i++)
+ {
+ uint32_t address = object[i];
+
+ uint32_t hi = JaguarReadLong(address + 0, OP);
+ uint32_t lo = JaguarReadLong(address + 4, OP);
+ uint8_t objectType = lo & 0x07;
+ uint32_t link = ((hi << 11) | (lo >> 21)) & 0x3FFFF8;
+ WriteLog("%08X: %08X %08X %s -> $08X", address, hi, lo, opType[objectType], link);
+
+ if (objectType == 3)
+ {
+ uint16_t ypos = (lo >> 3) & 0x7FF;
+ uint8_t cc = (lo >> 14) & 0x07; // Proper # of bits == 3
+ WriteLog(" YPOS %s %u", ccType[cc], ypos);