We present two new Monte Carlo sources for the DOSXYZnrc code, which can be used to compute dose distributions due to continuously variable beam configurations. These sources support a continuously rotating gantry and collimator, dynamic multileaf collimator (MLC) motion, variable monitor unit (MU) rate, couch rotation and translation in any direction, arbitrary isocentre motion with respect to the patient and variable source-to-axis distance (SAD). These features make them applicable to Monte Carlo simulations for RapidArc, Elekta VMAT, TomoTherapy and CyberKnife. Unique to these sources is the synchronization between the motion in the DOSXYZnrc geometry and the motion within the linac head, represented by a shared library (either a BEAMnrc accelerator with dynamic component modules, or an external library). The simulations are achieved in single runs, with no intermediate phase space files.