[Oberon] Native Oberon in 800x600 using SVGA BIOS mode 6A

Paul Reed paulreed at paddedcell.com
Fri Nov 14 15:20:41 CET 2003


Apologies if somewhere this has already been done, but I've
been trying to get Native Oberon working on non-compliant :)
hardware.  And sorry if people find this a bit "old hat".

I usually end up in VGA 640x480 mode because a lot of old video 
cards only support VESA 1.2 (no linear frame buffer interface).

Or, more recently I have found a VESA 3.0 BIOS which only supports
banked, not linear, modes (Intel 815).  I guess because of the
shared memory scheme (stealing main memory for the frame buffer).

[ By the way, the Init string for VESA 2.0 does not check bit 7 of 
the mode attribute (offset 0 in the buffer returned by int 10h,
ax=4F01h) to see if a linear frame buffer is available, before
getting the frame buffer address (from offset 28h).  Although 
there's not much it can do if the linear mode is not supported,
returning a NIL pointer could be checked... Pieter?]

So, in the absence of a linear framebuffer accessible from
protected mode, we are limited to modes which have a framebuffer
available at segment A000 and are less than 64K.

Back in the mists of time, some bright spark realised that in the 
4-plane planar mode used by VGA, you can actually have 800x600 in 
less than 64K (because the planar mode accesses the 4 planes 
separately, you end up with 1 bit per pixel, or 100 bytes per scan 
line, therefore 60000 bytes of buffer).  Remember the 64K segment 
limit in real mode?  Hmmm, I'm feeling old now... :)

This mode is accessible on most SVGA cards as mode 6Ah (as opposed
to normal VGA graphics mode 12h), so I offer the following patch
(summarised) to anyone struggling in VGA 640x480 (it may only
be me!).  Note that other modes may be supported as well, but
mode 6A seems to be the only one which is consistent amongst
a wide range of cards, old and new.  I think this is because
Windows 3.1 uses it... :)

Pieter, if you feel inclined, how about an Oberon1.dsk with this
driver as the default in the bootable install disk?  That would 
be really nice!  I had a look for instructions for how to do this 
from the build/ directory in Alpha/, but I can't find them.  Is 
this documented somewhere?

Steps to 800x600 heaven:

0. Install Native using VGA 640x480 driver
1. Backup.ReadFiles SOURCE1.ARC ~ (downloaded and copied to a floppy,
   skip if you can get it with Native's FTP)
2. CompressTool.Extract SOURCE1.ARC VGA.Display.Mod SVGA.Display.Mod ~
3. Copy procedures StrToInt and GetVal from SVGA.Display.Mod to
VGA.Display.Mod
4. Change VGA.Display.Mod body to use parameterised Width and Height
   (Width := SHORT(GetVal("DWidth", 640)); similar for Height)
5. Fix about 8 bugs in CopyBlock (width3 instead of 80, search for ",
80")
   (e.g. MOV ESI,width3  SUB start[EBP],ESI  SUB end[EBP],ESI)
6. Store, Compile, and fix typos :)
7. Reboot, hold shift down, change config string to Display= (i.e.
blank)
8. Check still works in 640x480
9. Reboot, hold shift down, set new res and mode, and write
   (Display=, DWidth=800, DHeight=600, Init=b86a00cd10 and w)
10. Enjoy 172800 more pixels!

Paul Reed



More information about the Oberon mailing list