Hi MR Chris

Questions and Comments on All Projects
Mansor
Newbie Pyro
Posts: 12
Joined: Fri Mar 07, 2008 10:21 pm

Hi MR Chris

Postby Mansor » Wed Apr 02, 2008 10:10 am

Thanks very much ,the monitor works but i want to ask you about vga application that ican make it not only test, square ,triangle..........etc
can you help me and suggest to me nice app
thanks too mach :o

ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Postby ThePyroElectro » Wed Apr 02, 2008 10:50 pm

Hey Mansor,

I'm very glad to hear you got it working. Do you think you could e-mail me your code, I'd really like to look through it.

As for other things you can do with the VGA code...It's quite difficult because you're controlling everything at the pixel level and you have little time to alter the video. :(

However there are still some things you can do to make it look dynamic. During the Blanking times you can increment counters so as to move a static object on the screen. This gives the effect that you have something animated on the screen. It's not really super cool but it is something else you can do. :wink:

But overall, you are very limited because of the timing constraints. Are you just displaying the simple objects on your screen right now?

Mansor
Newbie Pyro
Posts: 12
Joined: Fri Mar 07, 2008 10:21 pm

Postby Mansor » Tue Apr 08, 2008 8:24 pm

yes ,, right now i just displayed static shapes , circle , square.. etc
i will send the code to you :D
thanks too much

Mansor
Newbie Pyro
Posts: 12
Joined: Fri Mar 07, 2008 10:21 pm

about screens

Postby Mansor » Sun Apr 20, 2008 12:05 pm

Dear Chris
what is the crt monitor that you worked on?
we worked on (hp hewlett packard) CRT monitor ,,, but we still have problems in it..... so please write to me it's name so as to buy it..

i want also to ask you about making static objects move ,,,, please can you write to me code that shows to me the concept of making movement shapes

thanks for your helping to me
Mansor

ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Postby ThePyroElectro » Mon Apr 21, 2008 7:33 pm

Hey Mansor,

The best I can do for you is describe how you would theoretically do it. When I was working on the vga test box I did very simple things for moving static objects.

The way you implement moving objects is using counters. First you decide how frequently the object should move and by how many pixels. The counter will then determine the location of the static object. The most important part about doing dynamic vga generation is that you always output 480 lines.

So if you want to output a line of height 10 pixels & width 640 pixels that slowly moves down the screen you'd have a line_count variable that keeps track of where the line is and after each movement increment it.

Here is a sudo-code example...

Code: Select all

int line_count=0;

while(1){
    for(int i=0;i<line_count;i++){
      //VGA OUTPUT: Above The Horizontal Line
    }

    for(int i=0; (i => line_count) && (i < (line_count + 10) ); i++){
      //VGA OUTPUT: The 10 Pixel High Horizontal Line
    }

    for(int i=0; (i => (line_count + 10) ) && (line_count < 480); i++){
       //VGA OUTPUT: Below The Horizontal Line
    }
i++;
}


That's the basic method for a simple implementation. You just have to translate it into assembly :P . The incrementing could take place during the vertical blanking time when nothing else is going on.


Return to “Projects”

Who is online

Users browsing this forum: No registered users and 231 guests