/// <summary> /// Releases a semaphore for a given LaunchDma method call. /// </summary> /// <param name="argument">The LaunchDma call argument</param> private void ReleaseSemaphore(int argument) { LaunchDmaSemaphoreType type = (LaunchDmaSemaphoreType)((argument >> 3) & 0x3); if (type != LaunchDmaSemaphoreType.None) { ulong address = ((ulong)_state.State.SetSemaphoreA << 32) | _state.State.SetSemaphoreB; if (type == LaunchDmaSemaphoreType.ReleaseOneWordSemaphore) { _channel.MemoryManager.Write(address, _state.State.SetSemaphorePayload); } else /* if (type == LaunchDmaSemaphoreType.ReleaseFourWordSemaphore) */ { Logger.Warning?.Print(LogClass.Gpu, "DMA semaphore type ReleaseFourWordSemaphore was used, but is not currently implemented."); } } }
/// <summary> /// Releases a semaphore for a given LaunchDma method call. /// </summary> /// <param name="argument">The LaunchDma call argument</param> private void ReleaseSemaphore(int argument) { LaunchDmaSemaphoreType type = (LaunchDmaSemaphoreType)((argument >> 3) & 0x3); if (type != LaunchDmaSemaphoreType.None) { ulong address = ((ulong)_state.State.SetSemaphoreA << 32) | _state.State.SetSemaphoreB; if (type == LaunchDmaSemaphoreType.ReleaseOneWordSemaphore) { _channel.MemoryManager.Write(address, _state.State.SetSemaphorePayload); } else /* if (type == LaunchDmaSemaphoreType.ReleaseFourWordSemaphore) */ { _channel.MemoryManager.Write(address + 8, _context.GetTimestamp()); _channel.MemoryManager.Write(address, (ulong)_state.State.SetSemaphorePayload); } } }