mirror of
https://github.com/rkujawa/rk65c02.git
synced 2024-06-26 04:29:27 +00:00
Bus access debugging can be enabled run-time via boolean.
This commit is contained in:
parent
0735487ed0
commit
a1785ae68d
|
@ -89,7 +89,9 @@ bus_read_1(bus_t *t, uint16_t addr)
|
||||||
else
|
else
|
||||||
val = d->read_1(d, off);
|
val = d->read_1(d, off);
|
||||||
|
|
||||||
printf("bus READ @ %x (off %x) value %x\n", addr, off, val);
|
if (t->access_debug)
|
||||||
|
printf("bus READ @ %x (off %x) value %x\n", addr, off, val);
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +103,9 @@ bus_write_1(bus_t *t, uint16_t addr, uint8_t val)
|
||||||
|
|
||||||
bus_access_device(t, addr, &d, &off);
|
bus_access_device(t, addr, &d, &off);
|
||||||
|
|
||||||
printf("bus WRITE @ %x (off %x) value %x\n", addr, off, val);
|
if (t->access_debug)
|
||||||
|
printf("bus WRITE @ %x (off %x) value %x\n", addr, off, val);
|
||||||
|
|
||||||
d->write_1(d, off, val);
|
d->write_1(d, off, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,6 +115,7 @@ bus_init()
|
||||||
bus_t t;
|
bus_t t;
|
||||||
|
|
||||||
t.dm_head = NULL;
|
t.dm_head = NULL;
|
||||||
|
t.access_debug = false;
|
||||||
|
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user