mirror of
https://github.com/rkujawa/rk65c02.git
synced 2024-12-23 07:30:31 +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
|
||||
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;
|
||||
}
|
||||
|
||||
@ -101,7 +103,9 @@ bus_write_1(bus_t *t, uint16_t addr, uint8_t val)
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@ -111,6 +115,7 @@ bus_init()
|
||||
bus_t t;
|
||||
|
||||
t.dm_head = NULL;
|
||||
t.access_debug = false;
|
||||
|
||||
return t;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user