📜 ⬆️ ⬇️

Digital archeology: how long-lost data is saved



Drawings of forgotten processors, the source codes of the legendary games, unknown works of art - that’s what old lovers just don’t find in the archives. Their task is to recover, securely store and catalog.

It may seem that we live in an age when information is practically not capable of being lost: what once was digitized or created on a computer, will it have at least some value, be replicated and always wander from one digital medium to another. This, unfortunately, is not quite so: standards and formats change with amazing speed, and information carriers (especially magnetic disks) have an extremely limited lifespan. "Digital archeology" - that is, the extraction of data from old media and transcoding into modern formats is becoming more and more relevant discipline. There are specialists in this area, and time after time stories appear about how they heroically drew something of incontestable value from digital ruins.

Prince of Persia source codes


The game Prince of Persia was developed in 1989, but they still remember it. The adventures of the prince, who is selected from the dungeon of the palace to save his beloved, captured the minds and forced the players to spend countless hours to memorize every nook and cranny on each level. Initially, the "Prince" was made on the Apple II computer, but soon it was ported to all the platforms then. At the moment there are nine sequels and a Hollywood film (as well as a book by Victor Pelevin, in which the motives from The Prince are intertwined with the Soviet reality).
')




During the development of the game of Prince of Persia: The Sands of Time for the Playstation 2, its creators had an interesting idea: would it not be possible to add the original game of the 1990 model as an “Easter egg”? Jordan Mehner, its creator, acted as a consultant for the project and visited the Montreal studio Ubisoft, where they made Sands of Time, so it was easy to contact him. Mechner readily agreed to send the sources and began to rummage through boxes with old floppy disks that he had never thrown away. But the failure: the necessary floppy disk has disappeared.

The Sands of Time was completed in 2003 and sold over two million copies, and the source code of the original "Prince" was never heard. No one would have known about this loss, didn’t get this story development in 2012. As Mehner later told the Wired magazine reporter, his father called him and said that he had found a box with some old diskettes that clearly belonged to his son. When Mechner Junior received the box and began sorting through the floppy disks, he saw that one of them was written "Prince of Persia, source code, 1989". What an unexpected luck!





But what to do with a pack of old dusty floppy disks if you have neither a compatible computer, nor a five-inch drive, nor any other drive at hand? If the floppy disk contains something as important as the sources of the legendary game, then it makes sense to turn to professionals. Two people came home to Mechner: a collector of old computers with a whole truck, on which he brought several serviceable Apple II, and an employee of The Internet Archive with a wonderful device called KryoFlux.

What is KryoFlux




This drive looks like any other old five-inch drive, but is modified in such a way as to slowly but surely read the most inveterate floppy disks. As a result of its work, a disk image is created that resembles the source as much as possible. KryoFlux comes complete with a USB adapter, and can be connected to a modern computer. In fact, this device serves as a bridge between the times of old computers and modern technologies. They created it in the Software Preservation Society, the Society for the Preservation of Software. SPS started out as an Amiga fan club, but then it grew and, as we can see, even got something like a hardware division. True, tiny - KryoFlux produce exclusively to order, and the price for it is about a thousand euros.

Mechner was lucky: all his floppy disks were considered almost perfect, the precious Prince of Persia source codes were received in full and immediately run on one of the old computers. Later, the source code was published on GitHub, where anyone can download them (http://goo.gl/JacfnI). Alas, for detailed study you need knowledge of the Apple II assembler, but here you can’t go anywhere.

The secret cherished box and other pleasant surprises: the source codes of the Asteroids clone, which Mechner wrote in his youth (just like Flappy Bird clones are writing now), as well as the world-famous Quadris game, were found. Incidentally, an amusing story is connected with it. In the early eighties, Mehner was already working at the game publisher Broderbund, where one fine day an unusual new game called Tetris arrived. The company's management decided that Tetris is too complicated for a simple gamer and did not bother to publish it, but ordinary employees played Alexey Pajitnov’s creation for days on end. They were asked to remove Tetris from their computers - this was required by working ethics (the rights were never purchased). Distributions were destroyed, but Quadris, almost the first, appeared to be playing, but the Tetris clone was buried for many years.

By the way, if reading about Prince of Persia caused nostalgia and a burning desire to play again, now it can be done at any time and even without installing DOSBox. Recently, it is enough to go to archive.org, find the game and launch it directly in the browser. This is possible thanks to the JSMESS engine, which ported DOSBox and emulators of many other old systems. So the games of the eighties and nineties so far are not threatened to disappear in the depths of time.

Warhol's Lost Paintings


About who Andy Warhol is, at least by the edge of his ear everyone heard, and the reproductions of his most famous paintings like “Campbell's Soup” are caught here and there with enviable regularity. Warhol is widely known as the inventor of the style of "pop art", but as a pioneer of digital technology in application to art - to a much lesser extent. And, nevertheless, a fact: Warhol gladly bought those computers that were available in the eighties, and used their modest graphic possibilities in his work.

Our story begins much later. In 2004, someone digitized an old video tape recording a presentation of a new Amiga computer to which Warhol was invited. Here he is using a digital camera to take a picture of Debbie Harry sitting in front of him (vocalist of the Blondie group), in order to later demonstrate the picture on the screen and turn it into a picture in just a few minutes. Along the way, he reports that he is trying out all the new computers, and this is what he expected in particular. It happened in 1985, two years before the artist's death.



The presentation is interesting in itself - now even Apple does not allow itself such a concentration of stars on the stage. But cultural figures see on this record is not the same as technology lovers: Corey Arkangel - an artist and an expert on the works of Warhol, in 2011 came across this video and immediately asked the question: “Where are the paintings that Warhol painted on Amiga now?” ? ”Arcangel sent a request to the Warhol Museum and quickly received an answer: there are diskettes and are stored among other things of Warhol. It is surprising that no one tried to copy information from them before.

The further history of the salvation of old files in general coincides with the story of how to get the source of Prince of Persia. Arcangel arrived at the museum, a team of volunteers from the Carnegie University Computer Club - Mellon and several other professionals. They brought with them Amiga 500 and 1000 work computers, the KryoFlux drive already known to us in a three-inch version and other means for restoring old media.

Sometimes it comes to the fact that magnetic disks have to be taken out of plastic envelopes and rinsed under a tap with dishwashing detergent in order to remove dust and mildew. In the case of the Warhol archives, no radical remedies were needed. The floppy disk, however, had a huge amount, and although most were marked as distributions of programs, it is impossible to rely on this information: what if something is written over it? I had to copy everything and even check if there were any traces of erased information.





Experts found and perfectly copied 28 files, potentially containing pictures. Titles read campbells.pic, botticelli.pic, marilyn1.pic, and so on. However, only a few were able to open - part of the pictures of the Graficraft program, which Warhol used, refused to read. Attempts to use older versions of the editor also yielded nothing, and the format had to be analyzed manually. However, Amiga experts quickly discovered that there are ordinary video memory dumps inside, probably created by the earliest version of Graficraft. No mention of it has been preserved, but the images were easily decrypted and converted to PNG.

Warhol's equipment also turned out to be remarkable: two Amiga 1000 computers in perfect condition, a graphics tablet from one of the first commercial models, a digital camera DigiView, which took black and white pictures (for color ones, it was necessary to shoot the same thing three times through multi-colored filters) and Polaroid Digital Palette - a device that allows you to record images on slides.



The diskettes also found drivers for the Live camera used in the Amiga presentation, their version was marked as “0.0”. There was no camera itself, but it is obvious that at Warhol it appeared a couple of years earlier than that of mere mortals. They also found something interesting on computers - “not for sale” stickers. Clear evidence that the artist received one of the first test products.

Drawings of the processor MOS 6502


In the mid-eighties, the MOS 6502 processor was a big hit - due to the low price and at the same time high performance for those times. At the time of appearance, it cost $ 25, 4-5 times cheaper than competitors like the Intel 8080 and Motorola 6800. MOS 6502 formed the basis of the Apple I and II, Commodore PET, Atari 2600, NES, Soviet Agata, Bulgarian Pravets »And more masses of varieties of home computers. Do you remember the lines of code that run before the eyes of the T-800 in the first Terminator? This is MOS 6502 assembler! After 15 years, this fact will be beaten in Futurama: the chip in Bender’s head wears the same famous label.



Now there is no shortage of machine emulators on this famous processor, but they only repeat the set of its instructions, and this is not exactly the same as the real hardware. Drawings of MOS 6502 were drawn with a pencil on Whatman paper - CAD in those times did not exist yet. If the reprints of those schemes are preserved, they are very rare.

Three American "digital archaeologists" Greg James, Barry Silverman and Brian Silverman decided to restore an exact digital copy of MOS 6502 so that it serves as an analogue of the source on HDL and can be used for simulation. How to do it? There is only one way, and it looks very complicated.



The chip package is melted with phosphoric acid, heated to 90 degrees, after which the microcircuit hiding under a layer of plastic is photographed under a microscope. In this way, a group of enthusiasts got about 200 pictures, which they then glued together to get a digital copy of the chip with a resolution of 342 megapixels.

The next step is to trace the scheme, that is, transfer from a raster view to a vector. Ready-made solutions for this did not fit: no one needs a crooked and full of garbage drawing. Instead, enthusiasts wrote their own program in Python, which produced an excellent result. This opened the way for the next stage: turning the data into a simulation of a working processor.

The project was ported to JavaScript, and now at visual6502.org you can find a great simulator. It executes the commands of the MOS 6502 processor and immediately shows how they are executed. You can see not only the contents of the memory and registers, but also a snapshot of the chip with tracks highlighted in the course of the execution of the program.



Autopsy, photographing and creating a processor simulator seem awfully difficult, but in fact the process took only about six months: from November 2009 to May 2010. Since then, developers have managed to add a Motorola 6800 simulator and are going to continue to use their technology to expand the collection. They ask to send any old microprocessors: one copy is not enough when it comes to acid treatment.

I must say that the reverse engineering of processors is not a new fiction. In the USSR, it was widely used for cloning Western technologies (see “Hacker” No. 8 for August 2013), and it is still found today. So the guys from the emu-russia.net forum recently dismantled the processor of the PSX prefix and are studying it (details can be found at psxdev.ru). PSX is a modification of the Playstation 2 and, perhaps, it is not old enough to consider its autopsy as archeology - the thought of piracy comes to my mind more likely. But if this is piracy, then at its best. In addition, it will take some time, and no one will look askance at this activity.

Soviet ternary computer "Setun"


Western history of computers has long been laid out on the shelves, and you can dig up something new only with great luck. How about domestic archeology? Since Soviet times, we have left a rich legacy of rare computers, unusual stories and long forgotten achievements.

Communities of fans of old computers exist in Russia. One of them is called "Trinari" and is devoted to studying the history of the Setun threefold computer. The word “ternary” needs to be clarified here: the fact is that this unique computer was designed to work with data in a ternary representation, that is, instead of bits (0 or 1), it operated with trits - they are usually denoted -1, 0 and 1 Accordingly, instead of the bytes of the ternary computer, they consist of six trites and take a value from -364 to 364. The ease of working with negative values, as you can see, is given to such a computer from birth.



Led the development of "Setun" Nikolai Petrovich Brusentsov, head of the department of computational mathematics, Faculty of Mechanics and Mathematics, Moscow State University. The first test computer was completed in 1959, and subsequently the Kazan Plant of Mathematical Machines produced 46 more copies, which were distributed among research institutes and educational institutions. By 1970, the team Brusentsova developed the following model - "Setun-70". But this machine never got to mass production - the Soviet bureaucracy prevented it. It is believed that the main problem was not the exotic nature of ternary calculations, but, paradoxically, the low cost of a computer.

“Setun-70”, in contrast to the first “Setun”, not only used the threefold presentation of data, but also supported some threefold logical operations. For example, the ternary logic greatly simplifies the comparison of numbers: if similar binary operators can return only the values ​​of "more" or "less", then the ternary comparison takes into account the possibility of equality of numbers.

Alexander Obukhov from the Trinari group, using the old schemes, developed the Setun emulator, moreover, it works directly in the browser. Just open the page trinary.ru/projects/setunws, and find yourself one on one with the control panel of the old Soviet supercomputer. To find out what's what, you will need to read the book "Setun Small Computer" - and this, of course, not everyone can master. But for those who have captured the idea of ​​the ternary logic, this possibility is priceless.



Another member of Trinari, Alexander Samsonov, made an attempt to go further and create the Setun-70 emulator in order to be able to run old programs that he managed to restore with punched tapes. During an interview with Computerra magazine, Samsonov talked about how he encountered unforeseen and unusual difficulties. In particular, the “Setun-70” ROM exists only as a printout in machine codes, and the pages are not numbered and mixed, and there are about forty of them. Restoration of the sequence in this case is a very nontrivial task.

Nikolay Brusentsov died on December 4, 2014, just two months before the release of this issue. From the news about this you will not know - his name, like the names of many other pioneers of the beginning of the computer era, is known only to experts in the history of computing technology. But thanks to the enthusiasts, this story has been preserved, and unusual and little-known ideas do not die out with their authors.

image

First published in the magazine "Hacker" from 02/2015.

Subscribe to "Hacker"

Source: https://habr.com/ru/post/254991/


All Articles