mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-14 05:55:13 +01:00
nfc: Improve implementation of GetAmiiboConfig
When making the initial implementation, I forgot to add the series variable to the AmiiboConfig struct. With this PR it is added and many of the AmiiboConfig fields get their proper values now. The loading of the Amiibo data that is added here has been hwtested. This fixes Amiibos in Yoshis Woolly World, Smash (partially) and probably other games too.
This commit is contained in:
parent
acaca4188e
commit
ff3d7532c9
@ -27,6 +27,7 @@ struct AmiiboConfig {
|
|||||||
u8 lastwritedate_day;
|
u8 lastwritedate_day;
|
||||||
u16_le write_counter;
|
u16_le write_counter;
|
||||||
std::array<u8, 3> characterID;
|
std::array<u8, 3> characterID;
|
||||||
|
u8 series;
|
||||||
u16_le amiiboID;
|
u16_le amiiboID;
|
||||||
u8 type;
|
u8 type;
|
||||||
u8 pagex4_byte3;
|
u8 pagex4_byte3;
|
||||||
@ -141,7 +142,14 @@ void Module::Interface::GetAmiiboConfig(Kernel::HLERequestContext& ctx) {
|
|||||||
amiibo_config.lastwritedate_year = 2017;
|
amiibo_config.lastwritedate_year = 2017;
|
||||||
amiibo_config.lastwritedate_month = 10;
|
amiibo_config.lastwritedate_month = 10;
|
||||||
amiibo_config.lastwritedate_day = 10;
|
amiibo_config.lastwritedate_day = 10;
|
||||||
// TODO(FearlessTobi): Find the right values for the struct
|
amiibo_config.write_counter = 0x0;
|
||||||
|
std::memcpy(amiibo_config.characterID.data(), &nfc->amiibo_data.char_id,
|
||||||
|
sizeof(nfc->amiibo_data.char_id));
|
||||||
|
amiibo_config.series = nfc->amiibo_data.series;
|
||||||
|
amiibo_config.amiiboID = nfc->amiibo_data.model_number;
|
||||||
|
amiibo_config.type = nfc->amiibo_data.figure_type;
|
||||||
|
amiibo_config.pagex4_byte3 = 0x0;
|
||||||
|
amiibo_config.appdata_size = 0xD8;
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(17, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(17, 0);
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
Loading…
Reference in New Issue
Block a user