New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SI: Add 16bit accessors for SI IO buffer #7331
Conversation
m_code->SHR(64, R(m_dst_reg), Imm8(48)); | ||
break; | ||
case 32: | ||
m_code->SHR(64, R(m_dst_reg), Imm8(32)); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Source/Core/Core/HW/SI/SI.cpp
Outdated
mmio->Register(address, MMIO::DirectRead<u32>((u32*)&s_si_buffer[i]), | ||
MMIO::DirectWrite<u32>((u32*)&s_si_buffer[i])); | ||
mmio->Register(address, MMIO::DirectSwapRead<u32>((u32*)&s_si_buffer[i]), | ||
MMIO::DirectSwapWrite<u32>((u32*)&s_si_buffer[i])); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Works with all of our devices. Tested Keyboard, Dancemat (lol), Standard Controller, Steering Wheel, and Bongos. |
Dolphin has traditionally treated the SI IO buffer (128 bytes) as a set of 32 little endian u32s. This works out fine if you only ever read/write using aligned 32bit accesses. Different sized accesses or misaligned reads will mess it up. Byte swapping reads/writes will fix this up, but all the SI devices that use the SI IO buffer need to be adjusted.
Adding some extra accessors to the SI IO buffer.
Dolphin has traditionally treated the SI IO buffer (128 bytes) as a set of
32 little endian u32s. This works out fine if you only ever read/write
using aligned 32bit accesses. Different sized accesses or misaligned reads
will mess it up. Byte swapping reads/writes will fix this up, but all the
SI devices that use the SI IO buffer need to be fixed.