dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Cyborg Systems Enhanced UI (was: DevKit v3.10 released)

Cyborg Systems Enhanced UI (was: DevKit v3.10 released)

From: BlueChip <>
Date: Wed, 09 Mar 2005 16:51:21 +0000

>Could you explain what the Enhanced UI Simulator Patch [v1.0] and when
>we would want to use it?

It basically adds a whole host of new features to the GUI
I have attached (well, embedded) a copy of the readme below.
The exercise was done was three primary reasons:

1. Have a play with windows programming
2. Remove the pretty picture of the jukebox which stole valuable
    screenspace from me during plugin development.
3. Add a fully featured screen-shot system to make it easier to
    build my web-page.

...from there I just got carried away adding _loads_ of cute features,
such as the fact that the screen will ONLY display in resolutions which
do not corrupt the image (Rockbox allows resolutions which cause missing
pixels etc.)
Also, proper aspect ratio is available (rather than just square pixels)
to help in desigining graphics/sprites
etc. etc. etc. I say, I just got carried away and added every cool
feature I could think up.

The patch is now old - and I really don't know how well it will fare with
the many changes which have happened since. Still, all the code is there,
so it would be easy to reimplement your favourite features.
AFAIK, the only feature which made it's way into Rockbox was my timer patch.

The rest of this email is just a copy of the readme from the patch file.



          [F1] [F2] [F3]

        [LEFT] [PLAY] [RIGHT]

If yu use the numeric keypad, then it pretty much as it looks except the
ON/OFF buttons are on the right.

           [/] [*] [-]

           [4] [5] [6]

The alternate keys are:

Cursors for Up/Down/Left/Right
Space for Play
Return for OFF
F1 for F1
F2 for F2
F3 for F3
Numpad+ for ON



Touch top corner(s) of window with mouse for .8 aspect ratio large
Touch bottom corner(s) of window with mouse for .8 aspect ratio small

Drag right or bottom with mouse for square pixel zoom
Drag left or top with mouse for uneven pixel zoom

Double Click the main window to Toggle between "Always-on-top"
                                        and "Task Button" modes

Click anywhere and Drag to move the window.

ESC         Exit simulator ('cos Alt-F4 is awkward)
PgUp        Square pixel, zoom larger
PgDn        Square pixel, zoom smaller
Home        .8 aspect ratio large
End         .8 aspect ratio small
B,    F4    Set Screen Colour, Backlight ON
D, Sh+F4    Set Screen Colour, Backlight OFF
F12, U      Simulate USB Insertion/Removal
#           Display Checkerboard Test Pattern (press & hold)
F5, 5, P    Print Screen, size = as displayed **
F6, 6       Print Screen, size = zoom:100%
F7, 7       Print Screen, size = .8 aspect small
F8          Toggle between "Always-on-top" and "Task Button" modes
** 'uneven zoom' levels will show at the next 'sqaure zoom' down.
All the GUI options such as zoom factor, window position, screen colours,
custom palette, window type, etc. are all saved one exit to uisw32.cfg :)
When you start the new simulator, the default mode it "Always-on-top" ...which
means the (now smaller & scaleable) simulator window is always visible.
You may optionally choose to have a more classic "start bar icon" instead, this
window is NOT locked to the top of the descktop, but is always available from
the start bar.
Double Click anywhere in the window or "F8" will toggle between the two modes.
There is now a Full Window drag feature.
This means that you can drag the window from any point,
very useful if the title bar is not visible.
Clock tick now works ...So timers now time the right period :)
Please note though, that although the timer updates at the right speed
it does not tick at the right period (windows limitation)
This limitation can be over-come by creating a real-time thread,
but it seemed harsh to cripple windows just to get the right period
in the Rockbox UI sim.
All features are fully supported in any screen dumps that are created.
Backlight   Colours for light on/off are set by F4 (ON) and Shift-F4 (OFF)
             And also the keys [B]right and [D]im
Contrast    As LCD will always blacken the screen the contrast calculations
             are all automatic, based on the screen colour
Invert      Supported
Flip        Supported
There are two screen colours.  "Backlight On" and "BackLight Off"
To change the ON colour, press "F4" or "B" (for "B"right) and select from the
colour palette shown.
To change the OFF colour, press "Shift+F4" or "D" (for "D"im) and select from
the colour palette shown.
There are a selection of pre-programmed colours; and you may add any custom
colours you desire.
DO NOT use the right-most column for custom colours, as these two entries
ALWAYS reflect the current active colours (for reference).
The first column of custom colours is unused (for you :))
The second column are the official Rockbox Screenshot colours.
The rest are the bored creations of me and diddystar.
The top row are suggested ON colours, the bottom row are suggest OFF colours.
I have disabled the "Numpad-0" key for printing as I personally found it
really annoying, but the line is in the code if you want it back ...Just
edit   uisimulator/win32/uisw32.c  and uncomment the line with  "VK_NUMPAD0"
on it :)
"P", "5" and "F5" will all print the current screen as visible
"6" and "F6" will print the current screen at "zoom factor 100%, Square Pixels"
"7" and "F7" will print the current screen at ".8 aspect ratio, small"
The output file is an uncompressed BMP with a palette of between 2 and 255
colours depending on whether the image is grey-scale** or mono.
** grey-scale not supported  -> YET <-
Press "F12" or "U" to simulate the Insertion/Removal of the USB cable.
Not sure how much use this is, but I needed it for the rewrite, and I just
left it in simply shows a checkerboard pattern on the LCD so you can see
easily if the screen is properly square.
The update includes the following ten files:
  2. DEVKIT\lib\w32api\libcomdlg32.a
  3. DEVKIT\home\guest\rockbox-devel\apps\screens.c
  4. DEVKIT\home\guest\rockbox-devel\uisimulator\common\stubs.c
  5. DEVKIT\home\guest\rockbox-devel\uisimulator\win32\Makefile
  6. DEVKIT\home\guest\rockbox-devel\uisimulator\win32\button.c
  7. DEVKIT\home\guest\rockbox-devel\uisimulator\win32\uisw32.h
  8. DEVKIT\home\guest\rockbox-devel\uisimulator\win32\uisw32.c
  9. DEVKIT\home\guest\rockbox-devel\uisimulator\win32\lcd-win32.h
10. DEVKIT\home\guest\rockbox-devel\uisimulator\win32\lcd-win32.c
01: .../CS_UIsim.htm
= This file (which you are currently reading)
02: .../libcomdlg32.a
= The Cygwin Windows-Common-Dialogue API, required for colour selection.
o Coders with Full Cygwin installs will already have this file.
o Rockbox Coders using the Cyborg Systems DevKit prior to version 3.03
   will need to add this file to their installation.
03: .../screens.c
= Includes the update to the USB screen display routine, such that it will
   work in the new GUI
o The only modified procedure is:  usb_screen()
04: .../stubs.c
= Adds support for the LCD Flip and Contrast features.
o Because this file is shared by the Win32 & X11 simulators,
   coders wishing to add all these features to the X11 simulator would be
   wise to take a look at this change.
o Two procedures had to be modified:  button_set_flip()  &  lcd_set_contrast()
o These modifications are wrapped up in a "#ifdef WIN_32" so the changes will
   allow the X11 to continue compiling without these features.
05: .../Makefile
= Updated to link in the Cygwin Windows-Common-Dialogue API
o This trivial edit adds "-lcomdlg32" to the "LDFLAGS"  [line 61]
06: .../button.c
= Adds code to invert the keypad when the LCD screen is Flipped.
o I have also removed the print-screen function, as this is now
   superceeded by the advanced printing routines in the new UI Simulator Code.
07: .../uisw32.h
08: .../uisw32.c
= The Windows(tm) portion of the new UI code.
o These files are a virtual complete rewrite
o You will find the config _default values_ such as Zoom and Screen Colour
   in  uisw32.h  in the section labelled "THIS IS THE STUFF YOU CAN PLAY WITH"
o Defaults such as Contrast and Flip are controlled by Rockbox.
09: .../lcd-win32.h
10: .../lcd-win32.c
= The Rockbox LCD portion of the new UI code.
o These files are a virtual complete rewrite
o Aside of many things, the new Print-Screen code lives in here.
   It already has the basis for Grey-Scale support.
   You should not need to edit anything else
Received on 2005-03-09

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy