Documentation ¶
Index ¶
- type BusT
- func (bus *BusT) AddDevice(devMap DeviceMapT, devNum int, att bool)
- func (bus *BusT) BusInit()
- func (bus *BusT) ClearInterrupt(devNum int)
- func (bus *BusT) DataIn(devNum int, abc byte, flag byte) (datum dg.WordT)
- func (bus *BusT) DataOut(devNum int, datum dg.WordT, abc byte, flag byte)
- func (bus *BusT) GetBusy(devNum int) bool
- func (bus *BusT) GetDone(devNum int) bool
- func (bus *BusT) GetHighestPriorityInt() (devNum int)
- func (bus *BusT) GetIRQ() bool
- func (bus *BusT) GetPrintableDevList() string
- func (bus *BusT) IsAttached(devNum int) bool
- func (bus *BusT) IsBootable(devNum int) bool
- func (bus *BusT) IsDevMasked(devNum int) (masked bool)
- func (bus *BusT) IsIODevice(devNum int) bool
- func (bus *BusT) ResetAllIODevices()
- func (bus *BusT) ResetDevice(devNum int)
- func (bus *BusT) SendInterrupt(devNum int)
- func (bus *BusT) SetAttached(devNum int, imgName string)
- func (bus *BusT) SetBusy(devNum int, f bool)
- func (bus *BusT) SetDataInFunc(devNum int, fn DataInFunc)
- func (bus *BusT) SetDataOutFunc(devNum int, fn DataOutFunc)
- func (bus *BusT) SetDetached(devNum int)
- func (bus *BusT) SetDone(devNum int, f bool)
- func (bus *BusT) SetIRQ(i bool)
- func (bus *BusT) SetIrqMask(newMask dg.WordT)
- func (bus *BusT) SetResetFunc(devNum int, resetFn ResetFunc)
- type DataInFunc
- type DataOutFunc
- type DeviceDesc
- type DeviceMapT
- type Disk4231aStatT
- type Disk4231aT
- type Disk6061StatT
- type Disk6061T
- func (disk *Disk6061T) Disk6061Attach(dNum int, imgName string) bool
- func (disk *Disk6061T) Disk6061CreateBlank(imgName string) bool
- func (disk *Disk6061T) Disk6061Init(dev int, bus *BusT, statsChann chan Disk6061StatT, logID int, logging bool)
- func (disk *Disk6061T) Disk6061LoadDKBT()
- func (disk *Disk6061T) Disk6061SetLogging(log bool)
- type Disk6239DataT
- func (disk *Disk6239DataT) Disk6239Attach(dNum int, imgName string) bool
- func (disk *Disk6239DataT) Disk6239CreateBlank(imgName string) bool
- func (disk *Disk6239DataT) Disk6239Init(dev int, bus *BusT, statsChann chan Disk6239StatT, logID int, logging bool)
- func (disk *Disk6239DataT) Disk6239LoadDKBT()
- func (disk *Disk6239DataT) Disk6239SetLogging(debug bool)
- type Disk6239StatT
- type MagTape6026T
- func (tape *MagTape6026T) MtAttach(tNum int, imgName string) bool
- func (tape *MagTape6026T) MtDetach(tNum int) bool
- func (tape *MagTape6026T) MtInit(dev int, bus *BusT, statsChan chan MtStatT, logID int, debugLogging bool) bool
- func (tape *MagTape6026T) MtLoadTBoot()
- func (tape *MagTape6026T) MtReset()
- func (tape *MagTape6026T) MtScanImage(tNum int) string
- type MtStatT
- type ResetFunc
- type TtiT
- type TtoT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BusT ¶
type BusT struct {
// contains filtered or unexported fields
}
BusT holds the system bus and all its associated devices
func (*BusT) AddDevice ¶
func (bus *BusT) AddDevice(devMap DeviceMapT, devNum int, att bool)
AddDevice adds a new device to the system bus
func (*BusT) BusInit ¶
func (bus *BusT) BusInit()
BusInit must be called before attaching any devices
func (*BusT) ClearInterrupt ¶
ClearInterrupt clears the IRQ for the given device
func (*BusT) GetHighestPriorityInt ¶
GetHighestPriorityInt returns the device number of the highest priority device that has an outstanding interrupt
func (*BusT) GetPrintableDevList ¶
GetPrintableDevList is used by the console SHOW DEV command to display device statuses
func (*BusT) IsAttached ¶
IsAttached returns the attached state of the given device
func (*BusT) IsBootable ¶
IsBootable returns true if the device can be booted from It is is not a guarantee that it WILL boot!
func (*BusT) IsDevMasked ¶
IsDevMasked is a getter to see if the device is masked out from sending IRQs
func (*BusT) IsIODevice ¶
IsIODevice returns true if this is an IO device
func (*BusT) ResetAllIODevices ¶
func (bus *BusT) ResetAllIODevices()
ResetAllIODevices calls the Reset func for each I/O device
func (*BusT) ResetDevice ¶
ResetDevice forwards a Reset to the given device
func (*BusT) SendInterrupt ¶
SendInterrupt triggers an IRQ for the given device
func (*BusT) SetAttached ¶
SetAttached sets the MV/Em Attached flag for a device indicating the virtual device is attached to a host image file
func (*BusT) SetDataInFunc ¶
func (bus *BusT) SetDataInFunc(devNum int, fn DataInFunc)
SetDataInFunc sets the Data In callback fror the given device
func (*BusT) SetDataOutFunc ¶
func (bus *BusT) SetDataOutFunc(devNum int, fn DataOutFunc)
SetDataOutFunc sets the Data Out callback fror the given device
func (*BusT) SetDetached ¶
SetDetached clears the MV/Em Attached flag for a device
func (*BusT) SetIrqMask ¶
SetIrqMask is a setter for the (whole) IRQ mask
func (*BusT) SetResetFunc ¶
SetResetFunc sets the device reset callback for the given device
type DataInFunc ¶
DataInFunc stores a DIx func pointer
type DataOutFunc ¶
DataOutFunc stores a DOx func pointer
type DeviceDesc ¶
type DeviceDesc struct { DgMnemonic string PMB uint // Priority Mask Bit number IsIO bool IsBootable bool }
DeviceDesc holds basic config info for a device, a VM will have a map of these to describe its known devices
type DeviceMapT ¶
type DeviceMapT map[int]DeviceDesc
DeviceMapT describes the Device Map used by each VM
type Disk4231aStatT ¶
type Disk4231aStatT struct { ImageAttached bool Cylinder dg.WordT Head, Sector uint8 Reads, Writes uint64 }
Disk4231aStatT holds the data reported to the status collector
type Disk4231aT ¶
type Disk4231aT struct { ImageAttached bool // contains filtered or unexported fields }
Disk4231aT holds the current state of the Type-6231A Moving-Head Disk
func (*Disk4231aT) Disk4231aAttach ¶
func (disk *Disk4231aT) Disk4231aAttach(dNum int, imgName string) bool
Disk4231aAttach attempts to attach an extant 4231a disk image to the running emulator
func (*Disk4231aT) Disk4231aCreateBlank ¶
func (disk *Disk4231aT) Disk4231aCreateBlank(imgName string) bool
Disk4231aCreateBlank creates an empty disk file of the correct size for the disk4231a emulator to use
func (*Disk4231aT) Disk4231aInit ¶
func (disk *Disk4231aT) Disk4231aInit(dev int, bus *BusT, statsChann chan Disk4231aStatT, logID int, logging bool)
Disk4231aInit must be called to initialise the emulated disk4231a controller
func (*Disk4231aT) Disk4231aLoadDKBT ¶
func (disk *Disk4231aT) Disk4231aLoadDKBT()
Disk4231aLoadDKBT - This func mimics a ROM routine to boot from disk. Rather than copying a ROM routine (!) we simply mimic its basic actions... Load 1st block from disk into location 0
type Disk6061StatT ¶
type Disk6061StatT struct { ImageAttached bool Cylinder dg.WordT Head, Sector uint8 Reads, Writes uint64 }
Disk6061StatT holds the data reported to the status collector
type Disk6061T ¶
type Disk6061T struct { ImageAttached bool // contains filtered or unexported fields }
Disk6061T holds the current state of a Type 6061 Moving-Head Disk
func (*Disk6061T) Disk6061Attach ¶
Disk6061Attach attempts to attach an extant 6061 disk image to the running emulator
func (*Disk6061T) Disk6061CreateBlank ¶
Disk6061CreateBlank creates an empty disk file of the correct size for the disk6061 emulator to use
func (*Disk6061T) Disk6061Init ¶
func (disk *Disk6061T) Disk6061Init(dev int, bus *BusT, statsChann chan Disk6061StatT, logID int, logging bool)
Disk6061Init must be called to initialise the emulated disk6061 controller
func (*Disk6061T) Disk6061LoadDKBT ¶
func (disk *Disk6061T) Disk6061LoadDKBT()
Disk6061LoadDKBT - This func mimics a system ROM routine to boot from disk. Rather than copying a ROM routine (!) we simply mimic its basic actions... Load 1st block from disk into location 0
func (*Disk6061T) Disk6061SetLogging ¶
Disk6061SetLogging sets the disk's internal; debug logging flag as specified N.B. The disk runs slower with this set.
type Disk6239DataT ¶
type Disk6239DataT struct {
// contains filtered or unexported fields
}
Disk6239DataT holds the current state of a Type 6239 Disk
func (*Disk6239DataT) Disk6239Attach ¶
func (disk *Disk6239DataT) Disk6239Attach(dNum int, imgName string) bool
Disk6239Attach attempts to attach an extant MV/Em disk image to the running emulator
func (*Disk6239DataT) Disk6239CreateBlank ¶
func (disk *Disk6239DataT) Disk6239CreateBlank(imgName string) bool
Disk6239CreateBlank - Create an empty disk file of the correct size for the disk6239 emulator to use
func (*Disk6239DataT) Disk6239Init ¶
func (disk *Disk6239DataT) Disk6239Init(dev int, bus *BusT, statsChann chan Disk6239StatT, logID int, logging bool)
Disk6239Init is called once by the main routine to initialise this disk6239 emulator
func (*Disk6239DataT) Disk6239LoadDKBT ¶
func (disk *Disk6239DataT) Disk6239LoadDKBT()
Disk6239LoadDKBT fakes a system ROM routine to boot from this disk.
func (*Disk6239DataT) Disk6239SetLogging ¶
func (disk *Disk6239DataT) Disk6239SetLogging(debug bool)
Disk6239SetLogging sets the internal debugging/logging flag according to the passed value N.B. The disk will run slower when this is set.
type Disk6239StatT ¶
type Disk6239StatT struct { ImageAttached bool StatusRegA, StatusRegB, StatusRegC dg.WordT // cylinder, head, sector dg_word SectorNo dg.DwordT Reads, Writes uint64 }
Disk6239StatT holds the near real-time status for this device
type MagTape6026T ¶
type MagTape6026T struct {
// contains filtered or unexported fields
}
MagTape6026T contains the current state of a type 6026 Magnetic Tape Drive
func (*MagTape6026T) MtAttach ¶
func (tape *MagTape6026T) MtAttach(tNum int, imgName string) bool
MtAttach attaches a SimH tape image file to the emulated tape drive
func (*MagTape6026T) MtDetach ¶
func (tape *MagTape6026T) MtDetach(tNum int) bool
MtDetach disassociates a tape file image from the drive
func (*MagTape6026T) MtInit ¶
func (tape *MagTape6026T) MtInit(dev int, bus *BusT, statsChan chan MtStatT, logID int, debugLogging bool) bool
MtInit sets the initial state of the (unmounted) tape drive(s)
func (*MagTape6026T) MtLoadTBoot ¶
func (tape *MagTape6026T) MtLoadTBoot()
MtLoadTBoot - This function fakes the ROM/SCP boot-from-tape routine. Rather than copying a ROM and executing that, we simply mimic its basic actions.. Load file 0 from tape (1 x 2k block) Put the loaded code at physical location 0 ...
func (*MagTape6026T) MtReset ¶
func (tape *MagTape6026T) MtReset()
MtReset Resets the mt to known state (any tapes are rewound)
func (*MagTape6026T) MtScanImage ¶
func (tape *MagTape6026T) MtScanImage(tNum int) string
MtScanImage scans an attached SimH tape image to ensure it makes sense (This is just a pass-through to the equivalent function in simhtape)
type MtStatT ¶
type MtStatT struct { // Internals ImageAttached [maxTapes]bool FileName [maxTapes]string // DG device state MemAddrReg dg.PhysAddrT CurrentCmd int StatusReg1, StatusReg2 dg.WordT }
MtStatT holds data for the status collector
type TtiT ¶
type TtiT struct {
// contains filtered or unexported fields
}
TtiT describes the current state of the TTI device
func (*TtiT) InsertChar ¶
InsertChar places one byte in the TTI buffer for handling by the CPU
type TtoT ¶
type TtoT struct {
// contains filtered or unexported fields
}
TtoT describes the current state of the TTO device
func (*TtoT) PutNLString ¶
PutNLString outputs a NL followed by a string to TTO
func (*TtoT) PutStringNL ¶
PutStringNL outputs a string followed by a NL to TTO