simh-testsetgenerator/3B2
Seth Morabito 731d99cf65 3b2: CMP{W|H|B} instruction fix
The WE32100 supports expanded datatypes for its opcodes, allowing an
opcode to override the default size (byte/halfword/word) expected by the
instruction. For example:

        CMPH &0x10000,{uword}-8(%fp)

Without the {uword} marker, this instruction would only compare the
lower 2 bytes of -8(%fp) against the lower two bytes of the constant
value 0x10000, since the CMPH instruction compares halfwords. However,
with the {uword} marker, the CMPH instruction promotes the opcode from a
halfword to an unsigned word, sign extending if appropriate.

The CMP{W|H|B} instruction implementation in the 3B2 simulator was
ignoring any expanded type markers on its opcodes when checking whether
to set the "N" (negative) bit in the PSW, leading to a failure in
compiling GCC. This fix causes the instruction to honor the expanded
datatype in this case.
2019-09-01 11:45:45 -07:00
..
3b2_cpu.c 3b2: CMP{W|H|B} instruction fix 2019-09-01 11:45:45 -07:00
3b2_cpu.h 3b2: WE32106 Math Acceleration Unit (MAU) 2019-06-29 08:45:27 -07:00
3b2_ctc.c 3b2: Add correct CTC subdevice information 2019-08-20 06:56:50 -07:00
3b2_ctc.h 3b2: Add correct CTC subdevice information 2019-08-20 06:56:50 -07:00
3b2_defs.h 3b2: STRCPY fix, CTC and NI cleanup 2019-08-15 08:07:49 -07:00
3b2_dmac.c 3b2: Properly initialize DMAC Current Word Count 2018-12-13 19:50:20 -08:00
3b2_dmac.h 3b2: Refactor DUART and DMA 2018-04-11 14:24:48 -07:00
3b2_id.c 3b2: Make floppy controller a DEV_DISK device 2019-01-13 22:25:26 -08:00
3b2_id.h 3B2: Remove unused code, move static declarations 2018-08-19 12:37:31 -07:00
3b2_if.c 3b2: NI 10Base5 Ethernet Device 2019-03-09 14:32:21 -08:00
3b2_if.h 3b2: Make floppy controller a DEV_DISK device 2019-01-13 22:25:26 -08:00
3b2_io.c 3b2: NI 10Base5 Ethernet Device 2019-03-09 14:32:21 -08:00
3b2_io.h 3b2: NI 10Base5 Ethernet Device 2019-03-09 14:32:21 -08:00
3b2_iu.c 3b2: Fix for erratic CONTTY behavior 2018-08-22 17:13:48 -07:00
3b2_iu.h 3b2: Fix for erratic CONTTY behavior 2018-08-22 17:13:48 -07:00
3b2_mau.c 3b2: Fix Windows build warnings 2019-07-20 20:05:32 -07:00
3b2_mau.h 3b2: Fix critical MAU issues 2019-07-19 16:34:32 -07:00
3b2_mmu.c 3b2: WE32106 Math Acceleration Unit (MAU) 2019-06-29 08:45:27 -07:00
3b2_mmu.h 3b2: WE32106 Math Acceleration Unit (MAU) 2019-06-29 08:45:27 -07:00
3b2_ni.c 3b2: Improve NI performance 2019-08-25 20:39:48 -07:00
3b2_ni.h 3b2: Improve NI performance 2019-08-25 20:39:48 -07:00
3b2_ports.c 3b2: NI 10Base5 Ethernet Device 2019-03-09 14:32:21 -08:00
3b2_ports.h 3B2: Remove unused code, move static declarations 2018-08-19 12:37:31 -07:00
3b2_sys.c 3b2: STRCPY fix, CTC and NI cleanup 2019-08-15 08:07:49 -07:00
3b2_sys.h 3b2: Fix fprint_sym_m 2018-03-15 16:51:10 -07:00
3b2_sysdev.c 3b2: Fix for compilation warning 2019-06-09 14:12:02 -07:00
3b2_sysdev.h 3b2: Soft-power shutdown via TIMER command 2019-04-13 11:36:02 -07:00
README.md 3b2: Make floppy controller a DEV_DISK device 2019-01-13 22:25:26 -08:00
rom_400.bin 3b2: Initial release of an AT&T 3B2 model 400 emulator. 2017-11-20 18:21:49 -08:00
rom_400_bin.h 3b2: Initial release of an AT&T 3B2 model 400 emulator. 2017-11-20 18:21:49 -08:00

AT&T 3B2 Simulator

This module contains a simulator for the AT&T 3B2 Model 400 microcomputer.

Full documentation for the 3B2 simulator is available here:

Devices

The following devices are simulated. The SIMH names for the simulated devices are given in parentheses:

  • 3B2 Model 400 System Board with 1MB, 2MB, or 4MB RAM (CSR, NVRAM)
  • WE32100 CPU (CPU)
  • WE32101 MMU (MMU)
  • PD8253 Interval Timer (TIMER)
  • AM9517 DMA controller (DMAC)
  • SCN2681A Integrated DUART (IU)
  • TMS2793 Integrated Floppy Controller (IFLOPPY)
  • uPD7261A Integrated MFM Fixed Disk Controller (IDISK)
  • Non-Volatile Memory (NVRAM)
  • MM58174A Time Of Day Clock (TOD)
  • CM195B 4-port Serial MUX (PORTS)
  • CM195H Cartridge Tape Controller (CTC)

Usage

To boot the 3B2 simulator into firmware mode, simply type:

sim> BOOT

You will be greeted with the message:

FW ERROR 1-01: NVRAM SANITY FAILURE
               DEFAULT VALUES ASSUMED
               IF REPEATED, CHECK THE BATTERY

FW ERROR 1-02: DISK SANITY FAILURE
               EXECUTION HALTED

SYSTEM FAILURE: CONSULT YOUR SYSTEM ADMINISTRATION UTILITIES GUIDE

NVRAM and Time of Day can be saved between boots by attaching both devices to files.

sim> ATTACH NVRAM <nvram-file>
sim> ATTACH TOD <tod-file>

If you have no operating system installed on the hard drive, on subsequent boots you will instead see the message

SELF-CHECK


FW ERROR 1-02: DISK SANITY FAILURE
               EXECUTION HALTED

SYSTEM FAILURE: CONSULT YOUR SYSTEM ADMINISTRATION UTILITIES GUIDE

Once you see the SYSTEM FAILURE message, this is actually an invisible prompt. To access firmware mode, type the default 3B2 firmware password mcp, then press Enter or carriage return.

You should then be prompted with:

Enter name of program to execute [  ]:

Here, you may type a question mark (?) and press Enter to see a list of available firmware programs.

Booting UNIX SVR3

UNIX SVR3 is the only operating system available for the 3B2. To boot UNIX, attach the first disk image from the 3B2 "Essential Utilities" distribution.

sim> ATTACH IFLOPPY <floppy-image>
sim> BOOT

Once you reach the SYSTEM FAILURE message, type mcp to enter firmware mode. When prompted for the name of a program to boot, enter unix, and confirm the boot device is FD5 by pressing Enter or carriage return.

Enter name of program to execute [  ]: unix
        Possible load devices are:

Option Number    Slot     Name
---------------------------------------
       0          0     FD5

Enter Load Device Option Number [0 (FD5)]:

Installing SVR3

To install SVR3 to the first hard disk, first, attach a new image to the IDISK0 device:

sim> ATTACH IDISK0 <hd-image>

Then, boot the file idtools from the "3B2 Maintenance Utilities - Issue 4.0" floppy diskette.

From idtools, select the formhard option and low-level format integrated disk 0. Parameters for the default 72MB hard disk are:

               Drive Id: 5
       Number cylinders: 925
      Number tracks/cyl: 9
   Number sectors/track: 18
    Number bytes/sector: 512

After low-level formatting integrated disk 0, boot the file unix from the first diskette of the 3B2 "Essential Utilities" distribution, and follow the prompts.