Some internal values in pci.c are now 8-bit, which should reduce the number of screw-ups;
ET4000/W32p PCI writes now sanitize the address first; Removed excess logging related to the ET4000/W32p.
This commit is contained in:
@@ -13,7 +13,7 @@ void icd2061_write(icd2061_t *icd2061, int val)
|
||||
int q, p, m, i, a;
|
||||
if ((val & 1) && !(icd2061->state & 1))
|
||||
{
|
||||
pclog("ICD2061 write %02X %i %08X %i\n", val, icd2061->unlock, icd2061->data, icd2061->pos);
|
||||
// pclog("ICD2061 write %02X %i %08X %i\n", val, icd2061->unlock, icd2061->data, icd2061->pos);
|
||||
if (!icd2061->status)
|
||||
{
|
||||
if (val & 2)
|
||||
@@ -35,7 +35,7 @@ void icd2061_write(icd2061_t *icd2061, int val)
|
||||
icd2061->pos++;
|
||||
if (icd2061->pos == 26)
|
||||
{
|
||||
pclog("ICD2061 data - %08X\n", icd2061->data);
|
||||
// pclog("ICD2061 data - %08X\n", icd2061->data);
|
||||
a = (icd2061->data >> 21) & 0x7;
|
||||
if (!(a & 4))
|
||||
{
|
||||
@@ -43,16 +43,16 @@ void icd2061_write(icd2061_t *icd2061, int val)
|
||||
m = 1 << ((icd2061->data >> 7) & 0x7);
|
||||
p = ((icd2061->data >> 10) & 0x7f) - 3;
|
||||
i = (icd2061->data >> 17) & 0xf;
|
||||
pclog("p %i q %i m %i\n", p, q, m);
|
||||
// pclog("p %i q %i m %i\n", p, q, m);
|
||||
if (icd2061->ctrl & (1 << a))
|
||||
p <<= 1;
|
||||
icd2061->freq[a] = ((double)p / (double)q) * 2.0 * 14318184.0 / (double)m;
|
||||
pclog("ICD2061 freq %i = %f\n", a, icd2061->freq[a]);
|
||||
// pclog("ICD2061 freq %i = %f\n", a, icd2061->freq[a]);
|
||||
}
|
||||
else if (a == 6)
|
||||
{
|
||||
icd2061->ctrl = val;
|
||||
pclog("ICD2061 ctrl = %08X\n", val);
|
||||
// pclog("ICD2061 ctrl = %08X\n", val);
|
||||
}
|
||||
icd2061->unlock = icd2061->data = 0;
|
||||
icd2061->status = 0;
|
||||
@@ -64,6 +64,6 @@ void icd2061_write(icd2061_t *icd2061, int val)
|
||||
|
||||
double icd2061_getfreq(icd2061_t *icd2061, int i)
|
||||
{
|
||||
pclog("Return freq %f\n", icd2061->freq[i]);
|
||||
// pclog("Return freq %f\n", icd2061->freq[i]);
|
||||
return icd2061->freq[i];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user