begin work on proper multiplayer UI shito.

for now, determine a global instance ID, and derivate the system MAC from it. remove 'randomize MAC' option.
This commit is contained in:
Arisotura
2022-09-15 21:22:10 +02:00
parent 139fe5a045
commit 648bf9fa7f
6 changed files with 86 additions and 20 deletions

View File

@ -385,24 +385,23 @@ void Reset()
*(u16*)&Firmware[userdata+0x72] = CRC16(&Firmware[userdata], 0x70, 0xFFFF);
if (firmoverride)
//if (firmoverride)
{
u8 mac[6];
bool rep;
bool rep = false;
if (Platform::GetConfigBool(Platform::Firm_RandomizeMAC))
{
mac[0] = 0x00;
mac[1] = 0x09;
mac[2] = 0xBF;
mac[3] = rand()&0xFF;
mac[4] = rand()&0xFF;
mac[5] = rand()&0xFF;
rep = true;
}
else
{
memcpy(mac, &Firmware[0x36], 6);
if (firmoverride)
rep = Platform::GetConfigArray(Platform::Firm_MAC, mac);
int inst = Platform::InstanceID();
if (inst > 0)
{
rep = true;
mac[3] += inst;
mac[4] += inst*0x44;
mac[5] += inst*0x10;
}
if (rep)