mulator.v[emulator.waitReg] = kindex
	}
	e.preventDefault()
}
window.addEventListener('keydown',kd,false)
window.addEventListener('keyup',ku,false)
const frameTime=1000/60
let last=Date.now(), origin=last+frameTime/2
intervalHandle=setInterval(_=>{
	last+=(Date.now()-last)
	if (emulator.halted) return
	for(var k=0; origin<last-frameTime&&k<2; origin+=frameTime,k++){
		for(var z=0;(z<emulator.tickrate) && (!emulator.waiting); z++){
			if (emulator.vBlankQuirks &&((emulator.m[emulator.pc] & 0xF0)==0xD0)) z=em