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
67f6e414
There was an error fetching the commit references. Please try again later.
Commit
67f6e414
authored
10 years ago
by
bunnei
Browse files
Options
Downloads
Patches
Plain Diff
added a GetPointer function for reading from HLE command buffer
parent
f2f63a0f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/hle/hle.cpp
+8
-0
8 additions, 0 deletions
src/core/hle/hle.cpp
src/core/hle/hle.h
+6
-0
6 additions, 0 deletions
src/core/hle/hle.h
with
14 additions
and
0 deletions
src/core/hle/hle.cpp
+
8
−
0
View file @
67f6e414
...
@@ -37,6 +37,14 @@ inline void Write(u32 addr, const T data) {
...
@@ -37,6 +37,14 @@ inline void Write(u32 addr, const T data) {
}
}
}
}
u8
*
GetPointer
(
const
u32
addr
)
{
if
(
addr
>=
HLE
::
CMD_BUFFER_ADDR
&&
addr
<
HLE
::
CMD_BUFFER_ADDR_END
)
{
return
g_command_buffer
+
(
addr
&
CMD_BUFFER_MASK
);
}
else
{
ERROR_LOG
(
HLE
,
"unknown pointer from address %08X"
,
addr
);
}
}
// Explicitly instantiate template functions because we aren't defining this in the header:
// Explicitly instantiate template functions because we aren't defining this in the header:
template
void
Read
<
u64
>(
u64
&
var
,
const
u32
addr
);
template
void
Read
<
u64
>(
u64
&
var
,
const
u32
addr
);
...
...
This diff is collapsed.
Click to expand it.
src/core/hle/hle.h
+
6
−
0
View file @
67f6e414
...
@@ -46,6 +46,12 @@ inline void Read(T &var, const u32 addr);
...
@@ -46,6 +46,12 @@ inline void Read(T &var, const u32 addr);
template
<
typename
T
>
template
<
typename
T
>
inline
void
Write
(
u32
addr
,
const
T
data
);
inline
void
Write
(
u32
addr
,
const
T
data
);
u8
*
GetPointer
(
const
u32
Address
);
inline
const
char
*
GetCharPointer
(
const
u32
address
)
{
return
(
const
char
*
)
GetPointer
(
address
);
}
void
RegisterModule
(
std
::
string
name
,
int
num_functions
,
const
FunctionDef
*
func_table
);
void
RegisterModule
(
std
::
string
name
,
int
num_functions
,
const
FunctionDef
*
func_table
);
void
CallSyscall
(
u32
opcode
);
void
CallSyscall
(
u32
opcode
);
...
...
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