Files
CydandClaude Fable 5 fdd9ac9d97 Initial import: Tesla Release 4.10 (Tesla:BattleTech & Tesla:Red Planet)
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>
2026-07-02 13:21:58 -05:00

72 lines
1.7 KiB
C++

/* NOPAUSE.CPP - Disable Pause.
(C) Copyright 1991
By Thomas Astin CIS: 73407,3427 Prodigy: RNVN08A
All rights reserved. */
/* Disable pause by intercepting interrupt 9 and blocking pause scan codes.*/
/* NOTE: This program worked fine on the machine upon which it was
developed and tested. Use at your own risk. The author is
not responsible for any damage, system failure, or the like
as a result of executing this code.
Compiles under Borland C++. Code may require modifications for
use with other compilers.
*/
#include <dos.h>
#include <stdio.h>
/* Protos */
void interrupt NewInt9(...);
void ExitFunc(void);
/* exit func in case ^C */
#pragma exit ExitFunc
/* Defines */
#define KbdIn 0x60
#define KbdCtl 0x61
#define MaxChkIdx 3
/* Globals */
unsigned char ChkArray[MaxChkIdx] = {0xE1,0x1D,0x45};
unsigned char ChkIdx=0;
unsigned char CurScan=0;
void interrupt (*OldInt9)(...)=NULL;
void interrupt NewInt9(...) // int 9 handler
{
CurScan=inportb(KbdIn); // get scan code
if (CurScan==ChkArray[ChkIdx++]) { // check scan code array
if (ChkIdx>=MaxChkIdx) { // last match?
ChkIdx=0; // get ready for next time
asm in al,KbdCtl // restore keyboard
asm mov ah,al
asm or al,80h
asm jmp temp1
temp1:
asm out KbdCtl,al
asm xchg ah,al
asm jmp temp2
temp2:
asm out KbdCtl,al
asm mov al,20h // Issue EOI
asm out 20h,al
return;
}
}
else
ChkIdx=0; // start over
OldInt9(); // call original int 9
}
void ExitFunc(void)
{
if (OldInt9!=NULL)
setvect(9,OldInt9); // restore int 9
}