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
b1c8bad9
There was an error fetching the commit references. Please try again later.
Commit
b1c8bad9
authored
10 years ago
by
Tony Wasserka
Committed by
bunnei
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Pica: Add command list registers.
parent
77c0f986
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/hw/lcd.cpp
+42
-3
42 additions, 3 deletions
src/core/hw/lcd.cpp
src/core/hw/lcd.h
+10
-2
10 additions, 2 deletions
src/core/hw/lcd.h
with
52 additions
and
5 deletions
src/core/hw/lcd.cpp
+
42
−
3
View file @
b1c8bad9
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
#include
"core/core.h"
#include
"core/core.h"
#include
"core/mem_map.h"
#include
"core/mem_map.h"
#include
"core/hle/kernel/thread.h"
#include
"core/hw/lcd.h"
#include
"core/hw/lcd.h"
#include
"video_core/video_core.h"
#include
"video_core/video_core.h"
#include
"core/hle/kernel/thread.h"
namespace
LCD
{
namespace
LCD
{
...
@@ -89,31 +89,70 @@ inline void Read(T &var, const u32 addr) {
...
@@ -89,31 +89,70 @@ inline void Read(T &var, const u32 addr) {
case
REG_FRAMEBUFFER_TOP_LEFT_1
:
case
REG_FRAMEBUFFER_TOP_LEFT_1
:
var
=
g_regs
.
framebuffer_top_left_1
;
var
=
g_regs
.
framebuffer_top_left_1
;
break
;
break
;
case
REG_FRAMEBUFFER_TOP_LEFT_2
:
case
REG_FRAMEBUFFER_TOP_LEFT_2
:
var
=
g_regs
.
framebuffer_top_left_2
;
var
=
g_regs
.
framebuffer_top_left_2
;
break
;
break
;
case
REG_FRAMEBUFFER_TOP_RIGHT_1
:
case
REG_FRAMEBUFFER_TOP_RIGHT_1
:
var
=
g_regs
.
framebuffer_top_right_1
;
var
=
g_regs
.
framebuffer_top_right_1
;
break
;
break
;
case
REG_FRAMEBUFFER_TOP_RIGHT_2
:
case
REG_FRAMEBUFFER_TOP_RIGHT_2
:
var
=
g_regs
.
framebuffer_top_right_2
;
var
=
g_regs
.
framebuffer_top_right_2
;
break
;
break
;
case
REG_FRAMEBUFFER_SUB_LEFT_1
:
case
REG_FRAMEBUFFER_SUB_LEFT_1
:
var
=
g_regs
.
framebuffer_sub_left_1
;
var
=
g_regs
.
framebuffer_sub_left_1
;
break
;
break
;
case
REG_FRAMEBUFFER_SUB_RIGHT_1
:
case
REG_FRAMEBUFFER_SUB_RIGHT_1
:
var
=
g_regs
.
framebuffer_sub_right_1
;
var
=
g_regs
.
framebuffer_sub_right_1
;
break
;
break
;
case
CommandListSize
:
var
=
g_regs
.
command_list_size
;
break
;
case
CommandListAddress
:
var
=
g_regs
.
command_list_address
;
break
;
case
ProcessCommandList
:
var
=
g_regs
.
command_processing_enabled
;
break
;
default:
default:
ERROR_LOG
(
LCD
,
"unknown Read%d @ 0x%08X"
,
sizeof
(
var
)
*
8
,
addr
);
ERROR_LOG
(
LCD
,
"unknown Read%d @ 0x%08X"
,
sizeof
(
var
)
*
8
,
addr
);
break
;
break
;
}
}
}
}
template
<
typename
T
>
template
<
typename
T
>
inline
void
Write
(
u32
addr
,
const
T
data
)
{
inline
void
Write
(
u32
addr
,
const
T
data
)
{
ERROR_LOG
(
LCD
,
"unknown Write%d 0x%08X @ 0x%08X"
,
sizeof
(
data
)
*
8
,
data
,
addr
);
switch
(
addr
)
{
case
CommandListSize
:
g_regs
.
command_list_size
=
data
;
break
;
case
CommandListAddress
:
g_regs
.
command_list_address
=
data
;
break
;
case
ProcessCommandList
:
g_regs
.
command_processing_enabled
=
data
;
if
(
g_regs
.
command_processing_enabled
&
1
)
{
// u32* buffer = (u32*)Memory::GetPointer(g_regs.command_list_address << 3);
ERROR_LOG
(
LCD
,
"Beginning %x bytes of commands from address %x"
,
g_regs
.
command_list_size
,
g_regs
.
command_list_address
<<
3
);
// TODO: Process command list!
}
break
;
default
:
ERROR_LOG
(
LCD
,
"unknown Write%d 0x%08X @ 0x%08X"
,
sizeof
(
data
)
*
8
,
data
,
addr
);
break
;
}
}
}
// 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:
...
...
This diff is collapsed.
Click to expand it.
src/core/hw/lcd.h
+
10
−
2
View file @
b1c8bad9
...
@@ -17,6 +17,10 @@ struct Registers {
...
@@ -17,6 +17,10 @@ struct Registers {
u32
framebuffer_sub_left_2
;
u32
framebuffer_sub_left_2
;
u32
framebuffer_sub_right_1
;
u32
framebuffer_sub_right_1
;
u32
framebuffer_sub_right_2
;
u32
framebuffer_sub_right_2
;
u32
command_list_size
;
u32
command_list_address
;
u32
command_processing_enabled
;
};
};
extern
Registers
g_regs
;
extern
Registers
g_regs
;
...
@@ -24,7 +28,7 @@ extern Registers g_regs;
...
@@ -24,7 +28,7 @@ extern Registers g_regs;
enum
{
enum
{
TOP_ASPECT_X
=
0x5
,
TOP_ASPECT_X
=
0x5
,
TOP_ASPECT_Y
=
0x3
,
TOP_ASPECT_Y
=
0x3
,
TOP_HEIGHT
=
240
,
TOP_HEIGHT
=
240
,
TOP_WIDTH
=
400
,
TOP_WIDTH
=
400
,
BOTTOM_WIDTH
=
320
,
BOTTOM_WIDTH
=
320
,
...
@@ -57,12 +61,16 @@ enum {
...
@@ -57,12 +61,16 @@ enum {
REG_FRAMEBUFFER_SUB_LEFT_2
=
0x1EF0056C
,
// Sub LCD, second framebuffer
REG_FRAMEBUFFER_SUB_LEFT_2
=
0x1EF0056C
,
// Sub LCD, second framebuffer
REG_FRAMEBUFFER_SUB_RIGHT_1
=
0x1EF00594
,
// Sub LCD, unused first framebuffer
REG_FRAMEBUFFER_SUB_RIGHT_1
=
0x1EF00594
,
// Sub LCD, unused first framebuffer
REG_FRAMEBUFFER_SUB_RIGHT_2
=
0x1EF00598
,
// Sub LCD, unused second framebuffer
REG_FRAMEBUFFER_SUB_RIGHT_2
=
0x1EF00598
,
// Sub LCD, unused second framebuffer
CommandListSize
=
0x1EF018E0
,
CommandListAddress
=
0x1EF018E8
,
ProcessCommandList
=
0x1EF018F0
,
};
};
/// Framebuffer location
/// Framebuffer location
enum
FramebufferLocation
{
enum
FramebufferLocation
{
FRAMEBUFFER_LOCATION_UNKNOWN
,
///< Framebuffer location is unknown
FRAMEBUFFER_LOCATION_UNKNOWN
,
///< Framebuffer location is unknown
FRAMEBUFFER_LOCATION_FCRAM
,
///< Framebuffer is in the GSP heap
FRAMEBUFFER_LOCATION_FCRAM
,
///< Framebuffer is in the GSP heap
FRAMEBUFFER_LOCATION_VRAM
,
///< Framebuffer is in VRAM
FRAMEBUFFER_LOCATION_VRAM
,
///< Framebuffer is in VRAM
};
};
...
...
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