A computer simulation of the Homogenous Charge Compression Ignition (HCCI) four-stroke engine has been developed for combustion and performance studies. The simulation couples models for mass, species, and energy within a zero-dimensional framework. The combustion process is described via a user-defined chemical kinetic mechanism. The CHEMKIN libraries have been used to formulate a stiff chemical kinetic solver suitable for integration within a complete engine cycle simulation, featuring models of gas exchange, turbulence and wall heat transfer. For illustration, two chemical kinetics schemes describing hydrogen and natural gas chemistry have been implemented in the code. The hydrogen scheme is a reduced one, consisting of 11 species and 23 reactions. The natural gas chemistry is described via the GRI-mechanism 3.0 that considers 53 species and 325 reactions, including NOx chemistry. Computations are first carried out in a variable volume bomb to demonstrate variations in ignition with temperature, pressure, equivalence ratio, and composition. Subsequently, the complete cycle simulation is exercised to demonstrate the variation in output parameters to charge inlet temperature and effective compression ratio. Overall, this study demonstrates the importance of coupling detailed chemistry descriptions with physical models of the HCCI engine processes.