Altera_Forum
Honored Contributor
19 years agoQuastions about Altera Ap372
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 ? }