Closed Cee123 closed 2 years ago
because no one wants to work on powerpc
Actually yeah, I did try to build the cores for Wii on Linux, but that was the thing that was giving me the biggest issue is I kept getting errors for powerpc-eabi-gcc.
If I can do it, you can too! https://ci.appveyor.com/project/trioan/libretro-handy/builds/34709308 https://raw.githubusercontent.com/trioan/libretro-handy/wii/appveyor-git.yml
Nice! I couldn't get it to build just kept getting a bunch of error messages i dont know why.
I tried following these instructions https://docs.libretro.com/development/retroarch/compilation/wii/
But seems to be something missing here.
https://docs.libretro.com/development/retroarch/compilation/wii/
You need the homebrew Nintendo Wii SDK libogc and Devkitpro PPC toolchain installed.
1) Be sure to use the libretro Devkitpro tools. And manually setup the DEVKITPPC
and DEVKITPRO
paths.
https://github.com/libretro/libretro-toolchains/blob/master/wiiu.tar.xz?raw=true
Which I did in my script
export DIR = $PWD
export PATH="$DIR/tools/devkitpro/devkitPPC/powerpc-eabi:$PATH"
export DEVKITPPC="$DIR/tools/devkitpro/devkitPPC"
export DEVKITPRO="$DIR/tools/devkitpro"
2) Then try make -f Makefile platform=wii
Nice, that's fantastic. Thank you! I'll try and do what you said and see if I can compile it for the Wii. That was what I was missing I think.
@trioan Thanks! That seemed to work.
I copied your script above, and extracted the necessary files in the same location, and I'm also now using that same path and everything seems to be working now but still with some minor issues that I'm trying to figure out.
ls: cannot access '*_wii.a': No such file or directory
Huh. Could be linux path thing. My entire bash script is
cd .
export DIR=$PWD
export PATH="$DIR/tools/devkitpro/devkitPPC/powerpc-eabi:$PATH"
export DEVKITPPC="$DIR/tools/devkitpro/devkitPPC"
export DEVKITPRO="$DIR/tools/devkitpro"
git clone https://github.com/libretro/RetroArch Retroarch
wget "https://github.com/libretro/libretro-toolchains/blob/master/wiiu.tar.xz?raw=true" -O "wiiu.tar.xz"
mkdir tools
tar xf wiiu.tar.xz -C tools
cd $DIR
make -f Makefile platform=wii
cp *.a $DIR/Retroarch/dist-scripts
cd $DIR/Retroarch/dist-scripts
chmod a+x dist-cores.sh
./dist-cores.sh wii
I finally got it to compile (as well as a few other cores I'm testing) by placing the devkitpro files in the root of the drive and merging them with the system files (i.e. merging the bin folders etc). Now I don't have to worry about paths. I'm using a virtual machine anyway.
So, this core works on the Wii! Runs better than the Mednafen Lynx core... BUT there's a small issue. It doesn't seem to detect the Wii controllers. You can access the Retroarch menu and everything, but the controllers themselves in game don't seem to respond. Not sure why that is. Strange.
Beetle Lynx input works?
Beetle Lynx input works?
Yeah Beetle Lynx works. They've included it in retroarch wii. Works pretty good.
The control problem was also on these other cores I've tried:
So that must be why they dont include these cores in official retroarch wii.
First guess: MSB flip.
https://github.com/libretro/libretro-handy/blob/master/libretro/libretro.cpp#L292
static unsigned get_lynx_input(void)
{
unsigned i, res = 0;
for (i = 0; i < sizeof(btn_map_no_rot) / sizeof(map); ++i)
res |= input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, btn_map[i].retro) ? btn_map[i].lynx : 0;
#ifdef MSB_FIRST
return ((res<<8)&0xff00) | ((res>>8)&0xff);
#else
return res;
#endif
}
Well, I'm thinking it might not be to do with those cores now. It's happening with most of my other cores now and seems to be with the latest version/s of retroarch. It's even happening with the cores that I've grabbed from a nightly a couple months back. It doesn't matter if I've compiled the cores or got them from a nightly. Some are working, some aren't and it seems to be totally random which cores have working controls. The controls for Cave Story aren't working, neither with Mr Boom and also for FCEUmm and also a bunch of others. I've tried deleting the retroarch configs and letting it generate new ones. I've also replaced the boot.dol with other versions thinking that's the problem. Nothing's working. Really strange.
Tried current handy core with Dolphin Wii emulator and input works using virtual GCPad controller.
@Cee123 Do any other Mednafen cores work besides Lynx? Trying to wonder if the Handy core needs to use the updated Libretro input bitmask api.
@trioan Hey yeah well, the controls don't seem to be responding on Mednafen PCE Fast or Mednafen VB at the moment either.
But they are working fine on Mednafen Supergrafx.
Added support for input bitmasks. https://github.com/libretro/libretro-handy/pull/81
Based on the other working repos, it could fix your Wii input problem. Please test. https://ci.appveyor.com/project/trioan/libretro-handy/builds/35059824/artifacts
@Cee123 If you have some time, would you mind testing this Wii build to see if your input problems get fixed? https://ci.appveyor.com/project/trioan/libretro-handy/builds/35169071/artifacts
Based on your working Wii repos, they all use input bitmasks which reads the controller in 1 go. So I think it may cure the Handy problem. If it works, then I guess I'll add it to some of the other bad cores.
@trioan Oh great! Thank you. That's excellent. Yeah i will gladly test it out, see if the issue is fixed with the input bitmask. If that is the issue then it should be a pretty simple fix (hopefully!).
@trioan Well, I just tried it out. And I can say it's working. Good work, you fixed it! That's fantastic, the controls are working fine now! Seems like that was the issue.
Yeah that version you posted works perfect.
The next problem is that the buildbot is not building this core for Wii?
The next problem is that the buildbot is not building this core for Wii?
Ah really? Damn, wonder why.
Once that gets merged, buildbot will take care of the rest and this ticket can get shut down.
Should be added now for Wii/WiiU as well as Gamecube.
Should be added now for Wii/WiiU as well as Gamecube.
Yeah, was added a while ago now. Meant to close this earlier but forgot about it.
Hi there, just wondering why this core is not available on Retroarch for Wii.