LCD driver interface
From Mok HTPC wiki
| Table of contents |
[edit]
Main information
| Abbreviation/Term | Description |
|---|---|
| MCD | Multicolor display |
| BWD | Black / white display. A monochrome display that has only two colors; pixel on and pixel off. |
[edit]
Mandatory functions
[edit]
lcd_info
lcd_info(const PLI: PPlayerInfo)
[edit]
lcd_init
lcd_init(const PLI: PPlayerInfo)
[edit]
lcd_kill
lcd_kill(const PLI: PPlayerInfo)
[edit]
lcd_run
lcd_run(const PLI: PPlayerInfo)
[edit]
lcd_clrScreen
// ------------------------------------------------------------------------------------ // // lcd_clrScreen() // // Clears the LCD screen. // // nothing - Nothing // // ------------------------------------------------------------------------------------ procedure lcd_clrScreen();
[edit]
lcd_setCursor
// ------------------------------------------------------------------------------------ // // lcd_setCursor() // // Sets the cursor to the given coordinate. // // x - x pos on screen // y - y pos on screen // // ------------------------------------------------------------------------------------ procedure lcd_setCursor(X: integer; Y: integer);
[edit]
lcd_setPixel
// ------------------------------------------------------------------------------------ // // lcd_setPixel() // // Set pixel on X/Y position on screen with chosen color. // // Color - Color for the pixel to set. // MCD: The color number. // BWD: 0 = blank, 1 = color, // 10 = attribute inversed, 11 = attribute blinking // // ------------------------------------------------------------------------------------ procedure lcd_setPixel(X: integer; Y: integer; Color: integer);
[edit]
lcd_print
// ------------------------------------------------------------------------------------ // // lcd_print() // // Prints given string to the LCD. This will NOT handle any error // situations (e.g. too long line). // // Outtext - The string to Print // // Color - Color for the text to print. // MCD: The color number. // BWD: 0 = blank, 1 = color, // 10 = attribute inversed, 11 = attribute blinking // // ------------------------------------------------------------------------------------ procedure lcd_print(outtext: string; Color: integer);--d'Arc 21:14, 14 Aug 2006 (EEST)
// Color - attribute to set for the printed text. See core for // definition. // If Attr_OnlyAttr used, fill outtext with a string // built from the wanted attribute. // e.g. LCD_print(StringOfChar(char(Attr_Reverse), 20), Attr_OnlyAttr); //
[edit]
lcd_printImage
lcd_printImage(Bitmap:TBitmap; X, Y: integer)
[edit]
Non Mandatory functions
[edit]
lcd_updateFont
// ------------------------------------------------------------------------------------ // // lcd_updateFont() // // Loads and updates a wanted characters from a font file. // The fontfile is in cuneiform's raw format. // Use Cuneiform to edit (http:// ... ) It's an editor for c64 fonts. // // Font is ordered // $00 : Reserved! // $01-$5e : 1x1 font. // $5f : 'space' // $60-$bf : 2x2 font // $c0-$ff : Free for use // // Some handling differences are defined for different sizes of fonts // - Filesize 2304: Fontdata($800)+Charpackdata(4*64) // In cuneiform export, raw format without startaddress, normalize and // include screendata // - Filesize 2048: Fontdata($800) // In cuneiform export in raw format without startaddress // - TODO Filesize 2050: Fontdata($800)+startaddess(2) // // As you can see by now, you can use 1x1, 2x2 (and logos) as gfx. // // Filename - Filename for the font // CharStart - Character where to start updating (0-255) // CharAmount - Amount of chars to update // // ------------------------------------------------------------------------------------ procedure lcd_updateFont(Filename: string; CharStart, CharAmount:Integer);
[edit]
TODO
lcd_PrintBig(outtext: string; attr: TLCD_Attr; width: integer) lcd_SetGfxMode(gfxmode: TLCD_gfxmode) lcd_SetScreen(gfxmode: TLCD_gfxmode; Brightness: integer; Contrast: integer) lcd_ResetFont() lcd_CreateLogo(bmpfile: string; dest, xsize, ysize, xfrom, yfrom: integer) lcd_PrintLogo(x, y, source, xsize, ysize: Integer; attr: TLCD_Attr)
