Compare commits

...

7 Commits

Author SHA1 Message Date
GregoireLD
c4e7acad89
Merge a800e8a381 into 80ea68b13c 2024-11-12 02:26:58 +01:00
JMC47
80ea68b13c
Merge pull request #13183 from Tilka/sync_on_fifo_reset
ProcessorInterface: sync GPU just before PI_FIFO_RESET
2024-11-11 00:38:26 -05:00
Tilka
375a990e41
Merge pull request #13185 from JosJuice/rvz-clarify-padding-none
docs: Clarify wia_except_list_t padding in uncompressed groups
2024-11-10 15:40:08 +00:00
JosJuice
1c7d9ad300 docs: Clarify wia_except_list_t padding in uncompressed groups
https://bugs.dolphin-emu.org/issues/13671
2024-11-10 14:52:30 +01:00
Tillmann Karras
fbce737415 ProcessorInterface: sync GPU just before PI_FIFO_RESET
GXAbortFrame() is problematic for Dolphin because it first writes
PI_FIFO_RESET (for which we discard our internal fifo), then disables CP
reads (for which we execute pending commands in the GP fifo in emulated
memory). I don't know whether there is a race condition on hardware, but
there is one for us. Avoid this by also doing a GPU sync here.
2024-11-09 03:29:05 +00:00
GregoireLD
a800e8a381
Merge branch 'dolphin-emu:master' into master 2024-02-06 10:45:23 +01:00
Gregoire L. D.
8c2435895b Changing SIDevice into SerialDevice with full backward compatibility 2024-02-04 23:48:50 +01:00
5 changed files with 43 additions and 16 deletions

View File

@ -27,10 +27,10 @@ enum class IntSetting(
MAIN_SLOT_B(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SlotB", 255),
MAIN_SERIAL_PORT_1(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SerialPort1", 255),
MAIN_FALLBACK_REGION(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "FallbackRegion", 2),
MAIN_SI_DEVICE_0(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SIDevice0", 6),
MAIN_SI_DEVICE_1(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SIDevice1", 0),
MAIN_SI_DEVICE_2(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SIDevice2", 0),
MAIN_SI_DEVICE_3(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SIDevice3", 0),
MAIN_SI_DEVICE_0(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SerialDevice1", 6),
MAIN_SI_DEVICE_1(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SerialDevice2", 0),
MAIN_SI_DEVICE_2(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SerialDevice3", 0),
MAIN_SI_DEVICE_3(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SerialDevice4", 0),
MAIN_AUDIO_VOLUME(Settings.FILE_DOLPHIN, Settings.SECTION_INI_DSP, "Volume", 100),
MAIN_OVERLAY_GC_CONTROLLER(
Settings.FILE_DOLPHIN,

View File

@ -145,16 +145,35 @@ const Info<std::string> MAIN_BBA_BUILTIN_IP{{System::Main, "Core", "BBA_BUILTIN_
const Info<SerialInterface::SIDevices>& GetInfoForSIDevice(int channel)
{
// Added on 2022-03-07 to migrate parameters, remove will be possible in a future version
static const std::array<const Info<SerialInterface::SIDevices>, 4> infos{
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SIDevice0"},
SerialInterface::SIDEVICE_GC_CONTROLLER},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SIDevice1"},
SerialInterface::SIDEVICE_NONE},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SIDevice2"},
SerialInterface::SIDEVICE_NONE},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SIDevice3"},
SerialInterface::SIDEVICE_NONE},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SerialDevice1"},
Config::Get(Info<SerialInterface::SIDevices>{
{System::Main, "Core", "SIDevice0"},SerialInterface::SIDEVICE_GC_CONTROLLER})},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SerialDevice2"},
Config::Get(Info<SerialInterface::SIDevices>{
{System::Main, "Core", "SIDevice1"},SerialInterface::SIDEVICE_NONE})},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SerialDevice3"},
Config::Get(Info<SerialInterface::SIDevices>{
{System::Main, "Core", "SIDevice2"},SerialInterface::SIDEVICE_NONE})},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SerialDevice4"},
Config::Get(Info<SerialInterface::SIDevices>{
{System::Main, "Core", "SIDevice3"},SerialInterface::SIDEVICE_NONE})},
};
// Next version that will replace the above
/*
static const std::array<const Info<SerialInterface::SIDevices>, 4> infos{
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SerialDevice1"},
SerialInterface::SIDEVICE_GC_CONTROLLER},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SerialDevice2"},
SerialInterface::SIDEVICE_NONE},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SerialDevice3"},
SerialInterface::SIDEVICE_NONE},
Info<SerialInterface::SIDevices>{{System::Main, "Core", "SerialDevice4"},
SerialInterface::SIDEVICE_NONE},
};*/
return infos[channel];
}

View File

@ -76,6 +76,10 @@ static const INIToLocationMap& GetINIToLocationMap()
{{"Wii", "Language"}, {Config::SYSCONF_LANGUAGE.GetLocation()}},
{{"Core", "HLE_BS2"}, {Config::MAIN_SKIP_IPL.GetLocation()}},
{{"Core", "GameCubeLanguage"}, {Config::MAIN_GC_LANGUAGE.GetLocation()}},
{{"Core", "SIDevice0"}, {Config::GetInfoForSIDevice(0).GetLocation()}},
{{"Core", "SIDevice1"}, {Config::GetInfoForSIDevice(1).GetLocation()}},
{{"Core", "SIDevice2"}, {Config::GetInfoForSIDevice(2).GetLocation()}},
{{"Core", "SIDevice3"}, {Config::GetInfoForSIDevice(3).GetLocation()}},
{{"Controls", "PadType0"}, {Config::GetInfoForSIDevice(0).GetLocation()}},
{{"Controls", "PadType1"}, {Config::GetInfoForSIDevice(1).GetLocation()}},
{{"Controls", "PadType2"}, {Config::GetInfoForSIDevice(2).GetLocation()}},

View File

@ -98,6 +98,10 @@ void ProcessorInterfaceManager::RegisterMMIO(MMIO::Mapping* mmio, u32 base)
{
system.GetGPFifo().ResetGatherPipe();
// Assume that all bytes that made it into the GPU fifo did in fact execute
// before this MMIO write takes effect.
system.GetFifo().SyncGPUForRegisterAccess();
// Call Fifo::ResetVideoBuffer() from the video thread. Since that function
// resets various pointers used by the video thread, we can't call it directly
// from the CPU thread, so queue a task to do it instead. In single-core mode,

View File

@ -126,7 +126,7 @@ A `wia_group_t` normally contains `chunk_size` bytes of decompressed data (or `c
|Type and name|Description|
|--|--|
|`u32 data_off4`|The offset in the file where the compressed data is stored, divided by 4.|
|`u32 data_size`|The size of the compressed data, including any `wia_except_list_t` structs. 0 is a special case meaning that every byte of the decompressed data is `0x00` and the `wia_except_list_t` structs (if there are supposed to be any) contain 0 exceptions.|
|`u32 data_size`|The size of the compressed data, including any `wia_except_list_t` structs, and including any padding that is required after the `wia_except_list_t` structs when using the compression method NONE or PURGE. 0 is a special case meaning that every byte of the decompressed data is `0x00` and the `wia_except_list_t` structs (if there are supposed to be any) contain 0 exceptions.|
## `wia_exception_t`
@ -152,7 +152,7 @@ For memory management reasons, programs which read WIA files might place a limit
|`u16 n_exceptions`|The number of `wia_exception_t` structs.|
|`wia_exception_t exception[n_exceptions]`|Each `wia_exception_t` describes one difference between the hashes obtained by hashing the partition data and the original hashes.|
Somewhat ironically, there are exceptions to how `wia_except_list_t` structs are handled:
Somewhat ironically, there are exceptions to how `wia_except_list_t` structs are handled depending on what compression method is used for the group's data:
- For the compression method PURGE, the `wia_except_list_t` structs are stored uncompressed (in other words, before the first `wia_segment_t`). For BZIP2, LZMA and LZMA2, they are compressed along with the rest of the data.
- For the compression methods NONE and PURGE, if the end offset of the last ``wia_except_list_t`` is not evenly divisible by 4, padding is inserted after it so that the data afterwards will start at a 4 byte boundary. This padding is not inserted for the other compression methods.
@ -185,12 +185,12 @@ RVZ is a file format which is closely based on WIA. The differences are as follo
Compared to `wia_group_t`, `rvz_group_t` changes the meaning of the most significant bit of `data_size` and adds one additional attribute.
"Compressed data" below means the data as it is stored in the file. When compression is disabled, this "compressed data" is actually not compressed.
"Compressed data" below means the data as it is stored in the file. When the compression method is NONE, this "compressed data" is actually not compressed.
|Type and name|Description|
|--|--|
|`u32 data_off4`|The offset in the file where the compressed data is stored, divided by 4.|
|`u32 data_size`|The most significant bit is 1 if the data is compressed using the compression method indicated in `wia_disc_t`, and 0 if it is not compressed. The lower 31 bits are the size of the compressed data, including any `wia_except_list_t` structs. The lower 31 bits being 0 is a special case meaning that every byte of the decompressed and unpacked data is `0x00` and the `wia_except_list_t` structs (if there are supposed to be any) contain 0 exceptions.|
|`u32 data_size`|The most significant bit is 1 if the data is stored using the compression method indicated in `wia_disc_t`, and 0 if it is stored using the compression method NONE. The lower 31 bits are the size of the compressed data, including any `wia_except_list_t` structs, and including any padding that is required after the `wia_except_list_t` structs when using the compression method NONE. The lower 31 bits being 0 is a special case meaning that every byte of the decompressed and unpacked data is `0x00` and the `wia_except_list_t` structs (if there are supposed to be any) contain 0 exceptions.|
|`u32 rvz_packed_size`|The size after decompressing but before decoding the RVZ packing. If this is 0, RVZ packing is not used for this group.|
## RVZ packing