iphone2g&3gfan
macrumors regular
Randomly came across this when googling for Leopard multitouch trackpad support, since I'm testing my VoodooInput backend for the "Wellspring" internal USB trackpad whose support allegedly goes down all the way to Leopard. I came from the other thread: https://forums.macrumors.com/threads/magic-trackpad-plus-10-5-leopard-ppc.2380484/
You guys are plumbing upwards the 0x28 packet format into AppleUSBMultitouchDriver::handleReport by first manually starting the real driver, overriding that method, translating to compactv4, then calling the original handleReport with the translation, whereas I replace AppleUSBMultitouch entirely at the class level. What I do is
Then I do
I don't subclass IOHIDDevice directly because it didn't work. I dissassembled MultitouchSupport.framework and it actually checks that the IOService it finds is actually the real thing:
And I'm not going to make my class name literally the same as Apple's, so I subclass "AppleUSBMultitouchDriver" and basically use it as a shim to make that above check return true. Then I manually reimplement the real driver which was somewhat painstaking but seemed to be a soemwhat cleaner result than trying to use offsets to hack vtables and stuff
I had documented a decent amount of the architecture and it lines up with what you guys found, too
Anyways--really cool work; since you are using AppleUSBMultitouchDriver, in theory you're not that far from going lower than Mavericks. AppleUSBMultitouch.kext exists as far back as Leopard (i checked a 10.5.8 rootfs dmg I had lying around from an AppleTV1 project), but i'm not sure if the compactv4 format does since the Magic Trackpad 1 was released in the snow leopard era, so if that packet format is new for it, then this driver will only go as far back as 10.6.4 (https://support.apple.com/en-us/106655)
I use the 0x74 packet format whcih is the Wellspring internal USB trackpad format so that should actually go back to Leopard at least. But I alrady had a Snow Leopard USB laying around, so I'm going to test on that first.
In any case, mine receives data from VoodooInput client drivers, so it doesn't directly work with the real apple MT2. A low level bus driver would have to be made that feeds into VoodooInput to use my shim instead as-is. I presume that starting the real AppleUSBMultitouchDriver takes care of a lot of logic and initialization like sending the packet to switch from basic HID to multitouch? In any case, once I clean up my code, I'll post it on github. The logic that plumbs wellspring frames upwards should be reusable and could be used to get MT2 even lower than mavericks or Snow leopard 10.6.4. But it depends on whether the real driver you initialize does a lot of initialization black box stuff
You guys are plumbing upwards the 0x28 packet format into AppleUSBMultitouchDriver::handleReport by first manually starting the real driver, overriding that method, translating to compactv4, then calling the original handleReport with the translation, whereas I replace AppleUSBMultitouch entirely at the class level. What I do is
OSDefineMetaClassAndStructors(AppleUSBMultitouchDriver, IOHIDDevice);Then I do
OSDefineMetaClassAndStructors(VoodooInputWellspringSimulator, AppleUSBMultitouchDriver);I don't subclass IOHIDDevice directly because it didn't work. I dissassembled MultitouchSupport.framework and it actually checks that the IOService it finds is actually the real thing:
IOObjectConformsTo(service, "AppleUSBMultitouchDriver")And I'm not going to make my class name literally the same as Apple's, so I subclass "AppleUSBMultitouchDriver" and basically use it as a shim to make that above check return true. Then I manually reimplement the real driver which was somewhat painstaking but seemed to be a soemwhat cleaner result than trying to use offsets to hack vtables and stuff
I had documented a decent amount of the architecture and it lines up with what you guys found, too
Anyways--really cool work; since you are using AppleUSBMultitouchDriver, in theory you're not that far from going lower than Mavericks. AppleUSBMultitouch.kext exists as far back as Leopard (i checked a 10.5.8 rootfs dmg I had lying around from an AppleTV1 project), but i'm not sure if the compactv4 format does since the Magic Trackpad 1 was released in the snow leopard era, so if that packet format is new for it, then this driver will only go as far back as 10.6.4 (https://support.apple.com/en-us/106655)
I use the 0x74 packet format whcih is the Wellspring internal USB trackpad format so that should actually go back to Leopard at least. But I alrady had a Snow Leopard USB laying around, so I'm going to test on that first.
In any case, mine receives data from VoodooInput client drivers, so it doesn't directly work with the real apple MT2. A low level bus driver would have to be made that feeds into VoodooInput to use my shim instead as-is. I presume that starting the real AppleUSBMultitouchDriver takes care of a lot of logic and initialization like sending the packet to switch from basic HID to multitouch? In any case, once I clean up my code, I'll post it on github. The logic that plumbs wellspring frames upwards should be reusable and could be used to get MT2 even lower than mavericks or Snow leopard 10.6.4. But it depends on whether the real driver you initialize does a lot of initialization black box stuff