设为首页  
联系我们  
加入收藏  
网页制作 冲浪宝典 图形图像 操作系统 软件教学 编程开发 认证考试 安全技术 站长专区 文学驿站 娱乐天地 游戏天地 办公软件
文章搜索
您的位置: 首页 >> 文章首页 >> 编程开发 >> 其他开发语言 >> Introduction to Writing Windows CE Display Drivers
精品推荐
其他开发语言点击TOP10
·数字小键盘指法练习
·用C语言编通讯录程序(初学者级别的)
·Modem 常用AT指令集
·单片机模拟I2C总线及24C02(I2C EEPROM)读写实例(源代码)
·C++经典电子书下载
·Thinking in C++ 简体中文第二版
·debug和release的区别
·error LNK2001: unresolved external symbol __ftol2 错误解决
·C库函数手册
·一个简单的C语言编译器
编程开发点击TOP10
·数字小键盘指法练习
·ASP.NET 程序中常用的三十三种代码
·用C语言编通讯录程序(初学者级别的)
·我写的Java学生成绩管理系统源代码
·CHK文件恢复工具
·Modem 常用AT指令集
·java笔试题
·异常java.sql.SQLException: Io exception:The Network Adapter could not establish connection
·单片机模拟I2C总线及24C02(I2C EEPROM)读写实例(源代码)
·C++经典电子书下载
精选专题

Introduction to Writing Windows CE Display Drivers

作者: 来源:网络文章 时间:2005-12-17 1:05:29

Introduction to Writing Windows CE Display Drivers(7)

  • m_nLAWPhysical - This specifies the physical address of the linear access window of the display device for accessing the frame buffer.
  • m_nLAWSize - The size of the linear access window.
  • m_nVideoMemorySize - The total amount of video memory available.
  • m_nVideoMemoryStart - The offset of video memory in the linear access window. This is usually 0.
  • m_nScreenStride - The number of bytes per display line.
  • m_bHWCursor - Flag to indicate support for hardware cursor, which is used to bypass existing software cursor support. The actual implementation for hardware cursors still would need to be included.
  • m_b555Mode - Flag to indicate that the 16-bit mode uses 5 bits each for red, green, and blue.
  • m_bIsVGADevice - Flag to indicate that the device is VGA based. This should actually be cleared in the constructor to prevent mapping of VGA registers, but at this point is still useful in bypassing default VGA implementations for SetPalette() and InVBlank().

Once the hardware specific initialization is completed in ModeInit(), the SetMode() function continues the hardware independent mode initialization. The m_pMode, m_nScreenWidth and m_nScreenHeight variables, used by other functions, are set for the new display mode. Then a pointer, m_pLAW, to be used later for accessing video memory, is mapped to the physical address of the linear access window of the display device. To do this, calls to the VirtualAlloc() and VirtualCopy() functions are required. See the Platform Builder help for more information on these functions. Next, a Node2D object, m_p2DVideoMemory, representing all of available video memory is created. This Node2D object manages video memory for the AllocSurface() function, which is then called to create the primary display surface, m_pPrimarySurface. Finally, the bit mask is initialized and the default palette is setup. It may not be clear within this function, but there are really two different 16-bit display modes in common use. One mode uses 5 bits each for red, green and blue, while the other mode uses 5 bits for red and blue and 6 bits for green. The mask values are used by GDI to generate the correct pixel value to represent a particular color. The flag m_b555Mode is used in the driver to determine which 16-bit display mode has been set in the hardware when initializing the mask values. For modes other than 16-bit, this flag is ignored. It is worth noting that the bit mask created here, m_ulBitMasks, is also used by the DDI function DrvGetMasks() to return pixel formatting information.

共9页 9 7 [1] [2] [3] [4] [5] [6] [7] [8] [98 :>

Introduction to Writing Windows CE Display Drivers 相关文章:
Introduction to Writing Windows CE Display Drivers 相关软件:
特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
转载请注明来源:http://www.xgdown.com