Merge pull request #7880 from jordan-woyak/udraw-tablet-emu

WiimoteEmu: Implement 3rd-Party extension encryption and uDraw GameTablet.
This commit is contained in:
JMC47 2019-04-30 19:45:33 -04:00 committed by GitHub
commit e39aa5b026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 875 additions and 282 deletions

View File

@ -148,6 +148,7 @@ add_library(core
HW/WiimoteEmu/Extension/Drums.cpp
HW/WiimoteEmu/Extension/Guitar.cpp
HW/WiimoteEmu/Extension/Turntable.cpp
HW/WiimoteEmu/Extension/UDrawTablet.cpp
HW/WiimoteReal/WiimoteReal.cpp
HW/WiiSave.cpp
IOS/Device.cpp

View File

@ -182,6 +182,7 @@
<ClCompile Include="HW\WiimoteEmu\Extension\Guitar.cpp" />
<ClCompile Include="HW\WiimoteEmu\Extension\Nunchuk.cpp" />
<ClCompile Include="HW\WiimoteEmu\Extension\Turntable.cpp" />
<ClCompile Include="HW\WiimoteEmu\Extension\UDrawTablet.cpp" />
<ClCompile Include="HW\WiimoteEmu\I2CBus.cpp" />
<ClCompile Include="HW\WiimoteEmu\MotionPlus.cpp" />
<ClCompile Include="HW\WiimoteEmu\Speaker.cpp" />
@ -449,6 +450,7 @@
<ClInclude Include="HW\WiimoteEmu\Extension\Guitar.h" />
<ClInclude Include="HW\WiimoteEmu\Extension\Nunchuk.h" />
<ClInclude Include="HW\WiimoteEmu\Extension\Turntable.h" />
<ClInclude Include="HW\WiimoteEmu\Extension\UDrawTablet.h" />
<ClInclude Include="HW\WiimoteEmu\I2CBus.h" />
<ClInclude Include="HW\WiimoteEmu\MotionPlus.h" />
<ClInclude Include="HW\WiimoteEmu\Speaker.h" />

View File

@ -907,6 +907,9 @@
<ClCompile Include="HW\WiimoteEmu\Extension\Turntable.cpp">
<Filter>HW %28Flipper/Hollywood%29\Wiimote\Emu\Extension</Filter>
</ClCompile>
<ClCompile Include="HW\WiimoteEmu\Extension\UDrawTablet.cpp">
<Filter>HW %28Flipper/Hollywood%29\Wiimote\Emu\Extension</Filter>
</ClCompile>
<ClCompile Include="HW\WiimoteEmu\Extension\Extension.cpp">
<Filter>HW %28Flipper/Hollywood%29\Wiimote\Emu\Extension</Filter>
</ClCompile>
@ -1619,6 +1622,9 @@
<ClInclude Include="HW\WiimoteEmu\Extension\Turntable.h">
<Filter>HW %28Flipper/Hollywood%29\Wiimote\Emu\Extension</Filter>
</ClInclude>
<ClInclude Include="HW\WiimoteEmu\Extension\UDrawTablet.h">
<Filter>HW %28Flipper/Hollywood%29\Wiimote\Emu\Extension</Filter>
</ClInclude>
<ClInclude Include="HW\WiimoteEmu\Extension\Extension.h">
<Filter>HW %28Flipper/Hollywood%29\Wiimote\Emu\Extension</Filter>
</ClInclude>
@ -1628,6 +1634,7 @@
<ClInclude Include="HW\WiimoteCommon\DataReport.h">
<Filter>HW %28Flipper/Hollywood%29\Wiimote\Common</Filter>
</ClInclude>
<ClInclude Include="PowerPC\ConditionRegister.h" />
</ItemGroup>
<ItemGroup>
<Text Include="CMakeLists.txt" />

View File

@ -66,6 +66,12 @@ ControllerEmu::ControlGroup* GetTurntableGroup(int number, WiimoteEmu::Turntable
->GetTurntableGroup(group);
}
ControllerEmu::ControlGroup* GetUDrawTabletGroup(int number, WiimoteEmu::UDrawTabletGroup group)
{
return static_cast<WiimoteEmu::Wiimote*>(s_config.GetController(number))
->GetUDrawTabletGroup(group);
}
void Shutdown()
{
s_config.UnregisterHotplugCallback();

View File

@ -26,6 +26,7 @@ enum class ClassicGroup;
enum class GuitarGroup;
enum class DrumsGroup;
enum class TurntableGroup;
enum class UDrawTabletGroup;
} // namespace WiimoteEmu
enum
@ -78,6 +79,7 @@ ControllerEmu::ControlGroup* GetClassicGroup(int number, WiimoteEmu::ClassicGrou
ControllerEmu::ControlGroup* GetGuitarGroup(int number, WiimoteEmu::GuitarGroup group);
ControllerEmu::ControlGroup* GetDrumsGroup(int number, WiimoteEmu::DrumsGroup group);
ControllerEmu::ControlGroup* GetTurntableGroup(int number, WiimoteEmu::TurntableGroup group);
ControllerEmu::ControlGroup* GetUDrawTabletGroup(int number, WiimoteEmu::UDrawTabletGroup group);
void ControlChannel(int number, u16 channel_id, const void* data, u32 size);
void InterruptChannel(int number, u16 channel_id, const void* data, u32 size);

View File

@ -6,281 +6,512 @@
#include "Core/HW/WiimoteEmu/Encryption.h"
#include <cstring>
#include <algorithm>
#include "Common/CommonTypes.h"
#include "Common/BitUtils.h"
#include "Common/Logging/Log.h"
static const u8 ans_tbl[7][6] = {
{0xA8, 0x77, 0xA6, 0xE0, 0xF7, 0x43}, {0x5A, 0x35, 0x85, 0xE2, 0x72, 0x97},
{0x8F, 0xB7, 0x1A, 0x62, 0x87, 0x38}, {0xD, 0x67, 0xC7, 0xBE, 0x4F, 0x3E},
{0x20, 0x76, 0x37, 0x8F, 0x68, 0xB7}, {0xA9, 0x26, 0x3F, 0x2B, 0x10, 0xE3},
{0x30, 0x7E, 0x90, 0xE, 0x85, 0xA},
};
static const u8 tsbox[256] = {
0x70, 0x51, 3, 0x86, 0x40, 0xD, 0x4F, 0xEB, 0x3E, 0xCC, 0xD1, 0x87, 0x35, 0xBD, 0xF5, 0xB,
0x5E, 0xD0, 0xF8, 0xF2, 0xD5, 0xE2, 0x6C, 0x31, 0xC, 0xAD, 0xFC, 0x21, 0xC3, 0x78, 0xC1, 6,
0xC2, 0x4C, 0x55, 0xE6, 0x4A, 0x34, 0x48, 0x11, 0x1E, 0xDA, 0xE7, 0x1A, 0x84, 0xA0, 0x96, 0xA7,
0xE3, 0x7F, 0xAF, 0x63, 0x9C, 0xFA, 0x23, 0x5B, 0x79, 0xC8, 0x9E, 0xBA, 0xB2, 0xC9, 0x22, 0x12,
0x4B, 0xB3, 0xA1, 0xB6, 0x32, 0x49, 0xA2, 0xE1, 0x89, 0x39, 0x10, 0x66, 0xC5, 7, 0x8F, 0x54,
0xEA, 0x91, 0xCA, 0x3F, 0xF9, 0x19, 0xF0, 0xD7, 0x46, 0xBC, 0x28, 0x1B, 0x61, 0xE8, 0x2F, 0x6A,
0xAE, 0x9D, 0xF6, 0x4E, 9, 0x14, 0x77, 0x4D, 0xDB, 0x1F, 0x2E, 0x7B, 0x7C, 0xF1, 0x43, 0xA3,
0, 0xB8, 0x13, 0x8C, 0x85, 0xB9, 0x29, 0x75, 0x88, 0xFD, 0xD2, 0x56, 0x1C, 0x50, 0x97, 0x41,
0xE5, 0x3B, 0x60, 0xB5, 0xC0, 0x64, 0xEE, 0x98, 0xD6, 0x2D, 0x25, 0xA4, 0xAA, 0xCD, 0x7D, 0xA8,
0x83, 0xC6, 0xAB, 0xBE, 0x44, 0x99, 0x26, 0x3C, 0xCE, 0x9F, 0xBF, 0xD3, 0xCB, 0x76, 0x7A, 0x7E,
0x82, 1, 0x8A, 0x9A, 0x80, 0x1D, 0xE, 0xB0, 0x5C, 0xD4, 0x38, 0x62, 0xF4, 0x30, 0xE0, 0x8E,
0x53, 0xB7, 2, 0x57, 0xAC, 0xA6, 0x52, 0xA, 0x6D, 0x92, 0x65, 0x17, 0x24, 0x33, 0x45, 0x72,
0x74, 0xB1, 0xB4, 0xF7, 0x5D, 0xED, 0x2C, 0xFF, 0x47, 0x37, 0x5A, 0x90, 0xBB, 0xDF, 0x2A, 0x16,
0x59, 0x95, 0xD9, 0xC4, 0x27, 0x67, 0x73, 0xC7, 0x68, 0xFE, 0xA5, 0xDD, 0x6B, 0x5F, 0x93, 0xD8,
0xEC, 5, 0x3A, 0x8D, 0x6E, 0xFB, 0x3D, 0xA9, 0x69, 0x36, 0xF3, 0x94, 0xDE, 0xEF, 0x15, 0x6F,
0x8B, 0x9B, 8, 0xF, 0xDC, 0x81, 0x18, 0x20, 4, 0xE4, 0x71, 0xCF, 0xE9, 0x2B, 0x42, 0x58,
};
static const u8 sboxes[8][256] = {
namespace
{
constexpr u8 sboxes[18][256] = {
{
1, 0xA0, 0xA9, 0x62, 0xD6, 0x3F, 0x85, 0xA7, 0xB6, 0xD4, 0xFA, 0x15, 0x66, 0x17, 9,
0xBD, 0x5D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, 0x0c, 0x3b, 0x3a, 0x9a, 0x54, 0xfd, 0x2d, 0x53, 0xb4, 0xc3, 0x5f,
0x69, 0x60, 0xb1, 0xab, 0x26, 0x56, 0x83, 0x7e, 0xb3, 0x3d, 0x4a, 0x0d, 0x5a, 0x1d, 0x1e,
0x59, 0xd6, 0x35, 0x8c, 0xf3, 0x9b, 0x18, 0x66, 0xbf, 0xe2, 0x62, 0x92, 0x7b, 0xff, 0x2e,
0x5c, 0xcf, 0x25, 0xc4, 0xaf, 0xd2, 0x29, 0x63, 0xa5, 0xb2, 0xf9, 0x6a, 0xc1, 0xfb, 0x14,
0x87, 0x55, 0x73, 0x2c, 0x44, 0x31, 0x79, 0xf4, 0x2a, 0x41, 0x01, 0x24, 0x80, 0x19, 0x65,
0x4d, 0x9d, 0x9c, 0xe8, 0x13, 0xa2, 0xc0, 0xc5, 0xfe, 0x6b, 0xce, 0x50, 0xf8, 0x04, 0x48,
0xa8, 0x06, 0x16, 0xbe, 0x67, 0xba, 0xea, 0xc6, 0x0f, 0xd7, 0x74, 0x85, 0xb6, 0xd8, 0x0e,
0x4c, 0x93, 0x15, 0xbd, 0xe6, 0x78, 0x03, 0x05, 0x32, 0xf7, 0x34, 0xe4, 0xad, 0x30, 0x98,
0xa1, 0x27, 0x9e, 0xf6, 0x43, 0x64, 0x3c, 0x49, 0xbc, 0xf0, 0x99, 0xdd, 0x12, 0xd1, 0xc9,
0x5d, 0x7c, 0x22, 0x75, 0x1f, 0x28, 0x2f, 0x09, 0xc2, 0x84, 0x6d, 0xfa, 0x23, 0x3f, 0x7d,
0x91, 0x89, 0x82, 0x86, 0x58, 0xdf, 0x76, 0xe9, 0xaa, 0xdb, 0xac, 0x2b, 0xf5, 0x90, 0x42,
0x20, 0xe1, 0xa0, 0xed, 0xd4, 0x52, 0x10, 0xef, 0x3e, 0xe3, 0x1c, 0xda, 0x96, 0xb0, 0x72,
0x38,
},
};
static inline u8 ROR8(const u8 a, const u8 b)
{
return (a >> b) | ((a << (8 - b)) & 0xff);
}
static void GenerateKey(const u8* const rand, const u8 idx, u8* const key)
{
const u8* const ans = ans_tbl[idx];
u8 t0[10];
for (int i = 0; i < 10; ++i)
t0[i] = tsbox[rand[i]];
key[0] = ((ROR8((ans[0] ^ t0[5]), (t0[2] % 8)) - t0[9]) ^ t0[4]);
key[1] = ((ROR8((ans[1] ^ t0[1]), (t0[0] % 8)) - t0[5]) ^ t0[7]);
key[2] = ((ROR8((ans[2] ^ t0[6]), (t0[8] % 8)) - t0[2]) ^ t0[0]);
key[3] = ((ROR8((ans[3] ^ t0[4]), (t0[7] % 8)) - t0[3]) ^ t0[2]);
key[4] = ((ROR8((ans[4] ^ t0[1]), (t0[6] % 8)) - t0[3]) ^ t0[4]);
key[5] = ((ROR8((ans[5] ^ t0[7]), (t0[8] % 8)) - t0[5]) ^ t0[9]);
}
static void GenerateTables(const u8* const rand, const u8* const key, const u8 idx, u8* const ft,
u8* const sb)
{
ft[0] = sboxes[idx][key[4]] ^ sboxes[(idx + 1) % 8][rand[3]];
ft[1] = sboxes[idx][key[2]] ^ sboxes[(idx + 1) % 8][rand[5]];
ft[2] = sboxes[idx][key[5]] ^ sboxes[(idx + 1) % 8][rand[7]];
ft[3] = sboxes[idx][key[0]] ^ sboxes[(idx + 1) % 8][rand[2]];
ft[4] = sboxes[idx][key[1]] ^ sboxes[(idx + 1) % 8][rand[4]];
ft[5] = sboxes[idx][key[3]] ^ sboxes[(idx + 1) % 8][rand[9]];
ft[6] = sboxes[idx][rand[0]] ^ sboxes[(idx + 1) % 8][rand[6]];
ft[7] = sboxes[idx][rand[1]] ^ sboxes[(idx + 1) % 8][rand[8]];
sb[0] = sboxes[idx][key[0]] ^ sboxes[(idx + 1) % 8][rand[1]];
sb[1] = sboxes[idx][key[5]] ^ sboxes[(idx + 1) % 8][rand[4]];
sb[2] = sboxes[idx][key[3]] ^ sboxes[(idx + 1) % 8][rand[0]];
sb[3] = sboxes[idx][key[2]] ^ sboxes[(idx + 1) % 8][rand[9]];
sb[4] = sboxes[idx][key[4]] ^ sboxes[(idx + 1) % 8][rand[7]];
sb[5] = sboxes[idx][key[1]] ^ sboxes[(idx + 1) % 8][rand[8]];
sb[6] = sboxes[idx][rand[3]] ^ sboxes[(idx + 1) % 8][rand[5]];
sb[7] = sboxes[idx][rand[2]] ^ sboxes[(idx + 1) % 8][rand[6]];
}
} // namespace
namespace WiimoteEmu
{
// Generate key from the 0x40-0x4c data in g_RegExt
void EncryptionKey::Generate(const u8* const keydata)
void EncryptionKey::GenerateTables(const RandData& rand, const KeyData& key, const u32 idx,
const u8 offset)
{
u8 rand[10];
u8 skey[6];
u8 testkey[6];
int idx;
ft[0] = sboxes[idx][key[4] + offset] ^ sboxes[idx + 1][rand[3] + offset];
ft[1] = sboxes[idx][key[2] + offset] ^ sboxes[idx + 1][rand[5] + offset];
ft[2] = sboxes[idx][key[5] + offset] ^ sboxes[idx + 1][rand[7] + offset];
ft[3] = sboxes[idx][key[0] + offset] ^ sboxes[idx + 1][rand[2] + offset];
ft[4] = sboxes[idx][key[1] + offset] ^ sboxes[idx + 1][rand[4] + offset];
ft[5] = sboxes[idx][key[3] + offset] ^ sboxes[idx + 1][rand[9] + offset];
ft[6] = sboxes[idx][rand[0] + offset] ^ sboxes[idx + 1][rand[6] + offset];
ft[7] = sboxes[idx][rand[1] + offset] ^ sboxes[idx + 1][rand[8] + offset];
for (int i = 0; i < 10; ++i)
rand[9 - i] = keydata[i];
for (int i = 0; i < 6; ++i)
skey[5 - i] = keydata[i + 10];
for (idx = 0; idx < 7; ++idx)
{
GenerateKey(rand, idx, testkey);
if (0 == memcmp(testkey, skey, 6))
break;
}
// default case is idx = 7 which is valid (homebrew uses it for the 0x17 case)
GenerateTables(rand, skey, idx, ft, sb);
// for homebrew, ft and sb are all 0x97 which is equivalent to 0x17
sb[0] = sboxes[idx][key[0] + offset] ^ sboxes[idx + 1][rand[1] + offset];
sb[1] = sboxes[idx][key[5] + offset] ^ sboxes[idx + 1][rand[4] + offset];
sb[2] = sboxes[idx][key[3] + offset] ^ sboxes[idx + 1][rand[0] + offset];
sb[3] = sboxes[idx][key[2] + offset] ^ sboxes[idx + 1][rand[9] + offset];
sb[4] = sboxes[idx][key[4] + offset] ^ sboxes[idx + 1][rand[7] + offset];
sb[5] = sboxes[idx][key[1] + offset] ^ sboxes[idx + 1][rand[8] + offset];
sb[6] = sboxes[idx][rand[3] + offset] ^ sboxes[idx + 1][rand[5] + offset];
sb[7] = sboxes[idx][rand[2] + offset] ^ sboxes[idx + 1][rand[6] + offset];
}
// Question: Is there a reason these can only handle a length of 255?
// Answer: The i2c address space is only 8-bits so it really doesn't need to.
// Also, only 21 bytes are ever encrypted at most (6 in any normal game).
void EncryptionKey::Encrypt(u8* const data, int addr, const u8 len) const
// Generate key from the 0x40-0x4f data in the extension register.
EncryptionKey KeyGen::GenerateFromExtensionKeyData(const ExtKeyData& ext_key) const
{
for (int i = 0; i < len; ++i, ++addr)
EncryptionKey::RandData rand;
std::copy_n(ext_key.begin(), rand.size(), rand.rbegin());
EncryptionKey::KeyData key;
std::copy_n(ext_key.begin() + rand.size(), key.size(), key.rbegin());
// The "key" is generated from "rand" and "idx".
// The tables are generated from "rand" "key" and "idx".
// But "idx" is not sent to the extension.
// We brute force which "idx" (0-6) the Wii used to generate its "key".
for (u32 idx = 0; idx != 7; ++idx)
{
if (GenerateKeyData(rand, idx) == key)
return GenerateTables(rand, key, idx);
}
// Some homebrew apparently sends "ext_key" filled with 0x00.
// On a real extension this produces tables filled with 0x17 or 0x97 (same effect).
// This is not something that the Wii's algorithm is capable of and our brute force will fail.
WARN_LOG(WIIMOTE, "Extension key generation failed. Filling tables with 0x17.");
// There must be some not understood math behind the extension's table generation.
EncryptionKey result;
result.ft.fill(0x17);
result.sb.fill(0x17);
return result;
}
EncryptionKey::KeyData KeyGen1stParty::GenerateKeyData(const EncryptionKey::RandData& rand,
const u32 idx) const
{
constexpr u8 ans_tbl[7][6] = {
{0xa8, 0x77, 0xa6, 0xe0, 0xf7, 0x43}, {0x5a, 0x35, 0x85, 0xe2, 0x72, 0x97},
{0x8f, 0xb7, 0x1a, 0x62, 0x87, 0x38}, {0x0d, 0x67, 0xc7, 0xbe, 0x4f, 0x3e},
{0x20, 0x76, 0x37, 0x8f, 0x68, 0xb7}, {0xa9, 0x26, 0x3f, 0x2b, 0x10, 0xe3},
{0x30, 0x7e, 0x90, 0x0e, 0x85, 0x0a},
};
auto& ans = ans_tbl[idx];
auto& sbox = sboxes[0];
EncryptionKey::RandData t0;
for (std::size_t i = 0; i != t0.size(); ++i)
t0[i] = sbox[rand[i]];
auto& ror8 = Common::RotateRight<u8>;
return {
u8((ror8(ans[0] ^ t0[5], t0[2]) - t0[9]) ^ t0[4]),
u8((ror8(ans[1] ^ t0[1], t0[0]) - t0[5]) ^ t0[7]),
u8((ror8(ans[2] ^ t0[6], t0[8]) - t0[2]) ^ t0[0]),
u8((ror8(ans[3] ^ t0[4], t0[7]) - t0[3]) ^ t0[2]),
u8((ror8(ans[4] ^ t0[1], t0[6]) - t0[3]) ^ t0[4]),
u8((ror8(ans[5] ^ t0[7], t0[8]) - t0[5]) ^ t0[9]),
};
}
EncryptionKey::KeyData KeyGen3rdParty::GenerateKeyData(const EncryptionKey::RandData& rand,
const u32 idx) const
{
auto& sbox = sboxes[9];
EncryptionKey::RandData t0;
for (std::size_t i = 0; i != t0.size(); ++i)
t0[i] = sbox[rand[i] + 0x30];
const auto ans = &sbox[idx * 6];
auto& rol8 = Common::RotateLeft<u8>;
return {
u8(t0[7] ^ t0[6] + rol8(ans[0] ^ t0[0], t0[1])),
u8(t0[1] ^ t0[3] + rol8(ans[1] ^ t0[4], t0[2])),
u8(t0[5] ^ t0[4] + rol8(ans[2] ^ t0[2], t0[8])),
u8(t0[0] ^ t0[7] + rol8(ans[3] ^ t0[6], t0[9])),
u8(t0[1] ^ t0[8] + rol8(ans[4] ^ t0[5], t0[4])),
u8(t0[5] ^ t0[8] + rol8(ans[5] ^ t0[9], t0[3])),
};
}
EncryptionKey KeyGen1stParty::GenerateTables(const EncryptionKey::RandData& rand,
const EncryptionKey::KeyData& key, u32 idx) const
{
EncryptionKey result;
result.GenerateTables(rand, key, idx + 1, 0);
return result;
}
EncryptionKey KeyGen3rdParty::GenerateTables(const EncryptionKey::RandData& rand,
const EncryptionKey::KeyData& key, u32 idx) const
{
EncryptionKey result;
result.GenerateTables(rand, key, idx + 10, 0x30);
return result;
}
void EncryptionKey::Encrypt(u8* const data, u32 addr, const u32 len) const
{
for (u32 i = 0; i != len; ++i, ++addr)
data[i] = (data[i] - ft[addr % 8]) ^ sb[addr % 8];
}
void EncryptionKey::Decrypt(u8* const data, int addr, const u8 len) const
void EncryptionKey::Decrypt(u8* const data, u32 addr, const u32 len) const
{
for (int i = 0; i < len; ++i, ++addr)
for (u32 i = 0; i != len; ++i, ++addr)
data[i] = (data[i] ^ sb[addr % 8]) + ft[addr % 8];
}

View File

@ -6,6 +6,8 @@
#pragma once
#include <array>
#include "Common/CommonTypes.h"
namespace WiimoteEmu
@ -13,14 +15,50 @@ namespace WiimoteEmu
class EncryptionKey
{
public:
void Generate(const u8* keydata);
void Encrypt(u8* data, u32 addr, u32 len) const;
void Decrypt(u8* data, u32 addr, u32 len) const;
void Encrypt(u8* data, int addr, u8 len) const;
void Decrypt(u8* data, int addr, u8 len) const;
using RandData = std::array<u8, 10>;
using KeyData = std::array<u8, 6>;
void GenerateTables(const RandData& rand, const KeyData& key, const u32 idx, const u8 offset);
std::array<u8, 8> ft = {};
std::array<u8, 8> sb = {};
};
class KeyGen
{
public:
virtual ~KeyGen() = default;
using ExtKeyData = std::array<u8, 16>;
EncryptionKey GenerateFromExtensionKeyData(const ExtKeyData& key_data) const;
protected:
virtual EncryptionKey::KeyData GenerateKeyData(const EncryptionKey::RandData& rand,
u32 idx) const = 0;
virtual EncryptionKey GenerateTables(const EncryptionKey::RandData& rand,
const EncryptionKey::KeyData& key, u32 idx) const = 0;
};
class KeyGen1stParty final : public KeyGen
{
private:
u8 ft[8] = {};
u8 sb[8] = {};
EncryptionKey::KeyData GenerateKeyData(const EncryptionKey::RandData& rand,
u32 idx) const final override;
EncryptionKey GenerateTables(const EncryptionKey::RandData& rand,
const EncryptionKey::KeyData& key, u32 idx) const final override;
};
class KeyGen3rdParty final : public KeyGen
{
private:
EncryptionKey::KeyData GenerateKeyData(const EncryptionKey::RandData& rand,
u32 idx) const final override;
EncryptionKey GenerateTables(const EncryptionKey::RandData& rand,
const EncryptionKey::KeyData& key, u32 idx) const final override;
};
} // namespace WiimoteEmu

View File

@ -72,7 +72,7 @@ constexpr std::array<u16, 4> classic_dpad_bitmasks{{
Classic::PAD_RIGHT,
}};
Classic::Classic() : EncryptedExtension(_trans("Classic"))
Classic::Classic() : Extension1stParty(_trans("Classic"))
{
// buttons
groups.emplace_back(m_buttons = new ControllerEmu::Buttons(_trans("Buttons")));
@ -172,7 +172,8 @@ bool Classic::IsButtonPressed() const
void Classic::Reset()
{
m_reg = {};
EncryptedExtension::Reset();
m_reg.identifier = classic_id;
// Build calibration data:

View File

@ -26,7 +26,7 @@ enum class ClassicGroup
RightStick
};
class Classic : public EncryptedExtension
class Classic : public Extension1stParty
{
public:
union ButtonFormat

View File

@ -44,7 +44,7 @@ constexpr std::array<u16, 2> drum_button_bitmasks{{
Drums::BUTTON_PLUS,
}};
Drums::Drums() : EncryptedExtension(_trans("Drums"))
Drums::Drums() : Extension1stParty(_trans("Drums"))
{
// pads
groups.emplace_back(m_pads = new ControllerEmu::Buttons(_trans("Pads")));
@ -106,7 +106,8 @@ bool Drums::IsButtonPressed() const
void Drums::Reset()
{
m_reg = {};
EncryptedExtension::Reset();
m_reg.identifier = drums_id;
// TODO: Is there calibration data?

View File

@ -22,8 +22,8 @@ enum class DrumsGroup
Stick
};
// TODO: Do the drums ever use encryption?
class Drums : public EncryptedExtension
// The Drums use the "1st-party" extension encryption scheme.
class Drums : public Extension1stParty
{
public:
struct DataFormat

View File

@ -12,6 +12,8 @@
#include "Common/Compiler.h"
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
#include "Common/Logging/Log.h"
namespace WiimoteEmu
{
Extension::Extension(const char* name) : m_name(name)
@ -85,15 +87,16 @@ int EncryptedExtension::BusRead(u8 slave_addr, u8 addr, int count, u8* data_out)
auto const result = RawRead(&m_reg, addr, count, data_out);
// Encrypt data read from extension register
// Encrypt data read from extension register.
if (ENCRYPTION_ENABLED == m_reg.encryption)
{
// INFO_LOG(WIIMOTE, "Encrypted read.");
ext_key.Encrypt(data_out, addr, (u8)count);
}
else
if (m_is_key_dirty)
{
// INFO_LOG(WIIMOTE, "Unencrypted read.");
UpdateEncryptionKey();
m_is_key_dirty = false;
}
ext_key.Encrypt(data_out, addr, count);
}
return result;
@ -106,24 +109,48 @@ int EncryptedExtension::BusWrite(u8 slave_addr, u8 addr, int count, const u8* da
auto const result = RawWrite(&m_reg, addr, count, data_in);
// TODO: make this check less ugly:
if (addr + count > 0x40 && addr < 0x50)
constexpr u8 ENCRYPTION_KEY_DATA_BEGIN = offsetof(Register, encryption_key_data);
constexpr u8 ENCRYPTION_KEY_DATA_END = ENCRYPTION_KEY_DATA_BEGIN + 0x10;
if (addr + count > ENCRYPTION_KEY_DATA_BEGIN && addr < ENCRYPTION_KEY_DATA_END)
{
// Run the key generation on all writes in the key area, it doesn't matter
// that we send it parts of a key, only the last full key will have an effect
ext_key.Generate(m_reg.encryption_key_data);
// FYI: Real extensions seem to require the key data written in specifically sized chunks.
// We just run the key generation on all writes to the key area.
m_is_key_dirty = true;
}
return result;
}
void EncryptedExtension::Reset()
{
// Clear register state.
m_reg = {};
// Clear encryption key state.
ext_key = {};
m_is_key_dirty = true;
}
void EncryptedExtension::DoState(PointerWrap& p)
{
p.Do(m_reg);
// No need to sync this when we can regenerate it:
if (p.GetMode() == PointerWrap::MODE_READ)
ext_key.Generate(m_reg.encryption_key_data);
{
// No need to sync the key when we can just regenerate it.
m_is_key_dirty = true;
}
}
void Extension1stParty::UpdateEncryptionKey()
{
ext_key = KeyGen1stParty().GenerateFromExtensionKeyData(m_reg.encryption_key_data);
}
void Extension3rdParty::UpdateEncryptionKey()
{
ext_key = KeyGen3rdParty().GenerateFromExtensionKeyData(m_reg.encryption_key_data);
}
} // namespace WiimoteEmu

View File

@ -64,7 +64,7 @@ public:
// TODO: This is public for TAS reasons.
// TODO: TAS handles encryption poorly.
WiimoteEmu::EncryptionKey ext_key = {};
EncryptionKey ext_key;
protected:
static constexpr int CALIBRATION_CHECKSUM_BYTES = 2;
@ -82,7 +82,7 @@ protected:
u8 unknown3[0x10];
// address 0x40
u8 encryption_key_data[0x10];
std::array<u8, 0x10> encryption_key_data;
u8 unknown4[0xA0];
// address 0xF0
@ -98,9 +98,14 @@ protected:
Register m_reg = {};
void Reset() override;
void DoState(PointerWrap& p) override;
virtual void UpdateEncryptionKey() = 0;
private:
bool m_is_key_dirty = true;
static constexpr u8 ENCRYPTION_ENABLED = 0xaa;
bool ReadDeviceDetectPin() const override;
@ -109,4 +114,22 @@ private:
int BusWrite(u8 slave_addr, u8 addr, int count, const u8* data_in) override;
};
class Extension1stParty : public EncryptedExtension
{
protected:
using EncryptedExtension::EncryptedExtension;
private:
void UpdateEncryptionKey() final override;
};
class Extension3rdParty : public EncryptedExtension
{
protected:
using EncryptedExtension::EncryptedExtension;
private:
void UpdateEncryptionKey() final override;
};
} // namespace WiimoteEmu

View File

@ -62,7 +62,7 @@ constexpr std::array<u16, 2> guitar_strum_bitmasks{{
Guitar::BAR_DOWN,
}};
Guitar::Guitar() : EncryptedExtension(_trans("Guitar"))
Guitar::Guitar() : Extension1stParty(_trans("Guitar"))
{
// frets
groups.emplace_back(m_frets = new ControllerEmu::Buttons(_trans("Frets")));
@ -152,7 +152,8 @@ bool Guitar::IsButtonPressed() const
void Guitar::Reset()
{
m_reg = {};
EncryptedExtension::Reset();
m_reg.identifier = guitar_id;
// TODO: Is there calibration data?

View File

@ -27,8 +27,8 @@ enum class GuitarGroup
SliderBar
};
// TODO: Does the guitar ever use encryption?
class Guitar : public EncryptedExtension
// The Guitar uses the "1st-party" extension encryption scheme.
class Guitar : public Extension1stParty
{
public:
struct DataFormat

View File

@ -31,7 +31,7 @@ constexpr std::array<u8, 2> nunchuk_button_bitmasks{{
Nunchuk::BUTTON_Z,
}};
Nunchuk::Nunchuk() : EncryptedExtension(_trans("Nunchuk"))
Nunchuk::Nunchuk() : Extension1stParty(_trans("Nunchuk"))
{
// buttons
groups.emplace_back(m_buttons = new ControllerEmu::Buttons(_trans("Buttons")));
@ -121,7 +121,8 @@ bool Nunchuk::IsButtonPressed() const
void Nunchuk::Reset()
{
m_reg = {};
EncryptedExtension::Reset();
m_reg.identifier = nunchuk_id;
m_swing_state = {};

View File

@ -30,7 +30,7 @@ enum class NunchukGroup
Shake
};
class Nunchuk : public EncryptedExtension
class Nunchuk : public Extension1stParty
{
public:
union ButtonFormat

View File

@ -45,7 +45,7 @@ constexpr std::array<const char*, 6> turntable_button_names{{
_trans("Blue Right"),
}};
Turntable::Turntable() : EncryptedExtension(_trans("Turntable"))
Turntable::Turntable() : Extension1stParty(_trans("Turntable"))
{
// buttons
groups.emplace_back(m_buttons = new ControllerEmu::Buttons(_trans("Buttons")));
@ -148,7 +148,8 @@ bool Turntable::IsButtonPressed() const
void Turntable::Reset()
{
m_reg = {};
EncryptedExtension::Reset();
m_reg.identifier = turntable_id;
// TODO: Is there calibration data?

View File

@ -27,8 +27,8 @@ enum class TurntableGroup
Crossfade
};
// TODO: Does the turntable ever use encryption?
class Turntable : public EncryptedExtension
// The DJ Hero Turntable uses the "1st-party" extension encryption scheme.
class Turntable : public Extension1stParty
{
public:
struct DataFormat

View File

@ -0,0 +1,147 @@
// Copyright 2019 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include "Core/HW/WiimoteEmu/Extension/UDrawTablet.h"
#include <array>
#include <cassert>
#include "Common/BitUtils.h"
#include "Common/Common.h"
#include "Common/CommonTypes.h"
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
#include "InputCommon/ControllerEmu/Control/Input.h"
#include "InputCommon/ControllerEmu/ControlGroup/AnalogStick.h"
#include "InputCommon/ControllerEmu/ControlGroup/Buttons.h"
#include "InputCommon/ControllerEmu/ControlGroup/Triggers.h"
namespace WiimoteEmu
{
constexpr std::array<u8, 6> udraw_tablet_id{{0xff, 0x00, 0xa4, 0x20, 0x01, 0x12}};
constexpr std::array<u8, 2> udraw_tablet_button_bitmasks{{
UDrawTablet::BUTTON_ROCKER_UP,
UDrawTablet::BUTTON_ROCKER_DOWN,
}};
constexpr std::array<const char*, 2> udraw_tablet_button_names{{
_trans("Rocker Up"),
_trans("Rocker Down"),
}};
UDrawTablet::UDrawTablet() : Extension3rdParty(_trans("uDraw"))
{
// Buttons
groups.emplace_back(m_buttons = new ControllerEmu::Buttons(_trans("Buttons")));
for (auto& button_name : udraw_tablet_button_names)
{
m_buttons->controls.emplace_back(
new ControllerEmu::Input(ControllerEmu::Translate, button_name));
}
// Stylus
groups.emplace_back(m_stylus = new ControllerEmu::AnalogStick(
_trans("Stylus"), std::make_unique<ControllerEmu::SquareStickGate>(1.0)));
// Touch
groups.emplace_back(m_touch = new ControllerEmu::Triggers(_trans("Touch")));
m_touch->controls.emplace_back(
new ControllerEmu::Input(ControllerEmu::Translate, _trans("Pressure")));
}
void UDrawTablet::Update()
{
DataFormat tablet_data = {};
// Pressure:
// Min/Max values produced on my device: 0x08, 0xf2
// We're just gonna assume it's an old sensor and use the full byte range:
// Note: Pressure values are valid even when stylus is lifted.
constexpr u8 max_pressure = 0xff;
const auto touch_state = m_touch->GetState();
tablet_data.pressure = static_cast<u8>(touch_state.data[0] * max_pressure);
// Stylus X/Y:
// Min/Max X values (when touched) produced on my device: 0x4f, 0x7B3
// Drawing area edge (approx) X values on my device: 0x56, 0x7a5
// Min/Max Y values (when touched) produced on my device: 0x53, 0x5b4
// Drawing area edge (approx) Y values on my device: 0x5e, 0x5a5
// Calibrated for "uDraw Studio: Instant Artist".
constexpr u16 min_x = 0x56;
constexpr u16 max_x = 0x780;
constexpr u16 min_y = 0x65;
constexpr u16 max_y = 0x5a5;
constexpr double center_x = (max_x + min_x) / 2.0;
constexpr double center_y = (max_y + min_y) / 2.0;
// Neutral (lifted) stylus state:
u16 stylus_x = 0x7ff;
u16 stylus_y = 0x7ff;
// TODO: Expose the lifted stylus state in the UI.
bool is_stylus_lifted = false;
const auto stylus_state = m_stylus->GetState();
if (!is_stylus_lifted)
{
stylus_x = u16(center_x + stylus_state.x * (max_x - center_x));
stylus_y = u16(center_y + stylus_state.y * (max_y - center_y));
}
tablet_data.stylus_x1 = stylus_x & 0xff;
tablet_data.stylus_x2 = stylus_x >> 8;
tablet_data.stylus_y1 = stylus_y & 0xff;
tablet_data.stylus_y2 = stylus_y >> 8;
// Buttons:
m_buttons->GetState(&tablet_data.buttons, udraw_tablet_button_bitmasks.data());
// Flip button bits
constexpr u8 buttons_neutral_state = 0xfb;
tablet_data.buttons ^= buttons_neutral_state;
// Always 0xff
tablet_data.unk = 0xff;
Common::BitCastPtr<DataFormat>(&m_reg.controller_data) = tablet_data;
}
void UDrawTablet::Reset()
{
EncryptedExtension::Reset();
m_reg.identifier = udraw_tablet_id;
// Both 0x20 and 0x30 calibration sections are just filled with 0xff on the real tablet:
m_reg.calibration.fill(0xff);
}
bool UDrawTablet::IsButtonPressed() const
{
u8 buttons = 0;
m_buttons->GetState(&buttons, udraw_tablet_button_bitmasks.data());
return buttons != 0;
}
ControllerEmu::ControlGroup* UDrawTablet::GetGroup(UDrawTabletGroup group)
{
switch (group)
{
case UDrawTabletGroup::Buttons:
return m_buttons;
case UDrawTabletGroup::Stylus:
return m_stylus;
case UDrawTabletGroup::Touch:
return m_touch;
default:
assert(false);
return nullptr;
}
}
} // namespace WiimoteEmu

View File

@ -0,0 +1,68 @@
// Copyright 2019 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include "Core/HW/WiimoteEmu/Extension/Extension.h"
namespace ControllerEmu
{
class Buttons;
class AnalogStick;
class Triggers;
class ControlGroup;
} // namespace ControllerEmu
namespace WiimoteEmu
{
enum class UDrawTabletGroup
{
Buttons,
Stylus,
Touch,
};
class UDrawTablet : public Extension3rdParty
{
public:
UDrawTablet();
void Update() override;
bool IsButtonPressed() const override;
void Reset() override;
ControllerEmu::ControlGroup* GetGroup(UDrawTabletGroup group);
static constexpr u8 BUTTON_ROCKER_UP = 0x1;
static constexpr u8 BUTTON_ROCKER_DOWN = 0x2;
struct DataFormat
{
// Bytes 0-2 are 0xff when stylus is lifted
// X increases from left to right
// Y increases from bottom to top
u8 stylus_x1;
u8 stylus_y1;
u8 stylus_x2 : 4;
u8 stylus_y2 : 4;
// Valid even when stylus is lifted
u8 pressure;
// Always 0xff
u8 unk;
// Buttons are 0 when pressed
// 0x04 is always unset (neutral state is 0xfb)
u8 buttons;
};
static_assert(6 == sizeof(DataFormat), "Wrong size.");
private:
ControllerEmu::Buttons* m_buttons;
ControllerEmu::AnalogStick* m_stylus;
ControllerEmu::Triggers* m_touch;
};
} // namespace WiimoteEmu

View File

@ -19,6 +19,7 @@ enum ExtensionNumber : u8
GUITAR,
DRUMS,
TURNTABLE,
UDRAW_TABLET,
};
// FYI: An extension must be attached.

View File

@ -30,6 +30,7 @@
#include "Core/HW/WiimoteEmu/Extension/Guitar.h"
#include "Core/HW/WiimoteEmu/Extension/Nunchuk.h"
#include "Core/HW/WiimoteEmu/Extension/Turntable.h"
#include "Core/HW/WiimoteEmu/Extension/UDrawTablet.h"
#include "InputCommon/ControllerEmu/Control/Input.h"
#include "InputCommon/ControllerEmu/Control/Output.h"
@ -165,6 +166,7 @@ Wiimote::Wiimote(const unsigned int index) : m_index(index)
m_attachments->AddAttachment(std::make_unique<WiimoteEmu::Guitar>());
m_attachments->AddAttachment(std::make_unique<WiimoteEmu::Drums>());
m_attachments->AddAttachment(std::make_unique<WiimoteEmu::Turntable>());
m_attachments->AddAttachment(std::make_unique<WiimoteEmu::UDrawTablet>());
m_attachments->AddSetting(&m_motion_plus_setting, {_trans("Attach MotionPlus")}, true);
@ -284,6 +286,13 @@ ControllerEmu::ControlGroup* Wiimote::GetTurntableGroup(TurntableGroup group)
->GetGroup(group);
}
ControllerEmu::ControlGroup* Wiimote::GetUDrawTabletGroup(UDrawTabletGroup group)
{
return static_cast<UDrawTablet*>(
m_attachments->GetAttachmentList()[ExtensionNumber::UDRAW_TABLET].get())
->GetGroup(group);
}
bool Wiimote::ProcessExtensionPortEvent()
{
// WiiBrew: Following a connection or disconnection event on the Extension Port,

View File

@ -55,6 +55,7 @@ enum class ClassicGroup;
enum class GuitarGroup;
enum class DrumsGroup;
enum class TurntableGroup;
enum class UDrawTabletGroup;
template <typename T>
void UpdateCalibrationDataChecksum(T& data, int cksum_bytes)
@ -113,6 +114,7 @@ public:
ControllerEmu::ControlGroup* GetGuitarGroup(GuitarGroup group);
ControllerEmu::ControlGroup* GetDrumsGroup(DrumsGroup group);
ControllerEmu::ControlGroup* GetTurntableGroup(TurntableGroup group);
ControllerEmu::ControlGroup* GetUDrawTabletGroup(UDrawTabletGroup group);
void Update();
void StepDynamics();

View File

@ -15,6 +15,7 @@
#include "Core/HW/WiimoteEmu/Extension/Guitar.h"
#include "Core/HW/WiimoteEmu/Extension/Nunchuk.h"
#include "Core/HW/WiimoteEmu/Extension/Turntable.h"
#include "Core/HW/WiimoteEmu/Extension/UDrawTablet.h"
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
#include "InputCommon/InputConfig.h"
@ -27,6 +28,7 @@ WiimoteEmuExtension::WiimoteEmuExtension(MappingWindow* window) : MappingWidget(
CreateNoneLayout();
CreateNunchukLayout();
CreateTurntableLayout();
CreateUDrawTabletLayout();
CreateMainLayout();
ChangeExtensionType(WiimoteEmu::ExtensionNumber::NONE);
@ -181,6 +183,24 @@ void WiimoteEmuExtension::CreateTurntableLayout()
m_turntable_box->setLayout(layout);
}
void WiimoteEmuExtension::CreateUDrawTabletLayout()
{
auto* hbox = new QHBoxLayout();
m_udraw_tablet_box = new QGroupBox(tr("uDraw GameTablet"), this);
hbox->addWidget(CreateGroupBox(
tr("Buttons"),
Wiimote::GetUDrawTabletGroup(GetPort(), WiimoteEmu::UDrawTabletGroup::Buttons)));
hbox->addWidget(CreateGroupBox(
tr("Stylus"), Wiimote::GetUDrawTabletGroup(GetPort(), WiimoteEmu::UDrawTabletGroup::Stylus)));
hbox->addWidget(CreateGroupBox(
tr("Touch"), Wiimote::GetUDrawTabletGroup(GetPort(), WiimoteEmu::UDrawTabletGroup::Touch)));
m_udraw_tablet_box->setLayout(hbox);
}
void WiimoteEmuExtension::CreateMainLayout()
{
m_main_layout = new QHBoxLayout();
@ -191,6 +211,7 @@ void WiimoteEmuExtension::CreateMainLayout()
m_main_layout->addWidget(m_none_box);
m_main_layout->addWidget(m_nunchuk_box);
m_main_layout->addWidget(m_turntable_box);
m_main_layout->addWidget(m_udraw_tablet_box);
setLayout(m_main_layout);
}
@ -220,4 +241,5 @@ void WiimoteEmuExtension::ChangeExtensionType(u32 type)
m_guitar_box->setHidden(type != ExtensionNumber::GUITAR);
m_drums_box->setHidden(type != ExtensionNumber::DRUMS);
m_turntable_box->setHidden(type != ExtensionNumber::TURNTABLE);
m_udraw_tablet_box->setHidden(type != ExtensionNumber::UDRAW_TABLET);
}

View File

@ -31,6 +31,7 @@ private:
void CreateNoneLayout();
void CreateNunchukLayout();
void CreateTurntableLayout();
void CreateUDrawTabletLayout();
void CreateMainLayout();
// Main
@ -41,4 +42,5 @@ private:
QGroupBox* m_none_box;
QGroupBox* m_nunchuk_box;
QGroupBox* m_turntable_box;
QGroupBox* m_udraw_tablet_box;
};