home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / hacking / phreak_utils_pc / source.doc < prev    next >
Encoding:
Text File  |  1995-04-01  |  16.5 KB  |  341 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                        BlueBEEP v1.00 Final Release
  9.                         Source Code Documentation
  10.               Docs and source (C) 1991-1995 Onkel Dittmeyer
  11.  
  12.                 - Released to the public April 1st, 1995 -
  13.  
  14.  
  15.  
  16. PURPOSE OF THIS FILE
  17.  
  18.     Pursuant to the USC Paperword Reduction Act, we have to tell you what
  19.   this file is all about (nawt). It is an open letter to the potential haqr
  20.   who wants to go ahead and mod the code. This should enlighten you a bit
  21.   on what I was thinking when I made it and how it is organized. The code
  22.   is TP 6.0 w/ a modded turbo.tpl (for speed). If you can't understand it
  23.   because you can't code or just started learning how to use Pascal, fuck
  24.   off. This is fucking advanced. Get with it.
  25.  
  26. SOMETHING FIRST OFF..
  27.  
  28.     First off, I want to say that I do not release this code so you lamer
  29.   puppies out there can put your name in it and spread it around. Since
  30.   BlueBEEP is everywhere already anyway, it's not like people wouldn't
  31.   notice, and all it would do for you is make your handle associated with
  32.   leym, uneleet behaviour all along. This source is being published so
  33.   people that know what they're doing can start adding new features, make
  34.   improvements and port this code to machines other than PC clones. It is
  35.   not there so you can steal the parts of the code you like and make your
  36.   own programs without giving me proper credit. I spend a hell of a lot of
  37.   time, sweat and effort on every single of those roughly 10,000 lines of
  38.   code, and all I am asking for is the proper respect: Whenever you use any
  39.   part of this code, mention my handle and say that I wrote this and that
  40.   part of it. Then send me some email at onkeld@planet.net and let me know
  41.   that you released a program that contains a part of my code. Uuencode me
  42.   a copy if you can. That's it. I am not asking for much. Just ripping my
  43.   code would be lame, childish, and illegal. And I guess I do not have to
  44.   mention that no part of this code or the program can be sold, used in any
  45.   commerical projects, or otherwise used for the purpose of personal
  46.   prosperity. If you like the way I code, hire me. I'm young, so I'm cheap.
  47.   But I'm greedy too; you have been warned.
  48.  
  49.  
  50. ABOUT THE CODE
  51.  
  52.     Right here comes a little bit of info about the actual code files. The
  53.   overlay files and the standard config etc are covered later in this doc.
  54.   This covers the actual libs and includes you need to generate the initial
  55.   bluebeep.exe BEFORE it is packed and the overlays are added.
  56.  
  57.     A little information on the whole process in general first: The final
  58.   BlueBEEP executable is generated in four steps. The script build.bat
  59.   takes care of it. First, bluebeep.pas and all the libraries are compiled
  60.   and linked into bluebeep.exe. Then that .exe is packed and the size of
  61.   the file has to be integrated into the overlay manager constant in
  62.   bbp_vars.pas. Then, it is compiled again with the new info, linked,
  63.   packed (with either lzexe or pklite), if pklite is used, the pklite
  64.   header info is stripped. After that, the overlay manager tool sostool.exe
  65.   throws all the necessary extra files (such as keys, default configs, dial
  66.   sets, and .voc files) into the .exe and the distributable, final, big
  67.   bluebeep.exe file is created. Any attempts in running bluebeep.exe before
  68.   the whole process is done or leaving anything out is inevitably going to
  69.   result in a nasty machine crash.
  70.  
  71.  
  72. THE SOURCE FILES
  73.  
  74.   a------bbp_bsli.pas     4658   3/23/94 14.10  source\
  75.  
  76.     This file is the BlueBEEP Script Language Interpreter. I hacked it up
  77.   in a very short time and it is not anything yet. Note to the hacker: This
  78.   could use some extra functions, variable support, etc. This is probably
  79.   one of the biggest expansion potentials for new version that could be
  80.   made.
  81.  
  82.   a------bbp_conv.pas     3334   2/12/94 20.51  source\
  83.  
  84.     Conversion lib. This has two conversion routines in it; the one to
  85.   convert the color coded docs into an indexed plaintext file, and the one
  86.   to convert the country code list (c-code.lst) into the data file
  87.   bluebeep.ccd. Should be working perfectly, and doesn't need any
  88.   improvements/fixes. Add any external file converting crap to this lib.
  89.  
  90.   a------bbp_info.pas     7748   4/25/94 23.39  source\
  91.  
  92.     Handles all of the "Information" menu (doc reader, key export). Works.
  93.   The doc reader is known to have some very minor bugs, and it could use an
  94.   out of memory check (easy, I'm just too lazy to put it in :))
  95.  
  96.   a------bbp_init.pas    21233   3/20/95 23.38  source\
  97.  
  98.     This unit has the main routine initialize() which does all the loading
  99.   and initializing when the program is first started, along with all of its
  100.   dependants. Whenever you add new stuff, make sure you add all the
  101.   necessary initialization routines (loading, allocating memory) here. If
  102.   command line parameters are used, the appropriate routine from bbp_pom
  103.   would be launched from here.
  104.  
  105.   a------bbp_pom .pas    68229   3/20/95 23.29  source\
  106.  
  107.     Phreak Out Menu. Contains the juiciest bits of the code; the action
  108.   mode (which means the actual dialer), the red box, the k0de/routing
  109.   scanner, fonewerd and all the other crap. The Action Mode could use a
  110.   good, index-based help system. Otherwise, it's fine.
  111.  
  112.   a------bbp_proc.pas    29044   4/11/94 00.20  source\
  113.  
  114.     This lib contains most of the general utility functions and procedures;
  115.   BlueBEEP-specific tool routines and maintenance stuff goes here.
  116.  
  117.   a------bbp_set .pas    41580   3/20/95 23.34  source\
  118.  
  119.     This contains the complete setup routines and menus. Note that all the
  120.   types are defined in bbp_vars and all the initializing is done in
  121.   bbp_init. Werd. The CardChecker needs a new setup (it got fried in the
  122.   big crash of '93), otherwise, it's k00l.
  123.  
  124.   a------bbp_tool.pas    12968   3/20/95 22.57  source\
  125.  
  126.     The Tools menu. Phonebook import/export, starfield, that kind of stuff.
  127.   Basically just code to import files from other dialers. Boring. Could need
  128.   some additions for new dialers and terminals to import their phonebooks.
  129.  
  130.   a------bbp_vars.pas    16859   3/20/95 23.42  source\
  131.  
  132.     All of the variables, types, file structures and constants are defined
  133.   here. This is probably the most important part of the code because
  134.   everything except local (temporary) variables is defined here. Carefully
  135.   read through it, it's going to give you a lot of insight how the code
  136.   works. If you add more global variables, make sure you add them here so
  137.   they can also be used globally. Pascal has a 64k limit on the data
  138.   segment, so be picky about what you declare global and what not. If you
  139.   need large variables, consider using pointers blah blah blah...
  140.  
  141.   a------bbunit  .pas     4984   4/25/94 22.29  source\
  142.  
  143.     This is the lib that actually squeezes the tones out of the adlib chip.
  144.   Also does the initializing. If you want to add support for other sound
  145.   cards, do it here. Gee, I wish Pascal supported function overloading!
  146.   Credit for most of this lib goes to Urmel (author of TLO, who wrote this
  147.   stuff from the AdLib card Programmers Manual) and Elroy/ECR (who stole it
  148.   from Urmel and tRaD3d it to me).
  149.  
  150.   a------bitmani .pas     2470  11/05/93 18.38  source\
  151.  
  152.     Tiny little lib that enables you to play with the individual bits in
  153.   almost any type of variable. Simple, basic, and perfect. Good to use
  154.   because it makes the code easier to read. Pascal's bitwise operates suck,
  155.   anyway.
  156.  
  157.   a------bluebeep.pas     2238   3/20/95 23.14  source\
  158.  
  159.     The main code. It's actually very short and does NOT need any changes
  160.   99% of the time. Gee, I am so proud of it :)
  161.  
  162.   a------bsli    .pas     1771   2/15/94 14.25  source\
  163.  
  164.     External version of the BlueBEEP Script Language Interpreter. Has not
  165.   been used since 0.06 or so. Check it out, if you improve the script
  166.   language you should definitely keep this up to date, too. In the case of
  167.   the bsli unit, it will keep up to date automatically (dependent).
  168.  
  169.   a------chksum  .pas      850   5/04/94 01.53  source\
  170.  
  171.     St00pid checksum routines I wanted to implement into the code time.
  172.   Gee, I hope you can come up with something better than this! Not actually
  173.   needed to compile the prog as of now. (Doug, you'll be laughing at this!
  174.   Actually, any checksum/crypto freak will burst out laughing over this
  175.   code. Don't bitch at me. I am just 1aYm.)
  176.  
  177.   a------editrout.pas     7323  11/23/93 23.30  source\
  178.  
  179.     The edit fields for all the variables (strings, integers, words, etc).
  180.   An important part of my user interface I am proud of. Werd. Supports
  181.   cursor keys, ins/del, etc. If have a useful idea on how to improve it, go
  182.   ahead. Don't fuck with it for no apparent reason if you can discipline
  183.   yourself.
  184.  
  185.   a------errcheck.pas      907   3/09/94 07.04  source\
  186.  
  187.     Little external tool that HAS to be compiled before you can run the
  188.   build script. Checks the tpc.exe log for errors and invokes the editor
  189.   for the appropriate file if there is one. Helps you out of typos without
  190.   major hassles (managing big projects with TP is a real bitch).
  191.  
  192.   a------extras  .pas    21532   3/23/94 15.28  source\
  193.  
  194.     A lib of tiny goodies and utility functions I started when I was 12 and
  195.   that I improved and rewrote many times every since. However, I can
  196.   guarantee you that you will stumble over some REALLY childish code in
  197.   there sooner or later. You have been warned.
  198.  
  199.   a------ferror  .pas      521   2/12/94 19.31  source\
  200.  
  201.     Fatal Error handling for BlueBEEP. Plain and simple. No comment.
  202.   Doesn't need anything. Unless Windows, I didn't feel intrigued to add
  203.   .wav support so I can play stupid samples when the prog crashes. Even if
  204.   you're compelled, don't. There's more useful stuff in the world that you
  205.   could spend your time on.
  206.  
  207.   a------grmenus .pas     4595   3/24/94 23.41  source\
  208.  
  209.     The menu system. It's called grmenus because all the menus were set
  210.   fixed to green before I added the multiple color set support. Talking
  211.   about color, making the color for every class of item individually
  212.   adjustible would be neat. Add it to bbp_set if you think that it would
  213.   make sense. I actually started coding a neat little menu for this; e-mail
  214.   me if you want to finish it; I didn't want to improve fragments and
  215.   little useless code-bits with this release.
  216.  
  217.   a------grwins  .pas     3378   3/25/94 02.23  source\
  218.  
  219.     (Zooming) windows. Straightforward, no-bullshit code to draw square
  220.   windows with colored frames. Works, is fast and never fails.
  221.  
  222.   a------keyunit .pas      743  11/21/93 21.01  source\
  223.  
  224.     The key system for the keys you give to beta testers. It's kinda lame,
  225.   not even remotely secure but lamer- and warezd00d-safe, and not really
  226.   complex. If you want to use a code, you have to fill it into the
  227.   appropriate space in bbp_vars and recompile the whole program. The
  228.   resulting .exe will be personalized only for your beta tester and
  229.   requires a handle and a password to start it up. Using the voice number
  230.   the beta tester as the password is usually good enough to keep them from
  231.   spreading the beta around. Since the phone number is not stored anywhere
  232.   (just the resulting key), it's hard to hack it as well. If you give out
  233.   betas and wanna keep 'em private, you can use this code as a foundation
  234.   to develop a better system.
  235.  
  236.   a------litefix .pas      841   3/20/94 02.08  source\
  237.  
  238.     Tiny program to change the (C) PKWAREZ note in pklited .exe files into
  239.   a custom message you can specify. If you use pklite instead of lzexe to
  240.   pack BlueBEEP, this will, through the build script, automatically take
  241.   care of it so you can spend the time you would use on patching it with a
  242.   hex editor on the finer things of life.
  243.  
  244.   a------lscomm  .pas    18206   3/14/94 02.57  source\
  245.  
  246.     Litespeed comm unit. It's buggy and it sucks. Based on some PD code and
  247.   slightly modified. Use a better comm unit or completely rewrite this crap
  248.   when you get a chance to (won't werk with certain com ports, etc.)
  249.  
  250.   a------menus   .pas     2715  10/05/93 12.46  source\
  251.  
  252.     More menu routines. All of the menu routines in BlueBEEP have the
  253.   option of default choices and mouse support. If you want to integrate a
  254.   new way of interfacing with the program, making changes to those
  255.   fundamental routines will have effects on the program as a whole. The
  256.   wonders of oop. Wewp.
  257.  
  258.   a------mouseio .pas     2299   3/24/94 23.21  source\
  259.  
  260.     Mouse interface routines. A bundle of functions I first wrote years ago
  261.   and then gradually made changes and/or bugfixes to it. Should be bug free
  262.   and complete by now. Don't fuck with it unless you know what you're doing
  263.   because most of those are interrupt routines.
  264.  
  265.   a------optimer .pas     1998  10/05/93 12.34  source\
  266.  
  267.     A timer unit that is mostly used to control delays and timing before
  268.   and after tones, tone durations, dialing speeds and delays and so on.
  269.   Came with bbunit and is hence obviously a courtesy of Urmel. I am using
  270.   this because it's way more precise than the delay() routines that Borland
  271.   provides, and we all know how crucial timing is when you're out there
  272.   trying to get that break right..
  273.  
  274.   a------pdial   .pas     5933  11/05/93 18.44  source\
  275.  
  276.     The pulse dialing routines for the pulse dial / line interface. Simple,
  277.   straightforward and bug free.
  278.  
  279.   a------sbvoice .pas     7790   3/20/95 23.53  source\
  280.  
  281.     Soundblaster .voc tools such as playback, recording, loading, etc. Used
  282.   by the card talker and everything else in BlueBEEP that uses voc files
  283.   and samples. You could add better memory management. Except for that,
  284.   it's almost perfect. Wrote it myself from scratch, and it took a lot of
  285.   time to piece together all the required info about the driver and such.
  286.   If you want to use it in your own progs, credit me (see top of file).
  287.  
  288.   a------sos     .pas    10057   4/25/94 22.27  source\
  289.  
  290.     The Smart Overlay System, another innovative idea by me. Allows you to
  291.   keep all your data in the .exe file and cheating your code into believing
  292.   that they are still external files. Replaces the routines for opening,
  293.   closing, reading from and writing to files and hence opens you a door to
  294.   making all your config and data files completely invisible. Didn't you
  295.   ever wish that some of the commercial programmers used stuff like this so
  296.   they didn't have to litter your hard drive with ten million files? Well,
  297.   I did. That's why I coded this. You are highly encouraged to use this in
  298.   your own programs as long as you give me credit. Could use a function to
  299.   delete files out of the overlay (another one of those things that are
  300.   obvious but which I am too lazy to implement).
  301.  
  302.   a------sostool .pas      799   4/17/94 19.26  source\
  303.  
  304.     A little tools which takes advantage of the sos lib and allows you to
  305.   add, list and browse the files in an overlay. This has to be compiled
  306.   before you can compile BlueBEEP because build.bat uses it to create the
  307.   final .exe file.
  308.  
  309.   a------types   .pas      590  11/06/93 17.20  source\
  310.  
  311.     Definition of a couple of weird data types I use. Generally, you should
  312.   add BlueBEEP-specific type definitions to bbp_vars, but if you add a
  313.   generic type that you might use later in something else, put it here.
  314.  
  315.   a------vgagraph.pas     1870   2/12/94 21.20  source\
  316.  
  317.     Cheap and slow routines to interface with the VGA card in MCGA mode
  318.   (320x200x256). Used by the star field and some of my older intros.
  319.  
  320.   a------video   .pas     1369  11/05/93 22.12  source\
  321.  
  322.     Handles the detection and adressing of color/mono text cards. Upon
  323.   startup, it automatically detects what kind of card you have installed so
  324.   all the direct writes to the video RAM can be adressed properly. I think
  325.   the autodetection still fails sometimes, but I am not sure. Works on 99%
  326.   of the system I tested it on.
  327.  
  328.   a------bbp_bart.inc    22215   3/20/95 23.45  source\inc\
  329.   a------bbp_logo.inc    21934   3/20/95 23.46  source\inc\
  330.   a------bbp_tkom.inc     5589   3/20/95 23.47  source\inc\
  331.  
  332.     Those three include files are the video ram images of the ANSIs that
  333.   are displayed throughout the program; the Bart Simpson screen, the
  334.   BlueBEEP logo, and the Telekom logo. If you are modifying these, make
  335.   sure you use TheDraw and save it as pascal code. Then just don't forget
  336.   to update the identifier names. And if you want to free up some data
  337.   segment space during expansion work on the source, these are some
  338.   potential data segment memory munchers that you could zap.
  339.  
  340.  
  341.