arduino mega 2560 ir library

Im planning on a project utilizing the ir library but I was researching and it seems the mega2560 isn't directly compatible due to something with the timer 2 and different hardcoded pins
does a modded library exist that I can simply download, or do I need to modify the library file? Im good at arduino code sorta, so I probablly could but I don't know anything about the actual hardware or what to change

The Arduino pins corresponding to the various timers for Arduino and Mega are summarised in a table on my page about ATmega timers: Advanced Arduino: direct use of ATmega counter/timers

So if I substitute the uno pin for mega it will wori without code change because it is based on the timer mapping, correct?

Did you get anywhere with the Arduino Mega IR functions problem.
I have tried to get my Mega 2560 to do a simple read of a 38kHz IR detector and having tried a few pins, 11,10 and 47 have got unreliable results and most of it not decoding at all.
Some of the dumps sort of look promising -

0
Could not decode message
Raw (68): -13296 8850 -4450 500 -650 450 -600 550 -600 450 -650 500 -600 500 -600 500 -600 500 -600 500 -1750 500 -1700 500 -1700 500 -1750 500 -1700 500 -1700 500 -1750 500 -1700 500 -1700 500 -650 450 -1750 450 -650 500 -1700 500 -650 450 -650 450 -650 500 -600 500 -1700 500 -650 450 -1750 500 -600 500 -1700 500 -1700 550 -1700 500
0
Could not decode message
Raw (26): 16764 2400 -600 550 -650 550 -650 1200 -600 550 -650 550 -650 550 -650 550 -700 1150 -650 550 -650 550 -650 550 -650 550
210
Decoded SONY: 210 (12 bits)
Raw (26): -25000 2350 -600 550 -650 550 -650 1150 -600 600 -650 550 -650 500 -650 600 -650 1150 -650 550 -650 550 -600 600 -600 600
0
Could not decode message
Raw (26): 31102 2350 -650 1150 -650 1150 -650 550 -650 550 -650 500 -700 500 -700 550 -700 1150 -650 500 -700 550 -650 550 -650 500

One or two Sony were detected out of about 30 presses (I have just a shown some above to include a Sony that "worked"). I was using pin10 for the input.

Cheers, Rob

I ended up using an uno for the project, was just easier at the time
either way I found trying to receive raw data was always irregular but nec, sont and rc5 all work pretty well

Pin 9 on the Mega works, great link above! thanks

I tried to use pin no.2, 3 & 9 and <IRremote.h> library but there is some error

"int RECV_PIN = TKD2; // the pin the IR receiver is connected to
exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560."

Is the above error above due to Wrong Pin or Wrong Library.