Language:

Agat-7. Project concept.

Tags: No Tags
Comments: No Comments
Published on: 11/04/2012

Lets discuss the concept of the replica of Agat-7 computer. This version is not final and can be (and most likely will be) adjusted. As usual, all your ideas are welcome!

CPU.

A Bulgarian 6502 clone CM630 will be used as CPU in the project. But it can be changed to any other 6502 clone because it has exactly the same pins. I am aware that there are some 6502 compartible “soft-processors”. I even did a trial of some of those in the real project instead of the “real” one. But all of them were not 100% compatible with the original 6502 by undocumented commands and cycle times. It can affect compatibility with some programs.

CPU frequency on Agat-7 is 1,021MHz. The replica will use 1.016MHz frequency because it is easier to achieve. It is only by 0.5% less than original and is insignificant.

Memory.

All ROMs will be allocated in FPGA because of their small size. It will include “System Monitor”, two charsets and ROMs for floppy-drives and serial-parallel interface. It will decrease the chips quantity on the board.

RAM will be done on one SRAM (10ns) chip with 128K х 16 size (128K of 16-bit words), which by fact is 256 Kbytes. All 96Kbytes of RAM and 48Kbytes of “Cell 121” RAM will be allcoted in it. The first 8 bits of 16-bit word are used for even addresses of RAM and the rest for odd addresses. Such allocation is very convenient to use by videocontroller, because it can read 2 bytes in one step (please, see Video section below for details).

96K RAM will be connected as 32K of the main system memory, 32K of extended RAM in slot 4 and 32K of ROM emulation card in slot 2.

Video.

There will be RCA, S-Video and VGA video outputs in the replica. The output can be chosen by a switch. VGA output will use 1024 х 768 х 65Hz mode as the most suitable for Agat-7 grafics modes. For instance, each dot of 256х256 mode can be displayed on VGA display as a block of 4 pixels in a row in 3 rows (256х4=1024, 256х3=768). But it requires to read video RAM with much higher speed than in the original computer and it can be done only during the CPU half-cycle when it doesn’t use buses. To achieve it 10ns and 16-bit SRAM memory is used, which allows to read 2 bytes of RAM at one step and do enouth of such steps during the CPU half-cycle to fill a buffer with enough data to display until the next CPU half-cycle.

VGA output will be the main. TV outputs will be build with AD725 chip.

“Cell 121”, that allows to launch Apple-][ programs on the computer in its grafic modes, will be created in FPGA as well.

Initially, Agat-7 computer was manufactured with a charset that contained only capital letters, but further it was replaced with the full charset. For compatibility, both charsets will be used in the replica with the optin to switch between them at any time with a toggle switch.

Sound.

A speaker will be used for sound output with the similar schematic as in the original computer with some changes (for instance, a Darlington transistor will be replaced with a MOSFET).

Tape in/out.

Most likely the schematic from the original computer will be used as well, because of its simplicity. But some test are required to make sure that it is reliable enough. As an alternitive I2S encoder/decoder chip can be used.

Keyboard.

The computer will have two keyboard sockets. One for usual PS/2 keyboard and another for original keyboard. There will be a switch to choose the source.

Also, an analog of the original keyboard will be built for those, who want better experience but don’t have an original keyboard. An ATTiny microcontroller will be used for it.

140K floppy drive.

There is no intention to use real floppy-drive in the replica. Instead of it 140K floppy drive in slot 3 will be emulated with ATMega644 microcontroller. It can be switched off. LCD alphanumeric 20×4 display will be used to choose a disk image from SD card with FAT32 file system. It will emulate a floppy-disk drive using the image. It will be possible to write and read from the image. Disk image format needs to be 227.5 Kbytes .nib format. An image can be opened in read only or read&write modes. Images have to be recorded to SD card prior of use.

The microcontroller requires 5V power supply to work on 20Mhz, so it will be the main voltage for this module. A buffer chip TXB0104 will be used to communicate with the SD card (which requires 3.3V).

LCD display will be connected with 4-bit bus.

840К Floppy-drive.

There is no intention to use real floppy-drive in the replica. Instead of it 840K floppy drive in slot 5 will be emulated with STM32L152 microcontroller.

The reason of using STM32 microcontroller instead of ATMega is its ability to support DMA exchange and has more 1.5 times higher working frequency. It is important for 840K floppy-drive emulation because it requires twice higher exchange speed than 140K floppy-drive. The prices for both microcontrollers are almost the same.

For sure, it would be better to use the same microcontrollers in the project, but 140K device has been already done by me and I don’t see any point to rewrite it for STM32 at this stage. May be it will be done in one of the following revisions.

The floppy drive can be switched off. LCD alphanumeric 20×4 display will be used to choose a disk image from SD card with FAT32 file system. It will emulate a floppy-disk drive using the image. It will be possible to write and read from the image. Disk image format needs to be 2,020 Kbytes .aim format. An image can be opened in read only or read&write modes. Images have to be recorded to SD card prior of use.

3.3V power supply will be used for the module. A buffer chip will be used to communicate with 5V LCD display.

Each floppy drive will be independent from each other and have its own SD card slot and control.p>

Serial-Parallel interface (SPI).

This extension board will be emulated in slot 6 and can be switched off with a toggle-switch. It will have an external socket, but it won’t be an original socket (it is difficult to buy it now). A standard IDE socket will be used instead. Devices can be connected to this socket with adapters.

The SPI will be built on CPLD Altera MAX I.

Extension slot.

It will be possible to connect extension boards to the computer. The original socket for extension boards will be used. Any original board can be connected to it and will be recognized in slot 6 or turned off by a toggle switch. This slot can be used, for instance, to connect an original floppy-drive controller to copy real disks to SD-card.

Power supply.

The computer will require external 15-19V DC power supply. The most laptop power supplies can be used (but some sort of an adapter may be required). There will be following power lines in the computer: 12V (for SPI), 5V, 3.3V and 1.8V (for FPGA).Linear DC-DC converters will be used. This solution instead of standard ATX power supply unit was used to make the computer to fit in a compact enclosure.

Enclosure and PCB.

2-layers PCB will be used with extensive use of SMD components. LCD displays and controls will be allocated on top of the main board. The most of the computer will be in FPGA chip Altera Cyclone II EP2C5T208. To save FPGA pins multiplexers for keyboards, floppy-drives, video outputs etc. Will be used. For signals that don’t require high speed responses (switches, indicators etc.), I2C port extender will be used.

Kits for DIY will be designed if enough interest exists.

In the next posts I’ll describe what has been already done and give some examples from the project. Please, subscribe and leave your comments. See ya!

Leave a Reply

Welcome , today is Wednesday, 29/03/2017