Closed camthehaxman closed 5 months ago
I've gotten the input to work properly. However, split screen doesn't work in competition mode. It only shows Player 1's screen.
Thanks for the PR!
I've gotten the input to work properly. However, split screen doesn't work in competition mode. It only shows Player 1's screen.
The current code only draws the main (first) framebuffer to the screen. The GX code would require some modifications in order to be able to copy and draw up to 4 framebuffers on the screen with a GX equivalent of: https://github.com/Mefiresu/RSDKv5-Decompilation/blob/7b21415279f0abdbb356688581b46061c2b507a0/RSDKv5/RSDK/Graphics/GLFW/GLFWRenderDevice.cpp#L343 Along with the removal of the SCREEN_COUNT macro redefinition that was done to save RAM: https://github.com/Mefiresu/RSDKv5-Decompilation/blob/7b21415279f0abdbb356688581b46061c2b507a0/platforms/NintendoWii.cmake#L50 I have no idea if there's enough RAM left to fit split screen multiplayer.
I'm kind of confused as to how the drawing actually works. As I understand it, everything is software rendered to a 424x240 framebuffer, and the GX backend converts that framebuffer to a texture and draws it as a quad onto the screen. There's some weird tiling stuff going on here, and I'm not entirely sure why that's necessary. The Wii natively supports RGB565 textures.
The tiling is done to improve widescreen resolution (instead of squishing the texture to 640x480 for anamorphic widescreen, multiple draw calls are used to use the entire 720x480 framebuffer).
Ok, I'll probably investigate split screen in a separate PR, then. This one at least allows co-op to work, which didn't before.
@Mefiresu Any other concerns with this PR, or can it be merged?
Works fine on my end, thank you!
This small change allows co-op mode to work. If playing as Sonic and Tails, a second Wii remote can be connected and will control Tails.
I still haven't yet figured out how to get competition mode working. Even after connecting multiple Wii remotes the character select screen only responds to the first one.