This first sketch of the memory layout isn't working because I'm not succeeding in packing the bitfields, so I intend to rip it up and start again.