Inferno #02
01 мая 2001 |
|
For Coderz - Description of a personal computer ATM-TURBO 2 +.
Personal computer TURBO 2 + PCB version 7.00-7.10 Technical description and Programmer's Guide. (C) MicroArt (C) MaxSoft 1995 (?) The structure of memory and I / O ports 1. System port Address Access: # 77 Picks: A0 = 1, A1 = 1, A2 = 1, A3 = 0, A4 = 1, A7 = 0, WR = 0 Appeal to this port is carried out in mode dosen = on or mode of CP / M. D0 - RG0 \ D1 - RG1 - code videomode D2 - RG2 / D3 - TUR CPU Frequency 1-7MHz 0-3.5MHz D4 - Z_M reserved - must be set to 0 D5 - Z_I interrupts HSYNC (50 Hz) 1-enabled 0 - disabled D6 - VE1 1-interdiction operation 8031 (All requests go to the zx keypad) D7 - VE0 the board as 7.10 is not used (Default should be set in 1) A8 - PEN 0 - off. Memory Manager (System ROM is included in all windows) 1 - incl. memory manager. A9 - CPM 0 - inclusion dosen resolution write to the port of pages, SYS ets. 1 - lock dosen (ports of entry in sys, pgwr, fdd, hdd only from TR-DOS) A14 - PEN2 0 - recording resolution panel, 1-ban entry panel ; Screen video modes RG2 '& ampRG1' & ampRG0 ; Sinclair 3 ; 640x200 GRAPH 2 ; 320x200 GRAPH 0 ; 640x200 Text 6 Programmers need to remember that when switching from Sinclair screen and high resolution screens, entangled address space of RAM namely, A5, A6, A7 and A8, A9, A10, respectively; If you want to switch the screen mode - switching program should take no longer than 32 bytes and located at the address with the same A5, A6, A7 and A8, A9, A10, respectively, otherwise your program will hang! 2. Multiplexer pages Access address: # F7 Picks: A0 = 1, A1 = 1, A2 = 1, A3 = 0, A4 = 1, A7 = 1, WR = 0 Call to this port shall be mode dosen-active mode, or CPM. Application Manager has allowed direct the computer to 1024KB and 1024KB RAM ROM. In this case, it is possible to include _LYUBUYU_ Page of memory (16KB) in _LYUBOE_ of the four windows memory (address: # 0000, # 4000, # 8000, # C000) at 16K. Manager is divided into two parts to 4 bytes each. These parts contain a map pages at ROM2 = 0 and ROM2 = 1. D0 - RAM '& ampROM invert PAGE 0 D1 - RAM '& ampROM invert PAGE 1 D2 - RAM '& ampROM invert PAGE 2 D3 - RAM '& ampROM invert PAGE 3 D4 - RAM '& ampROM invert PAGE 4 D5 - RAM '& ampROM invert PAGE 5 In these bits is given by the inverse number page D6 - RAM / ROM 1-resolution RAM, 0-ROM D7 - MX_A 1-enable signaling (PAGE0-PAGE2) from the port # 7FFD A14 - window sel 0 A15 - window sel 1 Well, here given sampling window 0 - # 0000 1 - # 4000, 2 - # 8000, 3 - # C000 Standard map of the distribution of memory in different modes the computer: mode Spectrum-128 Spectrum48 TR-DOS CPM-system CPM-users roms ROM2 = 1 ROM2 = 0 ROM2 = x ROM2 = 1 ROM2 = 0 # 0000 ROM-# 3E ROM-# 3C ROM-# 3D ROM-# 3F RAM-0 # 4000 5 RAM-RAM-5 RAM-5 RAM-RAM-May 4 # 8000 RAM-2 RAM-2 RAM-2 RAM-2 RAM-2 # C000, see the state of port # 7FFD RAM-1 or 3 RAM-3 In the ZX-SPECTRUM in the window with the address # C000 can be turned on every page 0 to 7 (depending on the status of the port # 7FFD) CPM-system-mode when active ROM monitor (working with the standard screen Procedure I / O drive, the survey keyboard interrupt) CPM-users-active mode when the program user (box 0 page 0 RAM) Note for fans to use 1024K of RAM all in SPECTRUM mode. Below is a standard procedure Switching to a Page 1024 SPECTRUM. When you call in the A page number is 0-3FH (Remember that the stack and the caller does not need to be in address above # C000) SET_PAGE PUSH AF AND 7; distinguish young alike ; Chiyah 3 bits OR # 10, at the discretion of And you can choose ; ROM, and screen. LD BC, # 7FFD OUT (C), A POP AF AND # 38; Masquerage all ; Bits, except ; 3 senior CPL; inversion ; Data (bit ; Sample RAM ; Platoon) LD BC, # 2A53; in TR-DOS ; OUT (C), A RET PUSH BC LD BC, # FFF7 JP # 3D2F; transition in ; TR-DOS After any such command port # 7FFD off. If you want to correct return to the SPECTRUM mode - run: EXIT_1024: LD A, # FF LD BC, # 2A53 PUSH BC LD BC, # FFF7 JP # 3D2F further management of pages as usually on port # 7FFD 3. SPECTRUM-128 port system Access address: # 7FFD Picks: A15 = 0, A9 = 1, A1 = 0, WR = 0 This port is used mainly in SPECTRUM-mode 128, but CP / M he needed to quickly change the memory card CPM-system <> CPM-users. The developers tried to make this place as much as possible compatible with the company ZX, but it not been entirely successful. D0-PAGE0 \ determine which page D1-PAGE1> imprinted mode D2-PAGE2 / Spectrum-128 addresses # C000 D3 - SCREEN - this defines the category in which page will be on-screen RAM. mode "SPECTRUM": 0 - 5-th page (from the address # 4000) 1 - 7 th page. in the mode of CP / M: 0 - 5-th page of the pixels, 1-I attributes 1 - 7 th page pixels, the third attribute D4 - ROM2 - this signal by switching the controller selects the BASIC-128 (1) or BASIC-48 (0). In CP / M switch CPM-system (1) or CPM-user (0) D5 - LOCK - write to this bit to "1" we do not allow further work with the port # 7FFD (this is done for full compatibility with the SPECTRUM-48). 4. Port PSTN Access address: # 7FFD Picks: A15 = 0, A9 = 1, A1 = 0, RD = 0 Port # 7FFD readable as a flag. D7 - willingness ADC: 1 - ADC is ready, 0 - is the transformation data. D6 - 1 indicates that the HDD has finished the last command (positioning, recording itp) D5 - version 7.0 of the board is not involved D4 - in the board version 7.0 is not involved 5. Port reading ADC Access address: # 7DFD Picks: A15 = 0, A9 = 0, A1 = 0, RD = 0 Used to read the status of the ADC. (These are only valid in the state ADC "done" (see above). 6. Ports music synthesizer Access address: # BFFD, # FFFD Picks: A15 = 1, A9 = 1, A1 = 0 Used to program the music synthesizer AY-8910 (12). 7. Printer port and a DAC. Access address: # FB Picks: A0 = 1, A1 = 1, A2 = 0 The board implemented a standard interface CENTRONIX. It requires no initialization. Reading this port copies the state of the signal BUSY BIT 7 printer battery. Standard output driver to the printer symbol from the register C. OUT_PRN IN A, (# FB) RLCA RET C; C FLAG = 1 ; Return (principle ; Ter is not ready) LD A, C OUT (# FB), A; derive data OUT (# 7B), A; pulse strobe OUT (# FB), A; reset gate RET; C FLAG = 0 Bytes ; Sent It must be remembered that this same- port connected to a digital-analog converter. 8. MISC I / O PORT Access address: # FA Picks: A0 = 0, A1 = 1, A2 = 0 Gates IOWR, IORD this port withdrawn on the system connector on your computer. With this port and port to CENTRONIX computer can connect 256 input and 256 output devices while maintaining full compatibility with original. In this case, the port address is written in CENTRONIX team-OUT (# FB), A, and the data is read by the command IN A, (# FA) or written by a team OUT (# FA), A. Data bus is buffered on the socket. For compatibility, all new development is recommended connect, using only this port. 9. Port Attributes Access address: # FF Picks: A0 = 1, A1 = 1, A2 = 1, A3 = 1, A4 = 1, A5 = 1, A6 = 1, A7 = 1, DOSEN = OFF, RD = 0 This port allows you to read the current, on-screen attribute. 10. Keyboard port Access address: # FE Picks: A0 = 0, A1 = 1, A2 = 1, RD = 0 About this port should tell us more. In the standard mode (without IBM keyboard), this port has the following appointment. D0 - KD1 \ D1 - KD2 \ D2 - KD3 keyboard data entry D3 - KD4 / D4 - KD5 / D5 - Z systemic signal from the PLA on this signal is based copy protection boards. Signal is activated after a certain number of clock cycles after the arrival interrupt (do not remember exactly what). Program by counting the number gets a byte which is the key and unpack the BIOS BDOS ... but in the last version 8031 to refuse it. D6 - TIN signal read from the tape. D7 - not used A8 - KA0 \ A9 - KA1 \ A10 - KA2 \ A11 - KA3 \ Address line keyboard A12 - KA4 / A13 - KA5 / A14 - KA6 / A15 - KA7 / Starting with version 7.00, in the computer appeared ms. 8031 that dramatically changed the operation of the port # FE and gave an opportunity to connect the IBM XT keyboard. When you try to read the contents of the keyboard, the processor instructs the IN A, (# FE), cocked specials. trigger and signal processor stops WAIT. In this case, the microcontroller 8031 interrupt is generated. After the necessary procedures for translation of the address lines microcontroller provides on the data bus CPU state of the keyboard, the signal WAIT is reset and the processor continues their work. The presence of 8,031 and an enhanced keyboard (101 keys) allows us to simplify survey keyboard in CP / M to the simple reading of the key code, however, it required the introduction of additional commands to control 8031, and since the only possible way to transfer data in 8031, this state of elder half Z80 address bus at the time of reading the port # FE, this method is used. Escape Sequences Keyboard: # 55 - indicates that the next byte is the command code for the keyboard. In Reply keyboard returns # AA - it can be used to test for 8031. LD A, # 55 IN A, (# FE) CP # AA JR NZ, NO_XT LD A, COMM; team (see below) IN A, (# FE) LD A, ARG1; additional ; Options (can , Absent) IN A, (# FE) LD A, ARG2; additional ; Options (can , Absent) IN A, (# FE) # 00 - Reads the code of key pressed. XOR A IN A, (# FE) ; In the battery-key code (the list codes below) # 80 - read 1-byte flags keyboard LD A, # 80 IN A, (# FE) # 40 - Read 2-byte flags keyboard LD A, # 40 IN A, (# FE) Command codes (Note: Before writing command code to give Ex. code # 55 in 8031 to convert the input mode commands): 1 to obtain the 1-byte version number program # 41 get a 2-byte version number program # 81 get 3 bytes of version number program # C1 a 4-byte version number program 7 to wipe the keyboard buffer and all Flags 8 DATA installation mode: bit 0, 1-set mode work 0 - Sinclair keyboard emulation 1 - read the key code (flags not processed) 2 - mode of CP / M 3 - direct reading of code after sequential port keypad Tours bit 7 - mode 0-lat a-rus (For CP / M) 9 to get the contents of the cell parameters myati 1 # 49 to get the contents of the cell parameters myati 2 # 89 to get the contents of the cell parameters myati 3 # C9 get the contents of the cell parameters myati 4 # 0A switch the input mode Russian letters # 0B to switch the input mode la institutions in the Palestinian letters # 0C program pause # 0D reboot # 10 seconds to get # 50 to get minutes # 90 hours to get # 11 seconds to set DATA # 51 DATA set minutes # 91 DATA set the clock # 12 get the number of # 52 a month # 92 a year # 13 DATA set the number of # 53 DATA set the month DATA # 93 set the year # 14 DATA forcibly sets a non- which signals (set of proceeds, if appropriate bit is 1) bit 0 = 0 bit 1 = 0 bit 2 = 0 bit 3 DTR bit 4 RTI bit 5 = 0 bit 6 = 0 bit 7 = 0 # 15 DATA forcibly resets some torye signals (reset occurs leads, if the corresponding bit equals 1 (see component # 14) # 16 read the contents of the port P3 bit 0 - bit 1 - bit 2 - bit 3 - bit 4 VE1 bit 5 - bit 6 - bit 7 - # 17 read the state of the RS232 bit 0 CD bit 1 CTS bit 2 RI bit 3 - bit 4 - bit 5 - bit 6 - bit 7 - 11. Port curbs Access address: # FE Picks: A0 = 0, A1 = 1, A2 = 1, WR = 0 This port is somewhat different from Standard SPECTRUM. The fact that CP / M border (and screen) can be any of the sixteen colors (from a palette 64). Therefore require additional bit color, which has been led by the inverse A3. D0 - BRD0 \ D1 - BRD1 color border D2 - BRD2 / D3 - TAPEOUT output to tape D4 - SOUND Loudspeaker D5 - not used D6 - not used D7 - not used A3 - BRD3 - 3rd bit color (inverse)
Other articles:
Similar articles:
В этот день... 21 November