Exemplo n.º 1
0
void Init()
{
	bool Wee_speeak_support = SConfig::GetInstance().bWiiSpeakSupport;
	_dbg_assert_msg_(WII_IPC_HLE, g_DeviceMap.empty(), "DeviceMap isn't empty on init");
	CWII_IPC_HLE_Device_es::m_ContentFile = "";

	num_devices = 0;

	// Build hardware devices
	if (Wee_speeak_support)
	{
		AddDevice<CWII_IPC_HLE_Device_usb_oh0>("/dev/usb/oh0");
		AddDevice<CWII_IPC_HLE_Device_usb_ven>("/dev/usb/ven");
		AddDevice<CWII_IPC_HLE_Device_usb_oh0_57e_308>("/dev/usb/oh0/57e/308");
		AddDevice<CWII_IPC_HLE_Device_usb_oh0_46d_a03>("/dev/usb/oh0/46d/a03");
	}
	AddDevice<CWII_IPC_HLE_Device_usb_oh1_57e_305>("/dev/usb/oh1/57e/305");
	AddDevice<CWII_IPC_HLE_Device_stm_immediate>("/dev/stm/immediate");
	AddDevice<CWII_IPC_HLE_Device_stm_eventhook>("/dev/stm/eventhook");
	AddDevice<CWII_IPC_HLE_Device_fs>("/dev/fs");

	// IOS allows two ES devices at a time
	for (u32 j=0; j<ES_MAX_COUNT; j++)
	{
		es_handles[j] = AddDevice<CWII_IPC_HLE_Device_es>("/dev/es");
		es_inuse[j] = false;
	}

	AddDevice<CWII_IPC_HLE_Device_di>("/dev/di");
	AddDevice<CWII_IPC_HLE_Device_net_kd_request>("/dev/net/kd/request");
	AddDevice<CWII_IPC_HLE_Device_net_kd_time>("/dev/net/kd/time");
	AddDevice<CWII_IPC_HLE_Device_net_ncd_manage>("/dev/net/ncd/manage");
	AddDevice<CWII_IPC_HLE_Device_net_wd_command>("/dev/net/wd/command");
	AddDevice<CWII_IPC_HLE_Device_net_ip_top>("/dev/net/ip/top");
	AddDevice<CWII_IPC_HLE_Device_net_ssl>("/dev/net/ssl");
	AddDevice<CWII_IPC_HLE_Device_usb_kbd>("/dev/usb/kbd");
	AddDevice<CWII_IPC_HLE_Device_sdio_slot0>("/dev/sdio/slot0");
	AddDevice<CWII_IPC_HLE_Device_stub>("/dev/sdio/slot1");
	#if defined(__LIBUSB__) || defined(_WIN32)
		AddDevice<CWII_IPC_HLE_Device_hid>("/dev/usb/hid");
	#else
		AddDevice<CWII_IPC_HLE_Device_stub>("/dev/usb/hid");
	#endif
	AddDevice<CWII_IPC_HLE_Device_stub>("/dev/usb/oh1");
	AddDevice<IWII_IPC_HLE_Device>("_Unimplemented_Device_");

	event_enqueue = CoreTiming::RegisterEvent("IPCEvent", EnqueueEvent);
}
Exemplo n.º 2
0
void Init()
{

	_dbg_assert_msg_(WII_IPC_HLE, g_DeviceMap.empty(), "DeviceMap isn't empty on init");
	CWII_IPC_HLE_Device_es::m_ContentFile = "";
	u32 i;
	for (i=0; i<IPC_MAX_FDS; i++)
	{
		g_FdMap[i] = NULL;
	}

	i = 0;
	// Build hardware devices
	g_DeviceMap[i] = new CWII_IPC_HLE_Device_usb_oh1_57e_305(i, std::string("/dev/usb/oh1/57e/305")); i++;
	g_DeviceMap[i] = new CWII_IPC_HLE_Device_stm_immediate(i, std::string("/dev/stm/immediate")); i++;
	g_DeviceMap[i] = new CWII_IPC_HLE_Device_stm_eventhook(i, std::string("/dev/stm/eventhook")); i++;
	g_DeviceMap[i] = new CWII_IPC_HLE_Device_fs(i, std::string("/dev/fs")); i++;

	// IOS allows two ES devices at a time<
	u32 j;
	for (j=0; j<ES_MAX_COUNT; j++)
	{
		g_DeviceMap[i] = es_handles[j] = new CWII_IPC_HLE_Device_es(i, std::string("/dev/es")); i++;
		es_inuse[j] = false;
	}

	g_DeviceMap[i] = new CWII_IPC_HLE_Device_di(i, std::string("/dev/di")); i++;
	g_DeviceMap[i] = new CWII_IPC_HLE_Device_net_kd_request(i, std::string("/dev/net/kd/request")); i++;
	g_DeviceMap[i] = new CWII_IPC_HLE_Device_net_kd_time(i, std::string("/dev/net/kd/time")); i++;
	g_DeviceMap[i] = new CWII_IPC_HLE_Device_net_ncd_manage(i, std::string("/dev/net/ncd/manage")); i++;
	g_DeviceMap[i] = new CWII_IPC_HLE_Device_net_wd_command(i, std::string("/dev/net/wd/command")); i++;
	g_DeviceMap[i] = new CWII_IPC_HLE_Device_net_ip_top(i, std::string("/dev/net/ip/top")); i++;
	g_DeviceMap[i] = new CWII_IPC_HLE_Device_net_ssl(i, std::string("/dev/net/ssl")); i++;
	g_DeviceMap[i] = new CWII_IPC_HLE_Device_usb_kbd(i, std::string("/dev/usb/kbd")); i++;
	g_DeviceMap[i] = new CWII_IPC_HLE_Device_sdio_slot0(i, std::string("/dev/sdio/slot0")); i++;
	g_DeviceMap[i] = new CWII_IPC_HLE_Device_stub(i, std::string("/dev/sdio/slot1")); i++;
	#if  defined(__LIBUSB__) || defined(_WIN32)
		g_DeviceMap[i] = new CWII_IPC_HLE_Device_hid(i, std::string("/dev/usb/hid")); i++;
	#else
        g_DeviceMap[i] = new CWII_IPC_HLE_Device_stub(i, std::string("/dev/usb/hid")); i++;
	#endif
	g_DeviceMap[i] = new CWII_IPC_HLE_Device_stub(i, std::string("/dev/usb/oh1")); i++;
	g_DeviceMap[i] = new IWII_IPC_HLE_Device(i, std::string("_Unimplemented_Device_")); i++;

	enque_reply = CoreTiming::RegisterEvent("IPCReply", EnqueReplyCallback);
}
Exemplo n.º 3
0
void Init()
{
  _dbg_assert_msg_(WII_IPC_HLE, g_DeviceMap.empty(), "DeviceMap isn't empty on init");
  CWII_IPC_HLE_Device_es::m_ContentFile = "";

  num_devices = 0;

  // Build hardware devices
  AddDevice<CWII_IPC_HLE_Device_usb_oh1_57e_305>("/dev/usb/oh1/57e/305");
  AddDevice<CWII_IPC_HLE_Device_stm_immediate>("/dev/stm/immediate");
  AddDevice<CWII_IPC_HLE_Device_stm_eventhook>("/dev/stm/eventhook");
  AddDevice<CWII_IPC_HLE_Device_fs>("/dev/fs");

  // IOS allows two ES devices at a time
  for (u32 j = 0; j < ES_MAX_COUNT; j++)
  {
    es_handles[j] = AddDevice<CWII_IPC_HLE_Device_es>("/dev/es");
    es_inuse[j] = false;
  }

  AddDevice<CWII_IPC_HLE_Device_di>("/dev/di");
  AddDevice<CWII_IPC_HLE_Device_net_kd_request>("/dev/net/kd/request");
  AddDevice<CWII_IPC_HLE_Device_net_kd_time>("/dev/net/kd/time");
  AddDevice<CWII_IPC_HLE_Device_net_ncd_manage>("/dev/net/ncd/manage");
  AddDevice<CWII_IPC_HLE_Device_net_wd_command>("/dev/net/wd/command");
  AddDevice<CWII_IPC_HLE_Device_net_ip_top>("/dev/net/ip/top");
  AddDevice<CWII_IPC_HLE_Device_net_ssl>("/dev/net/ssl");
  AddDevice<CWII_IPC_HLE_Device_usb_kbd>("/dev/usb/kbd");
  AddDevice<CWII_IPC_HLE_Device_sdio_slot0>("/dev/sdio/slot0");
  AddDevice<CWII_IPC_HLE_Device_stub>("/dev/sdio/slot1");
#if defined(__LIBUSB__) || defined(_WIN32)
  AddDevice<CWII_IPC_HLE_Device_hid>("/dev/usb/hid");
#else
  AddDevice<CWII_IPC_HLE_Device_stub>("/dev/usb/hid");
#endif
  AddDevice<CWII_IPC_HLE_Device_stub>("/dev/usb/oh1");
  AddDevice<IWII_IPC_HLE_Device>("_Unimplemented_Device_");

  event_enqueue = CoreTiming::RegisterEvent("IPCEvent", EnqueueEvent);
  event_sdio_notify = CoreTiming::RegisterEvent("SDIO_EventNotify", SDIO_EventNotify_CPUThread);
}