We have used the HCT (hydrodynamics, chemistry, and transport) chemical kinetics code to simulate HCCI (homogeneous charge compression ignition) combustion of methane-air mixtures. HCT is applied to explore the ignition timing, burn duration, NOx, production, gross indicated efficiency and gross IMEP of a supercharged engine (3 atm. intake pressure) with 14:1, 16:1 and 18:1 compression ratios at 1200 rpm. HCT has been modified to incorporate the effect of heat transfer and to calculate the temperature that results from mixing the recycled exhaust with the fresh mixture. This study uses a single reaction zone that varies as a function of crank angle. The ignition process is controlled by adjusting the intake equivalence ratio and the residual gas trapping (RGT). RGT is internal exhaust gas recirculation, which recycles both thermal energy and combustion product species. Adjustment of equivalence ratio and RGT is accomplished by varying the timing of the exhaust valve closure in either two-stroke or four-stroke engines. Inlet manifold temperature is held constant at 300 K. Results show that, for each compression ratio, there is a range of operational conditions that show promise of achieving the control necessary to vary power output while keeping indicated efficiency above 50 percent and NOx levels below 100 ppm. HCT results are also compared with a set of recent experimental data for natural gas.