I am writing an emulator for a small 8 bit computer. It's a kind of prototyping and debugging tool for the real thing I have on a breadboard. It already can emulate highly timing sensitive code and give me information about what is going on inside the processor., so that is not the issue.
However, I need to have a more flexible model of the memory map of the system and the devices that are attached to the processor's bus. Emulating is faster than wiring it all on a breadboard. To get that flexibility, almost nothing is hard coded. Instead I have lists of objects (the processor, memory blocks and devices) that are 'wired up' by object references and events. A complete configuration is not some orderly tree, it's more like everything can be connected to everything else. Circular references not a rare thing at all. For example, one of the processor's output ports is hooked up to a parallel port device, which in turn provides the page address of a paged memory block, which again references the CPU in order to provide it with data from memory.
Of course I need something to reconfigure this as needed. In the past I have used XML or XAML to edit and serialize/deserialize such configurations, but I'm not sure about using it here. In a small computer the CPU is the source and also the destination of almost everything going on, leading to such circular definitions.
What I have tried:
As staded above, I used XML or XAML in the past, however the presence of circular references of events does not make this appear to be a good idea here. I'm looking for an alternative that offers similar convenience, but also can deal with circular definitions.