Commit graph

2860 commits

Author SHA1 Message Date
Mark Pizzolato
fed2f126b1 I1620: Assure consistency of 1DIG/2DIG setting 2017-06-03 12:16:13 -07:00
Mark Pizzolato
8baac06f7f TAPE: Fix potential race (Coverity) 2017-06-03 08:56:51 -07:00
Mark Pizzolato
fae6a18835 TAPE: Update tape gap support (Dave Bryan)
With this update, the erase gap operation has been split out of
"sim_tape_wrgap" into a separate, internal "tape_erase_fwd" routine that
is called from "sim_tape_wrgap" as well as from the new "sim_tape_errecf"
routine.  There's a corresponding internal "tape_erase_rev" that's called
from the new "sim_tape_errecr" routine.

I've shimmed "sim_tape_rdlntf" and "sim_tape_rdlntr" to move the tape
context and debug stuff out of the routines that I'm maintaining.  This
will allow me to replace those functions in their entirety with the
corresponding functions in my development sources for future updates.
It also allows me to keep Bob's version in sync.  As my routines are static
and only called once from the shims, compilers should optimize away
the function calls and instead inline the code, so there'd be no extra call
overhead.

I'd also like to keep "tape_erase_fwd" and "tape_erase_rev" untouched for
the same reason.  If you wish to add debug calls to "sim_tape_errecf" and
"sim_tape_errecr", that's fine.
2017-06-02 00:54:13 -07:00
Mark Pizzolato
54993732dd TIMER: Properly queue all clocks when returning from sim_instr()
as reported in #460
2017-05-29 23:12:37 -07:00
Mark Pizzolato
197bca5fdd IBM1130: Add necessary parenthesis to conditional expression (Coverity) 2017-05-29 21:19:05 -07:00
Bob Supnik
a750171c30 I1620: Add deferred IO mode for slow devices
The major change is the implementation of deferred IO - a more
accurate implementation of the 1620's "stop in its tracks" IO model.
When a device uses deferred IO, instruction execution is suspended
until the IO completes successfully. Operator interruptions, errors,
and so on do not return to instruction execution; this only occurs if
the IO completes successfully or the command SET CPU RELEASE is given
(equivalent of pressing the RELEASE button). Otherwise, the current IO
operation continues to execute.

Only the console typewriter and paper tape reader/punch currently
implement deferred IO; there are operational issues with those devices
that require more accurate modeling. The card reader/punch, line
printer, and disk still execute IO "instantaneously". It's not all
that hard to convert an instantaneous device to deferred operation,
but there's no point in doing so (and possibly introducing new bugs)
unless there's an actual operational issue. The 1620 doesn't have
overlapped IO, so programs can't tell the difference, by and large.

A number of other issues have been addressed as well, including the
bizarre "treat RM as 0 in the Q field" required by MI-015; the
treatment of non-existent indicators as always off; and various other
tweaks.

I've run CU01 (again), which at least gives typewriter and paper-tape
IO a basic workout; and it works. I leave more detailed testing to
people who know the machine better than I do.

The documentation has been updated to include Tom's detailed breakdown
of IO handling for all IO operations on the typewriter, paper-tape
reader/punch, card reader/punch, and line printer.
2017-05-29 13:34:55 -07:00
Mark Pizzolato
df627b0cb1 SCP: Cleanup output produced by SHOW CONSOLE command 2017-05-27 20:25:50 -07:00
Bob Supnik
4053a6f481 alpha: Fixed reversed definitions in opcode 12 (shifts)
It turns out that the two reversed opcodes Maurice identified were not the
only problems in opcode 12 (shifts). All of the INS/EXT pairs at function
codes .57 and above were reversed. In addition, the mnemonics in the
opcode table in alpha_sys.c are wrong as well as reversed.
2017-05-27 14:30:05 -07:00
Mark Pizzolato
86b8a7d5c1 IBM1130: Avoid focus change to the command window when using a telnet console
as discussed in #467
2017-05-27 01:16:02 -07:00
Mark Pizzolato
930e497ee9 IBM1130: Properly sync GUI info at startup
as discussed in #453
2017-05-24 19:10:54 -07:00
Mark Pizzolato
99e833f9c0 IBM1130: GUI support for alternate disk booting (James Fehlinger)
as discussed in #452 and #453
2017-05-24 13:00:57 -07:00
Mark Pizzolato
85deff82ec IBM1130: Set PLOT device disabled when plot support isn't available 2017-05-24 10:18:11 -07:00
Mark Pizzolato
089740a0c5 IBM1130: Fix GUI POWER and RESET buttons to properly synch with main thread
as reported in #451
2017-05-22 11:18:20 -07:00
Bob Supnik
e086f5eb17 I1620: Update doc to reflect recent changes 2017-05-22 10:12:07 -07:00
Mark Pizzolato
83d414d6e6 IBM1130: Fix missing x64 GUI declaration
As discussed in #465
2017-05-22 10:06:51 -07:00
Mark Pizzolato
73a058a904 IBM1130: Allow 32bit and 64bit build of GUI (Jim Fehlinger)
as discussed in #465
2017-05-21 21:59:51 -07:00
Mark Pizzolato
c4c8043215 I1620: Update various CPU issues
- Changed to commit PC on certain stops
- Added SET CPU RELEASE command
- Undefined indicators don't throw an error (Dave Wise)
- Added Model I mode to allow record marks in adds (Dave Wise)
- Allowed undocumented indicator 8 (Dave Wise)
- Added option for Model I diagnostic mode (Dave Wise)

# Conflicts:
#	I1620/i1620_cpu.c
2017-05-21 21:47:30 -07:00
Bob Supnik
d72ab3ce51 I1620: Input processing cleanup - backspace, tabs, WRU
- Fixed keyboard interrupt problem for Linux
- Added input backspace for Model II
- Revised tab calculation algorithm
2017-05-21 21:40:01 -07:00
Bob Supnik
ec9c746ca7 I1620: Changed fprint_val to handle undefined opcodes on stops 2017-05-21 21:39:10 -07:00
Bob Supnik
2d46b5361f I1620: Separated EOF error from other IO errors (Dave Wise) 2017-05-21 21:36:54 -07:00
Mark Pizzolato
a9cd426701 IBM1130: Change position, color, text of buttons to match real 1130
as discussed in #459 by  James Fehlinger
2017-05-18 23:56:18 -07:00
Mark Pizzolato
b0850673ce IBM1130: Clarify prompts to handle incorrect file drops into GUI 2017-05-18 13:14:56 -07:00
Bob Supnik
a7216dbbd1 All VAX: Added model-specific AST validation test
From page 6-6 of DEC STD 032 (the VAX architecture spec):
"Execution of MTPR src, #PR$_ASTLVL with src<31:0> GEQU 5 results in
UNDEFINED behavior. The preferred implementation is to cause a reserved
operand fault." MicroVAX II, CVAX, and Rigel all conform to the preferred
behavior, as does the current simulator, which was written from the CVAX
microcode. NVAX masks to 3b and does not take an exception on a value
GEQU 5.

The 1982 Architecture Handbook describes ASTLVL as a 3b register, with
src<31:3> ignored/read as zero, and exceptions taken on values GEQU 5.
The780 microcode masks the input value to 3b before doing the GEQU 5 test.

The ASTLVL test needs to be model specific.

I suspect the behavior became undefined when MicroVAX II simplified the
original test to save a microword. I do not see how the code fragment Matt
references could work on a MicroVAX II, which was supported under 4.5.
Perhaps the device Matt mentions couldn't exist on a MicroVAX II?

For those who wants the gory details... uVAX, CVAX, and Rigel do an
unsigned compare on the unmasked src and the constant 5. Carry out
means reserved operand. Overflow is ignored. So an input of 0x80000002 -
0x00000005 (done in the data path as 0x80000002 + 0xFFFFFFFB) generates overflow (ignored) and carry out.

# Conflicts:
#	VAX/vaxmod_defs.h
2017-05-18 12:45:21 -07:00
Mark Pizzolato
1cf4f7795a IBM1130: more robust detection of SCP command files dropped into GUI
as discussed in #456
2017-05-17 09:22:38 -07:00
Mark Pizzolato
d9cc6636d4 IBM1130: Add SCP command file auto detect for files dropped into GUI
as discussed in #456
2017-05-16 12:57:40 -07:00
Mark Pizzolato
50ee79734a IBM1130: Force update of GUI prior to reading commands
This gets changed state displayed in GUI for register updates, etc..

as mentioned in #453 point 1.
2017-05-15 21:00:35 -07:00
Mark Pizzolato
6c39b3a263 IBM1130: Change disk device labels to reflect correct drive numbers
as discussed in #455
2017-05-15 19:32:30 -07:00
Mark Pizzolato
b8f6dfaf9e IBM1130: Make sure GUI Card Reader doesn't change while simulator is running
as discussed in #454
2017-05-15 19:04:36 -07:00
Mark Pizzolato
22efe75883 IBM1130: Move focus to console input window after all GUI button presses
As discussed in #450
2017-05-15 14:57:43 -07:00
Mark Pizzolato
e0a45f9af9 IBM1130: Fix non-windows build 2017-05-15 10:49:37 -07:00
Mark Pizzolato
17c56a0c88 IBM1130: Bring focus to the SCP window at appropriate times with GUI console
As suggested by Jim Fehlinger in #450
2017-05-15 07:29:10 -07:00
Mark Pizzolato
fee3e81208 IBM1130: Disallow printer 'paper' removal with simulator running
As reported in #449
2017-05-14 18:49:34 -07:00
Mark Pizzolato
4df0a9fb1e IBM1130: Properly serialize commands and waiting for command completion
As reported in #448
2017-05-14 06:16:28 -07:00
Mark Pizzolato
5917787c53 IBM1130: Fix plot compile issues when plot device is enabled 2017-05-12 07:52:32 -07:00
Mark Pizzolato
ab4ee75961 IBM1130: Give notepad a chance to open its file before proceeding 2017-05-12 06:21:49 -07:00
Mark Pizzolato
d0bd4fbdff TMXR: Enforce output rate limiting when output is produced by instructions
Calls to tmxr_putc_ln() executed directly within instruction simulation code
(as opposed to during event servicing) will delay reasonable times
2017-05-11 08:42:31 -07:00
Mark Pizzolato
1e8af71081 TIMER: Clarify throttling behavior displayed in SHOW for I/T mode 2017-05-11 08:33:39 -07:00
Mark Pizzolato
85c27bb099 TIMER: Fix typo in a comment text 2017-05-09 20:05:11 -07:00
Mark Pizzolato
b9c9c9ea17 SCP: Allow for locally provided strlcpy and strlcat macros
As indicated in #445
2017-05-09 19:27:43 -07:00
Mark Pizzolato
cb7c739b15 SCP: Add file exist test to IF command 2017-05-09 00:21:48 -07:00
Mark Pizzolato
6ae743798a IBM1130: Fix missing CONST in plot declarations (James Fehlinger) 2017-05-08 21:28:44 -07:00
Mark Pizzolato
bc6caf53de IBM1130: Rework GUI -> SCP input processing to really stuff input 2017-05-08 19:48:46 -07:00
Mark Pizzolato
026990147f IBM1130: Correct label in GUI Operation Tags->Operation Flags 2017-05-08 19:46:47 -07:00
Mark Pizzolato
58f6e7d2db IBM1130: Pickup the latest utils from ibm1130software.zip from ibm1130.org
- ibm1130software.zip was contained within ibm1130.zip from ibm1130.org
- Tabs converted to spaces
2017-05-08 09:28:50 -07:00
Mark Pizzolato
2c6c8f4ef8 SCP: Always invoke strlcpy, strlcat, strcasecmp and strcasencmp vs sim_ forms 2017-05-07 19:19:55 -07:00
Mark Pizzolato
f5a1048101 ETHER: Explicitly use GetModuleHandleA API when finding DLL entry points 2017-05-07 19:00:49 -07:00
Mark Pizzolato
e7dbc8ea64 IBM1130: Change peeks into the event queue to only consider ibm1130 events 2017-05-07 18:59:00 -07:00
Mark Pizzolato
b866f76af7 IBM1130: Cleanup GUI command interactions and shutdown activities
Cleaned up a couple of things here.  Specifically:
    1) scp_reading is only set when CmdThread is actually reading.
    2) Avoid calling ResetEvent(hCmdReadEvent) since it has no effect.
    3) Calling ReadFile directly rather than calling read_line which ultimately
         calls fgets(stdin) and that ultimately calls ReadFile.
    4) Added a cleanup mechanism to shutdown the CmdThread
         and related open handles to Events and Thread when the program exits.

Remaining potential problems:
    1) A user might have type a partial command (scp_reading) but not
        completed it by hitting Enter, and then they perform some GUI
        interaction which does other things.  Some strange output will be
        produced on top of the partially entered command line.
    2) Whether or not a complete command has been entered, the original
         CmdThread will have a read posted on stdin throughout any activity
         initiated by GUI activities.  It is not clear that the simulator’s console
         will coherently be able to change the console’s mode from the line
         oriented mode that SCP uses to the character oriented mode used
         while instructions are executing with read pending on the input side.
2017-05-07 18:56:48 -07:00
Mark Pizzolato
0c27d1f5a8 IBM1130: Convert Tabs to Spaces 2017-05-03 15:11:22 -07:00
Mark Pizzolato
eea18400f3 CONSOLE: Fix crash when ^E is presented in a remote console session 2017-05-03 11:25:30 -07:00