Go to advanced search

by alexlanzano
Tue Mar 21, 2017 6:45 pm
Forum: Bare metal, Assembly language
Topic: RPI2 framebuffer not displaying fully
Replies: 28
Views: 4487

Re: RPI2 framebuffer not displaying fully

I have a suspicion that the VideoCore isn't allocating enough memory. Right now I'll try to implement the mini-uart to check all that and post what I find. Thanks for all your help by the way.
by alexlanzano
Tue Mar 21, 2017 4:54 am
Forum: Bare metal, Assembly language
Topic: RPI2 framebuffer not displaying fully
Replies: 28
Views: 4487

Re: RPI2 framebuffer not displaying fully

Yeah, it increments the variable before it's used but in terms of a c for loop int i gets set to zero then it checks if it's less than WIDTH, then does the stuff within the for loop, then executes ++i. Supposedly ++i is less instructions than i++. that's why I use it. it makes no difference either w...
by alexlanzano
Tue Mar 21, 2017 4:44 am
Forum: Bare metal, Assembly language
Topic: RPI2 framebuffer not displaying fully
Replies: 28
Views: 4487

Re: RPI2 framebuffer not displaying fully

And WIDTH = 1920
and HEIGHT = 1080
by alexlanzano
Tue Mar 21, 2017 4:41 am
Forum: Bare metal, Assembly language
Topic: RPI2 framebuffer not displaying fully
Replies: 28
Views: 4487

Re: RPI2 framebuffer not displaying fully

Here's when I write to the entire screen for(int y = 0; y < HEIGHT; y++){ for(int x = 0; x < WIDTH; x++){ buffer[(y * pitch) + x ] = color; } } and here are the two lines int y = 0; for(int x = 0; x < WIDTH; ++x) buffer[(y * pitch) + x] = 0xffffff00; y = 2; for(int x = 0; x < WIDTH; ++x) buffer[(y *...
by alexlanzano
Tue Mar 21, 2017 4:28 am
Forum: Bare metal, Assembly language
Topic: RPI2 framebuffer not displaying fully
Replies: 28
Views: 4487

Re: RPI2 framebuffer not displaying fully

Both lines make it across the screen but they aren't separated by one pixel. they seem right on top of each other. When I try to display color to the entire screen it only fills the first few hundred rows with the color then stops abruptly. And I got the align 12 from the baking pi tutorial. and I'v...
by alexlanzano
Tue Mar 21, 2017 3:54 am
Forum: Bare metal, Assembly language
Topic: RPI2 framebuffer not displaying fully
Replies: 28
Views: 4487

Re: RPI2 framebuffer not displaying fully

Man, this is frustrating... So I made those changes and it draws the pixels smoothly on the screen but it only fills roughly the top quarter of the screen.

Is there some sort of config that I'm missing?
by alexlanzano
Tue Mar 21, 2017 3:27 am
Forum: Bare metal, Assembly language
Topic: RPI2 framebuffer not displaying fully
Replies: 28
Views: 4487

Re: RPI2 framebuffer not displaying fully

We seem to making some progress. I omitted the the (DEPTH >>3) and now it's showing horizontal lines. And I apologize for not knowing much about graphics. This is my first experience with this kind of thing.
by alexlanzano
Tue Mar 21, 2017 1:32 am
Forum: Bare metal, Assembly language
Topic: RPI2 framebuffer not displaying fully
Replies: 28
Views: 4487

Re: RPI2 framebuffer not displaying fully

Usually that would be correct. But in the case of the for loop in c it doesn't matter. I just changed it just to be safe and I'm still running into the same problem.
by alexlanzano
Tue Mar 21, 2017 12:16 am
Forum: Bare metal, Assembly language
Topic: RPI2 framebuffer not displaying fully
Replies: 28
Views: 4487

Re: RPI2 framebuffer not displaying fully

Yeah, it seems the problem was with the way I was accessing the pixels. This is what I was doing: for(int y = 0; y < HEIGHT; ++y){ for(int x = 0; x < WIDTH; ++x){ frame_buffer[y+WIDTH + x] = color; } } So I changed it to what you suggested: for(int y = 0; y < HEIGHT; ++y){ for(int x = 0; x < WIDTH; ...
by alexlanzano
Sat Mar 18, 2017 7:32 pm
Forum: Bare metal, Assembly language
Topic: RPI2 framebuffer not displaying fully
Replies: 28
Views: 4487

Re: RPI2 framebuffer not displaying fully

Your order is wrong 1.) Set the screen resolution (Tag: 0x00048003) 2.) Set the Virtual screen resolution to same (Tag: 0x00048004) 3.) Get framebuffer (Tag: 0x00040001) 1920x1080 x 4 bytes = 8,294,400 bytes ... 8Megabytes .. No gigabytes were harmed in the making of this calculation :-) Your scree...
by alexlanzano
Sat Mar 18, 2017 12:17 am
Forum: Bare metal, Assembly language
Topic: RPI2 framebuffer not displaying fully
Replies: 28
Views: 4487

Re: RPI2 framebuffer not displaying fully

here's a snippit from main.c: uint32_t *frame_buffer = frame_buffer_init(WIDTH, HEIGHT, DEPTH); uint32_t *buffer = (uint32_t *)(get_frame_buffer()); uint32_t size = get_frame_buffer_size(); init_screen_buffer(buffer, WIDTH, HEIGHT, DEPTH); for(int y = 0; y < HEIGHT; ++y){ for(int x = 0; x < WIDTH; +...
by alexlanzano
Fri Mar 17, 2017 11:50 pm
Forum: Bare metal, Assembly language
Topic: RPI2 framebuffer not displaying fully
Replies: 28
Views: 4487

RPI2 framebuffer not displaying fully

Hey guys, I'm having trouble getting my RPI2 to display across the screen. I initialize my frame buffer and attempt to set each pixel to white (0xFFFFFFFF) but when I do so it only displays the first few hundred rows being white. It's almost as if I'm running out of ram but I would think with 2gigs ...

Go to advanced search