@Override
    public int get_reg(int regnum) {
	switch( regnum )
	{
/*TODO*///		case M6502_PC: return m6502.pc.w.l;
/*TODO*///		case M6502_S: return m6502.sp.b.l;
/*TODO*///		case M6502_P: return m6502.p;
/*TODO*///		case M6502_A: return m6502.a;
/*TODO*///		case M6502_X: return m6502.x;
/*TODO*///		case M6502_Y: return m6502.y;
/*TODO*///		case M6502_EA: return m6502.ea.w.l;
/*TODO*///		case M6502_ZP: return m6502.zp.w.l;
/*TODO*///		case M6502_NMI_STATE: return m6502.nmi_state;
/*TODO*///		case M6502_IRQ_STATE: return m6502.irq_state;
/*TODO*///		case M6502_SO_STATE: return m6502.so_state;
/*TODO*///		case M6502_SUBTYPE: return m6502.subtype;
		case REG_PREVIOUSPC: return m6502.ppc.D;
		default:
                    throw new UnsupportedOperationException("unsupported m6502 get_reg");
/*TODO*///			if( regnum <= REG_SP_CONTENTS )
/*TODO*///			{
/*TODO*///				unsigned offset = S + 2 * (REG_SP_CONTENTS - regnum);
/*TODO*///				if( offset < 0x1ff )
/*TODO*///					return RDMEM( offset ) | ( RDMEM( offset + 1 ) << 8 );
/*TODO*///			}
	}
	//return 0;
    }
/*TODO*///
/*TODO*///void m6502_set_reg (int regnum, unsigned val)
/*TODO*///{
/*TODO*///	switch( regnum )
/*TODO*///	{
/*TODO*///		case M6502_PC: m6502.pc.w.l = val; break;
/*TODO*///		case M6502_S: m6502.sp.b.l = val; break;
/*TODO*///		case M6502_P: m6502.p = val; break;
/*TODO*///		case M6502_A: m6502.a = val; break;
/*TODO*///		case M6502_X: m6502.x = val; break;
/*TODO*///		case M6502_Y: m6502.y = val; break;
/*TODO*///		case M6502_EA: m6502.ea.w.l = val; break;
/*TODO*///		case M6502_ZP: m6502.zp.w.l = val; break;
/*TODO*///		case M6502_NMI_STATE: m6502_set_nmi_line( val ); break;
/*TODO*///		case M6502_IRQ_STATE: m6502_set_irq_line( 0, val ); break;
/*TODO*///		case M6502_SO_STATE: m6502_set_irq_line( M6502_SET_OVERFLOW, val ); break;
/*TODO*///		default:
/*TODO*///			if( regnum <= REG_SP_CONTENTS )
/*TODO*///			{
/*TODO*///				unsigned offset = S + 2 * (REG_SP_CONTENTS - regnum);
/*TODO*///				if( offset < 0x1ff )
/*TODO*///				{
/*TODO*///					WRMEM( offset, val & 0xfff );
/*TODO*///					WRMEM( offset + 1, (val >> 8) & 0xff );
/*TODO*///				}
/*TODO*///			}
/*TODO*///	}
/*TODO*///}