Jump to content











Photo
- - - - -

Graphicsmode syntax


  • Please log in to reply
14 replies to this topic

#1 ilko

ilko

    Frequent Member

  • Advanced user
  • 426 posts
  •  
    Bulgaria

Posted 14 February 2012 - 03:08 AM

What's the correct syntax for graphicsmode in latest builds?

README_GRUB4DOS.txt suggests
graphicsmode 0x6A
This results in a tiny little unreadable line on the top of the screen on a typically troublesome Dell Latitude E6400.

From latest stock menu.lst
## set vbe mode

graphicsmode -1 640 480:800
This works fine on that laptop. Now can use longer lines in menu titles, thanks.

How to interpret this syntax "-1 640 480:800" ?

What is real world experience about properly displayed and supported modes?

#2 tinybit

tinybit

    Silver Member

  • Developer
  • 798 posts
  •  
    China

Posted 14 February 2012 - 04:17 AM

Correct syntax:

1. Using a given mode number for VESA VBE. Examples:

graphicsmode   0x100
graphicsmode   0x101

Note: You should be certain that your machine(or your video card) do support those modes.

2. Let grub4dos choose an optimized mode(or say, best mode):

graphicsmode   -1

Note: You do not have to know about (before hand) what mode numbers are actually supported by your hardware.

3. Optimized mode constrained by user-given criteria:

graphicsmode   -1 [ RANGE_X_RESOLUTION [ RANGE_Y_RESOLUTION [ RANGE_COLOR_DEPTH ] ] ]


Note: A value of -1 (that is, negative 1) for each RANGE means no restriction for the resolution(or color depth). And -1 is the default value for all RANGEs.
Note: One might want to use this one(or similar) for (good) compatibility to various hardwares:

graphicsmode   -1	100:1000	100:1000	24:32

Note: mode 0x6A is no longer supported with newer/later builds. Only 24-bit and 32-bit "Direct Color" modes are supported.

Note also: You can use "graphicsmode 3" to go back to text mode.

#3 ilko

ilko

    Frequent Member

  • Advanced user
  • 426 posts
  •  
    Bulgaria

Posted 14 February 2012 - 04:37 AM

Thanks a lot.

Does syntax allow omitting some of the values or not setting a range, as in

-1 640 480:800
or I am interpreting it wrong?

-1 - select best mode
640 - RANGE_X_RESOLUTION
480:800 - RANGE_Y_RESOLUTION
- RANGE_COLOR_DEPTH - omitted

Or in other words- select best mode with X_RESOLUTION 640 and Y_RESOLUTION between 480 and 800, no matter color depth.

Did I get it?

#4 tinybit

tinybit

    Silver Member

  • Developer
  • 798 posts
  •  
    China

Posted 14 February 2012 - 07:58 AM

Actually, (-1) means "no restriction" or "to collect all possibilities".

Among all these possibilities, graphicsmode finally can only choose one of them, which is the "best". The one will be chosen that has maximum product of (x_resolution * y_resolution * color_depth).

640 is also a range, thinking the range has only one element of "640".

If you want to specify color_depth but also omit x_resolution and/or y_resolution, you must specify (-1) for x_resolution and/or y_resolution.

>>> Did I get it?

Yes. I think so.

But for certainty, you should always specify the color depth as 24:32. If you do not specify color depth, it could (possibly) get a value of “4”, which is just as the case of mode 0x6A or 0x102. Modes 0x6A and 0x102 are actually not supported any more.

#5 ilko

ilko

    Frequent Member

  • Advanced user
  • 426 posts
  •  
    Bulgaria

Posted 14 February 2012 - 08:33 PM

Thanks Tinybit, that's quite informative and helpful.

#6 m041633n

m041633n

    Member

  • Tutorial Writer
  • 71 posts
  •  
    India

Posted 01 May 2012 - 03:14 PM

After including the graphicsmode in the menu.lst i cannot select the menu entry from the menu


title Graphics : 800x600

terminal console

graphicsmode 0x6a

terminal graphics



title Graphics : 640x480

terminal console

graphicsmode 0x12

terminal graphics


how do i include the graphicsmode with a specific resolution in my menu.lst

grub4dos version: 0.4.5c 2012-4-25

#7 steve6375

steve6375

    Platinum Member

  • Developer
  • 3,807 posts
  • Location:UK
  • Interests:computers (!), programming (masm,vb6,C,vbs), OSes, photography,TV,films,guitars
  •  
    United Kingdom

Posted 01 May 2012 - 04:00 PM

Did you read post #4
Modes 0x6A and 0x102 are actually not supported any more.
??

Maybe try
graphicsmode -1 800 600 24:32
and

graphicsmode -1 640 480:600 24:32

#8 tinybit

tinybit

    Silver Member

  • Developer
  • 798 posts
  •  
    China

Posted 01 May 2012 - 09:15 PM

@m041633n

I recommend you use this one:

graphicsmode   -1	   100:1000		100:1000		24:32


graphics mode numbers less than 0x100, such as 0x6A and 0x12, are no longer supported.

Only 24-bit and 32-bit "Direct Color" graphics-modes are supported. So mode 0x102 is also unsupported.

With versions of 0.4.5c, you can omit "terminal console" and "terminal graphics" commands. The use of "graphicsmode ..." is enough.

The menu.lst should use UTF-8 character set with graphicsmode.

#9 m041633n

m041633n

    Member

  • Tutorial Writer
  • 71 posts
  •  
    India

Posted 02 May 2012 - 01:53 PM

thanks tinybit :) i'll try

#10 m041633n

m041633n

    Member

  • Tutorial Writer
  • 71 posts
  •  
    India

Posted 03 May 2012 - 06:55 AM


graphicsmode -1 100:1000 100:1000 24:32

timeout 30

default /default

gfxmenu /GFX/message


the code worked
Posted Image

but black screen after entering any of the menu entries

Posted Image



tested in VMware with grub4dos-0.4.5c-2012-04-25 with both ANSI and UTF-8 menu.lst

#11 steve6375

steve6375

    Platinum Member

  • Developer
  • 3,807 posts
  • Location:UK
  • Interests:computers (!), programming (masm,vb6,C,vbs), OSes, photography,TV,films,guitars
  •  
    United Kingdom

Posted 03 May 2012 - 08:03 AM

When in the menu, hit C and then type graphicsmode - what mode does it report?

#12 tinybit

tinybit

    Silver Member

  • Developer
  • 798 posts
  •  
    China

Posted 03 May 2012 - 09:17 AM

graphicsmode -1 100:1000 100:1000 24:32

timeout 30

default /default

gfxmenu /GFX/message

This code is problematic.

You'd beter not mix graphicsmode with gfxmenu.


Either use this


timeout 30

default /default

gfxmenu /GFX/message

or this


timeout 30

default /default

graphicsmode -1 100:1000 100:1000 24:32



#13 steve6375

steve6375

    Platinum Member

  • Developer
  • 3,807 posts
  • Location:UK
  • Interests:computers (!), programming (masm,vb6,C,vbs), OSes, photography,TV,films,guitars
  •  
    United Kingdom

Posted 03 May 2012 - 09:19 AM

GFXMenu changes the graphics mode based on what x/y/ res has been set when the message file was compiled. So setting a graphics mode using grub4dos and then setting it again using GFXMenu may cause problems as tinybit says...

#14 m041633n

m041633n

    Member

  • Tutorial Writer
  • 71 posts
  •  
    India

Posted 03 May 2012 - 09:23 AM

hitting Esc key for textmode give me a blank screen with cursor

i tried without GFX-message and it shows

VB-2012-05-03-14-49-56.png

#15 m041633n

m041633n

    Member

  • Tutorial Writer
  • 71 posts
  •  
    India

Posted 03 May 2012 - 09:27 AM

graphicsmode -1 100:1000 100:1000 24:32

timeout 30

default /default

gfxmenu /GFX/message

This code is problematic.

You'd beter not mix graphicsmode with gfxmenu.


Either use this


timeout 30

default /default

gfxmenu /GFX/message

or this


timeout 30

default /default

graphicsmode -1 100:1000 100:1000 24:32


The code is working thanks tinybit




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users