Uklßdacφ oblast BIOS
Poka₧dΘ, kdy₧ je inicializovßn zobrazovacφ re₧im, jsou
registry nastaveny na jejich standardnφ hodnoty pro zvolen²
re₧im a je aktivovßna standardnφ znakovß sada. ZjiÜt∞nφ
t∞chto standardnφch hodnot nastavenφ je na kartßch EGA
pon∞kud obtφ₧nΘ, nebo¥ registry tΘto karty neumo₧≥ujφ Φtenφ
jejich obsahu. Tyto hodnoty vyu₧φvajφ programy, kterΘ
nastavujφ vlastnφ zobrazovacφ re₧imy a nebo pou₧φvajφ
p°epφnanφ n∞kolika zobrazovacφch re₧im∙. Na pomoc zde
p°ichßzφ EGA/VGA BIOS, kter² v pam∞ti RAM vyhradφ n∞kolik
oblastφ s informacemi, kterΘ pomßhajφ n∞kterΘ nedostatky v
prßci s registry na EGA obejφt (samoz°ejm∞, ₧e tyto
informace lze vyu₧φt i na adaptΘrtech VGA).
Na adrese 0040:00a8 je ulo₧en ukazatel (BIOS_SAVE_PTR)
na uklßdacφ tabulku osmi ukazatel∙. Po spuÜt∞nφ poΦφtaΦe je
tato tabulka ulo₧ena v pam∞ti ROM v EGA/VGA BIOS. Jedin²
ukazatel z osmi je inicializovßn (na VGA jeÜt∞ ukazatel na
sekundßrnφ uklßdacφ tabulku). Je to ukazatel na tabulku
parametr∙. Ostatnφ ukazatele uklßdacφ tabulky jsou nastaveny
na 0000:0000, tj. jsou zatφm nepou₧ity. Pokud chcete ukßdacφ
tabulku modifikovat musφte jφ nejprve p°esunout z ROM do RAM
a zm∞nit ukazatel na adrese 0040:00a8.
Uklßdacφ tabulka
Formßt uklßdacφ tabulky je nßsledujφcφ:
/----------------------------------------------------------------------------------------------------\
| Offset | Velikost | Popis |
|--------+----------+--------------------------------------------------------------------------------|
| 0 | DWORD | Ukazatel na tabulku parametr∙ |
| | | Tato tabulka obsahuje standardnφ nastavenφ registr∙ adaptΘru pro vÜechny |
| | | zobrazovacφ re₧imy, vΦetn∞ internφch (08-0ch). Na EGA je to jedinß tabulka, |
| | | kterß je po₧adovanß pro sprßvnou funkci adaptΘru. Na VGA je k Φinnosti |
| | | zapot°ebφ jeÜt∞ sekundßrnφ uklßdacφ tabulky. |
|--------+----------+--------------------------------------------------------------------------------|
| 4 | DWORD | Ukazatel na dynamickou uklßdacφ oblast |
| | | Tento ukazatel ukazuje na 256 byte velkou oblast RAM, kam se p°i inicializaci |
| | | zobrazovacφho re₧imu ulo₧φ nastavenφ 16 paletov²ch registr∙ a registru |
| | | obsahujφcφho barvu rßmeΦku. P°i ka₧dΘ zm∞n∞ registru palety, je zm∞n∞na |
| | | i p°φsluÜnß hodnota v tΘto tabulce (zm∞na musφ b²t provßd∞na pomocφ slu₧eb |
| | | BIOS, p°φm² zßpis na porty adaptΘru zde samoz°ejm∞ nebude promφtnut). |
|--------+----------+--------------------------------------------------------------------------------|
| 8 | DWORD | Ukazatel na pomocnou tabulku textov²ch re₧im∙ |
| | | Tento ukazatel ukazuje na tabulku, kterß obsahuje deskriptory pro znakovΘ sady |
| | | textov²ch re₧im∙. B∞hem inicializace zobrazovacφho re₧imu je do bitovΘ roviny |
| | | 2 nahrßna standardnφ znakovß sada a pokud tento ukazatel nenφ 0000:0000 je |
| | | nahrßna i znakovß sada urΦenß pomocnou tabulkou textov²ch re₧im∙. Pokud je |
| | | jako znakov² blok tΘto znakovΘ sady uvedena 0, nahradφ se novou znakovou sadou |
| | | standardnφ znakovß sada. V opaΦnΘm p°φpad∞ jsou k dispozici dv∞ znakovΘ sady |
| | | najednou. |
|--------+----------+--------------------------------------------------------------------------------|
| 12 | DWORD | Ukazatel na pomocnou tabulku grafick²ch re₧im∙ |
| | | Tento ukazatel ukazuje na tabulku, kterß obsahuje popis pou₧itΘ znakovΘ sady |
| | | pro grafickΘ re₧imy. Pokud je tento ukazatel nastaven na 0000:0000 pou₧ije se |
| | | standardnφ znakovß sada z ROM. V opaΦnΘm p°φpad∞ se pou₧ije u₧ivatelem |
| | | nadefinovanß znakovß sada. |
|--------+----------+--------------------------------------------------------------------------------|
| 10h | DWORD | Ukazatel na sekundßrnφ uklßdacφ tabulku - pouze VGA |
| | | Tabulka rozÜi°ujφcφ mo₧nosti uklßdacφ tabulky pro pot°eby adaptΘru VGA. |
|--------+----------+--------------------------------------------------------------------------------|
| 14h- | 12 byte | Nepou₧ito |
| -1fh | | |
\----------------------------------------------------------------------------------------------------/
Sekundßrnφ uklßdacφ tabulka
Sekundßrnφ uklßdacφ tabulka p°idßvß n∞kolik dalÜφch
polo₧ek:
/----------------------------------------------------------------------------------------------------\
| Offset | Velikost | Popis |
|--------+----------+--------------------------------------------------------------------------------|
| 0 | WORD | Velikost sekundßrnφ uklßdacφ tabulky v byte. Do tΘto velikosti se zapoΦφtßvß |
| | | i tato prvnφ dvojslabika. Velikost tabulky je tu z d∙vodu mo₧nosti dalÜφho |
| | | rozÜφ°enφ. |
|--------+----------+--------------------------------------------------------------------------------|
| 2 | DWORD | Ukazatel na tabulku kombinacφ monitor∙ |
| | | Tato tabulka obsahuje mo₧nΘ kombinace monitor∙ v systΘmu. |
|--------+----------+--------------------------------------------------------------------------------|
| 6 | DWORD | Ukazatel na druhou pomocnou tabulku textov²ch re₧im∙ |
| | | Pokud nenφ tento ukazatel nastaven na 0000:0000 ukazuje na deskriptor |
| | | sekundßrnφ znakovΘ sady. Po inicializaci m≤du je tato znakovß sada nahrßna do |
| | | bitovΘ roviny, m∙₧ete tak pou₧φvat 512 u₧ivatelem definovan²ch znak∙ (pokud i |
| | | pomocφ prvnφ pomocnΘ tabulky textov²xh re₧im∙ nahrajete vlastnφ znakovou |
| | | sadu). |
|--------+----------+--------------------------------------------------------------------------------|
| 10 | DWORD | Ukazatel na tabulku profilu palety |
| | | Pomocφ tabulky profilu palety m∙₧ete nastavit vlastnφ hodnoty registr∙ palety |
| | | a DAC registr∙, kterΘ se obnovφ po ka₧dΘ inicializaci re₧imu. |
\----------------------------------------------------------------------------------------------------/
Tabulka parametr∙
Tato tabulka obsahuje nastavenφ registr∙ adaptΘru pro
ka₧dou obm∞nu zobrazovacφch re₧im∙ (jsou zde tedy polo₧ky
pro re₧im 0 pro 200, 350 i 400 °ßdk∙). Tabulka odpovφdajφcφ
jednomu re₧imu je 64 byte dlouhß a mß nßsledujφcφ strukturu:
/----------------------------------------------------------------------------------------------------\
| Offset | Velikost | Popis |
|--------+----------+--------------------------------------------------------------------------------|
| 0 | 1 BYTE | PoΦet zobrazovan²ch sloupc∙ |
|--------+----------+--------------------------------------------------------------------------------|
| 1 | 1 BYTE | PoΦet zabrazovan²ch °ßdek |
|--------+----------+--------------------------------------------------------------------------------|
| 2 | 1 BYTE | V²Üka znaku v pixelech |
|--------+----------+--------------------------------------------------------------------------------|
| 3 | 1 WORD | Pam∞t pot°ebnß pro jednu obrazovou strßnku |
|----------------------------------------------------------------------------------------------------|
| Registry sequenceru: |
|----------------------------------------------------------------------------------------------------|
| 5 | 1 BYTE | Re₧im ΦasovaΦe (Clocking Mode) |
|--------+----------+--------------------------------------------------------------------------------|
| 6 | 1 BYTE | Map mask registr |
|--------+----------+--------------------------------------------------------------------------------|
| 7 | 1 BYTE | V²b∞r znakovΘho bloku (Character Map Select) |
|--------+----------+--------------------------------------------------------------------------------|
| 8 | 1 BYTE | Pam∞¥ov² re₧im (Memory Mode) |
|----------------------------------------------------------------------------------------------------|
| Externφ registry: |
|----------------------------------------------------------------------------------------------------|
| 9 | 1 BYTE | Miscellaneous Output register |
|----------------------------------------------------------------------------------------------------|
| CRTC Registry: |
|----------------------------------------------------------------------------------------------------|
| 0ah | 1 BYTE | Celkov² horizontßlnφ poΦet znak∙ |
|--------+----------+--------------------------------------------------------------------------------|
| 0bh | 1 BYTE | Horizontßlnφ poΦet zobrazovan²ch znak∙ |
|--------+----------+--------------------------------------------------------------------------------|
| 0ch | 1 BYTE | ZaΦßtek horizontßlnφho zatemn∞nφ |
|--------+----------+--------------------------------------------------------------------------------|
| 0dh | 1 BYTE | Konec horizontßlnφho zatemn∞nφ |
|--------+----------+--------------------------------------------------------------------------------|
| 0eh | 1 BYTE | ZaΦßtek horizontßlnφho zp∞tnΘho chodu paprsku |
|--------+----------+--------------------------------------------------------------------------------|
| 0fh | 1 BYTE | Konec horizontßlnφho zp∞tnΘho chodu paprsku |
|--------+----------+--------------------------------------------------------------------------------|
| 10h | 1 BYTE | Celkov² vertikßlnφ poΦet °ßdek |
|--------+----------+--------------------------------------------------------------------------------|
| 11h | 1 BYTE | Registr p°eteΦenφ |
|--------+----------+--------------------------------------------------------------------------------|
| 12h | 1 BYTE | Verikßlnφ posun ve znakov²ch re₧imech |
|--------+----------+--------------------------------------------------------------------------------|
| 13h | 1 BYTE | PoΦet °ßdek na znak |
|--------+----------+--------------------------------------------------------------------------------|
| 14h | 1 BYTE | ZaΦßtek kurzoru |
|--------+----------+--------------------------------------------------------------------------------|
| 15h | 1 BYTE | Konec kurzoru |
|--------+----------+--------------------------------------------------------------------------------|
| 16h | 1 BYTE | Nepou₧ito |
|--------+----------+--------------------------------------------------------------------------------|
| 17h | 1 BYTE | Nepou₧ito |
|--------+----------+--------------------------------------------------------------------------------|
| 18h | 1 BYTE | Nepou₧ito |
|--------+----------+--------------------------------------------------------------------------------|
| 19h | 1 BYTE | Nepou₧ito |
|--------+----------+--------------------------------------------------------------------------------|
| 1ah | 1 BYTE | ZaΦßtek vertikßlnφho zp∞tnΘho chodu |
|--------+----------+--------------------------------------------------------------------------------|
| 1bh | 1 BYTE | Konec vertikßlnφho zp∞tnΘho chodu |
|--------+----------+--------------------------------------------------------------------------------|
| 1ch | 1 BYTE | Vertikßlnφ poΦet zobrazovan²ch °ßdek |
|--------+----------+--------------------------------------------------------------------------------|
| 1dh | 1 BYTE | Offset |
|--------+----------+--------------------------------------------------------------------------------|
| 1eh | 1 BYTE | Pozice podtr₧enφ |
|--------+----------+--------------------------------------------------------------------------------|
| 1fh | 1 BYTE | ZaΦßtek vertikßlnφho zatemn∞nφ |
|--------+----------+--------------------------------------------------------------------------------|
| 20h | 1 BYTE | Konec vertikßlnφho zatemn∞nφ |
|--------+----------+--------------------------------------------------------------------------------|
| 21h | 1 BYTE | Ovlßdßnφ re₧imu |
|--------+----------+--------------------------------------------------------------------------------|
| 22h | 1 BYTE | Porovnßnφ °ßdky |
|----------------------------------------------------------------------------------------------------|
| Registry atributovΘho kontroleru: |
|----------------------------------------------------------------------------------------------------|
| 23h- | 16 BYTE | PaletovΘ registry 0-15 |
| -32h| | |
|--------+----------+--------------------------------------------------------------------------------|
| 33h | 1 BYTE | Re₧im atributovΘho kontroleru |
|--------+----------+--------------------------------------------------------------------------------|
| 34h | 1 BYTE | Barva rßmeΦku |
|--------+----------+--------------------------------------------------------------------------------|
| 35h | 1 BYTE | Povolenφ bitov²ch rovin |
|--------+----------+--------------------------------------------------------------------------------|
| 36h | 1 BYTE | Horizontßlnφ posun |
|----------------------------------------------------------------------------------------------------|
| Registry grafickΘho kontroleru: |
|----------------------------------------------------------------------------------------------------|
| 37h | 1 BYTE | Set/Reset |
|--------+----------+--------------------------------------------------------------------------------|
| 38h | 1 BYTE | Povolenφ Set/Reset (Enable Set/Reset) |
|--------+----------+--------------------------------------------------------------------------------|
| 39h | 1 BYTE | Porovnßnφ barev (Color Compare) |
|--------+----------+--------------------------------------------------------------------------------|
| 3ah | 1 BYTE | Kombinace dat (Data Rotate) |
|--------+----------+--------------------------------------------------------------------------------|
| 3bh | 1 BYTE | Mapa pro Φtenφ (Read Map Select) |
|--------+----------+--------------------------------------------------------------------------------|
| 3ch | 1 BYTE | Re₧im grafickΘho kontroleru (Mode Register) |
|--------+----------+--------------------------------------------------------------------------------|
| 3dh | 1 BYTE | R∙znΘ (Miscellaneous) |
|--------+----------+--------------------------------------------------------------------------------|
| 3eh | 1 BYTE | Eliminace barev (Color Don't Care) |
|--------+----------+--------------------------------------------------------------------------------|
| 3fh | 1 BYTE | Bit mask |
\----------------------------------------------------------------------------------------------------/
Nastavenφ registr∙ zaΦßtek a konec kurzoru pou₧φvß
nastavenφ BIOS, kterΘ je kompatibilnφ s CGA, tj. 8°ßdkovΘ
hodnoty jsou p°evedeny na odpovφdajφcφ 14 Φi 16°ßdkovΘ.
V tabulce parametr∙ pro kartu EGA jsou ulo₧ena
nastavenφ registr∙ pro 23 m≤d∙ v nßsledujφcφm po°adφ: 0-3
pro CGA, 4-0eh, 0fh-10h pokud je mΘn∞ ne₧ 64K pam∞ti,
0fh-10h pokud je vφce jak 64K pam∞ti, 0-3 pro EGA (350
°ßdek). VGA p°idßvß dalÜφch 6 m≤d∙: 0-3 (400 °ßdek), 7 (400
°ßdek), 11h-13h.
Pomocnß tabulka textov²ch re₧im∙
Tato tabulka definuje parametry rezidentnφ, u₧ivatelem
definovanΘ znakovΘ sady. Jejφ formßt je:
/----------------------------------------------------------------------------------------------------\
| Offset | Velikost | Popis |
|--------+----------+--------------------------------------------------------------------------------|
| 0 | 1 BYTE | V²Üka znaku v bodech |
|--------+----------+--------------------------------------------------------------------------------|
| 1 | 1 BYTE | Znakov² blok (0-3 EGA, 0-7 VGA) |
|--------+----------+--------------------------------------------------------------------------------|
| 2 | 1 WORD | PoΦet definovan²ch znak∙ ve znakovΘ sad∞ (obvykle 256) |
|--------+----------+--------------------------------------------------------------------------------|
| 4 | 1 WORD | ASCII k≤d prvnφho znaku ve znakovΘ sad∞ (obvykle 0) |
|--------+----------+--------------------------------------------------------------------------------|
| 6 | DWORD | Ukazatel na definici znakovΘ sady |
|--------+----------+--------------------------------------------------------------------------------|
| 10 | 1 BYTE | PoΦet °ßdek na obrazovce. Pokud obsahuje 0ffh, spoΦφtß se nejvyÜÜφ mo₧nß |
| | | hodnota. |
|--------+----------+--------------------------------------------------------------------------------|
| 11-? | n BYTE | Seznam Φφsel textov²ch re₧im∙, pro kterΘ se mß toto nasatvenφ pou₧φvat. |
| | | UkonΦen² hodnotou 0ffh. |
\----------------------------------------------------------------------------------------------------/
Sekundßrnφ tabulka textov²ch re₧im∙
Tato tabulka mß pon∞kud odliÜn² formßt od tΘ p°edchozφ.
Zde popsanß znakovß sada musφ obsahovat definici vÜech 256
znak∙.
/----------------------------------------------------------------------------------------------------\
| Offset | Velikost | Popis |
|--------+----------+--------------------------------------------------------------------------------|
| 0 | 1 BYTE | V²Üka znaku v bodech |
|--------+----------+--------------------------------------------------------------------------------|
| 1 | 1 BYTE | Znakov² blok (0-3 EGA, 0-7 VGA) |
|--------+----------+--------------------------------------------------------------------------------|
| 2 | 1 BYTE | Nepou₧ito |
|--------+----------+--------------------------------------------------------------------------------|
| 3 | DWORD | Ukazatel na definici znakovΘ sady |
|--------+----------+--------------------------------------------------------------------------------|
| 4-? | n BYTE | Seznam Φφsel textov²ch re₧im∙, pro kterΘ se uvedenß znakovß sada pou₧ije, |
| | | ukonΦen² hodnotou 0ffh. |
\----------------------------------------------------------------------------------------------------/
Pomocnß tabulka grafick²ch re₧im∙
Tato taulka obsahuje informace pot°ebnΘ k pou₧φvßnφ
u₧ivatelsky definovanΘ znakovΘ sady v grafick²ch re₧imech.
Musφ b²t definovßno vÜech 256 znak∙.
/----------------------------------------------------------------------------------------------------\
| Offset | Velikost | Popis |
|--------+----------+--------------------------------------------------------------------------------|
| 0 | 1 BYTE | PoΦet znakov²ch °ßdek na obrazovce |
|--------+----------+--------------------------------------------------------------------------------|
| 1 | 1 WORD | DΘlka definice jednoha znaku (tj. v²Üka znaku v pixelech) |
|--------+----------+--------------------------------------------------------------------------------|
| 3 | DWORD | Ukazatel na definici znakovΘ sady |
|--------+----------+--------------------------------------------------------------------------------|
| 4-? | n BYTE | Seznam Φφsel grafick²ch re₧im∙, pro kterΘ lze uvedenou znakovou sadu pou₧φt, |
| | | ukonΦen² hodnotou 0ffh. |
\----------------------------------------------------------------------------------------------------/
Tabulka kombinacφ monitor∙
Tato tabulka obsahuje seznam dvojic zobrazovacφch
adaptΘr∙, kterΘ mohou b²t pou₧φvßny najednou bez konfliktu
adresnφho prostoru. K≤dy adaptΘru jsou nßsledujφcφ:
/------------------------------------------------------\
| K≤d | AdaptΘr/monitor |
|-----+------------------------------------------------|
| 00h | AdaptΘr nenφ p°ipojen |
| 01h | MDA s monochromatick²m monitorem |
| 02h | CGA s barevn²m monitorem |
| 03h | Rezervovßno |
| 04h | EGA s barevn²m monitorem |
| 05h | EGA s monochromatick²m monitorem |
| 06h | PGC |
| 07h | VGA s monochromatick²m monitorem |
| 08h | VGA s barevn²m monitorem |
| 09h | Rezervovßno |
| 0ah | MCGA s digitßlnφm barevn²m monitorem |
| 0bh | MCGA s analogov²m monochromatick²m monitorem |
| 0ch | MCGA s analogov²m barevn²m monitorem |
| ffh | Nerozpoznan² grafick² adaptΘr |
\------------------------------------------------------/
Pro ka₧dou p°φpustnou kombinaci adaptΘr∙ je v tabulce
ulo₧eno jedno slovo, je₧ se skßdß ze dvou k≤d∙ adaptΘr∙.
Formßt tabulky kombinacφ monitor∙:
/----------------------------------------------------------------------------------------------------\
| Offset | Velikost | Popis |
|--------+----------+--------------------------------------------------------------------------------|
| 0 | 1 BYTE | PoΦet zßznam∙ |
|--------+----------+--------------------------------------------------------------------------------|
| 1 | 1 BYTE | Verze tabulky kombinacφ monitor∙ |
|--------+----------+--------------------------------------------------------------------------------|
| 2 | 1 BYTE | Maximßlnφ hodnota k≤d∙ v tabulce kombinacφ monitor∙ |
|--------+----------+--------------------------------------------------------------------------------|
| 3 | 1 BYTE | Nepou₧ito |
|--------+----------+--------------------------------------------------------------------------------|
| 4-? | n WORD | Zßznamy o p°φpustnosti kombinacφ monitor∙ |
\----------------------------------------------------------------------------------------------------/
Tabulka profilu palety
Tato tabulka umo₧≥uje definovat si registry palety a
registry DAC, kterΘ se v₧dy naΦtou znovu po inicializaci
zobrazovacφho re₧imu. Hodnoty pro registry palety jsou v
pam∞ti sekvenΦn∞ ulo₧enΘ hodnoty p°φsluÜn²ch paletov²ch
registr∙. Hodnoty pro DAC registry jsou takΘ ulo₧enΘ
sekvenΦn∞. Jednomu registru vÜak odpovφdajφ t°i byte,
p°φsluÜφcφ postupn∞ ΦervenΘ, zelenΘ a modrΘ slo₧ce intenzity
barvy.
/----------------------------------------------------------------------------------------------------\
| Offset | Velikost | Popis |
|--------+----------+--------------------------------------------------------------------------------|
| 0 | 1 BYTE | Pou₧φvßnφ podtr₧enφ |
| | | = 0 Podtr₧enφ pouze v m≤dech MDA |
| | | = 1 Pou₧φvej podtr₧enφ ve vÜech textov²ch re₧imech |
| | | = 0ffh Nepou₧φvej podtr₧enφ nikdy |
|--------+----------+--------------------------------------------------------------------------------|
| 1 | 1 BYTE | Rezervovßno |
|--------+----------+--------------------------------------------------------------------------------|
| 2 | 1 WORD | Rezervovßno |
|--------+----------+--------------------------------------------------------------------------------|
| 4 | 1 WORD | PoΦet registr∙ palety v tabulce (0-17) |
|--------+----------+--------------------------------------------------------------------------------|
| 6 | 1 WORD | Index prvnφho registru palety v tabulce (0-16) |
|--------+----------+--------------------------------------------------------------------------------|
| 8 | DWORD | Ukazatel na tabulku obsahujφcφ registry palety |
|--------+----------+--------------------------------------------------------------------------------|
| 0ch | 1 WORD | PoΦet DAC registr∙ v tabulce (0-256) |
|--------+----------+--------------------------------------------------------------------------------|
| 0eh | 1 WORD | Index prvnφho DAC registru v tabulce (0-255) |
|--------+----------+--------------------------------------------------------------------------------|
| 10h | DWORD | Ukazatel na tabulku obsahujφcφ DAC registry |
|--------+----------+--------------------------------------------------------------------------------|
| 14h-? | n BYTE | Seznam zobrazovacφch re₧im∙, pro kterΘ se mß toto nastavenφ palet pou₧φt, |
| | | ukonΦen² hodnotou 0ffh. |
\----------------------------------------------------------------------------------------------------/
[PokraΦovßnφ] |
[Obsah]
Copyright © Ji°φ Kosek