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
aae52e3f
There was an error fetching the commit references. Please try again later.
Commit
aae52e3f
authored
11 years ago
by
bunnei
Browse files
Options
Downloads
Patches
Plain Diff
added hack physical memory reads with Memory::GetPointer
parent
aa3ae1af
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/src/mem_map_funcs.cpp
+9
-2
9 additions, 2 deletions
src/core/src/mem_map_funcs.cpp
with
9 additions
and
2 deletions
src/core/src/mem_map_funcs.cpp
+
9
−
2
View file @
aae52e3f
...
@@ -137,14 +137,21 @@ u8 *GetPointer(const u32 addr) {
...
@@ -137,14 +137,21 @@ u8 *GetPointer(const u32 addr) {
// TODO(bunnei): Just a stub for now... ImplementMe!
// TODO(bunnei): Just a stub for now... ImplementMe!
if
((
addr
&
0x3E000000
)
==
0x08000000
)
{
if
((
addr
&
0x3E000000
)
==
0x08000000
)
{
return
g_fcram
+
(
addr
&
MEM_FCRAM_MASK
);
return
g_fcram
+
(
addr
&
MEM_FCRAM_MASK
);
}
// HACK(bunnei): There is no layer yet to translate virtual addresses to physical addresses.
// Until we progress far enough along, we'll accept all physical address reads here. I think
// that this is typically a corner-case from usermode software unless they are trying to do
// bare-metal things (e.g. early 3DS homebrew writes directly to the FB @ 0x20184E60, etc.
}
else
if
(((
addr
&
0xF0000000
)
==
MEM_FCRAM_PADDR
)
&&
(
addr
<
(
MEM_FCRAM_PADDR_END
)))
{
return
g_fcram
+
(
addr
&
MEM_FCRAM_MASK
);
//else if ((addr & 0x3F800000) == 0x04000000) {
//else if ((addr & 0x3F800000) == 0x04000000) {
// return g_vram + (addr & MEM_VRAM_MASK);
// return g_vram + (addr & MEM_VRAM_MASK);
//}
//}
//else if ((addr & 0x3F000000) >= 0x08000000 && (addr & 0x3F000000) < 0x08000000 + g_MemorySize) {
//else if ((addr & 0x3F000000) >= 0x08000000 && (addr & 0x3F000000) < 0x08000000 + g_MemorySize) {
// return m_pRAM + (addr & g_MemoryMask);
// return m_pRAM + (addr & g_MemoryMask);
//}
//}
else
{
}
else
{
//ERROR_LOG(MEMMAP, "Unknown GetPointer %08x PC %08x LR %08x", addr, currentMIPS->pc, currentMIPS->r[MIPS_REG_RA]);
//ERROR_LOG(MEMMAP, "Unknown GetPointer %08x PC %08x LR %08x", addr, currentMIPS->pc, currentMIPS->r[MIPS_REG_RA]);
ERROR_LOG
(
MEMMAP
,
"Unknown GetPointer %08x"
,
addr
);
ERROR_LOG
(
MEMMAP
,
"Unknown GetPointer %08x"
,
addr
);
static
bool
reported
=
false
;
static
bool
reported
=
false
;
...
...
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