Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category User Interface → Simulator
  • Assigned To No-one
  • Operating System Another
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Rafaël Carré - 2008-11-01
Last edited by Rafaël Carré - 2008-12-04

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

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.

Closed by  Rafaël Carré
2008-12-04 23:25
Reason for closing:  Accepted
Additional comments about closing:  

r19347

Rafaël Carré commented on 2008-11-26 13:58

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 :)

Rafaël Carré commented on 2008-11-26 15:27

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)

Rafaël Carré commented on 2008-11-28 00:49

Increase the gui surface’s height if not running with –background

Rafaël Carré commented on 2008-11-28 12:35

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.

Marianne Arnold commented on 2008-12-01 21:42

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.

Rafaël Carré commented on 2008-12-04 23:25

I fixed the problem, thanks for reporting ;)

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing