本文整理汇总了C#中CSPspEmu.Core.Cpu.CpuThreadState.CopyRegistersFrom方法的典型用法代码示例。如果您正苦于以下问题:C# CpuThreadState.CopyRegistersFrom方法的具体用法?C# CpuThreadState.CopyRegistersFrom怎么用?C# CpuThreadState.CopyRegistersFrom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSPspEmu.Core.Cpu.CpuThreadState
的用法示例。
在下文中一共展示了CpuThreadState.CopyRegistersFrom方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExecuteQueued
public int ExecuteQueued(CpuThreadState CpuThreadState, bool MustReschedule)
{
int ExecutedCount = 0;
if (HasScheduledCallbacks)
{
//Console.Error.WriteLine("STARTED CALLBACKS");
while (HasScheduledCallbacks)
{
var HleCallback = DequeueScheduledCallback();
var FakeCpuThreadState = new CpuThreadState(CpuProcessor);
FakeCpuThreadState.CopyRegistersFrom(CpuThreadState);
HleCallback.SetArgumentsToCpuThreadState(FakeCpuThreadState);
try
{
HleInterop.Execute(FakeCpuThreadState);
}
finally
{
ExecutedCount++;
}
//Console.Error.WriteLine(" CALLBACK ENDED : " + HleCallback);
if (MustReschedule)
{
//Console.Error.WriteLine(" RESCHEDULE");
break;
}
}
//Console.Error.WriteLine("ENDED CALLBACKS");
}
return ExecutedCount;
}
示例2: sceKernelStartModule
public int sceKernelStartModule(CpuThreadState CpuThreadState, int ModuleId, int ArgumentsSize, uint ArgumentsPointer, int* Status, SceKernelSMOption* SceKernelSMOption)
{
var Module = Modules.Get(ModuleId);
if (Module.Loaded)
{
var NewCpuThreadState = new CpuThreadState(CpuThreadState.CpuProcessor);
NewCpuThreadState.CopyRegistersFrom(CpuThreadState);
NewCpuThreadState.GP = Module.InitInfo.GP;
NewCpuThreadState.CallerModule = Module;
var ThreadId = (int)ThreadManForUser.sceKernelCreateThread(NewCpuThreadState, "ModuleThread", Module.InitInfo.PC, 10, 1024, PspThreadAttributes.ClearStack, null);
ThreadManForUser.sceKernelStartThread(NewCpuThreadState, ThreadId, ArgumentsSize, ArgumentsPointer);
}
//throw(new NotImplementedException());
if (Status != null)
{
*Status = 0;
}
return 0;
}
示例3: ExecuteQueued
public void ExecuteQueued(CpuThreadState BaseCpuThreadState)
{
if (Enabled)
{
HleCallback[] HleCallbackListCopy;
lock (HleCallbackList)
{
HleCallbackListCopy = HleCallbackList.ToArray();
HleCallbackList.Clear();
}
foreach (var HleCallback in HleCallbackListCopy)
{
var FakeCpuThreadState = new CpuThreadState(CpuProcessor);
FakeCpuThreadState.CopyRegistersFrom(BaseCpuThreadState);
HleCallback.SetArgumentsToCpuThreadState(FakeCpuThreadState);
HleInterop.Execute(FakeCpuThreadState);
//Console.Error.WriteLine("Execute queued");
// Execute just one!
break;
}
}
}