static void DriverInitialize(Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); conversion.input_format = InputFormat::YUV422_Indiv8; conversion.output_format = OutputFormat::RGBA8; conversion.rotation = Rotation::None; conversion.block_alignment = BlockAlignment::Linear; conversion.coefficients.fill(0); conversion.SetInputLineWidth(1024); conversion.SetInputLines(1024); conversion.alpha = 0; ConversionBuffer zero_buffer = {}; conversion.src_Y = zero_buffer; conversion.src_U = zero_buffer; conversion.src_V = zero_buffer; conversion.dst = zero_buffer; completion_event->Clear(); cmd_buff[0] = IPC::MakeHeader(0x2B, 1, 0); cmd_buff[1] = RESULT_SUCCESS.raw; LOG_DEBUG(Service_Y2R, "called"); }
void Initialize(Service::Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); u32 app_id = cmd_buff[1]; u32 flags = cmd_buff[2]; cmd_buff[2] = 0x04000000; // According to 3dbrew, this value should be 0x04000000 cmd_buff[3] = Kernel::g_handle_table.Create(notification_event).MoveFrom(); cmd_buff[4] = Kernel::g_handle_table.Create(start_event).MoveFrom(); // TODO(bunnei): Check if these events are cleared every time Initialize is called. notification_event->Clear(); start_event->Clear(); ASSERT_MSG((nullptr != lock), "Cannot initialize without lock"); lock->Release(); cmd_buff[1] = RESULT_SUCCESS.raw; // No error LOG_TRACE(Service_APT, "called app_id=0x%08X, flags=0x%08X", app_id, flags); }
void Initialize(Service::Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); // TODO(bunnei): Check if these are created in Initialize or on APT process startup. notification_event = Kernel::Event::Create(RESETTYPE_ONESHOT, "APT_U:Notification"); pause_event = Kernel::Event::Create(RESETTYPE_ONESHOT, "APT_U:Pause"); cmd_buff[3] = Kernel::g_handle_table.Create(notification_event).MoveFrom(); cmd_buff[4] = Kernel::g_handle_table.Create(pause_event).MoveFrom(); // TODO(bunnei): Check if these events are cleared/signaled every time Initialize is called. notification_event->Clear(); pause_event->Signal(); // Fire start event ASSERT_MSG((nullptr != lock), "Cannot initialize without lock"); lock->Release(); cmd_buff[1] = RESULT_SUCCESS.raw; // No error }