[Approved] MiniDisplay Plugin: iMON Driver: Display correct ANSI characters on iMon VFDs. (1 Viewer)

dredkin

Portal Member
February 28, 2008
2
0
Hello all!
I own an AVC S-1-based HTPC. It has IMon VFD embedded. It works flawlessly with MP except one issue: since IMon VFD has only one byte CG Map, no national symbols are displayed in MP. BUT I’ve learned that my VFD (It is Samsung 16T202DA1E, datasheet can be found here: Samsung16T202DA1E.pdf ) HAS national-specific symbols (All Cyrillic and almost all – except for Xi and Psi – of Greek), but they are located in very specific positions (the map mostly follows win-1252, but in some rarely used positions there are those national symbols which differ from Latin alphabet).
You can see the full CG Map in datasheet above or here:

So there is possibility to display national symbols on IMon VFD and IMon itself does it – FrontView shows Cyrillic texts OK.
In the applied patch I’ve implemented transcoding of all symbols sent to IMon VFD according to current Windows locale settings (Codepage for non-Unicode programs).
It works fine for me (Win7 32 bits with Russian locale).
I see following drawbacks of applied code:
  1. According to MSDN Encoding class was introduced in WinXP SP3 so we cut off all WIN XP SP2 users. Actually this class could be replaced by WinAPI calls but this is the task for much more experienced C# programmer than I.
  2. Now code lacks of configuration features but I’m really not sure if we need it. But if necessary it could be done by adding a checkbox (enable Unicode to ANSI translation) or dropdown list (Select Page for Unicode to ANSI translation) in IMon Advanced configuration dialog.
  3. I made an assumption that all IMon VFDs are of Samsung 16T202DA*E family, but if it is not – CG ROM may be different.
Currently only codepages win-1250…win-1254 are supported. Pages 1257-1258 could be added easily but I have not enough motivation to implement it. I’ve tried to maximize the look of transcoded character to the one in codepage, but since we have only 240 characters in CG ROM there are some compromises: e.g. Yen sign for Psi or section sign for Xi. You can modify the transcoding table located in iMONLCDg.cs if you wish.
Also datasheet specifies that VFD has 8 chars CG RAM (I guess IMon fills it with equalizer symbols on Init), but IMon drivers have no feature to program CG RAM. If somebody will discover how to send instruction directly to VFD, we can implement full ANSI table (e.g. add missing French OE diphthong).
And also since this code is my first C# experience I’m sure it has many flaws (e.g. performance ones). So if you have any ideas of improvement, your suggestions are welcomed.
 

Attachments

  • iMon_VFD_ANSI_support.patch
    10.1 KB

Users who are viewing this thread

Top Bottom