That looks right, yeah. And bitswap is a MAME utility thing, it's not something you'd know generally from C++ :-)