@@ -1164,7 +1164,7 @@ static int sceNetApctlGetState(u32 pStateAddr) {
1164
1164
return hleLogSuccessI (SCENET, 0 );
1165
1165
}
1166
1166
1167
- return hleLogError (SCENET, -1 , " apctl invalid arg" );
1167
+ return hleLogError (SCENET, -1 , " apctl invalid arg" ); // 0x8002013A or ERROR_NET_WLAN_INVALID_ARG ?
1168
1168
}
1169
1169
1170
1170
int NetApctl_ScanUser () {
@@ -1181,14 +1181,12 @@ static int sceNetApctlScanUser() {
1181
1181
return NetApctl_ScanUser ();
1182
1182
}
1183
1183
1184
- static int sceNetApctlGetBSSDescIDListUser (u32 sizeAddr, u32 bufAddr) {
1185
- WARN_LOG (SCENET, " UNTESTED %s(%08x, %08x)" , __FUNCTION__, sizeAddr, bufAddr);
1186
-
1184
+ int NetApctl_GetBSSDescIDListUser (u32 sizeAddr, u32 bufAddr) {
1187
1185
const int userInfoSize = 8 ; // 8 bytes per entry (next address + entry id)
1188
1186
// Faking 4 entries, games like MGS:PW Recruit will need to have a different AP for each entry
1189
1187
int entries = 4 ;
1190
- if (!Memory::IsValidAddress (sizeAddr))
1191
- hleLogError (SCENET, -1 , " apctl invalid arg" );
1188
+ if (!Memory::IsValidAddress (sizeAddr) || ! Memory::IsValidAddress (bufAddr) )
1189
+ return hleLogError (SCENET, -1 , " apctl invalid arg" ); // 0x8002013A or ERROR_NET_WLAN_INVALID_ARG ?
1192
1190
1193
1191
int size = Memory::Read_U32 (sizeAddr);
1194
1192
// Return size required
@@ -1205,7 +1203,7 @@ static int sceNetApctlGetBSSDescIDListUser(u32 sizeAddr, u32 bufAddr) {
1205
1203
DEBUG_LOG (SCENET, " %s writing ID#%d to %08x" , __FUNCTION__, i, bufAddr + offset);
1206
1204
1207
1205
// Pointer to next Network structure in list
1208
- Memory::Write_U32 ((i+ 1 )* userInfoSize + bufAddr, bufAddr + offset);
1206
+ Memory::Write_U32 ((i + 1 ) * userInfoSize + bufAddr, bufAddr + offset);
1209
1207
offset += 4 ;
1210
1208
1211
1209
// Entry ID
@@ -1217,14 +1215,17 @@ static int sceNetApctlGetBSSDescIDListUser(u32 sizeAddr, u32 bufAddr) {
1217
1215
Memory::Write_U32 (0 , bufAddr + offset - userInfoSize);
1218
1216
}
1219
1217
1220
- return hleLogWarning (SCENET, 0 , " untested " ) ;
1218
+ return 0 ;
1221
1219
}
1222
1220
1223
- static int sceNetApctlGetBSSDescEntryUser (int entryId, int infoId, u32 resultAddr) {
1224
- WARN_LOG (SCENET, " UNTESTED %s(%i, %i, %08x)" , __FUNCTION__, entryId, infoId, resultAddr);
1221
+ static int sceNetApctlGetBSSDescIDListUser (u32 sizeAddr, u32 bufAddr) {
1222
+ WARN_LOG (SCENET, " UNTESTED %s(%08x, %08x)" , __FUNCTION__, sizeAddr, bufAddr);
1223
+ return NetApctl_GetBSSDescIDListUser (sizeAddr, bufAddr);
1224
+ }
1225
1225
1226
+ int NetApctl_GetBSSDescEntryUser (int entryId, int infoId, u32 resultAddr) {
1226
1227
if (!Memory::IsValidAddress (resultAddr))
1227
- hleLogError (SCENET, -1 , " apctl invalid arg" );
1228
+ return hleLogError (SCENET, -1 , " apctl invalid arg" ); // 0x8002013A or ERROR_NET_WLAN_INVALID_ARG ?
1228
1229
1229
1230
// Generate an SSID name
1230
1231
char dummySSID[APCTL_SSID_MAXLEN] = " WifiAP0" ;
@@ -1286,11 +1287,16 @@ static int sceNetApctlGetBSSDescEntryUser(int entryId, int infoId, u32 resultAdd
1286
1287
return hleLogError (SCENET, ERROR_NET_APCTL_INVALID_CODE, " unknown info id" );
1287
1288
}
1288
1289
1289
- return hleLogWarning (SCENET, 0 , " untested" );
1290
+ return 0 ;
1291
+ }
1292
+
1293
+ static int sceNetApctlGetBSSDescEntryUser (int entryId, int infoId, u32 resultAddr) {
1294
+ WARN_LOG (SCENET, " UNTESTED %s(%i, %i, %08x)" , __FUNCTION__, entryId, infoId, resultAddr);
1295
+ return NetApctl_GetBSSDescEntryUser (entryId, infoId, resultAddr);
1290
1296
}
1291
1297
1292
1298
static int sceNetApctlScanSSID2 () {
1293
- ERROR_LOG (SCENET, " UNIMPL %s() at %08x" , __FUNCTION__, currentMIPS->pc );
1299
+ WARN_LOG (SCENET, " UNTESTED %s() at %08x" , __FUNCTION__, currentMIPS->pc );
1294
1300
return NetApctl_ScanUser ();
1295
1301
}
1296
1302
@@ -1301,8 +1307,8 @@ static int sceNetApctlScanSSID2() {
1301
1307
* Arg4 = input flag? or output number of entries being filled? (initially 0/1 ?)
1302
1308
***************/
1303
1309
static int sceNetApctlGetBSSDescIDList2 (u32 Arg1, u32 Arg2, u32 Arg3, u32 Arg4) {
1304
- ERROR_LOG (SCENET, " UNIMPL %s(%08x, %08x, %08x, %08x) at %08x" , __FUNCTION__, Arg1, Arg2, Arg3, Arg4, currentMIPS->pc );
1305
- return hleLogError (SCENET, sceNetApctlGetBSSDescIDListUser ( Arg1, Arg2), " unimplemented " );
1310
+ WARN_LOG (SCENET, " UNTESTED %s(%08x, %08x, %08x, %08x) at %08x" , __FUNCTION__, Arg1, Arg2, Arg3, Arg4, currentMIPS->pc );
1311
+ return NetApctl_GetBSSDescIDListUser ( Arg1, Arg2);
1306
1312
}
1307
1313
1308
1314
/* *************
@@ -1311,8 +1317,8 @@ static int sceNetApctlGetBSSDescIDList2(u32 Arg1, u32 Arg2, u32 Arg3, u32 Arg4)
1311
1317
* Arg3 = output buffer for retrieved entry data? (max size = 32 bytes? ie. APCTL_SSID_MAXLEN ? or similar to SceNetApctlInfoInternal union ?)
1312
1318
***************/
1313
1319
static int sceNetApctlGetBSSDescEntry2 (int entryId, int infoId, u32 resultAddr) {
1314
- ERROR_LOG (SCENET, " UNIMPL %s(%08x , %08x , %08x) at %08x" , __FUNCTION__, entryId, infoId, resultAddr, currentMIPS->pc );
1315
- return hleLogError (SCENET, sceNetApctlGetBSSDescEntryUser ( entryId, infoId, resultAddr), " unimplemented " );
1320
+ WARN_LOG (SCENET, " UNTESTED %s(%i , %i , %08x) at %08x" , __FUNCTION__, entryId, infoId, resultAddr, currentMIPS->pc );
1321
+ return NetApctl_GetBSSDescEntryUser ( entryId, infoId, resultAddr);
1316
1322
}
1317
1323
1318
1324
static int sceNetResolverInit ()
0 commit comments