Not much to report over the last few days, but I have been hard at work.
sdl.hidd is functionally complete, the code just needs a little cleaning and commenting before I’m ready to release it. What I have been working on since Friday is to get the existing source tree ready to accept it. The major piece of that has been to convert
x11gfx.hidd to run off the back of
This turned out to be far more difficult than I had thought it would be.
x11gfx.hidd requires four libraries:
libX11 for core functions,
libc for shared memory extensions (optional), and
libXxf86vidmode for fullscreen support (again, optional). So
hostlib.resource gets quite a workout.
The real difficulty has come from bring X11 headers into the same files as AROS headers. For example,
BYTE, which are also defined by AROS’
exec/types.h, though incompatibly. It has been quite an effort to get all the pieces working together happily, but I seem to have got there.
The next thing to update was way the driver was built. Previously it existed in the hosted “ROM”, whereas now it must be compiled standalone. Because of the use of
hostlib, there’s now no need to link against X libs, and in fact they’re not even required, so
configure need some serious work to make this happen. That file was quite poorly structured, but I’ve at least cleaned up part of. There’s lots left that can be done to make it good.
Once all this was done I had to test to make sure that in changing the build setup I hadn’t broken the other architectures. I did a successful
pc-i386 build with the updates in place, then installed FreeBSD into a virtual machine to test its port. It didn’t build past MetaMake, so I tried pristine sources and found the same thing. It seems the FreeBSD port is broken independently of my changes. I’ve done my best to make sure that my changes at least won’t contribute to the breakage if anyone ever tries to bring it up to scratch.
Here’s the diff according to Git. There’s been a couple of small tweaks since I dropped the code but nothing significant. If you are able to build hosted, please give it a try and let me know how you get on. These changes are complicated and although they work well here its likely that I’ve screwed something up.
I do find it amusing that in order to commit
sdl.hidd - that I hope will one day soon obsolete
x11gfx.hidd - I’ve had to learn the X11 stuff inside and out to make it possible for it to work together with SDL. And for even more irony, remember how my original motiviation for this was to get a “real” mouse cursor for FFE, but I couldn’t figure out how to make it work in
x11gfx.hidd. Well I now understand the X11 stuff well enough that I could implement it if I wanted to. Figures.
Next up is the
sdl.hidd commit, which I think will happen on Thursday at my current rate. I’m happy that I’m going to hit my target, which was the end of this week :)