Posts: 451
Threads: 16
Joined: Feb 2003
The new font is probably not the same size as the old font.
As a general rule of thumb, you should only change the font immediately after a mode change (as outlined in the "Programmers Guild to the EGA/VGA ").
If the font is the same size then changing the font at any time should not cause any problems.
Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
Posts: 1,752
Threads: 21
Joined: Jun 2002
There is a bug in your 640x400 routine. It changes the dot clock from 28 to 25 mhz (as it should), but it does not change the character width from 9 to 8, causing the refresh rate to drop to a non-standard 62 hz. (Which is why people are having problems with their monitors.)
You can fix your code by removing these two lines in your USset640x400 procedure:
mov ax,100h
out dx,ax
For anybody who wants a quick patch, you can open DEMO.EXE with a hex editor and replace the 4 bytes at offset 51192 (B8 00 01 EF) with NOPs (90 90 90 90).
Posts: 4,307
Threads: 63
Joined: May 2003
Go plasma go! You are good at debugging =P
Posts: 451
Threads: 16
Joined: Feb 2003
Quote:There is a bug in your 640x400 routine. It changes the dot clock from 28 to 25 mhz (as it should), but it does not change the character width from 9 to 8, causing the refresh rate to drop to a non-standard 62 hz. (Which is why people are having problems with their monitors.)
There is a similar neat trick where you set the video to 720 pixels wide and the dot clock to 8. Doing this you can get a 90 column text mode.
http://uregina.ca/~cowles1e/txt.exe
Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
Posts: 451
Threads: 16
Joined: Feb 2003
Quote:There is a bug in your 640x400 routine. It changes the dot clock from 28 to 25 mhz (as it should), but it does not change the character width from 9 to 8, causing the refresh rate to drop to a non-standard 62 hz. (Which is why people are having problems with their monitors.)
There is a similar neat trick where you set the video to 720 pixels wide and the dot clock to 8. Doing this you can get a 90 column text mode.
http://uregina.ca/~cowles1e/txt.exe
Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
Posts: 4,307
Threads: 63
Joined: May 2003
Posts: 451
Threads: 16
Joined: Feb 2003
What part of it was confusing?
My library can also set 480 scanlines for text mode too.
Want 720x480 6-line font? (90x80) text mode?
Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
Posts: 292
Threads: 31
Joined: Apr 2003
Quote:The new font is probably not the same size as the old font.
It is.
Quote:As a general rule of thumb, you should only change the font immediately after a mode change (as outlined in the "Programmers Guild to the EGA/VGA ").
I did.
Quote:If the font is the same size then changing the font at any time should not cause any problems.
It does.
Posts: 451
Threads: 16
Joined: Feb 2003
Are you sure it's the same size?
It's it's the 14-scanline font, some VGA cards fake it by using the 16-line font and dropping two lines. This can cause problems if you then change it to a true 14-line font.
However, if this is not the case, then I have no idea
Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
Posts: 3,279
Threads: 170
Joined: Nov 2003
Quote:When are we gonna see some of your text beat 'em up, Ado?
Very very VERY soon...
I'd knock on wood, but my desk is particle board.