// for(int i=M68K_REG_A0; i<=M68K_REG_A7; i++)
// WriteLog("\tA%i = 0x%.8x\n", i-M68K_REG_A0, m68k_get_reg(NULL, (m68k_register_t)i));
int32 topOfStack = m68k_get_reg(NULL, M68K_REG_A7);
- WriteLog("M68K: Top of stack: %08X. Stack trace:\n", JaguarReadLong(topOfStack));
+ WriteLog("M68K: Top of stack: %08X -> (%08X). Stack trace:\n", topOfStack, JaguarReadLong(topOfStack));
+#if 0
for(int i=-2; i<9; i++)
WriteLog("%06X: %08X\n", topOfStack + (i * 4), JaguarReadLong(topOfStack + (i * 4)));
+#else
+ uint32 address = topOfStack - (4 * 4 * 3);
+
+ for(int i=0; i<10; i++)
+ {
+ WriteLog("%06X:", address);
+
+ for(int j=0; j<4; j++)
+ {
+ WriteLog(" %08X", JaguarReadLong(address));
+ address += 4;
+ }
+
+ WriteLog("\n");
+ }
+#endif
/* WriteLog("\nM68000 disassembly at $802288...\n");
jaguar_dasm(0x802288, 3);
static const char * opType[8] =
{ "(BITMAP)", "(SCALED BITMAP)", "(GPU INT)", "(BRANCH)", "(STOP)", "???", "???", "???" };
static const char * ccType[8] =
- { "\"==\"", "\"<\"", "\">\"", "(opflag set)", "(second half line)", "?", "?", "?" };
+ { "==", "<", ">", "(opflag set)", "(second half line)", "?", "?", "?" };
static uint32 object[8192];
static uint32 numberOfObjects;
//static uint32 objectLink[8192];
//return;
numberOfObjects = 0;
-//printf("OPDiscoverObjects...\n");
OPDiscoverObjects(olp);
-//printf("OPDumpObjectList...\n");
OPDumpObjectList();
#endif
}
uint32 lo = JaguarReadLong(address + 4, OP);
uint8 objectType = lo & 0x07;
uint32 link = ((hi << 11) | (lo >> 21)) & 0x3FFFF8;
- WriteLog("%08X: %08X %08X %s", address, hi, lo, opType[objectType]);
+ WriteLog("%08X: %08X %08X %s -> $08X", address, hi, lo, opType[objectType], link);
if (objectType == 3)
{
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);
+ WriteLog(" YPOS %s %u", ccType[cc], ypos);
}
WriteLog("\n");
uint8 flags = (p1 >> 45) & 0x0F;
uint8 idx = (p1 >> 38) & 0x7F;
uint32 pitch = (p1 >> 15) & 0x07;
- WriteLog(" [%u x %u @ (%i, %u) (iw:%u, dw:%u) (%u bpp), l:%08X, p:%08X fp:%02X, fl:%s%s%s%s, idx:%02X, pt:%02X]\n",
+ WriteLog(" [%u x %u @ (%i, %u) (iw:%u, dw:%u) (%u bpp), p:%08X fp:%02X, fl:%s%s%s%s, idx:%02X, pt:%02X]\n",
iwidth * bdMultiplier[bitdepth],
- height, xpos, ypos, iwidth, dwidth, op_bitmap_bit_depth[bitdepth], link,
+ height, xpos, ypos, iwidth, dwidth, op_bitmap_bit_depth[bitdepth],
ptr, firstPix, (flags&OPFLAG_REFLECT ? "REFLECT " : ""),
(flags&OPFLAG_RMW ? "RMW " : ""), (flags&OPFLAG_TRANS ? "TRANS " : ""),
(flags&OPFLAG_RELEASE ? "RELEASE" : ""), idx, pitch);
#warning "Need to fix this so that when an GPU object IRQ happens, we can pick up OP processing where we left off. !!! FIX !!!"
void OPProcessList(int halfline, bool render)
{
-#warning "!!! NEED TO HANDLE MULTIPLE FIELDS PROPERLY !!!
+#warning "!!! NEED TO HANDLE MULTIPLE FIELDS PROPERLY !!!"
// We ignore them, for now; not good
halfline &= 0x7FF;