diff options
author | bunnei <bunneidev@gmail.com> | 2014-07-23 01:20:57 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-07-23 01:20:57 +0200 |
commit | daa924b906ff3a6f54d00c5d19874c2f839af0a3 (patch) | |
tree | 127b4998ece87140690b7e74853215522d57ecaa /src/core/hle/service/gsp.h | |
parent | Merge pull request #32 from yuriks/master (diff) | |
parent | Use uniform formatting when printing hexadecimal numbers. (diff) | |
download | yuzu-daa924b906ff3a6f54d00c5d19874c2f839af0a3.tar yuzu-daa924b906ff3a6f54d00c5d19874c2f839af0a3.tar.gz yuzu-daa924b906ff3a6f54d00c5d19874c2f839af0a3.tar.bz2 yuzu-daa924b906ff3a6f54d00c5d19874c2f839af0a3.tar.lz yuzu-daa924b906ff3a6f54d00c5d19874c2f839af0a3.tar.xz yuzu-daa924b906ff3a6f54d00c5d19874c2f839af0a3.tar.zst yuzu-daa924b906ff3a6f54d00c5d19874c2f839af0a3.zip |
Diffstat (limited to 'src/core/hle/service/gsp.h')
-rw-r--r-- | src/core/hle/service/gsp.h | 60 |
1 files changed, 49 insertions, 11 deletions
diff --git a/src/core/hle/service/gsp.h b/src/core/hle/service/gsp.h index 214de140f..a83cb4846 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,58 @@ namespace GSP_GPU { enum class GXCommandId : u32 { - REQUEST_DMA = 0x00000000, - SET_COMMAND_LIST_LAST = 0x00000001, - SET_MEMORY_FILL = 0x00000002, // TODO: Confirm? (lictru uses 0x01000102) - SET_DISPLAY_TRANSFER = 0x00000003, - SET_TEXTURE_COPY = 0x00000004, - SET_COMMAND_LIST_FIRST = 0x00000005, + REQUEST_DMA = 0x00, + SET_COMMAND_LIST_LAST = 0x01, + + // Fills a given memory range with a particular value + SET_MEMORY_FILL = 0x02, + + // Copies an image and optionally performs color-conversion or scaling. + // This is highly similar to the GameCube's EFB copy feature + SET_DISPLAY_TRANSFER = 0x03, + + // Conceptionally similar to SET_DISPLAY_TRANSFER and presumable uses the same hardware path + SET_TEXTURE_COPY = 0x04, + + SET_COMMAND_LIST_FIRST = 0x05, }; -union GXCommand { - struct { - GXCommandId id; - }; +struct GXCommand { + BitField<0, 8, GXCommandId> id; - u32 data[0x20]; + union { + struct { + u32 source_address; + u32 dest_address; + u32 size; + } dma_request; + + struct { + u32 address; + u32 size; + } set_command_list_last; + + 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 { |