Which modules are involved when displaying a bitmap?

Hey, guys,

I’m trying to port SDL into a simple operating system, called uCore.

And, I have written the video driver for ucore frame buffer, and added
corresponding support in SDL configuration files. But I found that even
though the program could run, no bitmap was displayed.

The test code is like:

int main( int argc, char* args[] )

//The images
SDL_Surface* hello = NULL;
SDL_Surface* screen = NULL;

//Start SDL
//Set up screen
screen = SDL_SetVideoMode( 640, 480, 32, SDL_SWSURFACE );
//Load image
hello = SDL_LoadBMP( "hello.bmp" );

//Apply image to screen
SDL_BlitSurface( hello, NULL, screen, NULL );
//Update Screen
SDL_Flip( screen );
SDL_Delay( 2000 );

//Free the loaded image
SDL_FreeSurface( hello );
//Quit SDL
return 0;


I wonder which modules are involved when running the test code apart from
video driver?

Thanks a lot!–
Peiyun Hu ???
Department of Computer Science and Technology, Tsinghua University
Beijing, P.R.China
Zip Code: 100084

The virtual memory manager, obviously, would be used all over the place.

SDL_LoadBMP would require the filesystem.
SDL_Delay would typically be implemented using whatever Sleep function the concurrency module provides, although that’s not the only way (I’ve seen the Berkeley Sockets select() function used for the same purpose, and hypothetically one could also use a timer).------------------------
Nate Fries