Bona Fide OS Development

VGA VESA Screen Updates
Page 1 of 2

Author:  Terry A. Davis [ Wed Jan 20, 2010 8:27 am ]
Post subject:  VGA VESA Screen Updates

I have some advice -- you might want to test your graphics system with full-screen 60fps updates (calculated, not multimedia) before you get too carried-away with high resolutions and colors. If you're not using graphic acceleration, you might discover you don't have the CPU power.

I stick to 640x480 16 color mode because I find it challenging doing full screen, 60 fps games with what I have.

I do something unusual, too -- I don't bother with "invalidate rectangle" code, I just update everything.

Think about this: Cutting CPU usage from 40% to 10% accomplishes nothing noticable to the user, whereas 120% to 90% is noticable. In otherwords, look at worst case -- full screen, 60 fps games. If that's the worst case, it's obvious there's no reason to bother with nasty, ugly invalidate rectangle code -- just update everything!

Author:  smeezekitty [ Fri Feb 05, 2010 1:49 pm ]
Post subject:  Re: VGA VESA Screen Updates

Very true although there is not alot of speed differene of 640x480 vs. 800x600 yet the visual difference is big.

Author:  Terry A. Davis [ Fri Feb 05, 2010 7:55 pm ]
Post subject:  Re: VGA VESA Screen Updates

Yeah. Several years ago, I ran 800x600 x 16 color. Then I got a new machine and it didn't support that mode! It supports 800x600 x 256 colors, though. That was a wake-up-call on the usage of different modes. I just want one mode for everybody and the only one that is probably universal is 640x480 x 16 color. It's not hard running my operating system with 800x600 x 16 color, but 256 color is a major job.

Anyway, you are right that 800x600 is not much more to update.

Author:  DudeOfX [ Fri Feb 05, 2010 8:06 pm ]
Post subject:  Re: VGA VESA Screen Updates

on a 386sx I've been able to make smooth windows GUI with rectangling... I have an idea how to make non-rectangular windows using more sophisticated rectangling... updating everything is very wasteful... if you think about it 640x480x24bit is aprox 1MB... pumping that much 60 times a sec is 55MB if you do 4bit color you are still pumping 9MB per second... not to mention overdraw...

permutating thru dirty rectangles is much more efficient...

Author:  Terry A. Davis [ Sat Feb 06, 2010 12:56 am ]
Post subject:  Re: VGA VESA Screen Updates

What about full screen video games, 60fps? Rectangles make it worse than doing everything. For my operating system, I am selling simplicity and it's definitely the way to go.

Technically, I keep an image of the screen in regular memory and only post what's changed to the actual VGA, since VGA memory is slow.

You are correct that on old hardware you can't get by without rectangling, but you can't do full screen games either. You missed the point, didn't you?

Author:  DudeOfX [ Sat Feb 06, 2010 10:07 am ]
Post subject:  Re: VGA VESA Screen Updates

well my point is that you can get away with better performance by doing some processing as to whats visible and some clipping...

say that computing a decision costs 12 KiloCycles but on average saves you 1 MegaCycles then it becomes a good decision to make 60 times every second...

Author:  Terry A. Davis [ Sat Feb 06, 2010 1:37 pm ]
Post subject:  Re: VGA VESA Screen Updates

I did for the clean code. None of that crap complicating it. I love how clean my code is.

Unused resources are wasted resources. Some people's operating system's only advantage is it works on pathetic hardware. To compete, you must find innovative uses for modern resources. You think anyone cares if my file is 5Meg instead of 1 Meg? If I tried, I could get it to one Meg. Would I get a cookie?

I'm hoping people will enjoy my nice clean, simple code, as opposed to the monstricity that Linux is. How many kids are excited by "open source" and have their hopes dashed when they can't understand it?

My idea is to use modern CPU power to simplify graphics by doing full updates all the time.

You can do what you like. You probably want high res and video games that run at 5fps.

Author:  DudeOfX [ Sat Feb 06, 2010 7:03 pm ]
Post subject:  Re: VGA VESA Screen Updates

clean code is nice... I like clean code... I do...

at the same time I am the kind of guy who appreciates the vast amounts of CPU power a Pentium III delivers because I am the kind of guy who knows what a 386sx 16MHz is capable of doing and I am the kind of guy that sees an 8 core P4 with 2 GB of ram as a super computer... because I know that such a computer is well over 200 times as fast as a 386sx and therefore I expect that much more from it... and I also know that Windows and Linux is bloated because people are spoiled with fast cheap hardware and therefore are oblivious of the amount of fat and wasted cycles their CPU deals with...

Author:  Terry A. Davis [ Sun Feb 07, 2010 2:01 pm ]
Post subject:  Re: VGA VESA Screen Updates

I own a core i7. I is that a sin? :shock: :twisted:

? I don't know what to say.

Author:  Love4Boobies [ Sun Feb 21, 2010 9:45 pm ]
Post subject:  Re: VGA VESA Screen Updates

Ahem. I'm back (for the time being)...

First of all, VGA != VESA (or specifically, VBE/Core, which I think you're all talking about). VBE won't even work with VGA cards since it is aimed at the non-standard SVGA. Secondly, no one in their right mind would use VBE/Core (nor VBE/AF for that matter) unless they had no other choice - video card manufacturers have started releasing the specifications for their chipsets so you can get cracking on writing device drivers, at least for the most popular ones. Or, you could use the UDI (Uniform Driver Interface) and use UDI graphics drivers that other people have written. (I've been working with several people, including some of the original core UDI developers to create new metalanguages for UDI and perhaps even UDI 2.0 - I can give a summary of my notes; if anyone is interested, they should PM me.)

It's also worth mentioning that the FPS won't increase drastically with a fancy CPU. VBE/Core is coded in firmware (some very early examples even in software - ugh), and it's not even re-entrant code. It's slow and not accelerated in any way. The least you can do when using VBE/Core is use a linear framebuffer instead of bank switching - that will give a significant performance improvement.


Page 1 of 2 All times are UTC - 6 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group