Since it sounds like you want to use something like this:
There are a couple of other things to consider.
First of all, like emercer says, the 7805 will "waste" almost half of the energy, when the battery is full. However that won't matter much, since after just a couple of minutes (10-20) the voltage will have dropped considerably.
I haven't found any reliable source on how long a typical 9V battery will take to reach ~6.5V (rough minimum where a L7805 would still work) at a drain of 500mA, but that is because non of the normal 9V batteries are rated for such a strong current.
I've found facts from two different batteries. One says the total capacity of the battery is only ~350mA at a drain of 500mA, the other lists only 50mA as maximum drain. It all depends a lot on the specific battery type, but almost anything that has 500mAh capacity at 9V is not rated for a continous current of 500mA.
In my opinion the simplest way to power the pi from batteries would be 6 AA NiMH rechargable batteries and a switching converter. These should power the pi for >4 hours at a reasonable size. If you need a smaller size, you could simply go to AAA or use Lithium Ion batteries.