Understanding the causes of spatial variation in species richness is a major research focus of biogeography and macroecology. Gridded environmental data and species richness maps have been used in increasingly sophisticated curve-fitting analyses, but these methods have not brought us much closer to a mechanistic understanding of the patterns. During the past two decades, macroecologists have successfully addressed technical problems posed by spatial autocorrelation, intercorrelation of predictor variables and non-linearity. However, curve-fitting approaches are problematic because most theoretical models in macroecology do not make quantitative predictions, and they do not incorporate interactions among multiple forces. As an alternative, we propose a mechanistic modelling approach. We describe computer simulation models of the stochastic origin, spread, and extinction of species' geographical ranges in an environmentally heterogeneous, gridded domain and describe progress to date regarding their implementation. The output from such a general simulation model (GSM) would, at a minimum, consist of the simulated distribution of species ranges on a map, yielding the predicted number of species in each grid cell of the domain. In contrast to curve-fitting analysis, simulation modelling explicitly incorporates the processes believed to be affecting the geographical ranges of species and generates a number of quantitative predictions that can be compared to empirical patterns. We describe three of the 'control knobs' for a GSM that specify simple rules for dispersal, evolutionary origins and environmental gradients. Binary combinations of different knob settings correspond to eight distinct simulation models, five of which are already represented in the literature of macroecology. The output from such a GSM will include the predicted species richness per grid cell, the range size frequency distribution, the simulated phylogeny and simulated geographical ranges of the component species, all of which can be compared to empirical patterns. Challenges to the development of the GSM include the measurement of goodness of fit (GOF) between observed data and model predictions, as well as the estimation, optimization and interpretation of the model parameters. The simulation approach offers new insights into the origin and maintenance of species richness patterns, and may provide a common framework for investigating the effects of contemporary climate, evolutionary history and geometric constraints on global biodiversity gradients. With further development, the GSM has the potential to provide a conceptual bridge between macroecology and historical biogeography.