1
0
mirror of https://github.com/simh/simh.git synced 2026-01-11 23:52:58 +00:00

281 Commits

Author SHA1 Message Date
Patrick Linstruth
aad5351080 Altair8800: New Simulator
This is the initial release of the Altair8800 simulator.

Why another Altair simulator? AltairZ80 has been described as a
“software simulator”, where the intent is to run software designed
specifically for executing under a simulator. Altair8800 is intended
to accurately simulate the Altair hardware and execute software
that will run unchanged on real hardware. Software and disk images
can be moved between the Altair8800 simulator and real Altair and
other S-100 hardware without any changes. The Altair8800 simulator
is a tool that can assist with the restoration of vintage Altair
and other S-100 hardware and software along with the development
of new hardware and software. The accomplish this, the following
are major differences between AltairZ80 and Altair8800.

* The monolithic design where devices access other devices directly
through external variables and functions is no longer supported.
All devices exchange data through a new BUS device. Memory and I/O
address decoding and transfers are now handled by the BUS device.
All interrupt requests are handled by the BUS device.

* System RAM was moved from the CPU device to a new RAM device and
managed by the BUS device.

* Banked RAM was moved from the CPU device to a new BRAM device.

* Banked RAM can only be accessed through the BUS device. Memory in
banks that are not currently selected cannot be accessed. The AZ80
“banked” RAM was removed.

* ROMs were moved from the CPU and DSK devices to the new ROM device.
Mike Douglas’ Altmon Monitor is also available through the ROM
device. The custom AltairZ80 ALTAIRROM, which is not compatible
with original Altair disk images, is also available.

* The custom ALTAIRROM boot loader was replaced with the original
MITS Disk Boot Loader as the default ROM.

* The monolithic Multiple-CPU/RAM/ROM/IO/BankedRAM CPU device has
been replaced with a generic CPU device that provides an abstraction
layer between SIMH and the supported CPU architectures (currently
8080 and Z80). All IO is handled through the BUS device. RAM, Banked
RAM, and ROM are each handled by their own independent devices.

* The AltairZ80 SIO device was replaced with the M2SIO0 and M2SIO1
devices. The M2SIO devices fully support TMXR.

* A new SIO device was added to provide generic, programmable, Serial
IO. TMXR is not supported on this device.

* The Altair 8800 did not have PTR or PTP hardware devices. They have
been removed and replaced with the M2SIO1 device. PTR and PTP devices
are defined by software executing on the simulator.

* Contention between multiple enabled serial devices checking the
single host keyboard for input is now handled by the BUS device.
Port 0xFF sense switches was moved to a new SSW device and IMSAI
programmed output was moved to a new PO device.

* The SIMH pseudo device no longer uses the removed PTR and PTP
devices. The SIMH device has its own IO system. To avoid conflicts
with other devices and remain compatible with the R and W utilities
written for AltairZ80, SIMH “borrows” I/O ports 12H and 13H during
file transfers. Only SIMH commands needed to support R and W file
transfers are supported. All other SIMH commands were removed.

* AltairZ80-specific versions of CP/M are not supported by Altair8800.

* PC queue was removed from CPU device and replaced with CPU HISTORY.

* The Altair8800 simulator only supports 16-bit address and 8-bit
data buses. 8086 and 68K CPU architectures were removed.

* All CPU timing (clockFrequency) and “sleeps” (SIO SLEEP) have been
removed. SIMH THROTTLE is fully supported and is the recommended
way to manage simulator speed and host CPU utilization. Executing
“SET THROTTLE 100K/1”, for example, should provide ample speed
without tasking the host CPU.

* HEXLOAD and HEXSAVE commands were added. The LOAD “-h” option has
been removed. Intel Hex and sRecord (coming soon) formats are
supported.

* The WD179X device was converted to an API.

* A new DSK API was added to provide a consistent way to manage soft
sector raw disk images.

* Support for the proprietary IMD disk image format was removed. Only
RAW disk images are supported.

The following devices are supported by this initial release:

BUS - Altair (S-100) Bus
CPU - Intel 8080 / Zilog Z80
RAM - 64K RAM
ROM - ROMs
BRAM - Banked RAM
DSK - MITS 88-DCDD Floppy Disk Controller
M2SIO0 - MITS 88-2SIO Port 0
M2SIO1 - MITS 88-2SIO Port 1
SSW - Sense Switches
PO - Programmed Output
SIO - Generic Serial I/O
SBC200 - SD Systems SBC-200
TARBELL - Tarbell SD and DD Floppy Disk Controller
VFII - SD Systems VersaFloppy II
SIMH - SIMH Pseudo Device
2025-11-21 17:01:40 -05:00
Mark Pizzolato
9fbd3e222e SCP: Search for startup simh.ini in reasonable platform specific locations 2025-08-14 08:42:44 -10:00
Mark Pizzolato
912f421144 CONSOLE: Add general support for SET CONSOLE SPEED=nnn
The original SET CONSOLE SPEED=nnn was added to a allow direct wired
terminal connected to a host system serial port to be a simulator's console.
The current change generalizes all console I/O such that speed is a reliable
option for direct console connections as well as serial and telnet connections.

The simple recipe to get well behaved console output speed is:
1) call tmxr_set_console_units() in the reset routine of the console DEVICE.
2) In the code path that engages console output do something similar
    to this as appropriate for the system being simulated:
        void txdb_wr (int32 data)
        {
        tto_unit.buf = data & 0377;
        tto_csr = tto_csr & ~CSR_DONE;
        CLR_INT (TTO);
        sim_activate (&tto_unit, tto_unit.wait);
        }

3) In the output unit's service routine the console output unit's service
    routine do something similar to this as appropriate for the system
    being simulated:
        t_stat tto_svc (UNIT *uptr)
        {
        int32 c;

        c = sim_tt_outcvt (tto_unit.buf, TT_GET_MODE (uptr->flags));
        if (c >= 0) {
            t_stat r;

            if ((r = sim_putchar_s (c)) != SCPE_OK) {           /* output; error? */
                sim_activate (uptr, uptr->wait);                /* retry */
                return ((r == SCPE_STALL)? SCPE_OK: r);         /* !stall? report */
                }
            }
        tto_csr = tto_csr | CSR_DONE;
        if (tto_csr & CSR_IE)
        SET_INT (TTO);
        }
The almost all of the current simh simulators already are implemented
with logic like the above example.  These will work just fine with the
newly regulated console speed.
2025-06-24 09:57:49 -10:00
Peter Schorn
9b1e541c8f AltairZ80: Fix 8080 and Z80 CPU
This fixes the H flag handling for the 8080 CPU and corrects the parity
flag computation for the Z80 CPU for INI, OUTI, IND, OUTD, INIR, OTIR,
INDR and OTDR instructions. It is based on Thomas Eberhardt's work.
2024-07-16 12:13:48 -10:00
Peter Schorn
eab060315e AltairZ80: Updated docs to include latest devices 2024-03-20 13:52:58 -10:00
Mark Pizzolato
2c0b465275 VAX: Explain idling sim_interval decrement
- Explain reasoning for idle decrement
- Fix TODR debug output for all simulators with a TODR register
2023-11-16 11:33:52 -10:00
Mark Pizzolato
810ec6300d SCP: Add visible countdown for the SLEEP command 2023-11-16 09:47:03 -10:00
Peter Schorn
9e4e9c57f6 AltairZ80: Updated documentation including format change 2023-07-20 14:47:25 -10:00
Mark Pizzolato
194b313179 SCP: Fold up include files used by all simulators
- Add common system includes used in may places which are allowed
  and thus added directly in sim_defs.h.
- Separate completely private system data structures and system APIs
  for use only by SCP library routines into sim_scp_private.h.
2023-03-04 17:51:49 -10:00
Mark Pizzolato
135e69c4a1 SCP: Add SET CONSOLE TELNET=CONNECT to open a window running telnet to console 2022-12-30 21:34:07 -10:00
Mark Pizzolato
5f98bdcce6 SCP: Document in HELP and sim_doc HELP SET DEBUG -B 2022-12-28 21:17:39 -10:00
Mark Pizzolato
4975fbe59c SCP: Document all simulator defined environment variables in help and sim_doc 2022-12-22 09:49:10 -10:00
Mark Pizzolato
3f0db42da2 SCP: Correct HELP SET ON INHERIT|NOINHERIT text
In particular, the SET ON INHERIT does not change the SET ON|NOON state.
2022-11-26 14:03:35 -10:00
Mark Pizzolato
7419457000 SCP: Update HELP SET ON to describe INHERIT and NOINHERIT
Add missing help information reported in #130
2022-11-24 11:12:34 -10:00
Mark Pizzolato
0c2d33727b DISK: Extend documentation for metadata management
- Update README to describe differences with open-simh
- Allow SET NOAUTOSIZE and SET AUTOSIZE
- Document deprecation and possibly non functionality of MinGW
  Windows build support
2022-10-07 08:39:25 -10:00
Mark Pizzolato
0b368d8d11 Visual Studio Projects and doc: Describe automatic fetch of windows-build 2022-10-02 18:31:44 -10:00
Mark Pizzolato
ebef6552c9 doc: Describe the LOAD data format for the PDP11 simulator 2022-08-11 11:08:14 -10:00
Mark Pizzolato
8c391d1d25 doc: Minor textual updates and describe sim_seeko 2022-07-31 08:02:12 -10:00
Mark Pizzolato
5a07375342 doc: Writing a Simulator - correct clock API parameters 2022-07-15 07:38:34 -10:00
Bob Supnik
4fe173f314 doc: Update Interdata doc to properly list changed register names 2022-07-12 11:49:20 -07:00
Mark Pizzolato
8809507650 doc: Update PDP11 and VAXen documents to reflect limits on # of lines 2022-07-06 15:32:30 -10:00
Mark Pizzolato
4d71b42120 doc: Updated faq to remove support for Windows 9x 2022-06-26 14:40:43 -07:00
Mark Pizzolato
bc99d6d5de SCP: Updated REG manipulation APIs and REGister sanity checks for all macros
- bounds check accesses in get_rval and put_rval for circular registers
- extend unit tests for REGister sanity checks to include all macros
- add sanity checks for new REGister macros
2022-06-26 14:39:25 -07:00
Richard Cornwell
5fbff11002 KA10: Updated documentation for PDP10 simulators. 2022-06-21 09:50:43 -04:00
Mark Pizzolato
d6ebe32b30 PDP11 & Unibus/Qbus VAXen: Document autoconfigure disabling
Historically, if a configuration file explicitly set either a DEVICE's
ADDRESS or VECTOR, autoconfiguration was immediately disabled.

This change defers disabling autoconfigure until an explicitly setting
of a DEVICE address or VECTOR actually changes what had been previously
configured by autoconfigure.
2022-06-15 15:51:18 -07:00
Bill Beech
d21f04bc64 SWTP6800: Update to simulators
- General cleanup of codebase
- Fixed condition codes m6800.c  from Roberto Sancho Villa
- Add additional FDC lfd-400 from Roberto Sancho Villa
- Add additional OS's (FLEX 1.0, FDOS 1.0, DOS68, MiniDOS, and MiniDOS-MPX)
  to software support
- Add additional disk formats to software support dc-4.c  from Roberto
  Sancho Villa
- Add CPU history
- Fix LOAD/DUMP to support binary and hex
- Fix fprintf_sym to disassemble 6800 code correctly
- Add EXAMINE/DEPOSIT to CPU Memory
- Fixed disasm to space the register
- Add SET_FLAG(IF) to IRQ – fixed error in handling IRQ from
  Roberto Sancho Villa
2022-06-09 14:28:04 -07:00
Mark Pizzolato
8628baf18b SCP: Add support for optional device unit tests
Some simulators and/or devices may want to provide specific testing
activities outside of full simulator execution which often will require
external, potentially complicated setup.
2022-05-12 13:14:01 -07:00
AZBevier
4991701ee6 SEL32: Add new SEL32 simulator. 2022-03-03 16:25:48 -07:00
Richard Cornwell
91aee9b39f KA10: Release 3 of PDP10 simulators. KS10 support added.
Added KS10 support.
    CPU Redid instruction decode to improve performance
    Triple-I display cleanup.
    Normalized end of line to DOS/Unix.
    KL10 FE, Cleanup issues with TTY devices hanging simulator..
    Fixed errors in RH20 device.
    RP and TU drives more independent of RH controller.
2022-02-19 20:25:44 -05:00
Mark Pizzolato
af4f37efac doc: Revise the SIMH User's guide to describe startup config files executed
The key change is the addition of:

When a simulator starts execution, the following sequence of simh command
files are executed if they are found:
    1. If a file named simh.ini is located in your HOME directory, it is
        executed.
    2. If the simh.ini file in your HOME directory isn’t found, a file named
        simh.ini in your current working directory is executed if it exists.
    3. If the simulator is invoked with any arguments, then the arguments are
        presumed to be a command file and possible arguments to that command
        file which is executed.
    4. If the simulator is invoked without any arguments, then a command file
        with the same name as the simulator binary with .ini appended that is
        located in the current working directory is executed.

Note, that up to 2 separate command files may be executed on simulator
startup.  The simh.ini file allows the user to define local user
preferences that align with their personal goals for simulator execution
across all simulators that may be used on their system.

Steps 3 and 4 were inherited from simh v3.x.  Steps 1 and 2 was inspired
by conversations with J. David Bryan in April of 2012.  Some how it
never got documented.
2022-02-14 12:43:52 -08:00
Mark Pizzolato
92b1efe50f DISK: Clarify minor changes to sim_disk API in the documentation 2022-02-10 07:10:08 -08:00
Mark Pizzolato
a444923256 doc: Update info about pcap support for Ethernet simulation on Windows. 2022-02-04 20:56:45 -08:00
Mark Pizzolato
35503f4765 TMXR: Add Access Control List (ACL) support for incoming network connections 2022-02-04 07:59:08 -08:00
Mark Pizzolato
54eda7a050 SCP: Extend BITFIELDS to allow alternate descriptions for same fields 2022-02-04 07:56:15 -08:00
Mark Pizzolato
efc79d710a PDP11: Update 11/40 and 11/45 models to reflect MMU was an option 2021-08-15 12:13:20 -07:00
Mark Pizzolato
acd5ae6579 VAX, VAX780, PDP11: Update typos in documentation and help text
as mentioned in #1065
2021-08-08 23:00:22 -07:00
Mark Pizzolato
af0f0300f8 PDP11, Unibus VAX: DEC standard 144 corrections and RP device update
- Added a specific drive type RP05 which is the same size as the RP04
  but can be distringuished by OS software.
- Restrict SET rpn BADBLOCK to only disk types which actually supported
  the DEC Standard 144 bad block table.
- Fixed typo's in help and comments about DEC 044 vs DEC 144 and also
  in pdp11_doc and vax780_doc documentation files.

As discussed in #1065
2021-08-08 11:39:13 -07:00
Mark Pizzolato
57c80f0691 PDP8: Update clock options in documentation 2021-06-08 02:06:42 -07:00
Mark Pizzolato
a1785ac1d0 SCP: Add optional VM routine that is invoked on specific REGister updates
The new REG_DEPOSIT register flag bit indicates that updates to a
REGister with this flag specified will invoke the sim_vm_reg_update
routine after the data has been updated.
2021-03-02 05:35:04 -08:00
Peter Schorn
9f064db561 AltairZ80: Updated Morrow Disk Jockey disk controller and minor code cleanup 2021-01-18 20:43:56 +01:00
Peter Schorn
2911b3a440 AltairZ80: Added Morrow Disk Jockey disk controller 2021-01-03 14:24:30 +01:00
Bob Supnik
c1ccc54da9 PDP11: Updated document for CPU BEVENT option 2020-12-18 03:40:00 -08:00
Peter Schorn
6f7d0406ff AltairZ80: Updated documentation for iCOM device 2020-11-29 09:39:29 +01:00
Peter Schorn
5211c1134a AltairZ80: New iCOM device, PTP port command, code cleanup 2020-11-28 14:02:01 +01:00
Mark Pizzolato
f9ce5ae8ff SCP: Add whitespace ignore option to file and string content comparisons 2020-11-01 16:27:47 -08:00
Mark Pizzolato
80abfe0412 doc: Update "Writing a Simulator" to describe details about sim_interval 2020-11-01 10:40:26 -08:00
Mark Pizzolato
dceadb393e SCP: Add internal & cross platform support for tar and curl commands 2020-10-20 02:50:34 -07:00
Mark Pizzolato
ae825c9afb All: Declare sim_stop_messages as an array SCPE_BASE long
This avoids a potential invalid pointer dereference when formatting
the return value from sim_instr() if it is < SCPE_BASE but greater
than the previously defined static array size.sizeof

Update simh.doc to reflect this generic change.
2020-09-02 15:56:07 -07:00
Peter Schorn
f64a32d0e8 AltairZ80: Added Hayes modem and minor bug fix 2020-08-16 09:31:19 +02:00
Peter Schorn
936a7a8c2d AltairZ80: Documentation update covering new devices 2020-07-15 08:16:55 +02:00