The only callback you get before object finders are resolved is config complete. You need to be kind of careful with config complete because there’s some weirdness with what happens with how slot cards are instantiated and added. The resolve objects callback happens
after object finders are resolved.
You obviously can’t throw
device_missing_dependencies
from anywhere except
device_start
because MAME assumes all the other callbacks can be called in tree walk order without having to worry about backtracking to deal with stragglers.
Anyway, I don’t know if there’s a nice way to do this with an object finder. In most cases, when there are situations where cards need to know about some resource (a bus, address space or something), they’re supplied with a pointer to the object itself at resolve objects or start time, not information for setting up an object finder.
The only thing I can think of at the moment that might work is:
- In
device_config_complete
for the bus, tell the slots what the space finder’s details are. - In
device_config_complete
for the cards, ask the slot what the space finder’s details are and pass that on to the DP83932 .
The slots will definitely be present when
device_config_complete
is called for the bus. When
device_config_complete
is called for a card, its host slot will definitely be present (it’s the parent device).
Just remember the card needs to survive
device_config_complete
without a slot for
-valid
,
-listxml
, etc. It doesn’t have to do anything useful, but it needs to not crash if its parent isn’t a slot.