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
a3a383cb
There was an error fetching the commit references. Please try again later.
Commit
a3a383cb
authored
10 years ago
by
bunnei
Browse files
Options
Downloads
Patches
Plain Diff
added mem_map read for config_mem
parent
34dc0a9b
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/mem_map.h
+5
-0
5 additions, 0 deletions
src/core/mem_map.h
src/core/mem_map_funcs.cpp
+12
-7
12 additions, 7 deletions
src/core/mem_map_funcs.cpp
with
17 additions
and
7 deletions
src/core/mem_map.h
+
5
−
0
View file @
a3a383cb
...
...
@@ -32,6 +32,11 @@ enum {
SHARED_MEMORY_VADDR_END
=
(
SHARED_MEMORY_VADDR
+
SHARED_MEMORY_SIZE
),
SHARED_MEMORY_MASK
=
(
SHARED_MEMORY_SIZE
-
1
),
CONFIG_MEMORY_SIZE
=
0x00001000
,
///< Configuration memory size
CONFIG_MEMORY_VADDR
=
0x1FF80000
,
///< Configuration memory virtual address
CONFIG_MEMORY_VADDR_END
=
(
CONFIG_MEMORY_VADDR
+
CONFIG_MEMORY_SIZE
),
CONFIG_MEMORY_MASK
=
(
CONFIG_MEMORY_SIZE
-
1
),
EXEFS_CODE_SIZE
=
0x03F00000
,
EXEFS_CODE_VADDR
=
0x00100000
,
///< ExeFS:/.code is loaded here
EXEFS_CODE_VADDR_END
=
(
EXEFS_CODE_VADDR
+
EXEFS_CODE_SIZE
),
...
...
This diff is collapsed.
Click to expand it.
src/core/mem_map_funcs.cpp
+
12
−
7
View file @
a3a383cb
...
...
@@ -9,6 +9,7 @@
#include
"core/mem_map.h"
#include
"core/hw/hw.h"
#include
"hle/hle.h"
#include
"hle/config_mem.h"
namespace
Memory
{
...
...
@@ -46,7 +47,7 @@ inline void _Read(T &var, const u32 addr) {
// Could just do a base-relative read, too.... TODO
const
u32
vaddr
=
_VirtualAddress
(
addr
);
// Memory allocated for HLE use that can be addressed from the emulated application
// The primary use of this is sharing a commandbuffer between the HLE OS (syscore) and the LLE
// core running the user application (appcore)
...
...
@@ -74,6 +75,10 @@ inline void _Read(T &var, const u32 addr) {
}
else
if
((
vaddr
>=
SHARED_MEMORY_VADDR
)
&&
(
vaddr
<
SHARED_MEMORY_VADDR_END
))
{
var
=
*
((
const
T
*
)
&
g_shared_mem
[
vaddr
&
SHARED_MEMORY_MASK
]);
// Config memory
}
else
if
((
vaddr
>=
CONFIG_MEMORY_VADDR
)
&&
(
vaddr
<
CONFIG_MEMORY_VADDR_END
))
{
ConfigMem
::
Read
<
T
>
(
var
,
vaddr
);
// VRAM
}
else
if
((
vaddr
>=
VRAM_VADDR
)
&&
(
vaddr
<
VRAM_VADDR_END
))
{
var
=
*
((
const
T
*
)
&
g_vram
[
vaddr
&
VRAM_MASK
]);
...
...
@@ -118,12 +123,12 @@ inline void _Write(u32 addr, const T data) {
}
else
if
((
vaddr
>=
VRAM_VADDR
)
&&
(
vaddr
<
VRAM_VADDR_END
))
{
*
(
T
*
)
&
g_vram
[
vaddr
&
VRAM_MASK
]
=
data
;
}
else
if
((
vaddr
&
0xFFF00000
)
==
0x1FF00000
)
{
_assert_msg_
(
MEMMAP
,
false
,
"umimplemented write to DSP memory"
);
}
else
if
((
vaddr
&
0xFFFF0000
)
==
0x1FF80000
)
{
_assert_msg_
(
MEMMAP
,
false
,
"umimplemented write to Configuration Memory"
);
}
else
if
((
vaddr
&
0xFFFFF000
)
==
0x1FF81000
)
{
_assert_msg_
(
MEMMAP
,
false
,
"umimplemented write to shared page"
);
//
} else if ((vaddr & 0xFFF00000) == 0x1FF00000) {
//
_assert_msg_(MEMMAP, false, "umimplemented write to DSP memory");
//
} else if ((vaddr & 0xFFFF0000) == 0x1FF80000) {
//
_assert_msg_(MEMMAP, false, "umimplemented write to Configuration Memory");
//
} else if ((vaddr & 0xFFFFF000) == 0x1FF81000) {
//
_assert_msg_(MEMMAP, false, "umimplemented write to shared page");
// Error out...
}
else
{
...
...
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