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(cellSheap);
|
2013-09-28 04:36:57 +02:00
|
|
|
|
|
|
|
|
// Return Codes
|
2020-07-16 12:14:57 +02:00
|
|
|
enum CellSheapError : u32
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2025-04-05 21:50:45 +02:00
|
|
|
CELL_SHEAP_ERROR_INVAL = 0x80410302,
|
|
|
|
|
CELL_SHEAP_ERROR_BUSY = 0x8041030A,
|
|
|
|
|
CELL_SHEAP_ERROR_ALIGN = 0x80410310,
|
2014-04-04 15:25:38 +02:00
|
|
|
CELL_SHEAP_ERROR_SHORTAGE = 0x80410312,
|
2013-09-28 04:36:57 +02:00
|
|
|
};
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
template <>
|
|
|
|
|
void fmt_class_string<CellSheapError>::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_SHEAP_ERROR_INVAL);
|
|
|
|
|
STR_CASE(CELL_SHEAP_ERROR_BUSY);
|
|
|
|
|
STR_CASE(CELL_SHEAP_ERROR_ALIGN);
|
|
|
|
|
STR_CASE(CELL_SHEAP_ERROR_SHORTAGE);
|
|
|
|
|
}
|
2020-07-16 12:14:57 +02:00
|
|
|
|
2025-04-05 21:50:45 +02:00
|
|
|
return unknown;
|
|
|
|
|
});
|
2020-07-16 12:14:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
error_code cellSheapInitialize()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSheap);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellSheapAllocate()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSheap);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellSheapFree()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSheap);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellSheapQueryMax()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSheap);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellSheapQueryFree()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSheap);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellKeySheapInitialize()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSheap);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellKeySheapBufferNew()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSheap);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellKeySheapBufferDelete()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSheap);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellKeySheapMutexNew()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSheap);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellKeySheapMutexDelete()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSheap);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellKeySheapBarrierNew()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSheap);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellKeySheapBarrierDelete()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSheap);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellKeySheapSemaphoreNew()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSheap);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellKeySheapSemaphoreDelete()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSheap);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellKeySheapRwmNew()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSheap);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellKeySheapRwmDelete()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSheap);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellKeySheapQueueNew()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSheap);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-16 12:14:57 +02:00
|
|
|
error_code cellKeySheapQueueDelete()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(cellSheap);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2016-03-21 20:43:03 +01:00
|
|
|
DECLARE(ppu_module_manager::cellSheap)("cellSheap", []()
|
2025-04-05 21:50:45 +02:00
|
|
|
{
|
|
|
|
|
REG_FUNC(cellSheap, cellSheapInitialize);
|
|
|
|
|
REG_FUNC(cellSheap, cellSheapAllocate);
|
|
|
|
|
REG_FUNC(cellSheap, cellSheapFree);
|
|
|
|
|
REG_FUNC(cellSheap, cellSheapQueryMax);
|
|
|
|
|
REG_FUNC(cellSheap, cellSheapQueryFree);
|
|
|
|
|
|
|
|
|
|
REG_FUNC(cellSheap, cellKeySheapInitialize);
|
|
|
|
|
REG_FUNC(cellSheap, cellKeySheapBufferNew);
|
|
|
|
|
REG_FUNC(cellSheap, cellKeySheapBufferDelete);
|
|
|
|
|
|
|
|
|
|
REG_FUNC(cellSheap, cellKeySheapMutexNew);
|
|
|
|
|
REG_FUNC(cellSheap, cellKeySheapMutexDelete);
|
|
|
|
|
REG_FUNC(cellSheap, cellKeySheapBarrierNew);
|
|
|
|
|
REG_FUNC(cellSheap, cellKeySheapBarrierDelete);
|
|
|
|
|
REG_FUNC(cellSheap, cellKeySheapSemaphoreNew);
|
|
|
|
|
REG_FUNC(cellSheap, cellKeySheapSemaphoreDelete);
|
|
|
|
|
REG_FUNC(cellSheap, cellKeySheapRwmNew);
|
|
|
|
|
REG_FUNC(cellSheap, cellKeySheapRwmDelete);
|
|
|
|
|
REG_FUNC(cellSheap, cellKeySheapQueueNew);
|
|
|
|
|
REG_FUNC(cellSheap, cellKeySheapQueueDelete);
|
|
|
|
|
});
|