[uae] weird behaviour of capslib

  • From: Christian Authmann <spam@xxxxxxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Mon, 25 Dec 2006 23:48:56 +0100

Hi everyone,

I've noticed that e-uae compiles fine on amd64 (the gentoo ebuilds do this nicely), but there's no 64-bit binary of capslib.

What I've tried to do is create a wrapper-library with a capslib compatible API that'll spawn a 32 bit process, communicating with it via two pipes to relay the calls and all data. It worked fine, but I've encountered some changes between 0.8.28 and 0.8.29 that'll break my wrapper.

For some reason, CAPSLockTrack isn't called by e-uae with a CapsTrackInfo structure any more (as documented), but with a CapsTrackInfoT1 structure, which is completely undocumented.

The library still decided to fill in data that'll only fit a CapsTrackInfo, but e-uae expects the values of a CapsTrackInfoT1. Segmentation fault, horray.


Can anyone please enlighten me about those undocumented changes in capslib and capslib usage, and how I can make the library behave in an e-uae-0.8.29-friendly way? I'd like to contribute the wrapper back to the project to enable a 64-bit e-uae with capslib for everyone, but right now it'll only work on 0.8.28.


During the holidays I'm stuck on a 32-bit notebook, so I can't promise it'll work on 64 bit yet, but I'll get around to it. The relaying will also defeat capslib's caching of subsequent reads, I'll have to think of some counter-measure without creating memory leaks.


greetings,
Christian

Other related posts: