
Historically, the first mass amateur computer was
Radio-86RK , which required only 29 chips to be built. Its essential limitation was that it supported only the text mode and required hard-to-reach chips.
Orion-128 - was a logical continuation - also focused on assembling by radio amateurs, had more memory (128kb vs. 16 / 32kb) and supported graphic mode: 384 Ă— 256 (in the mode 2 colors, 4 colors, and 2 colors from a palette of 16 colors for each 8 pixels). The approximate size of the Orion population during its peak of popularity is about 30-40 thousand computers.
Orion came to me in the 94th year, and it was on Orion that I launched my first programs (before him they had to write “on the table”). By the time of the acquisition of the first PC-shki in the 97th, Orion began to fail all the more energized (it did not boot the first time, it had to be rebooted many times ...) and finally it stopped working completely. I could not repair it then, and all these years it has lain without movement, but not forgotten.
This summer, I finally decided to try to repair it - what came out of it (as well as an overview of the architecture and some software features) - under the cut.
')
Architecture
The heart of the computer is a
KP580VM80A processor
, a Soviet analogue of the Intel 8080 . To simplify the design, the processor status word was not captured (there the processor “speaks” when it writes to the stack, reads or writes to the I / O ports). There is also no interrupt controller.
In the topmost addresses is the Monitor PROM (BIOS). It is made interesting - all its functions are called through the table in the highest memory addresses, which simply perform an unconditional transition to the place of the actual implementation of the function, so if the implementations of the call address functions change, they remain the same and you can add them (the table grows "down") .
I / O ports were mapped to memory, i.e. when decoding the address, we saw that address = port address, then writing to the port register occurred. The addresses of the ports were in the area of ​​the Monitor, where it is still impossible to record. Ports were doing:
0F400H - keyboard port
0F500H - user port number 1
0F600H - user port number 2
0F700H - expansion card port
0F800H - graphics mode control (write only)
0F900H - switching memory pages (only for recording)
0FA00H - switching the address of the screen memory area (for recording only)
0FB00H - system port number 4 (for recording only, not used)
Processor KR580VM80A - has a 16-bit address bus, and accordingly can address only 64kb of memory, the page switching port allows the processor to select the current memory page. But if we switch the page - and the program will be executed from another page at the same address! Since it is difficult to work in such conditions, usually the monitor does all the work with additional pages (because it is “visible in memory” on all pages), but this is certainly not too fast.

The graphics output is implemented as follows: binary counters constantly search the current address of the video memory. Multiplexers can connect either the processor's address bus (when it needs it) or the address recalled by counters to the address memory pins. Each address of the video memory is read 2 times, but if there was a conflict with the processor, the read value is not saved (that is, once out of two - there will be no conflict, because the processor relatively rarely accesses memory).
The video memory is read simultaneously from both pages, and the read 16 bits - then fall into the shift registers (parallel loading - serial output), on the basis of the output of which the video signal is formed. In monochrome mode - the second page of memory is not used, but in color - you have to write in the second page. And this is how we remember slowly, because possible only through a call to the monitor subroutines.
Here is the main disadvantage of Orion - the speed of text output is very low (about a second per page of text in color mode), especially compared to Radio-86RK. The processor makes 300-500 thousand operations per second (at a clock frequency of 2.5 MHz), and writing to an additional memory page is at least a dozen operations.
We understand what does not work
I had a factory version of Orion:

Since the computer was factory-made, the printed circuit board was different from the magazine version, and there were some differences in the scheme, which did not make the task easier. Also on the wires (on the left side of the board) hung the K155IE5 counter - of course I had no idea why it was hanging there, another mystery.
On the advice - replaced the Soviet ceramic capacitors with new ones. The power supply was the sore point of Orion (and I had the wrong voltage) - I completely replaced it with a new pulse. Orion required voltage of +5, +12 and -5V (or rather, these voltages were required by the KP580VM80A processor, the rest was +5 enough).

But the computer did not work: the two-phase clock signal came to the processor, it was clear that something was happening on the address and data bus, but the computer was not working, there was garbage on the screen with no signs of conscious activity.
My first thought was that for 20 years the contents of the Monitor had deteriorated (the protective window was not sealed with tape)
—the TL866 programmer ordered , the firmware was merged — and to my regret it coincided to a byte with the magazine. Sadness There were no ideas.

I knew that if there are problems with -5 and 12V voltages, the processor may burn. Therefore, I replaced the processor and the bus driver on the data bus — but this gave no result.
The RAS and CAS signals are similar to the truth (since these are the highest frequency signals, there are also problems with them).
I noticed that one of the data bus bits is always 1. It turned out that I accidentally shorted it to + 5V when I soldered capacitors. Just now I began to understand why the solder mask on printed circuit boards :-)
The memory test worked, but very strangely, after testing the first page of memory, I again tested the first, not the second. Suspicions fell on the register of the current page of memory (port 0F900H) - or does not pass the record, or then this value does not switch the page.
In order to make debugging easier, I wrote a program instead of the Monitor, which constantly switches the memory page. He got out of Orion the old EEPROM KS573RF2, and began to erase ... After half an hour under the quartz lamp - the firmware still matched the byte to the byte (the more modern EEPROM 27512 was erased in 35-45 seconds) ... Only after an hour of frying the chip was clean. But when I tried to write it down - I was beaten by an epic failure, as it turned out, the programmer can produce a programming voltage no higher than 21V, and KS573RF2 requires 26.
It was possible, of course, to hack the programmer, but I decided to solder a more modern USB flash drive with electric erasure - the location of the outputs certainly did not match, and I had to solder the wires (the “multi-storey” printed circuit board did not fit in height). Switches - allow you to select one of several filled-in Monitors, and are soldered to the first unused bits of the address with a pull-up to 0 (KS573RF2 - 2kb, 11 bits, which means switches on 12-13-14 bits):


It turned out that at the moment when the decoder is working out, issuing one to write to the page switching port - it instantly becomes 0 on the data bus, and the register does not have time to write the number of the new memory page (on the right - yellow - data bus bit, blue - recording strobe) .
If you delay the recording strobe a little with the capacitor, then the recording goes through, and the recording takes place in the necessary memory page, but this is too dirty a hack, and I did not believe in it.
There were no further ideas. I noticed that at the outputs of two memory chips there is no data, replaced them. The old textolite showed itself from the worst side - it turned black when brazed with a hairdryer (mother said scary tales about the textolite from the hair dryer; but I did not believe), the tracks fell off ... A depressive sight. In soldering without a hair dryer - a soldering iron with a tin extractor helped (a wonderful invention, melt the solder, press the button - and it sucks everything, the main thing then is not to slap the board), and the copper braid (solder wick):

After replacing the memory chips, suddenly everything stopped working. Again, the trash on the screen with no signs of life. Honestly, here I was ready to give up, and recognize that not everything in this life can be done.
After a close examination of the board with a magnifying glass, I managed to find another 2 short circuits that I did, but the memory test did not start. Then, with a total dial, I found that there was another short circuit on the data bus — but I did not find it when I looked through the entire data bus. I had to cut a specific bit of the data bus into pieces to narrow the search range. Finally there was a short circuit - it turned out so microscopic that it was barely visible in the magnifying glass. The reason for my short-circuit so easily turned out to be simple - I mistakenly took the low-melting point with Bismuth instead of the usual PIC60 solder (melting point 144 degrees).

Upon contact with a soldering iron with a temperature of 250 degrees - the flux boiled instantly, and scattered the smallest drops of solder around. And I also wondered why, after soldering, the surface turns out to be matte ...
The memory test is working, and it seems that the ones found during the inspection of the short-circuit solved the problem with switching the page, now the data bus to 0 was not reset at the crucial moment, and switching the page works stably:
However, booting ORDOS from an external ROM drive still did not work. After reading 3 bytes from the rum-disk by hand through the ports (the commands for this are in Monitor-1), I saw that 2 data bits came in wrong (compared with the ROM disk image merged on the programmer). After the ROMDisk propayka - ORDOS booted! Joy knew no bounds:

However, problems still remained: the memory test showed a memory error on the second page after warming up, the image on the TV sometimes disappeared, especially often when testing the second page of memory, and something had to be done with the mystical K155IE5 hanging on the wires:

It was easy to replace the memory chip, but with the disappearance of the image I had to suffer. Suspicion fell on the signal for recording data from video memory to the video signal generation registers (recording is prohibited there when the processor accesses memory). The track was long (~ 50cm), and since there is no impedance matching - the signal reflected from the ends of the track, exceeding the allowable level 0 in the TTL logic (0.4V) - this could cause problems. Therefore, I implemented sequential termination - a 220 Ohm resistor near the signal source - the ringing disappeared, but the problem remained:
The essence of sequential terminationSuppose the
impedance of the track is 220 ohms. Without termination - 5V, the impulse reaches the end of the track, is reflected, and the instantaneous voltage there will be 10V. Most of the course cut off on the protective diodes inside the chip, but the surge to 10V will be. If we put a 220 Ohm resistor next to the signal source, then 2.5V will go along the track (as we have a voltage divider), when 2.5V reaches the end of the track and is reflected back - just 5V will turn out, just as long as necessary .
The wave impedance of the track depends on its width and proximity to the ground; for thin tracks without an earth ground beneath it, it is high, hundreds of ohms.


Mystics added the fact that when you connected the earth of the oscilloscope - the disappearance of the image stopped. It turned out that the problem was in a bad power supply unit 12V, which apparently saved on filtering - there was a lot of garbage on the ground (that is, there was always 12V between the ground and 12V bus, but there was a lot of noise relative to the ground of the TV or the oscilloscope). Replacing the power supply unit with a better one (from FPGA demoboards) - the problem was fully resolved.
After tracking K155IE5 on wires, it turned out that it partially replaces K1533IE5 soldered to the board. Why it was necessary to leave it hanging on the wires - it is not clear to me. K1533IE5 bit out, K155IE5 soldered - and everything works! The 1533 series is the bourgeois ALS, 155 is a common TTL. In ALS - reduced load capacity and speed, apparently this was the original reason for the replacement.
A more complete table of compliance of domestic and foreign TTL logic K155 - 74
K133 - 54
K530 - 54S
K531 - 74S
K533 - 74LS
K555 - 74LS
K1531 - 74F
K1533 - 74ALS
K1564 - 74HC
General view in finished form:

A small scarf on the left side -
screen shift pattern (otherwise the first line on LCD TVs is cut off)Draft board for Eagle -
3.14.by/files/orion_sync.zipAny diodes, 1k resistor, mounted mounting decoupling capacitor.
The microcircuit is 74AC1G14 / 74AC1G04 / 74HC1G14 / 74HC1G04 (1 gate of the inverter with / without Schmitt trigger).
3 inputs are connected to the feet 8,9,11 DD4, the output - to the leg 13 DD7.4 (respectively, the path leading to n.13 DD7 must be cut off next to DD7).
In the original scheme, which I could not find now (somewhere on the radio-cathode) - OR was on chips, and the inverter was on a transistor, I made OR on diodes and an inverter on a chip.

My first program, which was presented to the world, HALPER, was found on the ROMDISK (yes, there is a small mistake in the title

). The cruelty was that I sent the hexadecimal handwritten dump to the editorial office of Radio magazine, and even with a couple of corrections — but still, someone was not too lazy to type it (apparently more serious publications were not enough):

Recover (facepalm) However, on literacy, I have not been far from since.
Was it worth it?
For me personally, the last screenshot was worth all the work. And of course the resolution of the global problem of childhood and adolescence is priceless.
In addition, it was possible to better understand how the (old) computers actually work, and to understand how sometimes I am cursed, because all the faults with which I selflessly struggled were done by me.
Information on Orion-128
Emuverse - Wiki with links and publications magazine Radio .
orion128.nikom.biz - Collection of all software for Orion
zx.pk.ru/forumdisplay.php?f=56 - Forum on Orion on
zx.pk.ru , there also collect new Orions (and of course many other topics on vintage computers)
www.nedopc.org/forum/viewforum.php?f=39 - Soviet computer forum on
nedopc.orgemu80.org is a universal emulator of 8-bit computers, under Windows (Radio-86RK, Partner, Apogey, Mikrosh, Specialist, Orion, Micro-80, UT- 88 ”)