ddvk / remarkable2-framebuffer

remarkable2 framebuffer reversing
MIT License
279 stars 22 forks source link

implement swtfb for rmkit #9

Closed raisjn closed 3 years ago

raisjn commented 3 years ago

This was not too bad with IPC, but there are some problems. When using sendUpdate and sending the rectangle to update over IPC, the screen does not always get updated correctly.

By having a while (true) loop in the server thread that always draws the full screen every 100ms or so, the apps are working (but this is not good at all, since it wastes CPU and is not aware of damaged rects)

https://imgur.com/a/02HJJuI

raisjn commented 3 years ago

ok, the issue was the swtfb_update struct did not correctly have mtype = 1 for sending across sysv message queues. now it's fixed and works correctly.

next up: need to figure out how to batch dirty rectangles on the FB server

raisjn commented 3 years ago

now rectangles are being batched on server (all send update calls received during an update are batched into the next update)

raisjn commented 3 years ago

this issue was good for figuring out the IPC server, but i'll likely remove swtfb support from rmkit and use the shim instead