📜 ⬆️ ⬇️

15 year old code and newspaper ad

Having seen the translated publication about the support of an ancient legacy code like a mammoth's bone, I can't help but share a story from my own experience, and at the same time, encourage people to write to those who, like me, faced with similar tasks. Yes, and for the power offensively - why are such publications - mainly transferable? We have had quite a few programmers-nuggets who sculpt their own, incompatible software with anything — their own DBMS, graphical interfaces, drivers for their own industrial equipment. At work, I came across a lot of the works of the local Kulibins, and I will also tell you about them if there is interest.

This story happened in 2001 and began with the fact that in the $ CRACK $ .TALKS FIDO conference The usual content of which was cracks, announcements about searching for cracks and talking to crackers “for life”, I saw an atypical announcement asking who could take up the revision of the graphic program. Since in this conference “refinement” they used to call hacking commercial software, for example, “uncoupling” from the hardware key, and I did not engage in commercial hacking, I did not pay attention to this announcement, having decided that there would be those will complete the order by contacting the addressee via personal mail. However, a week later the announcement was repeated, I wondered what was going on, and I contacted its author.

He explained that it’s about the revision of the graphics program, and that the crackers hanging out at the conference, having learned what they were talking about, refused to do this work, saying that they were engaged in hacking, and not revision of the programs. After that, he proposed to meet to clarify further details. When I arrived at the address indicated by him, at the entrance to the office I saw a sign with the name of a well-known newspaper of ads, which intrigued me even more.
')
My future client, who met me, turned out to be the head of the local IT department, he was already in years, but from the conversation it was felt that he was “from ours” - programmers, although they were former “retired”. After that, he led me to a computer, with a 21-inch monitor, huge for those times, on which there was such a picture:



I saw a similar GUI for the first time, and even then this monochrome interface looked old-fashioned, especially since the resolution for such a monitor was not enough and the pixels looked huge.

From a further explanation, I learned that this is a revision of GEM / 3 Desktop, which at one time was a competitor to MS Windows 2.0, its latest commercial version was already 15 years old. But why refine it? It turned out that the newspaper used an ancient version of the desktop publishing system Ventura Publisher, which was run only from GEM / 3, but allowed to automate the layout of the newspaper pages, getting the text of the ad from the database - at that time no other system could do that.



After a little hesitation, I took up this job. The task was to finalize the drivers for the display with a high resolution of 1280x1024. There were several drivers, its own driver for different video adapters and for each resolution. But they all supported a resolution of no more than 800x600, which is why the monitor I saw had such large pixels that, you see, it is not very convenient for the layout of a full-length newspaper.

I didn’t have the Internet at hand, and the source drivers in the bundle did not go, so taking the client archive from the GEM, I started picking up the binary code of the drivers in order to find in it all the constants that set the resolution supported by the driver and replace them on the right. I succeeded, but it was not there: GEM, in turn, worked under MS-DOS, in real mode, and its driver switched video memory banks to access the video memory. A simple replacement for the constants could not be avoided, it was necessary to look for the code for switching the banks of the video memory - a difficult task. In addition, the driver was advanced and did not just provide an interface for throwing graphics onto the display, but knew how to draw graphic primitives — lines, rectangles and circles; the drawing code mixed with the switching of video memory banks was rather confusing. But here I was lucky: the video adapter, supported by one of the drivers, switched video banks by outputting commands to a usually unused hardware port, so switching video banks could be caught by the number of this port. After a week of work (as usual - mostly at night) I managed to teach the 800x600 driver from this video adapter to work at 1280x1024, although with some graphics primitives there were rendering glitches.

And then the client called me and said that he had found the source code (!) Of the GEM. It turns out that Caldera bought the GEM in 1999 and released them under the GPL license. At the beginning of each file with the code was Caldera copyright, but everything else remained in its original form 15 years ago.



It is clear that, now, when the source texts were in my possession, the work went much faster, although they were in an Assembler with a small admixture of C, and in some places were still spaghetti.



A week later everything was ready, and I handed over the compiled modified drivers to the client so that he could try them. And a week later I arrived at the office to receive payment for my work, and I was shown the enthusiastic feedback from the layout designers that appeared on the internal corporate forum of the newspaper on the occasion of the possibility of working with high resolution screens on large monitors. Moreover, as it turned out, the newspaper had its branches not only in Moscow and other Russian cities, but also throughout the CIS, there were good reviews from everywhere. And it was very pleasant, as well as the generous payment of the work done, which constituted a solid addition to my postgraduate scholarship for which I then lived.

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


All Articles