Friday, May 13, 2011

VNCx3

So it turns out there are at least three framebuffer vnc clients out there that might be useful in the IZ2S userland on the zipit.   There's the old ipaq/zaurus fbvnc that looks like a good fit for the tiny zipit screen.


There's a nice simple fbvnc here along with some other minimal fb programs.


And finally there is directvnc which runs on top of DirectFB instead of directly on /dev/fb0.

Naturally none of them really fit my needs.  The ipaq/zaurus fbvnc looks the most promising because it's got scaling, panning, and rotating already built in for use with small screens.  But the code is old and needs updating to make the keyboard and mouse work.  Also the nifty screen rotation goes the wrong way, so I can have the screen sideways, or upside down relative to the keyboard.  I borrowed the mouse code from the litcave fbvnc so at least that works now.  Panning also works.  I hooked in the battery monitoring code from rockbox, connected the backlight dimmer to some of the many variations of kbd led controls in IZ2S, and attempted to hook the volume control to alsamixer.  So if you don't mind working sideways with an onscreen keyboard instead of the real one, then you might be ok with this fbvnc as is. 


I suspect the keyboard will only take a small fix like the mouse, but the rotation is gonna be a challenge.  The rotation code is a bit of a mess with multiple unnecessary conversions back and forth between the local and remote coordinate systems, and massive hand unrolled loops to optimize the code at the point where it actually needs to draw the pixels.

The litcave fbvnc is no frills, and either uclibc doesn't like some socket call it makes, or else it's lack of password support is blocking me.  Either way, it's probably only useful to me as a source for the simpler mouse/keyboard code.

Directvnc connects and puts up a screen, rotated correctly by leveraging my previous work with DirectFB and SDL, but the mouse fails to move.  And the only keys I've verified are the Ctrl-Q key combo to quit.  I can probably borrow some working mouse code but once again the lack of panning or scaling makes this fairly useless on the zipit.

What I really need is the keyboard/mouse code from the litcave fbnc, the correctly rotated DirectFB screen from directvnc, and the rest of the goodies from the ipaq/zaurus fbvnc.  I may just end up with that eventually.

2 comments:

  1. Did you need to patch DirectFB for rotation, or it supported it out of the box?
    (as strange as it is to ask this in 2019 :) )

    ReplyDelete
  2. Wow, this is really old stuff. DirectFB has(had?) a command line rotation option out of the box. But I ended up using SDL instead of DirectFB. For example, https://macrofig.blogspot.com/2017/06/sdlvnc-redux.html

    ReplyDelete