Home DIY or DIY Orion-128: amateur radio computer

Orion-128: amateur radio computer

by admin

Orion-128: amateur radio computer
Historically, the first mass-produced amateur radio computer was Radio-86RK which required only 29 chips to build. Its significant limitation was that it only supported text mode and required hard-to-find chips. Orion-128 – was a logical continuation – also oriented for assembly by radio amateurs, had more memory (128kb vs 16/32kb) and supported graphic mode : 384 × 256 (in mode 2 colors, 4 colors, and 2 colors from a palette of 16 colors for every 8 pixels). The approximate size of the Orion population at the time of its peak popularity was about 30-40 thousand computers.
I got Orion in ’94, and it was on Orion that I ran my first programs (before that I had to write them "on the table"). By the time I purchased my first PC in the 97th, Orion started to glitch more and more (it didn’t load at the first time, I had to reboot it many times…), and in the end it simply stopped working at all. I couldn’t repair it then, and all these years it was lying motionless, but not forgotten.
This summer I finally decided to try to repair it – here’s how it turned out (as well as a review of the architecture and some software features).

Architecture

The heart of a computer is the processor KR580VM80A, the Soviet analogue of Intel 8080 To simplify the design – the processor status word was not captured (there the processor "says" when it writes to the stack, reads or writes to the I/O ports). There is also no interrupt controller.
In the uppermost addresses is the Monitor ROM (BIOS). It is made interestingly – all its functions are called through a table in the uppermost memory addresses, which simply perform an unconditional jump to the place of the actual function implementation, so when you change the function implementations the call addresses remain the same, and it remains possible to add them (the table grows "down").
Input and output ports – were mapped to memory, that is, if during address decoding we saw that the address = port address, then there was a record in the port register. The port addresses were in the Monitor area, where you can’t write to anyway. The ports were made :

 0F400H - keyboard port0F500H - user port number 10F600H - user port number 20F700H - expansion card port0F800H - Graphics mode control (write only)0F900H - memory page switching (write only)0FA00H - address switching of memory screen area (write only)0FB00H - write port 4 (write only, not used) 

The KR580VM80A processor – has a 16 bit address bus, and accordingly can only address 64kb of memory, the page switching port allows the processor to select the current page of memory. 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 under such conditions, usually the monitor does all the work with additional pages (since it is "visible in memory" on all pages), but this is of course not too fast.
Orion-128: amateur radio computer
The graphics output is implemented as follows: the binary counters are constantly going through the current address of the video memory. The multiplexers can connect to the address pins of the memory the address bus of the processor (when it needs it), then the address searched by the counters. Each video memory address is read twice, but if there was a conflict with the processor, the read value is not stored (i.e. once out of two times – no conflict guaranteed, as the processor relatively rarely accesses memory).
The video memory is read from both pages simultaneously, and the 16 bits read go into the shift registers (parallel loading – serial output), the output of which forms the video signal. In monochrome mode – the second page of memory is not used, but in color – we have to write to the second page. And this, as we remember slowly, because it is only possible through the call of monitor subroutines.
Here is the main drawback of the Orion – text output speed is very low (about one second per page in color mode), especially in comparison with the Radio-86RK. The processor does 300-500 thousand operations per second (at a clock frequency of 2.5Mhz), and writing to an extra page of memory is at least a dozen operations.

Figuring out what’s not working

I had the factory version of Orion :
Orion-128: amateur radio computer
Since the computer was a factory computer, the PCB was different from the magazine version, and there were some differences in the schematic, which did not make it easy. Also on the wires (on the left side of the board) was a K155IE5 counter – of course I had no idea why it hung there, another mystery.
On advice – I replaced the Soviet ceramic capacitors with new ones. The power supply was a sore point of the Orion (and I was giving wrong voltages) – I replaced it completely with new pulsed ones. Orion required +5, +12 and -5V voltages (or rather, these voltages were required by the KR580VM80A processor, +5 was enough for everything else).
Orion-128: amateur radio computer
But the computer didn’t work : the biphasic sync signal to the CPU was coming, you could see that something was going on on the address and data bus, but the computer didn’t work, there was garbage on the screen with no signs of conscious activity.
My first thought was that the contents of the Monitor had deteriorated in 20 years (the protective window was not taped over with duct tape) – ordered TL866 programmer I flashed the firmware and unfortunately it matched the log byte by byte. Sadness. There was no idea.
Orion-128: amateur radio computer
I knew that if there was a problem with the -5 and 12V voltages – the processor could burn out. So I replaced the processor and the bus shaper on the data bus – but this had no effect.
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 was re-soldering the capacitors. Only now I started to understand what the solder mask is for on the printed circuit boards 🙂
The memory test worked, but very strangely, after testing the first memory page – tested the first page again, not the second. Suspicion fell on the current memory page register (port 0F900H) – either the write does not go through, or then this value does not switch the page.
To make debugging easier, I wrote a program instead of the Monitor, which constantly switches the memory page. Took the old KC573RF2 EEPROM from the Orion and started erasing… After half an hour under the quartz lamp – the firmware still matched byte for byte (more modern EEPROM 27512 – erased in 35-45 seconds)… Only after an hour of frying the chip was clean. But when I tried to write it, I failed miserably. It turned out, that programmer can only program at 21V, but KC573RF2 requires 26V.
Of course I could hack the programmer, but I decided to solder a more modern flash drive with electric wipe – the pin assignments of course did not match, and I had to solder on the wires ("multistory" printed circuit board did not fit in height). The switches allow to choose one of the several flooded Monitors, and are soldered to the first unused bits of the address with the pull-up to 0 (KS573RF2 – 2kb, 11 bits, so the switches are on 12-13-14 bits):
Orion-128: amateur radio computer
Orion-128: amateur radio computer
Turns out, the moment the decoder fires the one to write to the page switch port – the data bus instantly becomes 0, and the register doesn’t have time to write the new memory page number (yellow is the data bus bit on the right, blue is the write port strobe).
If you delay the recording strobe a bit with a capacitor, the recording goes through and the correct memory page is recorded, but this is too messy a hack and I didn’t believe in it.
I had no further ideas. I noticed that there was no data on the outputs of the two memory chips, so I replaced them. The old textolite sucks when soldering with a hairdryer (my mother told me stories about blackened textolite with a hairdryer, but I didn’t believe them), the tracks fell off… It was a depressing spectacle. When soldering without a dryer – helped a soldering iron with a tin suction (wonderful invention, you melt solder, press the button – and it all sucks, the main thing then do not smear the board), and copper braid (solder wick), which was used up a whole bunch:
Orion-128: amateur radio computer
After replacing the memory chips – suddenly everything stopped working. Again, garbage on the screen with no signs of life. Honestly, here I was ready to give up, and admit that not everything in this life can be done.
After a close study of the board with a magnifying glass – managed to find 2 more short circuits, which I did, but the memory test did not start working. Then I total wiretap found that on the data bus another short circuit – but after looking through all the data bus I did not find it. I had to cut a particular bit of the data bus into pieces to narrow down the search. Finally a short circuit was found – it was so microscopic that it was barely visible with a magnifying glass. The reason I found the short circuits so easily was simple – I mistakenly took a low melting point of Bismuth (melting point 144 degrees) instead of the usual PIC60 solder. Orion-128: amateur radio computer
When I came in contact with the soldering iron at 250 degrees – the flux instantly boiled over, and the tiniest drops of solder scattered around. And I wondered why the surface was dull after soldering…
The memory test worked, and it seems that the shorts found during the inspection solved the page switching problem, now the data bus does not reset to 0 at the most crucial moment, and the page switching works steadily :
However, ORDOS booting from an external ROM still did not work. After reading 3 bytes from the ROM disk manually through the ports (there are commands for this in Monitor-1), I saw that 2 bits of data came wrong (I compared with the ROM disk image dumped to the programmer). After soldering the rom disk, ORDOS booted! I could not be happier:
Orion-128: amateur radio computer
However, there were still problems: the memory test showed a memory error on the second page after warming up, sometimes the picture on the TV disappeared, especially often during the second memory test, and something had to be done about the mystical K155IE5 hanging on the wires:
Orion-128: amateur radio computer
The memory chip was easy to replace, but the image loss was a pain in the ass. The suspicion fell on the signal permitting writing data from the video memory to the video signal registers (writing there is prohibited when the processor accesses the memory). The track was long (~50cm), and since there is no impedance matching, the signal was reflected from the ends of the track, exceeding the allowable 0 level in TTL logic (0.4V) – this could cause problems. So I implemented a serial termination – a 220 ohm resistor next to the signal source – the ringing disappeared, but the problem remained:
The essence of serial termination Suppose wave resistance of the track is 220 ohms. Without termination, a 5V pulse will reach the end of the track, reflect, and the instantaneous voltage there will be 10V. Most of it will be cut off at the protection diodes inside the chip, but the spike to 10V will be there. If we put a 220 Ohm resistor next to the signal source – then 2.5V will go down the track (because we get a voltage divider), when 2.5V reaches the end of the track and is reflected back – it will be 5V, exactly as much as we need.
The wave impedance of the track depends on its width and proximity to the ground, for thin tracks without an earth polygon underneath it, it is high, hundreds of ohms.
Orion-128: amateur radio computer
The mystery was added by the fact that when I connected the oscilloscope ground, the image disappeared.It turned out that the problem was in a bad 12V power supply, which apparently had spared on filtering – there was a lot of garbage on the ground (i.e. between the ground and the 12V bus – always 12V, but relative to the ground of the TV or oscilloscope – a huge noise). By replacing the power supply with a better one (from the FPGA demoboard) – the problem was completely solved.
After tracing the K155IE5 on the wires – it turned out that it partially replaces the K1533IE5 soldered into the board. Why it should have been left dangling on the wires is not clear to me. I took out K1533IE5 and soldered in K155IE5 and it works! 1533 series is bourgeois ALS, 155 is usual TTL. ALS has lower load capability and speed, that was probably the original reason for replacement.
More complete table of correspondence of domestic and foreign TTL logic

 K155 - 74K133 - 54K530 - 54SK531 - 74SK533 - 74LSK555 - 74LSK1531 - 74FK1533 - 74ALSK1564 - 74HC 

General view in finished form :
Orion-128: amateur radio computer
The small handkerchief on the left side is Downshift screen layout (otherwise the first line on LCD televisions is cut off) Draft board for Eagle – 3.14.by/files/orion_sync.zip
Any diodes, 1k resistor, hinged mounting decoupling capacitor.
Chip – 74AC1G14 / 74AC1G04 / 74HC1G14 / 74HC1G04 (1-gate inverter with/without Schmitt trigger).
The 3 inputs are connected to DD4 pins 8, 9, 11, the output is connected to DD7.4 pin 13 (accordingly, the track leading to DD7 pin 13 must be trimmed near DD7).
In the original schematic, which I can’t find now (somewhere on radiocode) – OR was on chips and inverter on a transistor, I made OR on diodes and inverter on a chip.
Orion-128: amateur radio computer
Also found on the rom disk was my first program that was presented to the world, HALPER (yes, there is a small mistake in the name Orion-128: amateur radio computer
). The worst thing was that I sent the handwritten hex dump to the editors of "Radio" magazine and with a couple of corrections – but still someone was too lazy to type it in (apparently more serious publications weren’t enough):
Orion-128: amateur radio computer
Recovery (facepalm) I haven’t gone far in literacy since then, though.

Was it worth it?

Personally, for me, the last screenshot was worth all the trouble. And of course the resolution of the global issue of childhood and adolescence is priceless.
In addition, I got a better understanding of how (old) computers actually work, and realized how crooked I am sometimes, because all the short circuits I selflessly fought with were made by me.

Information on Orion-128

Emuverse – Wiki with links and Radio Magazine publications
orion128.nikom.biz – Collection of all Orion software
zx.pk.ru/forumdisplay.php?f=56 – Orion forum at zx.pk.ru there they also collect new Orions (and of course many other topics on vintage computers)
www.nedopc.org/forum/viewforum.php?f=39 – Forum on Soviet computers at nedopc.org
emu80.org – Universal emulator of 8 bit computers, for Windows ("Radio-86RK", "Partner", "Apogee", "Mikrosha", "Specialist", "Orion", "Micro-80", "UT-88")

You may also like