SILVERSTONE
GD01-MDX / SOUNDGRAPH iMON™ OEM LCD API SPECIFICATION
18
June 2007, updated 1 Sept 2007
I bought the Silverstone
GD01 MXR HTPC case a couple of weeks ago and am very happy with the case.
Unfortunately, Soundgraph, the
manufacturer of the OEM
LCD display have yet to release an API to control the display. Odd, since
they did so for their earlier VFD displays, and you would have thought that
releasing the API would encourage developers to interface their media software
directly to the display. Soundgraph’s
latest official word is they’re thinking about
it.
So I decided to see how the SG_VFD.dll works, to determine the API and
a prototype interface in a hope that others will be able to integrate into
their software (namely LCDSmartie, MediaPortal, and GBPVR).
The iMON™ OEM LCD includes a 16x96 pixel display, with 177 icons.

Because this is a pixel based LCD, it can display virtually any
character or icon in the pixel array. It also means that the older style of
iMONVFD_SetText(string line1, string line2)
will not work. The string must first be converted to a bit map and the
bitmap sent to the display.
For those interested – here are the steps I took to find out how to use
SG_VFD to control the display.
1. disassembled
SG_VFD.dll using PE Explorer.
2. use windbg
to determine what and when, each function in the dll was being called, and with
what parameters.
3. wrote a dummy
SG_VFD.dll in C++ to trap the iMON calls to the real SG_VFD.dll.
4. wrote a interface
in C# to simplify control of the display
The SG_VFD version that came with my case was 5.0.0.714, and this is
what my findings below are based upon.
However, a newer version, 5.1.0.1201, was available from Silverstone,
along with Version 6.01.0202 iMON, and iMedian.
Testing of the software was performed with this newer release.
Table 1 lists the methods available in SG_VFD.dll. Only a few
of these appeared to be used for my LCD, and I have only been able to determine
how to use the first four functions in the table.
Table 1 - API for
SG_VFD.dll
|
bool iMONVFD_Init(Int32 vfdType,int reserved) |
vfdType = 0x16
or 0x18 reserved =
0x00008888 |
Initialises LCD
display. The original
API used a vfdType of 0x04, and reserved =0 |
|
void iMONVFD_Uninit() |
|
|
|
bool iMONVFD_IsInited() |
|
|
|
bool iMONLCD_SendData(Int64* LCD_Data) |
|
|
|
|
|
|
|
LCD3R_SetLCDData |
|
|
LCD3R_SetLCDData2 |
?
load the LCD with the current time?? – called by iMon during startup and
shutdown |
|
LCD3R_SetLCDVIIVSleep |
Not
for display 0x11h or 0x09h |
|
iMONLCD_SetDotEqData |
|
|
iMONLCD_SetDotTextData |
|
|
iMONLCD_SetIconData |
|
|
iMONLCD_ShowWindow |
Nothing – just
returns |
|
iMONVFD_CheckDign |
|
|
iMONVFD_SetAlarmOFF |
|
|
iMONVFD_SetAlarmON |
Not for display type 0x01h, 0x02h, 0x11h,0x09h, 0x13h,0x15h,0x16h |
|
iMONVFD_SetAlarmON_Abs |
|
|
iMONVFD_SetEQ |
|
|
iMONVFD_SetLEDData |
|
|
iMONVFD_SetPowerV |
|
|
iMONVFD_SetText |
Not for display type 0x11h, 0x09h, 0x13h, 0x15h, 0x16h |
|
iMONVFD_SetWakeupData |
|
|
|
|
The following Table 2 shows the format of the data sent to the display by
iMONLCD_SendData. Note that the
0x10-0x12; 0x20-0x3b, and 0x40-0x42, groups need to be sent as a group.
Table 3 shows which bit control each icon in the display.
Table 4 shows which bits turn on which pixels in the 16x96
array
Table 2 - Data Formats for
iMONLCD_SendData
|
MSB |
|
|
|
|
|
|
LSB |
Description |
|
Byte
8 |
Byte
7 |
Byte
6 |
Byte
5 |
Byte
4 |
Byte
3 |
Byte
2 |
Byte
1 |
|
|
Ctrl |
ICONS |
|
||||||
|
0x01 |
Refer to table below |
Set individual
icons |
||||||
|
|
|
|
|
|
|
|
|
|
|
0x03 |
FF |
FF |
FF |
00 |
58 |
0A |
0A |
Set Lowest
contrast |
|
0x03 |
FF |
FF |
FF |
00 |
58 |
0A |
28 |
Set Highest
contrast |
|
|
? |
? |
? |
? |
? |
? |
contrast? |
|
|
Top and Bottom Lines – Progress
Indicator |
||||||||
|
0x10 |
Row2Set 3 |
Row 2 Set 2 |
Row 2 Set 1 |
Row 1 Set 4 |
Row1 Set3 |
Row 1 Set2 |
Row 1 Set1 |
Bit 0 is the
right most pixel. |
|
0x11 |
Row 4 Set 2 |
Row4 Set 1 |
Row 3 Set 4 |
Row 3 Set 3 |
Row 3 Set 2 |
Row 3 Set 1 |
Row 2 Set 4 |
|
|
0x12 |
? |
? |
? |
? |
? |
Row 4 Set 4 |
Row 4 Set 3 |
|
|
96 x 16 Pixel Array |
||||||||
|
0x20 – 0x3b |
|
|
|
|
|
|
|
Set pixels of
16 x 96 display |
|
GRAPHIC
EQUALISER |
||||||||
|
0x40 |
Bar 6 |
Bar5 |
Bar4 |
Bar 3 |
Bar2 |
Bar 1 |
UpDwn |
LSB=0, bar up
from btm LSB=1; bar from
top LSB=2, expand
from middle LSB=7; from top
and bot |
|
0x41 |
Bar13 |
Bar12 |
Bar11 |
Bar10 |
Bar9 |
Bar8 |
Bar7 |
|
|
0x42 |
n/a? |
n/a? |
n/a? |
n/a? |
Bar 16 |
Bar15 |
Bar14 |
Graphic
Equaliser – Set the level
of one of 16 bars |
|
UNKNOWN |
||||||||
|
0x02 |
|
|
|
|
|
|
|
|
|
0x3f |
|
|
|
|
|
|
|
|
|
0x50 |
Sec |
Min |
hrs |
Day |
Month |
Year |
|
Clock/Timer
related? (see Updates below) |
|
0x51 |
|
|
|
|
|
|
|
|
Table 3 - Icon Bits
|
ICONS |
||||||||
|
|
Bit |
|||||||
|
Byte |
128
(bit7) |
64 |
32 |
16 |
8 |
4 |
2 |
1 (bit0) |
|
1 |
MUSIC |
MOVIE |
PHOTO |
CD/DVD |
TV |
WEB |
NEWS |
L |
|
2 |
C |
R |
SL |
LFE |
SR |
RL |
SPDIF |
RR |
|
3 |
SRC |
FIT |
TV |
HDTV |
SCR1 |
SCR2 |
MPG |
DIVX |
|
4 |
XVID |
WMV |
MPG |
AC3 |
DTS |
WMA |
MP3 |
OGG |
|
5 |
WMA |
WAV |
REP |
SFL |
ALARM |
REC |
VOL |
TIME |
|
6 |
Disk Icon Top/Left/Middle/Right (o’clock position) |
|||||||
|
Top disk (12) |
Top Left (11) |
MidLeft (9) |
Bottom Left (7) |
B (6) |
BR(5) |
MR(3) |
TR(1) |
|
|
7 |
Disk Icon bottom circle |
Not used? |
||||||
Table 4 - Pixel Array
|
|
Control Code 0x20 |
0x21 etc |
||||||
|
|
Byte
1 |
Byte
2 |
Byte
3 |
Byte
3 |
Byte
5 |
Byte
6 |
Byte
7 |
Byte1-7 etc |
|
|
|
|
|
|
Col5 |
|
|
|
|
Top Row (1) |
Bit 7 |
|
|
|
|
|
|
|
|
|
Bit 6 |
|
|
|
|
|
|
|
|
|
Bit 5 |
|
|
|
|
|
|
|
|
|
Bit 4 |
|
|
|
|
|
|
|
|
|
Bit 3 |
|
|
|
|
|
|
|
|
|
Bit 2 |
|
|
|
|
|
|
|
|
|
Bit 1 |
|
|
|
|
|
|
|
|
Middle Row (8) |
Bit 0 |
|
|
|
|
|
|
|
If
LSB=0, the other bytes represent the height of the bar from the bottom.
If
LSB=1, the bars go down from the top.
If LSB=2,
the bars go up and down from the middle.
The lower nibble represents the down bar, and the upper nibble is how
far the bars move up.
If
LSB=7, the bars go up and down from the bottom and top respectively.
Other
LSB values have not been tested.
By using the dummy SG_VFD.dll to trap the calls to the real dll, I
determined that during start up, the following functions were called.
LCD3R_SetLCDData2
iMONVFD_Uninit
iMONVFD_Init(0x18, 0x08888)
I
have not been able to determine what LCD3R_SetLCDData2 does, however, I suspect
that it might program the LCD with the current date and/or time. Sometimes, I
was having trouble with the display showing a digital clock, preventing me from
sending new data to display in the 16x96 pixel array.
The
vfdType for the original VFD API provided by Soundgraph was 4. Version 6 iMON uses 0x18, and Version 5 iMON
used x016. I have no idea why. It
doesn’t seem to matter for the sending pixel data to the display.
The
SG_VFD.dll only accepts the following display types:
Version
5.0.0.714: 0x13, 0x15, 0x16
Version
5.1.0.1201: 0x13, 0x18, 0x19, 0x15,
0x16
After
Init is called, iMODLCD_SendData is used to send a series of int64 words that,
presumably, reset/initialize the LCD.
|
50.00.00.00.00.00.00.40. |
Might disable the display of the digital clock |
|
51.00.00.00.00.00.00.00. |
|
|
03.12.B9.C0.00.00.00.19. |
19 is the screen contrast. Not sure what the 12B9C0 represents. This changes, and could be time? |
|
02.00.00.00.00.00.00.00. |
Unknown |
|
01.00.00.00.00.00.00.00. |
Clears the icons |
|
10.FF.FF.FF.00.00.00.00. |
Sets up the top and bottom lines around the pixel
array |
|
11.00.00.FF.FF.FF.FF.FF. |
|
|
12.00.00.00.00.00.00.00. |
|
|
01.00.00.00.00.00.40.01. |
Displays the ‘L’ and ‘R’ icons |
Using
the same C++ dll to trap the SG_VFD.dll calls, the following SG_VFD functions
are called during shutdown of the application
LCD3R_SetLCDData2
iMODLCD_SendData
50.03.1e.09.11.06.07.88.
51.00.00.00.00.00.00.00.
iMONVFD_Uninit
Note that
the 50 data varied, depending on the time of the shutdown. Eg, shutting down a
few minutes later, the word was 50.0c.28.09.11.06.07.88. I have not been able to decode the format of
this control sequence.
Let me first caveat the software. I am not a programmer. The code appears to work, but is certainly
beta – perhaps even alpha. Use it at
your own risk.
As mentioned in the Background, I started this
exercise to find out how to control the LCD, so that others who are more
experienced in writing software could have a start at programming for this
LCD. I am particularly thinking of the mediaportal team, whose users have
been complaining to SoundGraph, and the LCDSmartie team. I am also sure
there are some GBPVR users out there who
would like to interface to this display also, not to mention mythTV (sorry, you guys will need to work
from the API).
So folks, please look at improving this beta and
sharing your improvements. I’ve almost
reached my level of expertise.
|
METHODS |
FUNCTION |
|
void SendData(Int64 data) |
Sends the data to the LCD |
|
byte[] SendText(string Line1, string Line2) |
Converts a two string of up to 16 characters into a
16x96 pixel array. The pixel array is
sent to the LCD display |
|
void SendPixelArray(byte[] PixelArray) |
Sends an array of 96x2 =192 bytes to the display |
|
void SetLinePixels(UInt32 TopLine, UInt32 BotLine,
UInt32 TopProgress, UInt32 BotProgress) |
Sets the pixels in the progress bars and line
indicators |
|
void SetLineLength(int TopLine, int BotLine, int
TopProgress, int BotProgress) |
Displays line of a given length. +ve = from the left, -ve = from the right |
|
|
|
|
void SetEQ( byte[] EqDataArray) |
Display a graphic equalizer display. EQDataArray is 17 bytes. First byte is the
tpe of EQ display, with the next 16 bytes
being the length of the bar |
|
void ClearDisplay() |
Clears the display and sends what is thought to be
an initialization sequence. |
|
Void ClearPixels() |
Clears the 16x96 pixel arrayCL |
|
CLASS |
|
|
Icons |
Used to turn on and off each icon. Returns an Int64 to send to with SendData() |
UPDATE
Thanks
to cybrmage who advises in this
and this
forum:
The correct way to turn off
the LCD is to use SendData(0x5000000000000008). This will completely blank the
display.
If you want to get really fancy,
you can enable clock that is built in to the display.
SYSTEMTIME st;
Int64 data;
GetLocalTime(&st);
data =
((Int64)0x50 << 56);
data +=
((Int64)st.wSecond << 48);
data +=
((Int64)st.wMinute << 40);
data +=
((Int64_t)st.wHour << 32);
data += ((Int64_t)st.wDay
<< 24);
data +=
((Int64_t)st.wMonth << 16);
data +=
((uint64_t)st.wYear << 8);
data +=
(Int64)0x80;
SendData(data);
This will disable control of
the display and show the built in clock at the current contrast level.
The display is controlled by
command 0x50:
Byte 7 = command = 0x50
Byte 6 = clock seconds
Byte 5 = clock minutes
byte 4 = clock hours
byte 3 = clock day
byte 2 = clock month
byte 1 = clock year
byte 0 = display control
bit 7 = set to 1 to display
the clock
bit 6 = set to 1 to clear the
clock
bit 5 = set to 1 to enable the
alarm
bit 4 = no known function
bit 3 = set to 1 to disable
(and turn off) the display
bit 2 = no known function
bit 1 = set to 1 turns on the
"TV" icon (don't know why)
bit 0 = set to 1 turns on the
"music" icon (don't know why)
The alarm is set with command
0x51:
Byte 7 = command = 0x51
byte 6 = clock day (not 100%
certain)
byte 5 = clock month (not 100%
certain)
byte 4 = clock year (not 100%
certain)
Byte 3 = clock minutes
byte 2 = clock hours
byte 1 = no known function
byte 0 = no known function
Also... In the API that ralphy
developed, he has determining what the LCD3r functions do on his "to
do" list. They are for the LCD device designed by 3Rsystems and
manufactured by SoundGraph. It is in their HT-100 case. (1x12 character LCD +
curved multisegment equalizer + multisegment CPUsped disaplay + 3 x multi
segment fan speed display... looks a lot more limiting than the Antec or
Soundgraph units)
Also... The drivers and DLLs
that are installed by the iMON software is exactly the same as the ones
installed by the Antec software. The Antec VFD software that drives the LCD is
v6.0.1.702. The iMON program is v6.0.1.202 and will not drive the Antec LCD
(even after patching).
This information
and software is provided without any guarantee or warranty, expressed, or
implied. Use this information and associated software at your own risk. This is
unsupported software. The licence allows
you to freely use and distribute the software, or its components, for any
non-commercial uses.
Email: imonAPI at yahoo.com
ralph.y
June 18, 2007
Updated Sept 1 –
information from cybrmage