1
0
mirror of https://github.com/simh/simh.git synced 2026-05-04 23:15:23 +00:00

3B2-700 Initial Public Release

This commit introduces dozens of changes to make the 3B2-700 simulator
fully functional and ready for wider use. In addition to 3B2-700
availability, this commit includes a tremendous amount of refactoring
of the 3B2-400 and common code to make the project structure easier to
maintain and reason about.
This commit is contained in:
Seth Morabito
2022-11-07 10:49:45 -10:00
committed by Mark Pizzolato
parent 48f1430bd0
commit 88916c7bf1
60 changed files with 4595 additions and 4593 deletions

View File

@@ -1,6 +1,6 @@
/* 3b2_dmac.h: AT&T 3B2 DMA Controller Header
/* 3b2_dmac.h: AM9517 DMA Controller
Copyright (c) 2021, Seth J. Morabito
Copyright (c) 2021-2022, Seth J. Morabito
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
@@ -33,14 +33,20 @@
#include "3b2_defs.h"
#define DMA_MODE_VERIFY 0
#define DMA_MODE_WRITE 1 /* Write to memory from device */
#define DMA_MODE_READ 2 /* Read from memory to device */
#define DMA_XFER_VERIFY 0
#define DMA_XFER_WRITE 1 /* Write to memory from device */
#define DMA_XFER_READ 2 /* Read from memory to device */
#define DMA_IF_READ (IFBASE + IF_DATA_REG)
#define DMA_MODE(C) ((dma_state.channels[(C)].mode >> 6) & 3)
#define DMA_DECR(C) ((dma_state.channels[(C)].mode >> 5) & 1)
#define DMA_AUTOINIT(C) ((dma_state.channels[(C)].mode >> 4) & 1)
#define DMA_XFER(C) ((dma_state.channels[(C)].mode >> 2) & 3)
typedef struct {
uint16 page;
uint8 mode; /* Channel mode */
uint16 page; /* Memory page */
uint16 addr; /* Original addr */
uint16 wcount; /* Original wcount */
uint16 addr_c; /* Current addr */
@@ -57,7 +63,6 @@ typedef struct {
/* DMAC programmable registers */
uint8 command;
uint8 mode;
uint8 request;
uint8 mask;
uint8 status;
@@ -77,7 +82,7 @@ uint32 dmac_read(uint32 pa, size_t size);
void dmac_write(uint32 pa, uint32 val, size_t size);
void dmac_service_drqs();
void dmac_generic_dma(uint8 channel, uint32 service_address);
uint32 dma_address(uint8 channel, uint32 offset, t_bool r);
uint32 dma_address(uint8 channel, uint32 offset);
extern DMA_STATE dma_state;