}
-#if 0
- /*=* John Sheng [2003.6.20] debug pci *=*/
-#if 0
- if (VIA_DEBUG) {
- GLuint *pnEngBase = (GLuint *)((GLuint)pnMMIOBase + 0x400);
- int nStatus;
- int i = 0;
-
- while (1) {
- nStatus = *pnEngBase;
- if ((nStatus & 0xFFFEFFFF) == 0x00020000) {
- break;
- }
- else {
- GLuint j;
- GLuint *data;
- GLuint k;
- GLuint *ES;
-
- data = (GLuint *)vmesa->dmaAddr;
- ES = pnEngBase;
-
- if (i == 500000) {
- for (k =0 ; k < 35; k++) {
- fprintf(stderr, "%02xh - %02xh\n", k*4 + 3, k*4);
- fprintf(stderr, "%08x\n", *ES);
- ES++;
- }
- fprintf(stderr, "current command buffer");
- fprintf(stderr, "i = %d\n", i);
- for (j = 0; j < vmesa->dmaLow; j += 16) {
- fprintf(stderr, "%08x ", *data++);
- fprintf(stderr, "%08x ", *data++);
- fprintf(stderr, "%08x ", *data++);
- fprintf(stderr, "%08x\n", *data++);
- }
- }
- data = (GLuint *)vmesa->dma;
- if (i == 500000) {
- fprintf(stderr, "previous command buffer");
- fprintf(stderr, "i = %d\n", i);
- for (j = 0; j < dmaLow; j += 16) {
- fprintf(stderr, "%08x ", *data++);
- fprintf(stderr, "%08x ", *data++);
- fprintf(stderr, "%08x ", *data++);
- fprintf(stderr, "%08x\n", *data++);
- }
- }
- }
- i++;
- }
- }
- dmaLow = vmesa->dmaLow;
-#endif
-
return 0;
}