1
0
mirror of https://github.com/rricharz/Tek4010.git synced 2026-04-13 23:44:51 +00:00

Release 1.5, -fullv option added

This commit is contained in:
Rene Richarz
2019-09-03 09:07:25 +02:00
parent 3f563f2806
commit 5cf9643ca4
6 changed files with 29 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
[![Build Status](https://travis-ci.org/rricharz/Tek4010.svg?branch=master)](https://travis-ci.org/rricharz/Tek4010)
# Tektronix 4010 and 4014 Storage Tube Terminal Emulator (version 1.4)
# Tektronix 4010 and 4014 Storage Tube Terminal Emulator (version 1.5)
This is a [Tektronix 4010, 4013, 4014 and 4015](https://en.wikipedia.org/wiki/Tektronix_4010)
terminal emulator for the Raspberry Pi and other Linux systems.
@@ -313,6 +313,11 @@ tek4010 has the following options:
uses the full resolution of the 4014 with the enhanced graphics module
installed, scaled down to the actual window size. Use ctrl-q to
close the tek4010 window.
-fullv in this mode the tek4010 emulator creates a decorated window
using the maximal vertical space available. The full resolution of
the 4014 with the enhanced graphics module installed is used,
scaled down to the actual window size
-ARDS display ARDS data
@@ -392,10 +397,13 @@ graphics codes can be displayed using this terminal emulator, but the lowest two
each axis are not used in this case, as in the Tektronix 4014 without the enhanced graphics
module.
If called with the -full option, the tek4010 emulator creates creates a full screen window,
and uses the full 4K resolution of the 4014 with enhanced graphics
If called with the -full or -fullv options, the tek4010 emulator uses the full 4K resolution of the 4014 with enhanced graphics
module installed, scaled down to the actual window size.
Use ctrl-q to close the tek4010 window.
You can use ctrl-q to close the tek4010 window.
The BORDER constant in main.h can be used to adjust the space left for the window decoration
and the desktop panel bar.
**Compiling the tek4010 project**

9
main.c
View File

@@ -47,6 +47,7 @@ char *windowName;
static int global_firstcall;
extern int argFull;
extern int argFullV;
extern int argARDS;
static GtkWidget *window;
@@ -290,13 +291,7 @@ int main (int argc, char *argv[])
else {
// DISPLAY DECORATED WINDOW
#define BORDER 64 // we need to make an educated guess here what the window manager will accept
// otherwise we will have a decorated window with wrong aspect ratio
// if BORDER is too small, we end up with small black stripes at the left and right
// if BORDER is too large, the decorated window will be smaller than possible
// with a reasonable size BORDER, both are acceptable
// ideally, one could force the window manager to use a certain aspect ratio
if (askWindowHeight > (screenHeight - BORDER)) {
if (argFullV || (askWindowHeight > (screenHeight - BORDER))) {
askWindowWidth = (int)((double)(screenHeight - BORDER) * aspectRatio);
askWindowHeight = screenHeight - BORDER;
}

7
main.h
View File

@@ -1,6 +1,13 @@
#include <cairo.h>
#define BORDER 80 // we need to make an educated guess to make sure that the full vertical
// space is used if required
// if BORDER is too small, we might end up with a too large window
// if BORDER is too large, the decorated window will be smaller than possible
// with a reasonable size BORDER, both are acceptable
// ideally, one could force the window manager to use a certain aspect ratio
void tube_init(int argc, char* argv[]);
void tek4010_draw(cairo_t *cr, cairo_t *cr2, int first);
void tek4010_clicked(int x, int y);

BIN
tek4010

Binary file not shown.

5
tube.c
View File

@@ -72,6 +72,7 @@ int argRaw = 0;
int argBaud = 19200;
int argTab1 = 0;
int argFull = 0;
int argFullV = 0;
int argARDS = 0;
int argAPL = 0;
int argAutoClear = 0;
@@ -280,7 +281,7 @@ void tube_init(int argc, char* argv[])
char *argv2[20];
size_t bufsize = 127;
int firstArg = 1;
printf("tek4010 version 1.4.4\n");
printf("tek4010 version 1.5\n");
windowName = "Tektronix 4010/4014 emulator";
if ((argc<2) || (argc>19)) {
printf("Error:number of arguments\n");
@@ -314,6 +315,8 @@ void tube_init(int argc, char* argv[])
argTab1 = 1;
else if (strcmp(argv[firstArg],"-full") == 0)
argFull = 1;
else if (strcmp(argv[firstArg],"-fullv") == 0)
argFullV = 1;
else if (strcmp(argv[firstArg],"-autoClear") == 0)
argAutoClear = 1;
else if (strcmp(argv[firstArg],"-keepsize") == 0)

View File

@@ -1,3 +1,7 @@
Version 1.5 of September 3
==========================
- Added -fullv option to maximize vertical window size
Version 1.4.4 August 20, 2019
=============================
- Added description on how to connect to the host using a serial connection