URL
https://opencores.org/ocsvn/eco32/eco32/trunk
Subversion Repositories eco32
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 250 to Rev 251
- ↔ Reverse comparison
Rev 250 → Rev 251
/eco32/trunk/sim/getline/Makefile
2,7 → 2,7
# Makefile for the getline library |
# |
|
CC = gcc -m32 |
CC = gcc |
CFLAGS = -O -DPOSIX |
LDFLAGS = -L. |
LDLIBS = -lgetline |
/eco32/trunk/sim/dspkbd.c
19,7 → 19,7
|
static Bool debug = false; |
static Bool debugKeycode = false; |
static volatile Bool installed = false; |
static Bool volatile installed = false; |
|
|
static void blinkScreen(void); |
49,7 → 49,8
|
|
#define C2B(c,ch) (((((c) & 0xFF) * ch.scale) >> 8) * ch.factor) |
#define RGB2PIXEL(r,g,b) (C2B(r, vga.red) | \ |
#define RGB2PIXEL(r,g,b) (0xFF000000 | \ |
C2B(r, vga.red) | \ |
C2B(g, vga.green) | \ |
C2B(b, vga.blue)) |
|
228,8 → 229,7
vga.shutdown.display = vga.display; |
vga.shutdown.window = vga.win; |
vga.shutdown.message_type = XA_WM_COMMAND; |
vga.shutdown.format = 32; |
vga.shutdown.data.l[0] = 0xDEADBEEF; |
vga.shutdown.format = 8; |
/* say that the graphics controller is installed */ |
XSync(vga.display, False); |
installed = true; |
272,8 → 272,7
break; |
case ClientMessage: |
if (event.xclient.message_type == XA_WM_COMMAND && |
event.xclient.format == 32 && |
event.xclient.data.l[0] == 0xDEADBEEF) { |
event.xclient.format == 8) { |
run = false; |
} |
break; |
297,8 → 296,8
/* refresh timer */ |
|
|
static Bool refreshRunning = false; |
static Bool blink = false; |
static Bool volatile refreshRunning = false; |
static Bool volatile blink = false; |
|
|
static void *refresh(void *ignore) { |
331,25 → 330,21
NULL |
}; |
|
static pthread_t monitorThread; |
static pthread_t refreshThread; |
|
|
static void vgaInit(void) { |
pthread_attr_t attr; |
pthread_t thread; |
|
/* start monitor server in a separate thread */ |
vga.argc = myArgc; |
vga.argv = myArgv; |
pthread_attr_init(&attr); |
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); |
if (pthread_create(&thread, &attr, server, NULL) != 0) { |
if (pthread_create(&monitorThread, NULL, server, NULL) != 0) { |
error("cannot start monitor server"); |
} |
while (!installed) sleep(1); |
while (!installed) ; |
/* start refresh timer in another thread */ |
refreshRunning = true; |
pthread_attr_init(&attr); |
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); |
if (pthread_create(&thread, &attr, refresh, NULL) != 0) { |
if (pthread_create(&refreshThread, NULL, refresh, NULL) != 0) { |
error("cannot start refresh timer"); |
} |
} |
357,10 → 352,10
|
static void vgaExit(void) { |
refreshRunning = false; |
sleep(1); |
pthread_join(refreshThread, NULL); |
XSendEvent(vga.display, vga.win, False, 0, (XEvent *) &vga.shutdown); |
XSync(vga.display, False); |
while (installed) sleep(1); |
pthread_join(monitorThread, NULL); |
} |
|
|
/eco32/trunk/sim/Makefile
4,7 → 4,7
|
BUILD = ../build |
|
CC = gcc -m32 |
CC = gcc |
CFLAGS = -g -Wall -I./getline -I/usr/X11R7/include |
LDFLAGS = -g -L./getline -L/usr/X11R7/lib -Wl,-rpath -Wl,/usr/X11R7/lib |
LDLIBS = -lgetline -lX11 -lpthread -lm |
/eco32/trunk/sim/graph.c
16,7 → 16,7
|
|
static Bool debug = false; |
static volatile Bool installed = false; |
static Bool volatile installed = false; |
|
|
/**************************************************************/ |
40,7 → 40,8
|
|
#define C2B(c,ch) (((((c) & 0xFF) * ch.scale) >> 8) * ch.factor) |
#define RGB2PIXEL(r,g,b) (C2B(r, vga.red) | \ |
#define RGB2PIXEL(r,g,b) (0xFF000000 | \ |
C2B(r, vga.red) | \ |
C2B(g, vga.green) | \ |
C2B(b, vga.blue)) |
|
219,8 → 220,7
vga.shutdown.display = vga.display; |
vga.shutdown.window = vga.win; |
vga.shutdown.message_type = XA_WM_COMMAND; |
vga.shutdown.format = 32; |
vga.shutdown.data.l[0] = 0xDEADBEEF; |
vga.shutdown.format = 8; |
/* say that the graphics controller is installed */ |
XSync(vga.display, False); |
installed = true; |
262,8 → 262,7
break; |
case ClientMessage: |
if (event.xclient.message_type == XA_WM_COMMAND && |
event.xclient.format == 32 && |
event.xclient.data.l[0] == 0xDEADBEEF) { |
event.xclient.format == 8) { |
run = false; |
} |
break; |
281,7 → 280,7
/* refresh timer */ |
|
|
static Bool refreshRunning = false; |
static Bool volatile refreshRunning = false; |
|
|
static void *refresh(void *ignore) { |
309,25 → 308,21
NULL |
}; |
|
static pthread_t monitorThread; |
static pthread_t refreshThread; |
|
|
static void vgaInit(void) { |
pthread_attr_t attr; |
pthread_t thread; |
|
/* start monitor server in a separate thread */ |
vga.argc = myArgc; |
vga.argv = myArgv; |
pthread_attr_init(&attr); |
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); |
if (pthread_create(&thread, &attr, server, NULL) != 0) { |
if (pthread_create(&monitorThread, NULL, server, NULL) != 0) { |
error("cannot start monitor server"); |
} |
while (!installed) sleep(1); |
while (!installed) ; |
/* start refresh timer in another thread */ |
refreshRunning = true; |
pthread_attr_init(&attr); |
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); |
if (pthread_create(&thread, &attr, refresh, NULL) != 0) { |
if (pthread_create(&refreshThread, NULL, refresh, NULL) != 0) { |
error("cannot start refresh timer"); |
} |
} |
335,10 → 330,10
|
static void vgaExit(void) { |
refreshRunning = false; |
sleep(1); |
pthread_join(refreshThread, NULL); |
XSendEvent(vga.display, vga.win, False, 0, (XEvent *) &vga.shutdown); |
XSync(vga.display, False); |
while (installed) sleep(1); |
pthread_join(monitorThread, NULL); |
} |
|
|
/eco32/trunk/TODO
22,6 → 22,7
4. beim dspkbd sollte man auch den alpha-wert bei den pixeln |
angeben. wenn man z.B. compiz verwendet, was das unterstützt, ist sonst |
alles transparent :) |
*** DONE *** |
|
5. die positionierung des fensters von dspkbd mit XCreateWindow |
wird gerne mal vom window-manager ignoriert. daher sollte man am |