2020-12-05 13:08:24 +01:00
|
|
|
#include "stdafx.h"
|
2016-03-21 20:43:03 +01:00
|
|
|
#include "Emu/Cell/PPUModule.h"
|
2013-09-28 04:36:57 +02:00
|
|
|
|
2018-08-25 14:39:00 +02:00
|
|
|
LOG_CHANNEL(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
|
|
|
|
|
// Return Codes
|
2020-07-16 12:14:57 +02:00
|
|
|
enum CellUsbpspcmError : u32
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2014-04-04 15:25:38 +02:00
|
|
|
CELL_USBPSPCM_ERROR_NOT_INITIALIZED = 0x80110401,
|
2025-04-05 21:50:45 +02:00
|
|
|
CELL_USBPSPCM_ERROR_ALREADY = 0x80110402,
|
|
|
|
|
CELL_USBPSPCM_ERROR_INVALID = 0x80110403,
|
|
|
|
|
CELL_USBPSPCM_ERROR_NO_MEMORY = 0x80110404,
|
|
|
|
|
CELL_USBPSPCM_ERROR_BUSY = 0x80110405,
|
|
|
|
|
CELL_USBPSPCM_ERROR_INPROGRESS = 0x80110406,
|
|
|
|
|
CELL_USBPSPCM_ERROR_NO_SPACE = 0x80110407,
|
|
|
|
|
CELL_USBPSPCM_ERROR_CANCELED = 0x80110408,
|
|
|
|
|
CELL_USBPSPCM_ERROR_RESETTING = 0x80110409,
|
|
|
|
|
CELL_USBPSPCM_ERROR_RESET_END = 0x8011040A,
|
|
|
|
|
CELL_USBPSPCM_ERROR_CLOSED = 0x8011040B,
|
|
|
|
|
CELL_USBPSPCM_ERROR_NO_DATA = 0x8011040C,
|
2013-09-28 04:36:57 +02:00
|
|
|
};
|
|
|
|
|
|
2025-04-05 21:50:45 +02:00
|
|
|
template <>
|
2020-07-16 12:14:57 +02:00
|
|
|
void fmt_class_string<CellUsbpspcmError>::format(std::string& out, u64 arg)
|
|
|
|
|
{
|
|
|
|
|
format_enum(out, arg, [](auto error)
|
|
|
|
|
{
|
2025-04-05 21:50:45 +02:00
|
|
|
switch (error)
|
|
|
|
|
{
|
|
|
|
|
STR_CASE(CELL_USBPSPCM_ERROR_NOT_INITIALIZED);
|
|
|
|
|
STR_CASE(CELL_USBPSPCM_ERROR_ALREADY);
|
|
|
|
|
STR_CASE(CELL_USBPSPCM_ERROR_INVALID);
|
|
|
|
|
STR_CASE(CELL_USBPSPCM_ERROR_NO_MEMORY);
|
|
|
|
|
STR_CASE(CELL_USBPSPCM_ERROR_BUSY);
|
|
|
|
|
STR_CASE(CELL_USBPSPCM_ERROR_INPROGRESS);
|
|
|
|
|
STR_CASE(CELL_USBPSPCM_ERROR_NO_SPACE);
|
|
|
|
|
STR_CASE(CELL_USBPSPCM_ERROR_CANCELED);
|
|
|
|
|
STR_CASE(CELL_USBPSPCM_ERROR_RESETTING);
|
|
|
|
|
STR_CASE(CELL_USBPSPCM_ERROR_RESET_END);
|
|
|
|
|
STR_CASE(CELL_USBPSPCM_ERROR_CLOSED);
|
|
|
|
|
STR_CASE(CELL_USBPSPCM_ERROR_NO_DATA);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return unknown;
|
|
|
|
|
});
|
2020-07-16 12:14:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
error_code cellUsbPspcmInit()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmEnd()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmCalcPoolSize()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmRegister()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmUnregister()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmGetAddr()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmBind()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmBindAsync()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmWaitBindAsync()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmPollBindAsync()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmCancelBind()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmClose()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmSend()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmSendAsync()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmWaitSendAsync()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmPollSendAsync()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmRecv()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmRecvAsync()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmWaitRecvAsync()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmPollRecvAsync()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmReset()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmResetAsync()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmWaitResetAsync()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmPollResetAsync()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmWaitData()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmPollData()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellUsbPspcmCancelWaitData()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-07-29 18:08:10 +02:00
|
|
|
UNIMPLEMENTED_FUNC(cellUsbPspcm);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2016-03-21 20:43:03 +01:00
|
|
|
DECLARE(ppu_module_manager::cellUsbPspcm)("cellUsbPspcm", []()
|
2025-04-05 21:50:45 +02:00
|
|
|
{
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmInit);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmEnd);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmCalcPoolSize);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmRegister);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmUnregister);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmGetAddr);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmBind);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmBindAsync);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmWaitBindAsync);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmPollBindAsync);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmCancelBind);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmClose);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmSend);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmSendAsync);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmWaitSendAsync);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmPollSendAsync);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmRecv);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmRecvAsync);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmWaitRecvAsync);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmPollRecvAsync);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmReset);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmResetAsync);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmWaitResetAsync);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmPollResetAsync);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmWaitData);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmPollData);
|
|
|
|
|
REG_FUNC(cellUsbPspcm, cellUsbPspcmCancelWaitData);
|
|
|
|
|
});
|