mirror of
https://github.com/azahar-emu/ArticSetupTool
synced 2025-11-06 23:20:00 +01:00
Initial release
This commit is contained in:
parent
2c8513d457
commit
89ea8862f1
2
Makefile
2
Makefile
@ -1,5 +1,5 @@
|
|||||||
VERSION_MAJOR := 1
|
VERSION_MAJOR := 1
|
||||||
VERSION_MINOR := 2
|
VERSION_MINOR := 0
|
||||||
VERSION_REVISION := 0
|
VERSION_REVISION := 0
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|||||||
@ -15,7 +15,7 @@ INCLUDES := ArticProtocol/includes includes
|
|||||||
SOURCES := ArticProtocol/sources sources sources/CTRPluginFramework
|
SOURCES := ArticProtocol/sources sources sources/CTRPluginFramework
|
||||||
|
|
||||||
VERSION_MAJOR := 1
|
VERSION_MAJOR := 1
|
||||||
VERSION_MINOR := 2
|
VERSION_MINOR := 0
|
||||||
VERSION_REVISION := 0
|
VERSION_REVISION := 0
|
||||||
SERVER_PORT := 5543
|
SERVER_PORT := 5543
|
||||||
|
|
||||||
|
|||||||
@ -524,7 +524,7 @@ namespace ArticFunctions {
|
|||||||
if (!ret_buf) {
|
if (!ret_buf) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ret_buf->data[0] = INITIAL_SETUP_APP_VERSION;
|
reinterpret_cast<u32*>(ret_buf->data)[0] = INITIAL_SETUP_APP_VERSION;
|
||||||
|
|
||||||
mi.FinishGood(0);
|
mi.FinishGood(0);
|
||||||
}
|
}
|
||||||
@ -539,7 +539,7 @@ namespace ArticFunctions {
|
|||||||
|
|
||||||
if (!good) return;
|
if (!good) return;
|
||||||
|
|
||||||
if (type < 0 || type > 3) {
|
if (type < 0 || type > 5) {
|
||||||
mi.FinishGood(-1);
|
mi.FinishGood(-1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -650,6 +650,39 @@ namespace ArticFunctions {
|
|||||||
res = FSFILE_Read(file, &bytes_read, 0, ret_buf->data, (u32)size);
|
res = FSFILE_Read(file, &bytes_read, 0, ret_buf->data, (u32)size);
|
||||||
FSFILE_Close(file);
|
FSFILE_Close(file);
|
||||||
mi.FinishGood(bytes_read != size ? -2 : res);
|
mi.FinishGood(bytes_read != size ? -2 : res);
|
||||||
|
} else if (type == 4) {
|
||||||
|
Result res = cfguInit();
|
||||||
|
if (R_FAILED(res)) {
|
||||||
|
mi.FinishGood(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
u64 consoleID = 0;
|
||||||
|
u32 random = 0;
|
||||||
|
res = CFGU_GetConfigInfoBlk2(0x8, 0x00090001, &consoleID);
|
||||||
|
if (R_SUCCEEDED(res)) res = CFGU_GetConfigInfoBlk2(0x4, 0x00090002, &random);
|
||||||
|
if (R_FAILED(res)) {
|
||||||
|
cfguExit();
|
||||||
|
mi.FinishGood(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
ArticProtocolCommon::Buffer* ret_buf = mi.ReserveResultBuffer(0, 0xC);
|
||||||
|
if (!ret_buf) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
*reinterpret_cast<u64*>(ret_buf->data) = consoleID;
|
||||||
|
*reinterpret_cast<u32*>(ret_buf->data + 8) = random;
|
||||||
|
|
||||||
|
mi.FinishGood(res);
|
||||||
|
} else if (type == 5) {
|
||||||
|
ArticProtocolCommon::Buffer* ret_buf = mi.ReserveResultBuffer(0, 6);
|
||||||
|
if (!ret_buf) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy(ret_buf->data, OS_SharedConfig->wifi_macaddr, 6);
|
||||||
|
|
||||||
|
mi.FinishGood(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user