![]() Details about the K & P 80-column interface
(MZ-700)
written by Bernd Krueger-Knauber / Germany
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Overview |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
It is impossible to set any pixel by this interface. Pixels can be set or reset only by using one dot matrix of the character set. The K&P 80-column interface can be used with CP/M 2.2 and the K&P SFD700 single floppy drive(s). The disks will have a capacity of 360kb and are compatible to the format of the MZ-80A / MZ-80B. This means, that all programs which are executable under these systems, also can be used with an MZ-700. The free RAM space is 50kb. Terminal emulation: ADM 3 A |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
General |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
R18 and R19 function as a pointer to the video RAM. If a write access occurs the register pair is automatically incremented by the chip. This internal technique makes the access much more faster. If a read access occurs the CPU directly reads from a video RAM location - the SY6845E is not selected and thus, can't set the registers R18/R19. R18/19 must be programmatically supplied with a new pointer and an access to register R31 is also required to signal that R18/R19 contain valid values. The interface uses the following I/O ports:
Initialization of the SY6845E ( default values ):
Summary of intialization: Screen size: 80 characters x 25 lines. Example of the initialization using the values shown above: tab6845 db #7F,#50,#64,#0C,#1E,#02,#19,#1C,#78,#09,#60,#09,#00,#00,#00,#00 CRT_Init LD BC,1072h ;B = 16, C = $72 LD HL,tab6845 ;HL = pointer to the init values XOR A ;A = 0 CRT_Init_Loop OUT (C),A ;$72 set register INC C ;$73 LD D,(HL) ;load the next init value in D OUT (C),D ;$73 address DEC C ;$72 INC HL ;tab + 1 INC A ;reg + 1 DJNZ CRT_Init_Loop ;loop for 16 registers Next the screen should be immediately cleared with spaces, because
all characters in the video RAM have an initial value of $00 ( = ASCII
"@", see Appendix A ), otherwise 2000
@-characters would be displayed. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Printing a character |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Next wait for the ready state of the SY6845E ( indicated by bit 7 = 1 of the status register at port $70 ). Now a data byte can be outputted via port $71. The character will be displayed at the specified position on the screen. The video RAM pointer R18/19 is automatically incremented. To print further characters you have to check the status register first. Set R18/R19 again if the sequence of your data position isn't continuous. Example: Put a space character at the first two locations LD A,18 ; register 18 OUT (72h),A ; select it LD A,0 ; load 0 OUT (73h),A ; in register 18 LD A,19 ; register 19 OUT (72h),A ; select it LD A,0 ; load 0 OUT (73h),A ; in register 19 LD A,31 ; register 31 OUT (72h),A ; select it (now the new pointer will be used) WaitForUpdate1: IN A,(#72) ;read address/status register BIT 7,A ;if bit 7 = 1 then update is ready JNZ UpdateReady1 JR WaitForUpdate1 UpdateReady1: LD A,' ' ; load ' ' OUT (71h),A WaitForUpdate2: IN A,(#72) ;read address/status register BIT 7,A ;if bit 7 = 1 then update is ready JNZ UpdateReady2 JR WaitForUpdate2 UpdateReady2: LD A,' ' ; load ' ' OUT (71h),A |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Reading a character |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example: Put a space character at the first two locations LD A,18 ; register 18 OUT (72h),A ; select it LD A,0 ; load 0 OUT (73h),A ; in register 18 LD A,19 ; register 19 OUT (72h),A ; select it LD A,0 ; load 0 OUT (73h),A ; in register 19 LD A,31 ; register 31 OUT (72h),A ; select it (now the new pointer will be used) WaitForUpdate1: IN A,(#72) ;read address/status register BIT 7,A ;if bit 7 = 1 then update is ready JNZ UpdateReady1 JR WaitForUpdate1 UpdateReady1: IN A,(70h) ; read the first location LD A,18 ; register 18 OUT (72h),A ; select it LD A,0 ; load 0 OUT (73h),A ; in register 18 LD A,19 ; register 19 OUT (72h),A ; select it LD A,1 ; load 1 OUT (73h),A ; in register 19 LD A,31 ; register 31 OUT (72h),A ; select it (now the new pointer will be used) WaitForUpdate2: IN A,(#72) ;read address/status register BIT 7,A ;if bit 7 = 1 then update is ready JNZ UpdateReady2 JR WaitForUpdate2 UpdateReady2: IN A,(70h) ; read the second location |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Scrolling |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Generally scrolling is done by using the display start registers R12/13. This register pair points to the first video RAM position. If this register pair is incremented by 80, the screen scrolls one line up. The new last line contains the last 48 unused bytes now, and additional, the first 32 bytes of the former first line. This line must be programmatically erased. Scrolling down is similar: The register pair R12/13 must be decremented by 80. If the scrolling is done the 'offset' must be used for the video RAM
pointer registers R18/19. Now the pointer value 0 is no longer the first
displayed character. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Cursor positioning and cursor dimensions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The size of the cursor can be set by the registers R10/R11. It is also
possible to switch the cursor off by register R10. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Downloads and Technical References | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
You can download the following manuals (PDFs):
Download and read information about the K&P 80-column Disk Basic. Read an overview and view pictures of the interface. I do not have the original data sheet of the SY6845E, but I think, the manuals shown above will help in most cases. Please contact me if you can support me with the data sheet.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Appendix A (Character set) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0 (00) 1 (01) 2 (02) 3 (03) 4 (04) 5 (05) 6 (06) 7 (07) -------- -------- -------- -------- -------- -------- -------- -------- OOO OOO O OOO OO OO O O O O O O O O O OOO O O O O O O O O O O O O O O O O O OOO O O O OO O OO O OO O O O O O O O O O OOO OOO O OOO O O O O O O OO OO -------- -------- -------- -------- -------- -------- -------- -------- 8 (08h) 9 (09h) 10 (0Ah) 11 (0B) 12 (0C) 13 (0D) 14 (0E) 15 (0F) -------- -------- -------- -------- -------- -------- -------- -------- O OO OOO OOO O O O O O O O O O O O O O O OOO OO O OOOO OOO O O OOO O O O O O O O O O O OOOO O O O O OOOO O O OOOO O O OOO OOOO O O O O OOO O O O OOOO OOOO OOOO OO OOO -------- -------- -------- -------- -------- -------- -------- -------- 16 (10) 17 (11) 18 (12) 19 (13) 20 (14) 21 (15) 22 (16) 23 (17) -------- -------- -------- -------- -------- -------- -------- -------- OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO -------- -------- -------- -------- -------- -------- -------- -------- 24 (18) 25 (19) 26 (1A) 27 (1B) 28 (1C) 29 (1D) 30 (1E) 31 (1F) -------- -------- -------- -------- -------- -------- -------- -------- OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO -------- -------- -------- -------- -------- -------- -------- -------- 32 (20) 33 (21) 34 (22) 35 (23) 36 (24) 37 (25) 38 (26) 39 (27) -------- -------- -------- -------- -------- -------- -------- -------- O O O O O O OO O O O O O O O OOOO OO O O O O O O O OOOOO O O O O O O O O O OOO O OO OOOOO O O O O O O O O OOOO O OO O O O O O O OO OO O -------- -------- -------- -------- -------- -------- -------- -------- 40 (28) 41 (29) 42 (2A) 43 (2B) 44 (2C) 45 (2D) 46 (2E) 47 (2F) -------- -------- -------- -------- -------- -------- -------- -------- O O O O O O O O O O O O O O O O OOO OOOOO OOOOO O O O O O O O OO O O O O O OO OO O O O O OO O -------- -------- -------- -------- -------- -------- -------- -------- 48 (30) 49 (31) 50 (32) 51 (33) 52 (34) 53 (35) 54 (36) 55 (37) -------- -------- -------- -------- -------- -------- -------- -------- OOO O OOO OOOOO O OOOOO OO OOOOO O O OO O O O OO O O O O OO O O O O O OOOO O O O O O O O O O O O OOOO O OO O O O O OOOOO O O O O O O O O O O O O O O O O OOO OOO OOOOO OOO O OOO OOO O -------- -------- -------- -------- -------- -------- -------- -------- 56 (38) 57 (39) 58 (3A) 59 (3B) 60 (3C) 61 (3D) 62 (3E) 63 (3F) -------- -------- -------- -------- -------- -------- -------- -------- OOO OOO O O OOO O O O O OO OO O O O O O O O O OO OO O OOOOO O O OOO OOOO O O O O O O OO OO O OOOOO O O O O O OO OO O O OOO OO O O O O O -------- -------- -------- -------- -------- -------- -------- -------- 64 (40) 65 (41) 66 (42) 67 (43) 68 (44) 69 (45) 70 (46) 71 (47) -------- -------- -------- -------- -------- -------- -------- -------- OOOO OOO OOOO OOO OOO OOOOO OOOOO OOOO O O O O O O O O O O O O OOO O O O O O O O O O O O O OOOOO OOOO O O O OOOO OOOO O OO OOO O O O O O O O O O O O O O O O O O O O O O O O O OOOO O O OOOO OOO OOO OOOOO O OOOO -------- -------- -------- -------- -------- -------- -------- -------- 72 (48) 73 (49) 74 (4A) 75 (4B) 76 (4C) 77 (4D) 78 (4E) 79 (4F) -------- -------- -------- -------- -------- -------- -------- -------- O O OOO OOOO O O O O O O O OOO O O O O O O O OO OO O O O O O O O O O O O O O O OO O O O OOOOO O O OO O O O O O O O O O O O O O O O O O O O OO O O O O O O O O O O O O O O O O O O OOO OO O O OOOOO O O O O OOO -------- -------- -------- -------- -------- -------- -------- -------- 80 (50) 81 (51) 82 (52) 83 (53) 84 (54) 85 (55) 86 (56) 87 (57) -------- -------- -------- -------- -------- -------- -------- -------- OOOO OOO OOOO OOOO OOOOO O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O OOOO O O OOOO OOO O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O OO O O O OOOO O OOO O O O -------- -------- -------- -------- -------- -------- -------- -------- 88 (58) 89 (59) 90 (5A) 91 (5B) 92 (5C) 93 (5D) 94 (5E) 95 (5F) -------- -------- -------- -------- -------- -------- -------- -------- O O O O O O O O O O OOOOO O O O O O O OOO OOO O O O O O O O O O O O O O O O O O O O O OOOOO O O O O O O O O O O O O O O O O O O O O O O O O O O O OOOOO O O OOO OOO OOOOO -------- -------- -------- -------- -------- -------- -------- -------- 96 (60) 97 (61) 98 (62) 99 (63) 100 (64) 101 (65) 102 (66) 103 (67) -------- -------- -------- -------- -------- -------- -------- -------- O O O O O O OO O OOO OOO OO OOO OO O OOO O O O O O O O O O OOO O O OOOO O O O O O OOO O O O O O O O O O O O O OOO OOOOO OOOO OOO OOOO OOO O O OOO -------- -------- -------- -------- -------- -------- -------- -------- 104 (68) 105 (69) 106 (6A) 107 (6B) 108 (6C) 109 (6D) 110 (6E) 111 (6F) -------- -------- -------- -------- -------- -------- -------- -------- O O OO O O O O O OOO O O O OOOO OOO OO O O OO O O O O O O O O O O O O O O O OO O O O O O O O O O O O O O O O O O O O O O O O O OOO O O O O OOO O O O O O OO O -------- -------- -------- -------- -------- -------- -------- -------- 112 (70) 113 (71) 114 (72) 115 (73) 116 (74) 117 (75) 118 (76) 119 (77) -------- -------- -------- -------- -------- -------- -------- -------- O OOO OOO O OO OOO OOO O O O O O O O O O O OO O O O O O O O O O O O O O OO O O O O O O O O OOO OOO O O O O O O O O O O O O O O OOO O OOOO O O O O O -------- -------- -------- -------- -------- -------- -------- -------- 120 (78) 121 (79) 122 (7A) 123 (7B) 124 (7C) 125 (7D) 126 (7E) 127 (7F) -------- -------- -------- -------- -------- -------- -------- -------- O O O O O O OOO O O O O O O O OO O O O OOOO OOO OO O O O O O O O OO O O O O O O O O O O O O O O O O OOOO O O O O O O O O O OO OOO O O O O O O O O O O O O OO O OOOO OOOOO OO OOOO O OO O O O OO O -------- -------- -------- -------- -------- -------- -------- -------- |