diff --git a/BESM6/besm6_cpu.c b/BESM6/besm6_cpu.c index 841b20d2..5f60bbd4 100644 --- a/BESM6/besm6_cpu.c +++ b/BESM6/besm6_cpu.c @@ -1694,8 +1694,10 @@ t_stat sim_instr (void) t_stat fast_clk (UNIT * this) { static unsigned counter; + static unsigned tty_counter; ++counter; + ++tty_counter; /*besm6_debug ("*** таймер 20 мсек");*/ GRP |= GRP_TIMER; @@ -1713,6 +1715,14 @@ t_stat fast_clk (UNIT * this) redraw_panel = 1; } + /* Baudot TTYs are synchronised to the main timer rather than the + * serial line clock. Their baud rate is 50. + */ + if (tty_counter == CLK_TPS/50) { + tt_print(); + tty_counter = 0; + } + tmr_poll = sim_rtcn_calb (CLK_TPS, 0); /* calibrate clock */ return sim_activate_after (this, 1000000/CLK_TPS); /* reactivate unit */ } diff --git a/BESM6/besm6_defs.h b/BESM6/besm6_defs.h index 385a0130..52b4ecf2 100644 --- a/BESM6/besm6_defs.h +++ b/BESM6/besm6_defs.h @@ -334,6 +334,7 @@ void printer_hammer (int num, int pos, uint32 mask); void tty_send (uint32 mask); int tty_query (void); void vt_print (void); +void tt_print (void); void vt_receive (void); void consul_print (int num, uint32 cmd); uint32 consul_read (int num); diff --git a/BESM6/besm6_disk.c b/BESM6/besm6_disk.c index 3bb713c6..062a0f07 100644 --- a/BESM6/besm6_disk.c +++ b/BESM6/besm6_disk.c @@ -213,7 +213,9 @@ t_stat disk_attach (UNIT *u, char *cptr) } return SCPE_OK; } - if (saved_switches & SWMASK ('E')) + if (s == SCPE_OK || + (saved_switches & SWMASK ('E')) || + (sim_switches & SWMASK('N'))) return s; sim_switches |= SWMASK ('N'); } diff --git a/BESM6/besm6_tty.c b/BESM6/besm6_tty.c index bc1a9850..515b3452 100644 --- a/BESM6/besm6_tty.c +++ b/BESM6/besm6_tty.c @@ -184,8 +184,6 @@ t_stat vt_clk (UNIT * this) { int num; - /* Baudot TTYs work at 10 baud */ - static int clk_divider = 1<<29; GRP |= MGRP & GRP_SERIAL; /* Polling receiving from sockets */ @@ -195,12 +193,6 @@ t_stat vt_clk (UNIT * this) vt_receive(); consul_receive(); - if (! (clk_divider >>= 1)) { - tt_print(); - /* Input from Baudot TTYs not implemented */ - clk_divider = 1<<29; - } - /* Are there any new network connections? */ num = tmxr_poll_conn (&tty_desc); if (num > 0 && num <= LINES_MAX) { diff --git a/makefile b/makefile index 0b07b7b3..56c3a440 100644 --- a/makefile +++ b/makefile @@ -1175,7 +1175,7 @@ ifneq (,${VIDEO_LDFLAGS}) ifeq (,${FONTFILE}) FONTPATH += /usr/share/fonts /Library/Fonts /usr/lib/jvm /System/Library/Frameworks/JavaVM.framework/Versions FONTPATH := $(dir $(foreach dir,$(strip $(FONTPATH)),$(wildcard $(dir)/.))) - FONTNAME += LucidaSansRegular.ttf FreeSans.ttf + FONTNAME += DejaVuSans.ttf LucidaSansRegular.ttf FreeSans.ttf $(info font paths are: $(FONTPATH)) $(info font names are: $(FONTNAME)) find_fontfile = $(strip $(firstword $(foreach dir,$(strip $(FONTPATH)),$(wildcard $(dir)/$(1))$(wildcard $(dir)/*/$(1))$(wildcard $(dir)/*/*/$(1))$(wildcard $(dir)/*/*/*/$(1)))))