[Vm-dev] Android VM threaded

Michael Rueger lists at andience.co.nz
Tue Jul 4 03:21:11 UTC 2017


Hi all,

so continuing on with the below mentioned hack I got a version running that correctly displays colors (although not the 
image desktop image) and accepts mouse/touch input.

If you hit the back button the next touch will be interpreted as right button click.

There is still something wrong with the display endianess, have to swap the bytes for display.

Display updates are done directly from the VM async via SurfaceView, avoids some of the bit copying.

Events are also directly sent from Android and added to the queue, but still polled from the queue within the VM.

Not handling rotation or backgrounding yet, needs a bit more work.

Please feel free to take a look at the code in https://github.com/mrueger42/st-android (development branch), project 
CogDroid.

Cheers

Michael


On 26/06/17 7:51 PM, Michael Rueger wrote:
> 
> 
> after a bit more digging it seems that the getRedzoneSize (sqUnixMain.c) magic doesn't work as expected in Android if it 
> is called on a non-UI thread.
> The behavior isn't consistent, it simply crashes or gives back impossibly large (negative) numbers.
> 
> Just for proof of concept I hard coded a value that I got from executing getRedzoneSize on the main thread and the VM 
> now runs (I see regular calls to invalidate display in the log).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: device-2017-07-04-151540.png
Type: image/png
Size: 106643 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20170704/239a983f/attachment-0001.png>


More information about the Vm-dev mailing list