Rockbox

Tasklist

FS#9521 - Simulator: 2 colors LCD screen for the Clip target (with a monochrome controller)

Attached to Project: Rockbox
Opened by Rafaël Carré (funman) - Saturday, 01 November 2008, 01:00 GMT
Last edited by Rafaël Carré (funman) - Thursday, 04 December 2008, 23:25 GMT
Task Type Patches
Category Simulator
Status Closed
Assigned To No-one
Operating System Another
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch adds the ability for the simulator to draw the top X (configurable) lines in a different color.

I add an extra argument to sdl_set_gradient() which is the extra color, which will get added to the end of the palette.

sdl_gui_update() then checks each pixel of the specified zone, and sets them to the extra color if they are set.

This approach only works for monochrome, since there is no obvious reason to have a screen with different color zones on a colored display.

Please comment if you think this is not the right approach.
This task depends upon

Closed by  Rafaël Carré (funman)
Thursday, 04 December 2008, 23:25 GMT
Reason for closing:  Accepted
Additional comments about closing:  r19347
Comment by Rafaël Carré (funman) - Wednesday, 26 November 2008, 13:58 GMT
Add the 2 lines separation between the yellow and blue area by using a 2nd surface.

sdl_gui_update() will copy the full screen content at each call.
Some performance enhancements could be made if required,
The load is ~7% in demistify plugin on a 1.7GHz CPU.

TODO: greylib simulation since it doesn't seem to use sdl_gui_update() ; could be skipped since greylib is not proved to function on this screen.

Comments (bad and good) welcome :)
Comment by Rafaël Carré (funman) - Wednesday, 26 November 2008, 15:27 GMT
Fix building of other simulators.
Only call lcd_set_gradient() on the real_surface (the other one won't be displayed and serves only as a framebuffer)
Comment by Rafaël Carré (funman) - Friday, 28 November 2008, 00:49 GMT
Increase the gui surface's height if not running with --background
Comment by Rafaël Carré (funman) - Friday, 28 November 2008, 12:35 GMT
Now supports greylib, adding an argument to lcd_set_gradient(): starting & maximum color for top area of the screen.

IMO it's ok to commit, but I'd like comments.
Comment by Marianne Arnold (pixelma) - Monday, 01 December 2008, 21:42 GMT
I tried a sim with clip-yellow5.diff patched and noticed that there is a problem when something has to scroll in the lower (blue) part. During the scroll the offset of two pixels is not appended in the line(s) that scroll and so it looks "jumpy". Could have added a screenshot but think it's easily reproducible, if you still think it's usefull, just tell me.
Comment by Rafaël Carré (funman) - Thursday, 04 December 2008, 23:25 GMT
I fixed the problem, thanks for reporting ;)

Loading...