mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-02 15:02:11 +00:00
Some typos fixed (thanks to Nukem9)
cellSysutilCheckCallback() modified, some warnings converted
This commit is contained in:
parent
16c284214f
commit
b602260314
@ -1656,7 +1656,7 @@ private:
|
||||
{
|
||||
CPU.VPR[vd]._u8[15] = CPU.VPR[va]._u8[15] >> sh;
|
||||
|
||||
for (uint b = 14; b >= 0; b--)
|
||||
for (uint b = 14; ~0; b--)
|
||||
{
|
||||
CPU.VPR[vd]._u8[b] = (CPU.VPR[va]._u8[b] >> sh) | (CPU.VPR[va]._u8[b+1] << (8 - sh));
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ private:
|
||||
void ROTH(u32 rt, u32 ra, u32 rb)
|
||||
{
|
||||
for (int h = 0; h < 8; h++)
|
||||
CPU.GPR[rt]._u16[h] = (CPU.GPR[ra]._u16[h] << (CPU.GPR[rb]._u16[h] & 0xf)) | (CPU.GPR[ra]._u16[h] >> (16 - (CPU.GPR[rb]._u32[h] & 0xf)));
|
||||
CPU.GPR[rt]._u16[h] = (CPU.GPR[ra]._u16[h] << (CPU.GPR[rb]._u16[h] & 0xf)) | (CPU.GPR[ra]._u16[h] >> (16 - (CPU.GPR[rb]._u16[h] & 0xf)));
|
||||
}
|
||||
void ROTHM(u32 rt, u32 ra, u32 rb)
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ void SPUThread::InitRegs()
|
||||
|
||||
u64 SPUThread::GetFreeStackSize() const
|
||||
{
|
||||
return (GetStackAddr() + GetStackSize()) - GPR[1]._u64[3];
|
||||
return (GetStackAddr() + GetStackSize()) - GPR[1]._u32[3];
|
||||
}
|
||||
|
||||
void SPUThread::DoRun()
|
||||
|
@ -480,7 +480,7 @@ int cellPamfReaderGetStreamInfo(mem_ptr_t<CellPamfReader> pSelf, u32 pInfo_addr,
|
||||
pInfo->numberOfChannels = pAudio->channels;
|
||||
pInfo->samplingFrequency = CELL_PAMF_FS_48kHz;
|
||||
|
||||
if (pAudio->bps = 0x40)
|
||||
if (pAudio->bps == 0x40)
|
||||
pInfo->bitsPerSample = CELL_PAMF_BIT_LENGTH_16;
|
||||
else
|
||||
//TODO: CELL_PAMF_BIT_LENGTH_24
|
||||
|
@ -460,6 +460,11 @@ int cellSysutilCheckCallback()
|
||||
cellSysutil.Log("cellSysutilCheckCallback()");
|
||||
Emu.GetCallbackManager().m_exit_callback.Check();
|
||||
|
||||
CPUThread& thr = Emu.GetCallbackThread();
|
||||
|
||||
while(Emu.IsRunning() && thr.IsAlive())
|
||||
Sleep(1);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ int sys_lwcond_destroy(mem_ptr_t<sys_lwcond_t> lwcond)
|
||||
|
||||
int sys_lwcond_signal(mem_ptr_t<sys_lwcond_t> lwcond)
|
||||
{
|
||||
sys_lwcond.Warning("sys_lwcond_signal(lwcond_addr=0x%x)", lwcond.GetAddr());
|
||||
sys_lwcond.Log("sys_lwcond_signal(lwcond_addr=0x%x)", lwcond.GetAddr());
|
||||
|
||||
if (!lwcond.IsGood()) return CELL_EFAULT;
|
||||
LWCond* lwc;
|
||||
@ -58,7 +58,7 @@ int sys_lwcond_signal(mem_ptr_t<sys_lwcond_t> lwcond)
|
||||
|
||||
int sys_lwcond_signal_all(mem_ptr_t<sys_lwcond_t> lwcond)
|
||||
{
|
||||
sys_lwcond.Warning("sys_lwcond_signal_all(lwcond_addr=0x%x)", lwcond.GetAddr());
|
||||
sys_lwcond.Log("sys_lwcond_signal_all(lwcond_addr=0x%x)", lwcond.GetAddr());
|
||||
|
||||
if (!lwcond.IsGood()) return CELL_EFAULT;
|
||||
LWCond* lwc;
|
||||
@ -72,7 +72,7 @@ int sys_lwcond_signal_all(mem_ptr_t<sys_lwcond_t> lwcond)
|
||||
|
||||
int sys_lwcond_signal_to(mem_ptr_t<sys_lwcond_t> lwcond, u32 ppu_thread_id)
|
||||
{
|
||||
sys_lwcond.Warning("sys_lwcond_signal_to(lwcond_addr=0x%x, ppu_thread_id=%d)", lwcond.GetAddr(), ppu_thread_id);
|
||||
sys_lwcond.Log("sys_lwcond_signal_to(lwcond_addr=0x%x, ppu_thread_id=%d)", lwcond.GetAddr(), ppu_thread_id);
|
||||
|
||||
if (!lwcond.IsGood()) return CELL_EFAULT;
|
||||
LWCond* lwc;
|
||||
@ -86,7 +86,7 @@ int sys_lwcond_signal_to(mem_ptr_t<sys_lwcond_t> lwcond, u32 ppu_thread_id)
|
||||
|
||||
int sys_lwcond_wait(mem_ptr_t<sys_lwcond_t> lwcond, u64 timeout)
|
||||
{
|
||||
sys_lwcond.Warning("sys_lwcond_wait(lwcond_addr=0x%x, timeout=%llu)", lwcond.GetAddr(), timeout);
|
||||
sys_lwcond.Log("sys_lwcond_wait(lwcond_addr=0x%x, timeout=%llu)", lwcond.GetAddr(), timeout);
|
||||
|
||||
if (!lwcond.IsGood()) return CELL_EFAULT;
|
||||
LWCond* lwc;
|
||||
|
@ -68,7 +68,7 @@ int sys_lwmutex_destroy(mem_ptr_t<sys_lwmutex_t> lwmutex)
|
||||
|
||||
int sys_lwmutex_lock(mem_ptr_t<sys_lwmutex_t> lwmutex, u64 timeout)
|
||||
{
|
||||
sc_lwmutex.Warning("sys_lwmutex_lock(lwmutex_addr=0x%x, timeout=%lld)", lwmutex.GetAddr(), timeout);
|
||||
sc_lwmutex.Log("sys_lwmutex_lock(lwmutex_addr=0x%x, timeout=%lld)", lwmutex.GetAddr(), timeout);
|
||||
|
||||
if (!lwmutex.IsGood()) return CELL_EFAULT;
|
||||
|
||||
@ -107,7 +107,7 @@ int sys_lwmutex_lock(mem_ptr_t<sys_lwmutex_t> lwmutex, u64 timeout)
|
||||
|
||||
int sys_lwmutex_trylock(mem_ptr_t<sys_lwmutex_t> lwmutex)
|
||||
{
|
||||
sc_lwmutex.Warning("sys_lwmutex_trylock(lwmutex_addr=0x%x)", lwmutex.GetAddr());
|
||||
sc_lwmutex.Log("sys_lwmutex_trylock(lwmutex_addr=0x%x)", lwmutex.GetAddr());
|
||||
|
||||
if (!lwmutex.IsGood()) return CELL_EFAULT;
|
||||
|
||||
@ -118,7 +118,7 @@ int sys_lwmutex_trylock(mem_ptr_t<sys_lwmutex_t> lwmutex)
|
||||
|
||||
int sys_lwmutex_unlock(mem_ptr_t<sys_lwmutex_t> lwmutex)
|
||||
{
|
||||
sc_lwmutex.Warning("sys_lwmutex_unlock(lwmutex_addr=0x%x)", lwmutex.GetAddr());
|
||||
sc_lwmutex.Log("sys_lwmutex_unlock(lwmutex_addr=0x%x)", lwmutex.GetAddr());
|
||||
|
||||
if (!lwmutex.IsGood()) return CELL_EFAULT;
|
||||
|
||||
|
@ -6,7 +6,7 @@ SysCallBase sys_mtx("sys_mutex");
|
||||
|
||||
int sys_mutex_create(u32 mutex_id_addr, u32 attr_addr)
|
||||
{
|
||||
sys_mtx.Log("sys_mutex_create(mutex_id_addr=0x%x, attr_addr=0x%x)",
|
||||
sys_mtx.Warning("sys_mutex_create(mutex_id_addr=0x%x, attr_addr=0x%x)",
|
||||
mutex_id_addr, attr_addr);
|
||||
|
||||
if(!Memory.IsGoodAddr(mutex_id_addr) || !Memory.IsGoodAddr(attr_addr)) return CELL_EFAULT;
|
||||
|
@ -52,7 +52,7 @@ int sys_rwlock_destroy(u32 rw_lock_id)
|
||||
|
||||
int sys_rwlock_rlock(u32 rw_lock_id, u64 timeout)
|
||||
{
|
||||
sys_rwlock.Warning("sys_rwlock_rlock(rw_lock_id=%d, timeout=%llu)", rw_lock_id, timeout);
|
||||
sys_rwlock.Log("sys_rwlock_rlock(rw_lock_id=%d, timeout=%llu)", rw_lock_id, timeout);
|
||||
|
||||
RWLock* rw;
|
||||
if (!sys_rwlock.CheckId(rw_lock_id, rw)) return CELL_ESRCH;
|
||||
@ -86,7 +86,7 @@ int sys_rwlock_rlock(u32 rw_lock_id, u64 timeout)
|
||||
|
||||
int sys_rwlock_tryrlock(u32 rw_lock_id)
|
||||
{
|
||||
sys_rwlock.Warning("sys_rwlock_tryrlock(rw_lock_id=%d)", rw_lock_id);
|
||||
sys_rwlock.Log("sys_rwlock_tryrlock(rw_lock_id=%d)", rw_lock_id);
|
||||
|
||||
RWLock* rw;
|
||||
if (!sys_rwlock.CheckId(rw_lock_id, rw)) return CELL_ESRCH;
|
||||
@ -98,7 +98,7 @@ int sys_rwlock_tryrlock(u32 rw_lock_id)
|
||||
|
||||
int sys_rwlock_runlock(u32 rw_lock_id)
|
||||
{
|
||||
sys_rwlock.Warning("sys_rwlock_runlock(rw_lock_id=%d)", rw_lock_id);
|
||||
sys_rwlock.Log("sys_rwlock_runlock(rw_lock_id=%d)", rw_lock_id);
|
||||
|
||||
RWLock* rw;
|
||||
if (!sys_rwlock.CheckId(rw_lock_id, rw)) return CELL_ESRCH;
|
||||
@ -110,7 +110,7 @@ int sys_rwlock_runlock(u32 rw_lock_id)
|
||||
|
||||
int sys_rwlock_wlock(u32 rw_lock_id, u64 timeout)
|
||||
{
|
||||
sys_rwlock.Warning("sys_rwlock_wlock(rw_lock_id=%d, timeout=%llu)", rw_lock_id, timeout);
|
||||
sys_rwlock.Log("sys_rwlock_wlock(rw_lock_id=%d, timeout=%llu)", rw_lock_id, timeout);
|
||||
|
||||
RWLock* rw;
|
||||
if (!sys_rwlock.CheckId(rw_lock_id, rw)) return CELL_ESRCH;
|
||||
@ -146,7 +146,7 @@ int sys_rwlock_wlock(u32 rw_lock_id, u64 timeout)
|
||||
|
||||
int sys_rwlock_trywlock(u32 rw_lock_id)
|
||||
{
|
||||
sys_rwlock.Warning("sys_rwlock_trywlock(rw_lock_id=%d)", rw_lock_id);
|
||||
sys_rwlock.Log("sys_rwlock_trywlock(rw_lock_id=%d)", rw_lock_id);
|
||||
|
||||
RWLock* rw;
|
||||
if (!sys_rwlock.CheckId(rw_lock_id, rw)) return CELL_ESRCH;
|
||||
@ -161,7 +161,7 @@ int sys_rwlock_trywlock(u32 rw_lock_id)
|
||||
|
||||
int sys_rwlock_wunlock(u32 rw_lock_id)
|
||||
{
|
||||
sys_rwlock.Warning("sys_rwlock_wunlock(rw_lock_id=%d)", rw_lock_id);
|
||||
sys_rwlock.Log("sys_rwlock_wunlock(rw_lock_id=%d)", rw_lock_id);
|
||||
|
||||
RWLock* rw;
|
||||
if (!sys_rwlock.CheckId(rw_lock_id, rw)) return CELL_ESRCH;
|
||||
|
@ -104,7 +104,7 @@ int sys_spu_thread_initialize(mem32_t thread, u32 group, u32 spu_num, mem_ptr_t<
|
||||
return CELL_ESRCH;
|
||||
}
|
||||
|
||||
if(!thread.IsGood() || !img.IsGood() || !attr.IsGood() || !attr.IsGood())
|
||||
if(!thread.IsGood() || !img.IsGood() || !attr.IsGood() || !arg.IsGood())
|
||||
{
|
||||
return CELL_EFAULT;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ int sys_tty_read(u32 ch, u64 buf_addr, u32 len, u64 preadlen_addr)
|
||||
|
||||
int sys_tty_write(u32 ch, u64 buf_addr, u32 len, u64 pwritelen_addr)
|
||||
{
|
||||
if(ch < 0 || ch > 15 || len <= 0) return CELL_EINVAL;
|
||||
if(ch < 0 || ch > 15 || (s32)len <= 0) return CELL_EINVAL;
|
||||
if(!Memory.IsGoodAddr(buf_addr)) return CELL_EFAULT;
|
||||
|
||||
Emu.GetDbgCon().Write(ch, Memory.ReadString(buf_addr, len));
|
||||
|
@ -108,7 +108,7 @@ int sys_vm_return_memory(u32 addr, u32 size)
|
||||
}
|
||||
|
||||
// The memory size to return should not be superior to the virtual size in use minus 1MB.
|
||||
if((current_ct->size - size - 0x100000) < 0)
|
||||
if(current_ct->size < (size + 0x100000))
|
||||
{
|
||||
return CELL_EBUSY;
|
||||
}
|
||||
@ -130,7 +130,7 @@ int sys_vm_lock(u32 addr, u32 size)
|
||||
}
|
||||
|
||||
// The memory size to return should not be superior to the virtual size to lock minus 1MB.
|
||||
if((current_ct->size - size - 0x100000) < 0)
|
||||
if(current_ct->size < (size + 0x100000))
|
||||
{
|
||||
return CELL_EBUSY;
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ public:
|
||||
|
||||
u32 GetEntry() { return entry; }
|
||||
u32 GetMinAddr() { return min_addr; }
|
||||
u32 GetMaxAddr() { return min_addr; }
|
||||
u32 GetMaxAddr() { return max_addr; }
|
||||
};
|
||||
|
||||
class Loader : public LoaderBase
|
||||
|
Loading…
Reference in New Issue
Block a user