chenall / grub4dos

外部命令和工具源码:https://github.com/chenall/grubutils 下载:
http://grub4dos.chenall.net
GNU General Public License v2.0
651 stars 136 forks source link

font-high=24 and then clearing fonts changes space character + hotkey hang #96

Closed steve6375 closed 8 years ago

steve6375 commented 8 years ago
graphicsmode -1 1024
# load 24 high font file
font --font-high=24 /yxt.hex

title TEST1 - reload font
font
font --font-high=24 /yxt.hex
configfile /menu.lst

title TEST2 - clear font
font
configfile /menu.lst

title reboot
reboot

image

steve6375 commented 8 years ago

The yxt.hex and sft.hex font files do not contain the 0020 hex (space) character. They both start as 0021 hex. I added 0020 line but still gives same problem.

steve6375 commented 8 years ago

2016-03-04 better but a bug now when changing to 16 font...

font --font-high=24 /yxt.hex font font /unifont.hex.gz

does not set font to default unifont, must use font --font-high=16 /unifont.hex.gz

also cannot load different font - says font already loaded.

e.g. font --font-high=24 /yxt.hex font font /sft.hex ------ "font already loaded" error

font is not clearing ???

steve6375 commented 8 years ago

if font --font-high=16 /unifont.hex.gz required after using 24 high font then is OK, but

font --font-high=24 /yxt.hex
font --font-high=24 /sft.hex

should work without error. Previous 0.4.5c and 0.4.6a would allow consecutive loading of font files

steve6375 commented 8 years ago

If using 16 high unifont, font command does not clear fonts and go to BIOS fonts menu.lst

font /unifont.hex.gz
font

title test
reboot

should now display BIOS fonts for 0000 to 00FF

steve6375 commented 8 years ago

Also grub4dos 0.4.5c

font && echo clear font

this does not work on 0.4.6a 2016-03-04 (no echo) as returns false,

steve6375 commented 8 years ago

hotkey causes hang if. If remove hotkey then no problem. In Easy2Boot, I have menu.lst in memory at (md)0xa000+0x50 - the following menu hangs! Contents of (md)0xa000+1 is OK. but if I use cat (md)0xa000+0x50 then it hangs! Only hangs if hotkey used. menu.lst

graphicsmode -1 1024
/_ISO/e2b/grub/hotkey -A
title font sft
font
font --font-high=16 /_ISO/e2b/grub/unifont.hex.gz
font --font-high=24 /_ISO/e2b/grub/sft
errorcheck off
# hangs on this line
cat (md)0xa000+0x50
# never gets here
pause
configfile (md)0xa000+0x50
steve6375 commented 8 years ago

This crashes immediately you run the sft menu works if hotkey removed or font command removed.

graphicsmode -1 1024
/_ISO/e2b/grub/hotkey -A
cat /menu.lst > (md)0xa000+0x50

title font sft
font --font-high=24 /_ISO/e2b/grub/sft
errorcheck off
pager off
cat (md)0xa000+0x50
configfile /menu.lst

OK if remove hotkey or if do not run font command

steve6375 commented 8 years ago

new grldr.zip does not work at all

menu.lst graphicsmode -1 1024 title test boot

No menu text displayed?? image

2012yaya2007 commented 8 years ago

Graphics mode, do not load fonts?

steve6375 commented 8 years ago

Graphics mode - no text!

2012yaya2007 commented 8 years ago

No font, show what

steve6375 commented 8 years ago

try menu.lst graphicsmode -1 1024 title test boot

2012yaya2007 commented 8 years ago

This is very normal.There is no font file, showing a blank. Add font /unifont.hex.gz, try it.

steve6375 commented 8 years ago

No, it is not normal. You do not need to load a font for English. It uses BIOS font. (and even if I do load Unifont, the cat command still crashes!)

2012yaya2007 commented 8 years ago

In VBE graphics mode, BIOS characters cannot be used. You can use the command line,or in VGA text mode.

steve6375 commented 8 years ago

This menu works on 0.4.5c and 0.4.6a 2015 and displays a menu.

menu.lst

graphicsmode -1 1024
title test
boot

It does not work on the new 'grldr.zip.tzt' version you posted.

steve6375 commented 8 years ago

OK, crash solved. fonts load better

PROBLEM: 'font' command now resets graphicsmode!

menu.lst

graphicsmode -1 1024

title font uni  BAD GRAPHICSMODE IS RESET
font
pause fffff
font /unifont.hex.gz
pause uni
errorcheck off
boot

title font +  font ltb24  BAD \n GRAPHICS MODE IS RESET
font
font --font-high=24 /_ISO/e2b/grub/ltb24
pause 222
errorcheck off
boot
steve6375 commented 8 years ago

If --font-high is not specified, then it should default to 16

e.g. font --font-high=24 /ltb24 font /unifont.hex.gz

should work, but it does not.

2012yaya2007 commented 8 years ago

There is no need to use "font" graphicsmode -1 1024

title font uni BAD GRAPHICSMODE IS RESET font /unifont.hex.gz pause uni errorcheck off boot

title font + font ltb24 BAD \n GRAPHICS MODE IS RESET font --font-high=24 /_ISO/e2b/grub/ltb24 pause 222 errorcheck off boot

steve6375 commented 8 years ago

Yes, font should restore BIOS font to 0000-007F only

This menu works on previous versions of 0.4.5c and 0.4.6a 2016-01

menu.lst

title test~ ÀÁÂÃÄ TEST a©a b·b cÀc nñn p‰p üüüüüüü
font /unifont.hex.gz
font
errorcheck off
boot

In previous versions, this causes bios fonts to be used for 0000-007F and unifont for >007F

image

2012yaya2007 commented 8 years ago

0.4.6a title test~ ÀÁÂÃÄ TEST a©a b·b cÀc nñn p‰p üüüüüüü font /unifont.hex.gz errorcheck off boot same ok

steve6375 commented 8 years ago

No, it is not the same because 0000-007F is in unifont. if you use font command then 0000-007F should be in BIOS font. the command 'font' should change 0000-007F to use BIOS font (but if non-16 high font the command 'font' does nothing

if command = 'font' with no parameters { if ( normal 16 high font in use) use BIOS font for 0000-007F }

steve6375 commented 8 years ago

20160307 still has hotkey problem!

menu.lst

graphicsmode -1 1024
# Works OK if next line deleted
/hotkey -A

title test font+hotkey \n Run menu then use cursor in menu
font --font-high=24 /yxt
pause yxt loaded
errorcheck off
pause goto 0
goto 0

title reboot
reboot
  1. Run menu 0
  2. Press cursor down - HANGS!

image

steve6375 commented 8 years ago

Thanks, but something is broken in this version if load 24 pixel fonts. Fonts (sft 24 high) seem to load OK but when menu is displayed it is blank. unifont.hex.gz gives no problem. Problem happens after loading sft 24 pixel font hotkey is not the cause. sft is loaded ok and large fonts are displayed (echo works OK), but when menu is displayed it is blank and in 16 pixel high mode image if I go to command prompt and type 'font' then I get 16 pixel font - ESC = menu OK. if I go to command prompt and type 'font --font-high=24 /sft' - ESC - menu OK.... image

if I type 'configfile /menu.lst' then I get blank menu, problem seems to be with configfile command with 24 high font loaded?

2012yaya2007 commented 8 years ago

Close the hotkey, try it. Use the hotkey, font size not too large.

steve6375 commented 8 years ago

I removed hotkey file and I still get the problem, so hotkey is not the problem. Previous grldr was OK with same files, so must be a problem with the new grldr.

2012yaya2007 commented 8 years ago

I have no problem here.

steve6375 commented 8 years ago

Difficult for me to reproduce with simple menu. I will try to find best test case tomorrow and send you files.

steve6375 commented 8 years ago

To reproduce problem - very simple but must use two menus \menu.lst

title  MENU1
configfile /menu1.lst

\menu1.lst

graphicsmode -1 800
font --font-high=24 /sft.f24
pause HERE
configfile /menu.lst

image image

2012yaya2007 commented 8 years ago

test grldr.rar.txt

steve6375 commented 8 years ago

Not fixed! I now get small fonts in menu, but it should be large font

2012yaya2007 commented 8 years ago

"Menu.lst" is not installed font, should use the BIOS internal font.

steve6375 commented 8 years ago

menu1.lst has installed the font, so when load menu.lst it should keep large fonts. This works OK on 2016-03-07 version but not on later versions. menu.lst + menu1.lst 20160307 - OK 20160310 - BAD 20160311 - BAD

configile should not reset font height. This is major problem!

steve6375 commented 8 years ago

ISSUES95-104_DEMO.zip - see ISSUE 104 Please try attached DEMO for issues 95 - exit command 96 - no large font after configfile command 101 - no animation at start of set /p 102 - goto n after errorcheck 103 - font command does not set high=16 + BIOS font 104 - bad font filespec causes bad display

2012yaya2007 commented 8 years ago

No "--font-high=",The default character is high =16. therefore: 20160307 - BAD 20160310 - OK 20160311 - OK

steve6375 commented 8 years ago

We need function as in 20160307. e.g. I load fonts, set graphics mode, etc, in menu.lst, then make a menu in (md)xxxxx, then run configfile (md)xxxxxx to display menu. So graphicsmode and font mode must be preserved when using configfile. Also if load new menu, then must preserve graphicsmode and background and fonts.

You force us to to reload the fonts for each menu which is slow and not needed. PLEASE - configfile should not change font mode.

Why does configfile reset font mode? This is a BIG PROBLEM.

\menu.lst title MENU1 configfile /menu1.lst

\menu1.lst graphicsmode -1 800 font --font-high=24 /sft.f24 pause HERE - when load menu.lst it should stay in 24 high font configfile /menu.lst

2012yaya2007 commented 8 years ago

I agree with you. This leads to a problem,When loading the 16*16 font, you must use the --font-high=16.(First boot exception)

steve6375 commented 8 years ago

??? This is issue 96 - configfile command changes font from 24 high to 16 high

2012yaya2007 commented 8 years ago

20160307 font --font-high=16 /unifont.hex.gz ok font /unifont.hex.gz bad

steve6375 commented 8 years ago

font /_ISO/e2b/grub/unifont.hex.gz OK on YaYa's 20160311

This bug 96 is now about configfile issue and font-high=24

2012yaya2007 commented 8 years ago

20160310 - BAD 20160311 - BAD The cause is: The new version is still in use "font /unifont.hex.gz", Instead of "font --font-high=16 /unifont.hex.gz "

steve6375 commented 8 years ago

..

steve6375 commented 8 years ago

Sorry, I do not understand?? This issue is about sft.f24 font and configfile. This issue does not involve unifont. unifont is never loaded or used???

ISSUES95-104_DEMO.zip

/menu.lst splashimage /_ISO/e2b/grub/background.bmp.gz /_ISO/e2b/grub/hotkey -A pager off title ISSUE 96 24-high font reset by configfile configfile /menu1.lst

/menu1.lst font --font-high=24 /_ISO/e2b/grub/sft.f24 pause HERE - now load menu.lst - large font should stay... configfile /menu.lst

image image image

2012yaya2007 commented 8 years ago

Has finally turned to a solution, I do not know whether it is perfect or not. Not yet merged with “exit” patch. grldr.rar.txt

steve6375 commented 8 years ago

Looks good! Works :+1: image

image

steve6375 commented 8 years ago

2016-03-15 fixed :+1: