Port part of gbmaker.cpp to use new crystal class