public void Clear()
 {
     foreach (var cb in _callbacks)
     {
         if (LibmGBA.BizClearWatchpoint(_mgba.Core, cb.ID))
         {
             _callbacks.Remove(cb);
         }
     }
 }
        public void Remove(MemoryCallbackDelegate action)
        {
            var cbToRemove = _callbacks.SingleOrDefault(container => container.Callback.Callback == action);

            if (cbToRemove != null)
            {
                if (cbToRemove.Callback.Type == MemoryCallbackType.Execute)
                {
                    _callbacks.Remove(cbToRemove);
                    if (_callbacks.All(cb => cb.Callback.Type != MemoryCallbackType.Execute))
                    {
                        _executeCallback = null;
                        LibmGBA.BizSetExecCallback(null);
                    }
                }
                else if (LibmGBA.BizClearWatchpoint(_mgba.Core, cbToRemove.ID))
                {
                    _callbacks.Remove(cbToRemove);
                }
            }
        }