Firmware question

I'm trying to create a HID compliant MIDI device using the HIDUINO firmware, and I was wondering, is atmega 8U2 firmware compatible with the Atmega 16U2 used on the arduino r3?

Hiduino :

I think that the ATmega8U2 is identical with the ATmega16U2. The ATmega16U2 has larger memory, but I think that the code of the the ATmega8U2 will do the same on a ATmega16U2. I'm 80% sure of it.