+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Apr 2001
    Location
    Lancaster, PA, USA
    Posts
    98

    Need help setting VESA mode in C

    OK I found out how to set the SVGA modes in C, the only problem is that I'm stuck in a mode where I have to write pixels to the screen in 64K segments which is painfully slow. I got some info from a website about setting the Flat Memory Model (where I can write to the whole screen without switching segments). This is what it says:

    Input: AX 0x4F02 - Set VBE Mode
    BX D0-D8 Mode number
    D9-D13 Reserved (must be 0)
    D14 0 - Use windowed frame buffer model
    1 - Use linear/flat frame buffer model
    If set, the mode will be initialized for use with a flat frame buffer model. The base address of the frame buffer can be determined from the extended mode information returned by VBE Function 01h. If D14 is set, and a linear frame buffer model is not available then the call will fail, returning AH=01h to the application.

    Input: AX 0x4F02 - Set VBE Mode
    BX D0-D8 Mode number
    D9-D13 Reserved (must be 0)
    D14 0 - Use windowed frame buffer model
    1 - Use linear/flat frame buffer model

    It seems that I have to set bit 14 to 1 somehow. I would usually set a mode such as 0x101 then turn bit 14 on which would change it to 0x4101 but my compiler chokes saying this number is too big. Help is greatly appreciated. Thanks.

  2. #2
    Member strangerstill's Avatar
    Join Date
    Sep 2001
    Location
    Oxford
    Posts
    203
    Not that I have any experience at low-level stuff, but could you do it by offsetting a pointer by 3 bytes?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts







New Security Features Planned for Firefox 4
Another Laptop Theft Exposes 21K Patients' Data
Oracle Hits to Road to Pitch Data Center Plans
Microsoft Preps Array of Windows Patches
Microsoft Nears IE9 Beta With Final Preview
Simplified Analytics Improve CRM, BI Tools
Android Passes RIM as Top Mobile OS in 2Q
VMware Updates Hyperic System Management
File Monitoring Key to Enterprise Security
LinkedIn Snaps Up SaaS Player mSpoke