Spectrum memory.

ZXNet echo conference «hardware.zx»

From Kirill Frolov To All 14 March 2000

Hello All! I’ve been thinking for a long time that Spectrum needs a more powerful tool memory addressing control over 64 kilobytes. I'll try explain why. The Z80 processor without additional logic cannot address more than 64kb, the fact is that the Z80 uses 16-bit registers PC, HL, BC, DE, SP, IR (IV), IX, IY. Moreover, the problem is in the registers, and not in the width of the address bus, this fact is worth noting. The width of pointer registers is not allows you to address more than 64 KB of contiguous data. In the original Spectrum-128 to increase the available The memory processor was given the ability to access several memory banks through a window in the upper addresses of the processor C000..FFFF. The processor could only access at a time one of the banks accessible only through this window, this limited the size of simultaneously addressed continuous data located in banked memory of 16kb. In everything else 48kb of contiguous memory was available, but this is only ~30% from all memory. In the process of further development of ZX-SPECTRUM on space ex-USSR amount of RAM ZX-SPECTRUM has been constantly increasing to date has reached the average size 512kb. Maximum amount of RAM in serial on manufactured computers reaches 4MB. At the same time, almost everything computers have retained the method of addressing memory larger than 64 kBthe same as that used in spectrum-128. Memory is connected only through one window in addresses C000..FFFF in banks of 16kb. But if in spectrum-128 the amount of banked memory is no more than 3 times higher than the rest of the continuous memory, then currently existing spectrum-compatible computers Continuous memory is sometimes less than 5% of memory accessible only through the window. With a total memory capacity of 1Mb Effective operation is possible only with 16kb of continuous data. A due to the fact that there is only one window to access additional memory makes data transfer significantly more difficult between different memory banks. Memory usage in modern spectrum-compatible devices computers have become ineffective! Initially, the question was posed, what does the spectrum need for more efficient memory work was hampered. There were different options, but it all depended on the relative complexity of the scheme or its ineffectiveness due to its simplicity. Option I also didn’t like the one proposed by Ivan Mak, also because the complexity of the circuit and the large number of microcircuits used. Yes and also exotic 1533IR26 which are easy to get in St. Petersburg, but almost impossible in the outback. It just gave me an idea microcircuit 61256 that fell into your hands... I present the diagram in the version that I have chosen for now. Signals A12..A15 and D0..D7 are taken directly from the processor.Not all addresses from the 32 kilobytes of memory 61256 are used, it is possible to add new features and ways of working with memory. For example, you can add low processor addresses and Make it a little easier to work with the Spectrum screen. The hardware circuit has not been tested, there is still a question of choice control port available for reading and writing and not conflicting with other computer devices. Yes some doubts about connecting OE, WE, CS signals microcircuits 61256. ┌───────┐ / EA14 ───┤ SRAM ├──╥── RA12 \n EXPANSION | EA15 ───┤ 61256 ├──╫── RA13 | ADDRESS BUS / EA16 ───┤ D├──╫── RA14 | ADDRESS BUS 7FFD, 1FFD EA17 ───┤A A├──╫── RA15 RAM up to to multiple| EA18 ───┤D T├──╫── RA16 / multiplexers EA19 ───┤D A├──╫── RA17 | │R ├──╫── RA18 | A12 ───┤E ├──╫── RA19 / A13 ───┤S │ ║ A14 ───┤S │ ║ A15 ───┤ │ ║ │ │ ║ │ │ ║ │ │ ║ MREQ ───────oOE │ ║ ┌──────────────oWR │ ║ │ ┌───oCS │ ║ │ │ └───────┘ ║ │ ─┴─ ║ │ ┌─────┐ ║ │ D0 ───┤ >> ├──╢RA12│ D1 ───┤ AP6 ├──╢RA13 │ D2 ───┤I O├──╢RA14 │ D3 ───┤N U├──╢RA15 │ D4 ───┤P T├──╢RA16 │ D5 ───┤U P├──╢RA17 ├───────┐ D6 ───┤T U├──╢RA18 │ │ D7 ───┤ T├──┘RA19 │ ┌──┐ │ │ │ WR.CFG──┴─┤1 │ └────────oDIR │ RD.CFG ───┤ ├───────────oCS │ └──┘ └─────┘ LЁ1 WR.CFG and RD.CFG signals read/write configuration via port The port address is selected as APPP, where A is the address in RAM configuration, PPP -- port address Initially, two operating modes were planned: standard for ZX-SPECTRUM, when banks of 16kb each in addresses C000..FFFF switched through ports xxFD, and extended, when in any location of the processor address space in 4kb increments, you can connect any memory bank with a size of 4kb, and xxFD ports are used to quickly change the memory configuration (in advance given). The maximum amount of addressable memory is one megabyte, which is quite enough for the Z80 with performance no more several MIPS. More than a megabyte of memory can be used like a RAM disk or memory with slow access through a window C000..FFFF. Other memory addressing methods are also possible. SRAM 61256 chip is taken from 386 or 486 motherboard IBM-PC boards Its typical performance is 15ns, which is what it should beenough for normal operation of DRAM chips, but in separate well turbocharged scorpions or kayas can be obtained problems :-( Before starting the computer after turning on the power, be sure to initialization needed! It is necessary to flash the ROM, as well as provide the ability to disable it for a more complete use of the processor address space. The practical significance of the second addressing mode is great while I won't go into details. I’ll just write that about Some uzix machines operate with this memory configuration. The choice of a bank size of 4kb is also not accidental: in a working system to ensure the operation of the system of interrupts and system calls it is necessary to leave one permanent bank, like a ROM for example. If the bank volume is large, then the maximum volume is continuously addressable memory is reduced, and this is what caused everything started. If the volume is small, then the time consumption increases on switching banks and the maximum amount of banked memory (now 1Mb). If anyone thinks that 4kb is not enough, then I can reassure - as I wrote above, a quick change is possible configurations via xxFD ports. It was not by chance that I mentioned uzix, if anyone else remembers, on MSX there is a UZIX system based on UZI - UNIX Z80 IMPLEMENTATION. A prerequisite for installing the system is the ability to swapping processes. The described system allows you to doswapping with one output to the port. Of course I want to have possibility of write protection of individual memory banks, but for now nothing comes to mind. If you have ideas, write. * Crossposted in SPB.SPECCY *Crossposted in REAL.SPECCY * Crossposted in KHARKOV.SPECTRUM *Crossposted in HARDWARE.ZX Kirill