Adjusting arduinofirmata node for arduino-MEGA

hi all

thnx for the arduinofirmata node, makes things a lot easier for me…
I want to use it for arduino mega, I need more ins and outs.
I know this is possible, I need to adjust the sourcecode, I got this link from u7angel:

but I am not sure wich of the listed documents I have to adjust, and what to do more

what I did, i took the code of the arduinofirmata(devices)help.v4p, and
I tried to adjust all the 6-es (of the analog ins, I need 7) to 16
and all the 12-s (of the digital out, i need 20) to 20.

that did not really work, not so suprisingly,

can anybody give me some advice?