The RCX requires a 9v power source capable of delivering a current of around 30mA.
The V1.0 Lego RCX came with an external 9v power jack, that was no longer present in later versions, or even some late batches of the 1.0 series. This has been used with other kinds of battery packs - thus allowing the bottom panel to be empty. This can lead to more even distribution of weight and other advantages.
For later RCX versions - it is necessary to examine the wiring Of The RCX Battery Compartment. Once the main terminals (not intermediate) are found, a connector can be soldered into these, and then the connector fitted to the housing.
To avoid soldering onto the RCX terminals, 2 cylinders made the same size of an AA battery, each with a terminal at the opposite end, means that the adaptor can simply be inserted but the RCX itself need not be modified.