Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9fa75c01ca |
@@ -14,7 +14,7 @@ If the emulator is run with no options, it prints a usage screen:
|
||||
E:\DEC> tu58em
|
||||
ERROR: no units were specified
|
||||
FATAL: illegal command line
|
||||
tu58 tape emulator v1.4j
|
||||
tu58 tape emulator v1.4k
|
||||
Usage: ./tu58em [-options] -[rwci] file1 ... -[rwci] file7
|
||||
Options: -V | --version output version string
|
||||
-v | --verbose enable verbose output to terminal
|
||||
|
||||
BIN
cygwin1.dll
BIN
cygwin1.dll
Binary file not shown.
4
main.c
4
main.c
@@ -39,6 +39,8 @@
|
||||
// v1.4j - 01 Nov 2014 - donorth - Change 'int' to 'long' where possible.
|
||||
// Only use char/short/long types, not int.
|
||||
// Fix source for ubuntu linux 12.04 (time structs)
|
||||
// v1.4k - 11 Jun 2015 - donorth - Integrate Mark Blair's changes for MacOSX compilation
|
||||
// - No functionality changes on other platforms
|
||||
//
|
||||
|
||||
|
||||
@@ -49,7 +51,7 @@
|
||||
static char copyright[] = "(C) 2005-2014 Don North <ak6dn" "@" "mindspring.com>, " \
|
||||
"(C) 1984 Dan Ts'o <Rockefeller University>";
|
||||
|
||||
static char version[] = "tu58 tape emulator v1.4j";
|
||||
static char version[] = "tu58 tape emulator v1.4k";
|
||||
|
||||
static char port[32] = "1"; // default port number (COM1, /dev/ttyS0)
|
||||
static long speed = 9600; // default line speed
|
||||
|
||||
18
makefile
18
makefile
@@ -2,11 +2,15 @@
|
||||
# tu58em emulator makefile
|
||||
#
|
||||
|
||||
ifeq ($(comm),win)
|
||||
ifeq ($(comm),mac)
|
||||
# UNIX comms model, but on a Mac
|
||||
PROG = tu58em
|
||||
COMM = -UWINCOMM -DMACOSX
|
||||
else ifeq ($(comm),win)
|
||||
# WINDOWS comms model
|
||||
PROG = tu58ew
|
||||
COMM = -DWINCOMM
|
||||
else
|
||||
else # ifeq ($(comm),unix)
|
||||
# UNIX comms model
|
||||
PROG = tu58em
|
||||
COMM = -UWINCOMM
|
||||
@@ -16,7 +20,11 @@ BIN = ../../../../../tools/exe
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -I. -O3 -Wall -c $(COMM)
|
||||
ifeq ($(comm),mac)
|
||||
LFLAGS = -lpthread
|
||||
else
|
||||
LFLAGS = -lpthread -lrt
|
||||
endif
|
||||
|
||||
$(PROG) : main.o tu58drive.o file.o serial.o
|
||||
$(CC) -o $@ main.o tu58drive.o file.o serial.o $(LFLAGS)
|
||||
@@ -27,6 +35,10 @@ all :
|
||||
make --always comm=unix
|
||||
make clean
|
||||
|
||||
mac :
|
||||
make --always comm=mac
|
||||
make --clean
|
||||
|
||||
installall :
|
||||
make --always comm=win install
|
||||
make clean
|
||||
@@ -35,7 +47,7 @@ installall :
|
||||
|
||||
clean :
|
||||
-rm -f *.o
|
||||
-chmod a-x,ug+w,o-w *.c *.h Makefile
|
||||
-chmod a-x,ug+w,o-w *.c *.h makefile
|
||||
-chmod a+rx $(PROG) $(PROG).exe
|
||||
-chown `whoami` *
|
||||
|
||||
|
||||
6
serial.c
6
serial.c
@@ -21,6 +21,12 @@
|
||||
#include <winbase.h>
|
||||
#endif // WINCOMM
|
||||
|
||||
#ifdef MACOSX
|
||||
#define IUCLC 0 // Not POSIX
|
||||
#define OLCUC 0 // Not POSIX
|
||||
#define CBAUD 0 // Not POSIX
|
||||
#endif
|
||||
|
||||
#include <termios.h>
|
||||
|
||||
#define BUFSIZE 256 // size of serial line buffers (bytes, each way)
|
||||
|
||||
18
tu58drive.c
18
tu58drive.c
@@ -20,6 +20,18 @@
|
||||
|
||||
#include "tu58.h"
|
||||
|
||||
#ifdef MACOSX
|
||||
// clock_gettime() is not available under OSX
|
||||
#define CLOCK_REALTIME 1
|
||||
#include <mach/mach_time.h>
|
||||
|
||||
void clock_gettime(int dummy, timespec_t *t) {
|
||||
uint64_t mt;
|
||||
mt = mach_absolute_time();
|
||||
t->tv_sec = mt / 1000000000;
|
||||
t->tv_nsec = mt % 1000000000;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// delays for modeling device access
|
||||
@@ -524,6 +536,12 @@ static void command (int8_t flag)
|
||||
char *name= "none";
|
||||
uint8_t mode = 0;
|
||||
|
||||
// Avoid uninitialized variable warnings
|
||||
time_start.tv_sec = 0;
|
||||
time_start.tv_nsec = 0;
|
||||
time_end.tv_sec = 0;
|
||||
time_end.tv_nsec = 0;
|
||||
|
||||
pk.flag = flag;
|
||||
pk.length = devrxget();
|
||||
|
||||
|
||||
BIN
tu58em.exe
BIN
tu58em.exe
Binary file not shown.
BIN
tu58ew.exe
BIN
tu58ew.exe
Binary file not shown.
Reference in New Issue
Block a user