From AVRFreaks forums. Dude said it works.

/* Read ADC on ATMega128 */
 
void adc_init(void)
{
DDRC = 0x00;
PORTC = 0x00;
ADCSRA = 0x00; //disable adc
ADMUX = 0x00;
ACSR = 0x80;
ADCSRA = 0x81;
}

unsigned int adc_get(unsigned char chx)
{
unsigned int n;

ADMUX = chx;
ADCSRA = (1<