Using analog pin 6 & 7 on arduino mini?

The arduino mini board may not have pin headers for analog 6 & 7 but those pins are on the atmega chip. I have built a custom circuit board that does break out those pins to headers, but for some reason I cant get them to work. I have heard that you have to go into the pins_arduino.c folder and change something in there but I am not sure what. I am using arduino 0022. Does anyone have any ideas on how to get those two pins working? Any help is appreciated!

Do you want to access the pins as analog (analogRead) or digital (pinMode, digitalRead, etcetera) or both?

Just as digital, I only have led's attached to those pins.

A6 & A7 are only available as analog inputs.
You need to add the extra pins to this area of pins_arduino.c
I stumbled thru this modifying the same for a '1284, so this may not be totally accurate:

This is from the -0022 version

#else
// these arrays map port names (e.g. port B) to the
// appropriate addresses for various functions (e.g. reading
// and writing)
const uint16_t PROGMEM port_to_mode_PGM[] = {
	NOT_A_PORT,
	NOT_A_PORT,
	&DDRB,
	&DDRC,
	&DDRD,
};

const uint16_t PROGMEM port_to_output_PGM[] = {
	NOT_A_PORT,
	NOT_A_PORT,
	&PORTB,
	&PORTC,
	&PORTD,
};

const uint16_t PROGMEM port_to_input_PGM[] = {
	NOT_A_PORT,
	NOT_A_PORT,
	&PINB,
	&PINC,
	&PIND,
};

const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
	PD, /* 0 */
	PD,
	PD,
	PD,
	PD,
	PD,
	PD,
	PD,
	PB, /* 8 */
	PB,
	PB,
	PB,
	PB,
	PB,
	PC, /* 14 */
	PC,
	PC,
	PC,
	PC,
	PC, <<<< add after here
};

const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
	_BV(0), /* 0, port D */
	_BV(1),
	_BV(2),
	_BV(3),
	_BV(4),
	_BV(5),
	_BV(6),
	_BV(7),
	_BV(0), /* 8, port B */
	_BV(1),
	_BV(2),
	_BV(3),
	_BV(4),
	_BV(5),
	_BV(0), /* 14, port C */
	_BV(1),
	_BV(2),
	_BV(3),
	_BV(4),
	_BV(5),   <<<< add them after here also, address as D20/21?
};

const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
	NOT_ON_TIMER, /* 0 - port D */
	NOT_ON_TIMER,
	NOT_ON_TIMER,
	// on the ATmega168, digital pin 3 has hardware pwm
#if defined(__AVR_ATmega8__)
	NOT_ON_TIMER,
#else
	TIMER2B,
#endif
	NOT_ON_TIMER,
	// on the ATmega168, digital pins 5 and 6 have hardware pwm
#if defined(__AVR_ATmega8__)
	NOT_ON_TIMER,
	NOT_ON_TIMER,
#else
	TIMER0B,
	TIMER0A,
#endif
	NOT_ON_TIMER,
	NOT_ON_TIMER, /* 8 - port B */
	TIMER1A,
	TIMER1B,
#if defined(__AVR_ATmega8__)
	TIMER2,
#else
	TIMER2A,
#endif
	NOT_ON_TIMER,
	NOT_ON_TIMER,
	NOT_ON_TIMER,
	NOT_ON_TIMER, /* 14 - port C */
	NOT_ON_TIMER,
	NOT_ON_TIMER,
	NOT_ON_TIMER,
	NOT_ON_TIMER,   <<<< need to add more of these as well
};
#endif

Im not to sure how to do what your telling me i should do. Can you give me an example??

I did - I showed you the areas that need to be added to for the extra pins.

In the first section, you add two more instances of
PC,

In the second section, you add two lines like the others
_BV(6),
_BV(7),

In the third section, you add two more instances of
NOT_ON_TIMER,

I don't know what else you may need to change to actually have A6 & A7 actually be recognized. Maybe nothing?

"ADC7:6 (TQFP and QFN/MLF Package Only)
In the TQFP and QFN/MLF package, ADC7:6 serve as analog inputs to the A/D converter.
These pins are powered from the analog supply and serve as 10-bit ADC channels."

I don't

Ok made the changes to the pins_arduino.c file but I'm still not getting any output on those two pins. Any other suggestions?

made the changes to the pins_arduino.c

For which processor?

I edited the pins_arduino.c file from this path: /Desktop/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino. Inside that .c file I found the position in the code that cross roads indicated I needed to change.

This is a picture of the pcb I made but the two rows analog pins 6 and 7 control are off....

"I'm still not getting any output on those two pins."
And you never will!

As I posted earlier, which was copied from the datasheet:

"ADC7:6 (TQFP and QFN/MLF Package Only)
In the TQFP and QFN/MLF package, ADC7:6 serve as >>> analog inputs <<< to the A/D converter.
These pins are powered from the analog supply and serve as 10-bit ADC channels."

That's all they can be - inputs.
So if you have some other pins you can swap, like reading switches, do that - and then do analog reads to see if they are high or low so you can get the effect of them being digital inputs.