target: move code for CDB emulation