
   ***********************************************************************
   Team changes since Linux doom sources release (23-Dec-1997)
   ***********************************************************************
   THE DOOM LEGACY PROJECT		     Contact: <bpereira@ulb.ac.be>
   ***********************************************************************


   Fri 26-12-1997: "First overview"
   ===============


   *   Downloaded 'DOSDOOM' by Chi Hoang, compiled, runnable under Win95,
       crash under true DOS.

       No sound, no network, keyboard config doesnt work.

       REAL slow! -devparm shows 2 to 3 tics per frame on a P166MMX !

   *   Corrected bugs in IdentifyVersion(), FindResponseFile();
       Now runs under DOS.

   *   Added nice titlebar like original Doom, compile only with 'PC_DOS'
       defined (uses conio.h).

   *   PC_DOS define : enable DOS/textmode specific stuff.

   *   asm_defs.h : defines all the stuff needed so that asm routines
       know about vars and structs defined in C code.

   *   tmap.S : converted the x86 code to AT&T syntax for GAS, NASM could
       be used but AT&T syntax is much better imho.

       R_DrawColumn, R_DrawSpan restored.

       Should be optimised for Pentium in the future.

   *   USEASM define : compile with ASM routines instead of C ones.

       Actually, USEASM means i386/Pentium machine code.

   *   Compiled with ASM routines, runs the first time, but it's still
       very slow... there's a lot of cpu time lost somewhere else than
       drawing the screen.



   Sat 27-12-1997: - "Boris and Fab in search of the lost frame"
   ===============


   *   tmap.S : FixedDiv2, FixedMul : translated to AT&T.

       After some profiling with 'gprof', we've noticed that FixedDiv
       and FixedMul where used a lot. We've restored the ASM ones.

       A lot of cpu time freed, but still a minimum of two tics/frame...

   *   i_system.c : we've restored a TimerISR interrupt for counting the
       gametics, like it was in the original doom.

       I_GetTime was not supposed to count the tics itself, but just
       return it.

       I_TimerISR()
       I_StartupTimer()
       I_ShutdownTimer()
       I_SetTimer0()

       Result: IT S FAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAST !!!

       Problem: we have to call the old Timer int., but not at the same
       speed that our new TimerISR... but we didn't find a clean way to
       call the old interrupt from the new TimerISR.

       So, the old timer interrupt is called faster than 18.2/sec.
       Maybe we'll have to code an IRQ wrapper in ASM like in Allegro3.0



   Sun 28-12-1997: - "Boris works alone"
   ===============

   *   d_main.c  : no 'HOME' environment variable under DOS, now uses
       'DOOMWADDIR' for development.

   *   tmap.S : removed use of %ebp in FixedDiv2 and FixedMul.

   *   wi_stuff.c : line 1660 : object "WIOBJ" lump not found, should
       be used only with 'french' version, we'll have to check why the
       french version is active? Replaced by "WIOSTI" for now.

   *   Network restored. Seems to work fine!

   *   m_misc.c : M_SaveDefaults, M_LoadDefaults : now handles conversion
       of scancodes/ascii when reading/writing the config file.

   *   Downloaded 'dosdoom2' by Chi Hoang.

       He goes so fast that we don't have the time to tell him the problem
       with 'I_GetTime'... we'll do a release of our port soon and we'll
       send him a mail. This guy got us started on dos doom sources.


   Mon 29-12-1997: - "Doom2 in 320x400 looks weird!"
   ===============

   *   i_video.c : arranged the keyhandler from DosDoom, which didn't
       PostEvent fast enough. Didn't respond when typing fast on the
       keyboard.

   *   MULTIPLE VESA resolutions : added code to handle bank/switching
       and setting of VESA modes.

       - 320x400 runs 35fps on my P166mmx,
	 640x480 needs 2 tics per frame, which is SLOW !
	 (duke nukem runs at least 20fps 640x480 on my old P75...)

       - works only in full screen, crashes when Statusbar displayed,
	 still lots of positioning/resizing to check out.

       - visplane 'top' and 'bottom' tables used byte for y-clipping
	 coordinates, so of course it didn't support more than 255
	 lines.

       - r_defs.h : visplane 'top' and 'bottom' tables changed to 'short',

	 r_planes.c
	 r_segs.c   : some compares used '0xff' changed to '0xffff'.

	 This is the main stuff you have to change if you want to support
	 multiple resolutions.

       - asm_defs.h : SCREENWIDTH must be changed to test different
	 resolutions.

       - aspect ratio is not good for 320x400 and so...

       NOTE ! These modifications will not be in the 'clean' source code
       until it runs ok with status bar.

   *   ALLEGRO3.0 : we'll definitely use a lot of code from this GREAT
       library by Shawn Hargreaves.

       We'll use the sound code from Allegro3 for sound support, like
       DosDoom2 does.


   Tue 30-12-1997: - "Preparing the release for our doom dos port"
   ===============

   *   Boris succesfully added the sound support with Allegro3.
       (as DosDoom2 does)

   *   A lot of work to cleanup our release:

       DJGPPDOS/     contains the source code specific to DOS/W95.
		     i_xxxx.c
       LINUX/	     contains the source code specific to LINUX.
		     i_xxxx.c

       Implementation-specific code in the main directory has to be
       enclosed by #ifdef PC_DOS or #ifdef LINUX, or such.

       Linux code was removed from the DJGPPDOS/ implementation.

   *   makefile : somewhat improved to support ASM routines with -DUSEASM,
		  added support for PGCC like Allegro3 makefile


   Wed 31-12-97: - "Fixed that timer stuff!"
   =============

   *   DJGPPDOS/i_irq.c     : new timer routines, plus ticcount
		i_irq.h
		irqwrap.S   : asm wrapper for the irq handler

		i_system.c  : removed our dirty timer code, I_GetTime
			      now returns ticcount.

       The timer handler is now fixed, but then the Allegro sound doesnt
       work anymore, got to fix that.


   Thu 01-01-1998: - "
   ===============

   *   3:49 - Our doom version succesfully started with 5 players, but
       then it crashes after some seconds...

       We used DOOMATIC (which replaces Ipxsetup) to launch the game with
       5 net nodes. We used a map with 6 dmstarts.


   *   Yeehaa! erreur ridicule avec le define ST_Y sans parentheses...
       Je peux enfin resizer en 320x240 !!! La status bar n'est pas affiche
       en entier.

   *   Le makefile ne marche toujours pas et ca m'enerve!

   *   Tests transparence avec TINTTAB, super cool.

   *   Dornavant il faut ajouter -file tinttab.wad avec un lump 'TINTTAB'.

   *   Dans G_Initnew(), ajout du code pour activer le flag
       'partial invisibility' pour certains objets qui doivent tre affichs
	en transparence.

   *   Removed 7 messages from the Quitgame messages. These messages
       are just coarse and boring. I have not found these messages in the
       commercial versions of Doom1,Doom2,Doom95(FinalDoom),UltimateDoom,TNT,
       Plutonia. So I have fucked them out!


   *   Implemented the following routines like in Allegro:

	  I_AddExitFunc()
	  I_RemoveExitFunc()
	  I_StartupSystem()
	  I_ShutdownSystem()

       Now only the stuff that has been 'initted' is shutdown at the end.

       I_StartupSystem is executed in i_main.c BEFORE ANYTHING ELSE, it
       sets up the signal handler to trap exceptions, page faults and such.

       Reworked a little the I_Error() and I_Quit() routines so that they
       do a SystemShutdown().

       Wow ! Now all the error messages are displayed, and the program
       'crashes' cleanly to dos, restoring all interrupts, video mode,
       timer...

   *   Meanwhile, I have discovered a 'bug' in the sound code of Allegro,
       when new sounds are activated on all the channels at the same time
       (eg: waking up a lot of monsters in a room), it does a 'crack' in
       the sound. However it's not a serious problem: it's very very short.
       After that the sounds plays together on the eight channels without
       problem.


       Boris log 3-1-98:
       =================

   -   Mouse sensitivity : peut prendre les val de 1 a 20 (avant 5 a 15)
   -   idclev : now work
   -   added control sub-menu in option menu

       Boris log 4-1-98:
       =================

   -   added run lock key !!!
   -   no more hit enter if wad added only if one is missing
   -   finish control menu


       Thu 08-01-98: "putting my nose into DosDoom latest release..."
       =============

   *   Mmmh, thanx to dosdoom, I have finally fixed the psprites being drawn
       too small, and not at the center of the view.

       When I implemented multiple-resolutions, I started to convert all
       320 / 200 constants into screenwidth / screenheight dynamic variables.

       Now fixed. However I'm not happy, there shouldn't be any 320/200
       constants in the code. There must be a clever way to do it: by using
       an aspect-ratio stuff... for later.


       Sun 11-01-98: "profiling is not so easy..."
       =============

   *   Added VBE2.0 liner frame buffer + old vesa1 bank switching,
       uses Allegro for LFB, and my old routine for Vesa1 because Allegro
       'set_gfx_modes' a larger screen in Vesa1 than requested.

       If VESA2 is not found, VESA1 is used, with bank switching if hires.

   *   We have started to work with P5PROF, a cool bunch of macros to
       read the counters of the Pentium like: numbers of cycles, numbers of
       cache misses... after hours trying to get it work... we are a little
       deceived because it always returns very different values.

   *   I want to profile the stuff with GCC GPROF... crash at InitLightTables
       but not in normal optimised mode. I think there's plenty of badly
       allocated buffers and dirty stuff that need to be cleanly done.
       I think our version is actually the most stable under DOS. But it
       should NEVER crash!

   *   i_sound.c : raw2SAMPLE() now reads the frequency of the sample from
		   the DSXXXXXX rawdata header. Most samples are 11025 freq,
		   but some are 22050. Now the double shotgun sounds ok!

   *   g_game.c : G_DoPlayDemo() now uses ExtractFileBase from w_wad.c
       w_wad.h	: made ExtractFileBase() global.

       Now demos can theorically be played with a path specification,
	eg: -playdemo mydemos\cooldemo

       It didn't work before because the demo is loaded by W_AddFile(), which
       extract the file base name with ExtractFileBase(), because lumpnames
       have max. 8 chars. So eg: mydemos\cooldemo became 'cooldemo'.

       G_DoPlayDemo() now searches for the file base name.

   *   g_game.c : G_DoPlayDemo() : added compatibility for Doom2 v1.9 demos:
       since MAXPLAYERS has changed, the header of the demos is different,
       so now it assumes there's max. 4 players when demoversion is v1.9.

       Playing back v1.9 demos now works! I Playback a lot of demos and they
       play perfectly till the end!

       This version seems to be 100% Doom2 v1.9 compatible!

       It's great to look at deathmatch demos in 640x480 !!

   *   i_sound.c : tried to make the I_ShutdownSound() cleaner, because the
	    program exits from time to time with a General Protection Fault.
	    Now I ask Allegro itself to release the voices before quitting.
	    I'm still unsure if that fixes the GPF problem.

   *   dstrings.c : I found the bug! There was missing quotes in the quit
		    messages table. What a shame! It crashed sometimes
		    because the quit message was too long or something. fixed!



       Fri 16-01-98: "bored trying to speed up the asm, so I fixed some
       =============  demo stuff..."

   *   Added a gcc_asm.doc to help people who are new to DJGPP and want to
       use asm code, without the hassle of inline asm. It's not a full-featured
       document, but it certainly helps if you wonder about the stack, and
       passing arguments from C code to ASM code.

   *   vid_copy.S : screen blit routine in asm, after some profiling I have
		    discovered that:

	  1) DJGPP memcpy() is as fast as ASM rep/movsl
	  2) Copy into VESA2 LFB is 4 times faster than to 0xa0000 !!!

       Anyway, the screen blit is a very small percentage of the frame rate...
       R_DrawColumn eats the most.

       I'll keep the asm routine for convenience, because it can copy from
       different width bitmaps, so you don't need to use multiple memcpy().

   *   g_game.c : now calls ST_changeDemoView() when pressing F12 while viewing
		  a demo. This redraws the statusbar for the 'viewing' player.
       st_stuff.c : load facebacks (STFBx) for all players, and display the
		    right faceback (the player color) on the statusbar when
		   changing the view.

   *   s_sound.c, d_main.c, p_inter.c : replaced some consoleplayer by
		  displayplayer so that the sounds are heard from the display
		  viewpoint.


       Tue 28-01-98:
       =============

   *   Yeehaa!! Changing the video mode while the game runs now works!
       There's a lot of cleanup to do, and some details like resetting
       the colormap, but technically it runs in all VESA2 LFB modes +
       the basic mode 13h !

   *   We have discovered a great optimisation for the rendering of wall
       segments, based on the fact that 'packets' of columns share the
       same scale and/or start texture address... we'll have to wait the
       end of the exams to create an asm routine which draws multiple
       columns at the same time: the trick is that sequential writes
       in the horizontal axis are faster because the Pentium has Write
       Buffers of 64bit length so successive writes to the same location
       are faster.


       Fri 30-01-98: "phew! examinations are finished, back to the code!"
       =============

   *   Vid-mode change on the fly now sets the palette, and sets the right
       coords for the status bar widgets, the status bar is also fully
       redrawn.



       Sat 31-01-98: "today on the menu... choose yer resolution"
       =============

   *   tmap.S : replaced cdq in FixedDiv2 by two simple instructions that
		allow the next 2 ones to pair, while cdq doesnt.


   *   m_menu.c : made the video menu. It displays all the VESA2 LFB
		  resolutions, starting with 320x200 standard VGA.
		  Like in Quake, each resolution is displayed only once,
		  and the VESA2 linear frame buffer is always used for
		  the reolution, except for 320x200 which stays in the
		  standard mode VGA.

		  Video test mode, set default mode, and aspect ratio is
		  still not working...


       Mon 02-02-98: "yeeehaaa! now I can play super-fast 320x400!"
       =============

   *   r_main.c : R_SetViewSize now calculates the right projection and
		  yslope, I have also added an 'projectiony'. The aspect
		  ratio is now correct in all resolutions! Yipee!
		  Maybe I'm not so bad at maths after all?!...

   *   We've tried changing vid modes while playing network: it works of
       course, but there's a small slowdown since the machine sends less
       packets when it is occupied setting the new mode... should fix that
       later...


       Tue 03-02-98: "320x400 is definitely working, sprites ok and all!"
       =============

   *   r_main.c : aspect ratio and positioning of psprites is now correct.
		  I have looked at Dosdoom4.6: it doesn't draw the psprites
		  like the original Doom2, eg: with statusbar it scales down
		  the sprites, but it should do it only when reducing the
		  window. With statusbar there's no scaling except for the
		  aspect ratio... details I know...


       Wed 04-02-98: "Web design is fun...but takes too much time!"
       =============

   *   Our Doom project will probably be called 'DOOM LEGACY'. Prepared
       the page on our site, for the release to come... took me a lot of
       time. Put some big graphics, and made the page background black...
       big fat American style... I must admit that it looks good however.

   *   am_map.c : fixed a bug with the recalc of the automap after a vid
		  mode change.


       Thu 05-02-98:
       =============

   *   hu_stuff.c, hu_lib.c : added functions to update the coords of the
		   heads-up widgets after a screen size change.

   *   v_video.c, m_menu.c :V_DrawScaledPatch now scales the patches for
		   the titlepic and menu to the screen size.

   *   v_video.c : moved WriteText and other graphics routines to v_video,
		   for a more general use.

   *   hu_stuff.c : added the Deathmatch Rankings!


       Fri 06-02-98: "Freelook is ridiculously simple!"
       =============

   *   m_menu.c : added M_DrawTextBox to draw a box under the messages,
		  because sometimes the text is difficult to read with all
		  the stuff drawn behind.

   *   m_menu.c : re-ordered the main menu like Quake one : singleplayer,
		  multiplayer, options, help, quit.

		  Created the lumps for SINGLE, MULTI, and SETUPMULTI.

		  Singleplayer lead to: newgame,load,save,endgame.
		  Multiplayer will allow the player to enter its name
		  and color. The name will be displayed in the deathmatch
		  rankings and saved into demos along with player colors.

   *   w_wad.c : created a W_ReadLumpHeader which reads only a part of a
		 lump, so R_InitSpriteLumps reads only the header of the
		 sprites. However it is not really faster... after that
		 I found that it was R_GenerateLookup which takes time...

   *   Looking at Heretic, I suddenly noticed that the perspective didn't
       change even one pixel when looking up/down. Now that I think of it
       it seems evident. In fact it looks like the perspective change, but
       it's just a 'optical illusion' !

       Just a quick hack at r_main.c, and I was looking down in map01!

       Freelook will be for the first release!!!

   *   g_game.c, r_main.c, r_things.c : added the freelook!
		 Like DukeNukem, freelook is a momentary or toggelable.
		 Invert mouse for the freelook is also done, but have to
		 put it in the menu.

		 I had to create another 'centerypsp' to center the
		 psprites right, because they moved along with the view
		 (look up, gun was going up...)

		 It looks good, but I'll have to find the best values
		 for the freelook so that it doesnt make people sick!!
		 (the perspective is wrong when looking up or down...)

   *   v_video.c, m_menu.c : M_DrawTextBox now fills the inner of the box
		 with a flat used as pattern, it looks better than just a
		 a plain color. V_DrawFlatFill() does the job.


       Sat 07-02-98: "now I can do something of the windows keys!..."
       =============

   *   Changed a lot of stuff for the keyboard : I wanted to attach
       commands to keys, each game command (fire,use...) could be
       triggered by one or more keys. Once keys are mapped to commands
       (game controls), you don't need bother with mouse/joy/keyboard
       anymore since joystick and mouse buttons are treated as 'virtual'
       keys, which can trigger game controls too.

       Clearly, this means you can attach any action to a joystick button
       or mousebutton.

       g_input.c : now handles the game inputs (key/mouse/joy), and remaps
		   events to game controls.

       m_menu.c : the controls menu has been rewritten, now it accepts
		  keys, mousebuttons and joybuttons as inputs for any
		  game control. Maximum two inputs are accepted for each
		  game control, like Quake 'customise controls' menu.

       g_game.c : G_Responder() now asks g_input to remap an event to
		  a game control. G_Buildticcmd now tests the game controls
		  instead of gamekeys so eg:strafe left can be done with
		  a mousebutton... (I know someone who does this!)

		  Plus added support for 'lookup' 'lookdown' 'centerview'
		  and 'mouse aiming' game controls.

		  For simplicity, the speedlock ('runmode') and locking
		  of the mouselook will be moved as menu options: TO DO.

       i_system.c : rewritten the kb handler to distinguish between keypad
		    keys and extended non-keypad keys. eg:uparrow is not
		    the same as keypad 8. If someone moves with the keypad
		    he/she can use the cursor keys for something else
		    (eg:sidestep left/right)

		    The ASCIINames (scantoascii) table has been reworked.

		    Added support of the win95 keys: leftwin, rightwin, menu.

       Hmmm.. took me all the day!

       Still to do: save the new controls config (two keys max per control),
       add menu options for speedlock and aiminglock.


       Sun 08-02-98:
       =============

   *   m_menu.c : fixed a bug with 'messageToPrint' messages displayed by
		  the menu, sometimes a text line was missing.

   *   m_menu.c : Customise Controls: added Backspace to clear the keys
		  for a control,
		  unknow keys are now displayed as 'KEYxxx' with the key
		  number (so you effectively see if multiples 'UNKNOWN'
		  keys are different),
		  fixed Escape now Cancels, does not change the key,
		  Escape in the menu now returns to the Options menu.


       Mon 09-02-98:
       =============

   *   m_misc.c, g_input.c : added temporary hack : saves the controls menu
		  two-keys-per-game-control in the default cfg, but if they
		  are not found when loading, the old 'key_xxx' values are
		  converted to the new game control key codes. This is to
		  simplify the use of our first release for the people,
		  they don't need to bother with the new controls, they'll
		  be converted automatically from old key_xxxx setup keys.

		  We'll have to do a new SETUP, for later...

   *   st_stuff.c, wi_stuff.c : now uses player's translation tables so
		  that the facebacks in statusbar and intermission screens
		  display the right colors, whatever new player colors we
		  add, and whatever number of players.

		  Before it was not good, because it loaded a 'STPBx' patch
		  for EACH player, which means that for 16 players you
		  would need 16 patches named 'STPB0' to 'STPB16' !

   *   wi_stuff.c : commented out the use of a 'WIOBJ' patch, that was used
		  only with the french version, and special conditions...
		  looks weird, since "WIOSTI" patch does the same.


   *   m_menu.c : added the multiplayer setup, choose your color and enter
		  your name, with an animated 'marine' to display the
		  chosen color.


       Tue 10-02-98: "still finishing touches for the 1st release..."
       =============

   *   m_menu.c : completely redo the Options menu, text was too big, and
		  I needed space for mouselook,always run and such...
		  now uses the HU font, and includes the following:

		  mouselook toggle,
		  always run toggle,
		  invert mouse toggle,

		  screen brightness has been added, this is like the
			 old Doom2 'F11' gamma key, just moved in the menu.

		  created new 'slider' graphics, to draw smaller 'thermos'
		  by the side of the options, like Quake, instead of a big
		  thermo under the option.

		  It's getting better and better! It's great to play with
		  mlook as default, and always run.. what a release for
		  my poor little fingers...

   *   m_menu.c : added mouselook sensitivity, which IS NOT THE SAME as
		  mouse y sensitivity. Mmmmh... maybe a mouse y sensitivity
		  would be useful for people who uses the mouse to move
		  backward and forward... I'll have to think about it.

   *   r_main.c, r_plane.c : added a yslopetab[] which is the original
		  yslope[] with slopes for the full view possible when
		  mouselookin' (one half above and one half below the
		  original viewheight), so that we don't need to recalc
		  the yslopes each frame for the mouselook.

		  Now we just make 'yslope' point somewhere in 'yslopetab'.
		  Doom is already slow enough! This frees hundreds divisions
		  per frame.


   *   v_video.c, m_menu.c : menu now calls V_DrawFadeScreen(), which
		  fades down the screen, so that the menu is more readable.



       Wed 11-02-98: "having fun while testing multiplayer features..."
       =============

   *   g_input.c, g_game.c : added the double-clicking inputs for both
		  joystick and mouse. To set it up in the menu, set the
		  mouse button two times, the second time it becomes a
		  double click.

		  I'm not happy with it, there are 'collisions' between
		  inputs attached to the same control : one input is
		  being tested and sets the control to true or false,
		  then the second input. At the end, the first input
		  does not act... to fix. Later.

   *   It's one week and a half that we are working me and Boris at my
       home, and we planned to release the first version of our project.

       So here it is, I think that it's already very good. And anyway,
       the setup controls works perfect if you don't do stupid assigns
       (like two mousebuttons for the same control).

   *   I think that we did not receive enough 'recognition' for the great
       dmatch launcher 'DOomatic'. Five persons or so told us that they
       liked it and it's all. How can people use DM or other crap launchers
       when we do a great launcher like Doomatic?? Strange world.

       Anyway, I hope that we'll have a little feedback with our doom
       project.. Ciao.


   ************************** FIRST RELEASE ******************************
   *		      DATE: 12-02-98 TIME: 04:25:39 (wow!)		 *
   ***********************************************************************


   ***********************************************************************
   End of Doom source code change log from Team 'Fab & Boris'
   ***********************************************************************

