The Firmata library ships with the IDE. What version of the IDE are you using? Which Firmata sketch did you upload to the Mega? What does your Processing sketch look like? The Boards.h file in the Firmata library suggests that the Mega supports analogRead on 16 pins.