Ejemplo n.º 1
0
        public MOS6502X_CPP(Action <GCHandle> DisposeBuilder)
        {
            // this bit of foolery is only needed if you actually need to run the native-side constructor
            //IntPtr native = MOS6502X_DLL.Create();
            //if (native == null)
            //	throw new Exception("Native constructor returned null!");

            var h = GCHandle.Alloc(this, GCHandleType.Pinned);

            pthis = h.AddrOfPinnedObject();

            // bad - use memcpy instead
            //Marshal.PtrToStructure(native, this);

            //MOS6502X_DLL.Destroy(native);

            BCD_Enabled = true;

            MOS6502X_DLL.Reset(pthis);

            DisposeBuilder(h);
        }
Ejemplo n.º 2
0
 public void Reset()
 {
     MOS6502X_DLL.Reset(pthis);
 }