@Override
    public void reset(Object param) {
	m6502.subtype = SUBTYPE_6502;
	m6502.insn = insn6502;

	/* wipe out the rest of the m6502 structure */
	/* read the reset vector into PC */
	m6502.pc.SetL(RDMEM(M6502_RST_VEC));
	m6502.pc.SetH(RDMEM(M6502_RST_VEC+1));

	m6502.sp.SetD(0x01ff);	/* stack pointer starts at page 1 offset FF */
	m6502.p = F_T|F_I|F_Z;	/* set T, I and Z flags */
	m6502.pending_irq = 0;	/* nonzero if an IRQ is pending */
	m6502.after_cli = 0;	/* pending IRQ and last insn cleared I */
	m6502.irq_callback = null;

	change_pc16(m6502.pc.D);
        if(m6502log!=null) fprintf(m6502log,"M6502#%d reset :PC:%d,PPC:%d,SP:%d,ZP:%d,EA:%d,A:%d,X:%d,Y:%d,P:%d,p_irq:%d,a_c:%d,nmi:%d,irq:%d,so:%d\n", cpu_getactivecpu(),m6502.pc.D,m6502.ppc.D,m6502.sp.D,m6502.zp.D,m6502.ea.D,m6502.a,m6502.x,m6502.y,m6502.p,m6502.pending_irq,m6502.after_cli,m6502.nmi_state,m6502.irq_state,m6502.so_state);          
    
    }
/*TODO*///
/*TODO*///void m6502_exit(void)
/*TODO*///{
/*TODO*///	/* nothing to do yet */
/*TODO*///}
/*TODO*///
/*TODO*///unsigned m6502_get_context (void *dst)
/*TODO*///{
/*TODO*///	if( dst )
/*TODO*///		*(m6502_Regs*)dst = m6502;
/*TODO*///	return sizeof(m6502_Regs);
/*TODO*///}