Date: Wed, 25 Sep 1996 13:19:35 +0930 (CST) From: Michael Smith <msmith@atrad.adelaide.edu.au> To: j_mini@efn.org (Jonathan Mini) Cc: emulation@freebsd.org Subject: Re: New doscmd available for testing/munching Message-ID: <199609250349.NAA07258@genesis.atrad.adelaide.edu.au> In-Reply-To: <Pine.SUN.3.95.960924201603.24560C-100000@garcia.efn.org> from "Jonathan Mini" at Sep 24, 96 08:23:15 pm
next in thread | previous in thread | raw e-mail | index | archive | help
Jonathan Mini stands accused of saying: > > Ummm. I think a new conceptual model is in order... think of doing a > "double blind" system... i.e. : > - In doscmd kernel junk, mmap /dev/mem for video memory > (0xA000-0xBFFF) for use by dos programs witch aren't DOS/BIOS firendly for > video i/o. (that is, almost everyone) Actually, you mmap /dev/vga which roots at the base of video memory. This is much cleaner, not to mention safer. > - In your DOS process, allocate a region in the task's > 0xA000-0xBFFF range for a "simulated video card." For niceity, you could This is the current plan. > - When a processes accesses the video buffer in it's task area, > either cause a flag to be set, or something like that, and update the > "real" video memory... This has several advantages : This is very tough. You don't want to take the penalty for a trap and cycle through the emulator for every write to video memory; the performance hit would be astronomical. The best approach is to schedule a regular update that has a couple of different policies : - for directly-mapped consoles, a blind copy on every update is generally the fastest approach. If you're in a graphic mode then it may be viable to have an interface to the VM that lets you check whether a page has been written and thus skip updating it. The cost for a blind copy of 4K is probably pretty comparable to a system call, but that's something that would have to be tried. - for indirect mappings (X or ncurses modes), compare the current memory aginst the rememebered memory, and redraw the regions that have changed. The compare here is worthwhile, as the penalty for redraws is high. However for performance's sake, we want to be able to have the DOS process directly access the memory on the video card whilst in the foreground, and then be able to switch away from it and have it continue to run and access the backing store. I think that it's possible that madvise() could actually be used for this (reading between the lines of phk's latest malloc announcement), but JD's the one to comment there. > - We can make DOS processes fg abd bg like unix tasks > without messing up the video. This is possible in tty mode, and should be possible in ncurses mode. > Jon Mini, j_mini@efn.org, mini@4j.lane.edu -- ]] Mike Smith, Software Engineer msmith@atrad.adelaide.edu.au [[ ]] Genesis Software genesis@atrad.adelaide.edu.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control (ph/fax) +61-8-267-3039 [[ ]] Collector of old Unix hardware. "Where are your PEZ?" The Tick [[
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609250349.NAA07258>