mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-02 06:40:05 +01:00
* Using be_t in CellGcmControl, CellGcmConfig, CellGcmContextData and CellGcmTileInfo. * Fixed wrong names in Emu/SysCalls/Modules/sceNp.cpp * Fixed ConLog's mount info strings in System.cpp
26 lines
608 B
C++
26 lines
608 B
C++
#include "stdafx.h"
|
|
#include "Emu/SysCalls/SysCalls.h"
|
|
#include "Emu/GS/GCM.h"
|
|
|
|
extern Module cellGcmSys;
|
|
extern gcmInfo gcm_info;
|
|
|
|
int cellGcmCallback(u32 context_addr, u32 count)
|
|
{
|
|
GSLockCurrent gslock(GS_LOCK_WAIT_FLUSH); // could stall on exit
|
|
|
|
CellGcmContextData& ctx = (CellGcmContextData&)Memory[context_addr];
|
|
CellGcmControl& ctrl = (CellGcmControl&)Memory[gcm_info.control_addr];
|
|
|
|
const s32 res = ctx.current - ctx.begin - ctrl.put;
|
|
|
|
if(res > 0) memcpy(&Memory[ctx.begin], &Memory[ctx.current - res], res);
|
|
|
|
ctx.current = ctx.begin + res;
|
|
|
|
ctrl.put = res;
|
|
ctrl.get = 0;
|
|
|
|
return CELL_OK;
|
|
}
|