This is how I intend to use dosbox to control the real pinball machine that I am building based on the design of Pinball Fantasies' PARTYland table:
This is a yet unfinished hack. I am modifying dosbox to act as a light & sensor controller for the real pinball machine. It would send on/off commands to real lights each time it detects an operation on the VGA pallete corresponding to the flashing lights in the game. It would also patch at runtime the variables that contain the x,y cordinates of the ball, each time the real ball touches a sensor, in order to put the virtual ball over the corresponding virtual sensor. This way, the original game acts as the firmware for the real machine, and no new code needs to be written. This method guarantees fidelity to the original game behaviour.
See photos of the pinball machine I am building on my flickr.
The following video shows me filling one of the light inserts using blue epoxy: