Staacks / gbinterceptor

Capture or stream Game Boy gameplay footage via USB without modifying the Game Boy.
478 stars 24 forks source link

Corrupted image on MacOS on Apple CPUs #1

Closed Staacks closed 1 year ago

Staacks commented 1 year ago

While the system and software recognizes the GB Interceptor, no image is received.

On first tests, the following could be found:

Staacks commented 1 year ago

Update:

The next release will work on MacOS to some extend. I got it to work on an Intel MacBook, but not on an M2 and I highly suspect that there is a bug in the driver for Apple silicon. The fix to at least get it to work on the Intel MacBook is in TinyUSB where I will set up a Pull Request next, so there is no commit here to reference at the moment.

Also, there is still some flickering going in case of the MacBook that works, but I have an idea what might be the cause and might be able to fix this when implementing selectable framerates...

For those Apple devices on which it will not work, we will have to wait for a fix from Apple or for a solution through a Python script without the USB video class.

Staacks commented 1 year ago

Just some data that seems to confirm my suspicion that it is an M1/M2 thing (although a few more Intel data points would be nice) collected from the community on Mastodon and Twitter:

Working correctly on: MacBook Pro with Intel CPU that I tried MacBook Pro (A1990) with Intel from #5 One or two more Intel devices (details follow in https://github.com/Staacks/gbinterceptor/issues/8#issuecomment-1381021160)

Green distorted image on: MacBook Air (2022) with M2 that I tried MacBook Air M1 from @martino_ MacBook Air M2 from @dead_smed 2020 16GB M1 Mac Mini from @juri 2020 8GB M1 MacBook Air also from @juri

I am not entirely convinced that it is NV12 triggering the bug as my research at least found some reports of different NV12 devices that work on Apple silicon. But since it works on Intel-based Macs as well as Windows and Linux I still think it is either a Bug at Apple's end or at least a detail that the M1/M2 version is extremely picky about. If only I knew what triggers the issue.

LordRembo commented 1 year ago

I tried on 2 Macbook Pro, with release 1.04:

It didn't work on Mojave (macos v10.14) -> just green image But it started working when I upgraded the OS. I'm currently on Monterey on the oldest (v12) and Ventura on the other (v13) and the image is fine.

Staacks commented 1 year ago

Interesting detail about Mojave. I had only tried newer versions where Intel works but M1/M2 does not. Not sure if that is related, though.

Staacks commented 1 year ago

I just managed to get a MJPEG version of the Interceptor up and running (see #17) and it worked perfectly on an M2 MacBook Air (https://mastodon.social/@DiConX/110561770831634636).

So, I am very optimistic, that the next update will finally have full Mac compatibility.

Staacks commented 1 year ago

Here is the first test release with MJPEG output which should fix Apple compatibility: https://github.com/Staacks/gbinterceptor/releases/tag/v1.2.0-beta1 Please test and report back.

Staacks commented 1 year ago

Just released version v1.2.0 which contains the fix.