|
|
@ -86,39 +86,39 @@ const u8* GetFramebufferPointer(const u32 address) {
|
|
|
|
template <typename T>
|
|
|
|
template <typename T>
|
|
|
|
inline void Read(T &var, const u32 addr) {
|
|
|
|
inline void Read(T &var, const u32 addr) {
|
|
|
|
switch (addr) {
|
|
|
|
switch (addr) {
|
|
|
|
case REG_FRAMEBUFFER_TOP_LEFT_1:
|
|
|
|
case Registers::FramebufferTopLeft1:
|
|
|
|
var = g_regs.framebuffer_top_left_1;
|
|
|
|
var = g_regs.framebuffer_top_left_1;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case REG_FRAMEBUFFER_TOP_LEFT_2:
|
|
|
|
case Registers::FramebufferTopLeft2:
|
|
|
|
var = g_regs.framebuffer_top_left_2;
|
|
|
|
var = g_regs.framebuffer_top_left_2;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case REG_FRAMEBUFFER_TOP_RIGHT_1:
|
|
|
|
case Registers::FramebufferTopRight1:
|
|
|
|
var = g_regs.framebuffer_top_right_1;
|
|
|
|
var = g_regs.framebuffer_top_right_1;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case REG_FRAMEBUFFER_TOP_RIGHT_2:
|
|
|
|
case Registers::FramebufferTopRight2:
|
|
|
|
var = g_regs.framebuffer_top_right_2;
|
|
|
|
var = g_regs.framebuffer_top_right_2;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case REG_FRAMEBUFFER_SUB_LEFT_1:
|
|
|
|
case Registers::FramebufferSubLeft1:
|
|
|
|
var = g_regs.framebuffer_sub_left_1;
|
|
|
|
var = g_regs.framebuffer_sub_left_1;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case REG_FRAMEBUFFER_SUB_RIGHT_1:
|
|
|
|
case Registers::FramebufferSubRight1:
|
|
|
|
var = g_regs.framebuffer_sub_right_1;
|
|
|
|
var = g_regs.framebuffer_sub_right_1;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case CommandListSize:
|
|
|
|
case Registers::CommandListSize:
|
|
|
|
var = g_regs.command_list_size;
|
|
|
|
var = g_regs.command_list_size;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case CommandListAddress:
|
|
|
|
case Registers::CommandListAddress:
|
|
|
|
var = g_regs.command_list_address;
|
|
|
|
var = g_regs.command_list_address;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case ProcessCommandList:
|
|
|
|
case Registers::ProcessCommandList:
|
|
|
|
var = g_regs.command_processing_enabled;
|
|
|
|
var = g_regs.command_processing_enabled;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
@ -130,16 +130,16 @@ 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) {
|
|
|
|
switch (addr) {
|
|
|
|
switch (static_cast<Registers::Id>(addr)) {
|
|
|
|
case CommandListSize:
|
|
|
|
case Registers::CommandListSize:
|
|
|
|
g_regs.command_list_size = data;
|
|
|
|
g_regs.command_list_size = data;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case CommandListAddress:
|
|
|
|
case Registers::CommandListAddress:
|
|
|
|
g_regs.command_list_address = data;
|
|
|
|
g_regs.command_list_address = data;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case ProcessCommandList:
|
|
|
|
case Registers::ProcessCommandList:
|
|
|
|
g_regs.command_processing_enabled = data;
|
|
|
|
g_regs.command_processing_enabled = data;
|
|
|
|
if (g_regs.command_processing_enabled & 1)
|
|
|
|
if (g_regs.command_processing_enabled & 1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|