From owner-freebsd-emulation Sun Aug 10 13:48:40 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id NAA13809 for emulation-outgoing; Sun, 10 Aug 1997 13:48:40 -0700 (PDT) Received: from atlantis.ping.at (a013.static.Vienna.AT.EU.net [193.154.186.13]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA13802 for ; Sun, 10 Aug 1997 13:48:33 -0700 (PDT) Received: from atlantis (localhost.ping.at [127.0.0.1]) by atlantis.ping.at (8.8.6/8.6.12) with SMTP id WAA00267; Sun, 10 Aug 1997 22:48:23 +0200 (MEST) Message-ID: <33EE2917.41C67EA6@ping.at> Date: Sun, 10 Aug 1997 22:48:23 +0200 From: "Helmut F. Wirth" X-Mailer: Mozilla 3.01Gold (X11; I; FreeBSD 2.2-STABLE i386) MIME-Version: 1.0 To: Jonathan Mini CC: emulation@freebsd.org Subject: Re: Fun with DOSCMD (was Re: modifying boot mgrs FROM FREEBSD) References: <199708090129.PAA08057@pegasus.com> <33EC7977.167EB0E7@ping.at> <19970809235411.04335@micron.efn.org> <33ED7E33.167EB0E7@ping.at> <19970810043000.13645@micron.efn.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Jonathan Mini wrote: > > Mmm. Are you talking VGA emulation here or something else? (pretending to be a > Cirrus Logic 54xx? Being VESA VBE 1.2?) I think we would need VGA emulation only for the true (old) VGA modes, that is the modes with 16 colors, dealing with planes. The 256 color modes and the HiColor and TrueColor modes are pretty simple: The card has to be brought into the mode and then most things take place via a direct write to the frame buffer. The only register accesses in this state are the bank switching, in case of 256 colors the video palette access and for games probably the change to different video buffers, if video memory is big enough and the mode allows it. A program that uses the hardware acceleration capabilities of for example a S3 card would not work this way, and I think under X11 it would not be worth the trouble. If somebody needs use such a program, s/he could use it in console mode without X11. Some sort of VESA emulation could be neccessary, but only the part of it a program needs to inform itself about the cards capabilities. Windows 95 has a SVGA generic driver which works with a lot of cards, including my S3 Virge/VX. This is because as long as you don't try to use the hardware specialities of your S3/Cirrus/Matrox/... most cards are compatible in some basic things. So the emulator would report an ordinary SVGA for all cards under X11 and proceed to emulate the simple capabilities of such a card. > Not for anything but a few video modes. (i.e. text modes and like > 320x200x256) Also, I am leery of letting my DOS app change the state of my > system console's hardware. I don't think this would be a problem: If the original card BIOS is enabled, doscmd could sneak in a call to the BIOS before it terminates and such use the BIOS to restore the cards hardware to the initial (ASCII) state, this is the same state as after a reboot, so the BSD console driver can handle it. XFree also messes with your console and even without BIOS support manages to restore all. The state has to be saved before any DOS application starts and must be restored, when doscmd ends. All things in between are under control of the BIOS, and this is the best 16-bit program one can get for the display hardware. The reason it is not used with XFree is only the problems with the different OSes XFree86 runs on and the problem to bring a VM86 emulation for every of this OSes, solely for the VGA BIOS. -- Helmut F. Wirth Email: hfwirth@ping.at