partial void ResetMemory() { // Reallocate the RAM block if the Mapper request more memory than currently allocated if (mapper != null && mapper.RamSize > externalRamBlock.Length) { externalRamBlock.Dispose(); externalRamBlock = new MemoryBlock(mapper.RamSize); } // Fill various RAM areas with random data at “boot” time // This allows for erasing the previous game residual information. unsafe { // Fill the video RAM. RandomFill(videoMemory, videoMemoryBlock.Length); // Fill the OAM. RandomFill(objectAttributeMemory, objectAttributeMemoryBlock.Length); // Fill the “trash” memory. (Invalid memory) RandomFill(trashMemory, 256); } videoRamBank = 0; workRamBank = 1; internalRomMapped = false; ResetSegments(); ResetWriteHandlers(); }
partial void DisposeMemory() { paletteMemoryBlock.Dispose(); externalRamBlock.Dispose(); videoMemoryBlock.Dispose(); workMemoryBlock.Dispose(); segmentMemoryBlock.Dispose(); }
public void Teardown() { _memory.Dispose(); _context.Dispose(); _ram.Dispose(); _memory = null; _context = null; _cpuContext = null; _unicornEmu = null; }
private void Dispose(bool disposing) { if (disposing) { MemoryBlock scan0P = Interlocked.Exchange <MemoryBlock>(ref this.scan0, null); if (scan0P != null) { scan0P.Dispose(); scan0P = null; } } }
public void Teardown() { _memory.DecrementReferenceCount(); _context.Dispose(); _ram.Dispose(); _memory = null; _context = null; _cpuContext = null; _unicornEmu = null; _usingMemory = false; }
public void Dispose() => _impl.Dispose();
public void Dispose() { _renderPaletteMemoryBlock.Dispose(); }
protected override void DisposeManaged() { _impl.Dispose(); }
public void Teardown() { _memoryBlock.Dispose(); }
public void Dispose() { _videoMemoryBlock.Dispose(); _objectAttributeMemoryBlock.Dispose(); _paletteMemoryBlock.Dispose(); }