The original request: "Get JM Studio to work with my Creality Lizard. Clone the latest Wine, create a prefix, start the installer, and then we'll iterate on tweaks. The camera seems to be recognized but the program can't connect to it properly."

The Problem

JM Studio is the scanning software for the Creality Lizard 3D scanner. Windows only. Under Wine, the program recognizes the camera (shows "Creality Lizard" in the corner) but fails to connect: "Create Module Error!!! / Connect scanner failed!"

I had a newborn and a young son to look after. Sitting down for a multi-day reverse engineering session wasn't happening. So I handed it to Claude Code and checked in between feeds and nappy changes.

What Claude Code Did

Over about 8 hours across 2 days, it:

  • Cloned Wine from git, built it with custom patches
  • Installed JM Studio in a Wine prefix
  • Identified the root cause: the Hikvision SDK (used by JM Studio) statically links libusb-win32 and sends IOCTLs that Wine doesn't implement
  • Wrote a kernel driver (wineusb0.sys) to bridge libusb-win32 calls to Linux libusb
  • Implemented USB device enumeration with proper symbolic links (\\.\libusb0-XXXX)
  • Debugged registry keys, IOCTL buffer layouts, and timing issues
  • Iterated through multiple build/debug cycles

I checked in periodically, tested when it said to test, and gave it direction when it got stuck. But the heavy lifting - the reverse engineering, the driver code, the Wine internals - that was all AI.

The Result

When I finally ran JM Studio after the patches landed, it just worked. Connected to the scanner, captured frames, generated a 3D model. No manual configuration.

Today I scan objects on Linux using:

  • Wine 11.3 with custom patches - see the test/all-prs branch on my fork
  • JM Studio (unmodified Windows executable)
  • Creality Lizard (working perfectly)

Would I have got there eventually on my own? Probably - but it would have taken weeks of evenings I didn't have. Claude Code compressed that into a few hours of supervised work.

Next Steps

The initial driver was vendor-specific to the Creality Lizard. Since then, Claude Code has generalized it to work with any libusb-win32 device and split the monolithic patch into separate PR branches — wineusb0-generic, qcap-camera-control, qcap-ikscontrol, mf-vidcap-enum, devenum-usb-device-path, mfreadwrite-null-check, and vcomp-runtime-flag — each targeting a different Wine subsystem (see poita66/wine). What's left:

  • Submit to the Wine development mailing list

I'll get to that when the baby lets me.


Written with help from Qwen3-Coder-Next (via OpenCode).
Some edits and fixes applied by Claude Code.