Modelling and simulation is a critical stage in the design and testing of complex systems, in particular humanoid robots. Our motivation to develop a new simulator is that existing tools do not provide the flexibility needed for modelling the C-Cub, the most recent open source humanoid robot with compliant joints developed at the Italian Institute of Technology (IIT). Furthermore, we are interested in a simulator where the user has the ability to customize the simulation in order to represent the actuators and sensors that are actually used. In this paper, a simulator based on Robotran, a symbolic multibody modelling software tool, and Matlab is described. The approach presented in the paper has been used to develop and test control systems for the C-Cub and an earlier version (iCub).