moxxah I had to edit your half life logo to work on my end so I aint trying to step on any toes but thought I would post it for others if they have the same problem, but great logo bro. I also edited your 2 for halflife 2 a little more to my liking.
Line1:
$CustomChar(1,0,0,3,7,14,28,28,28)$Chr(176)$CustomChar(2,0,31,31,0,14,15,3,3)$Chr(158)$CustomChar(3,0,31,31,3,1,1,16,16)$Chr(131)$CustomChar(4,31,19,13,27,23,1,31,31)$Chr(132)
Line2:
$CustomChar(5,28,28,28,30,31,15,7,3)$Chr(133)$CustomChar(6,7,14,28,24,0,16,31,31)$Chr(134)$CustomChar(7,24,26,30,14,1,7,31,28)$Chr(135)$CustomChar(8,30,28,24,24,24,16,0,0)$Chr(136)
XP:
line 1:$CustomChar(3,0,0,0,0,0,17,11,6)$Chr(131)$CustomChar(4,0,0,0,0,0,19,3,3)$Chr(132)$CustomChar(5,0,0,0,0,0,16,8,8)$Chr(133)
line 2: $CustomChar(1,6,13,24,0,0,0,0,0)$Chr(176)$CustomChar(2,3,19,27,0,0,0,0,0)$Chr(158)$CustomChar(6,16,0,0,0,0,0,0,0)$Chr(134)
xp smaller
line 1: $CustomChar(2,0,0,0,0,0,0,0,4)$Chr(158)$CustomChar(4,0,0,0,0,0,0,0,11)$Chr(132)
line 2: $CustomChar(1,2,1,2,4,0,0,0,0)$Chr(176)$CustomChar(3,18,3,18,10,0,0,0,0)$Chr(131)$CustomChar(5,16,0,0,0,0,0,0,0)$Chr(133)
XP smallest
line 1: $CustomChar(6,0,21,9,21,0,0,0,0)$Chr(134)$CustomChar(7,0,0,16,0,0,0,0,0)$Chr(135)
line 2: $CustomChar(6,0,21,9,21,1,0,0,0)$Chr(134)$CustomChar(8,0,16,8,16,0,0,0,0)$Chr(136)
for Example: Windows XP
use:
line 1: (7x space) $CustomChar(3,0,0,0,0,0,17,11,6)$Chr(131)$CustomChar(4,0,0,0,0,0,19,3,3)$Chr(132)$CustomChar(5,0,0,0,0,0,16,8,8)$Chr(133)
line 2: Windows$CustomChar(1,6,13,24,0,0,0,0,0)$Chr(176)$CustomChar(2,3,19,27,0,0,0,0,0)$Chr(158)$CustomChar(6,16,0,0,0,0,0,0,0)$Chr(134)
So my meager understanding of the custom chars is that they are located in the character set at (ASCII) 0x00 through 0x07 and duplicated at 0x08 through 0x0F. So to me that means using $Chr(0) through $Chr(7). I don't get the rationale for this?!:
Custom Char Hex Binary
------------------- ---- ---------
for 1 use $Chr(176) 0xB0 1011 0000
for 2 use $Chr(158) 0x9E 1001 1110
for 3 use $Chr(131) 0x83 1000 0011
for 4 use $Chr(132) 0x84 1000 0100
for 5 use $Chr(133) 0x85 1000 0101
for 6 use $Chr(134) 0x86 1000 0110
for 7 use $Chr(135) 0x87 1000 0111
for 8 use $Chr(136) 0x88 1000 1000
Why isn't
$CustomChar(1,6,13,24,0,0,0,0,0)$Chr(176)
this
$CustomChar(1,6,13,24,0,0,0,0,0)$Chr(0)
??
grantb3 wrote:
Why isn't
$CustomChar(1,6,13,24,0,0,0,0,0)$Chr(176)
this
$CustomChar(1,6,13,24,0,0,0,0,0)$Chr(0)
??
This goes back to the LCD panel that was being used when LCD Smartie was first created. I have heard rumblings of a newer version of LCD Smartie in the works that would allow the LCD Driver to tell LCD Smartie what characters map to what custom characters but this would potentially require recreating many plug ins.
One other problem is the Chr(0) is the end of string character and can not easily be used with how LCD Smartie sends strings to the panels.
This is the answer to my question, taken from the source of the SparkFun display plugin.
This allows LCD Smartie to preprocess the write data when it contains custom (CGRAM) characters to contain the correct characters. Historically, LCD Smartie used 76, 158, 131, 132, 133, 134, 135, 136 for the CGRAM characters because it allowed the on screen font to display certain characters. Most LCD displays use either 0-7 (with a duplicate at 8-15) or 128-135. When LCD Smartie starts the display, it will ask for what values to use by passing in the Index (1-8 ) and using the 8 bit result from this function to substitute for the default CGRAM characters. Note that if the LCD display uses 0-7, with an 8-15 overlap, 8-15 should be used, since 0 will terminate the null string passed in the write procedure. Not overriding this function will result in LCD Smartie passing the default 176, 158, 131, 132, 133, 134, 135, 136 characters for custom CGRAM characters.
Also, for those that are interested, the implementation of $CustomChar(x, d1, d2, d3, d4, d5, d6, d7) is more or less this:
0xFE Command prefix
0x40 + (x * 8) Address into CGRAM
d1 CGRAM data top line
d2 CGRAM data second line
d3 CGRAM data third line
d4 CGRAM data fourth line
d5 CGRAM data fifth line
d6 CGRAM data sixth line
d7 CGRAM data bottom line
d8 CGRAM data cursor underline line (if LCD supports it).
0xFE Command prefix
0xD0 Cursor position command to get out of CG mode (arbitrary?).
rfryar wrote:One other problem is the Chr(0) is the end of string character and can not easily be used with how LCD Smartie sends strings to the panels.
Rick
OK, that explains a few things! I'll have to think a bit about my implementation keeping this news in mind, Thanks.
0xFE Command prefix
0x40 + (x * 8) Address into CGRAM
d1 CGRAM data top line
d2 CGRAM data second line
d3 CGRAM data third line
d4 CGRAM data fourth line
d5 CGRAM data fifth line
d6 CGRAM data sixth line
d7 CGRAM data bottom line
d8 CGRAM data cursor underline line (if LCD supports it).
0xFE Command prefix
0xD0 Cursor position command to get out of CG mode (arbitrary?).
Also, if you make your own display plugin/driver you can prevent the current cursor position from being destroyed by reading the current value prior to the above and restoring it after. That's what I did with the Genovation.dll 1.00. The idea being that it helps with animating a single character. I haven't tested it in an animation application though.
Line 1: $dll(Animate,1,$CustomChar(1,0,0,0,0,0,0,4,4)$Chr(176)#$CustomChar(2,0,0,10,4,0,0,0,0)$Chr(158)#$CustomChar(3,17,14,0,0,0,0,0,0)$Chr(131)#,1)
Line 2: $CustomChar(4,0,16,14,3,0,0,0,0)$Chr(132)$CustomChar(5,4,4,14,31,14,31,31,31)$Chr(133)$CustomChar(6,0,1,14,24,0,0,0,0)$Chr(134)
It's my first custom icon for LCDSmartie, so it's kinda crude.