Anyone seen the unofficial GameCube adapter that popped up a few days ago, it has a PC mode for Windows and OSX, would this be too good to be true? (If I'm not allowed to post this link, tell me and I'll remove it)
Anyone seen the unofficial GameCube adapter that popped up a few days ago, it has a PC mode for Windows and OSX, would this be too good to be true? (If I'm not allowed to post this link, tell me and I'll remove it)
The bad news is that if I play on dolphin for about 45 minutes in a row using the controller, my computer will crash and restart from a kernel panic. I get this error message:
Code:
zalloc: zone map exhausted while allocating from zone kalloc.8192, likely due to memory leak in zone kalloc.256
I can reproduce this consistently, sometimes the error report will say kalloc.128 instead of kalloc.256, also I can post the whole error report if that would be helpful.
Ah, a good old memory leak, just like mum used to make. No need for the full error report, I can reproduce this on my end and - crucially - I can tell whether the error is happening before the kernel panic appears. You can do this by running
Code:
watch ioalloccount
Load the KEXT, and watch the 'Instance allocation' line. When you plug in the controller, it will start to increase without bound. When all your memory has been used up, it will kernel panic. At least, I'm pretty sure this is the case.
Some other information, when I first plug in the adapter and check the devices list in dolphin, it shows as "Input/0/WUP-028", which is the model number of the adapter. After I load the driver from the kext file to run the adapter it changes and shows up as "Input/0/Unknown device", and it becomes functional. I don't know if this is a significant factor but I thought it was worth mentioning.
Also when configuring the controller on the GCPad menu in dolphin, it reads that I am always pressing very slightly on L and R according to the small red meters on the button mapping GUI. I think this is a result of the same thing that happens on Enjoyable when it thinks you are always pressing one of the triggers.
I also see this, and I agree that this is what causes the jumping in Enjoyable.
Thanks for taking the time to test the driver - I haven't had the opportunity to do so extensively. Catching the memory leak in particular is good!
Feel free to open error reports for these things on Github, too - maybe someone who finds the repository will submit a pull request fixing these! I will do this unless you beat me to it!
Incidentally, I would be extremely interested in the HID Report Descriptor of the new 4-port Mayflash GC adapter, if anyone is getting one of those. I asked over in the thread for that adapter, and have emailed MayFlash too, but no response on either front so far.
Load the KEXT, and watch the 'Instance allocation' line. When you plug in the controller, it will start to increase without bound. When all your memory has been used up, it will kernel panic. At least, I'm pretty sure this is the case.
Looks like you're right about instance allocation being the problem. I had to do the watch command like this on Mavericks:
Code:
./watch ioalloccount
At first, I get this: Instance allocation = 0x004dc59c = 4977 K. I only did this once so far, but that number grew about 400 K every 2 seconds until it got to around to around 600000 K right before my computer crashed. Is there some way to release that memory easily with a terminal command so I can keep playing, or should I wait until the we can find a fix for the kext file?
My hypothesis about the triggers always being pressed has to do with that the driver is based off the the Xbox One controller. Maybe the unpressed position for the Xbox triggers is "further up" in a sense than the unpressed position for GameCube triggers? That's my theory for now but I don't know how to fix that code-wise.
Thanks for taking the time to test the driver - I haven't had the opportunity to do so extensively. Catching the memory leak in particular is good!
Feel free to open error reports for these things on Github, too - maybe someone who finds the repository will submit a pull request fixing these! I will do this unless you beat me to it!
You're welcome! I'm just so happy that you made the driver so I can play Melee Netplay with my friends with an actual GameCube controller.
As for the github, I'll leave that up to you, I don't have an account on there and I'm not too familiar coding anything, I do have a lot of time to test things and follow instructions/investigate though.
Incidentally, I would be extremely interested in the HID Report Descriptor of the new 4-port Mayflash GC adapter, if anyone is getting one of those. I asked over in the thread for that adapter, and have emailed MayFlash too, but no response on either front so far.
Is there some way to release that memory easily with a terminal command so I can keep playing, or should I wait until the we can find a fix for the kext file?
My hypothesis about the triggers always being pressed has to do with that the driver is based off the the Xbox One controller. Maybe the unpressed position for the Xbox triggers is "further up" in a sense than the unpressed position for GameCube triggers? That's my theory for now but I don't know how to fix that code-wise.
The controllers are simply reporting a nonzero value even when the triggers aren't being pushed - this isn't anything to do with being based on the Xbox controller, as far as I know - those are just the numbers reported by the USB device. Introducing an offset would fix this, but I don't know if that's the proper way.
It won't work, I enabled the dev kext and tried loading it but it said could not find directory, i had downloaded the files though.
Last login: Sun Jan 18 21:23:42 on ttys000 Taegans-MacBook-Pro-2:~ Taegan$ sudo nvram boot-args="-v kext-dev-mode=1" Taegans-MacBook-Pro-2:~ Taegan$ sudo cp -R GC.kext /tmp cp: GC.kext: No such file or directory Taegans-MacBook-Pro-2:~ Taegan$
The controllers are simply reporting a nonzero value even when the triggers aren't being pushed - this isn't anything to do with being based on the Xbox controller, as far as I know - those are just the numbers reported by the USB device. Introducing an offset would fix this, but I don't know if that's the proper way.
L and R have separate reporting bytes for analog and digital data. On original GC controllers, analog range goes from 0 + ~32 to 255 - ~32, so you'll never get a full 0x00 or 0xFF analog value. Digital triggers get activated after full analog button is pressed (it's when you hear a "click" coming out from the button).
It won't work, I enabled the dev kext and tried loading it but it said could not find directory, i had downloaded the files though.
Last login: Sun Jan 18 21:23:42 on ttys000 Taegans-MacBook-Pro-2:~ Taegan$ sudo nvram boot-args="-v kext-dev-mode=1" Taegans-MacBook-Pro-2:~ Taegan$ sudo cp -R GC.kext /tmp cp: GC.kext: No such file or directory Taegans-MacBook-Pro-2:~ Taegan$
I think this is why you're having that issue, when you download the files from Area's github, the driver isn't actually functional right away. For reasons that I don't really know about, no one I've seen really puts up drivers in the form of .kext files on the internet to download. I have one other driver on my Mac for 360 controllers, and that was a .pkg with an installation process. I'm not 100% sure but I'll guess that OS X has some protection measures to prevent people from simply dragging and dropping .kexts from the internet into the kext folder and using them right away. Because of this, we each have to make the .kext on our own machine. To do that, you'll need to have Xcode on your Mac, which you can get for free on the App store if you don't already have it (I had to upgrade my OS from 10.9.3 to 10.9.5 to get it but you should be fine). Once you have that go into the folder you downloaded, and find the file named GC.xcodeproj and open it with Xcode.
Once you're in Xcode the process splits depending on what operating system you have, if you have 10.10 Yosemite, you should be able to continue by hitting the build button in the top left corner of the window, it looks like a play button.
Click here for Mavericks instructions:
If you have 10.9 Mavericks however, the process is slightly different, before you hit build (play) you need to change 3 numbers. From the file list on the left of Xcode, find the folder named Supporting Files, and select Info.plist from inside it. In this file there should be a line that says OSBundleLibraries. It might have a drop down arrow next to it, click that because we need to change things in this part of the file. You need to change the version of 3 files, do this by double clicking on the part of the line you need to change.
Change com.apple.kpi.iokit from version 14.0 to 13.4
Change com.apple.kpi.libkern from version 14.0 to 13.4
Change com.apple.kpi.mach from version 14.0 to 13.4
If you have a different OS like Lion, Mountain Lion, or my personal favorite Snow Leopard go into Terminal and type this command: kextlibs /tmp/GC.kext
That will give you the version numbers you need to use on your system.
Once Xcode tells you that the build was successful (it might say it had 1 issue like mine did, but I didn't worry about that) you need to find the file it made which is called GC.kext. On Xcode in the file view it might appear in a folder on the left from the file view in a folder called products. If its there, right click on GC.kext and do Show in Finder. If its not there on the left of Xcode, go to Xcode, and then preferences from your menubar. Go to the tab that says locations and under Derived Data there should be a tiny arrow that will take you to where Xcode puts products. From there it puts it in a silly directory /Users/~/Library/Developer/Xcode/DerivedData/GC-djnwkcdxnakiuldgpiycalqiiluq/Build/Products/Debug
In the debug folder there should be a file called GC.kext, you're most likely going to wanna move that to an easier to access place like your Downloads folder or your Desktop.
Once you've done all that and gotten GC.kext to a manageable location now its time to go back to Terminal. Change your directory to where you put the GC.kext file, you can do this easily by typing cd, hitting space, and then dragging GC.kext onto the Terminal window. Now you will be able to do the -cp command without Terminal telling you that it can't find what what you're looking for.
Sorry if this is too long or confusing, I can maybe write a better guide, if you're still having problems just post again and I will try to help .
L and R have separate reporting bytes for analog and digital data. On original GC controllers, analog range goes from 0 + ~32 to 255 - ~32, so you'll never get a full 0x00 or 0xFF analog value. Digital triggers get activated after full analog button is pressed (it's when you hear a "click" coming out from the button).
Weird that they don't have the full range. Do games expect to receive this nonzero analog value for an unpushed trigger? Left unchecked, it seems like this would prevent the controller working in anything other than Gamecube games.
The memory leak is fixed in my repository now (this was true a couple of days ago, but didn't want to double-post in the thread).
Thanks for writing that up, Mike4Real! It all look right from my perspective. I would make it clear that to run kextlibs, you have to have built the kext, even though it won't load.
Forgive me if this has already been asked but i couldn't be bothered reading 4 pages of writing. By any chance has a way been found to make the official GameCube adapter compatible for Wiiflow on the vWii for Wii games that were compatible with the GC controller?
Forgive me if this has already been asked but i couldn't be bothered reading 4 pages of writing. By any chance has a way been found to make the official GameCube adapter compatible for Wiiflow on the vWii for Wii games that were compatible with the GC controller?
Using stuff like DIOS MIOS or whatever? Not as far as I know. It works with vWii just as much as Wii, it's just a matter of patching the software to work with it correctly.
Using stuff like DIOS MIOS or whatever? Not as far as I know. It works with vWii just as much as Wii, it's just a matter of patching the software to work with it correctly.
A patch for each individual game or for WiiFlow and the like? If the former, yikes, we'll be lucky if we get Brawl support for the adapter, much less any other game. *Hopes for the latter*
Using stuff like DIOS MIOS or whatever? Not as far as I know. It works with vWii just as much as Wii, it's just a matter of patching the software to work with it correctly.
So I splashed out all of 80p for 'Joystick Show', which is only used for testing joysticks, and doesn't suffer the jumping around issues that Enjoyable does, as it's just displaying buttons and gauges. With my driver, it sees a single joystick with 24 axes and 48 buttons. All four ports are correctly identified separately (so 'A' on one controller means button 0, but on another controller means button 3). I am therefore wondering whether the problem actually lies in Dolphin not respecting the Report IDs.
A user at the Dolphin forums has one of the new Mayflash adapters, and sees exactly the same behaviour with the Mayflash adapter in PC mode as I do with the official adapter and my driver (i.e. it doesn't work properly). The HID report from the Mayflash adapter was a little different compared to mine, but was broadly speaking the same, lending credence to a theory that my HID report and driver are both correct, and the problem here actually lies in Dolphin.
I will continue to investigate as I have time!
EDIT: OpenEMU correctly sees four separate controllers... I'm inclined to think that, at this point, the issue is that various different programs are not respecting the HID standard correctly, which wouldn't be the first time I've seen people play fast and loose with standards.
I wanted to post your driver on reddit (after asking you), but I also wanted to wait until the installation got to a point where it was more user friendly before we did that. Thought I'd inform you anyway though
I wanted to post your driver on reddit (after asking you), but I also wanted to wait until the installation got to a point where it was more user friendly before we did that. Thought I'd inform you anyway though
Cool, I'll check this out when I get home. Skimming the source, it looks like the way he's getting around the problems I encountered is by setting each port up as its own HID controller, which makes sense. If his version works for all ports though, I may well just stop developing mine. I think you should be able to install mine permanently following the same instructions as his (i.e. the sudo chown commands).
The one possible advantage to mine is that my driver may have less lag than his, as he is sleeping for 5ms between polls (which will randomly introduce one frame of lag sometimes), whereas my driver updates whenever the data from the controller updates. I don't have a setup to confirm that, however, and the understanding I have of the code I've adapted isn't solid enough to whole-heartedly believe it either. I assume this other developer actually knows what they're doing!
After a couple days of Nintendo releasing their 18.0.0 firmware update, @SciresM releases a brand new update to his Atmosphere NX custom firmware for the Nintendo...
Today, April 8th, 2024, at 4PM PT, marks the day in which Nintendo permanently ends support for both the 3DS and the Wii U online services, which include co-op play...
Hello, GBAtemp members! After a prolonged absence, I am delighted to announce my return and upgraded form to you today...
Introducing tempBOT AI 🤖
As the embodiment...
With Apple having recently updated their guidelines for the App Store, iOS users have been left to speculate on specific wording and whether retro emulators as we...
The time has finally come, and after many, many years (if not decades) of Apple users having to side load emulator apps into their iOS devices through unofficial...
The highly popular and accurate FPGA hardware, MisterFGPA, has received today a brand new update with a long-awaited feature, or rather, a new core for hardcore...
A new Nintendo Switch firmware update is here. System software version 18.0.1 has been released. This update offers the typical stability features as all other...
The romhacking community is always a source for new ways to play retro games, from completely new levels or stages, characters, quality of life improvements, to flat...
Quite a bit of news have unfolded in the past couple of days in regards to the Sonic franchise, for both its small and big screens outings.
To start off, the...
This Thursday, Microsoft will be fulfilling one of its key promises from when it acquired Activision-Blizzard by bringing Diablo IV to Game Pass. It looks like it'll...
Today, April 8th, 2024, at 4PM PT, marks the day in which Nintendo permanently ends support for both the 3DS and the Wii U online services, which include co-op play...
Hello, GBAtemp members! After a prolonged absence, I am delighted to announce my return and upgraded form to you today...
Introducing tempBOT AI 🤖
As the embodiment...
Nintendo might just as well be a law firm more than a videogame company at this point in time, since they have yet again issued their now almost trademarked usual...
After a couple days of Nintendo releasing their 18.0.0 firmware update, @SciresM releases a brand new update to his Atmosphere NX custom firmware for the Nintendo...
With Apple having recently updated their guidelines for the App Store, iOS users have been left to speculate on specific wording and whether retro emulators as we...
The time has finally come, and after many, many years (if not decades) of Apple users having to side load emulator apps into their iOS devices through unofficial...
A new Nintendo Switch firmware update is here. System software version 18.0.1 has been released. This update offers the typical stability features as all other...
Two classic titles join the Nintendo Switch Online Expansion Pack game lineup. Available starting April 24th will be the motorcycle racing game Extreme G and another...
The highly popular and accurate FPGA hardware, MisterFGPA, has received today a brand new update with a long-awaited feature, or rather, a new core for hardcore...
Nintendo has recently announced through their social media accounts that a new Indie World stream will be airing tomorrow, scheduled for April 17th, 2024 at 7 a.m. PT...