Page 1 of 1

Switching From Graphics To Text

Posted: Sun Jul 10, 2011 5:25 am
by melgmry0101b
Hi everyone,
this question is familiar and i found many questions like this in the forum.
I used this code:
http://files.osdev.org/mirrors/geezer/o ... cs/modes.c
but it has many errors in the modes setting registers like g_80x25_text .
Now i want to know how can i write something like these registers because the provided registers is wrong and it case a garbage on the screen.
I don't need source codes but i need how to write these registers.
Can you help me?
Is there any risks if i made an error in these registers?
---------------------------------------------------------
Thank you in advance.

Re: Switching From Graphics To Text

Posted: Sun Jul 10, 2011 5:29 am
by Combuster
Register dumps do not automagically load a font into RAM :wink:

Also, DAC settings are not included, and VGA code does not usually get you properly out of VESA modes.

Re: Switching From Graphics To Text

Posted: Sun Jul 10, 2011 5:40 am
by melgmry0101b
Really I don't understand your post :)

Re: Switching From Graphics To Text

Posted: Sun Jul 10, 2011 5:57 am
by Combuster
Several things:
1) you are the first to claim bugs in the values of g_80x25_text (without even going into details of those errors)
2) After your second post I even cross-checked the values with my own source and found them to be identical.
Which basically comes down to the fact that there is no bug other than yourself.

Since the problem has now shown to exist between the keyboard and chair, and flaming an OP for not following relevant forum rules (read!) is usually not appreciated, the top 3 of frequently-implemented-bugs relevant to the description had to be posted as the next best alternative.

Make from that what you want, add sarcasm where appropriate.

Re: Switching From Graphics To Text

Posted: Sun Jul 10, 2011 11:51 am
by neon
Hello,

The register dump values used in that source code are probably correct; but according to my resource are not the VGA BIOS default values for the video modes being requested. The resource provided by the OP obtained register dumps from the BIOS and are thus may not be entirely portable. I can post what my resource provides as the default BIOS register values if requested.