mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
mem32_t replaced
This commit is contained in:
parent
0b5ef1d8f9
commit
9501869aa1
65 changed files with 521 additions and 514 deletions
|
@ -768,7 +768,5 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
typedef mem_t<u32, u32> mem32_t;
|
||||
|
||||
#include "vm.h"
|
||||
|
||||
|
|
|
@ -359,9 +359,9 @@ int cellPadGetInfo2(u32 info_addr)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellPadGetCapabilityInfo(u32 port_no, mem32_t info_addr)
|
||||
int cellPadGetCapabilityInfo(u32 port_no, vm::ptr<be_t<u32>> info_addr)
|
||||
{
|
||||
sys_io->Log("cellPadGetCapabilityInfo[port_no: %d, data_addr: 0x%x]", port_no, info_addr.GetAddr());
|
||||
sys_io->Log("cellPadGetCapabilityInfo[port_no: %d, data_addr: 0x%x]", port_no, info_addr.addr());
|
||||
if (!Emu.GetPadManager().IsInited()) return CELL_PAD_ERROR_UNINITIALIZED;
|
||||
const PadInfo& rinfo = Emu.GetPadManager().GetInfo();
|
||||
if (port_no >= rinfo.max_connect) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
||||
|
@ -374,7 +374,7 @@ int cellPadGetCapabilityInfo(u32 port_no, mem32_t info_addr)
|
|||
//Should return the same as device capability mask, psl1ght has it backwards in pad.h
|
||||
data.info[0] = pads[port_no].m_device_capability;
|
||||
|
||||
Memory.WriteData(info_addr.GetAddr(), data);
|
||||
Memory.WriteData(info_addr.addr(), data);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -614,26 +614,26 @@ int cellAdecQueryAttr(mem_ptr_t<CellAdecType> type, mem_ptr_t<CellAdecAttr> attr
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAdecOpen(mem_ptr_t<CellAdecType> type, mem_ptr_t<CellAdecResource> res, mem_ptr_t<CellAdecCb> cb, mem32_t handle)
|
||||
int cellAdecOpen(mem_ptr_t<CellAdecType> type, mem_ptr_t<CellAdecResource> res, mem_ptr_t<CellAdecCb> cb, vm::ptr<be_t<u32>> handle)
|
||||
{
|
||||
cellAdec->Warning("cellAdecOpen(type_addr=0x%x, res_addr=0x%x, cb_addr=0x%x, handle_addr=0x%x)",
|
||||
type.GetAddr(), res.GetAddr(), cb.GetAddr(), handle.GetAddr());
|
||||
type.GetAddr(), res.GetAddr(), cb.GetAddr(), handle.addr());
|
||||
|
||||
if (!adecCheckType(type->audioCodecType)) return CELL_ADEC_ERROR_ARG;
|
||||
|
||||
handle = adecOpen(new AudioDecoder(type->audioCodecType, res->startAddr, res->totalMemSize, cb->cbFunc, cb->cbArg));
|
||||
*handle = adecOpen(new AudioDecoder(type->audioCodecType, res->startAddr, res->totalMemSize, cb->cbFunc, cb->cbArg));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAdecOpenEx(mem_ptr_t<CellAdecType> type, mem_ptr_t<CellAdecResourceEx> res, mem_ptr_t<CellAdecCb> cb, mem32_t handle)
|
||||
int cellAdecOpenEx(mem_ptr_t<CellAdecType> type, mem_ptr_t<CellAdecResourceEx> res, mem_ptr_t<CellAdecCb> cb, vm::ptr<be_t<u32>> handle)
|
||||
{
|
||||
cellAdec->Warning("cellAdecOpenEx(type_addr=0x%x, res_addr=0x%x, cb_addr=0x%x, handle_addr=0x%x)",
|
||||
type.GetAddr(), res.GetAddr(), cb.GetAddr(), handle.GetAddr());
|
||||
type.GetAddr(), res.GetAddr(), cb.GetAddr(), handle.addr());
|
||||
|
||||
if (!adecCheckType(type->audioCodecType)) return CELL_ADEC_ERROR_ARG;
|
||||
|
||||
handle = adecOpen(new AudioDecoder(type->audioCodecType, res->startAddr, res->totalMemSize, cb->cbFunc, cb->cbArg));
|
||||
*handle = adecOpen(new AudioDecoder(type->audioCodecType, res->startAddr, res->totalMemSize, cb->cbFunc, cb->cbArg));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -767,9 +767,9 @@ int cellAdecGetPcm(u32 handle, u32 outBuffer_addr)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAdecGetPcmItem(u32 handle, mem32_t pcmItem_ptr)
|
||||
int cellAdecGetPcmItem(u32 handle, vm::ptr<be_t<u32>> pcmItem_ptr)
|
||||
{
|
||||
cellAdec->Log("cellAdecGetPcmItem(handle=%d, pcmItem_ptr_addr=0x%x)", handle, pcmItem_ptr.GetAddr());
|
||||
cellAdec->Log("cellAdecGetPcmItem(handle=%d, pcmItem_ptr_addr=0x%x)", handle, pcmItem_ptr.addr());
|
||||
|
||||
AudioDecoder* adec;
|
||||
if (!Emu.GetIdManager().GetIDData(handle, adec))
|
||||
|
@ -811,7 +811,7 @@ int cellAdecGetPcmItem(u32 handle, mem32_t pcmItem_ptr)
|
|||
atx->nbytes = frame->nb_samples * frame->channels * sizeof(float); // ???
|
||||
atx->channelConfigIndex = CELL_ADEC_CH_STEREO; // ???
|
||||
|
||||
pcmItem_ptr = pcm.GetAddr();
|
||||
*pcmItem_ptr = pcm.GetAddr();
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -6,12 +6,12 @@ Module *cellAtrac = nullptr;
|
|||
|
||||
#include "cellAtrac.h"
|
||||
|
||||
int cellAtracSetDataAndGetMemSize(mem_ptr_t<CellAtracHandle> pHandle, u32 pucBufferAddr, u32 uiReadByte, u32 uiBufferByte, mem32_t puiWorkMemByte)
|
||||
int cellAtracSetDataAndGetMemSize(mem_ptr_t<CellAtracHandle> pHandle, u32 pucBufferAddr, u32 uiReadByte, u32 uiBufferByte, vm::ptr<be_t<u32>> puiWorkMemByte)
|
||||
{
|
||||
cellAtrac->Todo("cellAtracSetDataAndGetMemSize(pHandle=0x%x, pucBufferAddr=0x%x, uiReadByte=0x%x, uiBufferByte=0x%x, puiWorkMemByte_addr=0x%x)",
|
||||
pHandle.GetAddr(), pucBufferAddr, uiReadByte, uiBufferByte, puiWorkMemByte.GetAddr());
|
||||
pHandle.GetAddr(), pucBufferAddr, uiReadByte, uiBufferByte, puiWorkMemByte.addr());
|
||||
|
||||
puiWorkMemByte = 0x1000; // unproved
|
||||
*puiWorkMemByte = 0x1000; // unproved
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -39,25 +39,25 @@ int cellAtracDeleteDecoder(mem_ptr_t<CellAtracHandle> pHandle)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAtracDecode(mem_ptr_t<CellAtracHandle> pHandle, u32 pfOutAddr, mem32_t puiSamples, mem32_t puiFinishflag, mem32_t piRemainFrame)
|
||||
int cellAtracDecode(mem_ptr_t<CellAtracHandle> pHandle, u32 pfOutAddr, vm::ptr<be_t<u32>> puiSamples, vm::ptr<be_t<u32>> puiFinishflag, vm::ptr<be_t<u32>> piRemainFrame)
|
||||
{
|
||||
cellAtrac->Todo("cellAtracDecode(pHandle=0x%x, pfOutAddr=0x%x, puiSamples_addr=0x%x, puiFinishFlag_addr=0x%x, piRemainFrame_addr=0x%x)",
|
||||
pHandle.GetAddr(), pfOutAddr, puiSamples.GetAddr(), puiFinishflag.GetAddr(), piRemainFrame.GetAddr());
|
||||
pHandle.GetAddr(), pfOutAddr, puiSamples.addr(), puiFinishflag.addr(), piRemainFrame.addr());
|
||||
|
||||
puiSamples = 0;
|
||||
puiFinishflag = 1;
|
||||
piRemainFrame = CELL_ATRAC_ALLDATA_IS_ON_MEMORY;
|
||||
*puiSamples = 0;
|
||||
*puiFinishflag = 1;
|
||||
*piRemainFrame = CELL_ATRAC_ALLDATA_IS_ON_MEMORY;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAtracGetStreamDataInfo(mem_ptr_t<CellAtracHandle> pHandle, mem32_t ppucWritePointer, mem32_t puiWritableByte, mem32_t puiReadPosition)
|
||||
int cellAtracGetStreamDataInfo(mem_ptr_t<CellAtracHandle> pHandle, vm::ptr<be_t<u32>> ppucWritePointer, vm::ptr<be_t<u32>> puiWritableByte, vm::ptr<be_t<u32>> puiReadPosition)
|
||||
{
|
||||
cellAtrac->Todo("cellAtracGetStreamDataInfo(pHandle=0x%x, ppucWritePointer_addr=0x%x, puiWritableByte_addr=0x%x, puiReadPosition_addr=0x%x)",
|
||||
pHandle.GetAddr(), ppucWritePointer.GetAddr(), puiWritableByte.GetAddr(), puiReadPosition.GetAddr());
|
||||
pHandle.GetAddr(), ppucWritePointer.addr(), puiWritableByte.addr(), puiReadPosition.addr());
|
||||
|
||||
ppucWritePointer = pHandle->data.pucWorkMem_addr;
|
||||
puiWritableByte = 0x1000;
|
||||
puiReadPosition = 0;
|
||||
*ppucWritePointer = pHandle->data.pucWorkMem_addr;
|
||||
*puiWritableByte = 0x1000;
|
||||
*puiReadPosition = 0;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -67,19 +67,19 @@ int cellAtracAddStreamData(mem_ptr_t<CellAtracHandle> pHandle, u32 uiAddByte)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAtracGetRemainFrame(mem_ptr_t<CellAtracHandle> pHandle, mem32_t piRemainFrame)
|
||||
int cellAtracGetRemainFrame(mem_ptr_t<CellAtracHandle> pHandle, vm::ptr<be_t<u32>> piRemainFrame)
|
||||
{
|
||||
cellAtrac->Todo("cellAtracGetRemainFrame(pHandle=0x%x, piRemainFrame_addr=0x%x)", pHandle.GetAddr(), piRemainFrame.GetAddr());
|
||||
cellAtrac->Todo("cellAtracGetRemainFrame(pHandle=0x%x, piRemainFrame_addr=0x%x)", pHandle.GetAddr(), piRemainFrame.addr());
|
||||
|
||||
piRemainFrame = CELL_ATRAC_ALLDATA_IS_ON_MEMORY;
|
||||
*piRemainFrame = CELL_ATRAC_ALLDATA_IS_ON_MEMORY;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAtracGetVacantSize(mem_ptr_t<CellAtracHandle> pHandle, mem32_t puiVacantSize)
|
||||
int cellAtracGetVacantSize(mem_ptr_t<CellAtracHandle> pHandle, vm::ptr<be_t<u32>> puiVacantSize)
|
||||
{
|
||||
cellAtrac->Todo("cellAtracGetVacantSize(pHandle=0x%x, puiVacantSize_addr=0x%x)", pHandle.GetAddr(), puiVacantSize.GetAddr());
|
||||
cellAtrac->Todo("cellAtracGetVacantSize(pHandle=0x%x, puiVacantSize_addr=0x%x)", pHandle.GetAddr(), puiVacantSize.addr());
|
||||
|
||||
puiVacantSize = 0x1000;
|
||||
*puiVacantSize = 0x1000;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -89,13 +89,13 @@ int cellAtracIsSecondBufferNeeded(mem_ptr_t<CellAtracHandle> pHandle)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAtracGetSecondBufferInfo(mem_ptr_t<CellAtracHandle> pHandle, mem32_t puiReadPosition, mem32_t puiDataByte)
|
||||
int cellAtracGetSecondBufferInfo(mem_ptr_t<CellAtracHandle> pHandle, vm::ptr<be_t<u32>> puiReadPosition, vm::ptr<be_t<u32>> puiDataByte)
|
||||
{
|
||||
cellAtrac->Todo("cellAtracGetSecondBufferInfo(pHandle=0x%x, puiReadPosition_addr=0x%x, puiDataByte_addr=0x%x)",
|
||||
pHandle.GetAddr(), puiReadPosition.GetAddr(), puiDataByte.GetAddr());
|
||||
pHandle.GetAddr(), puiReadPosition.addr(), puiDataByte.addr());
|
||||
|
||||
puiReadPosition = 0;
|
||||
puiDataByte = 0; // write to null block will occur
|
||||
*puiReadPosition = 0;
|
||||
*puiDataByte = 0; // write to null block will occur
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -106,66 +106,66 @@ int cellAtracSetSecondBuffer(mem_ptr_t<CellAtracHandle> pHandle, u32 pucSecondBu
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAtracGetChannel(mem_ptr_t<CellAtracHandle> pHandle, mem32_t puiChannel)
|
||||
int cellAtracGetChannel(mem_ptr_t<CellAtracHandle> pHandle, vm::ptr<be_t<u32>> puiChannel)
|
||||
{
|
||||
cellAtrac->Todo("cellAtracGetChannel(pHandle=0x%x, puiChannel_addr=0x%x)", pHandle.GetAddr(), puiChannel.GetAddr());
|
||||
cellAtrac->Todo("cellAtracGetChannel(pHandle=0x%x, puiChannel_addr=0x%x)", pHandle.GetAddr(), puiChannel.addr());
|
||||
|
||||
puiChannel = 2;
|
||||
*puiChannel = 2;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAtracGetMaxSample(mem_ptr_t<CellAtracHandle> pHandle, mem32_t puiMaxSample)
|
||||
int cellAtracGetMaxSample(mem_ptr_t<CellAtracHandle> pHandle, vm::ptr<be_t<u32>> puiMaxSample)
|
||||
{
|
||||
cellAtrac->Todo("cellAtracGetMaxSample(pHandle=0x%x, puiMaxSample_addr=0x%x)", pHandle.GetAddr(), puiMaxSample.GetAddr());
|
||||
cellAtrac->Todo("cellAtracGetMaxSample(pHandle=0x%x, puiMaxSample_addr=0x%x)", pHandle.GetAddr(), puiMaxSample.addr());
|
||||
|
||||
puiMaxSample = 512;
|
||||
*puiMaxSample = 512;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAtracGetNextSample(mem_ptr_t<CellAtracHandle> pHandle, mem32_t puiNextSample)
|
||||
int cellAtracGetNextSample(mem_ptr_t<CellAtracHandle> pHandle, vm::ptr<be_t<u32>> puiNextSample)
|
||||
{
|
||||
cellAtrac->Todo("cellAtracGetNextSample(pHandle=0x%x, puiNextSample_addr=0x%x)", pHandle.GetAddr(), puiNextSample.GetAddr());
|
||||
cellAtrac->Todo("cellAtracGetNextSample(pHandle=0x%x, puiNextSample_addr=0x%x)", pHandle.GetAddr(), puiNextSample.addr());
|
||||
|
||||
puiNextSample = 0;
|
||||
*puiNextSample = 0;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAtracGetSoundInfo(mem_ptr_t<CellAtracHandle> pHandle, mem32_t piEndSample, mem32_t piLoopStartSample, mem32_t piLoopEndSample)
|
||||
int cellAtracGetSoundInfo(mem_ptr_t<CellAtracHandle> pHandle, vm::ptr<be_t<u32>> piEndSample, vm::ptr<be_t<u32>> piLoopStartSample, vm::ptr<be_t<u32>> piLoopEndSample)
|
||||
{
|
||||
cellAtrac->Todo("cellAtracGetSoundInfo(pHandle=0x%x, piEndSample_addr=0x%x, piLoopStartSample_addr=0x%x, piLoopEndSample_addr=0x%x)",
|
||||
pHandle.GetAddr(), piEndSample.GetAddr(), piLoopStartSample.GetAddr(), piLoopEndSample.GetAddr());
|
||||
pHandle.GetAddr(), piEndSample.addr(), piLoopStartSample.addr(), piLoopEndSample.addr());
|
||||
|
||||
piEndSample = 0;
|
||||
piLoopStartSample = 0;
|
||||
piLoopEndSample = 0;
|
||||
*piEndSample = 0;
|
||||
*piLoopStartSample = 0;
|
||||
*piLoopEndSample = 0;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAtracGetNextDecodePosition(mem_ptr_t<CellAtracHandle> pHandle, mem32_t puiSamplePosition)
|
||||
int cellAtracGetNextDecodePosition(mem_ptr_t<CellAtracHandle> pHandle, vm::ptr<be_t<u32>> puiSamplePosition)
|
||||
{
|
||||
cellAtrac->Todo("cellAtracGetNextDecodePosition(pHandle=0x%x, puiSamplePosition_addr=0x%x)",
|
||||
pHandle.GetAddr(), puiSamplePosition.GetAddr());
|
||||
pHandle.GetAddr(), puiSamplePosition.addr());
|
||||
|
||||
puiSamplePosition = 0;
|
||||
*puiSamplePosition = 0;
|
||||
return CELL_ATRAC_ERROR_ALLDATA_WAS_DECODED;
|
||||
}
|
||||
|
||||
int cellAtracGetBitrate(mem_ptr_t<CellAtracHandle> pHandle, mem32_t puiBitrate)
|
||||
int cellAtracGetBitrate(mem_ptr_t<CellAtracHandle> pHandle, vm::ptr<be_t<u32>> puiBitrate)
|
||||
{
|
||||
cellAtrac->Todo("cellAtracGetBitrate(pHandle=0x%x, puiBitrate_addr=0x%x)",
|
||||
pHandle.GetAddr(), puiBitrate.GetAddr());
|
||||
pHandle.GetAddr(), puiBitrate.addr());
|
||||
|
||||
puiBitrate = 128;
|
||||
*puiBitrate = 128;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAtracGetLoopInfo(mem_ptr_t<CellAtracHandle> pHandle, mem32_t piLoopNum, mem32_t puiLoopStatus)
|
||||
int cellAtracGetLoopInfo(mem_ptr_t<CellAtracHandle> pHandle, vm::ptr<be_t<u32>> piLoopNum, vm::ptr<be_t<u32>> puiLoopStatus)
|
||||
{
|
||||
cellAtrac->Todo("cellAtracGetLoopInfo(pHandle=0x%x, piLoopNum_addr=0x%x, puiLoopStatus_addr=0x%x)",
|
||||
pHandle.GetAddr(), piLoopNum.GetAddr(), puiLoopStatus.GetAddr());
|
||||
pHandle.GetAddr(), piLoopNum.addr(), puiLoopStatus.addr());
|
||||
|
||||
piLoopNum = 0;
|
||||
puiLoopStatus = 0;
|
||||
*piLoopNum = 0;
|
||||
*puiLoopStatus = 0;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -194,12 +194,12 @@ int cellAtracResetPlayPosition(mem_ptr_t<CellAtracHandle> pHandle, u32 uiSample,
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAtracGetInternalErrorInfo(mem_ptr_t<CellAtracHandle> pHandle, mem32_t piResult)
|
||||
int cellAtracGetInternalErrorInfo(mem_ptr_t<CellAtracHandle> pHandle, vm::ptr<be_t<u32>> piResult)
|
||||
{
|
||||
cellAtrac->Todo("cellAtracGetInternalErrorInfo(pHandle=0x%x, piResult_addr=0x%x)",
|
||||
pHandle.GetAddr(), piResult.GetAddr());
|
||||
pHandle.GetAddr(), piResult.addr());
|
||||
|
||||
piResult = 0;
|
||||
*piResult = 0;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -507,9 +507,9 @@ int cellAudioQuit()
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAudioPortOpen(mem_ptr_t<CellAudioPortParam> audioParam, mem32_t portNum)
|
||||
int cellAudioPortOpen(mem_ptr_t<CellAudioPortParam> audioParam, vm::ptr<be_t<u32>> portNum)
|
||||
{
|
||||
cellAudio->Warning("cellAudioPortOpen(audioParam_addr=0x%x, portNum_addr=0x%x)", audioParam.GetAddr(), portNum.GetAddr());
|
||||
cellAudio->Warning("cellAudioPortOpen(audioParam_addr=0x%x, portNum_addr=0x%x)", audioParam.GetAddr(), portNum.addr());
|
||||
|
||||
if (audioParam->nChannel > 8 || audioParam->nBlock > 16)
|
||||
{
|
||||
|
@ -539,7 +539,7 @@ int cellAudioPortOpen(mem_ptr_t<CellAudioPortParam> audioParam, mem32_t portNum)
|
|||
port.level = 1.0f;
|
||||
}
|
||||
|
||||
portNum = i;
|
||||
*portNum = i;
|
||||
cellAudio->Warning("*** audio port opened(nChannel=%d, nBlock=%d, attr=0x%llx, level=%f): port = %d",
|
||||
port.channel, port.block, port.attr, port.level, i);
|
||||
|
||||
|
@ -738,9 +738,9 @@ int cellAudioSetPortLevel(u32 portNum, float level)
|
|||
}
|
||||
|
||||
// Utility Functions
|
||||
int cellAudioCreateNotifyEventQueue(mem32_t id, vm::ptr<be_t<u64>> key)
|
||||
int cellAudioCreateNotifyEventQueue(vm::ptr<be_t<u32>> id, vm::ptr<be_t<u64>> key)
|
||||
{
|
||||
cellAudio->Warning("cellAudioCreateNotifyEventQueue(id_addr=0x%x, key_addr=0x%x)", id.GetAddr(), key.addr());
|
||||
cellAudio->Warning("cellAudioCreateNotifyEventQueue(id_addr=0x%x, key_addr=0x%x)", id.addr(), key.addr());
|
||||
|
||||
std::lock_guard<std::mutex> lock(audioMutex);
|
||||
|
||||
|
@ -760,15 +760,15 @@ int cellAudioCreateNotifyEventQueue(mem32_t id, vm::ptr<be_t<u64>> key)
|
|||
return CELL_AUDIO_ERROR_EVENT_QUEUE;
|
||||
}
|
||||
|
||||
id = cellAudio->GetNewId(eq);
|
||||
*id = cellAudio->GetNewId(eq);
|
||||
*key = event_key;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAudioCreateNotifyEventQueueEx(mem32_t id, vm::ptr<be_t<u64>> key, u32 iFlags)
|
||||
int cellAudioCreateNotifyEventQueueEx(vm::ptr<be_t<u32>> id, vm::ptr<be_t<u64>> key, u32 iFlags)
|
||||
{
|
||||
cellAudio->Todo("cellAudioCreateNotifyEventQueueEx(id_addr=0x%x, key_addr=0x%x, iFlags=0x%x)", id.GetAddr(), key.addr(), iFlags);
|
||||
cellAudio->Todo("cellAudioCreateNotifyEventQueueEx(id_addr=0x%x, key_addr=0x%x, iFlags=0x%x)", id.addr(), key.addr(), iFlags);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -844,21 +844,21 @@ int cellAudioRemoveNotifyEventQueueEx(u64 key, u32 iFlags)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAudioAddData(u32 portNum, mem32_t src, u32 samples, float volume)
|
||||
int cellAudioAddData(u32 portNum, vm::ptr<be_t<float>> src, u32 samples, float volume)
|
||||
{
|
||||
cellAudio->Todo("cellAudioAddData(portNum=0x%x, src_addr=0x%x, samples=%d, volume=%f)", portNum, src.GetAddr(), samples, volume);
|
||||
cellAudio->Todo("cellAudioAddData(portNum=0x%x, src_addr=0x%x, samples=%d, volume=%f)", portNum, src.addr(), samples, volume);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAudioAdd2chData(u32 portNum, mem32_t src, u32 samples, float volume)
|
||||
int cellAudioAdd2chData(u32 portNum, vm::ptr<be_t<float>> src, u32 samples, float volume)
|
||||
{
|
||||
cellAudio->Todo("cellAudioAdd2chData(portNum=0x%x, src_addr=0x%x, samples=%d, volume=%f)", portNum, src.GetAddr(), samples, volume);
|
||||
cellAudio->Todo("cellAudioAdd2chData(portNum=0x%x, src_addr=0x%x, samples=%d, volume=%f)", portNum, src.addr(), samples, volume);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAudioAdd6chData(u32 portNum, mem32_t src, float volume)
|
||||
int cellAudioAdd6chData(u32 portNum, vm::ptr<be_t<float>> src, float volume)
|
||||
{
|
||||
cellAudio->Todo("cellAudioAdd6chData(portNum=0x%x, src_addr=0x%x, volume=%f)", portNum, src.GetAddr(), volume);
|
||||
cellAudio->Todo("cellAudioAdd6chData(portNum=0x%x, src_addr=0x%x, volume=%f)", portNum, src.addr(), volume);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -776,10 +776,10 @@ int cellDmuxQueryAttr2(const mem_ptr_t<CellDmuxType2> demuxerType2, mem_ptr_t<Ce
|
|||
}
|
||||
|
||||
int cellDmuxOpen(const mem_ptr_t<CellDmuxType> demuxerType, const mem_ptr_t<CellDmuxResource> demuxerResource,
|
||||
const mem_ptr_t<CellDmuxCb> demuxerCb, mem32_t demuxerHandle)
|
||||
const mem_ptr_t<CellDmuxCb> demuxerCb, vm::ptr<be_t<u32>> demuxerHandle)
|
||||
{
|
||||
cellDmux->Warning("cellDmuxOpen(demuxerType_addr=0x%x, demuxerResource_addr=0x%x, demuxerCb_addr=0x%x, demuxerHandle_addr=0x%x)",
|
||||
demuxerType.GetAddr(), demuxerResource.GetAddr(), demuxerCb.GetAddr(), demuxerHandle.GetAddr());
|
||||
demuxerType.GetAddr(), demuxerResource.GetAddr(), demuxerCb.GetAddr(), demuxerHandle.addr());
|
||||
|
||||
if (demuxerType->streamType != CELL_DMUX_STREAM_TYPE_PAMF)
|
||||
{
|
||||
|
@ -788,16 +788,16 @@ int cellDmuxOpen(const mem_ptr_t<CellDmuxType> demuxerType, const mem_ptr_t<Cell
|
|||
|
||||
// TODO: check demuxerResource and demuxerCb arguments
|
||||
|
||||
demuxerHandle = dmuxOpen(new Demuxer(demuxerResource->memAddr, demuxerResource->memSize, demuxerCb->cbMsgFunc, demuxerCb->cbArg_addr));
|
||||
*demuxerHandle = dmuxOpen(new Demuxer(demuxerResource->memAddr, demuxerResource->memSize, demuxerCb->cbMsgFunc, demuxerCb->cbArg_addr));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellDmuxOpenEx(const mem_ptr_t<CellDmuxType> demuxerType, const mem_ptr_t<CellDmuxResourceEx> demuxerResourceEx,
|
||||
const mem_ptr_t<CellDmuxCb> demuxerCb, mem32_t demuxerHandle)
|
||||
const mem_ptr_t<CellDmuxCb> demuxerCb, vm::ptr<be_t<u32>> demuxerHandle)
|
||||
{
|
||||
cellDmux->Warning("cellDmuxOpenEx(demuxerType_addr=0x%x, demuxerResourceEx_addr=0x%x, demuxerCb_addr=0x%x, demuxerHandle_addr=0x%x)",
|
||||
demuxerType.GetAddr(), demuxerResourceEx.GetAddr(), demuxerCb.GetAddr(), demuxerHandle.GetAddr());
|
||||
demuxerType.GetAddr(), demuxerResourceEx.GetAddr(), demuxerCb.GetAddr(), demuxerHandle.addr());
|
||||
|
||||
if (demuxerType->streamType != CELL_DMUX_STREAM_TYPE_PAMF)
|
||||
{
|
||||
|
@ -806,16 +806,16 @@ int cellDmuxOpenEx(const mem_ptr_t<CellDmuxType> demuxerType, const mem_ptr_t<Ce
|
|||
|
||||
// TODO: check demuxerResourceEx and demuxerCb arguments
|
||||
|
||||
demuxerHandle = dmuxOpen(new Demuxer(demuxerResourceEx->memAddr, demuxerResourceEx->memSize, demuxerCb->cbMsgFunc, demuxerCb->cbArg_addr));
|
||||
*demuxerHandle = dmuxOpen(new Demuxer(demuxerResourceEx->memAddr, demuxerResourceEx->memSize, demuxerCb->cbMsgFunc, demuxerCb->cbArg_addr));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellDmuxOpen2(const mem_ptr_t<CellDmuxType2> demuxerType2, const mem_ptr_t<CellDmuxResource2> demuxerResource2,
|
||||
const mem_ptr_t<CellDmuxCb> demuxerCb, mem32_t demuxerHandle)
|
||||
const mem_ptr_t<CellDmuxCb> demuxerCb, vm::ptr<be_t<u32>> demuxerHandle)
|
||||
{
|
||||
cellDmux->Warning("cellDmuxOpen2(demuxerType2_addr=0x%x, demuxerResource2_addr=0x%x, demuxerCb_addr=0x%x, demuxerHandle_addr=0x%x)",
|
||||
demuxerType2.GetAddr(), demuxerResource2.GetAddr(), demuxerCb.GetAddr(), demuxerHandle.GetAddr());
|
||||
demuxerType2.GetAddr(), demuxerResource2.GetAddr(), demuxerCb.GetAddr(), demuxerHandle.addr());
|
||||
|
||||
if (demuxerType2->streamType != CELL_DMUX_STREAM_TYPE_PAMF)
|
||||
{
|
||||
|
@ -824,7 +824,7 @@ int cellDmuxOpen2(const mem_ptr_t<CellDmuxType2> demuxerType2, const mem_ptr_t<C
|
|||
|
||||
// TODO: check demuxerType2, demuxerResource2 and demuxerCb arguments
|
||||
|
||||
demuxerHandle = dmuxOpen(new Demuxer(demuxerResource2->memAddr, demuxerResource2->memSize, demuxerCb->cbMsgFunc, demuxerCb->cbArg_addr));
|
||||
*demuxerHandle = dmuxOpen(new Demuxer(demuxerResource2->memAddr, demuxerResource2->memSize, demuxerCb->cbMsgFunc, demuxerCb->cbArg_addr));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -979,11 +979,11 @@ int cellDmuxQueryEsAttr2(const mem_ptr_t<CellDmuxType2> demuxerType2, const mem_
|
|||
|
||||
int cellDmuxEnableEs(u32 demuxerHandle, const mem_ptr_t<CellCodecEsFilterId> esFilterId,
|
||||
const mem_ptr_t<CellDmuxEsResource> esResourceInfo, const mem_ptr_t<CellDmuxEsCb> esCb,
|
||||
const u32 esSpecificInfo_addr, mem32_t esHandle)
|
||||
const u32 esSpecificInfo_addr, vm::ptr<be_t<u32>> esHandle)
|
||||
{
|
||||
cellDmux->Warning("cellDmuxEnableEs(demuxerHandle=%d, esFilterId_addr=0x%x, esResourceInfo_addr=0x%x, esCb_addr=0x%x, "
|
||||
"esSpecificInfo_addr=0x%x, esHandle_addr=0x%x)", demuxerHandle, esFilterId.GetAddr(), esResourceInfo.GetAddr(),
|
||||
esCb.GetAddr(), esSpecificInfo_addr, esHandle.GetAddr());
|
||||
esCb.GetAddr(), esSpecificInfo_addr, esHandle.addr());
|
||||
|
||||
Demuxer* dmux;
|
||||
if (!Emu.GetIdManager().GetIDData(demuxerHandle, dmux))
|
||||
|
@ -999,7 +999,7 @@ int cellDmuxEnableEs(u32 demuxerHandle, const mem_ptr_t<CellCodecEsFilterId> esF
|
|||
|
||||
u32 id = cellDmux->GetNewId(es);
|
||||
es->id = id;
|
||||
esHandle = id;
|
||||
*esHandle = id;
|
||||
|
||||
cellDmux->Warning("*** New ES(dmux=%d, addr=0x%x, size=0x%x, filter(0x%x, 0x%x, 0x%x, 0x%x), cb=0x%x(arg=0x%x), spec=0x%x): id = %d",
|
||||
demuxerHandle, es->memAddr, es->memSize, es->fidMajor, es->fidMinor, es->sup1, es->sup2, (u32)esCb->cbEsMsgFunc, es->cbArg, es->spec, id);
|
||||
|
@ -1048,10 +1048,10 @@ int cellDmuxResetEs(u32 esHandle)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellDmuxGetAu(u32 esHandle, mem32_t auInfo_ptr, mem32_t auSpecificInfo_ptr)
|
||||
int cellDmuxGetAu(u32 esHandle, vm::ptr<be_t<u32>> auInfo_ptr, vm::ptr<be_t<u32>> auSpecificInfo_ptr)
|
||||
{
|
||||
cellDmux->Log("cellDmuxGetAu(esHandle=0x%x, auInfo_ptr_addr=0x%x, auSpecificInfo_ptr_addr=0x%x)",
|
||||
esHandle, auInfo_ptr.GetAddr(), auSpecificInfo_ptr.GetAddr());
|
||||
esHandle, auInfo_ptr.addr(), auSpecificInfo_ptr.addr());
|
||||
|
||||
ElementaryStream* es;
|
||||
if (!Emu.GetIdManager().GetIDData(esHandle, es))
|
||||
|
@ -1066,15 +1066,15 @@ int cellDmuxGetAu(u32 esHandle, mem32_t auInfo_ptr, mem32_t auSpecificInfo_ptr)
|
|||
return CELL_DMUX_ERROR_EMPTY;
|
||||
}
|
||||
|
||||
auInfo_ptr = info;
|
||||
auSpecificInfo_ptr = spec;
|
||||
*auInfo_ptr = info;
|
||||
*auSpecificInfo_ptr = spec;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellDmuxPeekAu(u32 esHandle, mem32_t auInfo_ptr, mem32_t auSpecificInfo_ptr)
|
||||
int cellDmuxPeekAu(u32 esHandle, vm::ptr<be_t<u32>> auInfo_ptr, vm::ptr<be_t<u32>> auSpecificInfo_ptr)
|
||||
{
|
||||
cellDmux->Log("cellDmuxPeekAu(esHandle=0x%x, auInfo_ptr_addr=0x%x, auSpecificInfo_ptr_addr=0x%x)",
|
||||
esHandle, auInfo_ptr.GetAddr(), auSpecificInfo_ptr.GetAddr());
|
||||
esHandle, auInfo_ptr.addr(), auSpecificInfo_ptr.addr());
|
||||
|
||||
ElementaryStream* es;
|
||||
if (!Emu.GetIdManager().GetIDData(esHandle, es))
|
||||
|
@ -1089,15 +1089,15 @@ int cellDmuxPeekAu(u32 esHandle, mem32_t auInfo_ptr, mem32_t auSpecificInfo_ptr)
|
|||
return CELL_DMUX_ERROR_EMPTY;
|
||||
}
|
||||
|
||||
auInfo_ptr = info;
|
||||
auSpecificInfo_ptr = spec;
|
||||
*auInfo_ptr = info;
|
||||
*auSpecificInfo_ptr = spec;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellDmuxGetAuEx(u32 esHandle, mem32_t auInfoEx_ptr, mem32_t auSpecificInfo_ptr)
|
||||
int cellDmuxGetAuEx(u32 esHandle, vm::ptr<be_t<u32>> auInfoEx_ptr, vm::ptr<be_t<u32>> auSpecificInfo_ptr)
|
||||
{
|
||||
cellDmux->Log("cellDmuxGetAuEx(esHandle=0x%x, auInfoEx_ptr_addr=0x%x, auSpecificInfo_ptr_addr=0x%x)",
|
||||
esHandle, auInfoEx_ptr.GetAddr(), auSpecificInfo_ptr.GetAddr());
|
||||
esHandle, auInfoEx_ptr.addr(), auSpecificInfo_ptr.addr());
|
||||
|
||||
ElementaryStream* es;
|
||||
if (!Emu.GetIdManager().GetIDData(esHandle, es))
|
||||
|
@ -1112,15 +1112,15 @@ int cellDmuxGetAuEx(u32 esHandle, mem32_t auInfoEx_ptr, mem32_t auSpecificInfo_p
|
|||
return CELL_DMUX_ERROR_EMPTY;
|
||||
}
|
||||
|
||||
auInfoEx_ptr = info;
|
||||
auSpecificInfo_ptr = spec;
|
||||
*auInfoEx_ptr = info;
|
||||
*auSpecificInfo_ptr = spec;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellDmuxPeekAuEx(u32 esHandle, mem32_t auInfoEx_ptr, mem32_t auSpecificInfo_ptr)
|
||||
int cellDmuxPeekAuEx(u32 esHandle, vm::ptr<be_t<u32>> auInfoEx_ptr, vm::ptr<be_t<u32>> auSpecificInfo_ptr)
|
||||
{
|
||||
cellDmux->Log("cellDmuxPeekAuEx(esHandle=0x%x, auInfoEx_ptr_addr=0x%x, auSpecificInfo_ptr_addr=0x%x)",
|
||||
esHandle, auInfoEx_ptr.GetAddr(), auSpecificInfo_ptr.GetAddr());
|
||||
esHandle, auInfoEx_ptr.addr(), auSpecificInfo_ptr.addr());
|
||||
|
||||
ElementaryStream* es;
|
||||
if (!Emu.GetIdManager().GetIDData(esHandle, es))
|
||||
|
@ -1135,8 +1135,8 @@ int cellDmuxPeekAuEx(u32 esHandle, mem32_t auInfoEx_ptr, mem32_t auSpecificInfo_
|
|||
return CELL_DMUX_ERROR_EMPTY;
|
||||
}
|
||||
|
||||
auInfoEx_ptr = info;
|
||||
auSpecificInfo_ptr = spec;
|
||||
*auInfoEx_ptr = info;
|
||||
*auSpecificInfo_ptr = spec;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -387,10 +387,10 @@ int cellFontGetEffectSlant(mem_ptr_t<CellFont> font, mem_ptr_t<be_t<float>> slan
|
|||
return CELL_FONT_OK;
|
||||
}
|
||||
|
||||
int cellFontGetFontIdCode(mem_ptr_t<CellFont> font, u32 code, mem32_t fontId, mem32_t fontCode)
|
||||
int cellFontGetFontIdCode(mem_ptr_t<CellFont> font, u32 code, vm::ptr<be_t<u32>> fontId, vm::ptr<be_t<u32>> fontCode)
|
||||
{
|
||||
cellFont->Todo("cellFontGetFontIdCode(font_addr=0x%x, code=0x%x, fontId_addr=0x%x, fontCode_addr=0x%x",
|
||||
font.GetAddr(), code, fontId.GetAddr(), fontCode.GetAddr());
|
||||
font.GetAddr(), code, fontId.addr(), fontCode.addr());
|
||||
|
||||
// TODO: ?
|
||||
return CELL_FONT_OK;
|
||||
|
|
|
@ -16,10 +16,10 @@ Module *cellGame = nullptr;
|
|||
std::string contentInfo = "";
|
||||
std::string usrdir = "";
|
||||
|
||||
int cellGameBootCheck(mem32_t type, mem32_t attributes, mem_ptr_t<CellGameContentSize> size, vm::ptr<char> dirName)
|
||||
int cellGameBootCheck(vm::ptr<be_t<u32>> type, vm::ptr<be_t<u32>> attributes, mem_ptr_t<CellGameContentSize> size, vm::ptr<char> dirName)
|
||||
{
|
||||
cellGame->Warning("cellGameBootCheck(type_addr=0x%x, attributes_addr=0x%x, size_addr=0x%x, dirName_addr=0x%x)",
|
||||
type.GetAddr(), attributes.GetAddr(), size.GetAddr(), dirName.addr());
|
||||
type.addr(), attributes.addr(), size.GetAddr(), dirName.addr());
|
||||
|
||||
if (size)
|
||||
{
|
||||
|
@ -48,8 +48,8 @@ int cellGameBootCheck(mem32_t type, mem32_t attributes, mem_ptr_t<CellGameConten
|
|||
std::string category = psf.GetString("CATEGORY");
|
||||
if (category.substr(0, 2) == "DG")
|
||||
{
|
||||
type = CELL_GAME_GAMETYPE_DISC;
|
||||
attributes = 0; // TODO
|
||||
*type = CELL_GAME_GAMETYPE_DISC;
|
||||
*attributes = 0; // TODO
|
||||
if (dirName) Memory.WriteString(dirName.addr(), ""); // ???
|
||||
contentInfo = "/dev_bdvd/PS3_GAME";
|
||||
usrdir = "/dev_bdvd/PS3_GAME/USRDIR";
|
||||
|
@ -57,8 +57,8 @@ int cellGameBootCheck(mem32_t type, mem32_t attributes, mem_ptr_t<CellGameConten
|
|||
else if (category.substr(0, 2) == "HG")
|
||||
{
|
||||
std::string titleId = psf.GetString("TITLE_ID");
|
||||
type = CELL_GAME_GAMETYPE_HDD;
|
||||
attributes = 0; // TODO
|
||||
*type = CELL_GAME_GAMETYPE_HDD;
|
||||
*attributes = 0; // TODO
|
||||
if (dirName) Memory.WriteString(dirName.addr(), titleId);
|
||||
contentInfo = "/dev_hdd0/game/" + titleId;
|
||||
usrdir = "/dev_hdd0/game/" + titleId + "/USRDIR";
|
||||
|
@ -66,8 +66,8 @@ int cellGameBootCheck(mem32_t type, mem32_t attributes, mem_ptr_t<CellGameConten
|
|||
else if (category.substr(0, 2) == "GD")
|
||||
{
|
||||
std::string titleId = psf.GetString("TITLE_ID");
|
||||
type = CELL_GAME_GAMETYPE_DISC;
|
||||
attributes = CELL_GAME_ATTRIBUTE_PATCH; // TODO
|
||||
*type = CELL_GAME_GAMETYPE_DISC;
|
||||
*attributes = CELL_GAME_ATTRIBUTE_PATCH; // TODO
|
||||
if (dirName) Memory.WriteString(dirName.addr(), titleId); // ???
|
||||
contentInfo = "/dev_bdvd/PS3_GAME";
|
||||
usrdir = "/dev_bdvd/PS3_GAME/USRDIR";
|
||||
|
@ -327,9 +327,9 @@ int cellGameDeleteGameData()
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellGameGetParamInt(u32 id, mem32_t value)
|
||||
int cellGameGetParamInt(u32 id, vm::ptr<be_t<u32>> value)
|
||||
{
|
||||
cellGame->Warning("cellGameGetParamInt(id=%d, value_addr=0x%x)", id, value.GetAddr());
|
||||
cellGame->Warning("cellGameGetParamInt(id=%d, value_addr=0x%x)", id, value.addr());
|
||||
|
||||
// TODO: Access through cellGame***Check functions
|
||||
vfsFile f("/app_home/PARAM.SFO");
|
||||
|
@ -339,9 +339,9 @@ int cellGameGetParamInt(u32 id, mem32_t value)
|
|||
|
||||
switch(id)
|
||||
{
|
||||
case CELL_GAME_PARAMID_PARENTAL_LEVEL: value = psf.GetInteger("PARENTAL_LEVEL"); break;
|
||||
case CELL_GAME_PARAMID_RESOLUTION: value = psf.GetInteger("RESOLUTION"); break;
|
||||
case CELL_GAME_PARAMID_SOUND_FORMAT: value = psf.GetInteger("SOUND_FORMAT"); break;
|
||||
case CELL_GAME_PARAMID_PARENTAL_LEVEL: *value = psf.GetInteger("PARENTAL_LEVEL"); break;
|
||||
case CELL_GAME_PARAMID_RESOLUTION: *value = psf.GetInteger("RESOLUTION"); break;
|
||||
case CELL_GAME_PARAMID_SOUND_FORMAT: *value = psf.GetInteger("SOUND_FORMAT"); break;
|
||||
|
||||
default:
|
||||
return CELL_GAME_ERROR_INVALID_ID;
|
||||
|
|
|
@ -801,9 +801,9 @@ int cellGcmSortRemapEaIoAddress()
|
|||
//----------------------------------------------------------------------------
|
||||
// Memory Mapping
|
||||
//----------------------------------------------------------------------------
|
||||
s32 cellGcmAddressToOffset(u64 address, mem32_t offset)
|
||||
s32 cellGcmAddressToOffset(u64 address, vm::ptr<be_t<u32>> offset)
|
||||
{
|
||||
cellGcmSys->Log("cellGcmAddressToOffset(address=0x%x,offset_addr=0x%x)", address, offset.GetAddr());
|
||||
cellGcmSys->Log("cellGcmAddressToOffset(address=0x%x,offset_addr=0x%x)", address, offset.addr());
|
||||
|
||||
// Address not on main memory or local memory
|
||||
if (address >= 0xD0000000) {
|
||||
|
@ -830,7 +830,7 @@ s32 cellGcmAddressToOffset(u64 address, mem32_t offset)
|
|||
}
|
||||
}
|
||||
|
||||
offset = result;
|
||||
*offset = result;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -915,9 +915,9 @@ s32 cellGcmMapLocalMemory(u64 address, u64 size)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellGcmMapMainMemory(u32 ea, u32 size, mem32_t offset)
|
||||
s32 cellGcmMapMainMemory(u32 ea, u32 size, vm::ptr<be_t<u32>> offset)
|
||||
{
|
||||
cellGcmSys->Warning("cellGcmMapMainMemory(ea=0x%x,size=0x%x,offset_addr=0x%x)", ea, size, offset.GetAddr());
|
||||
cellGcmSys->Warning("cellGcmMapMainMemory(ea=0x%x,size=0x%x,offset_addr=0x%x)", ea, size, offset.addr());
|
||||
|
||||
u32 io;
|
||||
|
||||
|
@ -936,7 +936,7 @@ s32 cellGcmMapMainMemory(u32 ea, u32 size, mem32_t offset)
|
|||
Memory.Write16(offsetTable.eaAddress + ((io >> 20) + i) * sizeof(u16), (u16)(ea >> 20) + i);
|
||||
}
|
||||
|
||||
offset = io;
|
||||
*offset = io;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -24,13 +24,13 @@ u32 gcmGetLocalMemorySize();
|
|||
// SysCalls
|
||||
s32 cellGcmSetPrepareFlip(mem_ptr_t<CellGcmContextData> ctxt, u32 id);
|
||||
|
||||
s32 cellGcmAddressToOffset(u64 address, mem32_t offset);
|
||||
s32 cellGcmAddressToOffset(u64 address, vm::ptr<be_t<u32>> offset);
|
||||
u32 cellGcmGetMaxIoMapSize();
|
||||
void cellGcmGetOffsetTable(mem_ptr_t<CellGcmOffsetTable> table);
|
||||
s32 cellGcmIoOffsetToAddress(u32 ioOffset, u64 address);
|
||||
s32 cellGcmMapEaIoAddress(u32 ea, u32 io, u32 size);
|
||||
s32 cellGcmMapEaIoAddressWithFlags(u32 ea, u32 io, u32 size, u32 flags);
|
||||
s32 cellGcmMapMainMemory(u32 ea, u32 size, mem32_t offset);
|
||||
s32 cellGcmMapMainMemory(u32 ea, u32 size, vm::ptr<be_t<u32>> offset);
|
||||
s32 cellGcmReserveIoMapSize(u32 size);
|
||||
s32 cellGcmUnmapEaIoAddress(u64 ea);
|
||||
s32 cellGcmUnmapIoAddress(u64 io);
|
||||
|
|
|
@ -23,10 +23,10 @@ int cellGifDecExtCreate(u32 mainHandle, u32 threadInParam, u32 threadOutParam, u
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellGifDecOpen(u32 mainHandle, mem32_t subHandle, const mem_ptr_t<CellGifDecSrc> src, mem_ptr_t<CellGifDecOpnInfo> openInfo)
|
||||
int cellGifDecOpen(u32 mainHandle, vm::ptr<be_t<u32>> subHandle, const mem_ptr_t<CellGifDecSrc> src, mem_ptr_t<CellGifDecOpnInfo> openInfo)
|
||||
{
|
||||
cellGifDec->Warning("cellGifDecOpen(mainHandle=0x%x, subHandle_addr=0x%x, src_addr=0x%x, openInfo_addr=0x%x)",
|
||||
mainHandle, subHandle.GetAddr(), src.GetAddr(), openInfo.GetAddr());
|
||||
mainHandle, subHandle.addr(), src.GetAddr(), openInfo.GetAddr());
|
||||
|
||||
CellGifDecSubHandle *current_subHandle = new CellGifDecSubHandle;
|
||||
current_subHandle->fd = 0;
|
||||
|
@ -41,7 +41,7 @@ int cellGifDecOpen(u32 mainHandle, mem32_t subHandle, const mem_ptr_t<CellGifDec
|
|||
case se32(CELL_GIFDEC_FILE):
|
||||
// Get file descriptor
|
||||
vm::var<be_t<u32>> fd;
|
||||
int ret = cellFsOpen(src->fileName, 0, fd.addr(), 0, 0);
|
||||
int ret = cellFsOpen(src->fileName, 0, fd, vm::ptr<be_t<u32>>::make(0), 0);
|
||||
current_subHandle->fd = fd->ToLE();
|
||||
if (ret != CELL_OK) return CELL_GIFDEC_ERROR_OPEN_FILE;
|
||||
|
||||
|
@ -54,7 +54,7 @@ int cellGifDecOpen(u32 mainHandle, mem32_t subHandle, const mem_ptr_t<CellGifDec
|
|||
}
|
||||
|
||||
// From now, every u32 subHandle argument is a pointer to a CellGifDecSubHandle struct.
|
||||
subHandle = cellGifDec->GetNewId(current_subHandle);
|
||||
*subHandle = cellGifDec->GetNewId(current_subHandle);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -28,10 +28,10 @@ int cellJpgDecDestroy(u32 mainHandle)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellJpgDecOpen(u32 mainHandle, mem32_t subHandle, mem_ptr_t<CellJpgDecSrc> src, mem_ptr_t<CellJpgDecOpnInfo> openInfo)
|
||||
int cellJpgDecOpen(u32 mainHandle, vm::ptr<be_t<u32>> subHandle, mem_ptr_t<CellJpgDecSrc> src, mem_ptr_t<CellJpgDecOpnInfo> openInfo)
|
||||
{
|
||||
cellJpgDec->Warning("cellJpgDecOpen(mainHandle=0x%x, subHandle_addr=0x%x, src_addr=0x%x, openInfo_addr=0x%x)",
|
||||
mainHandle, subHandle.GetAddr(), src.GetAddr(), openInfo.GetAddr());
|
||||
mainHandle, subHandle.addr(), src.GetAddr(), openInfo.GetAddr());
|
||||
|
||||
CellJpgDecSubHandle *current_subHandle = new CellJpgDecSubHandle;
|
||||
|
||||
|
@ -47,7 +47,7 @@ int cellJpgDecOpen(u32 mainHandle, mem32_t subHandle, mem_ptr_t<CellJpgDecSrc> s
|
|||
case se32(CELL_JPGDEC_FILE):
|
||||
// Get file descriptor
|
||||
vm::var<be_t<u32>> fd;
|
||||
int ret = cellFsOpen(src->fileName, 0, fd.addr(), 0, 0);
|
||||
int ret = cellFsOpen(src->fileName, 0, fd, vm::ptr<be_t<u32>>::make(0), 0);
|
||||
current_subHandle->fd = fd->ToLE();
|
||||
if (ret != CELL_OK) return CELL_JPGDEC_ERROR_OPEN_FILE;
|
||||
|
||||
|
@ -60,7 +60,7 @@ int cellJpgDecOpen(u32 mainHandle, mem32_t subHandle, mem_ptr_t<CellJpgDecSrc> s
|
|||
}
|
||||
|
||||
// From now, every u32 subHandle argument is a pointer to a CellJpgDecSubHandle struct.
|
||||
subHandle = cellJpgDec->GetNewId(current_subHandle);
|
||||
*subHandle = cellJpgDec->GetNewId(current_subHandle);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -283,10 +283,10 @@ int _L10nConvertStr(int src_code, const void* src, size_t * src_len, int dst_cod
|
|||
#endif
|
||||
|
||||
//TODO: Check the code in emulation. If support for UTF8/UTF16/UTF32/UCS2/UCS4 should use wider chars.. awful.
|
||||
int L10nConvertStr(int src_code, vm::ptr<const void> src, mem32_t src_len, int dst_code, vm::ptr<void> dst, mem32_t dst_len)
|
||||
int L10nConvertStr(int src_code, vm::ptr<const void> src, vm::ptr<be_t<u32>> src_len, int dst_code, vm::ptr<void> dst, vm::ptr<be_t<u32>> dst_len)
|
||||
{
|
||||
cellL10n->Todo("L10nConvertStr(src_code=%d,src=0x%x,src_len=%ld,dst_code=%d,dst=0x%x,dst_len=%ld)",
|
||||
src_code, src.addr(), src_len.GetValue(), dst_code, dst.addr(), dst_len.GetValue());
|
||||
src_code, src.addr(), src_len.addr(), dst_code, dst.addr(), dst_len.addr());
|
||||
cellL10n->Todo("L10nConvertStr: 1st char at dst: %x(Hex)", *((char*)src.get_ptr()));
|
||||
#ifdef _MSC_VER
|
||||
unsigned int srcCode = 0, dstCode = 0; //OEM code pages
|
||||
|
@ -300,10 +300,10 @@ int L10nConvertStr(int src_code, vm::ptr<const void> src, mem32_t src_len, int d
|
|||
//if (strnlen_s((char*)src, *src_len) != *src_len) return SRCIllegal;
|
||||
std::string wrapped_source = (char*)src.get_ptr();
|
||||
//std::string wrapped_source((char*)src);
|
||||
if (wrapped_source.length() != src_len.GetValue()) return SRCIllegal;
|
||||
if (wrapped_source.length() != *src_len) return SRCIllegal;
|
||||
std::string target = _OemToOem(srcCode, dstCode, wrapped_source);
|
||||
|
||||
if (target.length() > dst_len.GetValue()) return DSTExhausted;
|
||||
if (target.length() > *dst_len) return DSTExhausted;
|
||||
|
||||
Memory.WriteString(dst.addr(), target);
|
||||
|
||||
|
@ -318,9 +318,9 @@ int L10nConvertStr(int src_code, vm::ptr<const void> src, mem32_t src_len, int d
|
|||
char *dstBuf = (char*)dst.get_ptr();
|
||||
//char *srcBuf = (char*)src, *dstBuf = (char*)dst;
|
||||
//size_t srcLen = *src_len, dstLen = *dst_len;
|
||||
size_t srcLen = src_len.GetValue(), dstLen = dst_len.GetValue();
|
||||
size_t srcLen = *src_len, dstLen = *dst_len;
|
||||
size_t ictd = iconv(ict, &srcBuf, &srcLen, &dstBuf, &dstLen);
|
||||
if (ictd != src_len.GetValue())//if (ictd != *src_len)
|
||||
if (ictd != *src_len)//if (ictd != *src_len)
|
||||
{
|
||||
if (errno == EILSEQ)
|
||||
retValue = SRCIllegal; //Invalid multi-byte sequence
|
||||
|
|
|
@ -20,18 +20,18 @@ int cellNetCtlTerm()
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellNetCtlGetState(mem32_t state)
|
||||
int cellNetCtlGetState(vm::ptr<be_t<u32>> state)
|
||||
{
|
||||
cellNetCtl->Log("cellNetCtlGetState(state_addr=0x%x)", state.GetAddr());
|
||||
cellNetCtl->Log("cellNetCtlGetState(state_addr=0x%x)", state.addr());
|
||||
|
||||
state = CELL_NET_CTL_STATE_Disconnected; // TODO: Allow other states
|
||||
*state = CELL_NET_CTL_STATE_Disconnected; // TODO: Allow other states
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellNetCtlAddHandler(mem_func_ptr_t<cellNetCtlHandler> handler, mem32_t arg, s32 hid)
|
||||
int cellNetCtlAddHandler(mem_func_ptr_t<cellNetCtlHandler> handler, vm::ptr<be_t<u32>> arg, s32 hid)
|
||||
{
|
||||
cellNetCtl->Todo("cellNetCtlAddHandler(handler_addr=0x%x, arg_addr=0x%x, hid=%x)", handler.GetAddr(), arg.GetAddr(), hid);
|
||||
cellNetCtl->Todo("cellNetCtlAddHandler(handler_addr=0x%x, arg_addr=0x%x, hid=%x)", handler.GetAddr(), arg.addr(), hid);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -257,4 +257,4 @@ struct CellNetCtlNatInfo
|
|||
be_t<u32> mapped_addr;
|
||||
};
|
||||
|
||||
typedef void(*cellNetCtlHandler)(s32 prev_state, s32 new_state, s32 event, s32 error_code, mem32_t arg);
|
||||
typedef void(*cellNetCtlHandler)(s32 prev_state, s32 new_state, s32 event, s32 error_code, vm::ptr<be_t<u32>> arg);
|
|
@ -51,10 +51,10 @@ int cellPngDecDestroy(u32 mainHandle)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellPngDecOpen(u32 mainHandle, mem32_t subHandle, mem_ptr_t<CellPngDecSrc> src, u32 openInfo)
|
||||
int cellPngDecOpen(u32 mainHandle, vm::ptr<be_t<u32>> subHandle, mem_ptr_t<CellPngDecSrc> src, u32 openInfo)
|
||||
{
|
||||
cellPngDec->Warning("cellPngDecOpen(mainHandle=0x%x, subHandle=0x%x, src_addr=0x%x, openInfo=0x%x)",
|
||||
mainHandle, subHandle.GetAddr(), src.GetAddr(), openInfo);
|
||||
mainHandle, subHandle.addr(), src.GetAddr(), openInfo);
|
||||
|
||||
CellPngDecSubHandle *current_subHandle = new CellPngDecSubHandle;
|
||||
current_subHandle->fd = 0;
|
||||
|
@ -69,7 +69,7 @@ int cellPngDecOpen(u32 mainHandle, mem32_t subHandle, mem_ptr_t<CellPngDecSrc> s
|
|||
case se32(CELL_PNGDEC_FILE):
|
||||
// Get file descriptor
|
||||
vm::var<be_t<u32>> fd;
|
||||
int ret = cellFsOpen(src->fileName_addr, 0, fd.addr(), 0, 0);
|
||||
int ret = cellFsOpen(src->fileName_addr, 0, fd, vm::ptr<be_t<u32>>::make(0), 0);
|
||||
current_subHandle->fd = fd->ToLE();
|
||||
if(ret != CELL_OK) return CELL_PNGDEC_ERROR_OPEN_FILE;
|
||||
|
||||
|
@ -82,15 +82,15 @@ int cellPngDecOpen(u32 mainHandle, mem32_t subHandle, mem_ptr_t<CellPngDecSrc> s
|
|||
}
|
||||
|
||||
// From now, every u32 subHandle argument is a pointer to a CellPngDecSubHandle struct.
|
||||
subHandle = cellPngDec->GetNewId(current_subHandle);
|
||||
*subHandle = cellPngDec->GetNewId(current_subHandle);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellPngDecExtOpen(u32 mainHandle, mem32_t subHandle, mem_ptr_t<CellPngDecSrc> src, u32 openInfo, mem_ptr_t<CellPngDecCbCtrlStrm> cbCtrlStrm, mem_ptr_t<CellPngDecOpnParam> opnParam)
|
||||
int cellPngDecExtOpen(u32 mainHandle, vm::ptr<be_t<u32>> subHandle, mem_ptr_t<CellPngDecSrc> src, u32 openInfo, mem_ptr_t<CellPngDecCbCtrlStrm> cbCtrlStrm, mem_ptr_t<CellPngDecOpnParam> opnParam)
|
||||
{
|
||||
cellPngDec->Warning("cellPngDecExtOpen(mainHandle=0x%x, subHandle=0x%x, src_addr=0x%x, openInfo=0x%x, cbCtrlStrm_addr=0x%x, opnParam=0x%x)",
|
||||
mainHandle, subHandle.GetAddr(), src.GetAddr(), openInfo, cbCtrlStrm.GetAddr(), opnParam.GetAddr());
|
||||
mainHandle, subHandle.addr(), src.GetAddr(), openInfo, cbCtrlStrm.GetAddr(), opnParam.GetAddr());
|
||||
|
||||
cellPngDec->Warning("*** cbCtrlStrm->cbCtrlStrmFunc_addr=0x%x", cbCtrlStrm->cbCtrlStrmFunc.GetAddr());
|
||||
|
||||
|
|
|
@ -582,23 +582,23 @@ void cellRescExit()
|
|||
s_rescInternalInstance->m_bInitialized = false;
|
||||
}
|
||||
|
||||
int cellRescVideoOutResolutionId2RescBufferMode(u32 resolutionId, mem32_t bufferMode)
|
||||
int cellRescVideoOutResolutionId2RescBufferMode(u32 resolutionId, vm::ptr<be_t<u32>> bufferMode)
|
||||
{
|
||||
cellResc->Log("cellRescVideoOutResolutionId2RescBufferMode(resolutionId=%d, bufferMode_addr=0x%x)", resolutionId, bufferMode.GetAddr());
|
||||
cellResc->Log("cellRescVideoOutResolutionId2RescBufferMode(resolutionId=%d, bufferMode_addr=0x%x)", resolutionId, bufferMode.addr());
|
||||
|
||||
switch (resolutionId)
|
||||
{
|
||||
case CELL_VIDEO_OUT_RESOLUTION_1080:
|
||||
bufferMode = CELL_RESC_1920x1080;
|
||||
*bufferMode = CELL_RESC_1920x1080;
|
||||
break;
|
||||
case CELL_VIDEO_OUT_RESOLUTION_720:
|
||||
bufferMode = CELL_RESC_1280x720;
|
||||
*bufferMode = CELL_RESC_1280x720;
|
||||
break;
|
||||
case CELL_VIDEO_OUT_RESOLUTION_480:
|
||||
bufferMode = CELL_RESC_720x480;
|
||||
*bufferMode = CELL_RESC_720x480;
|
||||
break;
|
||||
case CELL_VIDEO_OUT_RESOLUTION_576:
|
||||
bufferMode = CELL_RESC_720x576;
|
||||
*bufferMode = CELL_RESC_720x576;
|
||||
break;
|
||||
default:
|
||||
cellResc->Error("cellRescVideoOutResolutionId2RescBufferMod : CELL_RESC_ERROR_BAD_ARGUMENT");
|
||||
|
@ -820,9 +820,10 @@ int cellRescSetPalInterpolateDropFlexRatio(float ratio)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellRescGetBufferSize(mem32_t colorBuffers, mem32_t vertexArray, mem32_t fragmentShader)
|
||||
int cellRescGetBufferSize(vm::ptr<be_t<u32>> colorBuffers, vm::ptr<be_t<u32>> vertexArray, vm::ptr<be_t<u32>> fragmentShader)
|
||||
{
|
||||
cellResc->Warning("cellRescGetBufferSize(colorBuffers_addr=0x%x, vertexArray_addr=0x%x, fragmentShader_addr=0x%x)", colorBuffers.GetAddr(), vertexArray.GetAddr(), fragmentShader.GetAddr());
|
||||
cellResc->Warning("cellRescGetBufferSize(colorBuffers_addr=0x%x, vertexArray_addr=0x%x, fragmentShader_addr=0x%x)",
|
||||
colorBuffers.addr(), vertexArray.addr(), fragmentShader.addr());
|
||||
|
||||
if (!s_rescInternalInstance->m_bInitialized)
|
||||
{
|
||||
|
@ -845,19 +846,19 @@ int cellRescGetBufferSize(mem32_t colorBuffers, mem32_t vertexArray, mem32_t fra
|
|||
fragmentUcodeSize = 0x300;
|
||||
}
|
||||
|
||||
if (colorBuffers.GetAddr())
|
||||
if (colorBuffers)
|
||||
{
|
||||
colorBuffers = colorBuffersSize;
|
||||
*colorBuffers = colorBuffersSize;
|
||||
}
|
||||
|
||||
if (vertexArray.GetAddr())
|
||||
if (vertexArray)
|
||||
{
|
||||
vertexArray = vertexArraySize;
|
||||
*vertexArray = vertexArraySize;
|
||||
}
|
||||
|
||||
if (fragmentShader.GetAddr())
|
||||
if (fragmentShader)
|
||||
{
|
||||
fragmentShader = fragmentUcodeSize;
|
||||
*fragmentShader = fragmentUcodeSize;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
|
@ -996,9 +997,9 @@ int cellRescSetWaitFlip()
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellRescSetBufferAddress(mem32_t colorBuffers, mem32_t vertexArray, mem32_t fragmentShader)
|
||||
int cellRescSetBufferAddress(vm::ptr<be_t<u32>> colorBuffers, vm::ptr<be_t<u32>> vertexArray, vm::ptr<be_t<u32>> fragmentShader)
|
||||
{
|
||||
cellResc->Warning("cellRescSetBufferAddress(colorBuffers_addr=0x%x, vertexArray_addr=0x%x, fragmentShader_addr=0x%x)", colorBuffers.GetAddr(), vertexArray.GetAddr(), fragmentShader.GetAddr());
|
||||
cellResc->Warning("cellRescSetBufferAddress(colorBuffers_addr=0x%x, vertexArray_addr=0x%x, fragmentShader_addr=0x%x)", colorBuffers.addr(), vertexArray.addr(), fragmentShader.addr());
|
||||
|
||||
if(!s_rescInternalInstance->m_bInitialized)
|
||||
{
|
||||
|
@ -1006,18 +1007,18 @@ int cellRescSetBufferAddress(mem32_t colorBuffers, mem32_t vertexArray, mem32_t
|
|||
return CELL_RESC_ERROR_NOT_INITIALIZED;
|
||||
}
|
||||
|
||||
if(colorBuffers.GetAddr() % COLOR_BUFFER_ALIGNMENT || vertexArray.GetAddr() % VERTEX_BUFFER_ALIGNMENT || fragmentShader.GetAddr() % FRAGMENT_SHADER_ALIGNMENT)
|
||||
if(colorBuffers.addr() % COLOR_BUFFER_ALIGNMENT || vertexArray.addr() % VERTEX_BUFFER_ALIGNMENT || fragmentShader.addr() % FRAGMENT_SHADER_ALIGNMENT)
|
||||
{
|
||||
cellResc->Error("cellRescSetBufferAddress : CELL_RESC_ERROR_BAD_ALIGNMENT");
|
||||
return CELL_RESC_ERROR_BAD_ALIGNMENT;
|
||||
}
|
||||
|
||||
s_rescInternalInstance->m_colorBuffersEA = colorBuffers.GetAddr();
|
||||
s_rescInternalInstance->m_vertexArrayEA = vertexArray.GetAddr();
|
||||
s_rescInternalInstance->m_fragmentUcodeEA = fragmentShader.GetAddr();
|
||||
s_rescInternalInstance->m_colorBuffersEA = colorBuffers.addr();
|
||||
s_rescInternalInstance->m_vertexArrayEA = vertexArray.addr();
|
||||
s_rescInternalInstance->m_fragmentUcodeEA = fragmentShader.addr();
|
||||
|
||||
vm::var<be_t<u32>> dstOffset;
|
||||
cellGcmAddressToOffset(s_rescInternalInstance->m_colorBuffersEA, dstOffset.addr());
|
||||
cellGcmAddressToOffset(s_rescInternalInstance->m_colorBuffersEA, dstOffset);
|
||||
|
||||
for (int i=0; i<GetNumColorBuffers(); i++)
|
||||
{
|
||||
|
|
|
@ -153,7 +153,7 @@ CCellRescInternal* s_rescInternalInstance = nullptr;
|
|||
extern int cellGcmSetFlipMode(u32 mode);
|
||||
extern void cellGcmSetFlipHandler(u32 handler_addr);
|
||||
extern void cellGcmSetVBlankHandler(u32 handler_addr);
|
||||
extern int cellGcmAddressToOffset(u64 address, mem32_t offset);
|
||||
extern int cellGcmAddressToOffset(u64 address, vm::ptr<be_t<u32>> offset);
|
||||
extern int cellGcmSetDisplayBuffer(u32 id, u32 offset, u32 pitch, u32 width, u32 height);
|
||||
extern int cellGcmSetPrepareFlip(mem_ptr_t<CellGcmContextData> ctx, u32 id);
|
||||
extern int cellGcmSetSecondVFrequency(u32 freq);
|
||||
|
|
|
@ -314,13 +314,13 @@ int cellRtcConvertLocalTimeToUtc(mem_ptr_t<CellRtcTick> pLocalTime, mem_ptr_t<Ce
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellRtcGetDosTime(mem_ptr_t<CellRtcDateTime> pDateTime, mem32_t puiDosTime)
|
||||
int cellRtcGetDosTime(mem_ptr_t<CellRtcDateTime> pDateTime, vm::ptr<be_t<u32>> puiDosTime)
|
||||
{
|
||||
cellRtc->Log("cellRtcGetDosTime(pDateTime=0x%x, puiDosTime=0x%x)", pDateTime.GetAddr(), puiDosTime.GetAddr());
|
||||
cellRtc->Log("cellRtcGetDosTime(pDateTime=0x%x, puiDosTime=0x%x)", pDateTime.GetAddr(), puiDosTime.addr());
|
||||
|
||||
// Convert to DOS time.
|
||||
rDateTime date_time = rDateTime(pDateTime->day, (rDateTime::Month)pDateTime->month.ToLE(), pDateTime->year, pDateTime->hour, pDateTime->minute, pDateTime->second, (pDateTime->microsecond / 1000));
|
||||
puiDosTime = date_time.GetAsDOS();
|
||||
*puiDosTime = date_time.GetAsDOS();
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -157,10 +157,10 @@ s64 cellSpursAttributeEnableSystemWorkload(mem_ptr_t<CellSpursAttribute> attr, v
|
|||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursGetSpuThreadGroupId(mem_ptr_t<CellSpurs> spurs, mem32_t group)
|
||||
s64 cellSpursGetSpuThreadGroupId(mem_ptr_t<CellSpurs> spurs, vm::ptr<be_t<u32>> group)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpurs->Warning("cellSpursGetSpuThreadGroupId(spurs_addr=0x%x, group_addr=0x%x)", spurs.GetAddr(), group.GetAddr());
|
||||
cellSpurs->Warning("cellSpursGetSpuThreadGroupId(spurs_addr=0x%x, group_addr=0x%x)", spurs.GetAddr(), group.addr());
|
||||
return GetCurrentPPUThread().FastCall2(libsre + 0x8B30, libsre_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpurs);
|
||||
|
@ -168,10 +168,10 @@ s64 cellSpursGetSpuThreadGroupId(mem_ptr_t<CellSpurs> spurs, mem32_t group)
|
|||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursGetNumSpuThread(mem_ptr_t<CellSpurs> spurs, mem32_t nThreads)
|
||||
s64 cellSpursGetNumSpuThread(mem_ptr_t<CellSpurs> spurs, vm::ptr<be_t<u32>> nThreads)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpurs->Warning("cellSpursGetNumSpuThread(spurs_addr=0x%x, nThreads_addr=0x%x)", spurs.GetAddr(), nThreads.GetAddr());
|
||||
cellSpurs->Warning("cellSpursGetNumSpuThread(spurs_addr=0x%x, nThreads_addr=0x%x)", spurs.GetAddr(), nThreads.addr());
|
||||
return GetCurrentPPUThread().FastCall2(libsre + 0x8B78, libsre_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpurs);
|
||||
|
@ -179,10 +179,10 @@ s64 cellSpursGetNumSpuThread(mem_ptr_t<CellSpurs> spurs, mem32_t nThreads)
|
|||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursGetSpuThreadId(mem_ptr_t<CellSpurs> spurs, mem32_t thread, mem32_t nThreads)
|
||||
s64 cellSpursGetSpuThreadId(mem_ptr_t<CellSpurs> spurs, vm::ptr<be_t<u32>> thread, vm::ptr<be_t<u32>> nThreads)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpurs->Warning("cellSpursGetSpuThreadId(spurs_addr=0x%x, thread_addr=0x%x, nThreads_addr=0x%x)", spurs.GetAddr(), thread.GetAddr(), nThreads.GetAddr());
|
||||
cellSpurs->Warning("cellSpursGetSpuThreadId(spurs_addr=0x%x, thread_addr=0x%x, nThreads_addr=0x%x)", spurs.GetAddr(), thread.addr(), nThreads.addr());
|
||||
return GetCurrentPPUThread().FastCall2(libsre + 0x8A98, libsre_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpurs);
|
||||
|
@ -369,10 +369,10 @@ s64 cellSpursEventFlagTryWait(mem_ptr_t<CellSpursEventFlag> eventFlag, vm::ptr<b
|
|||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursEventFlagGetDirection(mem_ptr_t<CellSpursEventFlag> eventFlag, mem32_t direction)
|
||||
s64 cellSpursEventFlagGetDirection(mem_ptr_t<CellSpursEventFlag> eventFlag, vm::ptr<be_t<u32>> direction)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpurs->Warning("cellSpursEventFlagGetDirection(eventFlag_addr=0x%x, direction_addr=0x%x)", eventFlag.GetAddr(), direction.GetAddr());
|
||||
cellSpurs->Warning("cellSpursEventFlagGetDirection(eventFlag_addr=0x%x, direction_addr=0x%x)", eventFlag.GetAddr(), direction.addr());
|
||||
return GetCurrentPPUThread().FastCall2(libsre + 0x162C4, libsre_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpurs);
|
||||
|
@ -380,10 +380,10 @@ s64 cellSpursEventFlagGetDirection(mem_ptr_t<CellSpursEventFlag> eventFlag, mem3
|
|||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursEventFlagGetClearMode(mem_ptr_t<CellSpursEventFlag> eventFlag, mem32_t clear_mode)
|
||||
s64 cellSpursEventFlagGetClearMode(mem_ptr_t<CellSpursEventFlag> eventFlag, vm::ptr<be_t<u32>> clear_mode)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpurs->Warning("cellSpursEventFlagGetClearMode(eventFlag_addr=0x%x, clear_mode_addr=0x%x)", eventFlag.GetAddr(), clear_mode.GetAddr());
|
||||
cellSpurs->Warning("cellSpursEventFlagGetClearMode(eventFlag_addr=0x%x, clear_mode_addr=0x%x)", eventFlag.GetAddr(), clear_mode.addr());
|
||||
return GetCurrentPPUThread().FastCall2(libsre + 0x16310, libsre_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpurs);
|
||||
|
@ -736,10 +736,10 @@ s64 cellSpursJoinTaskset(mem_ptr_t<CellSpursTaskset> taskset)
|
|||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursGetTasksetId(mem_ptr_t<CellSpursTaskset> taskset, mem32_t workloadId)
|
||||
s64 cellSpursGetTasksetId(mem_ptr_t<CellSpursTaskset> taskset, vm::ptr<be_t<u32>> workloadId)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpurs->Warning("cellSpursGetTasksetId(taskset_addr=0x%x, workloadId_addr=0x%x)", taskset.GetAddr(), workloadId.GetAddr());
|
||||
cellSpurs->Warning("cellSpursGetTasksetId(taskset_addr=0x%x, workloadId_addr=0x%x)", taskset.GetAddr(), workloadId.addr());
|
||||
return GetCurrentPPUThread().FastCall2(libsre + 0x14EA0, libsre_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpurs);
|
||||
|
@ -758,12 +758,12 @@ s64 cellSpursShutdownTaskset(mem_ptr_t<CellSpursTaskset> taskset)
|
|||
#endif
|
||||
}
|
||||
|
||||
s64 cellSpursCreateTask(mem_ptr_t<CellSpursTaskset> taskset, mem32_t taskID, u32 elf_addr, u32 context_addr, u32 context_size, mem_ptr_t<CellSpursTaskLsPattern> lsPattern,
|
||||
s64 cellSpursCreateTask(mem_ptr_t<CellSpursTaskset> taskset, vm::ptr<be_t<u32>> taskID, u32 elf_addr, u32 context_addr, u32 context_size, mem_ptr_t<CellSpursTaskLsPattern> lsPattern,
|
||||
mem_ptr_t<CellSpursTaskArgument> argument)
|
||||
{
|
||||
#ifdef PRX_DEBUG
|
||||
cellSpurs->Warning("cellSpursCreateTask(taskset_addr=0x%x, taskID_addr=0x%x, elf_addr_addr=0x%x, context_addr_addr=0x%x, context_size=%d, lsPattern_addr=0x%x, argument_addr=0x%x)",
|
||||
taskset.GetAddr(), taskID.GetAddr(), elf_addr, context_addr, context_size, lsPattern.GetAddr(), argument.GetAddr());
|
||||
taskset.GetAddr(), taskID.addr(), elf_addr, context_addr, context_size, lsPattern.GetAddr(), argument.GetAddr());
|
||||
return GetCurrentPPUThread().FastCall2(libsre + 0x12414, libsre_rtoc);
|
||||
#else
|
||||
UNIMPLEMENTED_FUNC(cellSpurs);
|
||||
|
|
|
@ -1293,14 +1293,14 @@ s32 syncLFQueueGetPushPointer(vm::ptr<CellSyncLFQueue> queue, s32& pointer, u32
|
|||
assert(0);
|
||||
}
|
||||
|
||||
s32 _cellSyncLFQueueGetPushPointer(vm::ptr<CellSyncLFQueue> queue, mem32_t pointer, u32 isBlocking, u32 useEventQueue)
|
||||
s32 _cellSyncLFQueueGetPushPointer(vm::ptr<CellSyncLFQueue> queue, vm::ptr<be_t<u32>> pointer, u32 isBlocking, u32 useEventQueue)
|
||||
{
|
||||
cellSync->Todo("_cellSyncLFQueueGetPushPointer(queue_addr=0x%x, pointer_addr=0x%x, isBlocking=%d, useEventQueue=%d)",
|
||||
queue.addr(), pointer.GetAddr(), isBlocking, useEventQueue);
|
||||
queue.addr(), pointer.addr(), isBlocking, useEventQueue);
|
||||
|
||||
s32 pointer_value;
|
||||
s32 result = syncLFQueueGetPushPointer(queue, pointer_value, isBlocking, useEventQueue);
|
||||
pointer = pointer_value;
|
||||
*pointer = pointer_value;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1312,15 +1312,15 @@ s32 syncLFQueueGetPushPointer2(vm::ptr<CellSyncLFQueue> queue, s32& pointer, u32
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _cellSyncLFQueueGetPushPointer2(vm::ptr<CellSyncLFQueue> queue, mem32_t pointer, u32 isBlocking, u32 useEventQueue)
|
||||
s32 _cellSyncLFQueueGetPushPointer2(vm::ptr<CellSyncLFQueue> queue, vm::ptr<be_t<u32>> pointer, u32 isBlocking, u32 useEventQueue)
|
||||
{
|
||||
// arguments copied from _cellSyncLFQueueGetPushPointer
|
||||
cellSync->Todo("_cellSyncLFQueueGetPushPointer2(queue_addr=0x%x, pointer_addr=0x%x, isBlocking=%d, useEventQueue=%d)",
|
||||
queue.addr(), pointer.GetAddr(), isBlocking, useEventQueue);
|
||||
queue.addr(), pointer.addr(), isBlocking, useEventQueue);
|
||||
|
||||
s32 pointer_value;
|
||||
s32 result = syncLFQueueGetPushPointer2(queue, pointer_value, isBlocking, useEventQueue);
|
||||
pointer = pointer_value;
|
||||
*pointer = pointer_value;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1687,14 +1687,14 @@ s32 syncLFQueueGetPopPointer(vm::ptr<CellSyncLFQueue> queue, s32& pointer, u32 i
|
|||
assert(0);
|
||||
}
|
||||
|
||||
s32 _cellSyncLFQueueGetPopPointer(vm::ptr<CellSyncLFQueue> queue, mem32_t pointer, u32 isBlocking, u32 arg4, u32 useEventQueue)
|
||||
s32 _cellSyncLFQueueGetPopPointer(vm::ptr<CellSyncLFQueue> queue, vm::ptr<be_t<u32>> pointer, u32 isBlocking, u32 arg4, u32 useEventQueue)
|
||||
{
|
||||
cellSync->Todo("_cellSyncLFQueueGetPopPointer(queue_addr=0x%x, pointer_addr=0x%x, isBlocking=%d, arg4=%d, useEventQueue=%d)",
|
||||
queue.addr(), pointer.GetAddr(), isBlocking, arg4, useEventQueue);
|
||||
queue.addr(), pointer.addr(), isBlocking, arg4, useEventQueue);
|
||||
|
||||
s32 pointer_value;
|
||||
s32 result = syncLFQueueGetPopPointer(queue, pointer_value, isBlocking, arg4, useEventQueue);
|
||||
pointer = pointer_value;
|
||||
*pointer = pointer_value;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1706,15 +1706,15 @@ s32 syncLFQueueGetPopPointer2(vm::ptr<CellSyncLFQueue> queue, s32& pointer, u32
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _cellSyncLFQueueGetPopPointer2(vm::ptr<CellSyncLFQueue> queue, mem32_t pointer, u32 isBlocking, u32 useEventQueue)
|
||||
s32 _cellSyncLFQueueGetPopPointer2(vm::ptr<CellSyncLFQueue> queue, vm::ptr<be_t<u32>> pointer, u32 isBlocking, u32 useEventQueue)
|
||||
{
|
||||
// arguments copied from _cellSyncLFQueueGetPopPointer
|
||||
cellSync->Todo("_cellSyncLFQueueGetPopPointer2(queue_addr=0x%x, pointer_addr=0x%x, isBlocking=%d, useEventQueue=%d)",
|
||||
queue.addr(), pointer.GetAddr(), isBlocking, useEventQueue);
|
||||
queue.addr(), pointer.addr(), isBlocking, useEventQueue);
|
||||
|
||||
s32 pointer_value;
|
||||
s32 result = syncLFQueueGetPopPointer2(queue, pointer_value, isBlocking, useEventQueue);
|
||||
pointer = pointer_value;
|
||||
*pointer = pointer_value;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -2020,11 +2020,11 @@ s32 cellSyncLFQueueClear(vm::ptr<CellSyncLFQueue> queue)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellSyncLFQueueSize(vm::ptr<CellSyncLFQueue> queue, mem32_t size)
|
||||
s32 cellSyncLFQueueSize(vm::ptr<CellSyncLFQueue> queue, vm::ptr<be_t<u32>> size)
|
||||
{
|
||||
cellSync->Warning("cellSyncLFQueueSize(queue_addr=0x%x, size_addr=0x%x)", queue.addr(), size.GetAddr());
|
||||
cellSync->Warning("cellSyncLFQueueSize(queue_addr=0x%x, size_addr=0x%x)", queue.addr(), size.addr());
|
||||
|
||||
if (!queue || !size.GetAddr())
|
||||
if (!queue || !size)
|
||||
{
|
||||
return CELL_SYNC_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
@ -2045,11 +2045,11 @@ s32 cellSyncLFQueueSize(vm::ptr<CellSyncLFQueue> queue, mem32_t size)
|
|||
{
|
||||
if (var1 <= var2)
|
||||
{
|
||||
size = var2 - var1;
|
||||
*size = var2 - var1;
|
||||
}
|
||||
else
|
||||
{
|
||||
size = var2 - var1 + (u32)queue->m_depth * 2;
|
||||
*size = var2 - var1 + (u32)queue->m_depth * 2;
|
||||
}
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -2058,11 +2058,11 @@ s32 cellSyncLFQueueSize(vm::ptr<CellSyncLFQueue> queue, mem32_t size)
|
|||
assert(0);
|
||||
}
|
||||
|
||||
s32 cellSyncLFQueueDepth(vm::ptr<CellSyncLFQueue> queue, mem32_t depth)
|
||||
s32 cellSyncLFQueueDepth(vm::ptr<CellSyncLFQueue> queue, vm::ptr<be_t<u32>> depth)
|
||||
{
|
||||
cellSync->Log("cellSyncLFQueueDepth(queue_addr=0x%x, depth_addr=0x%x)", queue.addr(), depth.GetAddr());
|
||||
cellSync->Log("cellSyncLFQueueDepth(queue_addr=0x%x, depth_addr=0x%x)", queue.addr(), depth.addr());
|
||||
|
||||
if (!queue || !depth.GetAddr())
|
||||
if (!queue || !depth)
|
||||
{
|
||||
return CELL_SYNC_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
@ -2071,15 +2071,15 @@ s32 cellSyncLFQueueDepth(vm::ptr<CellSyncLFQueue> queue, mem32_t depth)
|
|||
return CELL_SYNC_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
depth = queue->m_depth;
|
||||
*depth = queue->m_depth;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _cellSyncLFQueueGetSignalAddress(vm::ptr<CellSyncLFQueue> queue, mem32_t ppSignal)
|
||||
s32 _cellSyncLFQueueGetSignalAddress(vm::ptr<CellSyncLFQueue> queue, vm::ptr<be_t<u32>> ppSignal)
|
||||
{
|
||||
cellSync->Log("_cellSyncLFQueueGetSignalAddress(queue_addr=0x%x, ppSignal_addr=0x%x)", queue.addr(), ppSignal.GetAddr());
|
||||
cellSync->Log("_cellSyncLFQueueGetSignalAddress(queue_addr=0x%x, ppSignal_addr=0x%x)", queue.addr(), ppSignal.addr());
|
||||
|
||||
if (!queue || !ppSignal.GetAddr())
|
||||
if (!queue || !ppSignal)
|
||||
{
|
||||
return CELL_SYNC_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
@ -2088,15 +2088,15 @@ s32 _cellSyncLFQueueGetSignalAddress(vm::ptr<CellSyncLFQueue> queue, mem32_t ppS
|
|||
return CELL_SYNC_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
ppSignal = (u32)queue->m_eaSignal;
|
||||
*ppSignal = (u32)queue->m_eaSignal;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellSyncLFQueueGetDirection(vm::ptr<CellSyncLFQueue> queue, mem32_t direction)
|
||||
s32 cellSyncLFQueueGetDirection(vm::ptr<CellSyncLFQueue> queue, vm::ptr<be_t<CellSyncQueueDirection>> direction)
|
||||
{
|
||||
cellSync->Log("cellSyncLFQueueGetDirection(queue_addr=0x%x, direction_addr=0x%x)", queue.addr(), direction.GetAddr());
|
||||
cellSync->Log("cellSyncLFQueueGetDirection(queue_addr=0x%x, direction_addr=0x%x)", queue.addr(), direction.addr());
|
||||
|
||||
if (!queue || !direction.GetAddr())
|
||||
if (!queue || !direction)
|
||||
{
|
||||
return CELL_SYNC_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
@ -2105,15 +2105,15 @@ s32 cellSyncLFQueueGetDirection(vm::ptr<CellSyncLFQueue> queue, mem32_t directio
|
|||
return CELL_SYNC_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
direction = queue->m_direction;
|
||||
*direction = queue->m_direction;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellSyncLFQueueGetEntrySize(vm::ptr<CellSyncLFQueue> queue, mem32_t entry_size)
|
||||
s32 cellSyncLFQueueGetEntrySize(vm::ptr<CellSyncLFQueue> queue, vm::ptr<be_t<u32>> entry_size)
|
||||
{
|
||||
cellSync->Log("cellSyncLFQueueGetEntrySize(queue_addr=0x%x, entry_size_addr=0x%x)", queue.addr(), entry_size.GetAddr());
|
||||
cellSync->Log("cellSyncLFQueueGetEntrySize(queue_addr=0x%x, entry_size_addr=0x%x)", queue.addr(), entry_size.addr());
|
||||
|
||||
if (!queue || !entry_size.GetAddr())
|
||||
if (!queue || !entry_size)
|
||||
{
|
||||
return CELL_SYNC_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
@ -2122,7 +2122,7 @@ s32 cellSyncLFQueueGetEntrySize(vm::ptr<CellSyncLFQueue> queue, mem32_t entry_si
|
|||
return CELL_SYNC_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
entry_size = queue->m_size;
|
||||
*entry_size = queue->m_size;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,85 +24,85 @@ typedef void (*CellHddGameStatCallback)(mem_ptr_t<CellHddGameCBResult> cbResult,
|
|||
//Module cellSysutil(0x0015, cellSysutil_init);
|
||||
Module *cellSysutil = nullptr;
|
||||
|
||||
int cellSysutilGetSystemParamInt(int id, mem32_t value)
|
||||
int cellSysutilGetSystemParamInt(int id, vm::ptr<be_t<u32>> value)
|
||||
{
|
||||
cellSysutil->Log("cellSysutilGetSystemParamInt(id=0x%x, value_addr=0x%x)", id, value.GetAddr());
|
||||
cellSysutil->Log("cellSysutilGetSystemParamInt(id=0x%x, value_addr=0x%x)", id, value.addr());
|
||||
|
||||
switch(id)
|
||||
{
|
||||
case CELL_SYSUTIL_SYSTEMPARAM_ID_LANG:
|
||||
cellSysutil->Warning("cellSysutilGetSystemParamInt: CELL_SYSUTIL_SYSTEMPARAM_ID_LANG");
|
||||
value = Ini.SysLanguage.GetValue();
|
||||
*value = Ini.SysLanguage.GetValue();
|
||||
break;
|
||||
|
||||
case CELL_SYSUTIL_SYSTEMPARAM_ID_ENTER_BUTTON_ASSIGN:
|
||||
cellSysutil->Warning("cellSysutilGetSystemParamInt: CELL_SYSUTIL_SYSTEMPARAM_ID_ENTER_BUTTON_ASSIGN");
|
||||
value = CELL_SYSUTIL_ENTER_BUTTON_ASSIGN_CROSS;
|
||||
*value = CELL_SYSUTIL_ENTER_BUTTON_ASSIGN_CROSS;
|
||||
break;
|
||||
|
||||
case CELL_SYSUTIL_SYSTEMPARAM_ID_DATE_FORMAT:
|
||||
cellSysutil->Warning("cellSysutilGetSystemParamInt: CELL_SYSUTIL_SYSTEMPARAM_ID_DATE_FORMAT");
|
||||
value = CELL_SYSUTIL_DATE_FMT_DDMMYYYY;
|
||||
*value = CELL_SYSUTIL_DATE_FMT_DDMMYYYY;
|
||||
break;
|
||||
|
||||
case CELL_SYSUTIL_SYSTEMPARAM_ID_TIME_FORMAT:
|
||||
cellSysutil->Warning("cellSysutilGetSystemParamInt: CELL_SYSUTIL_SYSTEMPARAM_ID_TIME_FORMAT");
|
||||
value = CELL_SYSUTIL_TIME_FMT_CLOCK24;
|
||||
*value = CELL_SYSUTIL_TIME_FMT_CLOCK24;
|
||||
break;
|
||||
|
||||
case CELL_SYSUTIL_SYSTEMPARAM_ID_TIMEZONE:
|
||||
cellSysutil->Warning("cellSysutilGetSystemParamInt: CELL_SYSUTIL_SYSTEMPARAM_ID_TIMEZONE");
|
||||
value = 3;
|
||||
*value = 3;
|
||||
break;
|
||||
|
||||
case CELL_SYSUTIL_SYSTEMPARAM_ID_SUMMERTIME:
|
||||
cellSysutil->Warning("cellSysutilGetSystemParamInt: CELL_SYSUTIL_SYSTEMPARAM_ID_SUMMERTIME");
|
||||
value = 1;
|
||||
*value = 1;
|
||||
break;
|
||||
|
||||
case CELL_SYSUTIL_SYSTEMPARAM_ID_GAME_PARENTAL_LEVEL:
|
||||
cellSysutil->Warning("cellSysutilGetSystemParamInt: CELL_SYSUTIL_SYSTEMPARAM_ID_GAME_PARENTAL_LEVEL");
|
||||
value = CELL_SYSUTIL_GAME_PARENTAL_OFF;
|
||||
*value = CELL_SYSUTIL_GAME_PARENTAL_OFF;
|
||||
break;
|
||||
|
||||
case CELL_SYSUTIL_SYSTEMPARAM_ID_GAME_PARENTAL_LEVEL0_RESTRICT:
|
||||
cellSysutil->Warning("cellSysutilGetSystemParamInt: CELL_SYSUTIL_SYSTEMPARAM_ID_GAME_PARENTAL_LEVEL0_RESTRICT");
|
||||
value = CELL_SYSUTIL_GAME_PARENTAL_LEVEL0_RESTRICT_OFF;
|
||||
*value = CELL_SYSUTIL_GAME_PARENTAL_LEVEL0_RESTRICT_OFF;
|
||||
break;
|
||||
|
||||
case CELL_SYSUTIL_SYSTEMPARAM_ID_CURRENT_USER_HAS_NP_ACCOUNT:
|
||||
cellSysutil->Warning("cellSysutilGetSystemParamInt: CELL_SYSUTIL_SYSTEMPARAM_ID_CURRENT_USER_HAS_NP_ACCOUNT");
|
||||
value = 0;
|
||||
*value = 0;
|
||||
break;
|
||||
|
||||
case CELL_SYSUTIL_SYSTEMPARAM_ID_CAMERA_PLFREQ:
|
||||
cellSysutil->Warning("cellSysutilGetSystemParamInt: CELL_SYSUTIL_SYSTEMPARAM_ID_CAMERA_PLFREQ");
|
||||
value = CELL_SYSUTIL_CAMERA_PLFREQ_DISABLED;
|
||||
*value = CELL_SYSUTIL_CAMERA_PLFREQ_DISABLED;
|
||||
break;
|
||||
|
||||
case CELL_SYSUTIL_SYSTEMPARAM_ID_PAD_RUMBLE:
|
||||
cellSysutil->Warning("cellSysutilGetSystemParamInt: CELL_SYSUTIL_SYSTEMPARAM_ID_PAD_RUMBLE");
|
||||
value = CELL_SYSUTIL_PAD_RUMBLE_OFF;
|
||||
*value = CELL_SYSUTIL_PAD_RUMBLE_OFF;
|
||||
break;
|
||||
|
||||
case CELL_SYSUTIL_SYSTEMPARAM_ID_KEYBOARD_TYPE:
|
||||
cellSysutil->Warning("cellSysutilGetSystemParamInt: CELL_SYSUTIL_SYSTEMPARAM_ID_KEYBOARD_TYPE");
|
||||
value = 0;
|
||||
*value = 0;
|
||||
break;
|
||||
|
||||
case CELL_SYSUTIL_SYSTEMPARAM_ID_JAPANESE_KEYBOARD_ENTRY_METHOD:
|
||||
cellSysutil->Warning("cellSysutilGetSystemParamInt: CELL_SYSUTIL_SYSTEMPARAM_ID_JAPANESE_KEYBOARD_ENTRY_METHOD");
|
||||
value = 0;
|
||||
*value = 0;
|
||||
break;
|
||||
|
||||
case CELL_SYSUTIL_SYSTEMPARAM_ID_CHINESE_KEYBOARD_ENTRY_METHOD:
|
||||
cellSysutil->Warning("cellSysutilGetSystemParamInt: CELL_SYSUTIL_SYSTEMPARAM_ID_CHINESE_KEYBOARD_ENTRY_METHOD");
|
||||
value = 0;
|
||||
*value = 0;
|
||||
break;
|
||||
|
||||
case CELL_SYSUTIL_SYSTEMPARAM_ID_PAD_AUTOOFF:
|
||||
cellSysutil->Warning("cellSysutilGetSystemParamInt: CELL_SYSUTIL_SYSTEMPARAM_ID_PAD_AUTOOFF");
|
||||
value = 0;
|
||||
*value = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -966,7 +966,7 @@ int cellSaveDataFixedExport() //const char *dirName, u32 maxSizeKB, CellSaveData
|
|||
return CELL_SAVEDATA_RET_OK;
|
||||
}
|
||||
|
||||
int cellSaveDataGetListItem() //const char *dirName, CellSaveDataDirStat *dir, CellSaveDataSystemFileParam *sysFileParam, mem32_t bind, mem32_t sizeKB
|
||||
int cellSaveDataGetListItem() //const char *dirName, CellSaveDataDirStat *dir, CellSaveDataSystemFileParam *sysFileParam, vm::ptr<be_t<u32>> bind, vm::ptr<be_t<u32>> sizeKB
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellSysutil);
|
||||
return CELL_SAVEDATA_RET_OK;
|
||||
|
@ -1002,7 +1002,7 @@ int cellSaveDataUserFixedExport() //CellSysutilUserId userId, const char *dirNam
|
|||
return CELL_SAVEDATA_RET_OK;
|
||||
}
|
||||
|
||||
int cellSaveDataUserGetListItem() //CellSysutilUserId userId, const char *dirName, CellSaveDataDirStat *dir, CellSaveDataSystemFileParam *sysFileParam, mem32_t bind, mem32_t sizeKB
|
||||
int cellSaveDataUserGetListItem() //CellSysutilUserId userId, const char *dirName, CellSaveDataDirStat *dir, CellSaveDataSystemFileParam *sysFileParam, vm::ptr<be_t<u32>> bind, vm::ptr<be_t<u32>> sizeKB
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellSysutil);
|
||||
return CELL_SAVEDATA_RET_OK;
|
||||
|
|
|
@ -57,21 +57,21 @@ int cellUserInfoEnableOverlay()
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellUserInfoGetList(mem32_t listNum, mem_ptr_t<CellUserInfoUserList> listBuf, mem32_t currentUserId)
|
||||
int cellUserInfoGetList(vm::ptr<be_t<u32>> listNum, mem_ptr_t<CellUserInfoUserList> listBuf, vm::ptr<be_t<u32>> currentUserId)
|
||||
{
|
||||
cellUserInfo->Warning("cellUserInfoGetList(listNum_addr=0x%x, listBuf_addr=0x%x, currentUserId_addr=0x%x)",
|
||||
listNum.GetAddr(), listBuf.GetAddr(), currentUserId.GetAddr());
|
||||
listNum.addr(), listBuf.GetAddr(), currentUserId.addr());
|
||||
|
||||
// If only listNum is NULL, an error will be returned
|
||||
if (listBuf.GetAddr() && !listNum.GetAddr())
|
||||
if (listBuf && !listNum)
|
||||
return CELL_USERINFO_ERROR_PARAM;
|
||||
if (listNum.GetAddr())
|
||||
listNum = 1;
|
||||
if (listBuf.GetAddr())
|
||||
if (listNum)
|
||||
*listNum = 1;
|
||||
if (listBuf)
|
||||
listBuf->userId[0] = 1;
|
||||
|
||||
if (currentUserId.GetAddr())
|
||||
currentUserId = 1;
|
||||
if (currentUserId)
|
||||
*currentUserId = 1;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -496,22 +496,22 @@ int cellVdecQueryAttrEx(const mem_ptr_t<CellVdecTypeEx> type, mem_ptr_t<CellVdec
|
|||
return vdecQueryAttr(type->codecType, type->profileLevel, type->codecSpecificInfo_addr, attr);
|
||||
}
|
||||
|
||||
int cellVdecOpen(const mem_ptr_t<CellVdecType> type, const mem_ptr_t<CellVdecResource> res, const mem_ptr_t<CellVdecCb> cb, mem32_t handle)
|
||||
int cellVdecOpen(const mem_ptr_t<CellVdecType> type, const mem_ptr_t<CellVdecResource> res, const mem_ptr_t<CellVdecCb> cb, vm::ptr<be_t<u32>> handle)
|
||||
{
|
||||
cellVdec->Warning("cellVdecOpen(type_addr=0x%x, res_addr=0x%x, cb_addr=0x%x, handle_addr=0x%x)",
|
||||
type.GetAddr(), res.GetAddr(), cb.GetAddr(), handle.GetAddr());
|
||||
type.GetAddr(), res.GetAddr(), cb.GetAddr(), handle.addr());
|
||||
|
||||
handle = vdecOpen(new VideoDecoder(type->codecType, type->profileLevel, res->memAddr, res->memSize, cb->cbFunc, cb->cbArg));
|
||||
*handle = vdecOpen(new VideoDecoder(type->codecType, type->profileLevel, res->memAddr, res->memSize, cb->cbFunc, cb->cbArg));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellVdecOpenEx(const mem_ptr_t<CellVdecTypeEx> type, const mem_ptr_t<CellVdecResourceEx> res, const mem_ptr_t<CellVdecCb> cb, mem32_t handle)
|
||||
int cellVdecOpenEx(const mem_ptr_t<CellVdecTypeEx> type, const mem_ptr_t<CellVdecResourceEx> res, const mem_ptr_t<CellVdecCb> cb, vm::ptr<be_t<u32>> handle)
|
||||
{
|
||||
cellVdec->Warning("cellVdecOpenEx(type_addr=0x%x, res_addr=0x%x, cb_addr=0x%x, handle_addr=0x%x)",
|
||||
type.GetAddr(), res.GetAddr(), cb.GetAddr(), handle.GetAddr());
|
||||
type.GetAddr(), res.GetAddr(), cb.GetAddr(), handle.addr());
|
||||
|
||||
handle = vdecOpen(new VideoDecoder(type->codecType, type->profileLevel, res->memAddr, res->memSize, cb->cbFunc, cb->cbArg));
|
||||
*handle = vdecOpen(new VideoDecoder(type->codecType, type->profileLevel, res->memAddr, res->memSize, cb->cbFunc, cb->cbArg));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -670,9 +670,9 @@ int cellVdecGetPicture(u32 handle, const mem_ptr_t<CellVdecPicFormat> format, u3
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellVdecGetPicItem(u32 handle, mem32_t picItem_ptr)
|
||||
int cellVdecGetPicItem(u32 handle, vm::ptr<be_t<u32>> picItem_ptr)
|
||||
{
|
||||
cellVdec->Log("cellVdecGetPicItem(handle=%d, picItem_ptr_addr=0x%x)", handle, picItem_ptr.GetAddr());
|
||||
cellVdec->Log("cellVdecGetPicItem(handle=%d, picItem_ptr_addr=0x%x)", handle, picItem_ptr.addr());
|
||||
|
||||
VideoDecoder* vdec;
|
||||
if (!Emu.GetIdManager().GetIDData(handle, vdec))
|
||||
|
@ -775,7 +775,7 @@ int cellVdecGetPicItem(u32 handle, mem32_t picItem_ptr)
|
|||
avc->reserved[0] = 0;
|
||||
avc->reserved[1] = 0;
|
||||
|
||||
picItem_ptr = info.GetAddr();
|
||||
*picItem_ptr = info.GetAddr();
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -37,23 +37,23 @@ u32 vpostOpen(VpostInstance* data)
|
|||
return id;
|
||||
}
|
||||
|
||||
int cellVpostOpen(const mem_ptr_t<CellVpostCfgParam> cfgParam, const mem_ptr_t<CellVpostResource> resource, mem32_t handle)
|
||||
int cellVpostOpen(const mem_ptr_t<CellVpostCfgParam> cfgParam, const mem_ptr_t<CellVpostResource> resource, vm::ptr<be_t<u32>> handle)
|
||||
{
|
||||
cellVpost->Warning("cellVpostOpen(cfgParam_addr=0x%x, resource_addr=0x%x, handle_addr=0x%x)",
|
||||
cfgParam.GetAddr(), resource.GetAddr(), handle.GetAddr());
|
||||
cfgParam.GetAddr(), resource.GetAddr(), handle.addr());
|
||||
|
||||
// TODO: check values
|
||||
handle = vpostOpen(new VpostInstance(cfgParam->outPicFmt == CELL_VPOST_PIC_FMT_OUT_RGBA_ILV));
|
||||
*handle = vpostOpen(new VpostInstance(cfgParam->outPicFmt == CELL_VPOST_PIC_FMT_OUT_RGBA_ILV));
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellVpostOpenEx(const mem_ptr_t<CellVpostCfgParam> cfgParam, const mem_ptr_t<CellVpostResourceEx> resource, mem32_t handle)
|
||||
int cellVpostOpenEx(const mem_ptr_t<CellVpostCfgParam> cfgParam, const mem_ptr_t<CellVpostResourceEx> resource, vm::ptr<be_t<u32>> handle)
|
||||
{
|
||||
cellVpost->Warning("cellVpostOpenEx(cfgParam_addr=0x%x, resource_addr=0x%x, handle_addr=0x%x)",
|
||||
cfgParam.GetAddr(), resource.GetAddr(), handle.GetAddr());
|
||||
cfgParam.GetAddr(), resource.GetAddr(), handle.addr());
|
||||
|
||||
// TODO: check values
|
||||
handle = vpostOpen(new VpostInstance(cfgParam->outPicFmt == CELL_VPOST_PIC_FMT_OUT_RGBA_ILV));
|
||||
*handle = vpostOpen(new VpostInstance(cfgParam->outPicFmt == CELL_VPOST_PIC_FMT_OUT_RGBA_ILV));
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -141,10 +141,10 @@ int cellAANDisconnect(u32 receive, u32 receivePortNo, u32 source, u32 sourcePort
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellSSPlayerCreate(mem32_t handle, mem_ptr_t<CellSSPlayerConfig> config)
|
||||
int cellSSPlayerCreate(vm::ptr<be_t<u32>> handle, mem_ptr_t<CellSSPlayerConfig> config)
|
||||
{
|
||||
libmixer->Warning("cellSSPlayerCreate(handle_addr=0x%x, config_addr=0x%x)",
|
||||
handle.GetAddr(), config.GetAddr());
|
||||
handle.addr(), config.GetAddr());
|
||||
|
||||
if (config->outputMode != 0 || config->channels - 1 >= 2)
|
||||
{
|
||||
|
@ -162,7 +162,7 @@ int cellSSPlayerCreate(mem32_t handle, mem_ptr_t<CellSSPlayerConfig> config)
|
|||
p.m_channels = config->channels;
|
||||
|
||||
ssp.push_back(p);
|
||||
handle = (u32)ssp.size() - 1;
|
||||
*handle = (u32)ssp.size() - 1;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -463,17 +463,17 @@ int cellSurMixerCreate(const mem_ptr_t<CellSurMixerConfig> config)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellSurMixerGetAANHandle(mem32_t handle)
|
||||
int cellSurMixerGetAANHandle(vm::ptr<be_t<u32>> handle)
|
||||
{
|
||||
libmixer->Warning("cellSurMixerGetAANHandle(handle_addr=0x%x) -> %d", handle.GetAddr(), 0x11111111);
|
||||
handle = 0x11111111;
|
||||
libmixer->Warning("cellSurMixerGetAANHandle(handle_addr=0x%x) -> %d", handle.addr(), 0x11111111);
|
||||
*handle = 0x11111111;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellSurMixerChStripGetAANPortNo(mem32_t port, u32 type, u32 index)
|
||||
int cellSurMixerChStripGetAANPortNo(vm::ptr<be_t<u32>> port, u32 type, u32 index)
|
||||
{
|
||||
libmixer->Warning("cellSurMixerChStripGetAANPortNo(port_addr=0x%x, type=0x%x, index=0x%x) -> 0x%x", port.GetAddr(), type, index, (type << 16) | index);
|
||||
port = (type << 16) | index;
|
||||
libmixer->Warning("cellSurMixerChStripGetAANPortNo(port_addr=0x%x, type=0x%x, index=0x%x) -> 0x%x", port.addr(), type, index, (type << 16) | index);
|
||||
*port = (type << 16) | index;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -183,14 +183,14 @@ int sceNpDrmGetTimelimit(u32 drm_path_addr, vm::ptr<be_t<u64>> time_remain_usec)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpManagerGetStatus(mem32_t status)
|
||||
int sceNpManagerGetStatus(vm::ptr<be_t<u32>> status)
|
||||
{
|
||||
sceNp->Log("sceNpManagerGetStatus(status_addr=0x%x)", status.GetAddr());
|
||||
sceNp->Log("sceNpManagerGetStatus(status_addr=0x%x)", status.addr());
|
||||
|
||||
// TODO: Check if sceNpInit() was called, if not return SCE_NP_ERROR_NOT_INITIALIZED
|
||||
|
||||
// TODO: Support different statuses
|
||||
status = SCE_NP_MANAGER_STATUS_OFFLINE;
|
||||
*status = SCE_NP_MANAGER_STATUS_OFFLINE;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -85,10 +85,10 @@ int sceNpTrophyInit(u32 pool_addr, u32 poolSize, u32 containerId, u64 options)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTrophyCreateContext(mem32_t context, mem_ptr_t<SceNpCommunicationId> commID, mem_ptr_t<SceNpCommunicationSignature> commSign, u64 options)
|
||||
int sceNpTrophyCreateContext(vm::ptr<be_t<u32>> context, mem_ptr_t<SceNpCommunicationId> commID, mem_ptr_t<SceNpCommunicationSignature> commSign, u64 options)
|
||||
{
|
||||
sceNpTrophy->Warning("sceNpTrophyCreateContext(context_addr=0x%x, commID_addr=0x%x, commSign_addr=0x%x, options=0x%llx)",
|
||||
context.GetAddr(), commID.GetAddr(), commSign.GetAddr(), options);
|
||||
context.addr(), commID.GetAddr(), commSign.GetAddr(), options);
|
||||
|
||||
if (!s_npTrophyInstance.m_bInitialized)
|
||||
return SCE_NP_TROPHY_ERROR_NOT_INITIALIZED;
|
||||
|
@ -123,9 +123,9 @@ int sceNpTrophyCreateContext(mem32_t context, mem_ptr_t<SceNpCommunicationId> co
|
|||
return SCE_NP_TROPHY_ERROR_CONF_DOES_NOT_EXIST;
|
||||
}
|
||||
|
||||
int sceNpTrophyCreateHandle(mem32_t handle)
|
||||
int sceNpTrophyCreateHandle(vm::ptr<be_t<u32>> handle)
|
||||
{
|
||||
sceNpTrophy->Warning("sceNpTrophyCreateHandle(handle_addr=0x%x)", handle.GetAddr());
|
||||
sceNpTrophy->Warning("sceNpTrophyCreateHandle(handle_addr=0x%x)", handle.addr());
|
||||
|
||||
if (!s_npTrophyInstance.m_bInitialized)
|
||||
return SCE_NP_TROPHY_ERROR_NOT_INITIALIZED;
|
||||
|
@ -302,10 +302,10 @@ int sceNpTrophyDestroyHandle()
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTrophyUnlockTrophy(u32 context, u32 handle, s32 trophyId, mem32_t platinumId)
|
||||
int sceNpTrophyUnlockTrophy(u32 context, u32 handle, s32 trophyId, vm::ptr<be_t<u32>> platinumId)
|
||||
{
|
||||
sceNpTrophy->Warning("sceNpTrophyUnlockTrophy(context=%d, handle=%d, trophyId=%d, platinumId_addr=0x%x)",
|
||||
context, handle, trophyId, platinumId.GetAddr());
|
||||
context, handle, trophyId, platinumId.addr());
|
||||
|
||||
if (!s_npTrophyInstance.m_bInitialized)
|
||||
return SCE_NP_TROPHY_ERROR_NOT_INITIALIZED;
|
||||
|
@ -323,7 +323,7 @@ int sceNpTrophyUnlockTrophy(u32 context, u32 handle, s32 trophyId, mem32_t plati
|
|||
std::string trophyPath = "/dev_hdd0/home/00000001/trophy/" + ctxt.trp_name + "/TROPUSR.DAT";
|
||||
ctxt.tropusr->Save(trophyPath);
|
||||
|
||||
platinumId = SCE_NP_TROPHY_INVALID_TROPHY_ID; // TODO
|
||||
*platinumId = SCE_NP_TROPHY_INVALID_TROPHY_ID; // TODO
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -333,22 +333,22 @@ int sceNpTrophyTerm()
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTrophyGetTrophyUnlockState(u32 context, u32 handle, mem_ptr_t<SceNpTrophyFlagArray> flags, mem32_t count)
|
||||
int sceNpTrophyGetTrophyUnlockState(u32 context, u32 handle, mem_ptr_t<SceNpTrophyFlagArray> flags, vm::ptr<be_t<u32>> count)
|
||||
{
|
||||
sceNpTrophy->Warning("sceNpTrophyGetTrophyUnlockState(context=%d, handle=%d, flags_addr=0x%x, count_addr=0x%x)",
|
||||
context, handle, flags.GetAddr(), count.GetAddr());
|
||||
context, handle, flags.GetAddr(), count.addr());
|
||||
|
||||
if (!s_npTrophyInstance.m_bInitialized)
|
||||
return SCE_NP_TROPHY_ERROR_NOT_INITIALIZED;
|
||||
// TODO: There are other possible errors
|
||||
|
||||
sceNpTrophyInternalContext& ctxt = s_npTrophyInstance.contexts[context];
|
||||
count = ctxt.tropusr->GetTrophiesCount();
|
||||
if (count.GetValue() > 128)
|
||||
*count = ctxt.tropusr->GetTrophiesCount();
|
||||
if (*count > 128)
|
||||
sceNpTrophy->Warning("sceNpTrophyGetTrophyUnlockState: More than 128 trophies detected!");
|
||||
|
||||
// Pack up to 128 bools in u32 flag_bits[4]
|
||||
for (u32 id=0; id<count.GetValue(); id++)
|
||||
for (u32 id=0; id<*count; id++)
|
||||
{
|
||||
if (ctxt.tropusr->GetTrophyUnlockState(id))
|
||||
flags->flag_bits[id/32] |= 1<<(id%32);
|
||||
|
|
|
@ -83,15 +83,15 @@ s64 sys_prx_exitspawn_with_level()
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sys_spu_elf_get_information(u32 elf_img, mem32_t entry, mem32_t nseg)
|
||||
int sys_spu_elf_get_information(u32 elf_img, vm::ptr<be_t<u32>> entry, vm::ptr<be_t<u32>> nseg)
|
||||
{
|
||||
sysPrxForUser->Warning("sys_spu_elf_get_information(elf_img=0x%x, entry_addr=0x%x, nseg_addr=0x%x", elf_img, entry.GetAddr(), nseg.GetAddr());
|
||||
sysPrxForUser->Todo("sys_spu_elf_get_information(elf_img=0x%x, entry_addr=0x%x, nseg_addr=0x%x", elf_img, entry.addr(), nseg.addr());
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sys_spu_elf_get_segments(u32 elf_img, mem_ptr_t<sys_spu_segment> segments, int nseg)
|
||||
{
|
||||
sysPrxForUser->Warning("sys_spu_elf_get_segments(elf_img=0x%x, segments_addr=0x%x, nseg=0x%x)", elf_img, segments.GetAddr(), nseg);
|
||||
sysPrxForUser->Todo("sys_spu_elf_get_segments(elf_img=0x%x, segments_addr=0x%x, nseg=0x%x)", elf_img, segments.GetAddr(), nseg);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -117,11 +117,11 @@ int sys_spu_image_close(mem_ptr_t<sys_spu_image> img)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sys_raw_spu_load(int id, u32 path_addr, mem32_t entry)
|
||||
int sys_raw_spu_load(int id, u32 path_addr, vm::ptr<be_t<u32>> entry)
|
||||
{
|
||||
const std::string path = Memory.ReadString(path_addr);
|
||||
sysPrxForUser->Warning("sys_raw_spu_load(id=0x%x, path=0x%x [%s], entry_addr=0x%x)",
|
||||
id, path_addr, path.c_str(), entry.GetAddr());
|
||||
id, path_addr, path.c_str(), entry.addr());
|
||||
|
||||
vfsFile f(path);
|
||||
if(!f.IsOpened())
|
||||
|
@ -134,7 +134,7 @@ int sys_raw_spu_load(int id, u32 path_addr, mem32_t entry)
|
|||
l.LoadInfo();
|
||||
l.LoadData(RAW_SPU_BASE_ADDR + RAW_SPU_OFFSET * id);
|
||||
|
||||
entry = l.GetEntry();
|
||||
*entry = l.GetEntry();
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -110,11 +110,11 @@ int sdata_unpack(const std::string& packed_file, const std::string& unpacked_fil
|
|||
}
|
||||
|
||||
|
||||
int cellFsSdataOpen(u32 path_addr, int flags, mem32_t fd, mem32_t arg, u64 size)
|
||||
int cellFsSdataOpen(u32 path_addr, int flags, vm::ptr<be_t<u32>> fd, vm::ptr<be_t<u32>> arg, u64 size)
|
||||
{
|
||||
const std::string& path = Memory.ReadString(path_addr);
|
||||
sys_fs->Warning("cellFsSdataOpen(path=\"%s\", flags=0x%x, fd_addr=0x%x, arg_addr=0x%x, size=0x%llx) -> cellFsOpen()",
|
||||
path.c_str(), flags, fd.GetAddr(), arg.GetAddr(), size);
|
||||
path.c_str(), flags, fd.addr(), arg.addr(), size);
|
||||
|
||||
/*if (flags != CELL_O_RDONLY)
|
||||
return CELL_EINVAL;
|
||||
|
@ -136,9 +136,10 @@ int cellFsSdataOpen(u32 path_addr, int flags, mem32_t fd, mem32_t arg, u64 size)
|
|||
return cellFsOpen(path_addr, flags, fd, arg, size);
|
||||
}
|
||||
|
||||
int cellFsSdataOpenByFd(int mself_fd, int flags, mem32_t sdata_fd, u64 offset, mem32_t arg, u64 size)
|
||||
int cellFsSdataOpenByFd(int mself_fd, int flags, vm::ptr<be_t<u32>> sdata_fd, u64 offset, vm::ptr<be_t<u32>> arg, u64 size)
|
||||
{
|
||||
sys_fs->Todo("cellFsSdataOpenByFd(mself_fd=0x%x, flags=0x%x, sdata_fd_addr=0x%x, offset=0x%llx, arg_addr=0x%x, size=0x%llx) -> cellFsOpen()", mself_fd, flags, sdata_fd.GetAddr(), offset, arg.GetAddr(), size);
|
||||
sys_fs->Todo("cellFsSdataOpenByFd(mself_fd=0x%x, flags=0x%x, sdata_fd_addr=0x%x, offset=0x%llx, arg_addr=0x%x, size=0x%llx) -> cellFsOpen()",
|
||||
mself_fd, flags, sdata_fd.addr(), offset, arg.addr(), size);
|
||||
|
||||
// TODO:
|
||||
|
||||
|
@ -198,9 +199,9 @@ void fsAioRead(u32 fd, mem_ptr_t<CellFsAio> aio, int xid, mem_func_ptr_t<void (*
|
|||
g_FsAioReadCur++;
|
||||
}
|
||||
|
||||
int cellFsAioRead(mem_ptr_t<CellFsAio> aio, mem32_t aio_id, mem_func_ptr_t<void (*)(mem_ptr_t<CellFsAio> xaio, int error, int xid, u64 size)> func)
|
||||
int cellFsAioRead(mem_ptr_t<CellFsAio> aio, vm::ptr<be_t<u32>> aio_id, mem_func_ptr_t<void(*)(mem_ptr_t<CellFsAio> xaio, int error, int xid, u64 size)> func)
|
||||
{
|
||||
sys_fs->Warning("cellFsAioRead(aio_addr=0x%x, id_addr=0x%x, func_addr=0x%x)", aio.GetAddr(), aio_id.GetAddr(), func.GetAddr());
|
||||
sys_fs->Warning("cellFsAioRead(aio_addr=0x%x, id_addr=0x%x, func_addr=0x%x)", aio.GetAddr(), aio_id.addr(), func.GetAddr());
|
||||
|
||||
if (!aio_init)
|
||||
{
|
||||
|
@ -217,7 +218,7 @@ int cellFsAioRead(mem_ptr_t<CellFsAio> aio, mem32_t aio_id, mem_func_ptr_t<void
|
|||
|
||||
//get a unique id for the callback (may be used by cellFsAioCancel)
|
||||
const u32 xid = g_FsAioReadID++;
|
||||
aio_id = xid;
|
||||
*aio_id = xid;
|
||||
|
||||
{
|
||||
thread t("fsAioRead", std::bind(fsAioRead, fd, aio, xid, func));
|
||||
|
@ -227,9 +228,9 @@ int cellFsAioRead(mem_ptr_t<CellFsAio> aio, mem32_t aio_id, mem_func_ptr_t<void
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellFsAioWrite(mem_ptr_t<CellFsAio> aio, mem32_t aio_id, mem_func_ptr_t<void(*)(mem_ptr_t<CellFsAio> xaio, int error, int xid, u64 size)> func)
|
||||
int cellFsAioWrite(mem_ptr_t<CellFsAio> aio, vm::ptr<be_t<u32>> aio_id, mem_func_ptr_t<void(*)(mem_ptr_t<CellFsAio> xaio, int error, int xid, u64 size)> func)
|
||||
{
|
||||
sys_fs->Todo("cellFsAioWrite(aio_addr=0x%x, id_addr=0x%x, func_addr=0x%x)", aio.GetAddr(), aio_id.GetAddr(), func.GetAddr());
|
||||
sys_fs->Todo("cellFsAioWrite(aio_addr=0x%x, id_addr=0x%x, func_addr=0x%x)", aio.GetAddr(), aio_id.addr(), func.GetAddr());
|
||||
|
||||
// TODO:
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ extern int cellPadInfoPressMode(u32 port_no);
|
|||
extern int cellPadInfoSensorMode(u32 port_no);
|
||||
extern int cellPadSetPressMode(u32 port_no, u32 mode);
|
||||
extern int cellPadSetSensorMode(u32 port_no, u32 mode);
|
||||
extern int cellPadGetCapabilityInfo(u32 port_no, mem32_t info_addr);
|
||||
extern int cellPadGetCapabilityInfo(u32 port_no, vm::ptr<be_t<u32>> info_addr);
|
||||
|
||||
void sys_io_init()
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@ extern "C"
|
|||
//Module sys_net((u16)0x0000, sys_net_init);
|
||||
Module *sys_net = nullptr;
|
||||
|
||||
mem32_t g_lastError(0);
|
||||
vm::ptr<be_t<s32>> g_lastError = vm::ptr<be_t<s32>>::make(0);
|
||||
|
||||
|
||||
// Auxiliary Functions
|
||||
|
@ -94,21 +94,21 @@ using pck_len_t = u32;
|
|||
#endif
|
||||
|
||||
// Functions
|
||||
int sys_net_accept(s32 s, mem_ptr_t<sys_net_sockaddr> addr, mem32_t paddrlen)
|
||||
int sys_net_accept(s32 s, mem_ptr_t<sys_net_sockaddr> addr, vm::ptr<be_t<u32>> paddrlen)
|
||||
{
|
||||
sys_net->Warning("accept(s=%d, family_addr=0x%x, paddrlen=0x%x)", s, addr.GetAddr(), paddrlen.GetAddr());
|
||||
sys_net->Warning("accept(s=%d, family_addr=0x%x, paddrlen=0x%x)", s, addr.GetAddr(), paddrlen.addr());
|
||||
if (addr.GetAddr() == 0) {
|
||||
int ret = accept(s, NULL, NULL);
|
||||
g_lastError = getLastError();
|
||||
*g_lastError = getLastError();
|
||||
return ret;
|
||||
}
|
||||
else {
|
||||
sockaddr _addr;
|
||||
memcpy(&_addr, Memory.VirtualToRealAddr(addr.GetAddr()), sizeof(sockaddr));
|
||||
_addr.sa_family = addr->sa_family;
|
||||
pck_len_t *_paddrlen = (pck_len_t *)Memory.VirtualToRealAddr(paddrlen.GetAddr());
|
||||
pck_len_t *_paddrlen = (pck_len_t *)Memory.VirtualToRealAddr(paddrlen.addr());
|
||||
int ret = accept(s, &_addr, _paddrlen);
|
||||
g_lastError = getLastError();
|
||||
*g_lastError = getLastError();
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ int sys_net_bind(s32 s, mem_ptr_t<sys_net_sockaddr_in> addr, u32 addrlen)
|
|||
const char *ipaddr = inet_ntoa(saddr.sin_addr);
|
||||
sys_net->Warning("binding on %s to port %d", ipaddr, ntohs(saddr.sin_port));
|
||||
int ret = bind(s, (const sockaddr *)&saddr, addrlen);
|
||||
g_lastError = getLastError();
|
||||
*g_lastError = getLastError();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ int sys_net_connect(s32 s, mem_ptr_t<sys_net_sockaddr_in> addr, u32 addrlen)
|
|||
const char *ipaddr = inet_ntoa(saddr.sin_addr);
|
||||
sys_net->Warning("connecting on %s to port %d", ipaddr, ntohs(saddr.sin_port));
|
||||
int ret = connect(s, (const sockaddr *) &saddr, addrlen);
|
||||
g_lastError = getLastError();
|
||||
*g_lastError = getLastError();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ int sys_net_listen(s32 s, s32 backlog)
|
|||
{
|
||||
sys_net->Warning("listen(s=%d, backlog=%d)", s, backlog);
|
||||
int ret = listen(s, backlog);
|
||||
g_lastError = getLastError();
|
||||
*g_lastError = getLastError();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -238,22 +238,22 @@ int sys_net_recv(s32 s, u32 buf_addr, u32 len, s32 flags)
|
|||
sys_net->Warning("recv(s=%d, buf_addr=0x%x, len=%d, flags=0x%x)", s, buf_addr, len, flags);
|
||||
char *buf = (char *)Memory.VirtualToRealAddr(buf_addr);
|
||||
int ret = recv(s, buf, len, flags);
|
||||
g_lastError = getLastError();
|
||||
*g_lastError = getLastError();
|
||||
return ret;
|
||||
}
|
||||
|
||||
int sys_net_recvfrom(s32 s, u32 buf_addr, u32 len, s32 flags, mem_ptr_t<sys_net_sockaddr> addr, mem32_t paddrlen)
|
||||
int sys_net_recvfrom(s32 s, u32 buf_addr, u32 len, s32 flags, mem_ptr_t<sys_net_sockaddr> addr, vm::ptr<be_t<u32>> paddrlen)
|
||||
{
|
||||
sys_net->Warning("recvfrom(s=%d, buf_addr=0x%x, len=%u, flags=0x%x, addr_addr=0x%x, paddrlen=0x%x)",
|
||||
s, buf_addr, len, flags, addr.GetAddr(), paddrlen.GetAddr());
|
||||
s, buf_addr, len, flags, addr.GetAddr(), paddrlen.addr());
|
||||
|
||||
char *_buf_addr = (char *)Memory.VirtualToRealAddr(buf_addr);
|
||||
sockaddr _addr;
|
||||
memcpy(&_addr, Memory.VirtualToRealAddr(addr.GetAddr()), sizeof(sockaddr));
|
||||
_addr.sa_family = addr->sa_family;
|
||||
pck_len_t *_paddrlen = (pck_len_t *) Memory.VirtualToRealAddr(paddrlen.GetAddr());
|
||||
pck_len_t *_paddrlen = (pck_len_t *) Memory.VirtualToRealAddr(paddrlen.addr());
|
||||
int ret = recvfrom(s, _buf_addr, len, flags, &_addr, _paddrlen);
|
||||
g_lastError = getLastError();
|
||||
*g_lastError = getLastError();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ int sys_net_send(s32 s, u32 buf_addr, u32 len, s32 flags)
|
|||
sys_net->Warning("send(s=%d, buf_addr=0x%x, len=%d, flags=0x%x)", s, buf_addr, len, flags);
|
||||
char *buf = (char *)Memory.VirtualToRealAddr(buf_addr);
|
||||
int ret = send(s, buf, len, flags);
|
||||
g_lastError = getLastError();
|
||||
*g_lastError = getLastError();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -288,7 +288,7 @@ int sys_net_sendto(s32 s, u32 buf_addr, u32 len, s32 flags, mem_ptr_t<sys_net_so
|
|||
memcpy(&_addr, Memory.VirtualToRealAddr(addr.GetAddr()), sizeof(sockaddr));
|
||||
_addr.sa_family = addr->sa_family;
|
||||
int ret = sendto(s, _buf_addr, len, flags, &_addr, addrlen);
|
||||
g_lastError = getLastError();
|
||||
*g_lastError = getLastError();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -297,7 +297,7 @@ int sys_net_setsockopt(s32 s, s32 level, s32 optname, u32 optval_addr, u32 optle
|
|||
sys_net->Warning("socket(s=%d, level=%d, optname=%d, optval_addr=0x%x, optlen=%u)", s, level, optname, optval_addr, optlen);
|
||||
char *_optval_addr = (char *)Memory.VirtualToRealAddr(optval_addr);
|
||||
int ret = setsockopt(s, level, optname, _optval_addr, optlen);
|
||||
g_lastError = getLastError();
|
||||
*g_lastError = getLastError();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -305,7 +305,7 @@ int sys_net_shutdown(s32 s, s32 how)
|
|||
{
|
||||
sys_net->Warning("shutdown(s=%d, how=%d)", s, how);
|
||||
int ret = shutdown(s, how);
|
||||
g_lastError = getLastError();
|
||||
*g_lastError = getLastError();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -313,7 +313,7 @@ int sys_net_socket(s32 family, s32 type, s32 protocol)
|
|||
{
|
||||
sys_net->Warning("socket(family=%d, type=%d, protocol=%d)", family, type, protocol);
|
||||
int ret = socket(family, type, protocol);
|
||||
g_lastError = getLastError();
|
||||
*g_lastError = getLastError();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -325,7 +325,7 @@ int sys_net_socketclose(s32 s)
|
|||
#else
|
||||
int ret = close(s);
|
||||
#endif
|
||||
g_lastError = getLastError();
|
||||
*g_lastError = getLastError();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -344,7 +344,7 @@ int socketselect()
|
|||
int sys_net_initialize_network_ex(mem_ptr_t<sys_net_initialize_parameter> param)
|
||||
{
|
||||
sys_net->Warning("sys_net_initialize_network_ex(param_addr=0x%x)", param.GetAddr());
|
||||
g_lastError.SetAddr((u32)Memory.Alloc(4, 1));
|
||||
g_lastError = vm::ptr<be_t<s32>>::make((u32)Memory.Alloc(4, 1));
|
||||
#ifdef _WIN32
|
||||
WSADATA wsaData;
|
||||
WORD wVersionRequested = MAKEWORD(1,1);
|
||||
|
@ -407,10 +407,10 @@ int sys_net_show_nameserver()
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _sys_net_errno_loc()
|
||||
u32 _sys_net_errno_loc()
|
||||
{
|
||||
sys_net->Warning("_sys_net_errno_loc()");
|
||||
return g_lastError.GetAddr();
|
||||
return g_lastError.addr();
|
||||
}
|
||||
|
||||
int sys_net_set_resolver_configurations()
|
||||
|
@ -476,8 +476,8 @@ int sys_net_show_ifconfig()
|
|||
int sys_net_finalize_network()
|
||||
{
|
||||
sys_net->Warning("sys_net_initialize_network_ex()");
|
||||
Memory.Free(g_lastError.GetAddr());
|
||||
g_lastError.SetAddr(0);
|
||||
Memory.Free(g_lastError.addr());
|
||||
g_lastError = vm::ptr<be_t<s32>>::make(0);
|
||||
#ifdef _WIN32
|
||||
WSACleanup();
|
||||
#endif
|
||||
|
|
|
@ -30,11 +30,11 @@ struct FsRingBufferConfig
|
|||
} fs_config;
|
||||
|
||||
|
||||
s32 cellFsOpen(u32 path_addr, s32 flags, mem32_t fd, mem32_t arg, u64 size)
|
||||
s32 cellFsOpen(u32 path_addr, s32 flags, vm::ptr<be_t<u32>> fd, vm::ptr<be_t<u32>> arg, u64 size)
|
||||
{
|
||||
const std::string& path = Memory.ReadString(path_addr);
|
||||
sys_fs->Log("cellFsOpen(path=\"%s\", flags=0x%x, fd_addr=0x%x, arg_addr=0x%x, size=0x%llx)",
|
||||
path.c_str(), flags, fd.GetAddr(), arg.GetAddr(), size);
|
||||
path.c_str(), flags, fd.addr(), arg.addr(), size);
|
||||
|
||||
const std::string& ppath = path;
|
||||
//ConLog.Warning("path: %s [%s]", ppath.c_str(), path.c_str());
|
||||
|
@ -109,8 +109,9 @@ s32 cellFsOpen(u32 path_addr, s32 flags, mem32_t fd, mem32_t arg, u64 size)
|
|||
return CELL_ENOENT;
|
||||
}
|
||||
|
||||
fd = sys_fs->GetNewId(stream, TYPE_FS_FILE);
|
||||
sys_fs->Notice("\"%s\" opened: fd = %d", path.c_str(), fd.GetValue());
|
||||
u32 id = sys_fs->GetNewId(stream, TYPE_FS_FILE);
|
||||
*fd = id;
|
||||
sys_fs->Notice("\"%s\" opened: fd = %d", path.c_str(), id);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -161,10 +162,10 @@ s32 cellFsClose(u32 fd)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFsOpendir(u32 path_addr, mem32_t fd)
|
||||
s32 cellFsOpendir(u32 path_addr, vm::ptr<be_t<u32>> fd)
|
||||
{
|
||||
const std::string& path = Memory.ReadString(path_addr);
|
||||
sys_fs->Warning("cellFsOpendir(path=\"%s\", fd_addr=0x%x)", path.c_str(), fd.GetAddr());
|
||||
sys_fs->Warning("cellFsOpendir(path=\"%s\", fd_addr=0x%x)", path.c_str(), fd.addr());
|
||||
|
||||
vfsDirBase* dir = Emu.GetVFS().OpenDir(path);
|
||||
if(!dir || !dir->IsOpened())
|
||||
|
@ -173,7 +174,7 @@ s32 cellFsOpendir(u32 path_addr, mem32_t fd)
|
|||
return CELL_ENOENT;
|
||||
}
|
||||
|
||||
fd = sys_fs->GetNewId(dir, TYPE_FS_DIR);
|
||||
*fd = sys_fs->GetNewId(dir, TYPE_FS_DIR);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -502,9 +503,10 @@ s32 cellFsGetFreeSize(u32 path_addr, vm::ptr<be_t<u32>> block_size, vm::ptr<be_t
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFsGetDirectoryEntries(u32 fd, mem_ptr_t<CellFsDirectoryEntry> entries, u32 entries_size, mem32_t data_count)
|
||||
s32 cellFsGetDirectoryEntries(u32 fd, mem_ptr_t<CellFsDirectoryEntry> entries, u32 entries_size, vm::ptr<be_t<u32>> data_count)
|
||||
{
|
||||
sys_fs->Log("cellFsGetDirectoryEntries(fd=%d, entries_addr=0x%x, entries_size = 0x%x, data_count_addr=0x%x)", fd, entries.GetAddr(), entries_size, data_count.GetAddr());
|
||||
sys_fs->Log("cellFsGetDirectoryEntries(fd=%d, entries_addr=0x%x, entries_size = 0x%x, data_count_addr=0x%x)",
|
||||
fd, entries.GetAddr(), entries_size, data_count.addr());
|
||||
|
||||
vfsDirBase* directory;
|
||||
if(!sys_fs->CheckId(fd, directory))
|
||||
|
@ -513,7 +515,7 @@ s32 cellFsGetDirectoryEntries(u32 fd, mem_ptr_t<CellFsDirectoryEntry> entries, u
|
|||
const DirEntryInfo* info = directory->Read();
|
||||
if(info)
|
||||
{
|
||||
data_count = 1;
|
||||
*data_count = 1;
|
||||
Memory.WriteString(entries.GetAddr()+2, info->name);
|
||||
entries->entry_name.d_namlen = info->name.length();
|
||||
entries->entry_name.d_type = (info->flags & DirEntry_TypeFile) ? CELL_FS_TYPE_REGULAR : CELL_FS_TYPE_DIRECTORY;
|
||||
|
@ -532,7 +534,7 @@ s32 cellFsGetDirectoryEntries(u32 fd, mem_ptr_t<CellFsDirectoryEntry> entries, u
|
|||
}
|
||||
else
|
||||
{
|
||||
data_count = 0;
|
||||
*data_count = 0;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
|
@ -649,9 +651,9 @@ s32 cellFsStRead(u32 fd, u32 buf_addr, u64 size, vm::ptr<be_t<u64>> rsize)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFsStReadGetCurrentAddr(u32 fd, mem32_t addr_addr, vm::ptr<be_t<u64>> size)
|
||||
s32 cellFsStReadGetCurrentAddr(u32 fd, vm::ptr<be_t<u32>> addr, vm::ptr<be_t<u64>> size)
|
||||
{
|
||||
sys_fs->Todo("cellFsStReadGetCurrentAddr(fd=%d, addr_addr=0x%x, size_addr = 0x%x)", fd, addr_addr.GetAddr(), size.addr());
|
||||
sys_fs->Todo("cellFsStReadGetCurrentAddr(fd=%d, addr_addr=0x%x, size_addr = 0x%x)", fd, addr.addr(), size.addr());
|
||||
|
||||
vfsStream* file;
|
||||
if(!sys_fs->CheckId(fd, file)) return CELL_ESRCH;
|
||||
|
|
|
@ -124,11 +124,11 @@ struct CellFsRingBuffer
|
|||
};
|
||||
|
||||
// SysCalls
|
||||
s32 cellFsOpen(u32 path_addr, s32 flags, mem32_t fd, mem32_t arg, u64 size);
|
||||
s32 cellFsOpen(u32 path_addr, s32 flags, vm::ptr<be_t<u32>> fd, vm::ptr<be_t<u32>> arg, u64 size);
|
||||
s32 cellFsRead(u32 fd, u32 buf_addr, u64 nbytes, vm::ptr<be_t<u64>> nread);
|
||||
s32 cellFsWrite(u32 fd, u32 buf_addr, u64 nbytes, vm::ptr<be_t<u64>> nwrite);
|
||||
s32 cellFsClose(u32 fd);
|
||||
s32 cellFsOpendir(u32 path_addr, mem32_t fd);
|
||||
s32 cellFsOpendir(u32 path_addr, vm::ptr<be_t<u32>> fd);
|
||||
s32 cellFsReaddir(u32 fd, mem_ptr_t<CellFsDirent> dir, vm::ptr<be_t<u64>> nread);
|
||||
s32 cellFsClosedir(u32 fd);
|
||||
s32 cellFsStat(u32 path_addr, mem_ptr_t<CellFsStat> sb);
|
||||
|
@ -145,7 +145,7 @@ s32 cellFsTruncate(u32 path_addr, u64 size);
|
|||
s32 cellFsFGetBlockSize(u32 fd, vm::ptr<be_t<u64>> sector_size, vm::ptr<be_t<u64>> block_size);
|
||||
s32 cellFsGetBlockSize(u32 path_addr, vm::ptr<be_t<u64>> sector_size, vm::ptr<be_t<u64>> block_size);
|
||||
s32 cellFsGetFreeSize(u32 path_addr, vm::ptr<be_t<u32>> block_size, vm::ptr<be_t<u64>> block_count);
|
||||
s32 cellFsGetDirectoryEntries(u32 fd, mem_ptr_t<CellFsDirectoryEntry> entries, u32 entries_size, mem32_t data_count);
|
||||
s32 cellFsGetDirectoryEntries(u32 fd, mem_ptr_t<CellFsDirectoryEntry> entries, u32 entries_size, vm::ptr<be_t<u32>> data_count);
|
||||
s32 cellFsStReadInit(u32 fd, mem_ptr_t<CellFsRingBuffer> ringbuf);
|
||||
s32 cellFsStReadFinish(u32 fd);
|
||||
s32 cellFsStReadGetRingBuf(u32 fd, mem_ptr_t<CellFsRingBuffer> ringbuf);
|
||||
|
@ -154,7 +154,7 @@ s32 cellFsStReadGetRegid(u32 fd, vm::ptr<be_t<u64>> regid);
|
|||
s32 cellFsStReadStart(u32 fd, u64 offset, u64 size);
|
||||
s32 cellFsStReadStop(u32 fd);
|
||||
s32 cellFsStRead(u32 fd, u32 buf_addr, u64 size, vm::ptr<be_t<u64>> rsize);
|
||||
s32 cellFsStReadGetCurrentAddr(u32 fd, mem32_t addr_addr, vm::ptr<be_t<u64>> size);
|
||||
s32 cellFsStReadGetCurrentAddr(u32 fd, vm::ptr<be_t<u32>> addr_addr, vm::ptr<be_t<u64>> size);
|
||||
s32 cellFsStReadPutCurrentAddr(u32 fd, u32 addr_addr, u64 size);
|
||||
s32 cellFsStReadWait(u32 fd, u64 size);
|
||||
s32 cellFsStReadWaitCallback(u32 fd, u64 size, mem_func_ptr_t<void (*)(int xfd, u64 xsize)> func);
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
SysCallBase sys_cond("sys_cond");
|
||||
|
||||
s32 sys_cond_create(mem32_t cond_id, u32 mutex_id, mem_ptr_t<sys_cond_attribute> attr)
|
||||
s32 sys_cond_create(vm::ptr<be_t<u32>> cond_id, u32 mutex_id, mem_ptr_t<sys_cond_attribute> attr)
|
||||
{
|
||||
sys_cond.Log("sys_cond_create(cond_id_addr=0x%x, mutex_id=%d, attr_addr=0x%x)",
|
||||
cond_id.GetAddr(), mutex_id, attr.GetAddr());
|
||||
cond_id.addr(), mutex_id, attr.GetAddr());
|
||||
|
||||
if (attr->pshared.ToBE() != se32(0x200))
|
||||
{
|
||||
|
@ -33,9 +33,9 @@ s32 sys_cond_create(mem32_t cond_id, u32 mutex_id, mem_ptr_t<sys_cond_attribute>
|
|||
|
||||
Cond* cond = new Cond(mutex, attr->name_u64);
|
||||
u32 id = sys_cond.GetNewId(cond, TYPE_COND);
|
||||
cond_id = id;
|
||||
*cond_id = id;
|
||||
mutex->cond_count++;
|
||||
sys_cond.Warning("*** condition created [%s] (mutex_id=%d): id = %d", std::string(attr->name, 8).c_str(), mutex_id, cond_id.GetValue());
|
||||
sys_cond.Warning("*** condition created [%s] (mutex_id=%d): id = %d", std::string(attr->name, 8).c_str(), mutex_id, id);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ struct Cond
|
|||
};
|
||||
|
||||
// SysCalls
|
||||
s32 sys_cond_create(mem32_t cond_id, u32 mutex_id, mem_ptr_t<sys_cond_attribute> attr);
|
||||
s32 sys_cond_create(vm::ptr<be_t<u32>> cond_id, u32 mutex_id, mem_ptr_t<sys_cond_attribute> attr);
|
||||
s32 sys_cond_destroy(u32 cond_id);
|
||||
s32 sys_cond_wait(u32 cond_id, u64 timeout);
|
||||
s32 sys_cond_signal(u32 cond_id);
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
|
||||
SysCallBase sys_event("sys_event");
|
||||
|
||||
s32 sys_event_queue_create(mem32_t equeue_id, mem_ptr_t<sys_event_queue_attr> attr, u64 event_queue_key, int size)
|
||||
s32 sys_event_queue_create(vm::ptr<be_t<u32>> equeue_id, mem_ptr_t<sys_event_queue_attr> attr, u64 event_queue_key, int size)
|
||||
{
|
||||
sys_event.Warning("sys_event_queue_create(equeue_id_addr=0x%x, attr_addr=0x%x, event_queue_key=0x%llx, size=%d)",
|
||||
equeue_id.GetAddr(), attr.GetAddr(), event_queue_key, size);
|
||||
equeue_id.addr(), attr.GetAddr(), event_queue_key, size);
|
||||
|
||||
if(size <= 0 || size > 127)
|
||||
{
|
||||
|
@ -49,9 +49,10 @@ s32 sys_event_queue_create(mem32_t equeue_id, mem_ptr_t<sys_event_queue_attr> at
|
|||
return CELL_EAGAIN;
|
||||
}
|
||||
|
||||
equeue_id = sys_event.GetNewId(eq, TYPE_EVENT_QUEUE);
|
||||
u32 id = sys_event.GetNewId(eq, TYPE_EVENT_QUEUE);
|
||||
*equeue_id = id;
|
||||
sys_event.Warning("*** event_queue created [%s] (protocol=0x%x, type=0x%x): id = %d",
|
||||
std::string(attr->name, 8).c_str(), (u32)attr->protocol, (int)attr->type, equeue_id.GetValue());
|
||||
std::string(attr->name, 8).c_str(), (u32)attr->protocol, (int)attr->type, id);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -101,10 +102,10 @@ s32 sys_event_queue_destroy(u32 equeue_id, int mode)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_event_queue_tryreceive(u32 equeue_id, mem_ptr_t<sys_event_data> event_array, int size, mem32_t number)
|
||||
s32 sys_event_queue_tryreceive(u32 equeue_id, mem_ptr_t<sys_event_data> event_array, int size, vm::ptr<be_t<u32>> number)
|
||||
{
|
||||
sys_event.Todo("sys_event_queue_tryreceive(equeue_id=%d, event_array_addr=0x%x, size=%d, number_addr=0x%x)",
|
||||
equeue_id, event_array.GetAddr(), size, number.GetAddr());
|
||||
equeue_id, event_array.GetAddr(), size, number.addr());
|
||||
|
||||
EventQueue* eq;
|
||||
if (!Emu.GetIdManager().GetIDData(equeue_id, eq))
|
||||
|
@ -119,7 +120,7 @@ s32 sys_event_queue_tryreceive(u32 equeue_id, mem_ptr_t<sys_event_data> event_ar
|
|||
|
||||
if (size == 0)
|
||||
{
|
||||
number = 0;
|
||||
*number = 0;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -129,12 +130,12 @@ s32 sys_event_queue_tryreceive(u32 equeue_id, mem_ptr_t<sys_event_data> event_ar
|
|||
eq->owner.lock(tid);
|
||||
if (eq->sq.list.size())
|
||||
{
|
||||
number = 0;
|
||||
*number = 0;
|
||||
eq->owner.unlock(tid);
|
||||
eq->sq.m_mutex.unlock();
|
||||
return CELL_OK;
|
||||
}
|
||||
number = eq->events.pop_all((sys_event_data*)(Memory + event_array.GetAddr()), size);
|
||||
*number = eq->events.pop_all((sys_event_data*)(Memory + event_array.GetAddr()), size);
|
||||
eq->owner.unlock(tid);
|
||||
eq->sq.m_mutex.unlock();
|
||||
return CELL_OK;
|
||||
|
@ -224,10 +225,10 @@ s32 sys_event_queue_drain(u32 equeue_id)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_event_port_create(mem32_t eport_id, int port_type, u64 name)
|
||||
s32 sys_event_port_create(vm::ptr<be_t<u32>> eport_id, int port_type, u64 name)
|
||||
{
|
||||
sys_event.Warning("sys_event_port_create(eport_id_addr=0x%x, port_type=0x%x, name=0x%llx)",
|
||||
eport_id.GetAddr(), port_type, name);
|
||||
eport_id.addr(), port_type, name);
|
||||
|
||||
if (port_type != SYS_EVENT_PORT_LOCAL)
|
||||
{
|
||||
|
@ -238,7 +239,7 @@ s32 sys_event_port_create(mem32_t eport_id, int port_type, u64 name)
|
|||
EventPort* eport = new EventPort();
|
||||
u32 id = sys_event.GetNewId(eport, TYPE_EVENT_PORT);
|
||||
eport->name = name ? name : ((u64)process_getpid() << 32) | (u64)id;
|
||||
eport_id = id;
|
||||
*eport_id = id;
|
||||
sys_event.Warning("*** sys_event_port created: id = %d", id);
|
||||
|
||||
return CELL_OK;
|
||||
|
|
|
@ -162,8 +162,9 @@ public:
|
|||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
for (u32 i = 0; i < data.size(); i++)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock2(data[i]->m_mutex);
|
||||
data[i]->eq = nullptr; // force all ports to disconnect
|
||||
// TODO: force all ports to disconnect
|
||||
//std::lock_guard<std::mutex> lock2(data[i]->m_mutex);
|
||||
//data[i]->eq = nullptr;
|
||||
}
|
||||
data.clear();
|
||||
}
|
||||
|
@ -215,13 +216,13 @@ struct EventQueue
|
|||
};
|
||||
|
||||
// SysCalls
|
||||
s32 sys_event_queue_create(mem32_t equeue_id, mem_ptr_t<sys_event_queue_attr> attr, u64 event_queue_key, int size);
|
||||
s32 sys_event_queue_create(vm::ptr<be_t<u32>> equeue_id, mem_ptr_t<sys_event_queue_attr> attr, u64 event_queue_key, int size);
|
||||
s32 sys_event_queue_destroy(u32 equeue_id, int mode);
|
||||
s32 sys_event_queue_receive(u32 equeue_id, mem_ptr_t<sys_event_data> event, u64 timeout);
|
||||
s32 sys_event_queue_tryreceive(u32 equeue_id, mem_ptr_t<sys_event_data> event_array, int size, mem32_t number);
|
||||
s32 sys_event_queue_tryreceive(u32 equeue_id, mem_ptr_t<sys_event_data> event_array, int size, vm::ptr<be_t<u32>> number);
|
||||
s32 sys_event_queue_drain(u32 event_queue_id);
|
||||
|
||||
s32 sys_event_port_create(mem32_t eport_id, int port_type, u64 name);
|
||||
s32 sys_event_port_create(vm::ptr<be_t<u32>> eport_id, int port_type, u64 name);
|
||||
s32 sys_event_port_destroy(u32 eport_id);
|
||||
s32 sys_event_port_connect_local(u32 event_port_id, u32 event_queue_id);
|
||||
s32 sys_event_port_disconnect(u32 eport_id);
|
||||
|
|
|
@ -37,10 +37,10 @@ u32 EventFlag::check()
|
|||
return target;
|
||||
}
|
||||
|
||||
s32 sys_event_flag_create(mem32_t eflag_id, mem_ptr_t<sys_event_flag_attr> attr, u64 init)
|
||||
s32 sys_event_flag_create(vm::ptr<be_t<u32>> eflag_id, mem_ptr_t<sys_event_flag_attr> attr, u64 init)
|
||||
{
|
||||
sys_event_flag.Warning("sys_event_flag_create(eflag_id_addr=0x%x, attr_addr=0x%x, init=0x%llx)",
|
||||
eflag_id.GetAddr(), attr.GetAddr(), init);
|
||||
eflag_id.addr(), attr.GetAddr(), init);
|
||||
|
||||
switch (attr->protocol.ToBE())
|
||||
{
|
||||
|
@ -63,10 +63,10 @@ s32 sys_event_flag_create(mem32_t eflag_id, mem_ptr_t<sys_event_flag_attr> attr,
|
|||
default: return CELL_EINVAL;
|
||||
}
|
||||
|
||||
eflag_id = sys_event_flag.GetNewId(new EventFlag(init, (u32)attr->protocol, (int)attr->type), TYPE_EVENT_FLAG);
|
||||
|
||||
u32 id = sys_event_flag.GetNewId(new EventFlag(init, (u32)attr->protocol, (int)attr->type), TYPE_EVENT_FLAG);
|
||||
*eflag_id = id;
|
||||
sys_event_flag.Warning("*** event_flag created [%s] (protocol=0x%x, type=0x%x): id = %d",
|
||||
std::string(attr->name, 8).c_str(), (u32)attr->protocol, (int)attr->type, eflag_id.GetValue());
|
||||
std::string(attr->name, 8).c_str(), (u32)attr->protocol, (int)attr->type, id);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -307,9 +307,9 @@ s32 sys_event_flag_clear(u32 eflag_id, u64 bitptn)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_event_flag_cancel(u32 eflag_id, mem32_t num)
|
||||
s32 sys_event_flag_cancel(u32 eflag_id, vm::ptr<be_t<u32>> num)
|
||||
{
|
||||
sys_event_flag.Log("sys_event_flag_cancel(eflag_id=%d, num_addr=0x%x)", eflag_id, num.GetAddr());
|
||||
sys_event_flag.Log("sys_event_flag_cancel(eflag_id=%d, num_addr=0x%x)", eflag_id, num.addr());
|
||||
|
||||
EventFlag* ef;
|
||||
if (!sys_event_flag.CheckId(eflag_id, ef)) return CELL_ESRCH;
|
||||
|
@ -337,7 +337,7 @@ s32 sys_event_flag_cancel(u32 eflag_id, mem32_t num)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
if (num.GetAddr()) num = (u32)tids.size();
|
||||
if (num) *num = (u32)tids.size();
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -50,11 +50,11 @@ struct EventFlag
|
|||
u32 check();
|
||||
};
|
||||
|
||||
s32 sys_event_flag_create(mem32_t eflag_id, mem_ptr_t<sys_event_flag_attr> attr, u64 init);
|
||||
s32 sys_event_flag_create(vm::ptr<be_t<u32>> eflag_id, mem_ptr_t<sys_event_flag_attr> attr, u64 init);
|
||||
s32 sys_event_flag_destroy(u32 eflag_id);
|
||||
s32 sys_event_flag_wait(u32 eflag_id, u64 bitptn, u32 mode, vm::ptr<be_t<u64>> result, u64 timeout);
|
||||
s32 sys_event_flag_trywait(u32 eflag_id, u64 bitptn, u32 mode, vm::ptr<be_t<u64>> result);
|
||||
s32 sys_event_flag_set(u32 eflag_id, u64 bitptn);
|
||||
s32 sys_event_flag_clear(u32 eflag_id, u64 bitptn);
|
||||
s32 sys_event_flag_cancel(u32 eflag_id, mem32_t num);
|
||||
s32 sys_event_flag_cancel(u32 eflag_id, vm::ptr<be_t<u32>> num);
|
||||
s32 sys_event_flag_get(u32 eflag_id, vm::ptr<be_t<u64>> flags);
|
|
@ -37,9 +37,9 @@ s32 sys_interrupt_tag_destroy(u32 intrtag)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_interrupt_thread_establish(mem32_t ih, u32 intrtag, u64 intrthread, u64 arg)
|
||||
s32 sys_interrupt_thread_establish(vm::ptr<be_t<u32>> ih, u32 intrtag, u64 intrthread, u64 arg)
|
||||
{
|
||||
sys_interrupt.Warning("sys_interrupt_thread_establish(ih_addr=0x%x, intrtag=%d, intrthread=%lld, arg=0x%llx)", ih.GetAddr(), intrtag, intrthread, arg);
|
||||
sys_interrupt.Warning("sys_interrupt_thread_establish(ih_addr=0x%x, intrtag=%d, intrthread=%lld, arg=0x%llx)", ih.addr(), intrtag, intrthread, arg);
|
||||
|
||||
u32 id = intrtag & 0xff;
|
||||
u32 class_id = intrtag >> 8;
|
||||
|
@ -71,7 +71,7 @@ s32 sys_interrupt_thread_establish(mem32_t ih, u32 intrtag, u64 intrthread, u64
|
|||
return CELL_EAGAIN;
|
||||
}
|
||||
|
||||
ih = (t->m_intrtag[class_id].thread = intrthread);
|
||||
*ih = (t->m_intrtag[class_id].thread = intrthread);
|
||||
it->m_interrupt_arg = arg;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
// SysCalls
|
||||
s32 sys_interrupt_tag_destroy(u32 intrtag);
|
||||
s32 sys_interrupt_thread_establish(mem32_t ih, u32 intrtag, u64 intrthread, u64 arg);
|
||||
s32 sys_interrupt_thread_establish(vm::ptr<be_t<u32>> ih, u32 intrtag, u64 intrthread, u64 arg);
|
||||
s32 sys_interrupt_thread_disestablish(u32 ih);
|
||||
void sys_interrupt_thread_eoi();
|
||||
|
|
|
@ -108,9 +108,9 @@ s32 sys_memory_get_user_memory_size(mem_ptr_t<sys_memory_info_t> mem_info)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_memory_container_create(mem32_t cid, u32 yield_size)
|
||||
s32 sys_memory_container_create(vm::ptr<be_t<u32>> cid, u32 yield_size)
|
||||
{
|
||||
sys_memory.Warning("sys_memory_container_create(cid_addr=0x%x, yield_size=0x%x)", cid.GetAddr(), yield_size);
|
||||
sys_memory.Warning("sys_memory_container_create(cid_addr=0x%x, yield_size=0x%x)", cid.addr(), yield_size);
|
||||
|
||||
yield_size &= ~0xfffff; //round down to 1 MB granularity
|
||||
u32 addr = (u32)Memory.Alloc(yield_size, 0x100000); //1 MB alignment
|
||||
|
@ -120,9 +120,10 @@ s32 sys_memory_container_create(mem32_t cid, u32 yield_size)
|
|||
|
||||
// Wrap the allocated memory in a memory container.
|
||||
MemoryContainerInfo *ct = new MemoryContainerInfo(addr, yield_size);
|
||||
cid = sys_memory.GetNewId(ct, TYPE_MEM);
|
||||
u32 id = sys_memory.GetNewId(ct, TYPE_MEM);
|
||||
*cid = id;
|
||||
|
||||
sys_memory.Warning("*** memory_container created(addr=0x%llx): id = %d", addr, cid.GetValue());
|
||||
sys_memory.Warning("*** memory_container created(addr=0x%llx): id = %d", addr, id);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -48,6 +48,6 @@ s32 sys_memory_allocate_from_container(u32 size, u32 cid, u32 flags, u32 alloc_a
|
|||
s32 sys_memory_free(u32 start_addr);
|
||||
s32 sys_memory_get_page_attribute(u32 addr, mem_ptr_t<sys_page_attr_t> attr);
|
||||
s32 sys_memory_get_user_memory_size(mem_ptr_t<sys_memory_info_t> mem_info);
|
||||
s32 sys_memory_container_create(mem32_t cid, u32 yield_size);
|
||||
s32 sys_memory_container_create(vm::ptr<be_t<u32>> cid, u32 yield_size);
|
||||
s32 sys_memory_container_destroy(u32 cid);
|
||||
s32 sys_memory_container_get_size(mem_ptr_t<sys_memory_info_t> mem_info, u32 cid);
|
||||
|
|
|
@ -53,9 +53,9 @@ s32 sys_mmapper_allocate_fixed_address()
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_mmapper_allocate_memory(u32 size, u64 flags, mem32_t mem_id)
|
||||
s32 sys_mmapper_allocate_memory(u32 size, u64 flags, vm::ptr<be_t<u32>> mem_id)
|
||||
{
|
||||
sys_mmapper.Warning("sys_mmapper_allocate_memory(size=0x%x, flags=0x%llx, mem_id_addr=0x%x)", size, flags, mem_id.GetAddr());
|
||||
sys_mmapper.Warning("sys_mmapper_allocate_memory(size=0x%x, flags=0x%llx, mem_id_addr=0x%x)", size, flags, mem_id.addr());
|
||||
|
||||
// Check page granularity.
|
||||
u32 addr;
|
||||
|
@ -81,15 +81,15 @@ s32 sys_mmapper_allocate_memory(u32 size, u64 flags, mem32_t mem_id)
|
|||
return CELL_ENOMEM;
|
||||
|
||||
// Generate a new mem ID.
|
||||
mem_id = sys_mmapper.GetNewId(new mmapper_info(addr, size, flags));
|
||||
*mem_id = sys_mmapper.GetNewId(new mmapper_info(addr, size, flags));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_mmapper_allocate_memory_from_container(u32 size, u32 cid, u64 flags, mem32_t mem_id)
|
||||
s32 sys_mmapper_allocate_memory_from_container(u32 size, u32 cid, u64 flags, vm::ptr<be_t<u32>> mem_id)
|
||||
{
|
||||
sys_mmapper.Warning("sys_mmapper_allocate_memory_from_container(size=0x%x, cid=%d, flags=0x%llx, mem_id_addr=0x%x)",
|
||||
size, cid, flags, mem_id.GetAddr());
|
||||
size, cid, flags, mem_id.addr());
|
||||
|
||||
// Check if this container ID is valid.
|
||||
MemoryContainerInfo* ct;
|
||||
|
@ -120,7 +120,7 @@ s32 sys_mmapper_allocate_memory_from_container(u32 size, u32 cid, u64 flags, mem
|
|||
ct->size = size;
|
||||
|
||||
// Generate a new mem ID.
|
||||
mem_id = sys_mmapper.GetNewId(new mmapper_info(ct->addr, ct->size, flags), TYPE_MEM);
|
||||
*mem_id = sys_mmapper.GetNewId(new mmapper_info(ct->addr, ct->size, flags), TYPE_MEM);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -24,8 +24,8 @@ struct mmapper_info
|
|||
// SysCalls
|
||||
s32 sys_mmapper_allocate_address(u32 size, u64 flags, u32 alignment, u32 alloc_addr);
|
||||
s32 sys_mmapper_allocate_fixed_address();
|
||||
s32 sys_mmapper_allocate_memory(u32 size, u64 flags, mem32_t mem_id);
|
||||
s32 sys_mmapper_allocate_memory_from_container(u32 size, u32 cid, u64 flags, mem32_t mem_id);
|
||||
s32 sys_mmapper_allocate_memory(u32 size, u64 flags, vm::ptr<be_t<u32>> mem_id);
|
||||
s32 sys_mmapper_allocate_memory_from_container(u32 size, u32 cid, u64 flags, vm::ptr<be_t<u32>> mem_id);
|
||||
s32 sys_mmapper_change_address_access_right(u32 start_addr, u64 flags);
|
||||
s32 sys_mmapper_free_address(u32 start_addr);
|
||||
s32 sys_mmapper_free_memory(u32 mem_id);
|
||||
|
|
|
@ -26,9 +26,9 @@ Mutex::~Mutex()
|
|||
m_queue.m_mutex.unlock();
|
||||
}
|
||||
|
||||
s32 sys_mutex_create(mem32_t mutex_id, mem_ptr_t<sys_mutex_attribute> attr)
|
||||
s32 sys_mutex_create(vm::ptr<be_t<u32>> mutex_id, mem_ptr_t<sys_mutex_attribute> attr)
|
||||
{
|
||||
sys_mutex.Log("sys_mutex_create(mutex_id_addr=0x%x, attr_addr=0x%x)", mutex_id.GetAddr(), attr.GetAddr());
|
||||
sys_mutex.Log("sys_mutex_create(mutex_id_addr=0x%x, attr_addr=0x%x)", mutex_id.addr(), attr.GetAddr());
|
||||
|
||||
switch (attr->protocol.ToBE())
|
||||
{
|
||||
|
@ -58,11 +58,10 @@ s32 sys_mutex_create(mem32_t mutex_id, mem_ptr_t<sys_mutex_attribute> attr)
|
|||
u32 id = sys_mutex.GetNewId(mutex, TYPE_MUTEX);
|
||||
mutex->m_mutex.lock(tid);
|
||||
mutex->id = id;
|
||||
mutex_id = id;
|
||||
*mutex_id = id;
|
||||
mutex->m_mutex.unlock(tid);
|
||||
sys_mutex.Warning("*** mutex created [%s] (protocol=0x%x, recursive=%s): id = %d",
|
||||
std::string(attr->name, 8).c_str(), (u32) attr->protocol,
|
||||
(is_recursive ? "true" : "false"), mutex_id.GetValue());
|
||||
std::string(attr->name, 8).c_str(), (u32) attr->protocol, (is_recursive ? "true" : "false"), id);
|
||||
|
||||
// TODO: unlock mutex when owner thread does exit
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ struct Mutex
|
|||
};
|
||||
|
||||
// SysCalls
|
||||
s32 sys_mutex_create(mem32_t mutex_id, mem_ptr_t<sys_mutex_attribute> attr);
|
||||
s32 sys_mutex_create(vm::ptr<be_t<u32>> mutex_id, mem_ptr_t<sys_mutex_attribute> attr);
|
||||
s32 sys_mutex_destroy(u32 mutex_id);
|
||||
s32 sys_mutex_lock(u32 mutex_id, u64 timeout);
|
||||
s32 sys_mutex_trylock(u32 mutex_id);
|
||||
|
|
|
@ -133,32 +133,32 @@ void sys_game_process_exitspawn2(
|
|||
return;
|
||||
}
|
||||
|
||||
s32 sys_process_get_number_of_object(u32 object, mem32_t nump)
|
||||
s32 sys_process_get_number_of_object(u32 object, vm::ptr<be_t<u32>> nump)
|
||||
{
|
||||
sys_process.Warning("sys_process_get_number_of_object(object=%d, nump_addr=0x%x)",
|
||||
object, nump.GetAddr());
|
||||
object, nump.addr());
|
||||
|
||||
switch(object)
|
||||
{
|
||||
case SYS_MEM_OBJECT: nump = Emu.GetIdManager().GetTypeCount(TYPE_MEM); break;
|
||||
case SYS_MUTEX_OBJECT: nump = Emu.GetIdManager().GetTypeCount(TYPE_MUTEX); break;
|
||||
case SYS_COND_OBJECT: nump = Emu.GetIdManager().GetTypeCount(TYPE_COND); break;
|
||||
case SYS_RWLOCK_OBJECT: nump = Emu.GetIdManager().GetTypeCount(TYPE_RWLOCK); break;
|
||||
case SYS_INTR_TAG_OBJECT: nump = Emu.GetIdManager().GetTypeCount(TYPE_INTR_TAG); break;
|
||||
case SYS_INTR_SERVICE_HANDLE_OBJECT: nump = Emu.GetIdManager().GetTypeCount(TYPE_INTR_SERVICE_HANDLE); break;
|
||||
case SYS_EVENT_QUEUE_OBJECT: nump = Emu.GetIdManager().GetTypeCount(TYPE_EVENT_QUEUE); break;
|
||||
case SYS_EVENT_PORT_OBJECT: nump = Emu.GetIdManager().GetTypeCount(TYPE_EVENT_PORT); break;
|
||||
case SYS_TRACE_OBJECT: nump = Emu.GetIdManager().GetTypeCount(TYPE_TRACE); break;
|
||||
case SYS_SPUIMAGE_OBJECT: nump = Emu.GetIdManager().GetTypeCount(TYPE_SPUIMAGE); break;
|
||||
case SYS_PRX_OBJECT: nump = Emu.GetIdManager().GetTypeCount(TYPE_PRX); break;
|
||||
case SYS_SPUPORT_OBJECT: nump = Emu.GetIdManager().GetTypeCount(TYPE_SPUPORT); break;
|
||||
case SYS_LWMUTEX_OBJECT: nump = Emu.GetIdManager().GetTypeCount(TYPE_LWMUTEX); break;
|
||||
case SYS_TIMER_OBJECT: nump = Emu.GetIdManager().GetTypeCount(TYPE_TIMER); break;
|
||||
case SYS_SEMAPHORE_OBJECT: nump = Emu.GetIdManager().GetTypeCount(TYPE_SEMAPHORE); break;
|
||||
case SYS_LWCOND_OBJECT: nump = Emu.GetIdManager().GetTypeCount(TYPE_LWCOND); break;
|
||||
case SYS_EVENT_FLAG_OBJECT: nump = Emu.GetIdManager().GetTypeCount(TYPE_EVENT_FLAG); break;
|
||||
case SYS_MEM_OBJECT: *nump = Emu.GetIdManager().GetTypeCount(TYPE_MEM); break;
|
||||
case SYS_MUTEX_OBJECT: *nump = Emu.GetIdManager().GetTypeCount(TYPE_MUTEX); break;
|
||||
case SYS_COND_OBJECT: *nump = Emu.GetIdManager().GetTypeCount(TYPE_COND); break;
|
||||
case SYS_RWLOCK_OBJECT: *nump = Emu.GetIdManager().GetTypeCount(TYPE_RWLOCK); break;
|
||||
case SYS_INTR_TAG_OBJECT: *nump = Emu.GetIdManager().GetTypeCount(TYPE_INTR_TAG); break;
|
||||
case SYS_INTR_SERVICE_HANDLE_OBJECT: *nump = Emu.GetIdManager().GetTypeCount(TYPE_INTR_SERVICE_HANDLE); break;
|
||||
case SYS_EVENT_QUEUE_OBJECT: *nump = Emu.GetIdManager().GetTypeCount(TYPE_EVENT_QUEUE); break;
|
||||
case SYS_EVENT_PORT_OBJECT: *nump = Emu.GetIdManager().GetTypeCount(TYPE_EVENT_PORT); break;
|
||||
case SYS_TRACE_OBJECT: *nump = Emu.GetIdManager().GetTypeCount(TYPE_TRACE); break;
|
||||
case SYS_SPUIMAGE_OBJECT: *nump = Emu.GetIdManager().GetTypeCount(TYPE_SPUIMAGE); break;
|
||||
case SYS_PRX_OBJECT: *nump = Emu.GetIdManager().GetTypeCount(TYPE_PRX); break;
|
||||
case SYS_SPUPORT_OBJECT: *nump = Emu.GetIdManager().GetTypeCount(TYPE_SPUPORT); break;
|
||||
case SYS_LWMUTEX_OBJECT: *nump = Emu.GetIdManager().GetTypeCount(TYPE_LWMUTEX); break;
|
||||
case SYS_TIMER_OBJECT: *nump = Emu.GetIdManager().GetTypeCount(TYPE_TIMER); break;
|
||||
case SYS_SEMAPHORE_OBJECT: *nump = Emu.GetIdManager().GetTypeCount(TYPE_SEMAPHORE); break;
|
||||
case SYS_LWCOND_OBJECT: *nump = Emu.GetIdManager().GetTypeCount(TYPE_LWCOND); break;
|
||||
case SYS_EVENT_FLAG_OBJECT: *nump = Emu.GetIdManager().GetTypeCount(TYPE_EVENT_FLAG); break;
|
||||
case SYS_FS_FD_OBJECT:
|
||||
nump = Emu.GetIdManager().GetTypeCount(TYPE_FS_FILE) + Emu.GetIdManager().GetTypeCount(TYPE_FS_DIR);
|
||||
*nump = Emu.GetIdManager().GetTypeCount(TYPE_FS_FILE) + Emu.GetIdManager().GetTypeCount(TYPE_FS_DIR);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -168,10 +168,10 @@ s32 sys_process_get_number_of_object(u32 object, mem32_t nump)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_process_get_id(u32 object, vm::ptr<be_t<u32>> buffer, u32 size, mem32_t set_size)
|
||||
s32 sys_process_get_id(u32 object, vm::ptr<be_t<u32>> buffer, u32 size, vm::ptr<be_t<u32>> set_size)
|
||||
{
|
||||
sys_process.Todo("sys_process_get_id(object=%d, buffer_addr=0x%x, size=%d, set_size_addr=0x%x)",
|
||||
object, buffer.addr(), size, set_size.GetAddr());
|
||||
object, buffer.addr(), size, set_size.addr());
|
||||
|
||||
switch(object)
|
||||
{
|
||||
|
@ -181,7 +181,7 @@ s32 sys_process_get_id(u32 object, vm::ptr<be_t<u32>> buffer, u32 size, mem32_t
|
|||
const auto& objects = Emu.GetIdManager().GetTypeIDs(type); \
|
||||
for(auto id=objects.begin(); i<size && id!=objects.end(); id++, i++) \
|
||||
buffer[i] = *id; \
|
||||
set_size = i; \
|
||||
*set_size = i; \
|
||||
}
|
||||
|
||||
case SYS_MEM_OBJECT: ADD_OBJECTS(TYPE_MEM); break;
|
||||
|
@ -239,9 +239,9 @@ s32 process_get_sdk_version(u32 pid, s32& ver)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_process_get_sdk_version(u32 pid, mem32_t version)
|
||||
s32 sys_process_get_sdk_version(u32 pid, vm::ptr<be_t<s32>> version)
|
||||
{
|
||||
sys_process.Warning("sys_process_get_sdk_version(pid=%d, version_addr=0x%x)", pid, version.GetAddr());
|
||||
sys_process.Warning("sys_process_get_sdk_version(pid=%d, version_addr=0x%x)", pid, version.addr());
|
||||
|
||||
s32 sdk_ver;
|
||||
s32 ret = process_get_sdk_version(pid, sdk_ver);
|
||||
|
@ -251,7 +251,7 @@ s32 sys_process_get_sdk_version(u32 pid, mem32_t version)
|
|||
}
|
||||
else
|
||||
{
|
||||
version = sdk_ver;
|
||||
*version = sdk_ver;
|
||||
return CELL_OK;
|
||||
}
|
||||
}
|
||||
|
@ -262,10 +262,10 @@ s32 sys_process_kill(u32 pid)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_process_wait_for_child(u32 pid, mem32_t status, u64 unk)
|
||||
s32 sys_process_wait_for_child(u32 pid, vm::ptr<be_t<u32>> status, u64 unk)
|
||||
{
|
||||
sys_process.Todo("sys_process_wait_for_child(pid=%d, status_addr=0x%x, unk=0x%llx",
|
||||
pid, status.GetAddr(), unk);
|
||||
pid, status.addr(), unk);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,14 +30,14 @@ s32 process_get_sdk_version(u32 pid, s32& ver);
|
|||
// SysCalls
|
||||
s32 sys_process_getpid();
|
||||
s32 sys_process_getppid();
|
||||
s32 sys_process_get_number_of_object(u32 object, mem32_t nump);
|
||||
s32 sys_process_get_id(u32 object, vm::ptr<be_t<u32>> buffer, u32 size, mem32_t set_size);
|
||||
s32 sys_process_get_number_of_object(u32 object, vm::ptr<be_t<u32>> nump);
|
||||
s32 sys_process_get_id(u32 object, vm::ptr<be_t<u32>> buffer, u32 size, vm::ptr<be_t<u32>> set_size);
|
||||
s32 sys_process_get_paramsfo(vm::ptr<u8> buffer);
|
||||
s32 sys_process_get_sdk_version(u32 pid, mem32_t version);
|
||||
s32 sys_process_get_sdk_version(u32 pid, vm::ptr<be_t<s32>> version);
|
||||
s32 sys_process_get_status(u64 unk);
|
||||
s32 sys_process_exit(s32 errorcode);
|
||||
s32 sys_process_kill(u32 pid);
|
||||
s32 sys_process_wait_for_child(u32 pid, mem32_t status, u64 unk);
|
||||
s32 sys_process_wait_for_child(u32 pid, vm::ptr<be_t<u32>> status, u64 unk);
|
||||
s32 sys_process_wait_for_child2(u64 unk1, u64 unk2, u64 unk3, u64 unk4, u64 unk5, u64 unk6);
|
||||
s32 sys_process_detach_child(u64 unk);
|
||||
void sys_game_process_exitspawn(u32 path_addr, u32 argv_addr, u32 envp_addr,
|
||||
|
|
|
@ -61,10 +61,10 @@ s32 sys_prx_load_module_on_memcontainer_by_fd()
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_prx_start_module(s32 id, u32 args, u32 argp_addr, mem32_t modres, u64 flags, mem_ptr_t<sys_prx_start_module_option_t> pOpt)
|
||||
s32 sys_prx_start_module(s32 id, u32 args, u32 argp_addr, vm::ptr<be_t<u32>> modres, u64 flags, mem_ptr_t<sys_prx_start_module_option_t> pOpt)
|
||||
{
|
||||
sys_prx.Todo("sys_prx_start_module(id=%d, args=%d, argp_addr=0x%x, modres_addr=0x%x, flags=0x%llx, pOpt=0x%x)",
|
||||
id, args, argp_addr, modres.GetAddr(), flags, pOpt.GetAddr());
|
||||
id, args, argp_addr, modres.addr(), flags, pOpt.GetAddr());
|
||||
|
||||
sys_prx_t* prx;
|
||||
if (!Emu.GetIdManager().GetIDData(id, prx))
|
||||
|
@ -76,10 +76,10 @@ s32 sys_prx_start_module(s32 id, u32 args, u32 argp_addr, mem32_t modres, u64 fl
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_prx_stop_module(s32 id, u32 args, u32 argp_addr, mem32_t modres, u64 flags, mem_ptr_t<sys_prx_stop_module_option_t> pOpt)
|
||||
s32 sys_prx_stop_module(s32 id, u32 args, u32 argp_addr, vm::ptr<be_t<u32>> modres, u64 flags, mem_ptr_t<sys_prx_stop_module_option_t> pOpt)
|
||||
{
|
||||
sys_prx.Todo("sys_prx_stop_module(id=%d, args=%d, argp_addr=0x%x, modres_addr=0x%x, flags=0x%llx, pOpt=0x%x)",
|
||||
id, args, argp_addr, modres.GetAddr(), flags, pOpt.GetAddr());
|
||||
id, args, argp_addr, modres.addr(), flags, pOpt.GetAddr());
|
||||
|
||||
sys_prx_t* prx;
|
||||
if (!Emu.GetIdManager().GetIDData(id, prx))
|
||||
|
|
|
@ -69,8 +69,8 @@ s32 sys_prx_load_module(u32 path_addr, u64 flags, mem_ptr_t<sys_prx_load_module_
|
|||
s32 sys_prx_load_module_on_memcontainer();
|
||||
s32 sys_prx_load_module_by_fd();
|
||||
s32 sys_prx_load_module_on_memcontainer_by_fd();
|
||||
s32 sys_prx_start_module(s32 id, u32 args, u32 argp_addr, mem32_t modres, u64 flags, mem_ptr_t<sys_prx_start_module_option_t> pOpt);
|
||||
s32 sys_prx_stop_module(s32 id, u32 args, u32 argp_addr, mem32_t modres, u64 flags, mem_ptr_t<sys_prx_stop_module_option_t> pOpt);
|
||||
s32 sys_prx_start_module(s32 id, u32 args, u32 argp_addr, vm::ptr<be_t<u32>> modres, u64 flags, mem_ptr_t<sys_prx_start_module_option_t> pOpt);
|
||||
s32 sys_prx_stop_module(s32 id, u32 args, u32 argp_addr, vm::ptr<be_t<u32>> modres, u64 flags, mem_ptr_t<sys_prx_stop_module_option_t> pOpt);
|
||||
s32 sys_prx_unload_module(s32 id, u64 flags, mem_ptr_t<sys_prx_unload_module_option_t> pOpt);
|
||||
s32 sys_prx_get_module_list();
|
||||
s32 sys_prx_get_my_module_id();
|
||||
|
|
|
@ -29,10 +29,10 @@ s32 sys_rsx_device_close()
|
|||
* @param a6 (IN): E.g. Immediate value passed in cellGcmSys is 16.
|
||||
* @param a7 (IN): E.g. Immediate value passed in cellGcmSys is 8.
|
||||
*/
|
||||
s32 sys_rsx_memory_allocate(mem32_t mem_handle, mem32_t mem_addr, u32 size, u64 flags, u64 a5, u64 a6, u64 a7)
|
||||
s32 sys_rsx_memory_allocate(vm::ptr<be_t<u32>> mem_handle, vm::ptr<be_t<u32>> mem_addr, u32 size, u64 flags, u64 a5, u64 a6, u64 a7)
|
||||
{
|
||||
sys_rsx.Todo("sys_rsx_memory_allocate(mem_handle_addr=0x%x, local_mem_addr=0x%x, size=0x%x, flags=0x%x, a5=%d, a6=%d, a7=%d)",
|
||||
mem_handle.GetAddr(), mem_addr.GetAddr(), size, flags, a5, a6, a7);
|
||||
mem_handle.addr(), mem_addr.addr(), size, flags, a5, a6, a7);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -55,10 +55,10 @@ s32 sys_rsx_memory_free(u32 mem_handle)
|
|||
* @param mem_ctx (IN): mem_ctx given by sys_rsx_memory_allocate
|
||||
* @param system_mode (IN):
|
||||
*/
|
||||
s32 sys_rsx_context_allocate(mem32_t context_id, mem32_t lpar_dma_control, mem32_t lpar_driver_info, mem32_t lpar_reports, u64 mem_ctx, u64 system_mode)
|
||||
s32 sys_rsx_context_allocate(vm::ptr<be_t<u32>> context_id, vm::ptr<be_t<u32>> lpar_dma_control, vm::ptr<be_t<u32>> lpar_driver_info, vm::ptr<be_t<u32>> lpar_reports, u64 mem_ctx, u64 system_mode)
|
||||
{
|
||||
sys_rsx.Todo("sys_rsx_context_allocate(context_id_addr=0x%x, lpar_dma_control_addr=0x%x, lpar_driver_info_addr=0x%x, lpar_reports_addr=0x%x, mem_ctx=0x%x, system_mode=0x%x)",
|
||||
context_id.GetAddr(), lpar_dma_control.GetAddr(), lpar_driver_info.GetAddr(), lpar_reports.GetAddr(), mem_ctx, system_mode);
|
||||
context_id.addr(), lpar_dma_control.addr(), lpar_driver_info.addr(), lpar_reports.addr(), mem_ctx, system_mode);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -170,9 +170,9 @@ s32 sys_rsx_context_attribute(s32 context_id, u32 package_id, u64 a3, u64 a4, u6
|
|||
* @param a2 (OUT): Unused?
|
||||
* @param dev_id (IN): An immediate value and always 8. (cellGcmInitPerfMon uses 11, 10, 9, 7, 12 successively).
|
||||
*/
|
||||
s32 sys_rsx_device_map(mem32_t a1, mem32_t a2, u32 dev_id)
|
||||
s32 sys_rsx_device_map(vm::ptr<be_t<u32>> a1, vm::ptr<be_t<u32>> a2, u32 dev_id)
|
||||
{
|
||||
sys_rsx.Todo("sys_rsx_device_map(a1_addr=0x%x, a2_addr=0x%x, a3=%d)", a1.GetAddr(), a2.GetAddr(), dev_id);
|
||||
sys_rsx.Todo("sys_rsx_device_map(a1_addr=0x%x, a2_addr=0x%x, a3=%d)", a1.addr(), a2.addr(), dev_id);
|
||||
|
||||
if (dev_id > 15) {
|
||||
// TODO: Throw RSX error
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
// SysCalls
|
||||
s32 sys_rsx_device_open();
|
||||
s32 sys_rsx_device_close();
|
||||
s32 sys_rsx_memory_allocate(mem32_t mem_handle, mem32_t mem_addr, u32 size, u64 flags, u64 a5, u64 a6, u64 a7);
|
||||
s32 sys_rsx_memory_allocate(vm::ptr<be_t<u32>> mem_handle, vm::ptr<be_t<u32>> mem_addr, u32 size, u64 flags, u64 a5, u64 a6, u64 a7);
|
||||
s32 sys_rsx_memory_free(u32 mem_handle);
|
||||
s32 sys_rsx_context_allocate(mem32_t context_id, mem32_t lpar_dma_control, mem32_t lpar_driver_info, mem32_t lpar_reports, u64 mem_ctx, u64 system_mode);
|
||||
s32 sys_rsx_context_allocate(vm::ptr<be_t<u32>> context_id, vm::ptr<be_t<u32>> lpar_dma_control, vm::ptr<be_t<u32>> lpar_driver_info, vm::ptr<be_t<u32>> lpar_reports, u64 mem_ctx, u64 system_mode);
|
||||
s32 sys_rsx_context_free(u32 context_id);
|
||||
s32 sys_rsx_context_iomap(u32 context_id, u32 io, u32 ea, u32 size, u64 flags);
|
||||
s32 sys_rsx_context_iounmap(u32 context_id, u32 a2, u32 io_addr, u32 size);
|
||||
s32 sys_rsx_context_attribute(s32 context_id, u32 package_id, u64 a3, u64 a4, u64 a5, u64 a6);
|
||||
s32 sys_rsx_device_map(mem32_t a1, mem32_t a2, u32 dev_id);
|
||||
s32 sys_rsx_device_map(vm::ptr<be_t<u32>> a1, vm::ptr<be_t<u32>> a2, u32 dev_id);
|
||||
s32 sys_rsx_device_unmap(u32 dev_id);
|
||||
s32 sys_rsx_attribute();
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
SysCallBase sys_rwlock("sys_rwlock");
|
||||
|
||||
s32 sys_rwlock_create(mem32_t rw_lock_id, mem_ptr_t<sys_rwlock_attribute_t> attr)
|
||||
s32 sys_rwlock_create(vm::ptr<be_t<u32>> rw_lock_id, mem_ptr_t<sys_rwlock_attribute_t> attr)
|
||||
{
|
||||
sys_rwlock.Warning("sys_rwlock_create(rw_lock_id_addr=0x%x, attr_addr=0x%x)", rw_lock_id.GetAddr(), attr.GetAddr());
|
||||
sys_rwlock.Warning("sys_rwlock_create(rw_lock_id_addr=0x%x, attr_addr=0x%x)", rw_lock_id.addr(), attr.GetAddr());
|
||||
|
||||
if (!attr)
|
||||
return CELL_EFAULT;
|
||||
|
@ -31,10 +31,11 @@ s32 sys_rwlock_create(mem32_t rw_lock_id, mem_ptr_t<sys_rwlock_attribute_t> attr
|
|||
return CELL_EINVAL;
|
||||
}
|
||||
|
||||
rw_lock_id = sys_rwlock.GetNewId(new RWLock((u32)attr->attr_protocol, attr->name_u64), TYPE_RWLOCK);
|
||||
u32 id = sys_rwlock.GetNewId(new RWLock((u32)attr->attr_protocol, attr->name_u64), TYPE_RWLOCK);
|
||||
*rw_lock_id = id;
|
||||
|
||||
sys_rwlock.Warning("*** rwlock created [%s] (protocol=0x%x): id = %d",
|
||||
std::string(attr->name, 8).c_str(), (u32)attr->attr_protocol, rw_lock_id.GetValue());
|
||||
std::string(attr->name, 8).c_str(), (u32)attr->attr_protocol, id);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@ struct RWLock
|
|||
};
|
||||
|
||||
// SysCalls
|
||||
s32 sys_rwlock_create(mem32_t rw_lock_id, mem_ptr_t<sys_rwlock_attribute_t> attr);
|
||||
s32 sys_rwlock_create(vm::ptr<be_t<u32>> rw_lock_id, mem_ptr_t<sys_rwlock_attribute_t> attr);
|
||||
s32 sys_rwlock_destroy(u32 rw_lock_id);
|
||||
s32 sys_rwlock_rlock(u32 rw_lock_id, u64 timeout);
|
||||
s32 sys_rwlock_tryrlock(u32 rw_lock_id);
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
|
||||
SysCallBase sys_semaphore("sys_semaphore");
|
||||
|
||||
s32 sys_semaphore_create(mem32_t sem, mem_ptr_t<sys_semaphore_attribute> attr, int initial_count, int max_count)
|
||||
s32 sys_semaphore_create(vm::ptr<be_t<u32>> sem, mem_ptr_t<sys_semaphore_attribute> attr, int initial_count, int max_count)
|
||||
{
|
||||
sys_semaphore.Warning("sys_semaphore_create(sem_addr=0x%x, attr_addr=0x%x, initial_count=%d, max_count=%d)",
|
||||
sem.GetAddr(), attr.GetAddr(), initial_count, max_count);
|
||||
sem.addr(), attr.GetAddr(), initial_count, max_count);
|
||||
|
||||
if (max_count <= 0 || initial_count > max_count || initial_count < 0)
|
||||
{
|
||||
|
@ -37,9 +37,10 @@ s32 sys_semaphore_create(mem32_t sem, mem_ptr_t<sys_semaphore_attribute> attr, i
|
|||
default: sys_semaphore.Error("Unknown protocol attribute(0x%x)", (u32)attr->protocol); return CELL_EINVAL;
|
||||
}
|
||||
|
||||
sem = sys_semaphore.GetNewId(new Semaphore(initial_count, max_count, attr->protocol, attr->name_u64), TYPE_SEMAPHORE);
|
||||
u32 id = sys_semaphore.GetNewId(new Semaphore(initial_count, max_count, attr->protocol, attr->name_u64), TYPE_SEMAPHORE);
|
||||
*sem = id;
|
||||
sys_semaphore.Notice("*** semaphore created [%s] (protocol=0x%x): id = %d",
|
||||
std::string(attr->name, 8).c_str(), (u32)attr->protocol, sem.GetValue());
|
||||
std::string(attr->name, 8).c_str(), (u32)attr->protocol, id);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -192,9 +193,9 @@ s32 sys_semaphore_post(u32 sem_id, int count)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_semaphore_get_value(u32 sem_id, mem32_t count)
|
||||
s32 sys_semaphore_get_value(u32 sem_id, vm::ptr<be_t<s32>> count)
|
||||
{
|
||||
sys_semaphore.Log("sys_semaphore_get_value(sem_id=%d, count_addr=0x%x)", sem_id, count.GetAddr());
|
||||
sys_semaphore.Log("sys_semaphore_get_value(sem_id=%d, count_addr=0x%x)", sem_id, count.addr());
|
||||
|
||||
Semaphore* sem;
|
||||
if (!Emu.GetIdManager().GetIDData(sem_id, sem))
|
||||
|
@ -204,7 +205,7 @@ s32 sys_semaphore_get_value(u32 sem_id, mem32_t count)
|
|||
|
||||
std::lock_guard<std::mutex> lock(sem->m_mutex);
|
||||
|
||||
count = sem->m_value;
|
||||
*count = sem->m_value;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -38,9 +38,9 @@ struct Semaphore
|
|||
};
|
||||
|
||||
// SysCalls
|
||||
s32 sys_semaphore_create(mem32_t sem, mem_ptr_t<sys_semaphore_attribute> attr, int initial_count, int max_count);
|
||||
s32 sys_semaphore_create(vm::ptr<be_t<u32>> sem, mem_ptr_t<sys_semaphore_attribute> attr, int initial_count, int max_count);
|
||||
s32 sys_semaphore_destroy(u32 sem_id);
|
||||
s32 sys_semaphore_wait(u32 sem_id, u64 timeout);
|
||||
s32 sys_semaphore_trywait(u32 sem_id);
|
||||
s32 sys_semaphore_post(u32 sem_id, int count);
|
||||
s32 sys_semaphore_get_value(u32 sem_id, mem32_t count);
|
||||
s32 sys_semaphore_get_value(u32 sem_id, vm::ptr<be_t<s32>> count);
|
||||
|
|
|
@ -47,10 +47,10 @@ s32 sys_spu_image_open(mem_ptr_t<sys_spu_image> img, u32 path_addr)
|
|||
}
|
||||
|
||||
//172
|
||||
s32 sys_spu_thread_initialize(mem32_t thread, u32 group, u32 spu_num, mem_ptr_t<sys_spu_image> img, mem_ptr_t<sys_spu_thread_attribute> attr, mem_ptr_t<sys_spu_thread_argument> arg)
|
||||
s32 sys_spu_thread_initialize(vm::ptr<be_t<u32>> thread, u32 group, u32 spu_num, mem_ptr_t<sys_spu_image> img, mem_ptr_t<sys_spu_thread_attribute> attr, mem_ptr_t<sys_spu_thread_argument> arg)
|
||||
{
|
||||
sys_spu.Warning("sys_spu_thread_initialize(thread_addr=0x%x, group=0x%x, spu_num=%d, img_addr=0x%x, attr_addr=0x%x, arg_addr=0x%x)",
|
||||
thread.GetAddr(), group, spu_num, img.GetAddr(), attr.GetAddr(), arg.GetAddr());
|
||||
thread.addr(), group, spu_num, img.GetAddr(), attr.GetAddr(), arg.GetAddr());
|
||||
|
||||
SpuGroupInfo* group_info;
|
||||
if(!Emu.GetIdManager().GetIDData(group, group_info))
|
||||
|
@ -96,11 +96,12 @@ s32 sys_spu_thread_initialize(mem32_t thread, u32 group, u32 spu_num, mem_ptr_t<
|
|||
new_thread.SetArg(3, a4);
|
||||
new_thread.Run();
|
||||
|
||||
thread = group_info->list[spu_num] = new_thread.GetId();
|
||||
u32 id = new_thread.GetId();
|
||||
*thread = group_info->list[spu_num] = id;
|
||||
(*(SPUThread*)&new_thread).group = group_info;
|
||||
|
||||
sys_spu.Warning("*** New SPU Thread [%s] (img_offset=0x%x, ls_offset=0x%x, ep=0x%x, a1=0x%llx, a2=0x%llx, a3=0x%llx, a4=0x%llx): id=%d",
|
||||
(attr->name_addr ? name.c_str() : ""), (u32) img->segs_addr, ((SPUThread&) new_thread).dmac.ls_offset, spu_ep, a1, a2, a3, a4, thread.GetValue());
|
||||
(attr->name_addr ? name.c_str() : ""), (u32) img->segs_addr, ((SPUThread&) new_thread).dmac.ls_offset, spu_ep, a1, a2, a3, a4, id);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -125,9 +126,9 @@ s32 sys_spu_thread_set_argument(u32 id, mem_ptr_t<sys_spu_thread_argument> arg)
|
|||
}
|
||||
|
||||
//165
|
||||
s32 sys_spu_thread_get_exit_status(u32 id, mem32_t status)
|
||||
s32 sys_spu_thread_get_exit_status(u32 id, vm::ptr<be_t<u32>> status)
|
||||
{
|
||||
sys_spu.Warning("sys_spu_thread_get_exit_status(id=%d, status_addr=0x%x)", id, status.GetAddr());
|
||||
sys_spu.Warning("sys_spu_thread_get_exit_status(id=%d, status_addr=0x%x)", id, status.addr());
|
||||
|
||||
CPUThread* thr = Emu.GetCPU().GetThread(id);
|
||||
|
||||
|
@ -142,7 +143,7 @@ s32 sys_spu_thread_get_exit_status(u32 id, mem32_t status)
|
|||
return CELL_ESTAT;
|
||||
}
|
||||
|
||||
status = res;
|
||||
*status = res;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -400,10 +401,10 @@ s32 sys_spu_thread_group_terminate(u32 id, int value)
|
|||
}
|
||||
|
||||
//170
|
||||
s32 sys_spu_thread_group_create(mem32_t id, u32 num, int prio, mem_ptr_t<sys_spu_thread_group_attribute> attr)
|
||||
s32 sys_spu_thread_group_create(vm::ptr<be_t<u32>> id, u32 num, int prio, mem_ptr_t<sys_spu_thread_group_attribute> attr)
|
||||
{
|
||||
sys_spu.Warning("sys_spu_thread_group_create(id_addr=0x%x, num=%d, prio=%d, attr_addr=0x%x)",
|
||||
id.GetAddr(), num, prio, attr.GetAddr());
|
||||
id.addr(), num, prio, attr.GetAddr());
|
||||
|
||||
if (num > 256) return CELL_EINVAL;
|
||||
|
||||
|
@ -411,18 +412,18 @@ s32 sys_spu_thread_group_create(mem32_t id, u32 num, int prio, mem_ptr_t<sys_spu
|
|||
|
||||
const std::string name = Memory.ReadString(attr->name_addr, attr->name_len);
|
||||
|
||||
id = sys_spu.GetNewId(new SpuGroupInfo(name, num, prio, attr->type, attr->ct));
|
||||
*id = sys_spu.GetNewId(new SpuGroupInfo(name, num, prio, attr->type, attr->ct));
|
||||
|
||||
sys_spu.Warning("*** SPU Thread Group created [%s] (type=0x%x, option.ct=0x%x): id=%d",
|
||||
name.c_str(), (int)attr->type, (u32)attr->ct, id.GetValue());
|
||||
name.c_str(), (int)attr->type, (u32)attr->ct, (u32)*id);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
//178
|
||||
s32 sys_spu_thread_group_join(u32 id, mem32_t cause, mem32_t status)
|
||||
s32 sys_spu_thread_group_join(u32 id, vm::ptr<be_t<u32>> cause, vm::ptr<be_t<u32>> status)
|
||||
{
|
||||
sys_spu.Warning("sys_spu_thread_group_join(id=%d, cause_addr=0x%x, status_addr=0x%x)", id, cause.GetAddr(), status.GetAddr());
|
||||
sys_spu.Warning("sys_spu_thread_group_join(id=%d, cause_addr=0x%x, status_addr=0x%x)", id, cause.addr(), status.addr());
|
||||
|
||||
SpuGroupInfo* group_info;
|
||||
if(!Emu.GetIdManager().GetIDData(id, group_info))
|
||||
|
@ -457,26 +458,26 @@ s32 sys_spu_thread_group_join(u32 id, mem32_t cause, mem32_t status)
|
|||
}
|
||||
}
|
||||
|
||||
if (cause.GetAddr())
|
||||
if (cause)
|
||||
{
|
||||
cause = group_info->m_group_exit
|
||||
*cause = group_info->m_group_exit
|
||||
? SYS_SPU_THREAD_GROUP_JOIN_GROUP_EXIT
|
||||
: (all_threads_exit
|
||||
? SYS_SPU_THREAD_GROUP_JOIN_ALL_THREADS_EXIT
|
||||
: SYS_SPU_THREAD_GROUP_JOIN_TERMINATED);
|
||||
}
|
||||
|
||||
if (status.GetAddr()) status = group_info->m_exit_status;
|
||||
if (status) *status = group_info->m_exit_status;
|
||||
|
||||
group_info->m_state = SPU_THREAD_GROUP_STATUS_INITIALIZED;
|
||||
group_info->lock = 0; // release lock TODO: this LOCK may be replaced.
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_spu_thread_create(mem32_t thread_id, mem32_t entry, u64 arg, int prio, u32 stacksize, u64 flags, u32 threadname_addr)
|
||||
s32 sys_spu_thread_create(vm::ptr<be_t<u32>> thread_id, vm::ptr<be_t<u32>> entry, u64 arg, int prio, u32 stacksize, u64 flags, u32 threadname_addr)
|
||||
{
|
||||
sys_spu.Todo("sys_spu_thread_create(thread_id_addr=0x%x, entry_addr=0x%x, arg=0x%llx, prio=%d, stacksize=0x%x, flags=0x%llx, threadname_addr=0x%x",
|
||||
thread_id.GetAddr(), entry.GetAddr(), arg, prio, stacksize, flags, threadname_addr);
|
||||
thread_id.addr(), entry.addr(), arg, prio, stacksize, flags, threadname_addr);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -878,9 +879,9 @@ s32 sys_spu_thread_group_disconnect_event_all_threads(u32 id, u8 spup)
|
|||
}
|
||||
|
||||
//160
|
||||
s32 sys_raw_spu_create(mem32_t id, u32 attr_addr)
|
||||
s32 sys_raw_spu_create(vm::ptr<be_t<u32>> id, u32 attr_addr)
|
||||
{
|
||||
sys_spu.Warning("sys_raw_spu_create(id_addr=0x%x, attr_addr=0x%x)", id.GetAddr(), attr_addr);
|
||||
sys_spu.Warning("sys_raw_spu_create(id_addr=0x%x, attr_addr=0x%x)", id.addr(), attr_addr);
|
||||
|
||||
CPUThread& new_thread = Emu.GetCPU().AddThread(CPU_THREAD_RAW_SPU);
|
||||
if (((RawSPUThread&)new_thread).GetIndex() >= 5)
|
||||
|
@ -889,7 +890,7 @@ s32 sys_raw_spu_create(mem32_t id, u32 attr_addr)
|
|||
return CELL_EAGAIN;
|
||||
}
|
||||
|
||||
id = ((RawSPUThread&)new_thread).GetIndex();
|
||||
*id = ((RawSPUThread&)new_thread).GetIndex();
|
||||
new_thread.Run();
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -911,9 +912,9 @@ s32 sys_raw_spu_destroy(u32 id)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_raw_spu_create_interrupt_tag(u32 id, u32 class_id, u32 hwthread, mem32_t intrtag)
|
||||
s32 sys_raw_spu_create_interrupt_tag(u32 id, u32 class_id, u32 hwthread, vm::ptr<be_t<u32>> intrtag)
|
||||
{
|
||||
sys_spu.Warning("sys_raw_spu_create_interrupt_tag(id=%d, class_id=%d, hwthread=0x%x, intrtag_addr=0x%x)", id, class_id, hwthread, intrtag.GetAddr());
|
||||
sys_spu.Warning("sys_raw_spu_create_interrupt_tag(id=%d, class_id=%d, hwthread=0x%x, intrtag_addr=0x%x)", id, class_id, hwthread, intrtag.addr());
|
||||
|
||||
RawSPUThread* t = Emu.GetCPU().GetRawSPUThread(id);
|
||||
|
||||
|
@ -933,7 +934,7 @@ s32 sys_raw_spu_create_interrupt_tag(u32 id, u32 class_id, u32 hwthread, mem32_t
|
|||
}
|
||||
|
||||
t->m_intrtag[class_id].enabled = 1;
|
||||
intrtag = (id & 0xff) | (class_id << 8);
|
||||
*intrtag = (id & 0xff) | (class_id << 8);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -1014,9 +1015,9 @@ s32 sys_raw_spu_get_int_stat(u32 id, u32 class_id, vm::ptr<be_t<u64>> stat)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_raw_spu_read_puint_mb(u32 id, mem32_t value)
|
||||
s32 sys_raw_spu_read_puint_mb(u32 id, vm::ptr<be_t<u32>> value)
|
||||
{
|
||||
sys_spu.Log("sys_raw_spu_read_puint_mb(id=%d, value_addr=0x%x)", id, value.GetAddr());
|
||||
sys_spu.Log("sys_raw_spu_read_puint_mb(id=%d, value_addr=0x%x)", id, value.addr());
|
||||
|
||||
RawSPUThread* t = Emu.GetCPU().GetRawSPUThread(id);
|
||||
if (!t)
|
||||
|
@ -1026,7 +1027,7 @@ s32 sys_raw_spu_read_puint_mb(u32 id, mem32_t value)
|
|||
|
||||
u32 v;
|
||||
t->SPU.Out_IntrMBox.PopUncond(v);
|
||||
value = v;
|
||||
*value = v;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -1044,9 +1045,9 @@ s32 sys_raw_spu_set_spu_cfg(u32 id, u32 value)
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_raw_spu_get_spu_cfg(u32 id, mem32_t value)
|
||||
s32 sys_raw_spu_get_spu_cfg(u32 id, vm::ptr<be_t<u32>> value)
|
||||
{
|
||||
sys_spu.Log("sys_raw_spu_get_spu_afg(id=%d, value_addr=0x%x)", id, value.GetAddr());
|
||||
sys_spu.Log("sys_raw_spu_get_spu_afg(id=%d, value_addr=0x%x)", id, value.addr());
|
||||
|
||||
RawSPUThread* t = Emu.GetCPU().GetRawSPUThread(id);
|
||||
if (!t)
|
||||
|
@ -1054,6 +1055,6 @@ s32 sys_raw_spu_get_spu_cfg(u32 id, mem32_t value)
|
|||
return CELL_ESRCH;
|
||||
}
|
||||
|
||||
value = (u32)t->cfg.value;
|
||||
*value = (u32)t->cfg.value;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ struct SpuGroupInfo
|
|||
// SysCalls
|
||||
s32 sys_spu_initialize(u32 max_usable_spu, u32 max_raw_spu);
|
||||
s32 sys_spu_image_open(mem_ptr_t<sys_spu_image> img, u32 path_addr);
|
||||
s32 sys_spu_thread_initialize(mem32_t thread, u32 group, u32 spu_num, mem_ptr_t<sys_spu_image> img, mem_ptr_t<sys_spu_thread_attribute> attr, mem_ptr_t<sys_spu_thread_argument> arg);
|
||||
s32 sys_spu_thread_initialize(vm::ptr<be_t<u32>> thread, u32 group, u32 spu_num, mem_ptr_t<sys_spu_image> img, mem_ptr_t<sys_spu_thread_attribute> attr, mem_ptr_t<sys_spu_thread_argument> arg);
|
||||
s32 sys_spu_thread_set_argument(u32 id, mem_ptr_t<sys_spu_thread_argument> arg);
|
||||
s32 sys_spu_thread_group_destroy(u32 id);
|
||||
s32 sys_spu_thread_group_start(u32 id);
|
||||
|
@ -119,9 +119,9 @@ s32 sys_spu_thread_group_suspend(u32 id);
|
|||
s32 sys_spu_thread_group_resume(u32 id);
|
||||
s32 sys_spu_thread_group_yield(u32 id);
|
||||
s32 sys_spu_thread_group_terminate(u32 id, int value);
|
||||
s32 sys_spu_thread_group_create(mem32_t id, u32 num, int prio, mem_ptr_t<sys_spu_thread_group_attribute> attr);
|
||||
s32 sys_spu_thread_create(mem32_t thread_id, mem32_t entry, u64 arg, int prio, u32 stacksize, u64 flags, u32 threadname_addr);
|
||||
s32 sys_spu_thread_group_join(u32 id, mem32_t cause, mem32_t status);
|
||||
s32 sys_spu_thread_group_create(vm::ptr<be_t<u32>> id, u32 num, int prio, mem_ptr_t<sys_spu_thread_group_attribute> attr);
|
||||
s32 sys_spu_thread_create(vm::ptr<be_t<u32>> thread_id, vm::ptr<be_t<u32>> entry, u64 arg, int prio, u32 stacksize, u64 flags, u32 threadname_addr);
|
||||
s32 sys_spu_thread_group_join(u32 id, vm::ptr<be_t<u32>> cause, vm::ptr<be_t<u32>> status);
|
||||
s32 sys_spu_thread_group_connect_event(u32 id, u32 eq, u32 et);
|
||||
s32 sys_spu_thread_group_disconnect_event(u32 id, u32 et);
|
||||
s32 sys_spu_thread_group_connect_event_all_threads(u32 id, u32 eq_id, u64 req, vm::ptr<u8> spup);
|
||||
|
@ -136,15 +136,15 @@ s32 sys_spu_thread_connect_event(u32 id, u32 eq, u32 et, u8 spup);
|
|||
s32 sys_spu_thread_disconnect_event(u32 id, u32 event_type, u8 spup);
|
||||
s32 sys_spu_thread_bind_queue(u32 id, u32 spuq, u32 spuq_num);
|
||||
s32 sys_spu_thread_unbind_queue(u32 id, u32 spuq_num);
|
||||
s32 sys_spu_thread_get_exit_status(u32 id, mem32_t status);
|
||||
s32 sys_spu_thread_get_exit_status(u32 id, vm::ptr<be_t<u32>> status);
|
||||
|
||||
s32 sys_raw_spu_create(mem32_t id, u32 attr_addr);
|
||||
s32 sys_raw_spu_create(vm::ptr<be_t<u32>> id, u32 attr_addr);
|
||||
s32 sys_raw_spu_destroy(u32 id);
|
||||
s32 sys_raw_spu_create_interrupt_tag(u32 id, u32 class_id, u32 hwthread, mem32_t intrtag);
|
||||
s32 sys_raw_spu_create_interrupt_tag(u32 id, u32 class_id, u32 hwthread, vm::ptr<be_t<u32>> intrtag);
|
||||
s32 sys_raw_spu_set_int_mask(u32 id, u32 class_id, u64 mask);
|
||||
s32 sys_raw_spu_get_int_mask(u32 id, u32 class_id, vm::ptr<be_t<u64>> mask);
|
||||
s32 sys_raw_spu_set_int_stat(u32 id, u32 class_id, u64 stat);
|
||||
s32 sys_raw_spu_get_int_stat(u32 id, u32 class_id, vm::ptr<be_t<u64>> stat);
|
||||
s32 sys_raw_spu_read_puint_mb(u32 id, mem32_t value);
|
||||
s32 sys_raw_spu_read_puint_mb(u32 id, vm::ptr<be_t<u32>> value);
|
||||
s32 sys_raw_spu_set_spu_cfg(u32 id, u32 value);
|
||||
s32 sys_raw_spu_get_spu_cfg(u32 id, mem32_t value);
|
||||
s32 sys_raw_spu_get_spu_cfg(u32 id, vm::ptr<be_t<u32>> value);
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
SysCallBase sys_time("sys_time");
|
||||
|
||||
static const u64 timebase_frequency = /*79800000*/ 80000000; // 80 Mhz
|
||||
extern int cellSysutilGetSystemParamInt(int id, mem32_t value);
|
||||
extern int cellSysutilGetSystemParamInt(int id, vm::ptr<be_t<u32>> value);
|
||||
|
||||
// Auxiliary functions
|
||||
u64 get_time()
|
||||
|
@ -59,9 +59,9 @@ u64 get_system_time()
|
|||
|
||||
|
||||
// Functions
|
||||
s32 sys_time_get_timezone(mem32_t timezone, mem32_t summertime)
|
||||
s32 sys_time_get_timezone(vm::ptr<be_t<u32>> timezone, vm::ptr<be_t<u32>> summertime)
|
||||
{
|
||||
sys_time.Warning("sys_time_get_timezone(timezone_addr=0x%x, summertime_addr=0x%x)", timezone.GetAddr(), summertime.GetAddr());
|
||||
sys_time.Warning("sys_time_get_timezone(timezone_addr=0x%x, summertime_addr=0x%x)", timezone.addr(), summertime.addr());
|
||||
|
||||
int ret;
|
||||
ret = cellSysutilGetSystemParamInt(0x0116, timezone); //0x0116 = CELL_SYSUTIL_SYSTEMPARAM_ID_TIMEZONE
|
||||
|
|
|
@ -7,7 +7,7 @@ u64 get_time();
|
|||
u64 get_system_time();
|
||||
|
||||
// SysCalls
|
||||
s32 sys_time_get_timezone(mem32_t timezone, mem32_t summertime);
|
||||
s32 sys_time_get_timezone(vm::ptr<be_t<u32>> timezone, vm::ptr<be_t<u32>> summertime);
|
||||
s32 sys_time_get_current_time(u32 sec_addr, u32 nsec_addr);
|
||||
s64 sys_time_get_system_time();
|
||||
u64 sys_time_get_timebase_frequency();
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
|
||||
SysCallBase sys_timer("sys_timer");
|
||||
|
||||
s32 sys_timer_create(mem32_t timer_id)
|
||||
s32 sys_timer_create(vm::ptr<be_t<u32>> timer_id)
|
||||
{
|
||||
sys_timer.Warning("sys_timer_create(timer_id_addr=0x%x)", timer_id.GetAddr());
|
||||
sys_timer.Warning("sys_timer_create(timer_id_addr=0x%x)", timer_id.addr());
|
||||
|
||||
timer_id = sys_timer.GetNewId(new timer, TYPE_TIMER);
|
||||
*timer_id = sys_timer.GetNewId(new timer, TYPE_TIMER);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ struct timer
|
|||
sys_timer_information_t timer_information_t;
|
||||
};
|
||||
|
||||
s32 sys_timer_create(mem32_t timer_id);
|
||||
s32 sys_timer_create(vm::ptr<be_t<u32>> timer_id);
|
||||
s32 sys_timer_destroy(u32 timer_id);
|
||||
s32 sys_timer_get_information(u32 timer_id, mem_ptr_t<sys_timer_information_t> info);
|
||||
s32 sys_timer_start(u32 timer_id, s64 basetime, u64 period);
|
||||
|
|
Loading…
Add table
Reference in a new issue