the short answer, trick the program into thinkin it is working on the oppisite controller version than it is, and it will work.
Long answer: the logic from face buttons to triggers is reversed. On a CG controller the
face buttons need a Ground signal to produce a button press. On the CG
triggers, a +V signal is needed to produce a button press. Same goes for the Matrix controller except that it is switched to the trigger needing a gnd to activate and the buttons... well you cannot get face buttons to activate by simply putting a signal on them, a transistor is needed to make the connection between the two pads hence its namesake the MATRIX.(thx RDC for that knowledge)
So just make sure the program thinks it is working on a Matrix when installed in a CG and it should work fine. Since I am unfamiliar with this code I am unsure how it determines what controller it is installed in, however it may work out that if you just hook it up how you wanted it may work. The only thing that I know wont work is if you want to have rapidfire on both the A button and the Trigger it wont work with the code the way it is.
So try it, tweak it, and try try again
BTW use the CG! forget about matrix it is a pain to mod.