TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: All
from: Joel Downer
date: 1994-06-14 11:00:00
subject: Video Optimization?

Hi, folks!

I'm in the process of porting a DOS door to OS/2, and I could really use
some advice.  I've got the serial I/O code and the multithreaded input
done (not without a little agony here and there), and strangely enough,
the element I'm having the most trouble with is the text-mode video.

What I need for my application is an API that gives me a high degree of
control over the display -- so that, for example, I can emulate an ANSI
file to the screen while maintaining the sysop status bar -- without a
big sacrifice in performance.  The VIO16 API seems to do great on
requirement #1, but very poorly on requirement #2 -- at least the way
I'm using it, it seems to be a real dog. :-(

Originally, I was working with the text-windowing libraries included
with the BC-OS/2 1.5 compiler.  Performance was genuinely pathetic:  my
emulator (which is reasonably tightly coded) was taking 4-5 times as
long to display an ANSI as the TYPE command from the OS/2 command
prompt.  The screen would take as long to paint in local mode as it
would with my DOS version over a 9600bps MNP modem.

I've made some improvements by rearranging my code to do more string
output and less character output, but I'm still not running nearly as
fast as I'd like.  Ironically, the DOS version of my program gets better
video performance running under a VDM than my native OS/2 program does
on the same machine.  I have to imagine that there's a better way.

I've tried various theories.  My first idea was that the slow
performance resulted from the overhead of repeated calls to the VIO API
(especially because the calls, if I understand, involve thunking).  I
converted my code over to use VioWrtCellStr rather than multiple calls
to VioWrtCharStrAtt, but this conversion didn't make a noticeable
difference.

Any hints?  I understand that I'm not dealing with DOS here, and that I
shouldn't expect to be able to write directly to video memory, but I
assume there has to be *some way* that I can get performance comparable
to what my DOS program is getting in VDM's.

Thanks in advance!

Joel

 * OLX 2.1 TD * Coding is to debugging as sex is to raising children.


--- WM v3.10/92-0488


* Origin: The Dreaming City, La Mesa, Ca (1:202/704)
SEEN-BY: 54/54 620/243 632/348 640/820 690/660 711/409 413 430 807 808 809
SEEN-BY: 711/934 712/353 623 713/888 800/1 2442/0
@PATH: 202/704 701 1 209/720 209 396/1 3615/50 229/2 2442/0
@PATH: 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.