Programming all sorts of AVR's with the Arduino IDE.

The other chips need a /variants folder created, a boards.txt file for the chip, a pins_aduino.h file for the chip, and the core files.
See here as an example for the Atmega1284P:

Those 2 chips have been done before, I don't know where to point you to to find them tho.