Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
5ea46796
There was an error fetching the commit references. Please try again later.
Commit
5ea46796
authored
10 years ago
by
bunnei
Browse files
Options
Downloads
Patches
Plain Diff
added some very initial command parsing for SRV Sync
parent
67f6e414
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/hle/service/service.cpp
+31
-5
31 additions, 5 deletions
src/core/hle/service/service.cpp
with
31 additions
and
5 deletions
src/core/hle/service/service.cpp
+
31
−
5
View file @
5ea46796
...
...
@@ -5,15 +5,16 @@
#include
"common/common.h"
#include
"common/log.h"
#include
"core/hle/hle.h"
#include
"core/hle/service/service.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace Service
namespace
Service
{
Manager
*
g_manager
=
NULL
;
///< Service manager
////////////////////////////////////////////////////////////////////////////////////////////////////
// Service Manager class
Manager
::
Manager
()
{
}
...
...
@@ -62,7 +63,11 @@ Interface* Manager::FetchFromPortName(std::string port_name) {
return
FetchFromUID
(
itr
->
second
);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
// Interface to "SRV" service
class
Interface_SRV
:
public
Interface
{
public:
Interface_SRV
()
{
...
...
@@ -71,6 +76,12 @@ public:
~
Interface_SRV
()
{
}
enum
{
CMD_OFFSET
=
0x80
,
CMD_HEADER_INIT
=
0x10002
,
///< Command header to initialize SRV service
CMD_HEADER_GET_HANDLE
=
0x50100
,
///< Command header to get handle of other services
};
/**
* Gets the string name used by CTROS for a service
* @return String name of service
...
...
@@ -92,12 +103,27 @@ public:
* @return Return result of svcSendSyncRequest passed back to user app
*/
Syscall
::
Result
Sync
()
{
ERROR_LOG
(
HLE
,
"Unimplemented function Interface_SRV::Sync"
);
u32
header
=
0
;
HLE
::
Read
<
u32
>
(
header
,
(
HLE
::
CMD_BUFFER_ADDR
+
CMD_OFFSET
));
switch
(
header
)
{
case
CMD_HEADER_INIT
:
NOTICE_LOG
(
HLE
,
"Interface_SRV::Sync - Initialize"
);
break
;
case
CMD_HEADER_GET_HANDLE
:
NOTICE_LOG
(
HLE
,
"Interface_SRV::Sync - GetHandle, port: %s"
,
HLE
::
GetCharPointer
(
HLE
::
CMD_BUFFER_ADDR
+
CMD_OFFSET
+
4
));
break
;
}
return
0
;
}
};
////////////////////////////////////////////////////////////////////////////////////////////////////
// Module interface
/// Initialize ServiceManager
void
Init
()
{
g_manager
=
new
Manager
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment