/* SparcSoftcardOps.h created by Sherman of September 7, 1988 11:27:27 am PDT */

/* from SparcSoftcardOps.mob */

#include "standard.h"

extern void SparcSoftcardOps←SparcReset();

extern void SparcSoftcardOps←SparcResetAndStart();

typedef struct TestSparcError←self {
	BOOLEAN error;
	} Return←TestSparcError;

extern Return←TestSparcError SparcSoftcardOps←TestSparcError();

extern void SparcSoftcardOps←SparcCacheDisable();

extern void SparcSoftcardOps←SparcCacheEnable();

extern void SparcSoftcardOps←SetSparcToIOPInt();

extern void SparcSoftcardOps←ResetSparcToIOPInt();

extern void SparcSoftcardOps←SetSparcToMesaInt();

extern void SparcSoftcardOps←ResetSparcToMesaInt();

extern void SparcSoftcardOps←SetSparcToSparcInt();

extern void SparcSoftcardOps←ResetSparcToSparcInt();

extern void SparcSoftcardOps←SetIOPToSparcInt();

extern void SparcSoftcardOps←ResetIOPToSparcInt();

extern void SparcSoftcardOps←SetMesaToSparcInt();

extern void SparcSoftcardOps←ResetMesaToSparcInt();

extern void SparcSoftcardOps←SetSparcAbortInt();

extern void SparcSoftcardOps←ResetSparcAbortInt();

extern void SparcSoftcardOps←EnableInt();

extern void SparcSoftcardOps←DisableInt();

typedef enum {
	InterruptSource←mapInt=0,
	InterruptSource←nVersOnLine=1,
	InterruptSource←nSCCInt=2,
	InterruptSource←PrintVersEnd=3,
	InterruptSource←DispVertSync=4,
	InterruptSource←DispHorizSync=5,
	InterruptSource←PrintPageSync=6,
	InterruptSource←PrintLineSync=7,
	InterruptSource←nVersReady=8,
	InterruptSource←mapFault=9,
	InterruptSource←realTimeClock=10
	} SparcSoftcardOps←InterruptSource;

typedef enum {
	InterruptMode←activeLow=0,
	InterruptMode←activeHigh=1,
	InterruptMode←risingEdge=2,
	InterruptMode←fallingEdge=3
	} SparcSoftcardOps←InterruptMode;

typedef enum {
	InterruptNumber←interruptA=0,
	InterruptNumber←interruptB=1,
	InterruptNumber←interruptC=2
	} SparcSoftcardOps←InterruptNumber;

typedef enum {
	InterruptProcessor←cp=0,
	InterruptProcessor←iOP=1,
	InterruptProcessor←sparc=2,
	InterruptProcessor←none=3
	} SparcSoftcardOps←InterruptProcessor;

extern void SparcSoftcardOps←SetPeriphIntMode();
	/* SparcSoftcardOps←InterruptSource interruptSource; */
	/* SparcSoftcardOps←InterruptMode interruptMode; */
	/* SparcSoftcardOps←InterruptNumber interruptNumber; */
	/* SparcSoftcardOps←InterruptProcessor interruptProcessor; */

typedef struct ReadPeriphIntState←self {
	BOOLEAN intActive;
	} Return←ReadPeriphIntState;

extern Return←ReadPeriphIntState SparcSoftcardOps←ReadPeriphIntState();
	/* SparcSoftcardOps←InterruptNumber interruptNumber; */

extern void SparcSoftcardOps←ResetPeriphInt();
	/* SparcSoftcardOps←InterruptNumber interruptNumber; */

typedef enum {
	DMAState←active=0,
	DMAState←inactive=1
	} SparcSoftcardOps←DMAState;

extern void SparcSoftcardOps←SetDMAState();
	/* SparcSoftcardOps←DMAState dMAState; */

typedef enum {
	DMAMode←printer=0,
	DMAMode←display=1,
	DMAMode←versatecOneShot=2,
	DMAMode←versatecStream=3
	} SparcSoftcardOps←DMAMode;

extern void SparcSoftcardOps←SetDMAMode();
	/* SparcSoftcardOps←DMAMode dMAMode; */

extern void SparcSoftcardOps←DMAAddressRegisterLoad();
	/* CARD32 byteAddress; */

typedef enum {
	VersatecMode←print=0,
	VersatecMode←plot=1,
	VersatecMode←SPPPrint=2,
	VersatecMode←SPPPlot=3
	} SparcSoftcardOps←VersatecMode;

extern void SparcSoftcardOps←SetVersatecMode();
	/* SparcSoftcardOps←VersatecMode versatecMode; */

typedef enum {
	VersatecRCommand←CLEAR=0,
	VersatecRCommand←RESET=1,
	VersatecRCommand←RLTER=2,
	VersatecRCommand←RFFED=3,
	VersatecRCommand←REOTR=4
	} SparcSoftcardOps←VersatecRCommand;

typedef struct SendVersatecRCommand←self {
	BOOLEAN ok;
	} Return←SendVersatecRCommand;

extern Return←SendVersatecRCommand SparcSoftcardOps←SendVersatecRCommand();
	/* SparcSoftcardOps←VersatecRCommand versatecRCommand; */

typedef struct VersatecOnLine←self {
	BOOLEAN onLine;
	} Return←VersatecOnLine;

extern Return←VersatecOnLine SparcSoftcardOps←VersatecOnLine();

typedef struct VersatecReady←self {
	BOOLEAN ready;
	} Return←VersatecReady;

extern Return←VersatecReady SparcSoftcardOps←VersatecReady();

typedef struct VersatecSendOneByte←self {
	BOOLEAN ok;
	} Return←VersatecSendOneByte;

extern Return←VersatecSendOneByte SparcSoftcardOps←VersatecSendOneByte();
	/* BYTE data; */

typedef struct VersatecSendBuffer←self {
	BOOLEAN ok;
	} Return←VersatecSendBuffer;

extern Return←VersatecSendBuffer SparcSoftcardOps←VersatecSendBuffer();
	/* CARD32 byteAddress; */
	/* CARD32 byteSize; */

typedef enum {
	VMSpaceName←dMA=0,
	VMSpaceName←iOP=1,
	VMSpaceName←cP=2,
	VMSpaceName←sparcUserData=3,
	VMSpaceName←sparcUserProgram=4,
	VMSpaceName←sparcSuperData=5,
	VMSpaceName←sparcSuperProgram=6
	} SparcSoftcardOps←VMSpaceName;

typedef struct VMSpace←self {
	SparcSoftcardOps←VMSpaceName name;
	CARD32 task;	/* ← 0 */
	} SparcSoftcardOps←VMSpace;

typedef struct Flags←self {
	BOOLEAN dirty;	/* ← FALSE */
	BOOLEAN referenced;	/* ← FALSE */
	BOOLEAN readOnly;	/* ← FALSE */
	BOOLEAN nonCachable;	/* ← FALSE */
	BOOLEAN interrupt;	/* ← FALSE */
	} SparcSoftcardOps←Flags;

typedef struct MapEntry←self {
	SparcSoftcardOps←Flags flags;
	SparcSoftcardOps←VMSpace vMSpace;
	CARD32 virtualAddressByte;
	CARD32 realAddressByte;
	} SparcSoftcardOps←MapEntry;

typedef struct MapEntryConcrete←self {
	BOOLEAN dirty:1;
	BOOLEAN referenced:1;
	BOOLEAN readOnly:1;
	BOOLEAN nonCachable:1;
	BOOLEAN interrupt:1;
	BYTE task:8;
	INT virtualPageHiHi:3;
	INT virtualPageHiLow:2;
	BOOL trash:1;
	INT realPage:13;
	} SparcSoftcardOps←MapEntryConcrete;

extern void SparcSoftcardOps←WriteMapEntry();
	/* SparcSoftcardOps←MapEntry mapEntry; */

typedef struct ReadMapEntry←self {
	SparcSoftcardOps←MapEntry oldMapEntry;
	} Return←ReadMapEntry;

extern Return←ReadMapEntry SparcSoftcardOps←ReadMapEntry();
	/* SparcSoftcardOps←MapEntry mapEntry; */

typedef BOOLEAN (SparcSoftcardOps←MemoryConfig[8]);

typedef SparcSoftcardOps←MemoryConfig (*SparcSoftcardOps←MemoryConfigPointer);

extern void SparcSoftcardOps←FindMemoryConfig();
	/* SparcSoftcardOps←MemoryConfigPointer memoryConfigPointer; */