Archival snapshot of the Virtual World Entertainment Tesla cockpit software, 1994-1996: MUNGA engine and L4 pod layer source (Borland C++ 5.0), BT/RP game code, and game content (models, audio, maps, gauges, Division renderer data). Includes third-party libraries: Division dVS/DPL graphics, HMI SOS audio, WATTCP networking. Files are preserved byte-for-byte (.gitattributes disables all line-ending conversion). README.md documents the layout, target hardware, and toolchain. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
53 lines
2.0 KiB
Plaintext
53 lines
2.0 KiB
Plaintext
//===========================================================================//
|
|
// File: filestrm.tcp //
|
|
// Project: MUNGA Brick: Filestream Manager //
|
|
// Contents: Test stuff for MMIO class //
|
|
//---------------------------------------------------------------------------//
|
|
// Date Who Modification //
|
|
// -------- --- ---------------------------------------------------------- //
|
|
// 4/25/96 JTR Initial Creation //
|
|
//---------------------------------------------------------------------------//
|
|
// Copyright (C) 1994, Virtual World Entertainment, Inc. All Rights reserved //
|
|
// PROPRIETARY AND CONFIDENTIAL //
|
|
//===========================================================================//
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MMIOstream ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
//
|
|
//#############################################################################
|
|
//#############################################################################
|
|
//
|
|
|
|
#include <time.hpp>
|
|
|
|
Logical
|
|
FileStream::TestClass()
|
|
{
|
|
char buffer[65535];
|
|
int i;
|
|
float total = 0;
|
|
Time s;
|
|
|
|
FileStream Testit;
|
|
|
|
memset(buffer,'A',65535);
|
|
|
|
DEBUG_STREAM << "Starting FileStream test...\n";
|
|
for(i=0; i < 1024; i++)
|
|
{
|
|
s = Now();
|
|
Testit.Open("mmiotest.tst",1);
|
|
Testit.WriteBytes(buffer,65535);
|
|
Testit.Close();
|
|
Testit.Open("mmiotest.tst",0);
|
|
Testit.ReadBytes(buffer,65535);
|
|
Testit.Close();
|
|
total += Now() - s;
|
|
}
|
|
for(i=0; i < 65535; i++) Verify(buffer[i] == 'A');
|
|
DEBUG_STREAM << "Opening, writing, closing, opening, reading, and closing\n 64K file 1024 times, averaging out to " << total / 1024.0f << " ticks apiece...\n";
|
|
DEBUG_STREAM << "File data checks out, as well...\n";
|
|
DEBUG_STREAM << "Leaving FileStream test...\n";
|
|
return True;
|
|
};
|