📜 ⬆️ ⬇️

UKNC Back to Life!

The history of the development of a single emulator


1. Why?

We can say that all my programming life I was an application programmer. Participated in the development and boxed products, and under the order, in small companies and more. This is an interesting and varied work. But I had never written anything closely related to iron before, and I had quite superficial knowledge, if not to say no, about digital circuitry. But my programmer youth passed over mastering C ++ under Win32 / MFC :) To some extent I wanted to test my strengths - if I can.

2. Why UKSC?

He worked on these machines at school (this was the year that way in 1992-93), although there was nothing more difficult than BASIC and crawling on diskettes on a teacher’s machine. Those. I had no serious knowledge about the emulated machine. I also did not have my own UCSC, as there is still no one actually.

The impetus for the creation of an emulator was the site of Arseny Gordin , on which he has been collecting all available information on the ESCC and other PDP-11 compatible machines for several years. More precisely, even, not so much the site itself, but the fact that the archive “Removing the image of ROM and RAM” was found on it, the author is Alexander Strelets (by the way, thanks to him a lot!). The archive described the procedure for obtaining ROM images on a real machine, and (lo and behold!) The images taken were found. Here, the pens were already quite noticeably combed ... It was about June 2006. By the way, at that time there was not a single UKSC center emulator. (And now there are not many of them in general ...)
')
3. The first attempts

After that, I began to look for what to push off from - to write everything from scratch would be for me (at that moment) just an extremely heavy task. The search showed that there are no VM2 processor emulators, not even one live, not to mention the source code. But for a long time there are emulators with the implementation of VM1 - as you might guess, these are BC emulators. The choice fell on the emulator of Yuri Kalmykov - firstly, it was in the source code, and secondly, it was closer to me, because it was written under MFC. The code of the processor and the disassembler was taken from the Kalmykov emulator, and now there is almost nothing left of the original version - the code has been reworked many times.

After a week and a half, the future emulator was already showing the state of the processors, the memory, the disassembled fragment, and in manual mode cheerfully paced the first commands . Then there was a long way ahead to refine the processor, to program all the UKSC centers ... For a while I slowly stomped in this direction, without showing any special results. Somewhere in January 2007 I came to the conclusion that I didn’t start with the wrong thing - I lacked information about the machine and a detailed understanding of the processor. Therefore, sat down at the document, summarizing and systematizing my knowledge on the subject.

4. Co-creation

And in February 2007, work on the emulator sharply accelerated. Felix Lazarev came out on Arseny Gordin, already having experience in writing a 3DO emulator , wishing to write a UKSC center and looking for supporters. Deployed SVN for collaboration, and rushed .

In the understanding of the work of the UKSC, I was two orders of magnitude weaker, so I mainly worked on the interface and the debugger while Felix shuffled the processor and devices. By the end of February a screen renderer was made . By mid-March, we had already seen the text of the RAM and ROM errors , issued by the starting test.

Around this time, Alexey Kisly began to actively help the project. Alexey has a real UKSC, which he studied literally up and down. He provided us with the texts of the program of the ROM of the UKSC, manually disassembled - something that was not enough at that time to debug the emulator.
Moreover, Alexei even had a UKSC center (!) Written in assembly language. His emulator worked like a “half” of a real machine: it emulated only the CPU and interprocessor channels, the presence of PP was simulated for the CPU. The last 2.5 years, Alexey has been advising us on all the details of how the machine works, his contribution to the project is invaluable.

March 19, 2007 saw the boot menu for the first time . March 20, 2007 - passed the built-in test.
Toward the end of March, Arseny managed to get a dump of the only known ROM cartridge for the UKSC: with a special “cassette” version of BASIC. And on March 27, 2007 it was already loaded in the emulator. And on March 28, booting from a floppy disk (read only, without writing to disk) started working.



And after that, both developers took time out by deep immersion in their core work ...

In June 2007 I made the installer and the project build scripts.
June 21, 2007 sent the first installer to beta testers. The goal was to make sure that I was doing the right thing and to collect feedback on the emulator.

In August 2007, I received from Vlad Zhigalov the manuscript “Resources of UKSC” - his research on what this machine provides to the programmer. So I did not finish scanning this document, but it would be necessary ... What is scanned is here .

September 28, 2007 posted the first public beta - the same version that sent a limited edition. In October-November 2007, there were three releases. The rt11dsk utility is made to work with disk images without starting the emulator.

With the help of Alexei, I began to understand in detail the device of the NVMD UKSC center controller - in order to make a record on the disk. January 27, 2008 - beta-6 . Earned a record on the disc!

5. In the open

March 3, 2008 - beta 9 . The project goes into open source. code.google.com/p/ukncbtl
In the summer of 2008 two more releases are coming out, and the authors once again are hammering on the project ...

April 4, 2009 - Felix released beta 12. Improved processor timings, resulting in a realistic sound. Then again we put a big bolt ...

Finally, since November 2009, the last two months of work go almost every weekend, three releases are released. The acceptance tests of the processors VM1 and VM2, which thoroughly check the work in all modes, were found. Thanks to Alexey's commits, we are already passing these tests.

6. Conclusions
  1. Nothing is impossible - in general, I have proved to myself that I can.
  2. But strictly speaking, alone, I “can” too slowly, but truly “can” only in a team with knowledgeable people. In the case of retrocomputing cooperation is of paramount importance.
  3. The work is not finished, and it is difficult to say when it will be possible to put an end: 99% of the software is already working now, but the emulator is still far from perfect and not finished. There is room for development, both in terms of accuracy and completeness of emulation (tape recorder, printer, C2 interface, network ...), and convenience (full screen, saving state ...) and in terms of portability (Qt, SDL ...).

image

Project website: code.google.com/p/ukncbtl
Screenshots: code.google.com/p/ukncbtl/wiki/Screenshots

PS On November 14, 2009, based on the UKNCBTL code, the BKBTL project was launched, which at the very least emulates BK-0010: code.google.com/p/bkbtl

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


All Articles