IO.DOC

IO.DOC - I/O functions on the ORDINATOR

;150286	Improved timer. Added LAN. g
;040485	Updated. G
;030485	Cleaned up. G
;010485	Updated. G
;020385	Cleaned up. L
;090285	Created after a long time of pressure. L

1.0 Port assignments

Port	Device		Brief port description
----	------		----------------------

00	-		-
.	-		-
.	-		-
3F	-		-

40	TEMP I/O	TERMINAL
41	TEMP I/O	LINE
42	TEMP I/O	CASSETTE
43	TEMP I/O	-
44	TEMP I/O	-
45	TEMP I/O	-
46	TEMP I/O	-
47	TEMP I/O	-

48	-		-
.	-		-
.	-		-
D9	-		-

DA	FLOPPY		Diskchanged
DB	FLOPPY		Control
DC	FLOPPY		Command/status
DD	FLOPPY		Track
DE	FLOPPY		Sector
DF	FLOPPY		Data

E0	-		-
E1	-		-
E2	-		-

E3	KEYBOARD	Interrupt control

E4	-		-
E5	-		-

E6	KEYBOARD	Data transport

E7	TIMER/SWITCH
E8	TIMER
E9	TIMER
EA	TIMER
EB	TIMER

EC	VIDEO0		6845 Adress register
ED	VIDEO0		6845 Data register

EE	VIDEO1		6845 Adress register
EF	VIDEO1		6845 Data register

F0	UART0
F1	UART0
F2	UART0
F3	UART0

F4	UART1
F5	UART1
F6	UART1
F7	UART1

F8	PARIO
F9	PARIO
FA	PARIO
FB	PARIO

FC	PRINTER		Data
FD	PRINTER		Control

FE	EPROM
FF	MMU


2.0 Segment assignments

Segment	Device		Brief segment description
-------	------		-------------------------

00-1F	128K DRAM

20-2F	64K DRAM

30	-		-
31	-		-
32	-		-
33	-		-

34	LAN		Local Area Network processor RAM

35	FLOPPY		Local DMA RAM

36	ROM		DIAMOND extension
37	ROM

38	VIDEO0		Data
39	VIDEO0		Control

3A	VIDEO1		Data
3B	VIDEO1		Control

3C	EMPTY		Must be empty

3D	EPROM		EPROM programmer

3E	CPU RAM

3F	CPU ROM


3.0 Interrupt assignments

Vector	Device
------	------

00	KEYBOARD
02	PRINTER/PARIO
04	-
06	-
08	UART0/UART1
0A	-
0C	FLOPPY
0E	TIMER
10	UNKNOWN	    (interrupt without vector)


4.0 Device descriptions


128K DRAM - 128K dynamic RAM
64K DRAM  - 64K dynamic RAM

    Ports:
    	-

    Segments:
    	00-1F,
	20-2F

    Interrupt:
    	-

    Description:
    	DRAM contains 192 K dynamic RAM for general use.
	It is split in 2 boards: a 128 K card, (segments 00-1F),
	and a 64 K card, (segments 20-2F),to improve
	relyability.


    Usage:
    	Should be known.


CPU RAM - 1K static ram on the cpu card


CPU ROM - 4K rom containing naked DIAMOND


DEVICE - Device template (use H0*/E)

    Ports:
	...

    Segments:
	...

    Interrupt:
	...

    Description:
	...


    Port layout:
    	XX  Port description

	    IN
	    	bx	...

	    OUT
	    	bx	...

    Usage:
	...

    Bugs:
	...



EMPTY - Empty memory

    Ports:
	-

    Segments:
	3C

    Interrupt:
	-

    Description:
	This memory is intended empty, and is usually used as
	segment BC. Its purpose is to keep some part of the virtual
	address space empty.

    Usage:
	The segment reads FF due to databus pull-up


EPROM - 2716,2732A Eprom programmer

    Ports:
	FE

    Segments:
	3D

    Description:
	EPROM is capable of reading/writing either an
	2716 or 2732A eprom.

    Port layout:
    	FE  Control port

	    IN
	    	b7-b2	-
	    	b1	Programming
	    	b0	Vpp available

	    OUT	Start program cycle

    Usage:
	When not programming EPROM is just 2K or 4K or ROM.
	To program a byte, just write it to the appropriate
	address and issue an OUT (FE). EPROM memory will
	not respond to CPU while programming is in progress.

    Bugs:
	A few milliseconds should be waited after the OUT because
	of the set-up time of the programmer.


FLOPPY - 5-1/4" Floppy disk drive controller

    Ports:
	DA,DB,DC,DD,DE,DF

    Segments:
	35

    Interrupt:
	0C

    Description:
	FLOPPY is a 5-1/4" floppy disk drive controller capable
	of controlling 2 drives on multiplexing base.


    Port layout:
    	DA  Disk changed port

	    IN
	    	b7-b2	-
	    	b1	Disk 1 changed
	    	b0	Disk 0 changed

	    OUT
	    	b7-b2	-
	    	b1	Disk 1 changed reset
	    	b0	Disk 0 changed reset

    	DB  Control port

	    IN
	    	b7	DMA flag
		b6-b0	-

	    OUT
	    	b7	DMA flag, 0=OFF 1=ON
		b6	DMA R/W flag, 0=R 1=W
		b5	PRECOMP, 0=OFF 1=ON
		b4	-
		b3	DENSITY, 0=DOUBLE 1=SINGLE
		b2	DRIVE, 0=DRIVE0 1=DRIVE1
		b1	HEAD, 0=HEAD0 1=HEAD1
		b0	INTENABLE, 0=DISABLE 1=ENABLE

	DC  1791 Command/status register

	    IN	Status register
	    OUT	Command register

	DD  1791 Track register

	DE  1791 Sector register

	DF  1791 Data register


KEYBOARD - 8085 keyboard-scan co-processor

    Ports:
	E3,E6

    Segments:
	-

    Interrupt:
	00


MMU - Memory management unit

    Ports:
	FF

    Segments:
	-

    Interrupt:
	-

    Description:
	MMU implements the virtual-to-real address mapping. The
	system used is paging with 16 4K pages and 64 4K page
	frames. Page number x (virtual x000-xFFF) is mapped to
	page frame yy (real yy000-yyFFFF), 00<=yy<=3F. Ordinator
	terminology calls them "segments" both. In addition,
	page frames can be write-protected.

	Virtual 0000-00FF are special: they can unconditionally
	be mapped to real 3F000-3F0FF.

    Port layout:
    	FF  MMU control port

	    IN	Switch off special mapping on virtual 0000-00FF

	    OUT
	    	b7	Write protect for page a15-a12
	    	b6	-
	    	b5-b0	Page frame for page a15-a12

    Usage:
	The special mapping of 0000-00FF is turned on by all
	three buttons on the CPU card (RESET, NMI, MAP) and
	turned of by IN (FF).
	To map page x to frame yy issue an OUT (x-FF),yy.
	Thus the page number is passed on a15-a12.


PARIO - Parallel I/O


PRINTER - Printer interface


ROM - 8K rom

    Ports:
	-

    Segments:
	36,37

    Interrupt:
	-

    Description:
	ROM is intended as storage area for the extensions
	of diamond. It consists of 2 ROM sockets, connected
	for 2732 EPROMS.

    Usage:
	For diamond, segment 36 is located at 4000-4FFF, and
	segment 37 is located at 5000-5FFF.To get an extension
	started, the first 2 bytes of the ROM must cointain an
	address in the ROM itself. If so, this adress is called
	at hardware initialisation time, to initialize the
	extension. If the extension adds commands, the
	modification in the command table should be made
	in this call.


SWITCH - 8 DIL switches

    Ports:
	E7

    Segments:
	-

    Interrupts:
	-

    Description:
	SWITCH is an i/o port, to determine several hardware
	constants, like the baudrate of the diagnostic monitor
	('DIAMOND'), the ability to start the diskbootstrap
	automatically, and the ability to start multi-user.

    Port layout:
    	E7  Switch port

	    IN
	    	76543210

		0bpprrrr	b     = bits/char (7/8)
				pp    = parity  (even/odd/none)
				bbbb  = baudrate

		1xxxxxxx	Default values,
				    (9600 baud, 7bits, even)

		11xxxxxx	Try to start the diskbootstrap
				when RESET is pressed.

		111xxxxx	Muti-user possible

    Usage:
	Switch is normally only for system maintenance.



TEMP I/O - Temporary I/O card

    Ports:
	40,41,42,43,44,45,46,47

    Segments:
	-

    Interrupt:
	-

    Description:
	TEMP I/O implements two RS232 lines and a simple
	cassette interface.

    Port layout:
    	40  Terminal

	    IN
	    	b7-b1	-
	    	b0	Terminal input

	    OUT
	    	b7-b1	-
	    	b0	Terminal output

    	41  Line

	    IN
	    	b7-b1	-
	    	b0	Line input

	    OUT
	    	b7-b1	-
	    	b0	Line output

    	42  Cassette

	    IN
	    	b7-b1	-
	    	b0	Cassette input

	    OUT
	    	b7-b1	-
	    	b0	Cassette output

	43-47	-

    Usage:
	On the two RS232 ports one must play uart software.
	On the cassette port one directly reads/writes tape
	values.


TIMER - Real time clock timer

    Ports:
	E7,E8,E9,EA,EB

    Segments:
	-

    Interrupt:
	0E

    Description:
	The timer consists of an Intel 8253 timer/counter, and
	an extra control port which affects some functions not
	direct controllable by software.

    Port layout:
    	E7  Port description

	    IN
	    		Read resets a pending interrupt given

	    OUT
	    	bx	...

    Usage:
	...

    Bugs:
	...




UART0 - 2651 0


UART1 - 2651 1


VIDEO0 - Video display 0


VIDEO1 - Video display 1