diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 03d97dec..e9bc0da2 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -149,6 +149,7 @@ add_library(skyline SHARED ${source_DIR}/skyline/soc/gm20b/engines/gpfifo.cpp ${source_DIR}/skyline/soc/gm20b/engines/maxwell_3d.cpp ${source_DIR}/skyline/soc/gm20b/engines/maxwell/macro_interpreter.cpp + ${source_DIR}/skyline/soc/gm20b/engines/maxwell/initialization.cpp ${source_DIR}/skyline/input/npad.cpp ${source_DIR}/skyline/input/npad_device.cpp ${source_DIR}/skyline/input/touch.cpp diff --git a/app/src/main/cpp/skyline/soc/gm20b/engines/maxwell/initialization.cpp b/app/src/main/cpp/skyline/soc/gm20b/engines/maxwell/initialization.cpp new file mode 100644 index 00000000..803d7d03 --- /dev/null +++ b/app/src/main/cpp/skyline/soc/gm20b/engines/maxwell/initialization.cpp @@ -0,0 +1,1345 @@ +// SPDX-License-Identifier: MPL-2.0 +// Copyright © 2021 Skyline Team and Contributors (https://github.com/skyline-emu/) +// Copyright © 2020 Ryujinx Team and Contributors + +#include + +namespace skyline::soc::gm20b::engine::maxwell3d { + void Maxwell3D::InitializeRegisters() { + registers = {}; + + HandleMethod(0x200, 0x0); + HandleMethod(0x210, 0x0); + HandleMethod(0x220, 0x0); + HandleMethod(0x230, 0x0); + HandleMethod(0x240, 0x0); + HandleMethod(0x250, 0x0); + HandleMethod(0x260, 0x0); + HandleMethod(0x270, 0x0); + HandleMethod(0x201, 0x0); + HandleMethod(0x211, 0x0); + HandleMethod(0x221, 0x0); + HandleMethod(0x231, 0x0); + HandleMethod(0x241, 0x0); + HandleMethod(0x251, 0x0); + HandleMethod(0x261, 0x0); + HandleMethod(0x271, 0x0); + HandleMethod(0x202, 0x400); + HandleMethod(0x212, 0x400); + HandleMethod(0x222, 0x400); + HandleMethod(0x232, 0x400); + HandleMethod(0x242, 0x400); + HandleMethod(0x252, 0x400); + HandleMethod(0x262, 0x400); + HandleMethod(0x272, 0x400); + HandleMethod(0x203, 0x300); + HandleMethod(0x213, 0x300); + HandleMethod(0x223, 0x300); + HandleMethod(0x233, 0x300); + HandleMethod(0x243, 0x300); + HandleMethod(0x253, 0x300); + HandleMethod(0x263, 0x300); + HandleMethod(0x273, 0x300); + HandleMethod(0x204, 0xCF); + HandleMethod(0x214, 0x0); + HandleMethod(0x224, 0x0); + HandleMethod(0x234, 0x0); + HandleMethod(0x244, 0x0); + HandleMethod(0x254, 0x0); + HandleMethod(0x264, 0x0); + HandleMethod(0x274, 0x0); + HandleMethod(0x205, 0x40); + HandleMethod(0x215, 0x40); + HandleMethod(0x225, 0x40); + HandleMethod(0x235, 0x40); + HandleMethod(0x245, 0x40); + HandleMethod(0x255, 0x40); + HandleMethod(0x265, 0x40); + HandleMethod(0x275, 0x40); + HandleMethod(0x206, 0x1); + HandleMethod(0x216, 0x1); + HandleMethod(0x226, 0x1); + HandleMethod(0x236, 0x1); + HandleMethod(0x246, 0x1); + HandleMethod(0x256, 0x1); + HandleMethod(0x266, 0x1); + HandleMethod(0x276, 0x1); + HandleMethod(0x207, 0x0); + HandleMethod(0x217, 0x0); + HandleMethod(0x227, 0x0); + HandleMethod(0x237, 0x0); + HandleMethod(0x247, 0x0); + HandleMethod(0x257, 0x0); + HandleMethod(0x267, 0x0); + HandleMethod(0x277, 0x0); + HandleMethod(0x208, 0x0); + HandleMethod(0x218, 0x0); + HandleMethod(0x228, 0x0); + HandleMethod(0x238, 0x0); + HandleMethod(0x248, 0x0); + HandleMethod(0x258, 0x0); + HandleMethod(0x268, 0x0); + HandleMethod(0x278, 0x0); + HandleMethod(0x700, 0x0); + HandleMethod(0x704, 0x0); + HandleMethod(0x708, 0x0); + HandleMethod(0x70C, 0x0); + HandleMethod(0x710, 0x0); + HandleMethod(0x714, 0x0); + HandleMethod(0x718, 0x0); + HandleMethod(0x71C, 0x0); + HandleMethod(0x720, 0x0); + HandleMethod(0x724, 0x0); + HandleMethod(0x728, 0x0); + HandleMethod(0x72C, 0x0); + HandleMethod(0x730, 0x0); + HandleMethod(0x734, 0x0); + HandleMethod(0x738, 0x0); + HandleMethod(0x73C, 0x0); + HandleMethod(0x701, 0x0); + HandleMethod(0x705, 0x0); + HandleMethod(0x709, 0x0); + HandleMethod(0x70D, 0x0); + HandleMethod(0x711, 0x0); + HandleMethod(0x715, 0x0); + HandleMethod(0x719, 0x0); + HandleMethod(0x71D, 0x0); + HandleMethod(0x721, 0x0); + HandleMethod(0x725, 0x0); + HandleMethod(0x729, 0x0); + HandleMethod(0x72D, 0x0); + HandleMethod(0x731, 0x0); + HandleMethod(0x735, 0x0); + HandleMethod(0x739, 0x0); + HandleMethod(0x73D, 0x0); + HandleMethod(0x702, 0x0); + HandleMethod(0x706, 0x0); + HandleMethod(0x70A, 0x0); + HandleMethod(0x70E, 0x0); + HandleMethod(0x712, 0x0); + HandleMethod(0x716, 0x0); + HandleMethod(0x71A, 0x0); + HandleMethod(0x71E, 0x0); + HandleMethod(0x722, 0x0); + HandleMethod(0x726, 0x0); + HandleMethod(0x72A, 0x0); + HandleMethod(0x72E, 0x0); + HandleMethod(0x732, 0x0); + HandleMethod(0x736, 0x0); + HandleMethod(0x73A, 0x0); + HandleMethod(0x73E, 0x0); + HandleMethod(0x703, 0x0); + HandleMethod(0x707, 0x0); + HandleMethod(0x70B, 0x0); + HandleMethod(0x70F, 0x0); + HandleMethod(0x713, 0x0); + HandleMethod(0x717, 0x0); + HandleMethod(0x71B, 0x0); + HandleMethod(0x71F, 0x0); + HandleMethod(0x723, 0x0); + HandleMethod(0x727, 0x0); + HandleMethod(0x72B, 0x0); + HandleMethod(0x72F, 0x0); + HandleMethod(0x733, 0x0); + HandleMethod(0x737, 0x0); + HandleMethod(0x73B, 0x0); + HandleMethod(0x73F, 0x0); + HandleMethod(0x740, 0x0); + HandleMethod(0x744, 0x0); + HandleMethod(0x748, 0x0); + HandleMethod(0x74C, 0x0); + HandleMethod(0x750, 0x0); + HandleMethod(0x754, 0x0); + HandleMethod(0x758, 0x0); + HandleMethod(0x75C, 0x0); + HandleMethod(0x760, 0x0); + HandleMethod(0x764, 0x0); + HandleMethod(0x768, 0x0); + HandleMethod(0x76C, 0x0); + HandleMethod(0x770, 0x0); + HandleMethod(0x774, 0x0); + HandleMethod(0x778, 0x0); + HandleMethod(0x77C, 0x0); + HandleMethod(0x741, 0x0); + HandleMethod(0x745, 0x0); + HandleMethod(0x749, 0x0); + HandleMethod(0x74D, 0x0); + HandleMethod(0x751, 0x0); + HandleMethod(0x755, 0x0); + HandleMethod(0x759, 0x0); + HandleMethod(0x75D, 0x0); + HandleMethod(0x761, 0x0); + HandleMethod(0x765, 0x0); + HandleMethod(0x769, 0x0); + HandleMethod(0x76D, 0x0); + HandleMethod(0x771, 0x0); + HandleMethod(0x775, 0x0); + HandleMethod(0x779, 0x0); + HandleMethod(0x77D, 0x0); + HandleMethod(0x742, 0x0); + HandleMethod(0x746, 0x0); + HandleMethod(0x74A, 0x0); + HandleMethod(0x74E, 0x0); + HandleMethod(0x752, 0x0); + HandleMethod(0x756, 0x0); + HandleMethod(0x75A, 0x0); + HandleMethod(0x75E, 0x0); + HandleMethod(0x762, 0x0); + HandleMethod(0x766, 0x0); + HandleMethod(0x76A, 0x0); + HandleMethod(0x76E, 0x0); + HandleMethod(0x772, 0x0); + HandleMethod(0x776, 0x0); + HandleMethod(0x77A, 0x0); + HandleMethod(0x77E, 0x0); + HandleMethod(0x743, 0x0); + HandleMethod(0x747, 0x0); + HandleMethod(0x74B, 0x0); + HandleMethod(0x74F, 0x0); + HandleMethod(0x753, 0x0); + HandleMethod(0x757, 0x0); + HandleMethod(0x75B, 0x0); + HandleMethod(0x75F, 0x0); + HandleMethod(0x763, 0x0); + HandleMethod(0x767, 0x0); + HandleMethod(0x76B, 0x0); + HandleMethod(0x76F, 0x0); + HandleMethod(0x773, 0x0); + HandleMethod(0x777, 0x0); + HandleMethod(0x77B, 0x0); + HandleMethod(0x77F, 0x0); + HandleMethod(0x7C0, 0x0); + HandleMethod(0x7C2, 0x0); + HandleMethod(0x7C4, 0x0); + HandleMethod(0x7C6, 0x0); + HandleMethod(0x7C8, 0x0); + HandleMethod(0x7CA, 0x0); + HandleMethod(0x7CC, 0x0); + HandleMethod(0x7CE, 0x0); + HandleMethod(0x7D0, 0x0); + HandleMethod(0x7D2, 0x0); + HandleMethod(0x7D4, 0x0); + HandleMethod(0x7D6, 0x0); + HandleMethod(0x7D8, 0x0); + HandleMethod(0x7DA, 0x0); + HandleMethod(0x7DC, 0x0); + HandleMethod(0x7DE, 0x0); + HandleMethod(0x7C1, 0x0); + HandleMethod(0x7C3, 0x0); + HandleMethod(0x7C5, 0x0); + HandleMethod(0x7C7, 0x0); + HandleMethod(0x7C9, 0x0); + HandleMethod(0x7CB, 0x0); + HandleMethod(0x7CD, 0x0); + HandleMethod(0x7CF, 0x0); + HandleMethod(0x7D1, 0x0); + HandleMethod(0x7D3, 0x0); + HandleMethod(0x7D5, 0x0); + HandleMethod(0x7D7, 0x0); + HandleMethod(0x7D9, 0x0); + HandleMethod(0x7DB, 0x0); + HandleMethod(0x7DD, 0x0); + HandleMethod(0x7DF, 0x0); + HandleMethod(0x7E0, 0x0); + HandleMethod(0x7E2, 0x0); + HandleMethod(0x7E4, 0x0); + HandleMethod(0x7E6, 0x0); + HandleMethod(0x7E8, 0x0); + HandleMethod(0x7EA, 0x0); + HandleMethod(0x7EC, 0x0); + HandleMethod(0x7EE, 0x0); + HandleMethod(0x7F0, 0x0); + HandleMethod(0x7F2, 0x0); + HandleMethod(0x7F4, 0x0); + HandleMethod(0x7F6, 0x0); + HandleMethod(0x7F8, 0x0); + HandleMethod(0x7FA, 0x0); + HandleMethod(0x7FC, 0x0); + HandleMethod(0x7FE, 0x0); + HandleMethod(0x7E1, 0x0); + HandleMethod(0x7E3, 0x0); + HandleMethod(0x7E5, 0x0); + HandleMethod(0x7E7, 0x0); + HandleMethod(0x7E9, 0x0); + HandleMethod(0x7EB, 0x0); + HandleMethod(0x7ED, 0x0); + HandleMethod(0x7EF, 0x0); + HandleMethod(0x7F1, 0x0); + HandleMethod(0x7F3, 0x0); + HandleMethod(0x7F5, 0x0); + HandleMethod(0x7F7, 0x0); + HandleMethod(0x7F9, 0x0); + HandleMethod(0x7FB, 0x0); + HandleMethod(0x7FD, 0x0); + HandleMethod(0x7FF, 0x0); + HandleMethod(0x800, 0x0); + HandleMethod(0x810, 0x11); + HandleMethod(0x820, 0x20); + HandleMethod(0x830, 0x30); + HandleMethod(0x840, 0x40); + HandleMethod(0x850, 0x51); + HandleMethod(0x803, 0x1); + HandleMethod(0x813, 0x1); + HandleMethod(0x823, 0x1); + HandleMethod(0x833, 0x1); + HandleMethod(0x843, 0x1); + HandleMethod(0x853, 0x1); + HandleMethod(0x804, 0x0); + HandleMethod(0x814, 0x0); + HandleMethod(0x824, 0x1); + HandleMethod(0x834, 0x2); + HandleMethod(0x844, 0x3); + HandleMethod(0x854, 0x4); + HandleMethod(0xE0, 0x0); + HandleMethod(0xE8, 0x0); + HandleMethod(0xF0, 0x0); + HandleMethod(0xF8, 0x0); + HandleMethod(0xE1, 0x0); + HandleMethod(0xE9, 0x0); + HandleMethod(0xF1, 0x0); + HandleMethod(0xF9, 0x0); + HandleMethod(0xE2, 0x0); + HandleMethod(0xEA, 0x0); + HandleMethod(0xF2, 0x0); + HandleMethod(0xFA, 0x0); + HandleMethod(0xE3, 0x0); + HandleMethod(0xEB, 0x0); + HandleMethod(0xF3, 0x0); + HandleMethod(0xFB, 0x0); + HandleMethod(0x1C0, 0x0); + HandleMethod(0x1C4, 0x0); + HandleMethod(0x1C8, 0x0); + HandleMethod(0x1CC, 0x0); + HandleMethod(0x1C1, 0x0); + HandleMethod(0x1C5, 0x0); + HandleMethod(0x1C9, 0x0); + HandleMethod(0x1CD, 0x0); + HandleMethod(0x1C2, 0x0); + HandleMethod(0x1C6, 0x0); + HandleMethod(0x1CA, 0x0); + HandleMethod(0x1CE, 0x0); + HandleMethod(0xA00, 0x0); + HandleMethod(0xA01, 0x0); + HandleMethod(0xA02, 0x0); + HandleMethod(0xA03, 0x0); + HandleMethod(0xA04, 0x0); + HandleMethod(0xA05, 0x0); + HandleMethod(0xA06, 0x0); + HandleMethod(0xA07, 0x0); + HandleMethod(0xA08, 0x0); + HandleMethod(0xA09, 0x0); + HandleMethod(0xA0A, 0x0); + HandleMethod(0xA0B, 0x0); + HandleMethod(0xA0C, 0x0); + HandleMethod(0xA0D, 0x0); + HandleMethod(0xA0E, 0x0); + HandleMethod(0xA0F, 0x0); + HandleMethod(0xA10, 0x0); + HandleMethod(0xA11, 0x0); + HandleMethod(0xA12, 0x0); + HandleMethod(0xA13, 0x0); + HandleMethod(0xA14, 0x0); + HandleMethod(0xA15, 0x0); + HandleMethod(0xA16, 0x0); + HandleMethod(0xA17, 0x0); + HandleMethod(0xA18, 0x0); + HandleMethod(0xA19, 0x0); + HandleMethod(0xA1A, 0x0); + HandleMethod(0xA1B, 0x0); + HandleMethod(0xA1C, 0x0); + HandleMethod(0xA1D, 0x0); + HandleMethod(0xA1E, 0x0); + HandleMethod(0xA1F, 0x0); + HandleMethod(0xA20, 0x0); + HandleMethod(0xA21, 0x0); + HandleMethod(0xA22, 0x0); + HandleMethod(0xA23, 0x0); + HandleMethod(0xA24, 0x0); + HandleMethod(0xA25, 0x0); + HandleMethod(0xA26, 0x0); + HandleMethod(0xA27, 0x0); + HandleMethod(0xA28, 0x0); + HandleMethod(0xA29, 0x0); + HandleMethod(0xA2A, 0x0); + HandleMethod(0xA2B, 0x0); + HandleMethod(0xA2C, 0x0); + HandleMethod(0xA2D, 0x0); + HandleMethod(0xA2E, 0x0); + HandleMethod(0xA2F, 0x0); + HandleMethod(0xA30, 0x0); + HandleMethod(0xA31, 0x0); + HandleMethod(0xA32, 0x0); + HandleMethod(0xA33, 0x0); + HandleMethod(0xA34, 0x0); + HandleMethod(0xA35, 0x0); + HandleMethod(0xA36, 0x0); + HandleMethod(0xA37, 0x0); + HandleMethod(0xA38, 0x0); + HandleMethod(0xA39, 0x0); + HandleMethod(0xA3A, 0x0); + HandleMethod(0xA3B, 0x0); + HandleMethod(0xA3C, 0x0); + HandleMethod(0xA3D, 0x0); + HandleMethod(0xA3E, 0x0); + HandleMethod(0xA3F, 0x0); + HandleMethod(0xA40, 0x0); + HandleMethod(0xA41, 0x0); + HandleMethod(0xA42, 0x0); + HandleMethod(0xA43, 0x0); + HandleMethod(0xA44, 0x0); + HandleMethod(0xA45, 0x0); + HandleMethod(0xA46, 0x0); + HandleMethod(0xA47, 0x0); + HandleMethod(0xA48, 0x0); + HandleMethod(0xA49, 0x0); + HandleMethod(0xA4A, 0x0); + HandleMethod(0xA4B, 0x0); + HandleMethod(0xA4C, 0x0); + HandleMethod(0xA4D, 0x0); + HandleMethod(0xA4E, 0x0); + HandleMethod(0xA4F, 0x0); + HandleMethod(0xA50, 0x0); + HandleMethod(0xA51, 0x0); + HandleMethod(0xA52, 0x0); + HandleMethod(0xA53, 0x0); + HandleMethod(0xA54, 0x0); + HandleMethod(0xA55, 0x0); + HandleMethod(0xA56, 0x0); + HandleMethod(0xA57, 0x0); + HandleMethod(0xA58, 0x0); + HandleMethod(0xA59, 0x0); + HandleMethod(0xA5A, 0x0); + HandleMethod(0xA5B, 0x0); + HandleMethod(0xA5C, 0x0); + HandleMethod(0xA5D, 0x0); + HandleMethod(0xA5E, 0x0); + HandleMethod(0xA5F, 0x0); + HandleMethod(0xA60, 0x0); + HandleMethod(0xA61, 0x0); + HandleMethod(0xA62, 0x0); + HandleMethod(0xA63, 0x0); + HandleMethod(0xA64, 0x0); + HandleMethod(0xA65, 0x0); + HandleMethod(0xA66, 0x0); + HandleMethod(0xA67, 0x0); + HandleMethod(0xA68, 0x0); + HandleMethod(0xA69, 0x0); + HandleMethod(0xA6A, 0x0); + HandleMethod(0xA6B, 0x0); + HandleMethod(0xA6C, 0x0); + HandleMethod(0xA6D, 0x0); + HandleMethod(0xA6E, 0x0); + HandleMethod(0xA6F, 0x0); + HandleMethod(0xA70, 0x0); + HandleMethod(0xA71, 0x0); + HandleMethod(0xA72, 0x0); + HandleMethod(0xA73, 0x0); + HandleMethod(0xA74, 0x0); + HandleMethod(0xA75, 0x0); + HandleMethod(0xA76, 0x0); + HandleMethod(0xA77, 0x0); + HandleMethod(0xA78, 0x0); + HandleMethod(0xA79, 0x0); + HandleMethod(0xA7A, 0x0); + HandleMethod(0xA7B, 0x0); + HandleMethod(0xA7C, 0x0); + HandleMethod(0xA7D, 0x0); + HandleMethod(0xA7E, 0x0); + HandleMethod(0xA7F, 0x0); + HandleMethod(0x280, 0x0); + HandleMethod(0x288, 0x0); + HandleMethod(0x290, 0x0); + HandleMethod(0x298, 0x0); + HandleMethod(0x2A0, 0x0); + HandleMethod(0x2A8, 0x0); + HandleMethod(0x2B0, 0x0); + HandleMethod(0x2B8, 0x0); + HandleMethod(0x2C0, 0x0); + HandleMethod(0x2C8, 0x0); + HandleMethod(0x2D0, 0x0); + HandleMethod(0x2D8, 0x0); + HandleMethod(0x2E0, 0x0); + HandleMethod(0x2E8, 0x0); + HandleMethod(0x2F0, 0x0); + HandleMethod(0x2F8, 0x0); + HandleMethod(0x281, 0x0); + HandleMethod(0x289, 0x0); + HandleMethod(0x291, 0x0); + HandleMethod(0x299, 0x0); + HandleMethod(0x2A1, 0x0); + HandleMethod(0x2A9, 0x0); + HandleMethod(0x2B1, 0x0); + HandleMethod(0x2B9, 0x0); + HandleMethod(0x2C1, 0x0); + HandleMethod(0x2C9, 0x0); + HandleMethod(0x2D1, 0x0); + HandleMethod(0x2D9, 0x0); + HandleMethod(0x2E1, 0x0); + HandleMethod(0x2E9, 0x0); + HandleMethod(0x2F1, 0x0); + HandleMethod(0x2F9, 0x0); + HandleMethod(0x282, 0x0); + HandleMethod(0x28A, 0x0); + HandleMethod(0x292, 0x0); + HandleMethod(0x29A, 0x0); + HandleMethod(0x2A2, 0x0); + HandleMethod(0x2AA, 0x0); + HandleMethod(0x2B2, 0x0); + HandleMethod(0x2BA, 0x0); + HandleMethod(0x2C2, 0x0); + HandleMethod(0x2CA, 0x0); + HandleMethod(0x2D2, 0x0); + HandleMethod(0x2DA, 0x0); + HandleMethod(0x2E2, 0x0); + HandleMethod(0x2EA, 0x0); + HandleMethod(0x2F2, 0x0); + HandleMethod(0x2FA, 0x0); + HandleMethod(0x283, 0x0); + HandleMethod(0x28B, 0x0); + HandleMethod(0x293, 0x0); + HandleMethod(0x29B, 0x0); + HandleMethod(0x2A3, 0x0); + HandleMethod(0x2AB, 0x0); + HandleMethod(0x2B3, 0x0); + HandleMethod(0x2BB, 0x0); + HandleMethod(0x2C3, 0x0); + HandleMethod(0x2CB, 0x0); + HandleMethod(0x2D3, 0x0); + HandleMethod(0x2DB, 0x0); + HandleMethod(0x2E3, 0x0); + HandleMethod(0x2EB, 0x0); + HandleMethod(0x2F3, 0x0); + HandleMethod(0x2FB, 0x0); + HandleMethod(0x284, 0x0); + HandleMethod(0x28C, 0x0); + HandleMethod(0x294, 0x0); + HandleMethod(0x29C, 0x0); + HandleMethod(0x2A4, 0x0); + HandleMethod(0x2AC, 0x0); + HandleMethod(0x2B4, 0x0); + HandleMethod(0x2BC, 0x0); + HandleMethod(0x2C4, 0x0); + HandleMethod(0x2CC, 0x0); + HandleMethod(0x2D4, 0x0); + HandleMethod(0x2DC, 0x0); + HandleMethod(0x2E4, 0x0); + HandleMethod(0x2EC, 0x0); + HandleMethod(0x2F4, 0x0); + HandleMethod(0x2FC, 0x0); + HandleMethod(0x285, 0x0); + HandleMethod(0x28D, 0x0); + HandleMethod(0x295, 0x0); + HandleMethod(0x29D, 0x0); + HandleMethod(0x2A5, 0x0); + HandleMethod(0x2AD, 0x0); + HandleMethod(0x2B5, 0x0); + HandleMethod(0x2BD, 0x0); + HandleMethod(0x2C5, 0x0); + HandleMethod(0x2CD, 0x0); + HandleMethod(0x2D5, 0x0); + HandleMethod(0x2DD, 0x0); + HandleMethod(0x2E5, 0x0); + HandleMethod(0x2ED, 0x0); + HandleMethod(0x2F5, 0x0); + HandleMethod(0x2FD, 0x0); + HandleMethod(0x286, 0x6420); + HandleMethod(0x28E, 0x6420); + HandleMethod(0x296, 0x6420); + HandleMethod(0x29E, 0x6420); + HandleMethod(0x2A6, 0x6420); + HandleMethod(0x2AE, 0x6420); + HandleMethod(0x2B6, 0x6420); + HandleMethod(0x2BE, 0x6420); + HandleMethod(0x2C6, 0x6420); + HandleMethod(0x2CE, 0x6420); + HandleMethod(0x2D6, 0x6420); + HandleMethod(0x2DE, 0x6420); + HandleMethod(0x2E6, 0x6420); + HandleMethod(0x2EE, 0x6420); + HandleMethod(0x2F6, 0x6420); + HandleMethod(0x2FE, 0x6420); + HandleMethod(0x287, 0x0); + HandleMethod(0x28F, 0x0); + HandleMethod(0x297, 0x0); + HandleMethod(0x29F, 0x0); + HandleMethod(0x2A7, 0x0); + HandleMethod(0x2AF, 0x0); + HandleMethod(0x2B7, 0x0); + HandleMethod(0x2BF, 0x0); + HandleMethod(0x2C7, 0x0); + HandleMethod(0x2CF, 0x0); + HandleMethod(0x2D7, 0x0); + HandleMethod(0x2DF, 0x0); + HandleMethod(0x2E7, 0x0); + HandleMethod(0x2EF, 0x0); + HandleMethod(0x2F7, 0x0); + HandleMethod(0x2FF, 0x0); + HandleMethod(0x300, 0x0); + HandleMethod(0x304, 0x0); + HandleMethod(0x308, 0x0); + HandleMethod(0x30C, 0x0); + HandleMethod(0x310, 0x0); + HandleMethod(0x314, 0x0); + HandleMethod(0x318, 0x0); + HandleMethod(0x31C, 0x0); + HandleMethod(0x320, 0x0); + HandleMethod(0x324, 0x0); + HandleMethod(0x328, 0x0); + HandleMethod(0x32C, 0x0); + HandleMethod(0x330, 0x0); + HandleMethod(0x334, 0x0); + HandleMethod(0x338, 0x0); + HandleMethod(0x33C, 0x0); + HandleMethod(0x301, 0x0); + HandleMethod(0x305, 0x0); + HandleMethod(0x309, 0x0); + HandleMethod(0x30D, 0x0); + HandleMethod(0x311, 0x0); + HandleMethod(0x315, 0x0); + HandleMethod(0x319, 0x0); + HandleMethod(0x31D, 0x0); + HandleMethod(0x321, 0x0); + HandleMethod(0x325, 0x0); + HandleMethod(0x329, 0x0); + HandleMethod(0x32D, 0x0); + HandleMethod(0x331, 0x0); + HandleMethod(0x335, 0x0); + HandleMethod(0x339, 0x0); + HandleMethod(0x33D, 0x0); + HandleMethod(0x302, 0x0); + HandleMethod(0x306, 0x0); + HandleMethod(0x30A, 0x0); + HandleMethod(0x30E, 0x0); + HandleMethod(0x312, 0x0); + HandleMethod(0x316, 0x0); + HandleMethod(0x31A, 0x0); + HandleMethod(0x31E, 0x0); + HandleMethod(0x322, 0x0); + HandleMethod(0x326, 0x0); + HandleMethod(0x32A, 0x0); + HandleMethod(0x32E, 0x0); + HandleMethod(0x332, 0x0); + HandleMethod(0x336, 0x0); + HandleMethod(0x33A, 0x0); + HandleMethod(0x33E, 0x0); + HandleMethod(0x303, 0x3F800000); + HandleMethod(0x307, 0x3F800000); + HandleMethod(0x30B, 0x3F800000); + HandleMethod(0x30F, 0x3F800000); + HandleMethod(0x313, 0x3F800000); + HandleMethod(0x317, 0x3F800000); + HandleMethod(0x31B, 0x3F800000); + HandleMethod(0x31F, 0x3F800000); + HandleMethod(0x323, 0x3F800000); + HandleMethod(0x327, 0x3F800000); + HandleMethod(0x32B, 0x3F800000); + HandleMethod(0x32F, 0x3F800000); + HandleMethod(0x333, 0x3F800000); + HandleMethod(0x337, 0x3F800000); + HandleMethod(0x33B, 0x3F800000); + HandleMethod(0x33F, 0x3F800000); + HandleMethod(0x340, 0xFFFF0000); + HandleMethod(0x342, 0xFFFF0000); + HandleMethod(0x344, 0xFFFF0000); + HandleMethod(0x346, 0xFFFF0000); + HandleMethod(0x348, 0xFFFF0000); + HandleMethod(0x34A, 0xFFFF0000); + HandleMethod(0x34C, 0xFFFF0000); + HandleMethod(0x34E, 0xFFFF0000); + HandleMethod(0x341, 0xFFFF0000); + HandleMethod(0x343, 0xFFFF0000); + HandleMethod(0x345, 0xFFFF0000); + HandleMethod(0x347, 0xFFFF0000); + HandleMethod(0x349, 0xFFFF0000); + HandleMethod(0x34B, 0xFFFF0000); + HandleMethod(0x34D, 0xFFFF0000); + HandleMethod(0x34F, 0xFFFF0000); + HandleMethod(0x380, 0x0); + HandleMethod(0x384, 0x0); + HandleMethod(0x388, 0x0); + HandleMethod(0x38C, 0x0); + HandleMethod(0x390, 0x0); + HandleMethod(0x394, 0x0); + HandleMethod(0x398, 0x0); + HandleMethod(0x39C, 0x0); + HandleMethod(0x3A0, 0x0); + HandleMethod(0x3A4, 0x0); + HandleMethod(0x3A8, 0x0); + HandleMethod(0x3AC, 0x0); + HandleMethod(0x3B0, 0x0); + HandleMethod(0x3B4, 0x0); + HandleMethod(0x3B8, 0x0); + HandleMethod(0x3BC, 0x0); + HandleMethod(0x381, 0xFFFF0000); + HandleMethod(0x385, 0xFFFF0000); + HandleMethod(0x389, 0xFFFF0000); + HandleMethod(0x38D, 0xFFFF0000); + HandleMethod(0x391, 0xFFFF0000); + HandleMethod(0x395, 0xFFFF0000); + HandleMethod(0x399, 0xFFFF0000); + HandleMethod(0x39D, 0xFFFF0000); + HandleMethod(0x3A1, 0xFFFF0000); + HandleMethod(0x3A5, 0xFFFF0000); + HandleMethod(0x3A9, 0xFFFF0000); + HandleMethod(0x3AD, 0xFFFF0000); + HandleMethod(0x3B1, 0xFFFF0000); + HandleMethod(0x3B5, 0xFFFF0000); + HandleMethod(0x3B9, 0xFFFF0000); + HandleMethod(0x3BD, 0xFFFF0000); + HandleMethod(0x382, 0xFFFF0000); + HandleMethod(0x386, 0xFFFF0000); + HandleMethod(0x38A, 0xFFFF0000); + HandleMethod(0x38E, 0xFFFF0000); + HandleMethod(0x392, 0xFFFF0000); + HandleMethod(0x396, 0xFFFF0000); + HandleMethod(0x39A, 0xFFFF0000); + HandleMethod(0x39E, 0xFFFF0000); + HandleMethod(0x3A2, 0xFFFF0000); + HandleMethod(0x3A6, 0xFFFF0000); + HandleMethod(0x3AA, 0xFFFF0000); + HandleMethod(0x3AE, 0xFFFF0000); + HandleMethod(0x3B2, 0xFFFF0000); + HandleMethod(0x3B6, 0xFFFF0000); + HandleMethod(0x3BA, 0xFFFF0000); + HandleMethod(0x3BE, 0xFFFF0000); + HandleMethod(0x350, 0x0); + HandleMethod(0x352, 0x0); + HandleMethod(0x354, 0x0); + HandleMethod(0x356, 0x0); + HandleMethod(0x351, 0x0); + HandleMethod(0x353, 0x0); + HandleMethod(0x355, 0x0); + HandleMethod(0x357, 0x0); + HandleMethod(0x780, 0x1); + HandleMethod(0x788, 0x1); + HandleMethod(0x790, 0x1); + HandleMethod(0x798, 0x1); + HandleMethod(0x7A0, 0x1); + HandleMethod(0x7A8, 0x1); + HandleMethod(0x7B0, 0x1); + HandleMethod(0x7B8, 0x1); + HandleMethod(0x781, 0x1); + HandleMethod(0x789, 0x1); + HandleMethod(0x791, 0x1); + HandleMethod(0x799, 0x1); + HandleMethod(0x7A1, 0x1); + HandleMethod(0x7A9, 0x1); + HandleMethod(0x7B1, 0x1); + HandleMethod(0x7B9, 0x1); + HandleMethod(0x782, 0x2); + HandleMethod(0x78A, 0x2); + HandleMethod(0x792, 0x2); + HandleMethod(0x79A, 0x2); + HandleMethod(0x7A2, 0x2); + HandleMethod(0x7AA, 0x2); + HandleMethod(0x7B2, 0x2); + HandleMethod(0x7BA, 0x2); + HandleMethod(0x783, 0x1); + HandleMethod(0x78B, 0x1); + HandleMethod(0x793, 0x1); + HandleMethod(0x79B, 0x1); + HandleMethod(0x7A3, 0x1); + HandleMethod(0x7AB, 0x1); + HandleMethod(0x7B3, 0x1); + HandleMethod(0x7BB, 0x1); + HandleMethod(0x784, 0x1); + HandleMethod(0x78C, 0x1); + HandleMethod(0x794, 0x1); + HandleMethod(0x79C, 0x1); + HandleMethod(0x7A4, 0x1); + HandleMethod(0x7AC, 0x1); + HandleMethod(0x7B4, 0x1); + HandleMethod(0x7BC, 0x1); + HandleMethod(0x785, 0x2); + HandleMethod(0x78D, 0x2); + HandleMethod(0x795, 0x2); + HandleMethod(0x79D, 0x2); + HandleMethod(0x7A5, 0x2); + HandleMethod(0x7AD, 0x2); + HandleMethod(0x7B5, 0x2); + HandleMethod(0x7BD, 0x2); + HandleMethod(0x786, 0x1); + HandleMethod(0x78E, 0x1); + HandleMethod(0x796, 0x1); + HandleMethod(0x79E, 0x1); + HandleMethod(0x7A6, 0x1); + HandleMethod(0x7AE, 0x1); + HandleMethod(0x7B6, 0x1); + HandleMethod(0x7BE, 0x1); + HandleMethod(0x520, 0x0); + HandleMethod(0x524, 0x0); + HandleMethod(0x528, 0x0); + HandleMethod(0x52C, 0x0); + HandleMethod(0x530, 0x0); + HandleMethod(0x534, 0x0); + HandleMethod(0x538, 0x0); + HandleMethod(0x53C, 0x0); + HandleMethod(0x521, 0x0); + HandleMethod(0x525, 0x0); + HandleMethod(0x529, 0x0); + HandleMethod(0x52D, 0x0); + HandleMethod(0x531, 0x0); + HandleMethod(0x535, 0x0); + HandleMethod(0x539, 0x0); + HandleMethod(0x53D, 0x0); + HandleMethod(0x522, 0x0); + HandleMethod(0x526, 0x0); + HandleMethod(0x52A, 0x0); + HandleMethod(0x52E, 0x0); + HandleMethod(0x532, 0x0); + HandleMethod(0x536, 0x0); + HandleMethod(0x53A, 0x0); + HandleMethod(0x53E, 0x0); + HandleMethod(0xD00, 0x0); + HandleMethod(0xD01, 0x0); + HandleMethod(0xD02, 0x0); + HandleMethod(0xD03, 0x0); + HandleMethod(0xD04, 0x0); + HandleMethod(0xD05, 0x0); + HandleMethod(0xD06, 0x0); + HandleMethod(0xD07, 0x0); + HandleMethod(0xD08, 0x0); + HandleMethod(0xD09, 0x0); + HandleMethod(0xD0A, 0x0); + HandleMethod(0xD0B, 0x0); + HandleMethod(0xD0C, 0x0); + HandleMethod(0xD0D, 0x0); + HandleMethod(0xD0E, 0x0); + HandleMethod(0xD0F, 0x0); + HandleMethod(0xD10, 0x0); + HandleMethod(0xD11, 0x0); + HandleMethod(0xD12, 0x0); + HandleMethod(0xD13, 0x0); + HandleMethod(0xD14, 0x0); + HandleMethod(0xD15, 0x0); + HandleMethod(0xD16, 0x0); + HandleMethod(0xD17, 0x0); + HandleMethod(0xD18, 0x0); + HandleMethod(0xD19, 0x0); + HandleMethod(0xD1A, 0x0); + HandleMethod(0xD1B, 0x0); + HandleMethod(0xD1C, 0x0); + HandleMethod(0xD1D, 0x0); + HandleMethod(0xD1E, 0x0); + HandleMethod(0xD1F, 0x0); + HandleMethod(0xD20, 0x0); + HandleMethod(0xD21, 0x0); + HandleMethod(0xD22, 0x0); + HandleMethod(0xD23, 0x0); + HandleMethod(0xD24, 0x0); + HandleMethod(0xD25, 0x0); + HandleMethod(0xD26, 0x0); + HandleMethod(0xD27, 0x0); + HandleMethod(0xD28, 0x0); + HandleMethod(0xD29, 0x0); + HandleMethod(0xD2A, 0x0); + HandleMethod(0xD2B, 0x0); + HandleMethod(0xD2C, 0x0); + HandleMethod(0xD2D, 0x0); + HandleMethod(0xD2E, 0x0); + HandleMethod(0xD2F, 0x0); + HandleMethod(0xD30, 0x0); + HandleMethod(0xD31, 0x0); + HandleMethod(0xD32, 0x0); + HandleMethod(0xD33, 0x0); + HandleMethod(0xD34, 0x0); + HandleMethod(0xD35, 0x0); + HandleMethod(0xD36, 0x0); + HandleMethod(0xD37, 0x0); + HandleMethod(0xD38, 0x0); + HandleMethod(0xD39, 0x0); + HandleMethod(0xD3A, 0x0); + HandleMethod(0xD3B, 0x0); + HandleMethod(0xD3C, 0x0); + HandleMethod(0xD3D, 0x0); + HandleMethod(0xD3E, 0x0); + HandleMethod(0xD3F, 0x0); + HandleMethod(0xD40, 0x0); + HandleMethod(0xD41, 0x0); + HandleMethod(0xD42, 0x0); + HandleMethod(0xD43, 0x0); + HandleMethod(0xD44, 0x0); + HandleMethod(0xD45, 0x0); + HandleMethod(0xD46, 0x0); + HandleMethod(0xD47, 0x0); + HandleMethod(0xD48, 0x0); + HandleMethod(0xD49, 0x0); + HandleMethod(0xD4A, 0x0); + HandleMethod(0xD4B, 0x0); + HandleMethod(0xD4C, 0x0); + HandleMethod(0xD4D, 0x0); + HandleMethod(0xD4E, 0x0); + HandleMethod(0xD4F, 0x0); + HandleMethod(0xD50, 0x0); + HandleMethod(0xD51, 0x0); + HandleMethod(0xD52, 0x0); + HandleMethod(0xD53, 0x0); + HandleMethod(0xD54, 0x0); + HandleMethod(0xD55, 0x0); + HandleMethod(0xD56, 0x0); + HandleMethod(0xD57, 0x0); + HandleMethod(0xD58, 0x0); + HandleMethod(0xD59, 0x0); + HandleMethod(0xD5A, 0x0); + HandleMethod(0xD5B, 0x0); + HandleMethod(0xD5C, 0x0); + HandleMethod(0xD5D, 0x0); + HandleMethod(0xD5E, 0x0); + HandleMethod(0xD5F, 0x0); + HandleMethod(0xD60, 0x0); + HandleMethod(0xD61, 0x0); + HandleMethod(0xD62, 0x0); + HandleMethod(0xD63, 0x0); + HandleMethod(0xD64, 0x0); + HandleMethod(0xD65, 0x0); + HandleMethod(0xD66, 0x0); + HandleMethod(0xD67, 0x0); + HandleMethod(0xD68, 0x0); + HandleMethod(0xD69, 0x0); + HandleMethod(0xD6A, 0x0); + HandleMethod(0xD6B, 0x0); + HandleMethod(0xD6C, 0x0); + HandleMethod(0xD6D, 0x0); + HandleMethod(0xD6E, 0x0); + HandleMethod(0xD6F, 0x0); + HandleMethod(0xD70, 0x0); + HandleMethod(0xD71, 0x0); + HandleMethod(0xD72, 0x0); + HandleMethod(0xD73, 0x0); + HandleMethod(0xD74, 0x0); + HandleMethod(0xD75, 0x0); + HandleMethod(0xD76, 0x0); + HandleMethod(0xD77, 0x0); + HandleMethod(0xD78, 0x0); + HandleMethod(0xD79, 0x0); + HandleMethod(0xD7A, 0x0); + HandleMethod(0xD7B, 0x0); + HandleMethod(0xD7C, 0x0); + HandleMethod(0xD7D, 0x0); + HandleMethod(0xD7E, 0x0); + HandleMethod(0xD7F, 0x0); + HandleMethod(0xC3, 0x1); + HandleMethod(0x651, 0x0); + HandleMethod(0x545, 0x0); + HandleMethod(0x35A, 0xFFFF); + HandleMethod(0x487, 0xFAC6881); + HandleMethod(0x3EB, 0x1); + HandleMethod(0x54E, 0x1); + HandleMethod(0x3F8, 0x0); + HandleMethod(0x3F9, 0x0); + HandleMethod(0x3FA, 0x14); + HandleMethod(0x3FB, 0x40); + HandleMethod(0x3FC, 0x0); + HandleMethod(0x5E7, 0x0); + HandleMethod(0x48A, 0x400); + HandleMethod(0x48B, 0x300); + HandleMethod(0x48C, 0x10001); + HandleMethod(0x1FE, 0x0); + HandleMethod(0x482, 0x0); + HandleMethod(0x56D, 0x1); + HandleMethod(0x573, 0x0); + HandleMethod(0x54D, 0x0); + HandleMethod(0x1D5, 0x1); + HandleMethod(0x3EC, 0x0); + HandleMethod(0x574, 0x0); + HandleMethod(0x478, 0x88888888); + HandleMethod(0x479, 0x88888888); + HandleMethod(0x47A, 0x88888888); + HandleMethod(0x47B, 0x88888888); + HandleMethod(0x54F, 0x0); + HandleMethod(0x5AD, 0x3); + HandleMethod(0x3E9, 0x1); + HandleMethod(0x3EF, 0xFFFF); + HandleMethod(0x3F0, 0xFFFF); + HandleMethod(0x3F1, 0xFFFF); + HandleMethod(0x3F2, 0xFFFF); + HandleMethod(0x3EA, 0xFFFF); + HandleMethod(0x37E, 0x0); + HandleMethod(0x37F, 0x0); + HandleMethod(0x652, 0x0); + HandleMethod(0x65C, 0x1); + HandleMethod(0x587, 0x9F0); + HandleMethod(0x373, 0x10); + HandleMethod(0x579, 0x0); + HandleMethod(0x458, 0x25E00040); + HandleMethod(0x459, 0x25E00040); + HandleMethod(0x45A, 0x25E00040); + HandleMethod(0x45B, 0x25E00040); + HandleMethod(0x45C, 0x25E00040); + HandleMethod(0x45D, 0x25E00040); + HandleMethod(0x45E, 0x25E00040); + HandleMethod(0x45F, 0x25E00040); + HandleMethod(0x460, 0x25E00040); + HandleMethod(0x461, 0x25E00040); + HandleMethod(0x462, 0x25E00040); + HandleMethod(0x463, 0x25E00040); + HandleMethod(0x464, 0x25E00040); + HandleMethod(0x465, 0x25E00040); + HandleMethod(0x466, 0x25E00040); + HandleMethod(0x467, 0x25E00040); + HandleMethod(0x468, 0x25E00040); + HandleMethod(0x469, 0x25E00040); + HandleMethod(0x46A, 0x25E00040); + HandleMethod(0x46B, 0x25E00040); + HandleMethod(0x46C, 0x25E00040); + HandleMethod(0x46D, 0x25E00040); + HandleMethod(0x46E, 0x25E00040); + HandleMethod(0x46F, 0x25E00040); + HandleMethod(0x470, 0x25E00040); + HandleMethod(0x471, 0x25E00040); + HandleMethod(0x472, 0x25E00040); + HandleMethod(0x473, 0x25E00040); + HandleMethod(0x474, 0x25E00040); + HandleMethod(0x475, 0x25E00040); + HandleMethod(0x476, 0x25E00040); + HandleMethod(0x477, 0x25E00040); + HandleMethod(0x620, 0x0); + HandleMethod(0x621, 0x0); + HandleMethod(0x622, 0x0); + HandleMethod(0x623, 0x0); + HandleMethod(0x624, 0x0); + HandleMethod(0x625, 0x0); + HandleMethod(0x626, 0x0); + HandleMethod(0x627, 0x0); + HandleMethod(0x628, 0x0); + HandleMethod(0x629, 0x0); + HandleMethod(0x62A, 0x0); + HandleMethod(0x62B, 0x0); + HandleMethod(0x62C, 0x0); + HandleMethod(0x62D, 0x0); + HandleMethod(0x62E, 0x0); + HandleMethod(0x62F, 0x0); + HandleMethod(0x630, 0x0); + HandleMethod(0x631, 0x0); + HandleMethod(0x632, 0x0); + HandleMethod(0x633, 0x0); + HandleMethod(0x634, 0x0); + HandleMethod(0x635, 0x0); + HandleMethod(0x636, 0x0); + HandleMethod(0x637, 0x0); + HandleMethod(0x638, 0x0); + HandleMethod(0x639, 0x0); + HandleMethod(0x63A, 0x0); + HandleMethod(0x63B, 0x0); + HandleMethod(0x63C, 0x0); + HandleMethod(0x63D, 0x0); + HandleMethod(0x63E, 0x0); + HandleMethod(0x63F, 0x0); + HandleMethod(0x3E1, 0x0); + HandleMethod(0x3E2, 0x0); + HandleMethod(0x5F2, 0x0); + HandleMethod(0x5F3, 0x0); + HandleMethod(0x5F4, 0xFF); + HandleMethod(0x5F5, 0xFFFFFFFF); + HandleMethod(0x5F6, 0x2); + HandleMethod(0x5F7, 0x0); + HandleMethod(0x57D, 0x0); + HandleMethod(0x57E, 0x0); + HandleMethod(0x50D, 0x0); + HandleMethod(0x50E, 0x0); + HandleMethod(0x35D, 0x0); + HandleMethod(0x4E9, 0x0); + HandleMethod(0x4C6, 0x1); + HandleMethod(0x420, 0x0); + HandleMethod(0x421, 0x0); + HandleMethod(0x422, 0x1); + HandleMethod(0x423, 0x1); + HandleMethod(0x424, 0x0); + HandleMethod(0x425, 0x1); + HandleMethod(0x426, 0x0); + HandleMethod(0x427, 0x1); + HandleMethod(0x428, 0x0); + HandleMethod(0x429, 0x0); + HandleMethod(0x591, 0x0); + HandleMethod(0x1D2, 0x0); + HandleMethod(0x37A, 0x0); + HandleMethod(0x592, 0x0); + HandleMethod(0x4A9, 0x0); + HandleMethod(0x448, 0x0); + HandleMethod(0x449, 0x0); + HandleMethod(0x44A, 0x0); + HandleMethod(0x44B, 0x0); + HandleMethod(0x446, 0x0); + HandleMethod(0x593, 0x0); + HandleMethod(0x596, 0x0); + HandleMethod(0x644, 0x290); + HandleMethod(0x546, 0x0); + HandleMethod(0x597, 0x1); + HandleMethod(0x548, 0x0); + HandleMethod(0x581, 0x0); + HandleMethod(0x55C, 0x0); + HandleMethod(0x4EC, 0x3F800000); + HandleMethod(0x4ED, 0x3F800000); + HandleMethod(0x83, 0x0); + HandleMethod(0x59C, 0x30201000); + HandleMethod(0x59D, 0x70605040); + HandleMethod(0x59E, 0xB8A89888); + HandleMethod(0x59F, 0xF8E8D8C8); + HandleMethod(0x59B, 0x0); + HandleMethod(0x5A0, 0xFFFF00); + HandleMethod(0x4B4, 0x3); + HandleMethod(0x44F, 0x0); + HandleMethod(0x4B5, 0x2); + HandleMethod(0x5A1, 0x0); + HandleMethod(0x5A2, 0x0); + HandleMethod(0x36B, 0x1B02); + HandleMethod(0x36C, 0x1B02); + HandleMethod(0x36D, 0x0); + HandleMethod(0x5A3, 0x0); + HandleMethod(0x56F, 0x0); + HandleMethod(0x55B, 0x0); + HandleMethod(0x61F, 0x0); + HandleMethod(0x444, 0x1); + HandleMethod(0x370, 0x0); + HandleMethod(0x371, 0x0); + HandleMethod(0x372, 0x0); + HandleMethod(0x3D0, 0x0); + HandleMethod(0x3D1, 0x0); + HandleMethod(0x3D2, 0x0); + HandleMethod(0x3D3, 0x0); + HandleMethod(0x3D4, 0x0); + HandleMethod(0x48D, 0x0); + HandleMethod(0x5A4, 0x0); + HandleMethod(0x1E4, 0x0); + HandleMethod(0x1E5, 0x0); + HandleMethod(0x1E6, 0x0); + HandleMethod(0x1E7, 0x0); + HandleMethod(0x1E8, 0x0); + HandleMethod(0x1DF, 0x0); + HandleMethod(0x400, 0x10); + HandleMethod(0x43F, 0x0); + HandleMethod(0x4A4, 0x0); + HandleMethod(0x86, 0x10); + HandleMethod(0x4B6, 0x0); + HandleMethod(0x4B7, 0x10); + HandleMethod(0x365, 0x1); + HandleMethod(0x557, 0x0); + HandleMethod(0x558, 0x0); + HandleMethod(0x559, 0xFFF); + HandleMethod(0x55D, 0x0); + HandleMethod(0x55E, 0x0); + HandleMethod(0x55F, 0xFFFFF); + HandleMethod(0x4D5, 0x0); + HandleMethod(0x584, 0x12); + HandleMethod(0x582, 0x0); + HandleMethod(0x583, 0x0); + HandleMethod(0x983, 0x0); + HandleMethod(0x1EB, 0x0); + HandleMethod(0x58B, 0x3); + HandleMethod(0x84, 0x0); + HandleMethod(0xC8, 0x0); + HandleMethod(0xC9, 0x3F800000); + HandleMethod(0xCA, 0x3F800000); + HandleMethod(0xCB, 0x3F800000); + HandleMethod(0xCC, 0x3F800000); + HandleMethod(0xCD, 0x3F800000); + HandleMethod(0xCE, 0x3F800000); + HandleMethod(0x1D4, 0x0); + HandleMethod(0x1D8, 0x39291909); + HandleMethod(0x1D9, 0x79695949); + HandleMethod(0x1DA, 0xB9A99989); + HandleMethod(0x1DB, 0xF9E9D9C9); + HandleMethod(0x1DC, 0x30201000); + HandleMethod(0x1DD, 0x70605040); + HandleMethod(0x1DE, 0x9080); + HandleMethod(0x1E0, 0x39291909); + HandleMethod(0x1E1, 0x79695949); + HandleMethod(0x1E2, 0xB9A99989); + HandleMethod(0x1E3, 0xF9E9D9C9); + HandleMethod(0x1F4, 0x30201000); + HandleMethod(0x1F5, 0x70605040); + HandleMethod(0x1F6, 0x9080); + HandleMethod(0x401, 0x0); + HandleMethod(0x490, 0x0); + HandleMethod(0x491, 0x0); + HandleMethod(0x492, 0x0); + HandleMethod(0x493, 0x0); + HandleMethod(0x494, 0x0); + HandleMethod(0x495, 0x0); + HandleMethod(0x496, 0x0); + HandleMethod(0x497, 0x0); + HandleMethod(0xDF, 0x1); + HandleMethod(0x1D0, 0x0); + HandleMethod(0x452, 0x0); + HandleMethod(0x3ED, 0x0); + HandleMethod(0x3EE, 0x2); + HandleMethod(0x44C, 0x2); + HandleMethod(0x3F5, 0x0); + HandleMethod(0x3F6, 0x0); + HandleMethod(0x40C, 0x20181008); + HandleMethod(0x40D, 0x40383028); + HandleMethod(0x40E, 0x60585048); + HandleMethod(0x40F, 0x80787068); + HandleMethod(0x1D1, 0x0); + HandleMethod(0x980, 0x0); + HandleMethod(0x646, 0x0); + HandleMethod(0x647, 0x900); + HandleMethod(0x648, 0x405); + HandleMethod(0x4C2, 0x1); + HandleMethod(0x649, 0x0); + HandleMethod(0x4EB, 0x0); + HandleMethod(0x64B, 0x1); + HandleMethod(0x64F, 0x2C1C); + HandleMethod(0x35F, 0x0); + HandleMethod(0x3E3, 0x0); + HandleMethod(0xB0, 0x1); + HandleMethod(0x544, 0x0); + HandleMethod(0x650, 0x0); + HandleMethod(0x3FD, 0x0); + HandleMethod(0x3FE, 0x0); + HandleMethod(0x653, 0x0); + HandleMethod(0x654, 0x0); + HandleMethod(0x65A, 0x0); + HandleMethod(0x564, 0x3F); + HandleMethod(0x1FA, 0x0); + HandleMethod(0x1FB, 0x0); + HandleMethod(0x1FC, 0x0); + HandleMethod(0x1FD, 0x0); + HandleMethod(0x65B, 0x11); + HandleMethod(0xB9, 0xB001); + HandleMethod(0xDB, 0x0); + HandleMethod(0xDC, 0x0); + HandleMethod(0x65F, 0x0); + HandleMethod(0x3F3, 0x0); + HandleMethod(0x3F4, 0x0); + HandleMethod(0xB6, 0x40); + HandleMethod(0x660, 0x80); + HandleMethod(0x541, 0x80); + HandleMethod(0x661, 0x0); + HandleMethod(0x3D8, 0x0); + HandleMethod(0x3D9, 0x400040); + HandleMethod(0x3DA, 0x2212); + HandleMethod(0x3DB, 0x8080203); + HandleMethod(0x442, 0x8); + HandleMethod(0x3DC, 0x80001); + HandleMethod(0x3FF, 0x0); + HandleMethod(0x44D, 0x0); + HandleMethod(0x3C7, 0x0); + HandleMethod(0x47E, 0x0); + HandleMethod(0x44E, 0x1); + HandleMethod(0xC0, 0x1); + HandleMethod(0x4EA, 0x0); + HandleMethod(0x489, 0x0); + HandleMethod(0x4BB, 0x0); + HandleMethod(0x4C4, 0x0); + HandleMethod(0x4C5, 0x1); + HandleMethod(0x4E0, 0x0); + HandleMethod(0x4E1, 0x1); + HandleMethod(0x4E2, 0x1); + HandleMethod(0x4E3, 0x1); + HandleMethod(0x4E4, 0x1); + HandleMethod(0x4E5, 0x0); + HandleMethod(0x4E7, 0x0); + HandleMethod(0x4E6, 0x0); + HandleMethod(0x565, 0x0); + HandleMethod(0x566, 0x1); + HandleMethod(0x567, 0x1); + HandleMethod(0x568, 0x1); + HandleMethod(0x569, 0x1); + HandleMethod(0x3D5, 0x0); + HandleMethod(0x3D6, 0x0); + HandleMethod(0x3D7, 0x0); + HandleMethod(0x66F, 0x0); + HandleMethod(0x3E7, 0x0); + HandleMethod(0x3E8, 0x0); + HandleMethod(0x4B3, 0x0); + HandleMethod(0x4BA, 0x0); + HandleMethod(0x4C3, 0x1); + HandleMethod(0x4D8, 0x0); + HandleMethod(0x4D9, 0x0); + HandleMethod(0x4DA, 0x0); + HandleMethod(0x4DB, 0x0); + HandleMethod(0x4DC, 0x0); + HandleMethod(0x4DD, 0x0); + HandleMethod(0x4DE, 0x0); + HandleMethod(0x4DF, 0x0); + HandleMethod(0x4CF, 0x1); + HandleMethod(0x4D0, 0x1); + HandleMethod(0x4D1, 0x2); + HandleMethod(0x4D2, 0x1); + HandleMethod(0x4D3, 0x1); + HandleMethod(0x4D4, 0x2); + HandleMethod(0x4D6, 0x1); + HandleMethod(0x4B9, 0x0); + HandleMethod(0x4C7, 0x0); + HandleMethod(0x4C8, 0x0); + HandleMethod(0x4C9, 0x0); + HandleMethod(0x4CA, 0x0); + HandleMethod(0x670, 0x0); + HandleMethod(0x450, 0x0); + HandleMethod(0x374, 0x0); + HandleMethod(0x375, 0x1); + HandleMethod(0xBD, 0x0); + HandleMethod(0x671, 0x0); + HandleMethod(0x672, 0x1500); + HandleMethod(0x4D7, 0x0); + HandleMethod(0x3E4, 0x0); + HandleMethod(0x678, 0x1); + HandleMethod(0x679, 0x1); + HandleMethod(0x67A, 0x1); + HandleMethod(0x67B, 0x1); + HandleMethod(0x67C, 0x1); + HandleMethod(0x67D, 0x1); + HandleMethod(0x67E, 0x1); + HandleMethod(0x67F, 0x1); + HandleMethod(0x673, 0x1); + HandleMethod(0x447, 0x1); + HandleMethod(0x56E, 0x0); + HandleMethod(0x680, 0x1111); + HandleMethod(0x681, 0x0); + HandleMethod(0x682, 0x0); + HandleMethod(0x683, 0x0); + HandleMethod(0x684, 0x0); + HandleMethod(0x685, 0x0); + HandleMethod(0x686, 0x0); + HandleMethod(0x687, 0x0); + HandleMethod(0x35B, 0xFFFF0000); + HandleMethod(0x35C, 0xFFFF0000); + HandleMethod(0x43E, 0x1010); + HandleMethod(0x360, 0x0); + HandleMethod(0x361, 0x0); + HandleMethod(0x362, 0x0); + HandleMethod(0x363, 0x0); + HandleMethod(0x364, 0x0); + HandleMethod(0x368, 0x0); + HandleMethod(0x1E9, 0x0); + HandleMethod(0x1EA, 0x0); + HandleMethod(0x542, 0x80000000); + HandleMethod(0x543, 0x40000000); + HandleMethod(0x59A, 0x0); + HandleMethod(0xC6, 0x8); + HandleMethod(0xC7, 0x8); + HandleMethod(0x367, 0x1); + HandleMethod(0x3C5, 0x0); + HandleMethod(0xDD, 0x0); + HandleMethod(0xDE, 0xC); + HandleMethod(0x1F7, 0x0); + HandleMethod(0x1D3, 0x55); + HandleMethod(0x508, 0x3); + HandleMethod(0x402, 0x8); + HandleMethod(0x403, 0x40); + HandleMethod(0x404, 0x12C); + HandleMethod(0x358, 0x40); + HandleMethod(0x406, 0x20); + HandleMethod(0x407, 0x1); + HandleMethod(0x408, 0x20); + HandleMethod(0x409, 0x1); + HandleMethod(0x511, 0x0); + HandleMethod(0x512, 0x0); + HandleMethod(0x513, 0x0); + HandleMethod(0xD8, 0x20164010); + HandleMethod(0xD9, 0x20); + HandleMethod(0xDA, 0x0); + HandleMethod(0x36A, 0x30); + HandleMethod(0x379, 0x0); + HandleMethod(0x81, 0x6); + HandleMethod(0xB4, 0x3FFFFF); + HandleMethod(0x488, 0x5); + HandleMethod(0x3F7, 0x0); + HandleMethod(0x3E6, 0x400008); + HandleMethod(0x4A1, 0x8000080); + HandleMethod(0x514, 0x400008); + HandleMethod(0x515, 0x8000080); + HandleMethod(0x85, 0x0); + } +} diff --git a/app/src/main/cpp/skyline/soc/gm20b/engines/maxwell_3d.cpp b/app/src/main/cpp/skyline/soc/gm20b/engines/maxwell_3d.cpp index 019cb595..31aecd5b 100644 --- a/app/src/main/cpp/skyline/soc/gm20b/engines/maxwell_3d.cpp +++ b/app/src/main/cpp/skyline/soc/gm20b/engines/maxwell_3d.cpp @@ -3,79 +3,15 @@ // Copyright © 2018-2020 fincs (https://github.com/devkitPro/deko3d) #include -#include "maxwell_3d.h" #include +#include "maxwell_3d.h" namespace skyline::soc::gm20b::engine::maxwell3d { Maxwell3D::Maxwell3D(const DeviceState &state, ChannelContext &channelCtx, gpu::interconnect::CommandExecutor &executor) : Engine(state), macroInterpreter(*this), context(*state.gpu, channelCtx, executor), channelCtx(channelCtx) { - ResetRegs(); + InitializeRegisters(); } - void Maxwell3D::ResetRegs() { - registers = {}; - - registers.rasterizerEnable = true; - - for (auto &transform : *registers.viewportTransforms) { - transform.swizzles.x = type::ViewportTransform::Swizzle::PositiveX; - transform.swizzles.y = type::ViewportTransform::Swizzle::PositiveY; - transform.swizzles.z = type::ViewportTransform::Swizzle::PositiveZ; - transform.swizzles.w = type::ViewportTransform::Swizzle::PositiveW; - } - - for (auto &viewport : *registers.viewports) { - viewport.depthRangeFar = 1.0f; - viewport.depthRangeNear = 0.0f; - } - - registers.polygonMode->front = type::PolygonMode::Fill; - registers.polygonMode->back = type::PolygonMode::Fill; - - registers.stencilFront->failOp = registers.stencilFront->zFailOp = registers.stencilFront->zPassOp = type::StencilOp::Keep; - registers.stencilFront->compare.op = type::CompareOp::Always; - registers.stencilFront->compare.mask = 0xFFFFFFFF; - registers.stencilFront->writeMask = 0xFFFFFFFF; - - registers.stencilTwoSideEnable = true; - registers.stencilBack->failOp = registers.stencilBack->zFailOp = registers.stencilBack->zPassOp = type::StencilOp::Keep; - registers.stencilBack->compareOp = type::CompareOp::Always; - registers.stencilBackExtra->compareMask = 0xFFFFFFFF; - registers.stencilBackExtra->writeMask = 0xFFFFFFFF; - - registers.rtSeparateFragData = true; - - for (auto &attribute : *registers.vertexAttributeState) - attribute.fixed = true; - - registers.depthTestFunc = type::CompareOp::Always; - - registers.blendState->colorOp = registers.blendState->alphaOp = type::Blend::Op::Add; - registers.blendState->colorSrcFactor = registers.blendState->alphaSrcFactor = type::Blend::Factor::One; - registers.blendState->colorDestFactor = registers.blendState->alphaDestFactor = type::Blend::Factor::Zero; - - registers.lineWidthSmooth = 1.0f; - registers.lineWidthAliased = 1.0f; - - registers.pointSpriteEnable = true; - registers.pointSpriteSize = 1.0f; - registers.pointCoordReplace->enable = true; - - registers.frontFace = type::FrontFace::CounterClockwise; - registers.cullFace = type::CullFace::Back; - - for (auto &mask : *registers.colorMask) - mask.r = mask.g = mask.b = mask.a = 1; - - for (auto &blend : *registers.independentBlend) { - blend.colorOp = blend.alphaOp = type::Blend::Op::Add; - blend.colorSrcFactor = blend.alphaSrcFactor = type::Blend::Factor::One; - blend.colorDestFactor = blend.alphaDestFactor = type::Blend::Factor::Zero; - } - - registers.viewportTransformEnable = true; - } - - void Maxwell3D::CallMethod(u32 method, u32 argument, bool lastCall) { + __attribute__((always_inline)) void Maxwell3D::CallMethod(u32 method, u32 argument, bool lastCall) { Logger::Debug("Called method in Maxwell 3D: 0x{:X} args: 0x{:X}", method, argument); // Methods that are greater than the register size are for macro control @@ -105,6 +41,10 @@ namespace skyline::soc::gm20b::engine::maxwell3d { return; } + HandleMethod(method, argument, true); + } + + void Maxwell3D::HandleMethod(u32 method, u32 argument, bool redundantCheck) { #define MAXWELL3D_OFFSET(field) (sizeof(typeof(Registers::field)) - sizeof(typeof(*Registers::field))) / sizeof(u32) #define MAXWELL3D_STRUCT_OFFSET(field, member) MAXWELL3D_OFFSET(field) + U32_OFFSET(typeof(*Registers::field), member) #define MAXWELL3D_ARRAY_OFFSET(field, index) MAXWELL3D_OFFSET(field) + ((sizeof(typeof(Registers::field[0])) / sizeof(u32)) * index) @@ -133,7 +73,7 @@ namespace skyline::soc::gm20b::engine::maxwell3d { argument = shadowRegisters.raw[method]; } - bool redundant{registers.raw[method] == argument}; + bool redundant{redundantCheck && registers.raw[method] == argument}; registers.raw[method] = argument; if (!redundant) { diff --git a/app/src/main/cpp/skyline/soc/gm20b/engines/maxwell_3d.h b/app/src/main/cpp/skyline/soc/gm20b/engines/maxwell_3d.h index 3ddee3e5..72fd178a 100644 --- a/app/src/main/cpp/skyline/soc/gm20b/engines/maxwell_3d.h +++ b/app/src/main/cpp/skyline/soc/gm20b/engines/maxwell_3d.h @@ -29,6 +29,11 @@ namespace skyline::soc::gm20b::engine::maxwell3d { gpu::interconnect::GraphicsContext context; + /** + * @brief Calls the appropriate function corresponding to a certain method with the supplied argument + */ + void HandleMethod(u32 method, u32 argument, bool redundantCheck = false); + /** * @brief Writes back a semaphore result to the guest with an auto-generated timestamp (if required) * @note If the semaphore is OneWord then the result will be downcasted to a 32-bit unsigned integer @@ -233,10 +238,10 @@ namespace skyline::soc::gm20b::engine::maxwell3d { Maxwell3D(const DeviceState &state, ChannelContext &channelCtx, gpu::interconnect::CommandExecutor &executor); /** - * @brief Resets the Maxwell 3D registers to their default values + * @brief Initializes Maxwell 3D registers to their default values */ - void ResetRegs(); + void InitializeRegisters(); - void CallMethod(u32 method, u32 argument, bool lastCall); + void CallMethod(u32 method, u32 argument, bool lastCall = false); }; }