It works something like this:

It seems like it could be adapted to a full auto BB gun. The firing rate might be unacceptably high, but it might be possible to use a heavy piston, longer throw, or springs to slow it down.
One vent could also be used to actuate feeding.
Anyone build anything like this before?