I can't do this for you (it's not my area of interest) but I think I can point you in the right direction.
I hadn't heard of THF before, but the page you linked to also had a link to this file in the GitLab repository: https://gitlab.com/twilight-cd.com/sourcecode-menu-twilight-9/-/blob/master/THF.C?ref_type=heads ..and looking at GitLab repository itself: https://gitlab.com/twilight-cd.com/sourcecode-menu-twilight-9/-/tree/master?ref_type=heads ..I saw "Twilight was a physical collection of illegal software and games." So I haven't heard about THF because I don't deal in "illegal software and games." (I think this is what used to be called "warez" - also mentioned in the link below.) I also saw this link with more information: https://twilight-cd.com/ >>Twilight was the longest running illegal software series in the >>Netherlands, with the largest sales market. The collection was released >>from 1996 to 2004 and blossomed into a huge success and cash cow. Over the >>years, Twilight has changed from a hobby project by a bunch of computer >>nerds to a (as it seems) rock-solid underground organization. >> >>In eight years, one hundred and eighty discs with “apps and games” >>were produced, which were sold privately from factory to end user. While >>compiling the archive on Twilight-cd.com, the former internet address >>of the compilation, a picture of this mysterious organization over the >>years emerged. But a file is a file, and if you know how the data is arranged, you can extract data or convert it. The THF.C file on the GitLab you mentioned is about 270 lines long, and has these includes: #include <stdio.h> #include <conio.h> #include <dos.h> #include <direct.h> #include <string.h> #include <process.h> #include <stdlib.h> #include <dir.h> #include <fcntl.h> #include <sys\stat.h> #include <io.h> #include <time.h> #include <alloc.h> #include "tl.h" #include "thf.h" The includes with filenames in angle brackets like <conio.h> are provided by the compiler. The GitLab project's readme says THF was written in Borland Turbo C (see below). And I recognize all of those as either standard C (like stdio.h and string.h) or common DOS libraries (like conio.h and dos.h). The includes that reference filenames in quotes are in the project, so you'll need to examine those too. The TL.H file contains 66 lines of definitions, the THF.H file is 50 lines long and starts with this comment: // THF-file structure: // // - thfHeader // - thfEncryptInfo // - (binary file data) // - thfFile // ... // - thfTrailer So that include file seems pretty important, and you can start to see the structure of a THF file by looking there. Also note that THF.H defines several functions on lines 42 to 50. I didn't double-check if these functions are in THF.C or somewhere else. The Readme file in the GitLab repository says the project was written in Borland Turbo C. You can download Borland C and C++ for free via Embarcadero's "museum" website - it's a legit copy (Embarcadero bought Borland and all its assets, including the compilers) you just need to create an account to download it. We have a link on our website at: https://www.freedos.org/about/devel/ I hope that helps you! On Wed, Jul 31, 2024 at 2:51 PM magic-girl--- via Freedos-devel <freedos-devel@lists.sourceforge.net> wrote: > > hello > > i'm an autistic girl of 12 years old. I try to convert ancient 16 > bit ms-dos code to modern C#. However there is not even docs anymore > about old ms-dos functions and i don't have ms-dos specific C knowledge. > > Can you help with this? > > I need a C# program that can read the THF file: it must just tell me > the information of the screenshot > > Here you find the needed files and all source code, including screenshot > (see last post) > > https://csharpforums.net/threads/read-bytes-from-binary-file.9764/page-2#post-40107 > > I already have all decryption functions in C# working! > > There is no forum or anything where a living soul still can read this > code :) You're reading this problably one of my last hope out there > > Are you interested? It's just this tool in the screenshot, applied > to a THF file. Basically the program must read the file and make > this listing. > > The decoding of the file content itself I already have converted to C# > but I believe the tool above is just listing the file names, size and > offsets. (I think) > > I can give all decryption code ready in C# if you need that. _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel