socket: Implement missing errno values and improve network error handling

Add support for missing errno values needed by TOTK:
- Add BUSY (16) for "Device or resource busy" errors
- Add NOTSOCK (88) for "Socket operation on non-socket" errors

Improvements:
- Update TranslateNativeError on both Windows and Unix to handle new error codes
- Change socket error logging for NOTSOCK from WARNING to DEBUG level
- Fix formatting in Unix errno translation code
- Update shader storage buffer tracking range to accommodate TOTK buffers
- Add hex format to storage buffer logging for easier comparison with bias range
- Change storage buffer tracking log level from WARNING to DEBUG

These changes help prevent error messages in games
that use network features not fully implemented in the emulator yet.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
Zephyron 2025-04-25 14:38:28 +10:00
parent 5f962dd1c6
commit 48eed78d1a
5 changed files with 36 additions and 6 deletions

View file

@ -381,7 +381,7 @@ void CollectStorageBuffers(IR::Block& block, IR::Inst& inst, StorageInfo& info)
static constexpr Bias nvn_bias{
.index = 0,
.offset_begin = 0x100, // Expanded from 0x110 to catch more potential storage buffers
.offset_end = 0x800, // Expanded from 0x610 to include a wider range
.offset_end = 0x1000, // Substantially expanded to include all TOTK storage buffers
.alignment = 32, // Increased from 16 to optimize memory access patterns
};
// Track the low address of the instruction
@ -402,8 +402,8 @@ void CollectStorageBuffers(IR::Block& block, IR::Inst& inst, StorageInfo& info)
LOG_WARNING(Shader, "Storage buffer failed to track, using global memory fallbacks");
return;
}
LOG_WARNING(Shader, "Storage buffer tracked without bias, index {} offset {}",
storage_buffer->index, storage_buffer->offset);
LOG_DEBUG(Shader, "Storage buffer tracked without bias, index {} offset 0x{:X}",
storage_buffer->index, storage_buffer->offset);
}
// Collect storage buffer and the instruction
if (IsGlobalMemoryWrite(inst)) {