Page 1 of 1

Inter-application communication..(design)

Posted: Sat Feb 10, 2007 3:05 pm
by earlz
I am making a pc emulator, but rather than have all of the devices contained in one binary file, I instead am using dlls/SO's, but now I have a problem with design

for external devices I have a GlobStruct type interface where Open86Init(GlobStruct *globs); is called, this global struct has everything that the device should need, from where memory is located(a pointer), to the values of all the registers

but now, I want for devices to rely on each other for ease of programming, for instance if your gonna write a VGA video card, you don't want to worry about gui crap,

now my design problem is how the crap do I make this nice and managable, btw I'm using C

Posted: Sat Feb 10, 2007 3:10 pm
by Alboin
IPC?

If you wanted a module to talk to another module, you could have the module wanting to talk query the main program to see if the other module even exists. If not, the main program loads it, and returns a handle for IPC. Then, have a standardish IPC interface so that the modules can understand each other.

Posted: Sat Feb 10, 2007 3:32 pm
by earlz
hmmm...jsut made me kinda think...I've been thinking a one way direct event(interrupt) driven way...I could also do indirect, like tell the core that it would like to request to send an event, or even message based, but I don't like messaging so probably not