Dear List!

We have to design a program which reads data in realtime mode from the
paralleport and interprets these as graphic commands, e.g. draw some
lines or move some bitmaps from point a to b in a given speed (in
fullscreen mode). We want to use a game-programming library to display
the graphics, because of the easy and very fast access (2 and 3D
accelerated) to the graphic card. Itīs very important that the graphics
are immediately printed to the monitor and the data is read permanetly
from the paralleport and both tasks will not be disturbed by any other
processes. 

I started to work with RTLinux to do this job, but I donīt know if
RTLinux is the right choice. I havenīt found a way to start a realtime
thread (or task) from RTLinux which includes code to create some
graphics. Further, the used game-library is normally embeded in a
main-loop which doesnīt exist in a RTLinux program. Iīve modified the
hello.c example from the RTL sources and included some code to
initialize the graphic lib and display a Window (see below for code and
error messages). 

Is it useful to apply  RTL for such a job? Or should we better use other
RT extensions like KURT (if anyone of you have ever heard about it)? 

Thanks, Sven 

+++++++++++++++++++++++++++++++++

modified hello.c. 

#include <rtl.h>
#include <time.h>
#include <pthread.h>

#include "allegro.h"

pthread_t thread;

void * start_routine(void *arg)
{
        struct sched_param p;
        p . sched_priority = 1;
        pthread_setschedparam (pthread_self(), SCHED_FIFO, &p);

        // new code
        allegro_init();
        set_color_depth(16);
        set_gfx_mode(GFX_XWINDOWS, 1024, 768, 0, 0);

        pthread_make_periodic_np (pthread_self(), gethrtime(), 500000000);

        while (1) {
                pthread_wait_np ();
                rtl_printf("I'm here; my arg is %x\n", (unsigned) arg);
        }
        return 0;
                
}


int init_module(void) {
        return pthread_create (&thread, NULL, start_routine, 0);

}

void cleanup_module(void) {
        pthread_delete_np (thread);
}




Loadind this produces following error message:

# insmod hello.o
hello.o: unresolved symbol install_allegro
hello.o: unresolved symbol atexit
hello.o: unresolved symbol set_gfx_mode
hello.o: unresolved symbol set_color_depth
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to