1
0
mirror of https://github.com/simh/simh.git synced 2026-04-26 12:07:16 +00:00

3b2: Refactoring in preparation for Rev 3

Refactor in preparation for the addition of a Rev 3 simulator for the
3B2/1000 system.

This change also includes a full cleanup of the rat's-nest of includes
and externs that plagued the 3B2 simulator and made it difficult to
understand and maintain. Headers are now required in the following
order:

  compilation unit -> "3b2_defs.h" -> {... dependencies ...}

Finally, HELP has been added to the CPU device.
This commit is contained in:
Seth Morabito
2020-03-26 13:30:08 -07:00
parent 083080e71d
commit 1a3e5af755
34 changed files with 8865 additions and 664 deletions

View File

@@ -1,4 +1,4 @@
/* 3b2_cpu.h: AT&T 3B2 Model 400 IO dispatch (Header)
/* 3b2_io.h: AT&T 3B2 Model 400 IO dispatch (Header)
Copyright (c) 2017, Seth J. Morabito
@@ -111,15 +111,21 @@
#ifndef _3B2_IO_H_
#define _3B2_IO_H_
#include "3b2_sysdev.h"
#include "3b2_iu.h"
#include "3b2_if.h"
#include "3b2_id.h"
#include "3b2_dmac.h"
#include "3b2_mmu.h"
#include "sim_defs.h"
#include "sim_tmxr.h"
#define CRC_POLYNOMIAL 0xEDB88320
#define CIO_SLOTS 12
/* IO area */
#define IO_BOTTOM 0x40000
#define IO_TOP 0x50000
/* CIO area */
#define CIO_BOTTOM 0x200000
#define CIO_TOP 0x2000000
#define IOF_ID 0
#define IOF_VEC 1
#define IOF_CTRL 3
@@ -219,10 +225,6 @@ typedef struct {
uint32 retcode;
} pump;
extern t_bool cio_skip_seqbit;
extern uint16 cio_ints;
extern CIO_STATE cio[CIO_SLOTS];
t_stat cio_reset(DEVICE *dptr);
t_stat cio_svc(UNIT *uptr);
@@ -240,6 +242,9 @@ uint16 cio_c_lp(uint8 cid, uint32 esize);
uint16 cio_c_ulp(uint8 cid, uint32 esize);
void cio_sysgen(uint8 cid);
uint32 io_read(uint32 pa, size_t size);
void io_write(uint32 pa, uint32 val, size_t size);
void dump_entry(uint32 dbits, DEVICE *dev, CONST char *type,
uint32 esize, cio_entry *entry, uint8 *app_data);