Stub a few services, add support for generating call stacks on the CPU
This commit is contained in:
@@ -18,6 +18,7 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
||||
{ 20, EnsureSaveData },
|
||||
{ 21, GetDesiredLanguage },
|
||||
{ 22, SetTerminateResult },
|
||||
{ 23, GetDisplayVersion },
|
||||
{ 40, NotifyRunning }
|
||||
};
|
||||
}
|
||||
@@ -67,6 +68,15 @@ namespace Ryujinx.Core.OsHle.Services.Am
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long GetDisplayVersion(ServiceCtx Context)
|
||||
{
|
||||
//FIXME: Need to check correct version on a switch.
|
||||
Context.ResponseData.Write(1L);
|
||||
Context.ResponseData.Write(0L);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long NotifyRunning(ServiceCtx Context)
|
||||
{
|
||||
Context.ResponseData.Write(1);
|
||||
|
@@ -6,7 +6,7 @@ using System.Text;
|
||||
|
||||
namespace Ryujinx.Core.OsHle.Services.Aud
|
||||
{
|
||||
class IAudioDeviceService : IpcService
|
||||
class IAudioDevice : IpcService
|
||||
{
|
||||
private Dictionary<int, ServiceProcessRequest> m_Commands;
|
||||
|
||||
@@ -14,12 +14,13 @@ namespace Ryujinx.Core.OsHle.Services.Aud
|
||||
|
||||
private KEvent SystemEvent;
|
||||
|
||||
public IAudioDeviceService()
|
||||
public IAudioDevice()
|
||||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 0, ListAudioDeviceName },
|
||||
{ 1, SetAudioDeviceOutputVolume },
|
||||
{ 3, GetActiveAudioDeviceName },
|
||||
{ 4, QueryAudioDeviceSystemEvent },
|
||||
{ 5, GetActiveChannelCount }
|
||||
};
|
||||
@@ -72,6 +73,20 @@ namespace Ryujinx.Core.OsHle.Services.Aud
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long GetActiveAudioDeviceName(ServiceCtx Context)
|
||||
{
|
||||
string Name = "FIXME";
|
||||
|
||||
long Position = Context.Request.ReceiveBuff[0].Position;
|
||||
long Size = Context.Request.ReceiveBuff[0].Size;
|
||||
|
||||
byte[] Buffer = Encoding.ASCII.GetBytes(Name + '\0');
|
||||
|
||||
AMemoryHelper.WriteBytes(Context.Memory, Position, Buffer);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long QueryAudioDeviceSystemEvent(ServiceCtx Context)
|
||||
{
|
||||
int Handle = Context.Process.HandleTable.OpenHandle(SystemEvent);
|
@@ -53,7 +53,7 @@ namespace Ryujinx.Core.OsHle.Services.Aud
|
||||
{
|
||||
long UserId = Context.RequestData.ReadInt64();
|
||||
|
||||
MakeObject(Context, new IAudioDeviceService());
|
||||
MakeObject(Context, new IAudioDevice());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
20
Ryujinx.Core/OsHle/Services/Caps/IAlbumAccessorService.cs
Normal file
20
Ryujinx.Core/OsHle/Services/Caps/IAlbumAccessorService.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.Core.OsHle.Services.Caps
|
||||
{
|
||||
class IAlbumAccessorService : IpcService
|
||||
{
|
||||
private Dictionary<int, ServiceProcessRequest> m_Commands;
|
||||
|
||||
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
||||
|
||||
public IAlbumAccessorService()
|
||||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
//...
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
20
Ryujinx.Core/OsHle/Services/Caps/IScreenshotService.cs
Normal file
20
Ryujinx.Core/OsHle/Services/Caps/IScreenshotService.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.Core.OsHle.Services.Caps
|
||||
{
|
||||
class IScreenshotService : IpcService
|
||||
{
|
||||
private Dictionary<int, ServiceProcessRequest> m_Commands;
|
||||
|
||||
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
||||
|
||||
public IScreenshotService()
|
||||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
//...
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@@ -3,6 +3,7 @@ using Ryujinx.Core.OsHle.Services.Am;
|
||||
using Ryujinx.Core.OsHle.Services.Apm;
|
||||
using Ryujinx.Core.OsHle.Services.Aud;
|
||||
using Ryujinx.Core.OsHle.Services.Bsd;
|
||||
using Ryujinx.Core.OsHle.Services.Caps;
|
||||
using Ryujinx.Core.OsHle.Services.Friend;
|
||||
using Ryujinx.Core.OsHle.Services.FspSrv;
|
||||
using Ryujinx.Core.OsHle.Services.Hid;
|
||||
@@ -57,9 +58,18 @@ namespace Ryujinx.Core.OsHle.Services
|
||||
case "bsd:u":
|
||||
return new IClient();
|
||||
|
||||
case "caps:a":
|
||||
return new IAlbumAccessorService();
|
||||
|
||||
case "caps:ss":
|
||||
return new IScreenshotService();
|
||||
|
||||
case "friend:a":
|
||||
return new IServiceCreator();
|
||||
|
||||
case "friend:u":
|
||||
return new IServiceCreator();
|
||||
|
||||
case "fsp-srv":
|
||||
return new IFileSystemProxy();
|
||||
|
||||
|
@@ -16,10 +16,23 @@ namespace Ryujinx.Core.OsHle.Services.Time
|
||||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 101, ToCalendarTimeWithMyRule }
|
||||
{ 0, GetDeviceLocationName },
|
||||
{ 101, ToCalendarTimeWithMyRule }
|
||||
};
|
||||
}
|
||||
|
||||
public long GetDeviceLocationName(ServiceCtx Context)
|
||||
{
|
||||
Logging.Stub(LogClass.ServiceTime, "Stubbed");
|
||||
|
||||
for (int Index = 0; Index < 0x24; Index++)
|
||||
{
|
||||
Context.ResponseData.Write((byte)0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long ToCalendarTimeWithMyRule(ServiceCtx Context)
|
||||
{
|
||||
long PosixTime = Context.RequestData.ReadInt64();
|
||||
|
Reference in New Issue
Block a user