RENEGADE now compiles with VP

Of course it doesn't work yet, so don't try running it!
This commit is contained in:
Rick Parrish 2013-02-07 13:52:38 -05:00
parent 4c2999d90b
commit 00cb4ec985
14 changed files with 311 additions and 7 deletions

View File

@ -837,6 +837,7 @@ VAR
WinOk, WinOk,
WinNTOk: Boolean; WinNTOk: Boolean;
{$IFDEF MSDOS}
FUNCTION TrueDosVer(VAR WinNTOk: Boolean): Word; FUNCTION TrueDosVer(VAR WinNTOk: Boolean): Word;
VAR VAR
Regs: Registers; Regs: Registers;
@ -852,7 +853,15 @@ VAR
TrueDosVer := Bl; TrueDosVer := Bl;
END; END;
END; END;
{$ENDIF}
{$IFDEF WIN32}
FUNCTION TrueDosVer(VAR WinNTOk: Boolean): Word;
BEGIN
WriteLn('REETODO BOOT TrueDosVer'); Halt;
END;
{$ENDIF}
{$IFDEF MSDOS}
FUNCTION DosVer(VAR Minor,OS2Ver: Word): Word; FUNCTION DosVer(VAR Minor,OS2Ver: Word): Word;
VAR VAR
Regs: Registers; Regs: Registers;
@ -870,7 +879,15 @@ VAR
OS2Ver := 2; OS2Ver := 2;
END; END;
END; END;
{$ENDIF}
{$IFDEF WIN32}
FUNCTION DosVer(VAR Minor,OS2Ver: Word): Word;
BEGIN
WriteLn('REETODO BOOT DosVer'); Halt;
END;
{$ENDIF}
{$IFDEF MSDOS}
FUNCTION Win3_Check_On: Boolean; FUNCTION Win3_Check_On: Boolean;
VAR VAR
Regs: Registers; Regs: Registers;
@ -885,7 +902,15 @@ VAR
Win3_Check_On := TRUE; Win3_Check_On := TRUE;
END; END;
END; END;
{$ENDIF}
{$IFDEF WIN32}
FUNCTION Win3_Check_On: Boolean;
BEGIN
WriteLn('REETODO BOOT Win3_Check_On'); Halt;
END;
{$ENDIF}
{$IFDEF MSDOS}
FUNCTION DV_Check_On: Boolean; FUNCTION DV_Check_On: Boolean;
VAR VAR
Regs: Registers; Regs: Registers;
@ -903,6 +928,13 @@ VAR
ELSE ELSE
DV_Check_On := TRUE; DV_Check_On := TRUE;
END; END;
{$ENDIF}
{$IFDEF WIN32}
FUNCTION DV_Check_On: Boolean;
BEGIN
WriteLn('REETODO BOOT DV_Check_On'); Halt;
END;
{$ENDIF}
BEGIN BEGIN
D5 := 0; D5 := 0;

View File

@ -276,7 +276,9 @@ VAR
DatFilePath: STRING[40]; DatFilePath: STRING[40];
Interrupt14: Pointer; { far ptr TO interrupt 14 } Interrupt14: Pointer; { far ptr TO interrupt 14 }
{$IFDEF MSDOS}
Ticks: LongInt ABSOLUTE $0040:$006C; Ticks: LongInt ABSOLUTE $0040:$006C;
{$ENDIF}
IEMSIRec: IEMSIRecord; IEMSIRec: IEMSIRecord;
FossilPort: Word; FossilPort: Word;
SockHandle: STRING; { Telnet Handle } SockHandle: STRING; { Telnet Handle }
@ -464,6 +466,9 @@ VAR
MQArea, MQArea,
VQArea: Boolean; VQArea: Boolean;
{$IFDEF WIN32}
function Ticks: LongInt;
{$ENDIF}
FUNCTION GetC(c: Byte): STRING; FUNCTION GetC(c: Byte): STRING;
PROCEDURE ShowColors; PROCEDURE ShowColors;
FUNCTION CheckDriveSpace(S,Path: AStr; MinSpace: Integer): Boolean; FUNCTION CheckDriveSpace(S,Path: AStr; MinSpace: Integer): Boolean;
@ -664,10 +669,29 @@ USES
MultNode, MultNode,
SpawnO, SpawnO,
SysOp12, SysOp12,
Vote; Vote
{$IFDEF WIN32}
,VPUtils
{$ENDIF}
;
{$IFDEF WIN32}
function Ticks: LongInt;
begin
Ticks := GetTimeMSec div 55;
end;
{$ENDIF}
{$IFDEF MSDOS}
FUNCTION UpdateCRC32(CRC: LongInt; VAR Buffer; Len: Word): LongInt; EXTERNAL; FUNCTION UpdateCRC32(CRC: LongInt; VAR Buffer; Len: Word): LongInt; EXTERNAL;
{$L CRC32.OBJ } {$L CRC32.OBJ }
{$ENDIF}
{$IFDEF WIN32}
FUNCTION UpdateCRC32(CRC: LongInt; VAR Buffer; Len: Word): LongInt;
BEGIN
WriteLn('REETODO COMMON UpdateCRC32');
END;
{$ENDIF}
FUNCTION CheckPW: Boolean; FUNCTION CheckPW: Boolean;
BEGIN BEGIN
@ -2692,16 +2716,23 @@ CONST
LastTimeSlice: LongInt = 0; LastTimeSlice: LongInt = 0;
LastCheckTimeSlice: LongInt = 0; LastCheckTimeSlice: LongInt = 0;
VAR VAR
{$IFDEF MSDOS}
Killme: Pointer ABSOLUTE $0040 :$F000; Killme: Pointer ABSOLUTE $0040 :$F000;
{$ENDIF}
Tf: Boolean; Tf: Boolean;
I: Integer; I: Integer;
C: Word; C: Word;
TempTimer: LongInt; TempTimer: LongInt;
BEGIN BEGIN
IF (DieLater) THEN IF (DieLater) THEN
{$IFDEF MSDOS}
ASM ASM
Call Killme Call Killme
END; END;
{$ENDIF}
{$IFDEF WIN32}
Halt;
{$ENDIF}
LIL := 1; LIL := 1;
IF (Buf <> '') THEN IF (Buf <> '') THEN
BEGIN BEGIN
@ -2741,11 +2772,16 @@ BEGIN
BEGIN BEGIN
FOR I := 1 TO 100 DO FOR I := 1 TO 100 DO
BEGIN BEGIN
{$IFDEF MSDOS}
Sound(500 + (I * 10)); Sound(500 + (I * 10));
Delay(2); Delay(2);
Sound(100 + (I * 10)); Sound(100 + (I * 10));
Delay(2); Delay(2);
NoSound; NoSound;
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON GetKey'); Halt;
{$ENDIF}
END; END;
LastBeep := TempTimer; LastBeep := TempTimer;
END; END;
@ -4008,7 +4044,12 @@ BEGIN
TempStr := ''; TempStr := '';
FOR XPos := 1 TO MaxDisplayCols DO FOR XPos := 1 TO MaxDisplayCols DO
BEGIN BEGIN
{$IFDEF MSDOS}
c := Chr(Mem[VidSeg:(160 * (YPos - 1) + 2 * (XPos - 1))]); c := Chr(Mem[VidSeg:(160 * (YPos - 1) + 2 * (XPos - 1))]);
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON ScreenDump'); Halt;
{$ENDIF}
IF (c = #0) THEN IF (c = #0) THEN
c := #32; c := #32;
IF ((XPos = WhereX) AND (YPos = WhereY)) THEN IF ((XPos = WhereX) AND (YPos = WhereY)) THEN
@ -4338,7 +4379,9 @@ BEGIN
SaveCurCo := CurrentColor; SaveCurCo := CurrentColor;
SaveMCIAllowed := MCIAllowed; SaveMCIAllowed := MCIAllowed;
MCIAllowed := TRUE; MCIAllowed := TRUE;
{$IFDEF MSDOS}
NoSound; NoSound;
{$ENDIF}
IF (NOT AllowContinue) AND NOT (PrintingFile AND AllowAbort) THEN IF (NOT AllowContinue) AND NOT (PrintingFile AND AllowAbort) THEN
IsCont := FALSE; IsCont := FALSE;
IF (IsCont) THEN IF (IsCont) THEN
@ -4804,7 +4847,9 @@ END;
FUNCTION DiskKBFree(DrivePath: AStr): LongInt; FUNCTION DiskKBFree(DrivePath: AStr): LongInt;
VAR VAR
F: TEXT; F: TEXT;
{$IFDEF MSDOS}
Regs: Registers; Regs: Registers;
{$ENDIF}
S, S,
S1: STRING; S1: STRING;
Counter: Integer; Counter: Integer;
@ -4843,6 +4888,7 @@ BEGIN
END END
ELSE ELSE
BEGIN BEGIN
{$IFDEF MSDOS}
FillChar(Regs,SizeOf(Regs),#0); FillChar(Regs,SizeOf(Regs),#0);
Regs.Ah := $36; Regs.Ah := $36;
Regs.Dl := ExtractDriveNumber(DrivePath); Regs.Dl := ExtractDriveNumber(DrivePath);
@ -4850,6 +4896,10 @@ BEGIN
C := (1.0 * Regs.Ax); C := (1.0 * Regs.Ax);
C1 := ((1.0 * Regs.Cx) * C); C1 := ((1.0 * Regs.Cx) * C);
C2 := ((1.0 * Regs.Bx) * C1); C2 := ((1.0 * Regs.Bx) * C1);
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON DiskKBFree'); Halt;
{$ENDIF}
END; END;
DiskKBFree := Round(C2 / 1024.0); DiskKBFree := Round(C2 / 1024.0);
END; END;

View File

@ -280,7 +280,12 @@ BEGIN
CASE WhichScreen OF CASE WhichScreen OF
1 : WITH ThisUser DO 1 : WITH ThisUser DO
BEGIN BEGIN
{$IFDEF MSDOS}
Update_Logo(Win1,ScreenAddr[(FirstRow - 1) * 160],WIN1_LENGTH); Update_Logo(Win1,ScreenAddr[(FirstRow - 1) * 160],WIN1_LENGTH);
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON2 Update_Logo(Win1'); Halt;
{$ENDIF}
GoToXY(02,FirstRow); GoToXY(02,FirstRow);
Write(Caps(Name)); Write(Caps(Name));
GoToXY(33,FirstRow); GoToXY(33,FirstRow);
@ -325,7 +330,12 @@ BEGIN
END; END;
2 : WITH ThisUser DO 2 : WITH ThisUser DO
BEGIN BEGIN
{$IFDEF MSDOS}
Update_Logo(Win2,ScreenAddr[(FirstRow - 1) * 160],WIN2_LENGTH); Update_Logo(Win2,ScreenAddr[(FirstRow - 1) * 160],WIN2_LENGTH);
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON2 Update_Logo(Win2'); Halt;
{$ENDIF}
GoToXY(02,FirstRow); GoToXY(02,FirstRow);
Write(Street); Write(Street);
GoToXY(33,FirstRow); GoToXY(33,FirstRow);
@ -358,7 +368,12 @@ BEGIN
END; END;
3 : WITH ThisUser DO 3 : WITH ThisUser DO
BEGIN BEGIN
{$IFDEF MSDOS}
Update_Logo(Win3,ScreenAddr[(FirstRow - 1) * 160],WIN3_LENGTH); Update_Logo(Win3,ScreenAddr[(FirstRow - 1) * 160],WIN3_LENGTH);
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON2 Update_Logo(Win3'); Halt;
{$ENDIF}
GoToXY(06,FirstRow); GoToXY(06,FirstRow);
Write(Loggedon); Write(Loggedon);
GoToXY(16,FirstRow); GoToXY(16,FirstRow);
@ -407,7 +422,12 @@ BEGIN
Close(HistoryFile); Close(HistoryFile);
WITH History DO WITH History DO
BEGIN BEGIN
{$IFDEF MSDOS}
Update_Logo(Win4,ScreenAddr[(FirstRow - 1) * 160],WIN4_LENGTH); Update_Logo(Win4,ScreenAddr[(FirstRow - 1) * 160],WIN4_LENGTH);
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON2 Update_Logo(Win4'); Halt;
{$ENDIF}
GoToXY(20,FirstRow); GoToXY(20,FirstRow);
Write(Callers); Write(Callers);
GoToXY(34,FirstRow); GoToXY(34,FirstRow);
@ -430,7 +450,12 @@ BEGIN
END; END;
5 : WITH History DO 5 : WITH History DO
BEGIN BEGIN
{$IFDEF MSDOS}
Update_Logo(Win5,ScreenAddr[(FirstRow - 1) * 160],WIN5_LENGTH); Update_Logo(Win5,ScreenAddr[(FirstRow - 1) * 160],WIN5_LENGTH);
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON2 Update_Logo(Win5'); Halt;
{$ENDIF}
GoToXY(20,FirstRow); GoToXY(20,FirstRow);
Write(General.CallerNum); Write(General.CallerNum);
GoToXY(31,FirstRow); GoToXY(31,FirstRow);
@ -555,7 +580,12 @@ BEGIN
CASE Ord(C) OF CASE Ord(C) OF
119 : BEGIN { CTRL-HOME } 119 : BEGIN { CTRL-HOME }
SaveScreen(Wind); SaveScreen(Wind);
{$IFDEF MSDOS}
Update_Logo(SYSKEY,ScreenAddr[0],SYSKEY_LENGTH); Update_Logo(SYSKEY,ScreenAddr[0],SYSKEY_LENGTH);
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON2 Update_Logo(SYSKEY'); Halt;
{$ENDIF}
CursorOn(FALSE); CursorOn(FALSE);
C := ReadKey; C := ReadKey;
IF (C = #0) THEN IF (C = #0) THEN

View File

@ -367,6 +367,7 @@ PROCEDURE Com_Flush_Recv;
BEGIN BEGIN
IF (NOT LocalIOOnly) THEN IF (NOT LocalIOOnly) THEN
BEGIN BEGIN
{$IFDEF MSDOS}
ASM ASM
Cmp InWfcMenu,1 Cmp InWfcMenu,1
Je @TheEnd Je @TheEnd
@ -375,6 +376,10 @@ BEGIN
Int 14h Int 14h
@TheEnd: @TheEnd:
END; END;
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON4 Com_Flush_Recv'); Halt;
{$ENDIF}
END END
ELSE WHILE NOT (Com_IsRecv_Empty) DO ELSE WHILE NOT (Com_IsRecv_Empty) DO
WriteWFC(CInKey); WriteWFC(CInKey);
@ -399,6 +404,7 @@ the output buffer (not transmitted yet) is discarded.
PROCEDURE Com_Purge_Send; PROCEDURE Com_Purge_Send;
BEGIN BEGIN
{$IFDEF MSDOS}
ASM ASM
Cmp LocalIOOnly,1 Cmp LocalIOOnly,1
Je @TheEnd Je @TheEnd
@ -407,6 +413,10 @@ BEGIN
Int 14h Int 14h
@TheEnd: @TheEnd:
END; END;
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON4 Com_Purge_Send'); Halt;
{$ENDIF}
END; END;
(* (*
@ -436,6 +446,7 @@ VAR
Dummy: Byte; Dummy: Byte;
BEGIN BEGIN
Dummy := 0; (* New *) Dummy := 0; (* New *)
{$IFDEF MSDOS}
ASM ASM
Cmp LocalIOOnly,1 Cmp LocalIOOnly,1
Je @TheEnd Je @TheEnd
@ -445,6 +456,10 @@ BEGIN
Mov Dummy,AL Mov Dummy,AL
@TheEnd: @TheEnd:
END; END;
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON4 Com_Carrier'); Halt;
{$ENDIF}
Com_Carrier := (Dummy AND $80) = $80; Com_Carrier := (Dummy AND $80) = $80;
END; END;
@ -478,6 +493,7 @@ VAR
BEGIN BEGIN
Com_Recv := #0; Com_Recv := #0;
T_RecvChar := FALSE; T_RecvChar := FALSE;
{$IFDEF MSDOS}
ASM ASM
Cmp LocalIOOnly,1 Cmp LocalIOOnly,1
Je @TheEnd Je @TheEnd
@ -493,6 +509,10 @@ BEGIN
Mov T_RecvChar,1 Mov T_RecvChar,1
@TheEnd: @TheEnd:
END; END;
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON4 Com_Recv'); Halt;
{$ENDIF}
IF (T_RecvChar) THEN IF (T_RecvChar) THEN
Com_Recv := Char(Dummy); Com_Recv := Char(Dummy);
END; END;
@ -524,6 +544,7 @@ VAR
Dummy: Byte; Dummy: Byte;
BEGIN BEGIN
Dummy := 0; (* New *) Dummy := 0; (* New *)
{$IFDEF MSDOS}
ASM ASM
Cmp LocalIOOnly,1 Cmp LocalIOOnly,1
Je @TheEnd Je @TheEnd
@ -533,6 +554,10 @@ BEGIN
Mov Dummy,AH Mov Dummy,AH
@TheEnd: @TheEnd:
END; END;
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON4 Com_IsRecv_Empty'); Halt;
{$ENDIF}
Com_IsRecv_Empty := NOT ((Dummy AND $01) = $01); Com_IsRecv_Empty := NOT ((Dummy AND $01) = $01);
END; END;
@ -563,6 +588,7 @@ VAR
Dummy: Byte; Dummy: Byte;
BEGIN BEGIN
Dummy := 0; (* New *) Dummy := 0; (* New *)
{$IFDEF MSDOS}
ASM ASM
Cmp LocalIOOnly,1 Cmp LocalIOOnly,1
Je @TheEnd Je @TheEnd
@ -572,6 +598,10 @@ BEGIN
Mov Dummy,AH Mov Dummy,AH
@TheEnd: @TheEnd:
END; END;
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON4 Com_IsSend_Empty'); Halt;
{$ENDIF}
Com_IsSend_Empty := ((Dummy AND $40) = $40); Com_IsSend_Empty := ((Dummy AND $40) = $40);
END; END;
@ -589,6 +619,7 @@ value of 0000h is returned in AX. If the driver accepts the character
PROCEDURE Com_Send(C: Char); PROCEDURE Com_Send(C: Char);
BEGIN BEGIN
{$IFDEF MSDOS}
ASM ASM
Cmp LocalIOOnly,1 Cmp LocalIOOnly,1
Je @TheEnd Je @TheEnd
@ -598,6 +629,10 @@ BEGIN
Int 14h Int 14h
@TheEnd: @TheEnd:
END; END;
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON4 Com_Send'); Halt;
{$ENDIF}
END; END;
(* (*
@ -673,12 +708,17 @@ BEGIN
T_AL := 32; T_AL := 32;
END; END;
Inc(T_AL,3); Inc(T_AL,3);
{$IFDEF MSDOS}
ASM ASM
Mov AH,00h Mov AH,00h
Mov AL,T_AL Mov AL,T_AL
Mov DX,FossilPort Mov DX,FossilPort
Int 14h Int 14h
END; END;
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON4 Com_Set_Speed'); Halt;
{$ENDIF}
END; END;
END; END;
@ -696,16 +736,22 @@ PROCEDURE Com_DeInstall;
BEGIN BEGIN
IF (NOT LocalIOOnly) THEN IF (NOT LocalIOOnly) THEN
BEGIN BEGIN
{$IFDEF MSDOS}
ASM ASM
Mov AH,05h Mov AH,05h
Mov DX,FossilPort Mov DX,FossilPort
Int 14h Int 14h
END; END;
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON4 Com_DeInstall'); Halt;
{$ENDIF}
END; END;
END; END;
PROCEDURE Com_Install; PROCEDURE Com_Install;
{$IFDEF MSDOS}
FUNCTION DriverInstalled: Word; ASSEMBLER; FUNCTION DriverInstalled: Word; ASSEMBLER;
ASM ASM
Mov AH,5 Mov AH,5
@ -716,6 +762,13 @@ PROCEDURE Com_Install;
PushF PushF
Call Interrupt14 Call Interrupt14
END; END;
{$ENDIF}
{$IFDEF WIN32}
FUNCTION DriverInstalled: Word;
BEGIN
DriverInstalled := $1954; // Seems to be what it wants
END;
{$ENDIF}
BEGIN BEGIN
FossilPort := (Liner.Comport - 1); FossilPort := (Liner.Comport - 1);
@ -728,6 +781,7 @@ BEGIN
Halt; Halt;
END END
ELSE ELSE
{$IFDEF MSDOS}
ASM ASM
Xor AL,AL Xor AL,AL
Mov BL,Liner.MFlags Mov BL,Liner.MFlags
@ -744,9 +798,14 @@ BEGIN
PushF PushF
Call Interrupt14 Call Interrupt14
END; END;
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON4 Com_Install'); Halt;
{$ENDIF}
Com_Set_Speed(Liner.InitBaud); Com_Set_Speed(Liner.InitBaud);
END; END;
{$IFDEF MSDOS}
PROCEDURE CheckHangup; ASSEMBLER; PROCEDURE CheckHangup; ASSEMBLER;
ASM ASM
Cmp LocalIOOnly,1 Cmp LocalIOOnly,1
@ -762,6 +821,13 @@ ASM
Mov HangUp,1 Mov HangUp,1
@GetOut: @GetOut:
END; END;
{$ENDIF}
{$IFDEF WIN32}
PROCEDURE CheckHangup;
BEGIN
WriteLn('REETODO COMMON4 CheckHangup'); Halt;
END;
{$ENDIF}
(* (*
AH = 19h Write block (transfer from user buffer to FOSSIL) AH = 19h Write block (transfer from user buffer to FOSSIL)
@ -790,6 +856,7 @@ BEGIN
T_DI := OFS(S[1]); T_DI := OFS(S[1]);
T_CX := Length(S); T_CX := Length(S);
T_ES := Seg(S[1]); T_ES := Seg(S[1]);
{$IFDEF MSDOS}
ASM ASM
Mov AH,19h Mov AH,19h
Mov DI,T_DI Mov DI,T_DI
@ -799,6 +866,10 @@ BEGIN
Int 14h Int 14h
Mov T_AX,AX Mov T_AX,AX
END; END;
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON4 SerialOut'); Halt;
{$ENDIF}
Move(S[T_AX + 1],S[1],Length(S) - T_AX); Move(S[T_AX + 1],S[1],Length(S) - T_AX);
Dec(S[0],T_AX); Dec(S[0],T_AX);
UNTIL (S = ''); UNTIL (S = '');
@ -834,12 +905,17 @@ BEGIN
Empty := NOT KeyPressed; Empty := NOT KeyPressed;
IF (InCom) AND (NOT KeyPressed) THEN IF (InCom) AND (NOT KeyPressed) THEN
BEGIN BEGIN
{$IFDEF MSDOS}
ASM ASM
Mov DX,FossilPort Mov DX,FossilPort
Mov AH,03h Mov AH,03h
Int 14h Int 14h
Mov T_AH,AH Mov T_AH,AH
END; END;
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON4 Empty'); Halt;
{$ENDIF}
Empty := NOT (T_AH AND 1 = 1); Empty := NOT (T_AH AND 1 = 1);
END; END;
END; END;
@ -862,12 +938,17 @@ BEGIN
IF (NOT LocalIOOnly) THEN IF (NOT LocalIOOnly) THEN
BEGIN BEGIN
T_AL := Byte(Status); T_AL := Byte(Status);
{$IFDEF MSDOS}
ASM ASM
Mov AH,06h Mov AH,06h
Mov DX,FossilPort Mov DX,FossilPort
Mov AL,T_AL Mov AL,T_AL
Int 14h Int 14h
END; END;
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO COMMON4 DTR'); Halt;
{$ENDIF}
END; END;
END; END;

View File

@ -19,7 +19,11 @@ IMPLEMENTATION
USES USES
Dos, Dos,
Common, Common,
TimeFunc; TimeFunc
{$IFDEF WIN32}
,Windows
{$ENDIF}
;
FUNCTION InTime(Tim,Tim1,Tim2: LongInt): Boolean; FUNCTION InTime(Tim,Tim1,Tim2: LongInt): Boolean;
BEGIN BEGIN
@ -226,11 +230,19 @@ END;
FUNCTION SysOpAvailable: Boolean; FUNCTION SysOpAvailable: Boolean;
VAR VAR
{$IFDEF MSDOS}
A: Byte ABSOLUTE $0000:$0417; A: Byte ABSOLUTE $0000:$0417;
{$ENDIF}
EventNum: Integer; EventNum: Integer;
ChatOk: Boolean; ChatOk: Boolean;
BEGIN BEGIN
{$IFDEF MSDOS}
ChatOk := ((A AND 16) = 0); ChatOk := ((A AND 16) = 0);
{$ENDIF}
{$IFDEF WIN32}
// Availability is togged with scroll lock key
ChatOk := (GetKeyState($91) and $ffff) <> 0;
{$ENDIF}
IF (RChat IN ThisUser.Flags) THEN IF (RChat IN ThisUser.Flags) THEN
ChatOk := FALSE; ChatOk := FALSE;

View File

@ -43,10 +43,12 @@ VAR
SaveY: Byte; SaveY: Byte;
SavCurWind: Integer; SavCurWind: Integer;
{$IFDEF MSDOS}
{$L EXECWIN} {$L EXECWIN}
PROCEDURE SetCsInts; EXTERNAL; PROCEDURE SetCsInts; EXTERNAL;
PROCEDURE NewInt21; EXTERNAL; PROCEDURE NewInt21; EXTERNAL;
{$ENDIF}
PROCEDURE ExecWindow(VAR Ok: Boolean; PROCEDURE ExecWindow(VAR Ok: Boolean;
CONST Dir, CONST Dir,
@ -83,6 +85,7 @@ BEGIN
WindLo := WindMin; WindLo := WindMin;
WindHi := WindMax; WindHi := WindMax;
{$IFDEF MSDOS}
{Assure cursor is in Window} {Assure cursor is in Window}
INLINE INLINE
( (
@ -119,6 +122,7 @@ BEGIN
GetIntVec($21,CurInt21); GetIntVec($21,CurInt21);
SetCsInts; SetCsInts;
SetIntVec($21,@NewInt21); SetIntVec($21,@NewInt21);
{$ENDIF}
{$IFDEF Ver70} {$IFDEF Ver70}
{Prevent SwapVectors from undoing our int21 change} {Prevent SwapVectors from undoing our int21 change}
@ -136,8 +140,10 @@ BEGIN
Window(1,1,MaxDisplayCols,MaxDisplayRows); Window(1,1,MaxDisplayCols,MaxDisplayRows);
RemoveWindow(Wind); RemoveWindow(Wind);
{$IFDEF MSDOS}
{Restore interrupt} {Restore interrupt}
SetIntVec($21,CurInt21); SetIntVec($21,CurInt21);
{$ENDIF}
General.CurWindow := SaveCurWindow; General.CurWindow := SaveCurWindow;
General.WindowOn := SaveWindowOn; General.WindowOn := SaveWindowOn;
LastScreenSwap := (Timer - 5); LastScreenSwap := (Timer - 5);

View File

@ -74,6 +74,7 @@ BEGIN
Delay(600) Delay(600)
ELSE ELSE
BEGIN BEGIN
{$IFDEF MSDOS}
FOR Counter1 := 300 DOWNTO 2 DO FOR Counter1 := 300 DOWNTO 2 DO
BEGIN BEGIN
Delay(1); Delay(1);
@ -84,8 +85,12 @@ BEGIN
Delay(1); Delay(1);
Sound(Counter1 * 10); Sound(Counter1 * 10);
END; END;
NoSound;
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO LINECHAT RequestSysOpChat'); Halt;
{$ENDIF}
END; END;
NoSound;
IF (KeyPressed) THEN IF (KeyPressed) THEN
BEGIN BEGIN
Cmd := ReadKey; Cmd := ReadKey;
@ -364,6 +369,7 @@ BEGIN
CLS CLS
ELSE IF (S = '/PAGE') THEN ELSE IF (S = '/PAGE') THEN
BEGIN BEGIN
{$IFDEF MSDOS}
FOR Counter := 650 TO 700 DO FOR Counter := 650 TO 700 DO
BEGIN BEGIN
Sound(Counter); Sound(Counter);
@ -376,6 +382,10 @@ BEGIN
Delay(2); Delay(2);
NoSound; NoSound;
UNTIL (Counter = 200); UNTIL (Counter = 200);
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO LINECHAT SysOpLineChat'); Halt;
{$ENDIF}
Prompt(^G^G); Prompt(^G^G);
END END
ELSE IF (S = '/BYE') THEN ELSE IF (S = '/BYE') THEN

View File

@ -1223,7 +1223,7 @@ VAR
Insert_Char(Char(GKey)); Insert_Char(Char(GKey));
127 : 127 :
Delete_Char; Delete_Char;
32..254 : 32..46, 48..126, 128..254 :
Insert_Char(Char(GKey)); Insert_Char(Char(GKey));
8 : BEGIN 8 : BEGIN
IF (CCol = 1) THEN IF (CCol = 1) THEN

View File

@ -28,8 +28,13 @@ CONST
VAR VAR
Wind: WindowRec; Wind: WindowRec;
{$IFDEF MSDOS}
MonitorType: Byte ABSOLUTE $0000:$0449; MonitorType: Byte ABSOLUTE $0000:$0449;
ScreenAddr: ScreenType ABSOLUTE $B800:$0000; ScreenAddr: ScreenType ABSOLUTE $B800:$0000;
{$ENDIF}
{$IFDEF WIN32}
MonitorType: Byte = 3; // REENOTE 3=CO80, a safe assumption I think
{$ENDIF}
ScreenSize: Integer; ScreenSize: Integer;
MaxDisplayRows, MaxDisplayRows,
MaxDisplayCols, MaxDisplayCols,
@ -529,12 +534,22 @@ END;
PROCEDURE SaveScreen(VAR Wind: WindowRec); PROCEDURE SaveScreen(VAR Wind: WindowRec);
BEGIN BEGIN
{$IFDEF MSDOS}
Move(ScreenAddr[0],Wind[0],ScreenSize); Move(ScreenAddr[0],Wind[0],ScreenSize);
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO MYIO SaveScreen'); Halt;
{$ENDIF}
END; END;
PROCEDURE RemoveWindow(VAR Wind: WindowRec); PROCEDURE RemoveWindow(VAR Wind: WindowRec);
BEGIN BEGIN
{$IFDEF MSDOS}
Move(Wind[0],ScreenAddr[0],ScreenSize); Move(Wind[0],ScreenAddr[0],ScreenSize);
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO MYIO RemoveWindow'); Halt;
{$ENDIF}
END; END;
PROCEDURE SetWindow(VAR Wind: WindowRec; TLX,TLY,BRX,BRY,TColr,BColr,BoxType:Integer); PROCEDURE SetWindow(VAR Wind: WindowRec; TLX,TLY,BRX,BRY,TColr,BColr,BoxType:Integer);
@ -549,6 +564,7 @@ END;
PROCEDURE Update_Logo(VAR Addr1,Addr2; BlkLen: Integer); PROCEDURE Update_Logo(VAR Addr1,Addr2; BlkLen: Integer);
BEGIN BEGIN
{$IFDEF MSDOS}
INLINE ( INLINE (
$1E/ $1E/
$C5/$B6/ADDR1/ $C5/$B6/ADDR1/
@ -603,6 +619,10 @@ BEGIN
$49/ $49/
$E0/$AA/ $E0/$AA/
$1F); $1F);
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO MYIO Update_Logo'); Halt;
{$ENDIF}
END; END;
END. END.

View File

@ -2,7 +2,9 @@
{$I DEFINES.INC} {$I DEFINES.INC}
{$ENDIF} {$ENDIF}
{$IFDEF MSDOS}
{$M 35500,0,131072} {$M 35500,0,131072}
{$ENDIF}
{ R E N E G A D E } { R E N E G A D E }
{ =============== } { =============== }
@ -230,7 +232,9 @@ END;
BEGIN BEGIN
ClrScr; ClrScr;
TextColor(Yellow); TextColor(Yellow);
{$IFDEF MSDOS}
GetIntVec($14,Interrupt14); GetIntVec($14,Interrupt14);
{$ENDIF}
FileMode := 66; FileMode := 66;
ExitSave := ExitProc; ExitSave := ExitProc;
ExitProc := @ErrorHandle; ExitProc := @ErrorHandle;
@ -266,6 +270,7 @@ BEGIN
ReadP; ReadP;
{$IFDEF MSDOS}
OvrFileMode := 0; OvrFileMode := 0;
Write('Initializing RENEGADE.OVR ... '); Write('Initializing RENEGADE.OVR ... ');
OvrInit('RENEGADE.OVR'); OvrInit('RENEGADE.OVR');
@ -316,6 +321,7 @@ BEGIN
END; END;
END; END;
WriteLn('Initial size of the overlay buffer is '+FormatNumber(OvrGetBuf)+' bytes.'); WriteLn('Initial size of the overlay buffer is '+FormatNumber(OvrGetBuf)+' bytes.');
{$ENDIF}
Init; Init;

View File

@ -36,11 +36,24 @@ FUNCTION Spawn(ProgName: STRING; Arguments: STRING; EnvSeg: Integer): Integer;
IMPLEMENTATION IMPLEMENTATION
{$IFDEF MSDOS}
{$L SPAWNTP.OBJ} {$L SPAWNTP.OBJ}
PROCEDURE Init_Spawno(Swap_Dirs: STRING; Swap_Types: Integer; Min_Res: Integer; Res_Stack: Integer); EXTERNAL; PROCEDURE Init_Spawno(Swap_Dirs: STRING; Swap_Types: Integer; Min_Res: Integer; Res_Stack: Integer); EXTERNAL;
FUNCTION Spawn(ProgName: STRING; Arguments: STRING; EnvSeg: Integer): Integer; EXTERNAL; FUNCTION Spawn(ProgName: STRING; Arguments: STRING; EnvSeg: Integer): Integer; EXTERNAL;
{$ENDIF}
{$IFDEF WIN32}
PROCEDURE Init_Spawno(Swap_Dirs: STRING; Swap_Types: Integer; Min_Res: Integer; Res_Stack: Integer);
BEGIN
WriteLn('REETODO SPAWNO Init_Spawno'); Halt;
END;
FUNCTION Spawn(ProgName: STRING; Arguments: STRING; EnvSeg: Integer): Integer;
BEGIN
WriteLn('REETODO SPAWNO Spawn'); Halt;
END;
{$ENDIF}
END. END.

View File

@ -82,10 +82,11 @@ BEGIN
lRGLngStr(15,FALSE); lRGLngStr(15,FALSE);
IF (OutCom) THEN IF (OutCom) THEN
Com_Send(^G); Com_Send(^G);
IF (ShutUpChatCall) THEN IF (ShutUpChatCall) THEN
Delay(600) Delay(600)
ELSE ELSE
BEGIN BEGIN
{$IFDEF MSDOS}
FOR Counter1 := 300 DOWNTO 2 DO FOR Counter1 := 300 DOWNTO 2 DO
BEGIN BEGIN
Delay(1); Delay(1);
@ -96,8 +97,12 @@ BEGIN
Delay(1); Delay(1);
Sound(Counter1 * 10); Sound(Counter1 * 10);
END; END;
NoSound;
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO SPLITCHA RequestSysOpChat'); Halt;
{$ENDIF}
END; END;
NoSound;
IF (KeyPressed) THEN IF (KeyPressed) THEN
BEGIN BEGIN
Cmd := ReadKey; Cmd := ReadKey;

View File

@ -223,7 +223,12 @@ VAR
END; END;
BEGIN BEGIN
{$IFDEF MSDOS}
Mark(TopHeap); Mark(TopHeap);
{$ENDIF}
{$IFDEF WIN32}
// REETODO Prepare to leak memory...
{$ENDIF}
Used := NIL; Used := NIL;
Top := NIL; Top := NIL;
Bottom := NIL; Bottom := NIL;
@ -396,7 +401,12 @@ BEGIN
Cur := NIL; Cur := NIL;
Top := NIL; Top := NIL;
Bottom := NIL; Bottom := NIL;
{$IFDEF MSDOS}
Release(TopHeap); Release(TopHeap);
{$ENDIF}
{$IFDEF WIN32}
// REETODO Likely going to leak memory right about now
{$ENDIF}
END; END;
'D' : BEGIN 'D' : BEGIN
I := StrToInt(Copy(S,2,9)); I := StrToInt(Copy(S,2,9));
@ -540,7 +550,12 @@ BEGIN
UNTIL ((Done) OR (HangUp)); UNTIL ((Done) OR (HangUp));
END; END;
END; END;
{$IFDEF MSDOS}
Release(TopHeap); Release(TopHeap);
{$ENDIF}
{$IFDEF WIN32}
// REETODO Likely going to leak memory right about now
{$ENDIF}
PrintingFile := FALSE; PrintingFile := FALSE;
LastError := IOResult; LastError := IOResult;
END; END;

View File

@ -309,7 +309,12 @@ BEGIN
Com_Send_Str(Liner.Answer); Com_Send_Str(Liner.Answer);
IF (SysOpOn) THEN IF (SysOpOn) THEN
{$IFDEF MSDOS}
Update_Logo(ANSWER,ScreenAddr[(3*2)+(19*160)-162],ANSWER_LENGTH); Update_Logo(ANSWER,ScreenAddr[(3*2)+(19*160)-162],ANSWER_LENGTH);
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO WFCMENU GetConnection'); Halt;
{$ENDIF}
rl := 0; rl := 0;
SaveTimer := Timer; SaveTimer := Timer;
@ -416,10 +421,19 @@ BEGIN
IF (SysOpOn) THEN IF (SysOpOn) THEN
BEGIN BEGIN
{$IFDEF MSDOS}
Update_Logo(WFC,ScreenAddr[0],WFC_LENGTH); Update_Logo(WFC,ScreenAddr[0],WFC_LENGTH);
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO WFCMENU WFCDraw1'); Halt;
{$ENDIF}
IF (General.NetworkMode) THEN IF (General.NetworkMode) THEN
{$IFDEF MSDOS}
Update_Logo(WFCNET,ScreenAddr[(3*2)+(19*160)-162],WFCNET_LENGTH); Update_Logo(WFCNET,ScreenAddr[(3*2)+(19*160)-162],WFCNET_LENGTH);
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO WFCMENU WFCDraw2'); Halt;
{$ENDIF}
LoadURec(ThisUser,1); LoadURec(ThisUser,1);
@ -589,7 +603,12 @@ BEGIN
END; END;
END END
ELSE ELSE
{$IFDEF MSDOS}
Update_Logo(WFC0,ScreenAddr[0],WFC0_LENGTH); Update_Logo(WFC0,ScreenAddr[0],WFC0_LENGTH);
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO WFCMENU WFCDraw3'); Halt;
{$ENDIF}
END; END;
END; END;
@ -714,6 +733,7 @@ VAR
BeepEnd := FALSE; BeepEnd := FALSE;
rl := Timer; rl := Timer;
REPEAT REPEAT
{$IFDEF MSDOS}
Sound(1500); Sound(1500);
Delay(20); Delay(20);
Sound(1000); Sound(1000);
@ -721,6 +741,10 @@ VAR
Sound(800); Sound(800);
Delay(20); Delay(20);
NoSound; NoSound;
{$ENDIF}
{$IFDEF WIN32}
WriteLn('REETODO WFCMENU BeepHim'); Halt;
{$ENDIF}
rl1 := Timer; rl1 := Timer;
WHILE (ABS(rl1 - Timer) < 0.9) AND (NOT KeyPressed) DO; WHILE (ABS(rl1 - Timer) < 0.9) AND (NOT KeyPressed) DO;
UNTIL (ABS(rl - Timer) > 30) OR (KeyPressed); UNTIL (ABS(rl - Timer) > 30) OR (KeyPressed);