You don't HAVE to use an existing rifle. You could try and combine different guns to get your result.
- The magazine in the AR uses a 7.62 x 51 mm cartridge, the same one in the M14 and the SR-25. SR-25 magazines look similar to the AR magazines so those would be your best bet. You have to make a magazine catch fit or make your own.
- Inner barrel lengths will vary, so you will just have to see what looks long enough. You can use PVC piping to give it support. The hop up unit could be anything, just experiment.
- As for the gearbox, just make a hinged butt plate to insert it and see if an AUG/L85/P90 gearbox will fit the spacing requirements. The only other problem you find is the trigger assembly. You are going to have to experiment with that.
- Battery could go anywhere. In the foregrip, near the ammo counter, even the pistol grip. You just have to route the wires that direction where ever you choose.
- If you want a working ammo counter, look into the M41A Pulse rifle. It is a weapon from the 1985 movie "Aliens", but it featured an ammo counter on the side of the rifle. You might have to tweak the design, but you could get it to work.
I have too much time to spare in my life so I think about things like this. I have always wanted to do this, but never got around to getting the parts.
EDIT: The FAMAS is a bad choice because it uses a Version 1 gearbox, one of the rarest gearboxes ever. Parts are going to be hard to find if you need to replace them, and believe me, you will need to replace them. The F2000 might be okay. You will have to relocate the battery from the end of the stock, but it could work some body modification. The F2000 uses a modified Version 2 gearbox, one of the most popular gearboxes making parts readily available. The key word is "modified", so not all parts will work, but a good number will.