[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bochs-dev
Subject:    Re: [Bochs-developers] Re: DISPI protocols and 32bpp
From:       Olivier Reubens <OReubens () Skynet ! be>
Date:       2003-06-23 20:22:34
[Download RAW message or body]

>I plan to add support for blending and transparency, and perhaps some
>pattern fills.  I've never really used pattern fills very much, tho, so
>I will need some suggestions about what to support.  
Pattern fills (in windows) are pretty basic.  You have a 8x8 bitmask
which gets drawn in Fore/back colors. then you just fill with the
pattern instead of a regular fill of 0xFF.  But.. see further...

>As for blending
>modes, I will probably have COPY, XOR, OR, AND, NOT, and ALPHA modes for
>writing.  
For blits supporting ROP4 directly would have most impact (but this is
somewhat tricky), although basic operations like AND NOT OR XOR will
already help Windows do part of the job using accelerated features.
Fully supporting ROP's should seriously increase the speed any icons
cursors, rects etc get  
Sidenote: if you have full support for blit + ROP4, windows will use
that for rect fills automatically (including patterns) :-) unless you
have even more specific support for those directly.

For lines adding ROP2 will have an impact as well.

I really suggest putting your effort there first before going to try
and accellerate anything else (but who am I :)).  blit+ROP4 and
lines+ROP2 are the 90% impact here, optimising anything else will have
considerably less overall impact (although it might help performance
in very specific applications).

I don't know how GUI's in other OSes work at low level, but I expect
the impact will be similar.  Adding that acceleration to the bochs VGA
emulation should allow others to make an accelerated driver for use
under linux, bsd, whatever...

>At the very least I will support the Alpha byte in the ARGB
>pixel for blending between colors in 32bpp mode.  The accelerations are
>present in 8bpp mode and 32bpp mode, but I don't plan to support
>blending in anything less than the 32bpp mode.
Windows doesn't natively use the blend byte in ARGB modes.  Unless you
want to go support some advanced DirectX stuff (which requires other
support in the driver), it's not going to make any impact for regular
Windows operation (again, unless you have apps making specific use of
this).
I'm not sure how the alpha channel for desktop XP is supported in the
video driver though... I'm a bit behind with catching up on that :-)  


>My questions are:  (1) how to I access the "main memory" of the pc
>system from the VGA card? 
Reading and writing memory goes through BX_MEM_READ_PHYSICAL &
BX_MEM_WRITE_PHYSICAL macro's (see bochs.h) 
(can any of the more experienced bochs users confirm/correct this
statement).

>(2) if I simply add a c++ file to the
>directory where vga.cc and win32.cc are, will it get picked up? (3) Do
>all platforms support xRGB canvases?  I plan on implementing the alpha
>and blending in software, so it doesn't matter if the platform ignores
>the MSB of the pixel.  
Not all OSes support native xRGB canvases, but if VGA has an aRGB
canvas it can always very easily and quickly be converted down to
whatever format the OS supports.  I shouldn't worry about this.
You really can't expect much anyway if someone wants to run a Windows
truecolor desktop on a 16 color GUI OS :-)



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
bochs-developers mailing list
bochs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bochs-developers

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic