diff --git a/src/video_core/pica.h b/src/video_core/pica.h new file mode 100644 index 0000000000000000000000000000000000000000..dab861408ffe018bc9ffab61894fde2cc78343cb --- /dev/null +++ b/src/video_core/pica.h @@ -0,0 +1,35 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#pragma once + +#include "common/bit_field.h" +#include "common/common_types.h" + +namespace Pica { + +enum class CommandId : u32 +{ + ViewportSizeX = 0x41, + ViewportInvSizeX = 0x42, + ViewportSizeY = 0x43, + ViewportInvSizeY = 0x44, + ViewportCorner = 0x68, + DepthBufferFormat = 0x116, + ColorBufferFormat = 0x117, + DepthBufferAddress = 0x11C, + ColorBufferAddress = 0x11D, + ColorBufferSize = 0x11E, +}; + +union CommandHeader { + u32 hex; + + BitField< 0, 16, CommandId> cmd_id; + BitField<16, 4, u32> parameter_mask; + BitField<20, 11, u32> extra_data_length; + BitField<31, 1, u32> group_commands; +}; + +} diff --git a/src/video_core/video_core.vcxproj b/src/video_core/video_core.vcxproj index a4df923865cecb9e57f7f447892464ef50fe5477..d77be2bef6d978acd5e44df20acb2e3ed72e8f34 100644 --- a/src/video_core/video_core.vcxproj +++ b/src/video_core/video_core.vcxproj @@ -25,6 +25,7 @@ </ItemGroup> <ItemGroup> <ClInclude Include="gpu_debugger.h" /> + <ClInclude Include="pica.h" /> <ClInclude Include="renderer_base.h" /> <ClInclude Include="utils.h" /> <ClInclude Include="video_core.h" /> diff --git a/src/video_core/video_core.vcxproj.filters b/src/video_core/video_core.vcxproj.filters index cc173a71843fa2b5df8634a7abacdbe9213d9c23..b89ac1ac49056eb9e3e07c6154e58b4fb6b0f60d 100644 --- a/src/video_core/video_core.vcxproj.filters +++ b/src/video_core/video_core.vcxproj.filters @@ -17,6 +17,7 @@ <Filter>renderer_opengl</Filter> </ClInclude> <ClInclude Include="gpu_debugger.h" /> + <ClInclude Include="pica.h" /> <ClInclude Include="renderer_base.h" /> <ClInclude Include="utils.h" /> <ClInclude Include="video_core.h" />