Hi all my friends

First of all, sorry for my broken English. I hope you will understand me.

We are planning to build a CNC controller board based on Mach3. Our CNC control Board is for servo (Pulse, direction at 500KHz). It is also could support stepper motor (100-200KHz).
We are having trouble finding any document that describe the interface format that Mach3 used to communicate with controller board?

Is there any open source project that has embedded code for Mach3 interface?

Any help or ideas would be greatly appreciated.