After quite a few failed experiments, I finally managed to port DN to Free Pascal.
The problem with the original DN (that NDN is trying to continue) was that it contained modified Turbo Vision components from Turbo Pascal that had never been released under open-source licenses. I tried porting it to Free Vision, but that turned out to be a nightmare. Among other things, it requires moving from a single-byte encoding to UTF-16 used by FV, which alone means modifying more than 1,000 places across about a hundred files.
Moreover, my audit showed that Free Vision itself contains quite a lot of code that overlaps with Borland's code. Some or all of it may possibly not be copyrightable as trivial code, but I haven't investigated that question deeply.
In the end, the solution was to rebase DN on a top of Free Pascal port of the Turbo Vision implementation by magiblot:
https://github.com/magiblot/tvisionIt uses UTF-8, so adapting a program designed around a single-byte encoding is much easier. And, importantly, it is definitely clean from a licensing standpoint. For extra safety, I wrote a dedicated script that checks for overlaps with Borland code, just in case an LLM happens to generate something similar.
Another challenge was adapting the sources, which were originally designed to build with Borland Pascal (the 1.51 branch) or Virtual Pascal (the OSP branch), for FP. That also turned out to be manageable in the end.
If anyone is interested in experimenting with it, here is the code. It already runs on both DOS and Linux (I'm developing on Linux; I'll add support for other OSes later):
https://github.com/unxed/dn/