home *** CD-ROM | disk | FTP | other *** search
- {
- ──────────────────────────────────────────────────────────────────────────
- ROBO-BOARD DATA FILE STRUCTURES - BY SETH HAMILTON JAN 20, 1992
- ──────────────────────────────────────────────────────────────────────────
-
- Robo-Board 1.08 was written in TURBO PASCAL 6.0, therefor all of the
- following header formats are in PASCAL format. A bit of information to
- help 'C' or BASIC programmers is offered at the end of this text.
-
- This code was written by Seth Hamilton but is free for use by all who
- wish to use it for the purpose of creating Robo-Board Utilities or
- doors.
-
- Note: Hudson message base headers are not included in this text. Most
- Hudson information was aquired by myself through the use of my
- HEX editor and the Front Door message editor. Additional info
- was uploaded to me by my users when I displayed interest in a
- new message base format. If I can contact Mr. Hudson and get
- permission to use his file formats in this text, I will do so.
-
- ──────────────────────────────────────────────────────────────────────────
-
- }
-
-
- }
- ──────────────────────────────────────────────────────────────────────────
- ROBOCFG RECORD
- ──────────────────────────────────────────────────────────────────────────
-
- This record type is used by ROBOCFG.EXE, the file ROBOBBS.CFG contains
- one record made up the information below.
- }
- Type
- RBOCFG = RECORD
- CFG_BBSPATH : string[45];
- {Path To the Robo-Board Bbs files}
- CFG_MSGPATH : string[45];
- {Path to the Hudson message base files and LASTREAD.BBS}
- CFG_PRTPATH : string[45];
- {Path to external protocols used by Robo-Board for terminal transfer}
- CFG_GRFPATH : string[45];
- {Path to the grpahics and menu files used by Robo-Board}
-
- {The following few records are in array format. Each record in an array
- represents a node number}
- CFG_BAUD : array[1..9] of WORD; {Modem MAX baud rate}
- CFG_COM : array[1..9] of BYTE; {Modem Com port}
- CFG_INIT : array[1..9] of STRING[60]; {Modem configuration string}
- CFG_ANSWER : array[1..9] of STRING[10]; {Modem answer string}
- Cfg_busy : array[1..9] of String[10]; {String to make modem busy}
- CFG_LOCKAT : array[1..9] of WORD; {Modem baud locked at}
- CFG_allow1200 : array[1..9] of boolean; {Allow 1200 toggle}
- CFG_allow2400 : array[1..9] of boolean; {Allow 2400 toggle}
- CFG_ModemBreak : array[1..9] of boolean; {Send break to clear}
- CFG_Busylocal : boolean; {modem busy on local logon}
- CFG_EVENT1 : shortint; {1 byte int for event hour}
- CFG_EVENT2 : shortint; {1 byte int for event hour}
- CFG_EVENT3 : shortint; {1 byte int for event hour}
- CFG_EVENT4 : shortint; {1 byte int for event hour}
- CFG_SYSOPNAME : STRING[40]; {Sysops name}
- CFG_BBSNAME : STRING[40]; {Bbs's name}
- CFG_NEWACCESS : byte; {new user access/call back}
- CFG_DEFAULTTIME : WORD; {if access.def found}
- CFG_NOTEMESSAGE : STRING; {Displayed by SysOp}
- CFG_RATIOUP : BYTE; {if access.def found}
- CFG_RATIODOWN : BYTE; {if access.def found}
- CFG_UPCREDIT : STRING[5]; {if access.def found}
- CFG_TIMEOUT : WORD; {Keyboard Timeout (seconds)}
- CFG_PAGEFROM : BYTE; {Page from hour (24hrs)}
- CFG_PAGETO : BYTE; {Page to hour (24hrs)}
- CFG_DLSTARTTIME : byte; {DL start hour (24hrs)}
- CFG_DLENDTIME : byte; {DL end hour (24hrs)}
- CFG_ULSTARTTIME : byte; {UL start hour (24hrs)}
- CFG_ULENDTIME : byte; {UL end hour (24hrs)}
- CFG_MINSPEED : word; {min baud for file transfers}
- CFG_MINSPEEDEGA : word; { RESERVED }
- CFG_MINSPEEDMONO : word; { RESERVED }
- CFG_MINSPEEDANSI : word; { RESERVED }
- CFG_SCANBATCH : string[12]; {Virus scan batch name}
- CFG_SCANEGA : boolean; {T=EGA F=ANSI on users end}
- RESERVED1,
- RESERVED2 : byte; { RESERVED }
- CFG_Echomailfile : boolean; {make scan file}
- CFG_Showoffline : boolean; {Show offline files}
- CFG_HDlimit : longint; {Min HD space for uploads}
- CFG_PHONEPLATE : STRING[15]; {phone number template}
- CFG_EGAVGAMINACC : BYTE; { RESERVED }
- CFG_Pagecomment : byte; {Comment message base}
- CFG_Maxpages : byte; {maxpages a user can make}
- CFG_newmailcheck : boolean; {New mail check at logon}
- CFG_REGISTERED : STRING[50]; {Registration code}
- CFG_SOUNDLEVEL : Byte; {Ask of birthdate}
- RESERVED3 : boolean; {Ask for handle}
- RESERVED4 : boolean; {Ask home phone}
- CFG_TimeBANKmax : word; {time bank max (9999)}
- CFG_Termname : string[12]; {current terminal name}
-
- {CFG MULTI NODE}
- CFG_numofnodes : byte; {9 max}
-
- {CALL BACK VERIFY}
- {+} CFG_usecallback : boolean; {Is call back active}
- {+} CFG_CALLACCESS : BYTE; {access after call back}
- {+} CFG_AREACODE : array [1..3] of string[3]; {3 area codes for call back}
- {+} CFG_CALLEXPACC : byte; {access when user expires}
- {+} CFG_CALLEXPIRY : word; {user expiry in Days}
- {+} CFG_CALLBACKDIAL : STRING[10]; {dial codes for modem}
- {+} CFG_verifyflags : ARRAY[1..8] of boolean; {flags after verify}
-
- {STATS}
- CFG_EVENT1_DONE, {is event 1 done}
- CFG_EVENT2_DONE, {is event 2 done}
- CFG_EVENT3_DONE, {is event 3 done}
- CFG_EVENT4_DONE : Boolean; {is event 4 done}
- CFG_CALLSTODAY : WORD; {number of calls today}
- CFG_CALLSTOTAL : WORD; {number of calls total}
- CFG_LASTCALLER : STRING[25]; {name of last caller}
- CFG_BOGUSDAY : byte; {Day of month - for events}
- RESERVED5 : STRING[14]; { RESERVED }
- CFG_OriginLine : String[60]; {default message origin}
-
- {MAIL}
- CFG_Addresses : Array[1..10] of string[15];
- CFG_EXPANSION : ARRAY[1..1024] of byte; { RESEVED FOR EXPANSION }
- end;
-
- {
- ──────────────────────────────────────────────────────────────────────────
- FILE AND MESSAGE BASES
- ──────────────────────────────────────────────────────────────────────────
-
- The following two record types are used in the files MSGAREA.DEF and
- FILEAREA.DEF. Robo-Board supports 200 message and file areas. But in
- actuality 201 records exist in each file. This is because Robo-Board
- reserves the first record in each file for future header information
- or just incase I need it. So don't write in it. I will tell you if
- I ever do use it.
- }
-
- MBaserecord = record
- Name : String[40];
- Attribute : Byte;
-
- {LOCAL PRI/PUB = 0 I will likely change the
- LOCAL PUBLIC = 1 way this works.
- ECHO MAIL = 2
- LOCAL HANDLES = 3
- ECHO HANDLES = 4}
-
- MaxMessages : Word; {Max messages, used by ROBOUTIL}
- ReadSecurity : Word;
- WriteSecurity : Word;
- RACCESSTYPE : byte; { 1 is >= 2 is <= 3 is = }
- WACCESSTYPE : byte; { 1 is >= 2 is <= 3 is = }
- SysopAccess : Word; {assumed 255, never used}
- OriginLine : String[60];
- MenuOnly : String[12];
- NETADDRESS : string[15];
- msgflags : array[1..8] of boolean;
- Freespace : array[1..110] of byte;
- end;
-
- FBaserecord = record
- Name : String[40];
- Reserved1 : Byte; { RESERVED}
- CDROMFILENUM : Byte;
- KILLOLDERTHAN : Byte; {Will be used by ROBOUTIL}
- ACCESSTYPE : byte; { 1 is >= 2 is <= 3 is = }
- Security : Word; {Max 255, future in mind}
- SysopSecurity : Word; {assumed 255, never used}
- Path : String[60];
- MenuOnly : String[12];
- fileflags : array[1..8] of boolean;
- expansion : array[1..120] of byte;
- end;
- {
- ──────────────────────────────────────────────────────────────────────────
- NODE INFO
- ──────────────────────────────────────────────────────────────────────────
-
- This file contains 9 records . At the moment, ROBO-BOARDS chat follows a
- see it as you type it style profile, but, this file could be used easily
- (because of its 80 byte text buffer) for typical one line at a time chat.
- If and when I ever support the line by line chat, ROBO-BOARD could
- support from 50-100 or perhaps more lines of chat.
-
- This file is NOT locked, (don't lock it) I have not found any reason for
- it to be locked, nothing is removed from it, nothing is inserted into it,
- and it is not moved while robo-board is running. Simply, 9 are read and
- one is updated by each node.
-
- }
- NINFOrecord = record
- NODE_UserPtr : word; {Offset in user files to userrec}
- NODE_Activity : byte;
- {
- NODE_ACTIVITY
- 0 : chat_temp := 'Idle';
- 1 : chat_temp := 'Logging On';
- 2 : chat_temp := 'Uploading File';
- 3 : chat_temp := 'Downloading File(s)';
- 4 : chat_temp := 'Entering Messages';
- 5 : chat_temp := 'Reading Messages';
- 6 : chat_temp := 'Scanning New Files';
- 7 : chat_temp := 'Listing Files';
- 8 : chat_temp := 'Viewing Files';
- 9 : chat_temp := 'Reading Text File';
- 10 : chat_temp := 'Viewing Graphics File';
- 11 : chat_temp := 'Downloading File(s)!';
- 12 : chat_temp := 'Settings Menu';
- 13 : chat_temp := 'Call Back Verify';
- 14 : chat_temp := 'Hangin Up';
- 15 : chat_temp := 'Nodel Chat (DIFFERENT FORUM)';
- 16 : chat_temp := 'Paging SysOp';
- 17 : chat_temp := 'Dos Program (ANSI/ASCII)';
- 18 : chat_temp := 'Dos Program (EGA/VGA)';
- 19 : chat_temp := 'Node Chat';
- 20 : chat_temp := 'Scanning New Mail';
- 21 : chat_temp := 'At Menu';
- 22 : chat_temp := 'Using Time Bank';
- }
- NODE_UserText : Array [1..80] of Char; {Chat text}
- NODE_TxtPtr : byte; {Offset in text}
- NODE_Forum : byte; { RESERVED }
- NODE_Paged : byte; {node num paged by}
- Expansion : Array [1..16] Of Byte;
- end;
-
- {
- ──────────────────────────────────────────────────────────────────────────
- THE USER FILES
- ──────────────────────────────────────────────────────────────────────────
-
- The record UD1 contains just the users name for fast access while searching
- the user base at logon. If you have 400 users this method is appreciated.
-
- UD2 contains the rest of the user information. The records in ROBOUSR1.DAT,
- ROBUSER2.DAT and LASTREAD.BBS all share the same record number. So if
- removing a user from one file it is important to do so to the other files.
- The same goes for inserting or re-ordering the user base. The Hudson
- LASTREAD.BBS file also corresponds record wise with these files.
-
- NOTE: The first records in the files are left empty (or rather garbled),
- these records cannot be seen with ROBOUSER. Mainly, all garbage
- caused by users dropping carrier before logon and stuff like that
- is placed in these records.
- }
-
- UD1 = RECORD
- NAME : STRING[36];
- HANDLE : STRING[36];
- END;
-
- UD2 = RECORD
- PASS : STRING[36];
- PHONE1 : STRING[15]; {home}
- PHONE2 : STRING[15]; {data}
- CITY : STRING[15];
- LYEAR : word; {Last year called}
- LMONTH : word; {Last month called}
- LDAY : word; {Last day called}
- LHOUR : byte; {Last hour called}
- CALLS : word;
- TIMEL : longint; {Time left in minutes}
- access : BYTE;
- BANK : word; {minutes in bank}
- BIRTHDATE : STRING[8]; {MM/DD/YY}
- UPLOADS,
- DOWNLOADS : word;
- Lastscan : word; {last scanned: kept but not used}
- basestat : Array[1..200] of boolean; {toggle status of
- message bases}
- userflags : Array[1..8] of boolean;
- expiry : longint; {expiry in YYMMDD}
- exp_access: byte; {access after expiry}
- {attributes}
- non_delete: boolean;
- over_ride : boolean;
- read_all : boolean;
- read_kill : boolean;
- no_expire : boolean;
- no_ratio : boolean;
- no_page : boolean;
- no_tlimit : boolean;
- speedtime : boolean;
- usersound : boolean;
- mailcheck : boolean;
- Street : STRING[26];
- Postalcode: STRING[9];
- expansion : array[1..194] of byte;
-
- END;
-
- LastReadRec = array[1..200] of Word; {Used by Hudson for the last read}
- {pointers of the 200 message bases}
-
- {
- ──────────────────────────────────────────────────────────────────────────
- DRAWING RECORDS
- ──────────────────────────────────────────────────────────────────────────
-
- The following is the Drawing record format found in .RBO files.
- There may be as many of these records as are needed within a file.
- _Command may be one of the following:
-
- (assuming with)
- CASE _COMMAND OF
- 1,2 : line; From X1,Y1 to X2,Y2
- 3 : rectangle; From X1,Y1 to X2,Y2
- 4 : fill_rectangle; From X1,Y1 to X2,Y2
- 5 : ellipse; Center=X1,Y1 radius= X2,Y2
- 6 : fill_ellipse; Center=X1,Y1 radius= X2,Y2
- 7 : BEGIN
- case X2 of X2 = font number in this case
- 1 : setfont_font09;
- 2 : setfont_FONT14;
- 3 : setfont_COUNTDWN;
- 4 : setfont_FUTURE;
- 5 : setfont_FONTPC9;
- 6 : setfont_BROADWAY;
- end;
- text_write;
- END;
- 8 : BEGIN
- fstr := _iconfile; icon library file name
- loadsprite; loadsprite will not load if already loaded
- sprite := x2; sprite or icon index = X2 variable
- showsprite;
- END;
- 9 : r_paint; fill at X1,Y1 in FC (forground colour)
- to BC (border colour)
- 10 : ; * RESERVED *
- 11,12 : Button; draw button, offset controls white, gray etc
- 13 : Plain_window; Draw window to fit X1,Y1,X2,Y2 with
- FC (forground colour) interior and
- BC (border colour) border
- Corner sprites defaulted to ROBO1_02.LIB's
- "!" icon.
- 15 : r_arc; 90 degree arcs. X1,Y1 is center of ellipse section
- X2 and Y2 are radius
- 20 : cleargrph This clears the screen, used by ROBODRAW when asking if
- you want to clear the screen. On load by ROBODRAW this
- record is skipped and must be added (to record #0) at save.
-
- Here is a hint on calculating box arcs....
-
- ──────────────────────────────────
- tII := abs(x1-x2); tIII := abs(y1-y2);
-
- if (x1 - x2 < 0) and (y1 - y2 > 0) then
- begin
- angle1 := 0;
- angle2 := 90;
- end;
- if (x1 - x2 > 0) and (y1 - y2 < 0) then
- begin
- angle1 := 180;
- angle2 := 270;
- end;
- if (x1 - x2 < 0) and (y1 - y2 < 0) then
- begin
- angle1 := 270;
- angle2 := 360;
- end;
- if (x1 - x2 > 0) and (y1 - y2 > 0) then
- begin
- angle1 := 90;
- angle2 := 180;
- end;
- Ellipse(X1, Y1, Angle1, Angle2, tii , tiii );
- ──────────────────────────────────
-
- end;
-
- NOTE: ROBO-BOARD technical information can be requested for a full RBO100
- Graphical Telecommunications Protocol breakdown. Also Source code in
- TURBO PASCAL 6.0 can be requested for a RBO100 toolkit. Refer to
- the section in the Robo-Board manual titled SUPPORT for more
- information about requesting information or toolkits.
-
- }
-
- dr = record
-
- _x1, _y1, _x2, _y2 : integer;
- _fc, _bc, _stroff,
- _command, _offset : byte;
- _iconfile : string[12];
- _Flags : array[1..8] of boolean; { Not used, to dangerous }
- _Access : byte;
- _SecType : byte; { 1 is >= 2 is <= 3 is = }
- end;
-
- {
- ──────────────────────────────────────────────────────────────────────────
- MENU COMMANDS
- ──────────────────────────────────────────────────────────────────────────
-
- There may be a maximum of 50 records like the one listed below in a
- .MNU file. For a .MNU file to be used in ROBO-BOARD a .RBO file with
- the same name prefix must exist in the directory. ROBO-BOARD expects
- (rather it needs) this file to be 50 records big, Robo-Board BLOCKREADs
- this file into a large array.
-
- The first record in this file is reserved for future header information.
- Therefor start reading at record 1, not record 0.
- }
- mr = record
- {Convenient 128 byte record }
- m_x1, m_y1, m_x2, m_y2 : integer; {Hot Spot rectangle Coords}
- m_command : byte; {Command number}
- m_key : char; {Hot key for hot spot}
- m_textdata1 : string[35]; {Used for command data}
- m_textdata2 : string[35]; {Used for command data}
- m_commandtogs : array[1..10] of word; {NOT USED YET, MAYBE L8R}
- m_Flags : array[1..8] of boolean;
- m_Access : byte;
- m_SecType : byte; { 1 is >= 2 is <= 3 is = }
- m_freespace : array[1..16] of byte; {Expansion}
- end;
-
-
- {
- ──────────────────────────────────────────────────────────────────────────
- ICON RECORDS
- ──────────────────────────────────────────────────────────────────────────
-
- Icon records are split into 900 byte segments. Each byte represents
- a pixel on a 30x30 grid. Because the icon record approaches the 65k
- mark, it is often required that this be a pointer type variable. An
- icon can be displayed easily (BUT SLOWLY) with a simple routine like:
-
- for I := 1 to 30 do
- for II := 1 to 30 do
- if p^.pic1[sprite,((I-1)*30)+II ] <> 16 then
- putpixel(X + I,
- Y + II,
- p^.spriterec[ sprite, ((I-1)*30)+II ] );
-
- NOTE: Colour 16 is transparent, so just skip by a colour 16 if one
- is found. Colours range from 0-15 normally. Also note that the 1st
- record (index 0) is reserved for future header information.
-
- When reading in icon files, you can do so by reading them with a BLOCKREAD
- this is a LOT faster than reading them in record by record or byte by byte.
- Icon files start at record 1, record 0 is 900 bytes big, but has been
- reserved for future header information.
- }
-
- record_t = RECORD
- spriterec : array [1..65, 1..900] of byte;
- END;
-
- {
- NOTE: For those of you who wish to write utilities in 'C' or BASIC and
- don't have a solid understanding of the pascal string format here
- it is simply.
-
- Where ever it says STRING[nn] the actual size of that entity
- is nn + 1. A Pascal string is not null terminated, it contains
- a length in its first byte. So a STRING[5] looks like this:
-
- #ccccc WHERE: c=character #=length of text in string.
-
- eg: 04h+'TEST'+01h+50h+E1h...(more random chars)
-
- The characters after the length of the text inside the string
- entity are unpredictable. Pascal does not clean its memory at
- load time such as basic would leaving its variables filled with
- random garbage. With out any way to signify an end of string, you
- will probably be forced to write a string handler so you may both
- read and write in the Pascal format.
- }
-
-
-
- end.
-