mirror of
https://github.com/rricharz/Tek4010.git
synced 2026-04-25 03:36:04 +00:00
Made version 1.7 for all systems the standard
This commit is contained in:
BIN
Manual.odt
BIN
Manual.odt
Binary file not shown.
BIN
Manual.pdf
BIN
Manual.pdf
Binary file not shown.
@@ -35,7 +35,8 @@ Dave Ault using tek4010.
|
||||
All instructions can now be found in [Manual.pdf](https://github.com/rricharz/Tek4010/blob/master/Manual.pdf)
|
||||
in the main Tek4010 directory.
|
||||
|
||||
Version 1.8 or above has a much improved handling of the bright drawing spot, but requires also more
|
||||
computer power. See chapter 14 of the manual if tek4010 runs sluggish on your system. This might be the case if
|
||||
you run tek4010 remotely using vnc, or on a Raspberry Pi 3.
|
||||
Version 1.8 or above includes a much improved handling of the bright drawing spot,
|
||||
but requires also much more computer power. See chapter 14 of the manual on how
|
||||
to install it. The standard version installed is 1.7, which works on all
|
||||
Raspberry Pi models.
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
[ ! -d ~/bin ] && mkdir ~/bin
|
||||
|
||||
# copy the file to ~/bin, make it executable
|
||||
cp tek4010 ~/bin
|
||||
cp ../tek4010 ~/bin
|
||||
chmod +x ~/bin/tek4010
|
||||
|
||||
echo "tek4010 version 1.7 installed"
|
||||
echo "tek4010 installed."
|
||||
echo "Reboot if this is the first time tek4010 is installed"
|
||||
@@ -140,8 +140,10 @@ static void do_drawing(cairo_t *cr, GtkWidget *widget)
|
||||
|
||||
cairo_set_source_surface(cr, permanent_surface, windowWidthOffset, windowHeightOffset);
|
||||
cairo_paint(cr);
|
||||
cairo_set_source_surface(cr, temporary_surface, windowWidthOffset, windowHeightOffset);
|
||||
cairo_set_operator(cr, CAIRO_OPERATOR_LIGHTEN);
|
||||
cairo_set_source_surface(cr, temporary_surface, windowWidthOffset, windowHeightOffset);
|
||||
cairo_paint(cr);
|
||||
cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
|
||||
|
||||
cairo_destroy(permanent_cr);
|
||||
cairo_destroy(temporary_cr);
|
||||
14
RPi5/makefile
Normal file
14
RPi5/makefile
Normal file
@@ -0,0 +1,14 @@
|
||||
LIBS = `pkg-config --libs gtk+-3.0`
|
||||
|
||||
CFLAGS = -std=c99 `pkg-config --cflags gtk+-3.0`
|
||||
|
||||
all: ../tek4010
|
||||
|
||||
../tek4010: main.c main.h tube.c tube.h tek4010.c ards.c
|
||||
$(CC) -o ../tek4010 main.c tube.c tek4010.c ards.c $(LIBS) $(CFLAGS)
|
||||
|
||||
install: ../tek4010
|
||||
./install
|
||||
|
||||
clean : ../tek4010
|
||||
-rm -f ../tek4010
|
||||
@@ -28,11 +28,12 @@
|
||||
#define DEBUGMAX 0 // exit after DEBUGMAX chars, 0 means no exit
|
||||
|
||||
#define WRITE_TROUGH_INTENSITY 0.5 // green only
|
||||
#define NORMAL_INTENSITY 0.8
|
||||
#define CURSOR_INTENSITY 0.8
|
||||
#define NORMAL_INTENSITY 0.7
|
||||
#define CURSOR_INTENSITY 0.7
|
||||
#define BRIGHT_SPOT_COLOR 1.0
|
||||
#define BRIGHT_SPOT_COLOR_HALF 0.6
|
||||
#define BLACK_COLOR 0.08 // effect of flood gun
|
||||
#define FADE 0.3 // lower value means slower fading
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
@@ -290,7 +291,7 @@ void tube_init(int argc, char* argv[])
|
||||
char *argv2[20];
|
||||
size_t bufsize = 127;
|
||||
int firstArg = 1;
|
||||
printf("tek4010 version 1.7\n");
|
||||
printf("tek4010 version 1.8\n");
|
||||
windowName = "Tektronix 4010/4014 emulator";
|
||||
if ((argc<2) || (argc>19)) {
|
||||
printf("Error:number of arguments\n");
|
||||
@@ -571,7 +572,7 @@ void tube_clearPersistent(cairo_t *cr, cairo_t *cr2)
|
||||
tube_y2 = tube_y0;
|
||||
leftmargin = 0;
|
||||
cairo_set_source_rgb(cr, 0, NORMAL_INTENSITY, 0);
|
||||
cairo_set_source_rgb(cr2, BRIGHT_SPOT_COLOR, BRIGHT_SPOT_COLOR, BRIGHT_SPOT_COLOR);
|
||||
cairo_set_source_rgb(cr2, 0, BRIGHT_SPOT_COLOR / 2, 0);
|
||||
cairo_paint(cr2);
|
||||
isBrightSpot = 1;
|
||||
plotPointMode = 0;
|
||||
@@ -586,10 +587,11 @@ void tube_clearPersistent(cairo_t *cr, cairo_t *cr2)
|
||||
void tube_clearSecond(cairo_t *cr2)
|
||||
// clear second surface
|
||||
{
|
||||
cairo_set_source_rgba(cr2, 0, 0, 0, 0);
|
||||
cairo_set_operator(cr2, CAIRO_OPERATOR_SOURCE);
|
||||
cairo_set_source_rgba(cr2, 0, 0, 0, FADE);
|
||||
cairo_set_operator(cr2, CAIRO_OPERATOR_MULTIPLY);
|
||||
cairo_paint(cr2);
|
||||
cairo_set_operator(cr2, CAIRO_OPERATOR_OVER);
|
||||
isBrightSpot = 1;
|
||||
}
|
||||
|
||||
void tube_line_type(cairo_t *cr, cairo_t *cr2, enum LineType ln)
|
||||
@@ -783,7 +785,7 @@ void tube_drawCharacter(cairo_t *cr, cairo_t *cr2, char ch)
|
||||
cairo_show_text(cr, s);
|
||||
|
||||
// draw the bright spot
|
||||
cairo_set_source_rgb(cr2, BRIGHT_SPOT_COLOR, BRIGHT_SPOT_COLOR, BRIGHT_SPOT_COLOR);
|
||||
cairo_set_source_rgb(cr2, 0, BRIGHT_SPOT_COLOR, 0);
|
||||
cairo_move_to(cr2, tube_x0, windowHeight - tube_y0 + currentCharacterOffset);
|
||||
cairo_show_text(cr2, s);
|
||||
}
|
||||
@@ -824,7 +826,7 @@ void tube_drawPoint(cairo_t *cr, cairo_t *cr2)
|
||||
cairo_set_line_width (cr2, 0.1);
|
||||
double bsc = (BRIGHT_SPOT_COLOR * intensity) / 100;
|
||||
|
||||
cairo_set_source_rgb(cr2, bsc, bsc, bsc);
|
||||
cairo_set_source_rgb(cr2, 0, bsc, 0);
|
||||
cairo_arc(cr2, tube_x2, windowHeight - tube_y2, 2 + defocussed, 0, PI2);
|
||||
cairo_fill(cr2);
|
||||
|
||||
@@ -875,18 +877,10 @@ void tube_drawVector(cairo_t *cr, cairo_t *cr2)
|
||||
cairo_line_to(cr, tube_x2, windowHeight - tube_y2);
|
||||
cairo_stroke (cr);
|
||||
|
||||
//draw the bright spot, half intensity
|
||||
cairo_set_line_width (cr2, 6 + pensize + 1 * defocussed);
|
||||
double bsc = (BRIGHT_SPOT_COLOR_HALF * intensity) / 100;
|
||||
cairo_set_source_rgb(cr2, bsc, bsc, bsc);
|
||||
cairo_move_to(cr2, tube_x0, windowHeight - tube_y0);
|
||||
cairo_line_to(cr2, tube_x2, windowHeight - tube_y2);
|
||||
cairo_stroke (cr2);
|
||||
|
||||
// draw the bright spot, high intensity
|
||||
cairo_set_line_width (cr2, pensize + 2 + 2 * defocussed);
|
||||
bsc = (BRIGHT_SPOT_COLOR * intensity) / 100;
|
||||
cairo_set_source_rgb(cr2, bsc, bsc, bsc);
|
||||
cairo_set_line_width (cr, (pensize+1) + defocussed);
|
||||
cairo_set_source_rgb(cr2, 0, BRIGHT_SPOT_COLOR, 0);
|
||||
cairo_move_to(cr2, tube_x0, windowHeight - tube_y0);
|
||||
cairo_line_to(cr2, tube_x2, windowHeight - tube_y2);
|
||||
cairo_stroke(cr2);
|
||||
2
makefile
2
makefile
@@ -10,5 +10,5 @@ tek4010: src/main.c src/main.h src/tube.c src/tube.h src/tek4010.c src/ards.c
|
||||
install: tek4010
|
||||
./install
|
||||
|
||||
.PHONY : clean
|
||||
clean: tek4010
|
||||
-rm -f tek4010
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
LIBS = `pkg-config --libs gtk+-3.0`
|
||||
|
||||
CFLAGS = -std=c99 `pkg-config --cflags gtk+-3.0`
|
||||
|
||||
all: tek4010
|
||||
|
||||
tek4010: main.c main.h tube.c tube.h tek4010.c ards.c
|
||||
$(CC) -o tek4010 main.c tube.c tek4010.c ards.c $(LIBS) $(CFLAGS)
|
||||
|
||||
install: tek4010
|
||||
./install
|
||||
|
||||
.PHONY : clean
|
||||
clean :
|
||||
-rm -f tek4010
|
||||
@@ -140,10 +140,8 @@ static void do_drawing(cairo_t *cr, GtkWidget *widget)
|
||||
|
||||
cairo_set_source_surface(cr, permanent_surface, windowWidthOffset, windowHeightOffset);
|
||||
cairo_paint(cr);
|
||||
cairo_set_operator(cr, CAIRO_OPERATOR_LIGHTEN);
|
||||
cairo_set_source_surface(cr, temporary_surface, windowWidthOffset, windowHeightOffset);
|
||||
cairo_set_source_surface(cr, temporary_surface, windowWidthOffset, windowHeightOffset);
|
||||
cairo_paint(cr);
|
||||
cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
|
||||
|
||||
cairo_destroy(permanent_cr);
|
||||
cairo_destroy(temporary_cr);
|
||||
|
||||
30
src/tube.c
30
src/tube.c
@@ -28,12 +28,11 @@
|
||||
#define DEBUGMAX 0 // exit after DEBUGMAX chars, 0 means no exit
|
||||
|
||||
#define WRITE_TROUGH_INTENSITY 0.5 // green only
|
||||
#define NORMAL_INTENSITY 0.7
|
||||
#define CURSOR_INTENSITY 0.7
|
||||
#define NORMAL_INTENSITY 0.8
|
||||
#define CURSOR_INTENSITY 0.8
|
||||
#define BRIGHT_SPOT_COLOR 1.0
|
||||
#define BRIGHT_SPOT_COLOR_HALF 0.6
|
||||
#define BLACK_COLOR 0.08 // effect of flood gun
|
||||
#define FADE 0.3 // lower value means slower fading
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
@@ -291,7 +290,7 @@ void tube_init(int argc, char* argv[])
|
||||
char *argv2[20];
|
||||
size_t bufsize = 127;
|
||||
int firstArg = 1;
|
||||
printf("tek4010 version 1.8\n");
|
||||
printf("tek4010 version 1.7\n");
|
||||
windowName = "Tektronix 4010/4014 emulator";
|
||||
if ((argc<2) || (argc>19)) {
|
||||
printf("Error:number of arguments\n");
|
||||
@@ -572,7 +571,7 @@ void tube_clearPersistent(cairo_t *cr, cairo_t *cr2)
|
||||
tube_y2 = tube_y0;
|
||||
leftmargin = 0;
|
||||
cairo_set_source_rgb(cr, 0, NORMAL_INTENSITY, 0);
|
||||
cairo_set_source_rgb(cr2, 0, BRIGHT_SPOT_COLOR / 2, 0);
|
||||
cairo_set_source_rgb(cr2, BRIGHT_SPOT_COLOR, BRIGHT_SPOT_COLOR, BRIGHT_SPOT_COLOR);
|
||||
cairo_paint(cr2);
|
||||
isBrightSpot = 1;
|
||||
plotPointMode = 0;
|
||||
@@ -587,11 +586,10 @@ void tube_clearPersistent(cairo_t *cr, cairo_t *cr2)
|
||||
void tube_clearSecond(cairo_t *cr2)
|
||||
// clear second surface
|
||||
{
|
||||
cairo_set_source_rgba(cr2, 0, 0, 0, FADE);
|
||||
cairo_set_operator(cr2, CAIRO_OPERATOR_MULTIPLY);
|
||||
cairo_set_source_rgba(cr2, 0, 0, 0, 0);
|
||||
cairo_set_operator(cr2, CAIRO_OPERATOR_SOURCE);
|
||||
cairo_paint(cr2);
|
||||
cairo_set_operator(cr2, CAIRO_OPERATOR_OVER);
|
||||
isBrightSpot = 1;
|
||||
}
|
||||
|
||||
void tube_line_type(cairo_t *cr, cairo_t *cr2, enum LineType ln)
|
||||
@@ -785,7 +783,7 @@ void tube_drawCharacter(cairo_t *cr, cairo_t *cr2, char ch)
|
||||
cairo_show_text(cr, s);
|
||||
|
||||
// draw the bright spot
|
||||
cairo_set_source_rgb(cr2, 0, BRIGHT_SPOT_COLOR, 0);
|
||||
cairo_set_source_rgb(cr2, BRIGHT_SPOT_COLOR, BRIGHT_SPOT_COLOR, BRIGHT_SPOT_COLOR);
|
||||
cairo_move_to(cr2, tube_x0, windowHeight - tube_y0 + currentCharacterOffset);
|
||||
cairo_show_text(cr2, s);
|
||||
}
|
||||
@@ -826,7 +824,7 @@ void tube_drawPoint(cairo_t *cr, cairo_t *cr2)
|
||||
cairo_set_line_width (cr2, 0.1);
|
||||
double bsc = (BRIGHT_SPOT_COLOR * intensity) / 100;
|
||||
|
||||
cairo_set_source_rgb(cr2, 0, bsc, 0);
|
||||
cairo_set_source_rgb(cr2, bsc, bsc, bsc);
|
||||
cairo_arc(cr2, tube_x2, windowHeight - tube_y2, 2 + defocussed, 0, PI2);
|
||||
cairo_fill(cr2);
|
||||
|
||||
@@ -877,10 +875,18 @@ void tube_drawVector(cairo_t *cr, cairo_t *cr2)
|
||||
cairo_line_to(cr, tube_x2, windowHeight - tube_y2);
|
||||
cairo_stroke (cr);
|
||||
|
||||
//draw the bright spot, half intensity
|
||||
cairo_set_line_width (cr2, 6 + pensize + 1 * defocussed);
|
||||
double bsc = (BRIGHT_SPOT_COLOR_HALF * intensity) / 100;
|
||||
cairo_set_source_rgb(cr2, bsc, bsc, bsc);
|
||||
cairo_move_to(cr2, tube_x0, windowHeight - tube_y0);
|
||||
cairo_line_to(cr2, tube_x2, windowHeight - tube_y2);
|
||||
cairo_stroke (cr2);
|
||||
|
||||
// draw the bright spot, high intensity
|
||||
cairo_set_line_width (cr, (pensize+1) + defocussed);
|
||||
cairo_set_source_rgb(cr2, 0, BRIGHT_SPOT_COLOR, 0);
|
||||
cairo_set_line_width (cr2, pensize + 2 + 2 * defocussed);
|
||||
bsc = (BRIGHT_SPOT_COLOR * intensity) / 100;
|
||||
cairo_set_source_rgb(cr2, bsc, bsc, bsc);
|
||||
cairo_move_to(cr2, tube_x0, windowHeight - tube_y0);
|
||||
cairo_line_to(cr2, tube_x2, windowHeight - tube_y2);
|
||||
cairo_stroke(cr2);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
Version 1.8 February 24, 2024
|
||||
=============================
|
||||
Version 1.8 February 24, 2024 for Raspberry Pi 5 8GB only
|
||||
=========================================================
|
||||
Much improved color and fading of the bright spot
|
||||
|
||||
|
||||
Version 1.7 October 18, 2023
|
||||
============================
|
||||
Version 1.7 October 18, 2023 STABLE VERSION FOR ALL SYSTEMS
|
||||
===========================================================
|
||||
Added -wait n seconds as argument, staying alive n seconds after
|
||||
completion.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user