aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen Janssen <japj@xs4all.nl>2002-03-01 18:39:38 +0000
committerJeroen Janssen <japj@xs4all.nl>2002-03-01 18:39:38 +0000
commit20797bdc909a256e98072b6202995b26e8b98544 (patch)
treeb7d77c1796b20c337b1e63593076dbffd0f2f00b
parent9aac6192fd296f8f2c304772a04750cf520351b6 (diff)
downloadvgabios-20797bdc909a256e98072b6202995b26e8b98544.tar.gz
- added vbe support for 320x200x8 using the standard vgamode (0x13)
-rw-r--r--ChangeLog3
-rw-r--r--TODO10
-rw-r--r--vbe.c32
-rw-r--r--vbe.h15
-rw-r--r--vbetables.h58
5 files changed, 107 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index e22a543..2118a67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
vgabios-0.3a (Not released yet!!)
+ . added 320x200x8 vbe support (uses the standard 320x200x8 vga mode to
+ display, this allows for testing & having something on screen as well,
+ at least until bochs host side display is up & running)
. adding lfbprof (vbe) testprogram (+some small fixes to it)
. merging with vbebios 0.2
diff --git a/TODO b/TODO
index 916ea4c..4982a2f 100644
--- a/TODO
+++ b/TODO
@@ -39,3 +39,13 @@ v3.0
- vesa bios (plex86/bochs vga card needs update)
- frame buffer/SDL display
+
+
+VBE:
+----
+Short term:
+- get Scitech's vbetest program working with 320x200x8.
+
+Long term:
+- have bochs/plex86 host side display interface
+- support more modi \ No newline at end of file
diff --git a/vbe.c b/vbe.c
index 70952d7..2ebef08 100644
--- a/vbe.c
+++ b/vbe.c
@@ -78,6 +78,7 @@ _vbebios_mode_list:
.word VBE_VESA_MODE_800X600X888
.word VBE_OWN_MODE_800X600X8888
.word VBE_OWN_MODE_1024X768X8888
+.word VBE_OWN_MODE_320X200X8
.word VBE_VESA_MODE_END_OF_LIST
#endif
@@ -292,6 +293,18 @@ Bit16u *AX;Bit16u BX; Bit16u ES;Bit16u DI;
//result=read_word(ss,AX);
+ // check for non vesa mode
+ if (BX<VBE_MODE_VESA_DEFINED)
+ {
+ Bit8u mode;
+ // call the vgabios in order to set the video mode
+ // this allows for going back to textmode with a VBE call (some applications expect that to work)
+
+ mode=(BX & 0xff);
+ biosfn_set_video_mode(mode);
+ result = 0x4f;
+ }
+
while ((cur_info->mode != VBE_VESA_MODE_END_OF_LIST) && (!found))
{
if (cur_info->mode == BX)
@@ -312,10 +325,21 @@ Bit16u *AX;Bit16u BX; Bit16u ES;Bit16u DI;
cur_info->info.YResolution,
cur_info->info.BitsPerPixel);
#endif
-
- // FIXME: setup gfx mode with host
- // FIXME: store current mode in CMOS
-
+ // FIXME: this is here so we can do some testing
+ // at least until bochs host side display is up & running
+ // (we're using the 'standard' 320x200x256 vga mode as if it
+ // were a vesa mode)
+
+ if (cur_info->mode == VBE_OWN_MODE_320X200X8)
+ {
+ biosfn_set_video_mode(0x13);
+ }
+ else
+ {
+ // FIXME: setup gfx mode with host
+ // FIXME: store current mode in CMOS
+ }
+
result = 0x4f;
}
else
diff --git a/vbe.h b/vbe.h
index 0a879b4..d12f426 100644
--- a/vbe.h
+++ b/vbe.h
@@ -199,12 +199,13 @@ typedef struct ModeInfoBlock
// BOCHS/PLEX86 'own' mode numbers
// FIXME: Add more modi
-#define VBE_OWN_MODE_320X200X8888 0x140
-#define VBE_OWN_MODE_640X400X8888 0x141
-#define VBE_OWN_MODE_640X480X8888 0x142
-#define VBE_OWN_MODE_800X600X8888 0x143
-#define VBE_OWN_MODE_1024X768X8888 0x144
-#define VBE_OWN_MODE_1280X1024X8888 0x145
+#define VBE_OWN_MODE_320X200X8888 0x140
+#define VBE_OWN_MODE_640X400X8888 0x141
+#define VBE_OWN_MODE_640X480X8888 0x142
+#define VBE_OWN_MODE_800X600X8888 0x143
+#define VBE_OWN_MODE_1024X768X8888 0x144
+#define VBE_OWN_MODE_1280X1024X8888 0x145
+#define VBE_OWN_MODE_320X200X8 0x146
#define VBE_VESA_MODE_END_OF_LIST 0xFFFF
@@ -263,7 +264,7 @@ typedef struct ModeInfoBlock
// FIXME: Add actual host <-> guest IOPORT
#define VBE_BIOS_CALLBACK_IOPORT 0xFF00
-#define VBE_TOTAL_VIDEO_MEMORY_DIV_64K (4*1024/64)
+#define VBE_TOTAL_VIDEO_MEMORY_DIV_64K (4*1024/64)
// FIXME: Add host <-> guest index port commands
#endif \ No newline at end of file
diff --git a/vbetables.h b/vbetables.h
index d961edd..c6ad88c 100644
--- a/vbetables.h
+++ b/vbetables.h
@@ -20,6 +20,64 @@ typedef struct ModeInfoListItem
static ModeInfoListItem mode_info_list[]=
{
{
+ VBE_OWN_MODE_320X200X8,
+ {
+/*typedef struct ModeInfoBlock
+{*/
+// Mandatory information for all VBE revisions
+ /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | VBE_MODE_ATTRIBUTE_GRAPHICS_MODE | VBE_MODE_ATTRIBUTE_COLOR_MODE | VBE_MODE_ATTTRIBUTE_LFB_ONLY,
+ /*Bit8u WinAAttributes*/ 0,
+ /*Bit8u WinBAttributes*/ 0,
+ /*Bit16u WinGranularity*/ 0,
+ /*Bit16u WinSize*/ 0,
+ /*Bit16u WinASegment*/ 0,
+ /*Bit16u WinBSegment*/ 0,
+ /*Bit32u WinFuncPtr*/ 0,
+ /*Bit16u BytesPerScanLine*/ 320,
+// Mandatory information for VBE 1.2 and above
+ /*Bit16u XResolution*/ 320,
+ /*Bit16u YResolution*/ 200,
+ /*Bit8u XCharSize*/ 8,
+ /*Bit8u YCharSize*/ 16,
+ /*Bit8u NumberOfPlanes*/ 1,
+ /*Bit8u BitsPerPixel*/ 8,
+ /*Bit8u NumberOfBanks*/ 1,
+ /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_PACKED_PIXEL,
+ /*Bit8u BankSize*/ 0,
+ /*Bit8u NumberOfImagePages*/ 0,
+ /*Bit8u Reserved_page*/ 0,
+// Direct Color fields (required for direct/6 and YUV/7 memory models)
+ /*Bit8u RedMaskSize*/ 0,
+ /*Bit8u RedFieldPosition*/ 0,
+ /*Bit8u GreenMaskSize*/ 0,
+ /*Bit8u GreenFieldPosition*/ 0,
+ /*Bit8u BlueMaskSize*/ 0,
+ /*Bit8u BlueFieldPosition*/ 0,
+ /*Bit8u RsvdMaskSize*/ 0,
+ /*Bit8u RsvdFieldPosition*/ 0,
+ /*Bit8u DirectColorModeInfo*/ 0,
+// Mandatory information for VBE 2.0 and above
+ /*Bit32u PhysBasePtr*/ 0xa0000, //FIXME: this allows this mode to be displayed using the standard 320x200x8 vga mode
+ /*Bit32u OffScreenMemOffset*/ 0,
+ /*Bit16u OffScreenMemSize*/ 0,
+// Mandatory information for VBE 3.0 and above
+ /*Bit16u LinBytesPerScanLine*/ 320,
+ /*Bit8u BnkNumberOfPages*/ 0,
+ /*Bit8u LinNumberOfPages*/ 0,
+ /*Bit8u LinRedMaskSize*/ 0,
+ /*Bit8u LinRedFieldPosition*/ 0,
+ /*Bit8u LinGreenMaskSize*/ 0,
+ /*Bit8u LinGreenFieldPosition*/ 0,
+ /*Bit8u LinBlueMaskSize*/ 0,
+ /*Bit8u LinBlueFieldPosition*/ 0,
+ /*Bit8u LinRsvdMaskSize*/ 0,
+ /*Bit8u LinRsvdFieldPosition*/ 0,
+ /*Bit32u MaxPixelClock*/ 0,
+/*} ModeInfoBlock;*/
+ }
+ },
+
+ {
VBE_VESA_MODE_640X400X8,
{
/*typedef struct ModeInfoBlock