Author Topic: Assembler insert strange instructions [At end of topic new question VESA BIOS]  (Read 19864 times)

kyoto008

  • Guest
Just out of curiosity, what VESA/FP function do you require?
Some not popular and not Linux-like embedded system was started with off lvds display. I want to switch-on this display. It is failed. On Linux Mint 14 Cinnamon on Live CD is this lvds display on and work. On Linux Mint 16 Cinnamon this display not work and off. Only vga display was worked anyway.
VESA BIOS FP function 0 report that 0, 1, 2, 7 function only supported by my BIOS. BIOS is AMI BIOS 2.01. Display is HSD100IFW1 F01 with 1024x600 resolution. My PC is technical SOM-7562 B1 embedded device with Intel N455 and ICH8M (82801HBM).
CPU have integrated graphic card. I think is Intel GMA 3150.

dedndave

  • Member
  • *****
  • Posts: 8751
  • Still using Abacus 2.0
    • DednDave
from what i remember of the timeline, the type of display you are using
came out about the same time that VESA became obsolete

are you "locked" into 16-bit code ?
what is the windows OS ?

FORTRANS

  • Member
  • ****
  • Posts: 946
Hi,

   Have you tried to set a VESA video mode that has a similar
resolution as your display?  Is this the primary display?

   Outside of the back light, the VESA/FP functions don't seem
to "turn on" a display.

Regards,

Steve N.

kyoto008

  • Guest
VESA became obsolete
o_o Expected.
Quote
are you "locked" into 16-bit code ?
No. I insert 16 bit code for "turn on" display before load OS. VESA FP work only in 16 bit real mode. I have 32 bit protected mode with virtual paging after load.
Quote
what is the windows OS ?
I don't try it. Windows can't help me.

Have you tried to set a VESA video mode that has a similar resolution as your display?
No. I will try it.

Quote
Is this the primary display?
I don't known. I can't ask or change it's primacy. I can't enter to BIOS, because haven't PS/2 keyboard. USB should was supported, but not work.


dedndave

  • Member
  • *****
  • Posts: 8751
  • Still using Abacus 2.0
    • DednDave
i found a user manual for that embedded system - it says windows ce 5/6
i guess i can understand wanting to be in real mode to turn on the display
but for 32-bit graphics, i would use windows API - much easier/better than farting around with VESA

there is probably a way to turn on the display from 32-bit code
i guess it's a matter of knowing the graphics drivers for the display
otherwise, you could run a 16-bit program to turn it on, then run a 32-bit GUI app   :P

i don't really find much in the way of ASM code for that device
that doesn't mean it can't be done - it just means they are keeping it to themselves

MichaelW

  • Global Moderator
  • Member
  • *****
  • Posts: 1209
I don’t know if this is of any value here, but the DOS version of FreeBASIC uses the available VESA modes for graphics, and one useful function that it provides is ScreenList. The two DOS DPMI apps in the attachment display the available modes for the system they are running on.

Running on my P3 system (Matrox G400) under the Windows XP NTVDM:
Code: [Select]
80x80x8
160x120x8
256x256x8
320x100x8
320x200x8
320x240x8
640x400x8
640x480x8
800x600x8
640x480x15
800x600x15
640x480x16
800x600x16
640x480x24
800x600x24
640x480x32
800x600x32

Running on an old Micron P2 system (Diamond Viper V330) under MS-DOS 6.22, HDPMI32:
Code: [Select]
80x80x8
160x120x8
256x256x8
320x100x8
320x200x8
320x240x8
320x400x8
400x300x8
480x360x8
512x384x8
640x400x8
640x480x8
800x600x8
960x720x8
1024x768x8
1152x864x8
1280x1024x8
1600x1200x8
320x200x15
320x240x15
320x400x15
400x300x15
480x360x15
512x384x15
640x400x15
640x480x15
800x600x15
960x720x15
1024x768x15
1152x864x15
1280x1024x15
1600x1200x15
320x200x16
320x240x16
320x400x16
400x300x16
480x360x16
512x384x16
640x400x16
640x480x16
800x600x16
960x720x16
1024x768x16
1152x864x16
1280x1024x16
1600x1200x16
320x200x24
320x240x24
320x400x24
400x300x24
480x360x24
512x384x24
640x400x24
640x480x24
800x600x24
960x720x24
1024x768x24
1152x864x24
320x200x32
320x240x32
320x400x32
400x300x32
480x360x32
512x384x32
640x400x32
640x480x32
800x600x32
960x720x32
1024x768x32
1152x864x32

I think modes like 80x80x8 are likely to be text modes.
Well Microsoft, here’s another nice mess you’ve gotten us into.

FORTRANS

  • Member
  • ****
  • Posts: 946
Hi,

   My P-III and Matrox G400 in a Windows 2000 NTVDM.

Code: [Select]
In a window.

F:\TEMP>list
80x80x8
160x120x8
256x256x8
320x100x8
320x200x8
320x240x8
done...

Full screen

F:\TEMP>list
80x80x8
160x120x8
256x256x8
320x100x8
320x200x8
320x240x8
640x400x8
640x480x8
800x600x8

640x480x15
800x600x15
640x480x16
800x600x16
640x480x24
800x600x24
640x480x32
800x600x32
done...

F:\TEMP>

   Just as an aside, one feature of the Matrox card I am using more
and more is its 2x and 4x zoom feature.  The Windows VESA support
seems to be what is built into the card's BIOS.  Also a DOS program
cannot set a VESA mode.  If you can do this, I would like to know
your driver version.

  There is a TSR that supports higher resolutions in a VDM.  So the
card has more capability using a driver.  And Windows does support
desktop resolutions up to 1280 x 1024.

   A Pentium laptop in a full screen OS/2 VDM.  And a VESA utility
report of that system.

Code: [Select]
80x80x8
160x120x8
256x256x8
320x100x8
320x200x8
320x240x8
640x400x8
640x480x8
800x600x8
320x200x15
640x480x15
320x200x16
640x480x16

Super VGA BIOS extension version 1.02 is installed
OEM string is 'MagicGraph NM2070 40K SVGA BIOS'
Device capabilities are 0

Mode Attr Window  WindowA WindowB Mapping  Bytes Resolution Char BPP Banks Type
          Grn Siz Seg att Seg att Function /line            Cell   Planes

0100 IBCG  64  64 A000 RW         C000:1A63  640  640x400   8x16 8 1 1     VGA
0101 IBCG  64  64 A000 RW         C000:1A63  640  640x480   8x16 8 1 1     VGA
010D IBCG  64  64 A000 RW         C000:1A63  640  320x200   8x8 15 1 1     VGA
010E IBCG  64  64 A000 RW         C000:1A63  640  320x200   8x8 16 1 1     VGA
0110 IBCG  64  64 A000 RW         C000:1A63 1280  640x480   8x1615 1 1     VGA
0111 IBCG  64  64 A000 RW         C000:1A63 1280  640x480   8x1616 1 1     VGA
0102 IBCG  64  64                 C000:1A63  100  800x600   8x16 4 4 1     EGA
0103 IBCG  64  64 A000 RW         C000:1A63  800  800x600   8x16 8 1 1     VGA

   The 320x240x8 mode can be (is) a tweaked VGA mode.  The
320x200x8 is a standard VGA mode.  The other non-VESA modes
may be made by plotting more than one pixel as a logical pixel.
They do not seem to correspond to a text mode.

Regards,

Steve N.

FORTRANS

  • Member
  • ****
  • Posts: 946
Hi,

   I was working on a program to try out the VBE/FP functions
on my laptops.  The next couple of days are occupied, so I am
posting the EXE as it is now.  Michael posted a program in Reply
#15 that called functions 1 and 2.  I did function 1 with some
different formatting.  Doesn't do anything on systems that don't
have VBE/FP.

   I Googled on VBE/FP and did not find anything on display
activation or switching between displays.  But another system
that has two displays and uses VBE/FP had its own extensions
to the Video BIOS that enabled the second view or a dual view
using function 5F as VESA uses 4F.  Dave, did the technical manual
you found have anything like that?

Regards,

Steve N

FORTRANS

  • Member
  • ****
  • Posts: 946
Hi,

   Here is a somewhat better version of the above program.
Two versions, a regular version and a debug version that shows
some register contents.  Tested on four laptops.  One had a
faulty implementation that did not return good information for
some functions.  The results for the most part were interesting,
but not particularly useful.

   Let me know if you find something interesting.

Cheers,

Steve N.

dedndave

  • Member
  • *****
  • Posts: 8751
  • Still using Abacus 2.0
    • DednDave
XP mce2005 SP3
goes full-screen, then crashes with no visible error message

FORTRANS

  • Member
  • ****
  • Posts: 946
Hi Dave,

   Neat.  Well it does go full screen on the XP laptops here.
Not so on the others.  Can you run it in DEBUG or SYMDEB?
If it crashes, it should be in the BIOS, which would be rather
crummy.  My program is rather brain dead formatting of
returned results.

Thanks,

Steve

dedndave

  • Member
  • *****
  • Posts: 8751
  • Still using Abacus 2.0
    • DednDave
i cheated the program
the call to INT 10h, 4F11h returns 4F11h
so, i set a breakpoint and forced AX = 4Fh

this is the debug version of the program...

Code: [Select]
1073:0017 CD21           INT    21
1073:0019 B8114F         MOV    AX,4F11
1073:001C 33DB           XOR    BX,BX
1073:001E BF0000         MOV    DI,0000
1073:0021 CD10           INT    10
1073:0023 E8F508         CALL   091B
-bp0 23
-g
 VESA BIOS Extension/Flat Panel Interface (VBE/FP) Function Test Program.
 Paused, hit a key.
 AX returned from function request = AX=4F11  BX=0000  CX=1A9F  DX=0197  SP=0200
  BP=0000  SI=0000  DI=0000
DS=0F88  ES=0F88  SS=0F68  CS=1073  IP=0023   NV UP EI PL ZR NA PE NC
1073:0023 E8F508         CALL   091B                          ;BR0
-rax 4f
-g
004F
 VESA BIOS Extension/Flat Panel Interface Function 0 is supported.
  AH = 00:  Function call successful.
 Supplemental VBE Signature =
 Supplemental VBE Version
 Major version, Minor version = 00, 00
 Bitfield of supported subfunctions
 7 6 5 4 3 2 1 0
 0 0 0 0 0 0 0 0
 OEM Software Revision
 Major version, Minor version = 00, 00
 Pointer to Vendor Name String = 0000:0000

 Pointer to Product Name String = 0000:0000

 Pointer to Product Revision String = 0000:0000

 Pointer to OEM String = 0000:0000

 End function 0 display.  Paused, hit a key.
 AX returned from function request = 4F11
 VESA BIOS Extension/Flat Panel Interface Function 0 is not supported.
Program terminated normally (1)
-q

dedndave

  • Member
  • *****
  • Posts: 8751
  • Still using Abacus 2.0
    • DednDave
here is what i get if i don't cheat
but - the window closes too fast to catch it
under symdeb, i can catch it

Code: [Select]
VESA BIOS Extension/Flat Panel Interface (VBE/FP) Function Test Program.
 Paused, hit a key.
 VESA BIOS Extension/Flat Panel Interface Function 0 is not supported.
Program terminated normally (1)
-q

FORTRANS

  • Member
  • ****
  • Posts: 946
Hi,

   Okay.  I guess I could have put in another pause.  I run this
at the command prompt, so I didn't have to worry about the
window closing.  Let's me redirect the output to help clean up
the formatting.  I will try and remember that for next time.

Thanks,

Steve N.

dedndave

  • Member
  • *****
  • Posts: 8751
  • Still using Abacus 2.0
    • DednDave
i sometimes use a macro to put text into a buffer - it acts like a replacement for the "print" macro
then display the buffer in a message box or output to a file