Language:

AGAT-7. Rev.0 summary and start of Rev.A design.

Tags: No Tags
Comments: 4 Comments
Published on: 01/05/2013

I’m about to finalise my Rev.0 of the modern replica of the retro-computer “AGAT-7”. The next step will be Rev.A design with fixed mistakes, improvements and some new ideas. In this post I’m going to summarise the Rev.0 experience and share with you with some ideas for Rev.A.

At the moment the Rev.0 computer starts and works properly. Here is its photo:

I have been focused more on the hardware part of the project, because the software part can be polished later. Rev.0 has quite a lot of mistakes that I had to fix. It wasn’t an easy task with a such tight design. Let’s discuss each part of the computer, see what mistakes were done and what improvements can be made in Rev.A.

  1. Power supply

The power supply works well. Heat sinks do their job. The hottest chip is the MCP34063 that converts 15V from the input to 6.7V for further conversion to 5V, 3.3V and 1.2V by linear regulators. Its temperature is less than 65C. The other chips’ temperatures are even less than 55C. The computer without extension boards and the original keyboard consumes 250mA.

When I connected the original keyboard the current increased to 400mA. The temperature of the MCP34063 chip became 70C and the rest chips had a temperature less than 65C which is still fine.

3.3V and 1.2V linear regulators had incorrect layout, so I had to fix it with some wires. Also, in Rev.A I will add a bigger pad for the 3.3V regulator as a heatsink. Aluminium caps need to be moved away from heatsinks as well.

In Rev.A I want to remove separate switches for each “floppy-drive” and the computer. This solution is not good enough because it create a lot of interference when random switches go on and off. I will leave one main switch which turns on floppy drives and the computer can be started later with a “soft”-button after all setup in floppy-drives are done.

  1. Memory

I haven’t done a complex byte-by-byte memory test, because I’m not able to connect “floppy-drives” on this board (see its section for the details), but the computer starts, the video is working and random write/read operations to different memory pages work great. I assume that there are no problems in this module.

In Rev.A I’m going to replace SRAM with SDRAM. I’m currently experimenting with it on the Altera DE1. For the same price as 128Kb SRAM it will allow to have 16Mb memory on board that can be used as additional RAM in the future updates and store disk images for both floppy-drives. In this case we won’t need the second microcontroller.

  1. PS/2 keyboard.

The layout of the socket was incorrect, so I had to cut some traces and use some wires. Apart from that there are no issues with this module. The keyboard works as expected.

  1. Joysticks.

I don’t have original joysticks to connect and check and I’m not able to load a test program because of the floppy-drive issues, but when a random resistor is connected to the socket the module behaves exactly like expected giving proper output signals depend of the resistor value. The module will remain intact in Rev.A.

I may move it to the extension board though if I don’t have enough space on the main board.

  1. Original keyboard.

The keyboard works as expected and the module doesn’t require to be changed. But I consider moving it to the extension board as well if I run out of space.

  1. Tape input/output.

The output works great.

In the output schematic I had to add 100K resistor between comparator’s output and ground to make it work. But tests showed that reading is not stable enough with this schematic. I made another module on a breadboard with LM324 opamp (similar to the one used in “Apple IIe”). Its testing shows that with the 3.3V power supply the output signal is only 2.1V. With 5V power supply the output is 3.9V. 3.9V is quite close to the FPGA maximum 4.1V, so it is better to connect it through a level shifter. I have some spare outputs on the existing shifters.

Temporarily in Rev.0 I will use 2.1V signal, because the FPGA has a 1.8V threshold. Tests showed very good quality of the signal. There was only one mistake from 10 test readings. I believe that it will be improved even more with 5V power supply. The module reads tape records recorded on Rev.0 and with “AGAT-7” emulator on PC with the same success. The emulator also reads tapes recorded with Rev.0 without any problems.

In Rev.A the new module based on LM321 (a single version of the quad opamp LM324) will be used. It will powered with 5V and a spare level shifter will be used to reduce the output signal to 3.3V.

  1. Video outputs.

All three video outputs work well. Here are the photos of the output on VGA monitor and TV through S-Video:

VGA monitor:

TV by S-Video:

The TV picture has a bit of a greyish background compared to VGA but apart of that it looks fantastic. RCA output has some artefacts that are noticeable with a close look but from 1m distance they are not noticeable.

For some reason PAL subcarrier clock generator is not working on Rev.0, so I had to use the FPGA to generate it. I’m going to use the FPGA for this purpose in Rev.A as well because this solution is much neater. Also, I’m going to allow PAL/NTSC mode control by FPGA in Rev.A, so a different configuration can be used.

  1. Sound.

The module works as expected and is going to be used in Rev.A without any changes.

  1. 6502 CPU.

The CPU works fine. In Rev.A I’ll keep the same schematic except the RESET signal which will be pulled-down instead of pulled-up like in Rev.0. It will prevent the CPU to start before FPGA is configured.

  1. Extension socket.

I haven’t checked this module because I didn’t want to solder a quite rare original socket to this temporary board. I don’t expect any issues with it anyway, because the schematic is too simple. Also, I’m going to use a separate extension board with this socket which will be connected to the main board through the standard socket. It will allow connecting different extension boards to the computer in the future.

  1. FPGA.

Only about 25% of Altera Cyclone II is currently used. I don’t expect it to be filled more than 50% when the computer is completed, so in Rev.A the same chip will be used.

FPGA configuration in Rev.0 is performed by the special chip which is quite expensive (about $10). Also, it requires to be reprogrammed with each update by Altera-Blaster programmer.

In Rev.A I’m going to configure FPGA by floppy-drives microcontroller. A Flash ROM ship will need to be added and connected with STM32 with SPI interface. Such Flash ROM chips are very cheap (less than $0.5). and they can be programed by the microcontroller from SD-Card without any additional programmers. I’ll leave a connector for the USB-blaster programmer in Rev.A though for debagging.

  1. Floppy-drives.

STM32s PCB layouts were with incorrect pin outs. I’ve fixed some with wires and another in the software, so 140K drive was able to start working. I didn’t bother to do the same with 840K drive because they are identical and I could debug it with one drive. SD-card and LCD display work fine but I’m going to change this module significantly in Rev.A, so there is no point to continue with it.

As I mentioned, in Rev.A STM32 will be responsible for FPGA configuration and Flash ROM updates from SD-Card. Also, I’ll connect unused pins of the STM32 with pads because it is not fun to solder wires to QFP device J

In Rev.A only one microcontroller and one SD-card will be used. It will put the images of both drives to the SDRAM memory where the computer will be able to work with them. It will also be able to record changed image from SDRAM back to SD-Card (if it wasn’t opened in “Read Only” mode).

STM32 will be using 3.2” colour LCD display with touchscreen. This solution will allow avoiding dip-switches on the board (TV/VGA, keyboard etc. switches). All the options will be shown on the screen and transformed to FPGA by I2C bus from STM32 when it is changed. Such a display is inexpensive ($15 – $25), but will add a very nice touch to the device and save a lot of space on the front panel.

A cheap 1Mb Flash ROM with FPGA configurations can hold up to 6 different configurations. So, it means that we can have several different computers recorded there and choose which one to launch on the LCD display when the device is turned on. Apart from the “AGAT-7” we can put “AGAT-9”, “Apple-IIe”, “Commodore VIC-20”, “Atari” and any other computer with 6502 CPU into the device. Because the extension slot will be external we will be able to change the adapter for each of the computers and connect its original devices to it. It will be even possible to determine what adapter is connected and launch the corresponding computer. Because in Rev.A the FPGA will be able to switch between PAL and NTSC output video signal as well as to generate corresponding subcarrier frequency, the flexibility of the device becomes fantastic.

The size of the Rev.A board will be changed as well to fit it into the “Hammond-1598E” case which is inexpensive and has a convenient front and back panels for the LCD display and all sockets.

As a result the project is transforming from the replica of the “AGAT-7” computer to the universal device that can replicate the whole bunch of 6502 computers and its modifications. To add a new computer in the future in most cases only the Flash ROM will need to be updated from a SD-card. Even STM32 firmware may not be needed to upgrade in some cases if the new computer uses the similar drives. In the further revisions I’m going to think about updating STM32 firmware from a SD-card as well, but maybe I’ll be able to do this on Rev.A as well if I have enough memory left in the microcontroller for the bootloader.

Now I’m designing the Rev.A PCB and I will post news here. See ya!

4 Comments
  1. Alexey Dubrovsky says:

    Now I’m designing the Rev.A PCB and I will post news here
    Is design still in progress, or it is frozen?

    • Electronics Fun says:

      I’ve got a small kid and still don’t have enough time for such a big project, so I fulfill my hobby with very small projects now. The board’s hardware is ready and running its basic functions. The computer launches with SDRAM and can output to VGA and TV. The challenge is to make the sd-card floppy drive working. As an alternative I’ve tried the HxC floppy emulator with some success. I’m planning to return to this project as soon as I can have enough spare time for it.

  2. Boris Ivanov says:

    Make kickstarter project.

    • Electronics Fun says:

      It might be a good idea. But I still need to complete the prototype first. Also, it relies on original 6502 CPU which stock is quite limited. 65C02 has slightly different op codes, so it is not a good substitute. Existing VHDL versions of this CPU are not ideal as well.

Leave a Reply

Welcome , today is Thursday, 30/03/2017