2014-07-26 14:42:46 +02:00
|
|
|
// Copyright 2014 Citra Emulator Project
|
2014-12-17 06:38:14 +01:00
|
|
|
// Licensed under GPLv2 or any later version
|
2014-07-26 14:42:46 +02:00
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2015-06-27 18:56:17 +02:00
|
|
|
#include <type_traits>
|
2014-07-26 14:42:46 +02:00
|
|
|
#include "common/bit_field.h"
|
|
|
|
#include "common/common_types.h"
|
|
|
|
|
|
|
|
namespace Pica {
|
|
|
|
|
|
|
|
namespace CommandProcessor {
|
|
|
|
|
|
|
|
union CommandHeader {
|
|
|
|
u32 hex;
|
|
|
|
|
2016-09-18 02:38:01 +02:00
|
|
|
BitField<0, 16, u32> cmd_id;
|
2014-08-14 23:23:55 +02:00
|
|
|
|
|
|
|
// parameter_mask:
|
|
|
|
// Mask applied to the input value to make it possible to update
|
|
|
|
// parts of a register without overwriting its other fields.
|
|
|
|
// first bit: 0x000000FF
|
|
|
|
// second bit: 0x0000FF00
|
|
|
|
// third bit: 0x00FF0000
|
|
|
|
// fourth bit: 0xFF000000
|
2016-09-18 02:38:01 +02:00
|
|
|
BitField<16, 4, u32> parameter_mask;
|
2014-08-14 23:23:55 +02:00
|
|
|
|
2014-07-26 14:42:46 +02:00
|
|
|
BitField<20, 11, u32> extra_data_length;
|
2014-08-14 23:23:55 +02:00
|
|
|
|
2016-09-18 02:38:01 +02:00
|
|
|
BitField<31, 1, u32> group_commands;
|
2014-07-26 14:42:46 +02:00
|
|
|
};
|
2014-08-14 23:23:55 +02:00
|
|
|
static_assert(std::is_standard_layout<CommandHeader>::value == true,
|
|
|
|
"CommandHeader does not use standard layout");
|
2014-07-26 14:42:46 +02:00
|
|
|
static_assert(sizeof(CommandHeader) == sizeof(u32), "CommandHeader has incorrect size!");
|
|
|
|
|
|
|
|
void ProcessCommandList(const u32* list, u32 size);
|
|
|
|
|
2018-03-09 18:54:43 +01:00
|
|
|
} // namespace CommandProcessor
|
2014-07-26 14:42:46 +02:00
|
|
|
|
2018-03-09 18:54:43 +01:00
|
|
|
} // namespace Pica
|