moving window like other os does

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
digo_rp
Member
Member
Posts: 233
Joined: Sun Jun 05, 2005 11:00 pm

moving window like other os does

Post by digo_rp »

I´m trying to move window like others os does " windows, linux "

I set up AGP data rate to 4x and 8x

I´m using memcpy_mmx in my function getimage/putimage

but its slow, anyone has some help ?
Osbios
Member
Member
Posts: 116
Joined: Fri Jun 10, 2005 11:00 pm

Post by Osbios »

Do you know Blitting? I think, even VESA supports Blitting. Its a fast copy of memory blocks (e.g. images) from video ram to video ram.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

write-combining would help too...
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
digo_rp
Member
Member
Posts: 233
Joined: Sun Jun 05, 2005 11:00 pm

some example, please

Post by digo_rp »

does anyone could give some start ?
I don´t have how to look up at google,
some inline, nasm c# statement please
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

Go here : http://alexfru.narod.ru/
And get "My Windows Manager Demo"
Its abit slow, i think there maybe a faster mirror ?
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

Dex wrote:Go here : http://alexfru.narod.ru/
And get "My Windows Manager Demo"
Its abit slow, i think there maybe a faster mirror ?
Hey sure thing :)..
I downloaded it awhile ago so I'll mirror it at rapidshare.com:

Code: Select all

http://rapidshare.com/files/19577291/WinMngrDemo.zip.html
It's only 330K, but Alex's host is painfully slow.. :?
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
maddog39
Posts: 24
Joined: Fri Feb 02, 2007 7:32 pm
Location: New Hampshire, US

Post by maddog39 »

Another really cheapo solution would to try and use inline functions to help boost performance, but probably wouldnt give too much of a boost/difference. I personally know almost nothing about VGA so far, but would like to learn it.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

maddog39 wrote:Another really cheapo solution would to try and use inline functions to help boost performance, but probably wouldnt give too much of a boost/difference. I personally know almost nothing about VGA so far, but would like to learn it.
If you can assume a vga, then you might want to try the old trick of using the latches for video-to-video blits.

Also, i've been peeking around the intel and amd manuals, and reading from an uncached area causes a flush of the write buffers in WC/WT/WP areas: i.e. if you alternate reads and writes you'd get horrible performance: a read forces the write buffers out, before the read is executed, (which is delayed because of that) then the next write loads an write buffer, which is then emitted on the next read. Consequence is: you do not get burst transactions, which will saturate the PCI bus and dramatically slow down processes.
The trick is to align addresses and group as much loads and stores together as you can to get maximum throughput. (You should read the AMD optimization guides for more in-depth info) Alignment is also something worth watching out for...
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

Hmmm... isn't that what "2D acceleration" is about, i.e. shouldn't this be covered by the graphics driver / GPU instead of the CPU? (Haven't delved into graphics myself yet so I don't know for sure...)
Every good solution is obvious once you've found it.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

Hmmm... isn't that what "2D acceleration" is about
Welcome to the world of proprietary hardware :(
Besides, the thread starter never assumed anything other than an AGP framebuffer device. Giving hardware specific info would only help with a limited set of devices.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

Combuster wrote:
Hmmm... isn't that what "2D acceleration" is about
Welcome to the world of proprietary hardware :(
I know... but unfortunately it's reality, isn't it? A generic driver (framebuffer) will always be slow when compared to how Windows / Linux do it, because they both use device-specific drivers.
Every good solution is obvious once you've found it.
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

As a side note, he should be thinking in terms of writing the most optimised wire framed box draw function, the size of the window. As it is quicker to move this around than the whole window, once the mouse button is released or the mouse+button is stopped moving, the win can be draw in the new X Y (with checks for half off screen etc).
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Post by Candy »

Solar wrote:
Combuster wrote:
Hmmm... isn't that what "2D acceleration" is about
Welcome to the world of proprietary hardware :(
I know... but unfortunately it's reality, isn't it? A generic driver (framebuffer) will always be slow when compared to how Windows / Linux do it, because they both use device-specific drivers.
Well.... if you install the ati drivers without shmem compiled in, they're slower than a framebuffer. That's a bit offtopic though.
Post Reply