mirror of
https://github.com/simh/simh.git
synced 2026-01-25 19:56:25 +00:00
Notes For V3.8
The makefile now works for Linux and most Unix's. However, for Solaris and MacOS, you must first export the OSTYPE environment variable: > export OSTYPE > make Otherwise, you will get build errors. 1. New Features 1.1 3.8-0 1.1.1 SCP and Libraries - BREAK, NOBREAK, and SHOW BREAK with no argument will set, clear, and show (respectively) a breakpoint at the current PC. 1.1.2 GRI - Added support for the GRI-99 processor. 1.1.3 HP2100 - Added support for the BACI terminal interface. - Added support for RTE OS/VMA/EMA, SIGNAL, VIS firmware extensions. 1.1.4 Nova - Added support for 64KW memory (implemented in third-party CPU's). 1.1.5 PDP-11 - Added support for DC11, RC11, KE11A, KG11A. - Added modem control support for DL11. - Added ASCII character support for all 8b devices. 1.2 3.8-1 1.2.1 SCP and libraries - Added capability to set line connection order for terminal multiplexers. 1.2.2 HP2100 - Added support for 12620A/12936A privileged interrupt fence. - Added support for 12792C eight-channel asynchronous multiplexer. 1.3 3.8-2 1.3.1 SCP and libraries - Added line history capability for *nix hosts. - Added "SHOW SHOW" and "SHOW <dev> SHOW" commands. 1.3.2 1401 - Added "no rewind" option to magtape boot. 1.3.3 PDP-11 - Added RD32 support to RQ - Added debug support to RL 1.3.4 PDP-8 - Added FPP support (many thanks to Rick Murphy for debugging the code) 1.3.5 VAX-11/780 - Added AUTORESTART switch support, and VMS REBOOT command support 2. Bugs Fixed Please see the revision history on http://simh.trailing-edge.com or in the source module sim_rev.h.
This commit is contained in:
committed by
Mark Pizzolato
parent
35eac703c3
commit
a9fd3dd518
@@ -1,6 +1,6 @@
|
||||
/* sim_console.c: simulator console I/O library
|
||||
|
||||
Copyright (c) 1993-2008, Robert M Supnik
|
||||
Copyright (c) 1993-2011, Robert M Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -23,6 +23,7 @@
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from Robert M Supnik.
|
||||
|
||||
20-Jan-11 MP Added support for BREAK key on Windows
|
||||
30-Sep-06 RMS Fixed non-printable characters in KSR mode
|
||||
22-Jun-06 RMS Implemented SET/SHOW PCHAR
|
||||
31-May-06 JDB Fixed bug if SET CONSOLE DEBUG with no argument
|
||||
@@ -662,17 +663,42 @@ return SCPE_OK;
|
||||
|
||||
#elif defined (_WIN32)
|
||||
|
||||
#include <conio.h>
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
#include <windows.h>
|
||||
#define RAW_MODE 0
|
||||
static HANDLE std_input;
|
||||
static HANDLE std_output;
|
||||
static DWORD saved_mode;
|
||||
|
||||
|
||||
static BOOL WINAPI
|
||||
ControlHandler(DWORD dwCtrlType)
|
||||
{
|
||||
DWORD Mode;
|
||||
extern void int_handler (int sig);
|
||||
|
||||
switch (dwCtrlType)
|
||||
{
|
||||
case CTRL_BREAK_EVENT: // Use CTRL-Break or CTRL-C to simulate
|
||||
case CTRL_C_EVENT: // SERVICE_CONTROL_STOP in debug mode
|
||||
int_handler(0);
|
||||
return TRUE;
|
||||
case CTRL_CLOSE_EVENT: // Window is Closing
|
||||
case CTRL_LOGOFF_EVENT: // User is logging off
|
||||
if (!GetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), &Mode))
|
||||
return TRUE; // Not our User, so ignore
|
||||
case CTRL_SHUTDOWN_EVENT: // System is shutting down
|
||||
int_handler(0);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
t_stat sim_ttinit (void)
|
||||
{
|
||||
SetConsoleCtrlHandler( ControlHandler, TRUE );
|
||||
std_input = GetStdHandle (STD_INPUT_HANDLE);
|
||||
std_output = GetStdHandle (STD_OUTPUT_HANDLE);
|
||||
if ((std_input == INVALID_HANDLE_VALUE) ||
|
||||
!GetConsoleMode (std_input, &saved_mode))
|
||||
return SCPE_TTYERR;
|
||||
@@ -710,24 +736,49 @@ return SCPE_OK;
|
||||
|
||||
t_stat sim_os_poll_kbd (void)
|
||||
{
|
||||
int c;
|
||||
int c = -1;
|
||||
DWORD nkbevents, nkbevent;
|
||||
INPUT_RECORD rec;
|
||||
extern int32 sim_switches;
|
||||
|
||||
if (!_kbhit ())
|
||||
return SCPE_OK;
|
||||
c = _getch ();
|
||||
if (!GetNumberOfConsoleInputEvents(std_input, &nkbevents))
|
||||
return SCPE_TTYERR;
|
||||
while (c == -1) {
|
||||
if (0 == nkbevents)
|
||||
return SCPE_OK;
|
||||
if (!ReadConsoleInput(std_input, &rec, 1, &nkbevent))
|
||||
return SCPE_TTYERR;
|
||||
if (0 == nkbevent)
|
||||
return SCPE_OK;
|
||||
--nkbevents;
|
||||
if (rec.EventType == KEY_EVENT) {
|
||||
if (rec.Event.KeyEvent.bKeyDown) {
|
||||
if (0 == rec.Event.KeyEvent.uChar.UnicodeChar) { /* Special Character/Keys? */
|
||||
if (rec.Event.KeyEvent.wVirtualKeyCode == VK_PAUSE) /* Pause/Break Key */
|
||||
c = sim_brk_char | SCPE_BREAK;
|
||||
else
|
||||
if (rec.Event.KeyEvent.wVirtualKeyCode == '2') /* ^@ */
|
||||
c = 0; /* return NUL */
|
||||
} else
|
||||
c = rec.Event.KeyEvent.uChar.AsciiChar;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((c & 0177) == sim_del_char)
|
||||
c = 0177;
|
||||
if ((c & 0177) == sim_int_char)
|
||||
return SCPE_STOP;
|
||||
if (sim_brk_char && ((c & 0177) == sim_brk_char))
|
||||
if ((sim_brk_char && ((c & 0177) == sim_brk_char)) || (c & SCPE_BREAK))
|
||||
return SCPE_BREAK;
|
||||
return c | SCPE_KFLAG;
|
||||
}
|
||||
|
||||
t_stat sim_os_putchar (int32 c)
|
||||
{
|
||||
DWORD unused;
|
||||
|
||||
if (c != 0177)
|
||||
_putch (c);
|
||||
WriteConsoleA(std_output, &c, 1, &unused, NULL);
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user