diff options
author | Tony Wasserka <NeoBrainX@gmail.com> | 2014-07-22 12:41:16 +0200 |
---|---|---|
committer | Tony Wasserka <NeoBrainX@gmail.com> | 2014-07-23 00:44:31 +0200 |
commit | 9b0d0c81a006ebd9e054758bc2c973d67650ca70 (patch) | |
tree | c0827e78475e98070c42732328cab30480122d2e /src/core/hle/service/gsp.h | |
parent | RegisterSet: Simplify code by using structs for register definition instead of unions. (diff) | |
download | yuzu-9b0d0c81a006ebd9e054758bc2c973d67650ca70.tar yuzu-9b0d0c81a006ebd9e054758bc2c973d67650ca70.tar.gz yuzu-9b0d0c81a006ebd9e054758bc2c973d67650ca70.tar.bz2 yuzu-9b0d0c81a006ebd9e054758bc2c973d67650ca70.tar.lz yuzu-9b0d0c81a006ebd9e054758bc2c973d67650ca70.tar.xz yuzu-9b0d0c81a006ebd9e054758bc2c973d67650ca70.tar.zst yuzu-9b0d0c81a006ebd9e054758bc2c973d67650ca70.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/gsp.h | 52 |
1 files changed, 41 insertions, 11 deletions
diff --git a/src/core/hle/service/gsp.h b/src/core/hle/service/gsp.h index fb50a928a..f36afb697 100644 --- a/src/core/hle/service/gsp.h +++ b/src/core/hle/service/gsp.h @@ -4,6 +4,7 @@ #pragma once +#include "common/bit_field.h" #include "core/hle/service/service.h" //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -12,21 +13,50 @@ namespace GSP_GPU { enum class GXCommandId : u32 { - REQUEST_DMA = 0x00000000, - SET_COMMAND_LIST_LAST = 0x00000001, - SET_MEMORY_FILL = 0x01000102, // TODO: Confirm? - SET_DISPLAY_TRANSFER = 0x00000003, - SET_TEXTURE_COPY = 0x00000004, - SET_COMMAND_LIST_FIRST = 0x00000005, + REQUEST_DMA = 0x00, + SET_COMMAND_LIST_LAST = 0x01, + SET_MEMORY_FILL = 0x02, + SET_DISPLAY_TRANSFER = 0x03, + SET_TEXTURE_COPY = 0x04, + SET_COMMAND_LIST_FIRST = 0x05, }; -union GXCommand { - struct { - GXCommandId id; - }; +struct GXCommand { + BitField<0, 8, GXCommandId> id; + + union { + struct { + u32 source_address; + u32 dest_address; + u32 size; + } dma_request; + + struct { + u32 address; + u32 size; + } set_command_list_last; - u32 data[0x20]; + struct { + u32 start1; + u32 value1; + u32 end1; + u32 start2; + u32 value2; + u32 end2; + } memory_fill; + + struct { + u32 in_buffer_address; + u32 out_buffer_address; + u32 in_buffer_size; + u32 out_buffer_size; + u32 flags; + } image_copy; + + u8 raw_data[0x1C]; + }; }; +static_assert(sizeof(GXCommand) == 0x20, "GXCommand struct has incorrect size"); /// Interface to "srv:" service class Interface : public Service::Interface { |