source410: literal 4.10 source reconstruction + BC++ 4.52 fleet toolchain archived

- BORLAND/: Borland C++ 4.52 (chosen over 4.5 by byte-match: CODE/RP/CW32.LIB
  is identical to 4.52's install lib). BCC32/TLINK32/TLIB/MAKE run natively on
  Win11; CODE/BT/OPT.MAK is the shipped BTL4OPT.EXE's exact flag recipe
  (extender = Borland PowerPack DPMI32, not Phar Lap TNT).
- restoration/source410/: the literal 1995-form reconstruction of the missing
  BT game source (never mixed into CODE/). Round 1-3 state:
  * 6 of 10 surviving original TUs COMPILE CLEAN under the period toolchain
    (BTMSSN, BTCNSL, BTSCNRL, BTTEAM, BTL4MODE, BTL4ARND) - first builds
    since 1996.
  * BT_L4/BTL4APP.CPP pilot reconstruction: 12/12 functions, Fail() lands on
    its binary-recorded line 400 exactly.
  * BT/BTCNSL.HPP: console wire IDs recovered from the binary's ctors
    (Killed=9, Damaged=10, ScoreUpdate=13, DeathWithoutHonor=15 [T1];
    TeamScore=12 flagged [T4]).
  * MUNGA/: 8 engine-header backfills back-dated from the BT412 WinTesla tree
    (VDATA numbering decomp-verified; AUDREND's OpenAL-era virtual removed -
    the period compiler is the drift detector).
  * Tooling: backdate.py (WinTesla->1995 header transform), compile410.sh
    (per-TU verification sweep under authentic OPT.MAK flags).
  * README: corrected roadmap - MECH.HPP is the capstone grown with the mech
    TU reconstructions; BTREG.CPP green = the header-family milestone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-19 07:33:26 -05:00
co-authored by Claude Fable 5
parent 599b2388a1
commit 63312e07f9
5913 changed files with 756089 additions and 0 deletions
@@ -0,0 +1,7 @@
#----------------------------------------------------------------------------
# ObjectWindows - (C) Copyright 1991, 1993 by Borland International
#----------------------------------------------------------------------------
MODELS = mldf
EXERES = sysinfo
!include $(BCEXAMPLEDIR)\owlmake.gen
@@ -0,0 +1,202 @@
//----------------------------------------------------------------------------
// ObjectWindows - (C) Copyright 1991, 1993 by Borland International
//----------------------------------------------------------------------------
#include <owl\owlpch.h>
#include <owl\applicat.h>
#include <owl\framewin.h>
#include <owl\dialog.h>
#include <owl\static.h>
#include <dos.h>
#include "sysinfo.h"
struct SysInfo16Record {
char InstanceNumber[31];
char WindowsVersion[31];
char OperationMode[31];
char CPUType[31];
char CoProcessor[31];
char Global[31];
char VersionDos[31];
};
struct SysInfo32Record {
char WindowsVersion[31];
char OemId[31];
char PageSize[31];
char MinAppAddress[31];
char MaxAppAddress[31];
char ActiveProcessorMask[31];
char NumberOfProcessors[31];
char ProcessorType[31];
char AllocationGranularity[31];
char Reserved[31];
};
#if defined(__WIN32__)
typedef SysInfo32Record SysInfoRecord;
#define IDD_SYSINFO "IDD_SysInfo32"
#else
typedef SysInfo16Record SysInfoRecord;
#define IDD_SYSINFO "IDD_SysInfo16"
#endif
class TSysInfoWindow : public TDialog {
public:
TSysInfoWindow(TWindow* parent, const char* title);
void GetSysInformation();
void InitChildren();
private:
SysInfoRecord TransferRecord;
};
TSysInfoWindow::TSysInfoWindow(TWindow* parent, const char* title)
: TWindow(parent),
TDialog(parent, title)
{
InitChildren();
GetSysInformation();
TransferBuffer = &TransferRecord;
}
void
TSysInfoWindow::InitChildren()
{
TStatic* ts;
#if defined(__WIN32__)
ts = new TStatic(this, IDC_WINDOWSVERSION, sizeof TransferRecord.WindowsVersion);
ts->EnableTransfer();
ts = new TStatic(this, IDC_OEMID, sizeof TransferRecord.OemId);
ts->EnableTransfer();
ts = new TStatic(this, IDC_PAGESIZE, sizeof TransferRecord.PageSize);
ts->EnableTransfer();
ts = new TStatic(this, IDC_MINAPPADDRESS, sizeof TransferRecord.MinAppAddress);
ts->EnableTransfer();
ts = new TStatic(this, IDC_MAXAPPADDRESS, sizeof TransferRecord.MaxAppAddress);
ts->EnableTransfer();
ts = new TStatic(this, IDC_ACTIVEPROMASK, sizeof TransferRecord.ActiveProcessorMask);
ts->EnableTransfer();
ts = new TStatic(this, IDC_NUMPROS, sizeof TransferRecord.NumberOfProcessors);
ts->EnableTransfer();
ts = new TStatic(this, IDC_PROTYPE, sizeof TransferRecord.ProcessorType);
ts->EnableTransfer();
ts = new TStatic(this, IDC_ALLOCGRAN, sizeof TransferRecord.AllocationGranularity);
ts->EnableTransfer();
ts = new TStatic(this, IDC_RESERVED, sizeof TransferRecord.Reserved);
ts->EnableTransfer();
#else
ts = new TStatic(this, IDC_INSTANCENUMBER, sizeof TransferRecord.InstanceNumber);
ts->EnableTransfer();
ts = new TStatic(this, IDC_WINDOWSVERSION, sizeof TransferRecord.WindowsVersion);
ts->EnableTransfer();
ts = new TStatic(this, IDC_OPERATIONMODE, sizeof TransferRecord.OperationMode);
ts->EnableTransfer();
ts = new TStatic(this, IDC_CPUTYPE, sizeof TransferRecord.CPUType);
ts->EnableTransfer();
ts = new TStatic(this, IDC_COPROCESSOR, sizeof TransferRecord.CoProcessor);
ts->EnableTransfer();
ts = new TStatic(this, IDC_GLOBAL, sizeof TransferRecord.Global);
ts->EnableTransfer();
ts = new TStatic(this, IDC_VERSIONDOS, sizeof TransferRecord.VersionDos);
ts->EnableTransfer();
#endif
}
void
TSysInfoWindow::GetSysInformation()
{
#if defined(__WIN32__)
DWORD ver = ::GetVersion();
wsprintf(TransferRecord.WindowsVersion, "%d.%d", (int)LOBYTE(ver), (int)HIBYTE(ver));
SYSTEM_INFO systemInfo;
::GetSystemInfo(&systemInfo);
wsprintf(TransferRecord.OemId, "%lX", systemInfo.dwOemId);
wsprintf(TransferRecord.PageSize, "%lX", systemInfo.dwPageSize);
wsprintf(TransferRecord.MinAppAddress, "%lX", systemInfo.lpMinimumApplicationAddress);
wsprintf(TransferRecord.MaxAppAddress, "%lX", systemInfo.lpMaximumApplicationAddress);
wsprintf(TransferRecord.ActiveProcessorMask, "%lX", systemInfo.dwActiveProcessorMask);
wsprintf(TransferRecord.NumberOfProcessors, "%lX", systemInfo.dwNumberOfProcessors);
wsprintf(TransferRecord.ProcessorType, "%ld", systemInfo.dwProcessorType);
wsprintf(TransferRecord.AllocationGranularity, "%lX", systemInfo.dwAllocationGranularity);
wsprintf(TransferRecord.Reserved, "%lX", systemInfo.dwReserved);
#else
char tempstr[31];
UINT strId;
DWORD SysFlags = GetWinFlags();
wsprintf(TransferRecord.InstanceNumber, "%d", GetApplication()->GetModuleUsage());
DWORD ver = ::GetVersion();
wsprintf(TransferRecord.WindowsVersion, "%d.%d", (int)LOBYTE(ver), (int)HIBYTE(ver));
if (SysFlags & WF_ENHANCED)
strId = IDS_ENHANCED;
else if (SysFlags & WF_STANDARD)
strId = IDS_STANDARD;
else if (SysFlags & WF_PMODE)
strId = IDS_REAL;
else
strId = IDS_UNKNOWN;
GetApplication()->LoadString(strId, tempstr, sizeof(tempstr));
strcpy(TransferRecord.OperationMode, tempstr);
if (SysFlags & WF_CPU086)
strId = IDS_CPU8086;
else if (SysFlags & WF_CPU186)
strId = IDS_CPU80186;
else if (SysFlags & WF_CPU286)
strId = IDS_CPU80286;
else if (SysFlags & WF_CPU386)
strId = IDS_CPU80386;
else if (SysFlags & WF_CPU486)
strId = IDS_CPU80486;
else
strId = IDS_UNKNOWN;
GetApplication()->LoadString(strId, tempstr, sizeof(tempstr));
strcpy(TransferRecord.CPUType, tempstr);
strId = (SysFlags & WF_80x87) ? IDS_YES : IDS_NO;
GetApplication()->LoadString(strId, tempstr, sizeof(tempstr));
strcpy(TransferRecord.CoProcessor, tempstr);
wsprintf(TransferRecord.Global, "%lu", GetFreeSpace(0)/1024);
wsprintf(TransferRecord.VersionDos, "%d.%d", _osmajor, _osminor);
#endif
}
class TSysInfoApp : public TApplication {
public:
TSysInfoApp() : TApplication() {}
void InitMainWindow() {
EnableCtl3d();
MainWindow = new TFrameWindow(0, "Windows System Information",
new TSysInfoWindow(0, IDD_SYSINFO), TRUE);
}
};
int
OwlMain(int /*argc*/, char* /*argv*/ [])
{
return TSysInfoApp().Run();
}
Binary file not shown.
@@ -0,0 +1,43 @@
//----------------------------------------------------------------------------
// ObjectWindows - (C) Copyright 1991, 1993 by Borland International
//----------------------------------------------------------------------------
//
//
//
//
// 16 bit ids
//
#define IDS_ENHANCED 0
#define IDS_STANDARD 1
#define IDS_REAL 2
#define IDS_CPU8086 3
#define IDS_CPU80186 4
#define IDS_CPU80286 5
#define IDS_CPU80386 6
#define IDS_CPU80486 7
#define IDS_YES 8
#define IDS_NO 9
#define IDS_UNKNOWN 10
#define IDC_INSTANCENUMBER 200
#define IDC_WINDOWSVERSION 201
#define IDC_OPERATIONMODE 202
#define IDC_CPUTYPE 203
#define IDC_COPROCESSOR 204
#define IDC_GLOBAL 205
#define IDC_VERSIONDOS 206
//
// 32 bit ids
//
//#define IDC_WINDOWSVERSION 301 // same as 16bit
#define IDC_OEMID 300
#define IDC_PAGESIZE 301
#define IDC_MINAPPADDRESS 302
#define IDC_MAXAPPADDRESS 303
#define IDC_ACTIVEPROMASK 304
#define IDC_NUMPROS 305
#define IDC_PROTYPE 306
#define IDC_ALLOCGRAN 307
#define IDC_RESERVED 308
Binary file not shown.
@@ -0,0 +1,70 @@
//----------------------------------------------------------------------------
// ObjectWindows - (C) Copyright 1991, 1993 by Borland International
//----------------------------------------------------------------------------
#ifndef WORKSHOP_INVOKED
#include <windows.h>
#endif
#include "sysinfo.h"
#include <owl\except.rc>
IDD_SysInfo16 DIALOG 11, 20, 169, 108
STYLE WS_CHILD | WS_VISIBLE | WS_BORDER
FONT 8, "MS Sans Serif"
{
LTEXT "Number Of Instances", -1, 6, 5, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "Window's Version", -1, 6, 19, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "Mode Of Operation", -1, 6, 33, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "CPU Type", -1, 6, 47, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "Coprocessor Present", -1, 6, 61, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "Free Global Memory", -1, 6, 75, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "Dos Version", -1, 6, 89, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "", IDC_INSTANCENUMBER, 89, 5, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "", IDC_WINDOWSVERSION, 89, 19, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "", IDC_OPERATIONMODE, 89, 33, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "", IDC_CPUTYPE, 89, 47, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "", IDC_COPROCESSOR, 89, 61, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "", IDC_GLOBAL, 89, 75, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "", IDC_VERSIONDOS, 89, 89, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
}
IDD_SysInfo32 DIALOG 12, 8, 169, 149
STYLE WS_CHILD | WS_VISIBLE | WS_BORDER
FONT 8, "MS Sans Serif"
{
LTEXT "Window's Version", -1, 6, 4, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "OEM Id", -1, 6, 18, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "Page Size", -1, 6, 32, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "Min App Address", -1, 6, 46, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "Max App Address", -1, 6, 60, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "Active Processors Mask", -1, 6, 74, 78, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "No. of Processors", -1, 6, 88, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "Processor Type", -1, 6, 102, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "Allocation Granularity", -1, 6, 116, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "Reserved", -1, 6, 130, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "", IDC_WINDOWSVERSION, 89, 4, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "", IDC_OEMID, 89, 18, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "", IDC_PAGESIZE, 89, 32, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "", IDC_MINAPPADDRESS, 89, 46, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "", IDC_MAXAPPADDRESS, 89, 60, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "", IDC_ACTIVEPROMASK, 89, 74, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "", IDC_NUMPROS, 89, 88, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "", IDC_PROTYPE, 89, 102, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "", IDC_ALLOCGRAN, 89, 116, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
LTEXT "", IDC_RESERVED, 89, 130, 74, 14, SS_LEFT | WS_CHILD | WS_VISIBLE
}
STRINGTABLE LOADONCALL MOVEABLE PURE DISCARDABLE
{
IDS_ENHANCED, "Enhanced"
IDS_STANDARD, "Standard"
IDS_REAL, "Real"
IDS_CPU8086, "8086"
IDS_CPU80186, "80186"
IDS_CPU80286, "80286"
IDS_CPU80386, "80386"
IDS_CPU80486, "80486"
IDS_YES, "Yes"
IDS_NO, "No"
IDS_UNKNOWN, "Unknown"
}