Forum Discussion
Altera_Forum
Honored Contributor
19 years ago --- Quote Start --- originally posted by alexs@Apr 7 2006, 12:33 AM hi everybody http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/smile.gif
i want to do my new board based on reference design auto_graphics_ref_design-v1.0.4
and i found to many c files in design and it's dificault to understand all software design http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/sad.gif
i just want to do my custom animation with two video pages where i move triangle and i don't understand how to do it correct without blinking.
maybe someone have an experience with this ref design - help me please to make first steps.
here is my program - it work but i not understant a too many strings.
void my_main()
{
point quad[4];
alt_u32 i, j, x1, y1, x2, y2;
alt_32 rects[8] = {80, 160, 240, 320, 400, 480, 560, 640};
alt_32 num_objects = 500;
printf("my triangle\n\n");
if ((bmpfile = fopen("/mnt/rozipfs/backdrop.bmp","rb")) == null) {
printf("unable to open backdrop.bmp\n");
return ;
}
bmpto565(bmpfile, framebuffer3); // why i don't see any pictute ?
// clear frame buffers
vga_paint_screen_8bit(p_trans, framebuffer11);
//////////////////////////////
lcd_sync();
// set up dma for layer 2 from frame buffer 11
lcddodma8(2, framebuffer11, screensize, 0x2f);
lcd.const_alpha2 = 0x3f;
// set up dma for layer 3 from frame buffer 12
lcddodma8(4, framebuffer12, screensize, 0x3f);
lcd_sync();
// enable dma and turn on layers
lcdlayers(0x04);
// i copy this strings from sources and i don't understand what they mean - can some one to write comments ?
//////////////////////////////
quad[0].x = 10;
quad[0].y = 10;
quad[1].x = 100;
quad[1].y = 10;
quad[2].x = 150;
quad[2].y = 100;
quad[3].x = 0;
quad[3].y = 0;
for (i=0;i<512;i++)
{
quad[0].x = i;
quad[0].y = i;
quad[1].x = 100;
quad[1].y = 10;
quad[2].x = 150;
quad[2].y = 100;
lcd_sync();
vga_draw_polygon_8bit(quad, 3, 1, p_green, do_fill, framebuffer11);
//here i draw triangle but how to draw it with 2 videopages mechansim ?
}
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14116)
--- quote end ---
--- Quote End --- could you tell me .. when you use this reference design , the picture is normal ? I use this reference design, there is some green mask to cover the picture.. do you have this problem?