atMega 8 on duemilanove

So which versions of the ATmega are pin compatible to each other?

I'm aware of the mega8, mega168 and 328.

Thanks in advance.

--
M.S.