This commit is contained in:
Nekotekina 2015-07-26 03:53:26 +03:00
parent 804ee1183b
commit ffc11bfda3
21 changed files with 132 additions and 115 deletions

View File

@ -7,7 +7,7 @@
#define noexcept _NOEXCEPT_OP
#endif
#if defined(_MSC_VER)
#if defined(_MSC_VER) && _MSC_VER <= 1800
#define thread_local __declspec(thread)
#elif __APPLE__
#define thread_local __thread

View File

@ -298,16 +298,16 @@ struct cast_armv7_gpr<s32, false>
};
template<>
struct cast_armv7_gpr<bool, false>
struct cast_armv7_gpr<b8, false>
{
force_inline static u32 to_gpr(const bool& value)
force_inline static u32 to_gpr(const b8& value)
{
return value;
}
force_inline static bool from_gpr(const u32& reg)
force_inline static b8 from_gpr(const u32& reg)
{
return reinterpret_cast<const bool&>(reg);
return reg != 0;
}
};

View File

@ -14,7 +14,7 @@ s32 sceDbgSetBreakOnErrorState(SceDbgBreakOnErrorState state)
throw EXCEPTION("");
}
s32 sceDbgAssertionHandler(vm::cptr<char> pFile, s32 line, bool stop, vm::cptr<char> pComponent, vm::cptr<char> pMessage, armv7_va_args_t va_args)
s32 sceDbgAssertionHandler(vm::cptr<char> pFile, s32 line, b8 stop, vm::cptr<char> pComponent, vm::cptr<char> pMessage, armv7_va_args_t va_args)
{
throw EXCEPTION("");
}

View File

@ -14,7 +14,7 @@ void sceFiosTerminate()
throw EXCEPTION("");
}
bool sceFiosIsInitialized(vm::ptr<SceFiosParams> pOutParameters)
b8 sceFiosIsInitialized(vm::ptr<SceFiosParams> pOutParameters)
{
throw EXCEPTION("");
}
@ -29,7 +29,7 @@ void sceFiosSetGlobalDefaultOpAttr(vm::cptr<SceFiosOpAttr> pAttr)
throw EXCEPTION("");
}
bool sceFiosGetGlobalDefaultOpAttr(vm::ptr<SceFiosOpAttr> pOutAttr)
b8 sceFiosGetGlobalDefaultOpAttr(vm::ptr<SceFiosOpAttr> pOutAttr)
{
throw EXCEPTION("");
}
@ -39,7 +39,7 @@ void sceFiosSetThreadDefaultOpAttr(vm::cptr<SceFiosOpAttr> pAttr)
throw EXCEPTION("");
}
bool sceFiosGetThreadDefaultOpAttr(vm::ptr<SceFiosOpAttr> pOutAttr)
b8 sceFiosGetThreadDefaultOpAttr(vm::ptr<SceFiosOpAttr> pOutAttr)
{
throw EXCEPTION("");
}
@ -59,7 +59,7 @@ u32 sceFiosGetSuspendCount()
throw EXCEPTION("");
}
bool sceFiosIsSuspended()
b8 sceFiosIsSuspended()
{
throw EXCEPTION("");
}
@ -84,7 +84,7 @@ void sceFiosCloseAllFiles()
throw EXCEPTION("");
}
bool sceFiosIsIdle()
b8 sceFiosIsIdle()
{
throw EXCEPTION("");
}
@ -104,7 +104,7 @@ u32 sceFiosGetAllOps(vm::ptr<s32> pOutArray, u32 arraySize)
throw EXCEPTION("");
}
bool sceFiosIsValidHandle(s32 h)
b8 sceFiosIsValidHandle(s32 h)
{
throw EXCEPTION("");
}
@ -129,12 +129,12 @@ s32 sceFiosVprintf(vm::cptr<char> pFormat) // va_list
throw EXCEPTION("");
}
s32 sceFiosFileExists(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath, vm::ptr<bool> pOutExists)
s32 sceFiosFileExists(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath, vm::ptr<b8> pOutExists)
{
throw EXCEPTION("");
}
bool sceFiosFileExistsSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
b8 sceFiosFileExistsSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
{
throw EXCEPTION("");
}
@ -159,12 +159,12 @@ s32 sceFiosFileDeleteSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
throw EXCEPTION("");
}
s32 sceFiosDirectoryExists(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath, vm::ptr<bool> pOutExists)
s32 sceFiosDirectoryExists(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath, vm::ptr<b8> pOutExists)
{
throw EXCEPTION("");
}
bool sceFiosDirectoryExistsSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
b8 sceFiosDirectoryExistsSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
{
throw EXCEPTION("");
}
@ -189,12 +189,12 @@ s32 sceFiosDirectoryDeleteSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPa
throw EXCEPTION("");
}
s32 sceFiosExists(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath, vm::ptr<bool> pOutExists)
s32 sceFiosExists(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath, vm::ptr<b8> pOutExists)
{
throw EXCEPTION("");
}
bool sceFiosExistsSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
b8 sceFiosExistsSync(vm::cptr<SceFiosOpAttr> pAttr, vm::cptr<char> pPath)
{
throw EXCEPTION("");
}
@ -459,7 +459,7 @@ vm::cptr<char> sceFiosDHGetPath(s32 dh)
throw EXCEPTION("");
}
bool sceFiosOpIsDone(s32 op)
b8 sceFiosOpIsDone(s32 op)
{
throw EXCEPTION("");
}
@ -499,7 +499,7 @@ void sceFiosOpCancel(s32 op)
throw EXCEPTION("");
}
bool sceFiosOpIsCancelled(s32 op)
b8 sceFiosOpIsCancelled(s32 op)
{
throw EXCEPTION("");
}

View File

@ -85,7 +85,7 @@ s32 sceGxmDestroyContext(vm::ptr<SceGxmContext> context)
throw EXCEPTION("");
}
void sceGxmSetValidationEnable(vm::ptr<SceGxmContext> context, bool enable)
void sceGxmSetValidationEnable(vm::ptr<SceGxmContext> context, b8 enable)
{
throw EXCEPTION("");
}
@ -388,7 +388,7 @@ s32 sceGxmColorSurfaceInitDisabled(vm::ptr<SceGxmColorSurface> surface)
throw EXCEPTION("");
}
bool sceGxmColorSurfaceIsEnabled(vm::cptr<SceGxmColorSurface> surface)
b8 sceGxmColorSurfaceIsEnabled(vm::cptr<SceGxmColorSurface> surface)
{
throw EXCEPTION("");
}
@ -473,7 +473,7 @@ void sceGxmDepthStencilSurfaceSetBackgroundStencil(vm::ptr<SceGxmDepthStencilSur
throw EXCEPTION("");
}
bool sceGxmDepthStencilSurfaceIsEnabled(vm::cptr<SceGxmDepthStencilSurface> surface)
b8 sceGxmDepthStencilSurfaceIsEnabled(vm::cptr<SceGxmDepthStencilSurface> surface)
{
throw EXCEPTION("");
}
@ -544,17 +544,17 @@ SceGxmProgramType sceGxmProgramGetType(vm::cptr<SceGxmProgram> program)
throw EXCEPTION("");
}
bool sceGxmProgramIsDiscardUsed(vm::cptr<SceGxmProgram> program)
b8 sceGxmProgramIsDiscardUsed(vm::cptr<SceGxmProgram> program)
{
throw EXCEPTION("");
}
bool sceGxmProgramIsDepthReplaceUsed(vm::cptr<SceGxmProgram> program)
b8 sceGxmProgramIsDepthReplaceUsed(vm::cptr<SceGxmProgram> program)
{
throw EXCEPTION("");
}
bool sceGxmProgramIsSpriteCoordUsed(vm::cptr<SceGxmProgram> program)
b8 sceGxmProgramIsSpriteCoordUsed(vm::cptr<SceGxmProgram> program)
{
throw EXCEPTION("");
}
@ -634,7 +634,7 @@ u32 sceGxmProgramParameterGetContainerIndex(vm::cptr<SceGxmProgramParameter> par
throw EXCEPTION("");
}
bool sceGxmProgramParameterIsSamplerCube(vm::cptr<SceGxmProgramParameter> parameter)
b8 sceGxmProgramParameterIsSamplerCube(vm::cptr<SceGxmProgramParameter> parameter)
{
throw EXCEPTION("");
}

View File

@ -109,7 +109,7 @@ struct SceNpMatching2World
le_t<u32> curNumOfTotalLobbyMember;
le_t<u32> curNumOfRoom;
le_t<u32> curNumOfTotalRoomMember;
bool withEntitlementId;
b8 withEntitlementId;
SceNpEntitlementId entitlementId;
u8 padding[3];
};
@ -214,9 +214,9 @@ struct SceNpMatching2GroupLabel
struct SceNpMatching2RoomGroupConfig
{
le_t<u32> slotNum;
bool withLabel;
b8 withLabel;
SceNpMatching2GroupLabel label;
bool withPassword;
b8 withPassword;
u8 padding[2];
};
@ -224,7 +224,7 @@ struct SceNpMatching2RoomGroupConfig
struct SceNpMatching2RoomGroupPasswordConfig
{
u8 groupId;
bool withPassword;
b8 withPassword;
u8 padding[1];
};
@ -240,8 +240,8 @@ struct SceNpMatching2RoomMemberBinAttrInternal
struct SceNpMatching2RoomGroup
{
u8 groupId;
bool withPassword;
bool withLabel;
b8 withPassword;
b8 withLabel;
u8 padding[1];
SceNpMatching2GroupLabel label;
le_t<u32> slotNum;
@ -638,7 +638,7 @@ struct SceNpMatching2SendRoomChatMessageRequest
struct SceNpMatching2SendRoomChatMessageResponse
{
bool filtered;
b8 filtered;
};
@ -794,7 +794,7 @@ struct SceNpMatching2GetLobbyMemberDataInternalListRequest
le_t<u32> memberIdNum;
vm::lcptr<u16> attrId;
le_t<u32> attrIdNum;
bool extendedData;
b8 extendedData;
u8 padding[7];
};
@ -822,7 +822,7 @@ struct SceNpMatching2SendLobbyChatMessageRequest
struct SceNpMatching2SendLobbyChatMessageResponse
{
bool filtered;
b8 filtered;
};
@ -899,7 +899,7 @@ struct SceNpMatching2SignalingOptParamUpdateInfo
struct SceNpMatching2RoomMessageInfo
{
bool filtered;
b8 filtered;
u8 castType;
u8 padding[2];
vm::lptr<SceNpMatching2RoomMessageDestination> dst;
@ -942,7 +942,7 @@ struct SceNpMatching2LobbyMemberDataInternalUpdateInfo
struct SceNpMatching2LobbyMessageInfo
{
bool filtered;
b8 filtered;
u8 castType;
u8 padding[2];
vm::lptr<SceNpMatching2LobbyMessageDestination> dst;

View File

@ -14,7 +14,7 @@ void sceRazorCaptureSetTriggerNextFrame(vm::cptr<char> captureFilename)
throw EXCEPTION("");
}
bool sceRazorCaptureIsInProgress()
b8 sceRazorCaptureIsInProgress()
{
throw EXCEPTION("");
}

View File

@ -981,16 +981,16 @@ struct cast_ppu_gpr<s64, false>
};
template<>
struct cast_ppu_gpr<bool, false>
struct cast_ppu_gpr<b8, false>
{
force_inline static u64 to_gpr(const bool& value)
force_inline static u64 to_gpr(const b8& value)
{
return value;
}
force_inline static bool from_gpr(const u64& reg)
force_inline static b8 from_gpr(const u64& reg)
{
return reinterpret_cast<const bool&>(reg);
return static_cast<u32>(reg) != 0;
}
};

View File

@ -877,7 +877,7 @@ s32 cellDmuxClose(u32 handle)
return CELL_OK;
}
s32 cellDmuxSetStream(u32 handle, u32 streamAddress, u32 streamSize, bool discontinuity, u64 userData)
s32 cellDmuxSetStream(u32 handle, u32 streamAddress, u32 streamSize, b8 discontinuity, u64 userData)
{
cellDmux.Log("cellDmuxSetStream(handle=0x%x, streamAddress=0x%x, streamSize=%d, discontinuity=%d, userData=0x%llx)", handle, streamAddress, streamSize, discontinuity, userData);

View File

@ -165,7 +165,7 @@ struct CellDmuxType
struct CellDmuxPamfSpecificInfo
{
be_t<u32> thisSize;
bool programEndCodeCb;
b8 programEndCodeCb;
};
struct CellDmuxType2
@ -198,20 +198,20 @@ struct CellDmuxResourceEx
/*
struct CellDmuxResource2Ex
{
bool isResourceEx; //true
b8 isResourceEx; //true
CellDmuxResourceEx resourceEx;
};
struct CellDmuxResource2NoEx
{
bool isResourceEx; //false
b8 isResourceEx; //false
CellDmuxResource resource;
};
*/
struct CellDmuxResource2
{
bool isResourceEx;
b8 isResourceEx;
be_t<u32> memAddr;
be_t<u32> memSize;
be_t<u32> ppuThreadPriority;
@ -270,7 +270,7 @@ struct CellDmuxAuInfoEx
be_t<u32> auAddr;
be_t<u32> auSize;
be_t<u32> reserved;
bool isRap;
b8 isRap;
be_t<u64> userData;
CellCodecTimeStamp pts;
CellCodecTimeStamp dts;

View File

@ -157,7 +157,7 @@ struct CellPamfEp
// Entry point iterator
struct CellPamfEpIterator
{
bool isPamf;
b8 isPamf;
be_t<u32> index;
be_t<u32> num;
be_t<u32> pCur_addr;

View File

@ -73,7 +73,7 @@ s32 cellSailDescriptorGetMediaInfo()
return CELL_OK;
}
s32 cellSailDescriptorSetAutoSelection(vm::ptr<CellSailDescriptor> pSelf, bool autoSelection)
s32 cellSailDescriptorSetAutoSelection(vm::ptr<CellSailDescriptor> pSelf, b8 autoSelection)
{
cellSail.Warning("cellSailDescriptorSetAutoSelection(pSelf_addr=0x%x, autoSelection=%s)", pSelf.addr(), autoSelection ? "true" : "false");
@ -812,7 +812,7 @@ s32 cellSailPlayerCancel()
return CELL_OK;
}
s32 cellSailPlayerSetPaused(vm::ptr<CellSailPlayer> pSelf, bool paused)
s32 cellSailPlayerSetPaused(vm::ptr<CellSailPlayer> pSelf, b8 paused)
{
cellSail.Todo("cellSailPlayerSetPaused(pSelf_addr=0x%x, paused=%d)", pSelf.addr(), paused);
return CELL_OK;

View File

@ -661,8 +661,8 @@ typedef s32(CellSailRendererAudioFuncMakeup)(vm::ptr<void> pArg);
typedef s32(CellSailRendererAudioFuncCleanup)(vm::ptr<void> pArg);
typedef void(CellSailRendererAudioFuncOpen)(vm::ptr<void> pArg, vm::ptr<CellSailAudioFormat> pInfo, u32 frameNum);
typedef void(CellSailRendererAudioFuncClose)(vm::ptr<void> pArg);
typedef void(CellSailRendererAudioFuncStart)(vm::ptr<void> pArg, bool buffering);
typedef void(CellSailRendererAudioFuncStop)(vm::ptr<void> pArg, bool flush);
typedef void(CellSailRendererAudioFuncStart)(vm::ptr<void> pArg, b8 buffering);
typedef void(CellSailRendererAudioFuncStop)(vm::ptr<void> pArg, b8 flush);
typedef void(CellSailRendererAudioFuncCancel)(vm::ptr<void> pArg);
typedef s32(CellSailRendererAudioFuncCheckout)(vm::ptr<void> pArg, vm::pptr<CellSailAudioFrameInfo> ppInfo);
typedef s32(CellSailRendererAudioFuncCheckin)(vm::ptr<void> pArg, vm::ptr<CellSailAudioFrameInfo> pInfo);
@ -671,8 +671,8 @@ typedef s32(CellSailRendererVideoFuncMakeup)(vm::ptr<void> pArg);
typedef s32(CellSailRendererVideoFuncCleanup)(vm::ptr<void> pArg);
typedef void(CellSailRendererVideoFuncOpen)(vm::ptr<void> pArg, vm::ptr<CellSailVideoFormat> pInfo, u32 frameNum, u32 minFrameNum);
typedef void(CellSailRendererVideoFuncClose)(vm::ptr<void> pArg);
typedef void(CellSailRendererVideoFuncStart)(vm::ptr<void> pArg, bool buffering);
typedef void(CellSailRendererVideoFuncStop)(vm::ptr<void> pArg, bool flush, bool keepRendering);
typedef void(CellSailRendererVideoFuncStart)(vm::ptr<void> pArg, b8 buffering);
typedef void(CellSailRendererVideoFuncStop)(vm::ptr<void> pArg, b8 flush, b8 keepRendering);
typedef void(CellSailRendererVideoFuncCancel)(vm::ptr<void> pArg);
typedef s32(CellSailRendererVideoFuncCheckout)(vm::ptr<void> pArg, vm::pptr<CellSailVideoFrameInfo> ppInfo);
typedef s32(CellSailRendererVideoFuncCheckin)(vm::ptr<void> pArg, vm::ptr<CellSailVideoFrameInfo> pInfo);
@ -881,7 +881,7 @@ struct CellSailMp4Track
struct CellSailMp4TrackInfo
{
bool isTrackEnabled;
b8 isTrackEnabled;
u8 reserved0[3];
be_t<u32> trackId;
be_t<u64> trackDuration;
@ -1037,8 +1037,8 @@ struct CellSailMpegLayer3WaveFormat
struct CellSailDescriptor
{
bool autoSelection;
bool registered;
b8 autoSelection;
b8 registered;
be_t<s32> streamType;
be_t<u64> internalData[31];
};

View File

@ -60,25 +60,25 @@ s32 spursSignalToHandlerThread(PPUThread& ppu, vm::ptr<CellSpurs> spurs);
s32 spursJoinHandlerThread(PPUThread& ppu, vm::ptr<CellSpurs> spurs);
s32 spursInit(PPUThread& ppu, vm::ptr<CellSpurs> spurs, u32 revision, u32 sdkVersion, s32 nSpus, s32 spuPriority, s32 ppuPriority, u32 flags,
vm::cptr<char> prefix, u32 prefixSize, u32 container, vm::cptr<u8> swlPriority, u32 swlMaxSpu, u32 swlIsPreem);
s32 cellSpursInitialize(PPUThread& ppu, vm::ptr<CellSpurs> spurs, s32 nSpus, s32 spuPriority, s32 ppuPriority, bool exitIfNoWork);
s32 cellSpursInitialize(PPUThread& ppu, vm::ptr<CellSpurs> spurs, s32 nSpus, s32 spuPriority, s32 ppuPriority, b8 exitIfNoWork);
s32 cellSpursInitializeWithAttribute(PPUThread& ppu, vm::ptr<CellSpurs> spurs, vm::cptr<CellSpursAttribute> attr);
s32 cellSpursInitializeWithAttribute2(PPUThread& ppu, vm::ptr<CellSpurs> spurs, vm::cptr<CellSpursAttribute> attr);
s32 _cellSpursAttributeInitialize(vm::ptr<CellSpursAttribute> attr, u32 revision, u32 sdkVersion, u32 nSpus, s32 spuPriority, s32 ppuPriority, bool exitIfNoWork);
s32 _cellSpursAttributeInitialize(vm::ptr<CellSpursAttribute> attr, u32 revision, u32 sdkVersion, u32 nSpus, s32 spuPriority, s32 ppuPriority, b8 exitIfNoWork);
s32 cellSpursAttributeSetMemoryContainerForSpuThread(vm::ptr<CellSpursAttribute> attr, u32 container);
s32 cellSpursAttributeSetNamePrefix(vm::ptr<CellSpursAttribute> attr, vm::cptr<char> prefix, u32 size);
s32 cellSpursAttributeEnableSpuPrintfIfAvailable(vm::ptr<CellSpursAttribute> attr);
s32 cellSpursAttributeSetSpuThreadGroupType(vm::ptr<CellSpursAttribute> attr, s32 type);
s32 cellSpursAttributeEnableSystemWorkload(vm::ptr<CellSpursAttribute> attr, vm::cptr<u8[8]> priority, u32 maxSpu, vm::cptr<bool[8]> isPreemptible);
s32 cellSpursAttributeEnableSystemWorkload(vm::ptr<CellSpursAttribute> attr, vm::cptr<u8[8]> priority, u32 maxSpu, vm::cptr<b8[8]> isPreemptible);
s32 cellSpursFinalize(vm::ptr<CellSpurs> spurs);
s32 cellSpursGetSpuThreadGroupId(vm::ptr<CellSpurs> spurs, vm::ptr<u32> group);
s32 cellSpursGetNumSpuThread(vm::ptr<CellSpurs> spurs, vm::ptr<u32> nThreads);
s32 cellSpursGetSpuThreadId(vm::ptr<CellSpurs> spurs, vm::ptr<u32> thread, vm::ptr<u32> nThreads);
s32 cellSpursSetMaxContention(vm::ptr<CellSpurs> spurs, u32 wid, u32 maxContention);
s32 cellSpursSetPriorities(vm::ptr<CellSpurs> spurs, u32 wid, vm::cptr<u8> priorities);
s32 cellSpursSetPreemptionVictimHints(vm::ptr<CellSpurs> spurs, vm::cptr<bool> isPreemptible);
s32 cellSpursSetPreemptionVictimHints(vm::ptr<CellSpurs> spurs, vm::cptr<b8> isPreemptible);
s32 cellSpursAttachLv2EventQueue(PPUThread& ppu, vm::ptr<CellSpurs> spurs, u32 queue, vm::ptr<u8> port, s32 isDynamic);
s32 cellSpursDetachLv2EventQueue(vm::ptr<CellSpurs> spurs, u8 port);
s32 cellSpursEnableExceptionEventHandler(vm::ptr<CellSpurs> spurs, bool flag);
s32 cellSpursEnableExceptionEventHandler(vm::ptr<CellSpurs> spurs, b8 flag);
s32 cellSpursSetGlobalExceptionEventHandler(vm::ptr<CellSpurs> spurs, vm::ptr<CellSpursGlobalExceptionEventHandler> eaHandler, vm::ptr<void> arg);
s32 cellSpursUnsetGlobalExceptionEventHandler(vm::ptr<CellSpurs> spurs);
s32 cellSpursGetInfo(vm::ptr<CellSpurs> spurs, vm::ptr<CellSpursInfo> info);
@ -1266,7 +1266,7 @@ s32 spursInit(
}
/// Initialise SPURS
s32 cellSpursInitialize(PPUThread& ppu, vm::ptr<CellSpurs> spurs, s32 nSpus, s32 spuPriority, s32 ppuPriority, bool exitIfNoWork)
s32 cellSpursInitialize(PPUThread& ppu, vm::ptr<CellSpurs> spurs, s32 nSpus, s32 spuPriority, s32 ppuPriority, b8 exitIfNoWork)
{
cellSpurs.Warning("cellSpursInitialize(spurs=*0x%x, nSpus=%d, spuPriority=%d, ppuPriority=%d, exitIfNoWork=%d)", spurs, nSpus, spuPriority, ppuPriority, exitIfNoWork);
@ -1348,7 +1348,7 @@ s32 cellSpursInitializeWithAttribute2(PPUThread& ppu, vm::ptr<CellSpurs> spurs,
}
/// Initialise SPURS attribute
s32 _cellSpursAttributeInitialize(vm::ptr<CellSpursAttribute> attr, u32 revision, u32 sdkVersion, u32 nSpus, s32 spuPriority, s32 ppuPriority, bool exitIfNoWork)
s32 _cellSpursAttributeInitialize(vm::ptr<CellSpursAttribute> attr, u32 revision, u32 sdkVersion, u32 nSpus, s32 spuPriority, s32 ppuPriority, b8 exitIfNoWork)
{
cellSpurs.Warning("_cellSpursAttributeInitialize(attr=*0x%x, revision=%d, sdkVersion=0x%x, nSpus=%d, spuPriority=%d, ppuPriority=%d, exitIfNoWork=%d)",
attr, revision, sdkVersion, nSpus, spuPriority, ppuPriority, exitIfNoWork);
@ -1478,7 +1478,7 @@ s32 cellSpursAttributeSetSpuThreadGroupType(vm::ptr<CellSpursAttribute> attr, s3
}
/// Enable the system workload
s32 cellSpursAttributeEnableSystemWorkload(vm::ptr<CellSpursAttribute> attr, vm::cptr<u8[8]> priority, u32 maxSpu, vm::cptr<bool[8]> isPreemptible)
s32 cellSpursAttributeEnableSystemWorkload(vm::ptr<CellSpursAttribute> attr, vm::cptr<u8[8]> priority, u32 maxSpu, vm::cptr<b8[8]> isPreemptible)
{
cellSpurs.Warning("cellSpursAttributeEnableSystemWorkload(attr=*0x%x, priority=*0x%x, maxSpu=%d, isPreemptible=*0x%x)", attr, priority, maxSpu, isPreemptible);
@ -1738,7 +1738,7 @@ s32 cellSpursSetPriorities(vm::ptr<CellSpurs> spurs, u32 wid, vm::cptr<u8> prior
}
/// Set preemption victim SPU
s32 cellSpursSetPreemptionVictimHints(vm::ptr<CellSpurs> spurs, vm::cptr<bool> isPreemptible)
s32 cellSpursSetPreemptionVictimHints(vm::ptr<CellSpurs> spurs, vm::cptr<b8> isPreemptible)
{
UNIMPLEMENTED_FUNC(cellSpurs);
return CELL_OK;
@ -1761,7 +1761,7 @@ s32 cellSpursDetachLv2EventQueue(vm::ptr<CellSpurs> spurs, u8 port)
}
/// Enable the SPU exception event handler
s32 cellSpursEnableExceptionEventHandler(vm::ptr<CellSpurs> spurs, bool flag)
s32 cellSpursEnableExceptionEventHandler(vm::ptr<CellSpurs> spurs, b8 flag)
{
cellSpurs.Warning("cellSpursEnableExceptionEventHandler(spurs=*0x%x, flag=%d)", spurs, flag);

View File

@ -35,7 +35,7 @@ struct CellSync2MutexAttribute
be_t<u32> sdkVersion;
be_t<u16> threadTypes;
be_t<u16> maxWaiters;
bool recursive;
b8 recursive;
u8 padding;
char name[CELL_SYNC2_NAME_MAX_LENGTH + 1];
u8 reserved[86];

View File

@ -208,7 +208,7 @@ struct CellVdecAvcSpecificInfo
be_t<u32> thisSize;
be_t<u16> maxDecodedFrameWidth;
be_t<u16> maxDecodedFrameHeight;
bool disableDeblockingFilter;
b8 disableDeblockingFilter;
u8 numberOfDecodedFrameBuffer;
};
@ -331,26 +331,26 @@ struct CellVdecAvcInfo
be_t<u16> horizontalSize;
be_t<u16> verticalSize;
AVC_PictureType pictureType[2];
bool idrPictureFlag;
b8 idrPictureFlag;
AVC_aspect_ratio_idc aspect_ratio_idc;
be_t<u16> sar_height;
be_t<u16> sar_width;
AVC_pic_struct pic_struct;
be_t<s16> picOrderCount[2];
bool vui_parameters_present_flag;
bool frame_mbs_only_flag;
bool video_signal_type_present_flag;
b8 vui_parameters_present_flag;
b8 frame_mbs_only_flag;
b8 video_signal_type_present_flag;
AVC_video_format video_format;
bool video_full_range_flag;
bool colour_description_present_flag;
b8 video_full_range_flag;
b8 colour_description_present_flag;
AVC_colour_primaries colour_primaries;
AVC_transfer_characteristics transfer_characteristics;
AVC_matrix_coefficients matrix_coefficients;
bool timing_info_present_flag;
b8 timing_info_present_flag;
AVC_FrameRateCode frameRateCode; // ???
bool fixed_frame_rate_flag;
bool low_delay_hrd_flag;
bool entropy_coding_mode_flag;
b8 fixed_frame_rate_flag;
b8 low_delay_hrd_flag;
b8 entropy_coding_mode_flag;
be_t<u16> nalUnitPresentFlags;
u8 ccDataLength[2];
u8 ccData[2][CELL_VDEC_AVC_CCD_MAX];
@ -462,7 +462,7 @@ struct CellVdecDivxInfo
DIVX_pixelAspectRatio pixelAspectRatio;
u8 parWidth;
u8 parHeight;
bool colourDescription;
b8 colourDescription;
DIVX_colourPrimaries colourPrimaries;
DIVX_transferCharacteristics transferCharacteristics;
DIVX_matrixCoefficients matrixCoefficients;
@ -615,22 +615,22 @@ struct CellVdecMpeg2Info
MPEG1_aspectRatio aspect_ratio_information1;
};
MPEG2_frameRate frame_rate_code;
bool progressive_sequence;
bool low_delay;
b8 progressive_sequence;
b8 low_delay;
MPEG2_videoFormat video_format;
bool colour_description;
b8 colour_description;
MPEG2_colourPrimaries colour_primaries;
MPEG2_transferCharacteristics transfer_characteristics;
MPEG2_matrixCoefficients matrix_coefficients;
be_t<u16> temporal_reference[2];
MPEG2_pictureCodingType picture_coding_type[2];
MPEG2_pictureStructure picture_structure[2];
bool top_field_first;
bool repeat_first_field;
bool progressive_frame;
b8 top_field_first;
b8 repeat_first_field;
b8 progressive_frame;
be_t<u32> time_code;
bool closed_gop;
bool broken_link;
b8 closed_gop;
b8 broken_link;
be_t<u16> vbv_delay[2];
be_t<u16> display_horizontal_size;
be_t<u16> display_vertical_size;
@ -639,7 +639,7 @@ struct CellVdecMpeg2Info
be_t<u16> frame_centre_vertical_offset[2][3];
be_t<u32> headerPresentFlags; // MPEG2_headerFlags
be_t<u32> headerRetentionFlags; // MPEG2_headerFlags
bool mpeg1Flag;
b8 mpeg1Flag;
u8 ccDataLength[2];
u8 ccData[2][128];
be_t<u64> reserved[2];

View File

@ -954,7 +954,7 @@ struct SceNpBasicExtendedAttachmentData
be_t<u64> msgId;
SceNpBasicAttachmentData data;
be_t<u32> userAction;
bool markedAsUsed;
b8 markedAsUsed;
//be_t<u8> reserved[3];
};
@ -1130,7 +1130,7 @@ struct SceNpMatching2World
be_t<u32> curNumOfTotalLobbyMember;
be_t<u32> curNumOfRoom;
be_t<u32> curNumOfTotalRoomMember;
bool withEntitlementId;
b8 withEntitlementId;
SceNpEntitlementId entitlementId;
u8 padding[3];
};
@ -1234,9 +1234,9 @@ struct SceNpMatching2GroupLabel
struct SceNpMatching2RoomGroupConfig
{
be_t<u32> slotNum;
bool withLabel;
b8 withLabel;
SceNpMatching2GroupLabel label;
bool withPassword;
b8 withPassword;
u8 padding[2];
};
@ -1244,7 +1244,7 @@ struct SceNpMatching2RoomGroupConfig
struct SceNpMatching2RoomGroupPasswordConfig
{
u8 groupId;
bool withPassword;
b8 withPassword;
u8 padding[1];
};
@ -1252,8 +1252,8 @@ struct SceNpMatching2RoomGroupPasswordConfig
struct SceNpMatching2RoomGroup
{
u8 groupId;
bool withPassword;
bool withLabel;
b8 withPassword;
b8 withLabel;
u8 padding[1];
SceNpMatching2GroupLabel label;
be_t<u32> slotNum;
@ -1652,7 +1652,7 @@ struct SceNpMatching2SendRoomChatMessageRequest
// Room chat message send request response data
struct SceNpMatching2SendRoomChatMessageResponse
{
bool filtered;
b8 filtered;
};
// Internal room data configuration request parameters
@ -1778,7 +1778,7 @@ struct SceNpMatching2SendLobbyChatMessageRequest
// Lobby chat message sending response data
struct SceNpMatching2SendLobbyChatMessageResponse
{
bool filtered;
b8 filtered;
};
// Lobby invitation message sending request parameter
@ -1831,7 +1831,7 @@ struct SceNpMatching2GetLobbyMemberDataInternalListRequest
be_t<u32> memberIdNum;
be_t<u16> attrId;
be_t<u32> attrIdNum;
bool extendedData;
b8 extendedData;
u8 padding[7];
};
@ -1925,7 +1925,7 @@ struct SceNpMatching2RoomMemberDataInternalUpdateInfo
// Room message information
struct SceNpMatching2RoomMessageInfo
{
bool filtered;
b8 filtered;
u8 castType;
u8 padding[2];
SceNpMatching2RoomMessageDestination dst;
@ -1968,7 +1968,7 @@ struct SceNpMatching2LobbyMemberDataInternalUpdateInfo
// Lobby message information
struct SceNpMatching2LobbyMessageInfo
{
bool filtered;
b8 filtered;
u8 castType;
u8 padding[2];
SceNpMatching2LobbyMessageDestination dst;

View File

@ -312,7 +312,7 @@ s32 sceNpClansCancelInvitation()
return CELL_OK;
}
s32 sceNpClansSendInvitationResponse(vm::ptr<SceNpClansRequestHandle> handle, u32 clanId, vm::ptr<SceNpClansMessage> message, bool accept)
s32 sceNpClansSendInvitationResponse(vm::ptr<SceNpClansRequestHandle> handle, u32 clanId, vm::ptr<SceNpClansMessage> message, b8 accept)
{
UNIMPLEMENTED_FUNC(sceNpClans);

View File

@ -154,7 +154,7 @@ struct SceNpClansEntry
SceNpClansClanBasicInfo info;
be_t<u32> role;
be_t<s32> status;
bool allowMsg;
b8 allowMsg;
u8 reserved[3];
};
@ -219,7 +219,7 @@ struct SceNpClansUpdatableMemberInfo
be_t<u32> binData1Size;
u8 binAttr1[SCE_NP_CLANS_CLAN_BINARY_ATTRIBUTE1_MAX_SIZE + 1];
s8 description[SCE_NP_CLANS_MEMBER_DESCRIPTION_MAX_LENGTH + 1];
bool allowMsg;
b8 allowMsg;
u8 reserved[3];
};

View File

@ -171,7 +171,7 @@ struct SceNpCommerce2SessionInfo
be_t<u32> decimals;
s8 currencySymbol[SCE_NP_COMMERCE2_CURRENCY_SYMBOL_LEN + 1];
be_t<u32> symbolPosition;
bool symbolWithSpace;
b8 symbolWithSpace;
u8 padding1[3];
s8 thousandSeparator[SCE_NP_COMMERCE2_THOUSAND_SEPARATOR_LEN + 1];
s8 decimalLetter[SCE_NP_COMMERCE2_DECIMAL_LETTER_LEN + 1];
@ -259,7 +259,7 @@ struct SceNpCommerce2GameSkuInfo
be_t<u32> timeUntilExpiration;
be_t<u32> purchasabilityFlag;
be_t<u32> annotation;
bool downloadable;
b8 downloadable;
u8 padding[3];
be_t<u32> price;
s8 skuName;

View File

@ -42,6 +42,11 @@
#include "Utilities/GNU.h"
#define CHECK_SIZE(type, size) static_assert(sizeof(type) == size, "Invalid " #type " type size")
#define CHECK_ALIGN(type, align) static_assert(__alignof(type) == align, "Invalid " #type " type alignment")
#define CHECK_MAX_SIZE(type, size) static_assert(sizeof(type) <= size, #type " type size is too big")
#define CHECK_SIZE_ALIGN(type, size, align) CHECK_SIZE(type, size); CHECK_ALIGN(type, align)
using uint = unsigned int;
using u8 = std::uint8_t;
@ -54,11 +59,28 @@ using s16 = std::int16_t;
using s32 = std::int32_t;
using s64 = std::int64_t;
using b8 = std::uint8_t;
using f32 = float;
using f64 = double;
// bool type replacement for PS3/PSV
class b8
{
std::uint8_t m_value;
public:
b8(const bool value)
: m_value(value)
{
}
operator bool() const //template<typename T, typename = std::enable_if_t<std::is_integral<T>::value>> operator T() const
{
return m_value != 0;
}
};
CHECK_SIZE_ALIGN(b8, 1, 1);
template<typename T, typename = std::enable_if_t<std::is_integral<T>::value>> inline T align(const T& value, u64 align)
{
return static_cast<T>((value + (align - 1)) & ~(align - 1));
@ -122,11 +144,6 @@ template<typename T> struct ID_type;
#define REG_ID_TYPE(t, id) template<> struct ID_type<t> { enum : u32 { type = id }; }
#define CHECK_SIZE(type, size) static_assert(sizeof(type) == size, "Invalid " #type " type size")
#define CHECK_ALIGN(type, align) static_assert(__alignof(type) == align, "Invalid " #type " type alignment")
#define CHECK_MAX_SIZE(type, size) static_assert(sizeof(type) <= size, #type " type size is too big")
#define CHECK_SIZE_ALIGN(type, size, align) CHECK_SIZE(type, size); CHECK_ALIGN(type, align)
#define WRAP_EXPR(expr) [&]{ return expr; }
#define COPY_EXPR(expr) [=]{ return expr; }
#define EXCEPTION(text, ...) fmt::exception(__FILE__, __LINE__, __FUNCTION__, text, ##__VA_ARGS__)