multibus: fixed regression on isbc202#13594
Conversation
cuavas
left a comment
There was a problem hiding this comment.
Do you think this is the best approach? Would it be better to change the slot constructor to allow a clock frequency to be supplied rather than always using zero?
|
|
||
| // Y1 oscillator of IPC board: 19.6608 MHz | ||
| #define IPC_XTAL_Y1 19.6608_MHz_XTAL | ||
| constexpr auto IPC_XTAL_Y1 = 19.6608_MHz_XTAL; |
There was a problem hiding this comment.
If you turn this into a global variable, it needs to have a constant address across an invocation and hence increases static data size. If it’s only used in a single function, you can make it a local variable.
There was a problem hiding this comment.
Aren't constexpr variables implicitly inline since C++17?
There was a problem hiding this comment.
Only constexpr static data members are implicitly inline. A scope constexpr variable implicitly static.
But if the address of a static inline data member leaks out of a function (e.g. by passing it to logerror or something else that implicitly passes by reference), the compiler will instantiate an out-of-line copy, and the linker needs to coalesce the out-of-line copies at link time. It doesn’t actually prevent the increase in static data size.
|
Better like this? |
|
@cuavas May I ask you if you think this can be merged, please? Thanks |
|
Well there are two issues with it now:
|
Hi,
this commit fixes a regression on isbc202 emulation caused by cf67936, which removed ownership of multibus slots by multibus bus. By doing so it removed the propagation of clock down to cards.
iSBC202 was affected because it (probably) is the only multibus card in MAME that relies on clock to come from the bus.
Thanks.
--F.Ulivi