Here's a warning that may hopefully save someone else all the hassle we've just had after migrating a product to the Mega8515 - there may be a similar issue with other back-compatible mega parts..
We had some code that was originally written for a 90S4414. This moved to a
90S8515 a while ago when the 4414 went obsolete. We recently changed to the AtMega8515, again due to the old part going obsolete. We then started seeing apparently random eeprom corruption on some units. We could write and verify the eeprom, but after powering off for an hour the data would sometimes be all FFs, and sometimes correct.....After many false leads and much headscratching, I chanced on a subtle difference between the ATMega8515 and the old 90S4414/8515 parts, which is not highlighted in the datasheet ' differences' section (I have emailed Atmel to suggest they add it..).
On the Mega version, The EEADR registers are not initialised to a guaranteed state on reset. They are initialised to 0 on the old 90S parts. As the code was originally for the
4414, (which has 256 bytes eeprom, hence no EEADRH), and then moved with no problems to the 90S8515 (which initilises EEADRH to 0), there was no code to explicitly clear EEADRH, so on the Mega8515, we had what amounted to a 'random page swap' on power-up, and some rather unhappy customers...