dborth / snes9xgx

Snes9x GX - Port of Snes9x for Wii
http://wiibrew.org/wiki/Snes9x_GX
Other
438 stars 64 forks source link

Compiling snes9xgx-4.4.8 with matguitarist's modded libogc for 3rd party controllers #947

Closed arthurfreitas96 closed 3 years ago

arthurfreitas96 commented 3 years ago

Hello, I bought a 3rd party Wii Classic Controller Pro that is giving me very laggy output in the current version of snes9xgx (in wii games and gc games the controller works fine). I found a youtuber reviewing an off-brand controller (not the Pro though) and experiencing the same, here: https://www.youtube.com/watch?v=P9b4ZtHvlLs&t=420s

I tested older versions of the emulator but the only one that solved my problem was the patch mentioned in this post: https://gbatemp.net/threads/latest-emulator-and-libogc-with-3rd-party-classic-controller.217245/

However, matguitarist made his patch using snes9xgx version 4.3.2 and I wanted to compile the current version (4.4.8) using matguitarist's modded libogc and and portlibs folders and this is the first time that I try to compile this emulator. I'm using devkitpro pacman and in devkitpro's folder, I replaced libogc and portlibs folders with the modded ones. Then, after getting some problems compiling the snes9xgx's source code, I started using devkitPPC r29-1. I also installed the following packages: ppc-bzip2 ppc-freetype ppc-libjpeg-turbo ppc-libogg ppc-libpng ppc-libvorbisidec ppc-mpg123 ppc-mxml ppc-pkg-config ppc-zlib

When I try to compile the source code I get:

$ sudo DEVKITPRO=/opt/devkitpro DEVKITPPC=$DEVKITPRO/devkitPPC make -f Makefile make -f Makefile.wii make[1]: Entering directory '/home/arthur/Downloads/snes9xgx-4.4.8' linking ... snes9xgx-wii.elf /opt/devkitpro/devkitPPC/lib/gcc/powerpc-eabi/6.3.0/../../../../powerpc-eabi/bin/ld: Warning: /opt/devkitpro/portlibs/ppc/lib/libpng.a(png.o) uses unknown floating point ABI 9 /opt/devkitpro/devkitPPC/lib/gcc/powerpc-eabi/6.3.0/../../../../powerpc-eabi/bin/ld: Warning: /opt/devkitpro/portlibs/ppc/lib/libpng.a(pngget.o) uses unknown floating point ABI 9 /opt/devkitpro/devkitPPC/lib/gcc/powerpc-eabi/6.3.0/../../../../powerpc-eabi/bin/ld: Warning: /opt/devkitpro/portlibs/ppc/lib/libpng.a(pngrtran.o) uses unknown floating point ABI 9 /opt/devkitpro/devkitPPC/lib/gcc/powerpc-eabi/6.3.0/../../../../powerpc-eabi/bin/ld: Warning: /opt/devkitpro/portlibs/ppc/lib/libpng.a(pngset.o) uses unknown floating point ABI 9 /opt/devkitpro/devkitPPC/lib/gcc/powerpc-eabi/6.3.0/../../../../powerpc-eabi/bin/ld: Warning: /opt/devkitpro/portlibs/ppc/lib/libmxml.a(mxml-attr.o) uses unknown floating point ABI 9 /opt/devkitpro/devkitPPC/lib/gcc/powerpc-eabi/6.3.0/../../../../powerpc-eabi/bin/ld: Warning: /opt/devkitpro/portlibs/ppc/lib/libmxml.a(mxml-file.o) uses unknown floating point ABI 9 /opt/devkitpro/devkitPPC/lib/gcc/powerpc-eabi/6.3.0/../../../../powerpc-eabi/bin/ld: Warning: /opt/devkitpro/portlibs/ppc/lib/libmxml.a(mxml-node.o) uses unknown floating point ABI 9 /opt/devkitpro/devkitPPC/lib/gcc/powerpc-eabi/6.3.0/../../../../powerpc-eabi/bin/ld: Warning: /opt/devkitpro/portlibs/ppc/lib/libmxml.a(mxml-private.o) uses unknown floating point ABI 9 /opt/devkitpro/devkitPPC/lib/gcc/powerpc-eabi/6.3.0/../../../../powerpc-eabi/bin/ld: Warning: /opt/devkitpro/portlibs/ppc/lib/libmxml.a(mxml-string.o) uses unknown floating point ABI 9 /opt/devkitpro/devkitPPC/lib/gcc/powerpc-eabi/6.3.0/../../../../powerpc-eabi/bin/ld: Warning: /opt/devkitpro/portlibs/ppc/lib/libbz2.a(compress.o) uses unknown floating point ABI 9 /opt/devkitpro/devkitPPC/lib/gcc/powerpc-eabi/6.3.0/../../../../powerpc-eabi/bin/ld: Warning: /opt/devkitpro/portlibs/ppc/lib/libbz2.a(blocksort.o) uses unknown floating point ABI 9 /opt/devkitpro/devkitPPC/lib/gcc/powerpc-eabi/6.3.0/../../../../powerpc-eabi/bin/ld: Warning: /opt/devkitpro/portlibs/ppc/lib/libz.a(gzwrite.o) uses unknown floating point ABI 9 /opt/devkitpro/devkitPPC/lib/gcc/powerpc-eabi/6.3.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/libogc/lib/wii/libogc.a(gu_psasm.o): In function ps_guMtxConcat': (.text+0x2e): error: R_PPC_SDAREL16 againstUnit01' not a multiple of 16 /opt/devkitpro/devkitPPC/lib/gcc/powerpc-eabi/6.3.0/../../../../powerpc-eabi/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status /opt/devkitpro/devkitPPC/wii_rules:24: recipe for target '/home/arthur/Downloads/snes9xgx-4.4.8/executables/snes9xgx-wii.elf' failed make[2]: [/home/arthur/Downloads/snes9xgx-4.4.8/executables/snes9xgx-wii.elf] Error 1 Makefile.wii:111: recipe for target 'build_wii' failed make[1]: [build_wii] Error 2 make[1]: Leaving directory '/home/arthur/Downloads/snes9xgx-4.4.8' Makefile:10: recipe for target 'wii' failed make: *** [wii] Error 2

What am I missing? Thank you in advance.

dborth commented 3 years ago

Yeah you're trying to mix and match. that usually doesn't work out very well.

I've written a fix of my own, can you try it out? snes9xgx-wii.zip

arthurfreitas96 commented 3 years ago

Just tried it and its working. Problem solved. What was causing it? Its possible to keep this fix in future releases? And thank tou very much for your help.

dborth commented 3 years ago

Looks like when I fixed 3rd party controllers 10 years ago there still remained a group of them that don't send back calibration data and wiiuse would continue forever trying to retrieve it. I coded a fix and I've made a PR to libogc.

https://github.com/devkitPro/libogc/pull/100

It's frustrating that people (in this case matguitarist) don't submit these fixes upstream and instead compile and distribute forked code.