2005-12-22  Bart

	* configure, configure.ac:
	Make svgalib version check more robust (did not work with gcc-2.95).

	* doc/DANG.txt, src/doc/DANG/DANG.sgml, src/doc/DANG/DANG_CONFIG,
	  src/doc/DANG/Makefile, src/doc/DANG/make_DANG:
	Regenerated DANG

	* etc/dosemu.conf, etc/global.conf, src/base/init/config.c,
	  src/base/init/lexer.l.in, src/base/init/parser.y.in,
	  src/dosext/dpmi/memory.c, src/include/emu.h,
	  src/plugin/commands/Makefile, src/plugin/commands/commands.c,
	  src/plugin/commands/commands.h, src/plugin/commands/unix.c:
	Apply #1023178 Option for disabling DJGPP null checks.
	Also add a dpmi.com command, with a -x option similar to cwsdpmi.
	Shorten unix.com usage help a bit.

2005-12-22  Stas

	* src/dosext/dpmi/dpmi.c:
	Try "verr" before giving up on an arbitrary selector usage.
	(Bugs #988992, #1358562)

2005-12-21  Bart

	* doc/EMUfailure.txt, doc/README.txt, src/doc/DANG/DANG.sgml,
	  src/doc/HOWTO/EMUfailure.sgml:
	Regenerated documentation.

	* INSTALL, VERSION, compiletime-settings,
	  compiletime-settings.devel, configure, configure.ac,
	  default-configure, etc/dosemu.conf, src/arch/linux/Makefile.main:
	bump up VERSION
	put some notes about compiling on x86-64 in INSTALL
	mention that full CPU emulation is experimental
	add dlplugins option to compiletime-settings*
	warn if no S-Lang library is available
	allow "make install" without plugins (#1308052)

2005-12-19  Bart

	* src/base/bios/setup.c:
	Release DOS helper memory for ctrl-alt-del, to avoid OOM after a few times.

	* src/env/video/vgaemu.c:
	TEXT<->GRAPHICS mode changes via register programming needs adjustment
	of some other parts in vgaemu_adj_cfg too. Fixes aladdin/gw interaction.

	* src/plugin/kbd_unicode/serv_backend.c:
	Fix #1377671 Pause button doesn't work

2005-12-18  Bart

	* src/: base/bios/int10.c, env/video/video.c:
	Initialize video_mode/0:449 in video_mem_setup instead of scr_state_init.
	Fixes #1379838 Ctrl-Alt-Del from graphics mode

	* src/: base/misc/dos2linux.c, base/misc/hma.c, dosext/misc/emm.c,
	  dosext/misc/xms.c, include/dos2linux.h:
	Put some basic checks into dos_read/dos_write, and memmove_dos2dos to
	avoid touching the protected video memory.
	Fixes #1379806 (gw stopped to work under X).

2005-12-14  Stas

	* src/base/async/int.c:
	Remove debugging that causes "dosemu touched the protected memory"
	bug with some apps.

2005-12-13  Bart

	* doc/README.txt, src/emu.c, src/arch/linux/debugger/dis8086.c,
	  src/base/async/pci_bios.c, src/commands/bootoff.S,
	  src/commands/booton.S, src/commands/dosdbg.c,
	  src/commands/exitemu.S, src/commands/lredir.c,
	  src/doc/README/CDROM, src/dosext/drivers/cdrom.c,
	  src/dosext/net/net/ipx.c, src/env/video/hercemu.c,
	  src/env/video/hgc.c, src/env/video/miscemu.c,
	  src/env/video/remap.c, src/env/video/remap_asm.S,
	  src/env/video/s3.c, src/env/video/svgalib.c,
	  src/env/video/vesa.c, src/env/video/vesabios_pm.S,
	  src/plugin/commands/dosdbg.c, src/plugin/commands/lredir.c,
	  src/tools/periph/bootsect.S:
	From: Hans de Goede <j.w.r.degoede@hhs.nl>
	Clarify copyrights. This is necessary for inclusion of DOSEMU into Fedora
	Extras, which is what Hans likes to do.

	* src/arch/linux/Makefile.main:
	Correct fresh "make install" (bug reported by Victor Warner, linux-msdos)

2005-12-10  Bart

	* src/: base/async/pci_bios.c, base/dev/misc/pci.c, include/pci.h:
	Move the PCI r/w's that are strictly called by int1a (and may be emulated)
	to pci_bios.c; made some configuration static.

2005-12-09  Bart

	* src/: base/async/pci_bios.c, base/dev/misc/pci.c,
	  emu-i386/ports.c, include/pci.h, include/port.h:
	Handle PCIEMU completely within pci.c.
	Direct hardware accesses for extended configuration space are fed
	directly to the portserver.
	Let the port server handle an address and data PCI i/o access as close
	to each other as possible.
	INT1A pci_bios accesses are handled via port_in/out*.

2005-12-03  Clarence

	* src/base/dev/misc/timers.c:
	Bart said: "This is about port 0x42 which is set to FAST in pit_init(),
	timers.c. Port 0x61 was indeed made slow, (because it needs special
	treatment in keyb_io_write()) but that's not what this is about."

2005-12-03  Bart

	* src/base/: dev/misc/pci.c, async/pci_bios.c:
	Explicitly clear 0 bits in CF8 dword writes. Revert PCI_EN handling to what
	it was (for some reason I thought PCI_EN=1, but it's 0x80000000).

2005-12-03  Clarence

	* src/include/emu.h:
	* make config.features doc realistic
	* bump up number of features to 16 to avoid recompile of every
	file that #include's emu.h every time a different vendor wants to
	add a different hack - Bart suggested in 2003 to use malloc()
	but I think that's overkill

	* src/base/init/config.c:
	update intrinsic doc on newly added -t and -s options

	* src/base/dev/misc/timers.c:
	remove obsolete comments following the removal of PORT_FAST on
	SPRK_NATIVE thanks to src/plugin/kbd_unicode/serv_8042.c:r1.7

	* src/emu-i386/ports.c:
	remove useless statement

2005-12-02  Bart

	* src/: base/async/pci_bios.c, base/dev/misc/pci.c, include/pci.h:
	PCI: let word and byte accesses use inw/outw and inb/outb when appropriate,
	instead of ind/outd + masking. Suggested by Stas.

2005-12-02  Stas

	* NEWS:
	minor news

	* src/doc/README/Windows:
	Rewrote the "Windows" chapter.

2005-12-01  Bart

	* src/base/async/pci_bios.c:
	Enable R/O emulation of PCI-PCI bridges.

	* dosemu.spec.in, dist/dosemu:
	Mark directories in the spec file (fixes #1165147).
	Don't look at X fonts for dosemu -dumb.

	* src/dosext/mfs/mfs.c:
	Check for errno == ESPIPE for lseeks before read or write,
	then they should not fail (#1347960)

	* src/: base/init/dev_list.c, base/misc/disks.c,
	  base/misc/utilities.c, include/emu.h:
	Fix ctrl-alt-del + $_emusys (#1310344)

2005-11-30  Bart

	* src/: base/dev/misc/pci.c, include/pci.h:
	Introduce ext_enabled flag to only allow direct h/w access to the extended
	VGA PCI config space, and not to the PCI-HOST bridge.

	* src/base/dev/misc/pci.c:
	Fix fatal (for Matrox) typo: > 0x40 should be < 0x40.

2005-11-30  Stas

	* src/env/video/: vga.c, video.c:
	Dont register the video memory twice.

	* src/base/async/pci_bios.c:
	Skip bogus PCI memory regions

	* src/arch/linux/mapping/mapping.c:
	debug messages

	* src/dosext/dpmi/dpmi.c:
	Revert the "dpmi.c can use com_printf" thing. It cant - calling
	the realmode code from the signal context is unsafe.

	* src/base/misc/dos2linux.c:
	call_msdos() must switch to real mode before calling DOS, if needed.

2005-11-29  Bart

	* src/: base/async/int.c, base/bios/int10.c, base/misc/dos2linux.c,
	  env/video/video.c, include/emu.h, plugin/commands/unix.c:
	Adjust video.c init so that -dumb does not pop up an X window.
	Make -dumb quiet until the command is executed if a command is given. So
	dosemu -dumb dir
	gives a directory listing and nothing else.

	* dist/dosemu, src/arch/linux/Makefile.main:
	Change default C: drive from ~/dosemu/freedos to ~/.dosemu/drive_c
	(similar to Wine).
	Remove dosemu/freedos/ directory prefixes from the files in the symlink
	tarballs. The primary location for the DOSEMU utilities is now
	$prefix/share/dosemu/commands.
	Make the dosemu script aware of "-X by default".

	* NEWS:
	Update NEWS file for 1.3.3. This will be the last developer's release,
	almost release candidate, before 1.4.0.

	* ChangeLog:
	update ChangeLog

	* src/base/bios/int10.c:
	Correct VIDEO_BIOS_COMBO for vbios_post=0. Thanks Michael and Reinhard
	Karcher for spotting this.

2005-11-28  Bart

	* etc/dosemu.conf, src/base/init/config.c,
	  src/base/init/parser.y.in, src/include/emu.h:
	Introduce and set $_rawkeyboard = (auto), so the raw keyboard is only
	used when either -s or -k are given as options.

	* dist/dosemu, src/base/init/config.c:
	Correct information message about root. Let '-c' disable config.vga so it
	can work without editing dosemu.conf. Commit forgotten dist/dosemu change.

2005-11-28  Stas

	* src/: plugin/kbd_unicode/keyboard.c, base/init/init.c,
	  plugin/kbd_unicode/include/keyboard.h:
	Introduce keyb_priv_init() which must be called before port-server
	startup. This fixes $_speaker="native" (suggested by Clarence)

2005-11-27  Bart

	* etc/dosemu.conf, man/dosemu.bin.1.in, src/base/init/config.c,
	  src/base/misc/priv.c:
	Add new switches:
	-s to enable direct hardware access
	-t to force terminal mode
	use X, graphics, and raw keyboard by default if possible.
	Set default time mode to "bios".

2005-11-22  Stas

	* src/emu-i386/ports.c:
	Start portserver for the config.pci_video to make the $_pci=(off)
	to finally work with G550.

	* src/base/misc/dos2linux.c:
	- Map the DOS<-->unix STDOUT/STDERR properly for unix.com.
	- Improved the DOS console reading for unix.com

2005-11-20  Bart

	* src/: base/dev/misc/pci.c, base/async/pci_bios.c, include/pci.h:
	Use pciemu (as before) for the first 64 PCI configuration bytes, and direct
	access for the last part.

2005-11-19  Stas

	* src/: base/misc/dos2linux.c, include/dos2linux.h:
	Make unix.com "keyboard-aware" (FR #1360156). It works like a tty
	in a -icanon mode.
	system() replaced with execlp() to make it possible to emulate ^C
	with SIGINT.
	Also reworked the output-grabbing again - it was still skipping an
	output sometimes.

	* src/: base/misc/dos2linux.c, dosext/dpmi/dpmi.c,
	  include/dos2linux.h, plugin/commands/builtins.c,
	  plugin/commands/builtins.h, plugin/commands/unix.c:
	Make unix.com to use DOS/stdout instead of the direct video mem access,
	so that the file redirection to work.

2005-11-13  Bart

	* src/base/async/pci_bios.c:
	Get PCI resource sizes from /proc/bus/pci/devices instead of writing to
	the configuration space, if possible.

2005-11-11  Stas

	* src/: base/bios/bios.S, dosext/dpmi/msdos.c:
	Use "call" instead of "int" to invoke the IO helpers. Eliminates
	the remaining "lret $2"s.

2005-11-08  Bart

	* src/: base/async/pci_bios.c, base/dev/misc/pci.c, include/pci.h:
	Use /proc config space instead of the header array for pciemu. Allows write
	access to the PCI configuration space, necessary for some video BIOSes.

2005-11-07  Bart

	* src/: base/async/pci_bios.c, base/dev/misc/pci.c, include/pci.h,
	  env/video/matrox.c:
	Stage 1 of using /proc instead of direct hardware I/O for PCI:
	use /proc/bus/pci (when available) for pciemu init when $_pci=(off).

2005-11-02  Stas

	* src/base/misc/dos2linux.c:
	Fix run_unix_command (#1345102)

2005-10-30  Bart

	* src/plugin/sdl/sdl.c:
	Add speaker support for SDL within X11.

	* configure, configure.ac, src/base/init/config.c,
	  src/env/video/video.c, src/include/config.h.in,
	  src/plugin/kbd_unicode/keymaps.c, src/plugin/sdl/configure,
	  src/plugin/sdl/configure.ac,
	  src/plugin/sdl/include/sdl_config.h.in:
	Make DOSEMU without run-time plugins actually usable.

2005-10-29  Bart

	* Makefile.conf.in, configure, configure.ac, src/arch/linux/Makefile.main,
	  src/include/config.h.in, src/plugin/X/Makefile, src/plugin/X/X.c,
	  src/plugin/gpm/Makefile, src/plugin/sdl/Makefile,
	  src/plugin/sdl/Makefile.conf.in, src/plugin/term/Makefile,
	  src/base/misc/utilities.c:
	Add --disable-dlplugins configure option to be able to avoid run-time
	plugins. Use configure generated strings instead of -lSDL and -lgpm
	directly in the makefiles.

2005-10-28  Stas

	* src/plugin/: gpm/Makefile, sdl/Makefile, term/Makefile:
	Reduce the dependancies for the run-time plugins.

2005-10-24  Bart

	* src/: emu-i386/cpu.c, include/cpu.h:
	Introduce save and load macros to clean up some inline assembly.

	* src/arch/linux/dosext/sound/midid/oss.c:
	#include <unistd.h> for close() and write().

2005-10-23  Stas

	* src/: emu.c, arch/linux/async/signal.c:
	Do signal_init() later to avoid problems with SDL.
	But we still can't do the threading right...

	* compiletime-settings.devel:
	svgalib got updated, looks cool.

2005-10-20  Stas

	* src/: base/dev/pic/pic.c, include/pic.h,
	  plugin/kbd_unicode/serv_backend.c:
	Hack to mimic the old keyboard interrupt behaveour (PIC recursion).
	Closes #1329881.

2005-10-17  Stas

	* src/plugin/commands/builtins.c:
	Add copyrights and myself, my ego is very big these days. :-)

2005-10-14  Stas

	* src/emu.c:
	Closer debugger earlier (than iodev_term() mainly) to reduce the
	chance of having an orphaned pipes.

2005-10-13  Stas

	* src/dosext/dpmi/dpmi.c:
	Cleaned int23 handling by adding an extra parameter to quit_dpmi().

2005-10-12  Stas

	* src/arch/linux/async/sigsegv.c:
	Print something usefull on a vbios fault, and exit.

2005-10-09  Stas

	* src/emu-i386/ports.c:
	Vacate the ports 0x3bc-0x3bf for printer. (closes #1315913)

	* src/: env/video/video.c, base/bios/int10.c, include/video.h:
	Move some stuff from video_mem_setup() to scr_state_init() to fix
	the $_console=(1) $_graphics=(0) (part of #1315913)

2005-10-08  Stas

	* src/arch/linux/dosext/sound/midid/oss.c:
	Timer is not needed for sequencer.

2005-10-06  Stas

	* src/arch/linux/dosext/sound/midid/: device.c, io.c, midid.c,
	  oss.c, timid.c:
	Various updates

2005-10-04  Stas

	* Makefile.conf.in, configure.ac,
	  src/arch/linux/dosext/sound/midid/Makefile,
	  src/arch/linux/dosext/sound/midid/gus.c,
	  src/arch/linux/dosext/sound/midid/oss.c:
	New OSS sequencer driver.
	Remove obsolete libgus driver.

2005-10-01  Bart

	* configure, configure.ac, src/include/config.h.in:
	Removed some unnecessary configure checks.

2005-10-01  Stas

	* src/: commands/ems.S, dosext/misc/emm.c:
	Adjustments.

	* src/: base/init/memcheck.c, base/misc/disks.c,
	  base/misc/dos2linux.c, base/misc/fatfs.c, dosext/mfs/mfs.c,
	  emu-i386/simx86/trees.c, include/cpu-emu.h, include/dos2linux.h,
	  include/memory.h:
	Avoid using LOWMEM for the non-const addresses.
	This fixes iplay (again), as it read()s directly to the EMS frame.
	Also, moved dos_read/write to dos2linux.c to make them globally
	available. And removed the __builtin_constant_p() check in LINEAR2UNIX -
	gcc might still be able to optimize the const addresses, but falling
	back for dosaddr_to_unixaddr() will happen less frequently.

	* src/: commands/ems.S, include/emm.h, dosext/misc/emm.c,
	  dosext/misc/emm.h:
	- Implemented the version checking for ems.sys. Whoever forgets
	to update one, will now get the deserved punishment.
	- Since the bug was in the UMB hook, not in the EMS driver, made
	ems.sys not to install the UMB hook too, if dosemu refused EMS.
	("EMS 4.0.1" was very funny :-)

	* src/commands/ems.S:
	Avoid using "lret $2" - this doesn't restore the IF flag, causing
	the program to lock up (noticed with iplay).
	Bumped up the version. Some version checking is really needed here.
	Important: bios.S have to be inspected for the like things.

2005-09-30  Stas

	* src/: base/misc/utilities.c, include/utilities.h:
	Very simple, type-unsafe (I could really do with C++/STL here!)
	primitives for the ring-buffer management.
	Do not help much but to keep my sound patches smaller.

	* src/arch/linux/dosext/sound/midid/: midid.c, timid.c:
	Update for more non-existant timidity additions.

2005-09-26  Bart

	* src/env/video/: Makefile, remap.c, remap.h, remap_pent.c:
	Move pentium-optimized remapper functions to a seperate file.

	* src/base/bios/setup.c:
	Set int 7a correctly for IPX (bug reported by Reinhard Karcher)

	* src/base/bios/bios.S:
	Removed blanks in FILL_OPCODE expressions (#1292257, and R. Karcher)

2005-09-26  Stas

	* src/arch/linux/dosext/sound/midid/timid.c:
	cosmetic (never reached)

	* src/arch/linux/dosext/sound/midid/: midid.c, midid.h, timid.c:
	Added the standalone mode - midid can now launch timidity itself.
	Added the capture mode - midid can now capture and redirect the
	sound generated by timidity.
	Nothing of the above works with the current timidity, and so the
	usage description of the new params is disabled.
	Also changed the default timidity timeout to 0 (no timeout).

2005-09-25  Bart

	* src/: base/bios/bios.S, dosext/misc/xms.c:
	There need to be a short jmp and 3 nops in the XMS handler so just broke
	up the HLT table a bit.

2005-09-24  Bart

	* src/: emu.c, base/bios/bios.S, base/bios/hlt.c,
	  base/bios/setup.c, dosext/misc/xms.c, include/memory.h,
	  include/xms.h:
	Reset the A20 line for ctrl-alt-del. Moved the XMS handler back to f800:4150
	to avoid having to change ems.sys for different dosemu versions. Register
	this address as a HLT handler.

	* src/: include/emu.h, base/dev/misc/cmos.c, base/dev/misc/rtc.c,
	  base/dev/misc/timers.c, base/bios/setup.c, base/init/dev_list.c,
	  base/init/init.c, base/mouse/mouse.c, dosext/net/net/ipx.c,
	  dosext/net/net/pktnew.c, env/video/vga.c, env/video/vgaemu.c,
	  include/iodev.h, include/ipx.h, include/pic.h, include/pktdrvr.h:
	Unmap conventional memory until just before boot; VESA ints temporarily
	map it when necessary.
	BIOS setup calls iodev_reset. Moved iodev_init after priv_drop() and priv.
	needing inits out of it. Add disk, printer, ipx, pktdrvr init/reset to
	the iodev list. Eliminated hardware_setup() by calling pic_seti in the
	various _init functions.

	* src/: base/bios/int10.c, base/bios/setup.c, base/init/init.c,
	  env/video/vga.c, include/int.h:
	Only use video ints and 0x40:0xa8 from /dev/mem for config.vga.
	Set all interrupts (incl. all video ints) in bios/setup.c
	Repair config.vbios_post=1 + VESA
	VESA pre-boot information gathering uses complete /dev/mem information.

	* src/base/bios/setup.c:
	Revamp ctrl-alt-del functionality. It quickly reboots dosemu.

	* src/: env/video/video.c, plugin/term/keyb_slang.c:
	Allow running dosemu with a redirected stdin, and without a terminal, for
	cron jobs etc. Somehow this functionality was present in the old keyboard
	code but got lost in the new one.

	* src/: base/async/int.c, emu.c, base/bios/Makefile,
	  base/bios/bios.S, base/bios/int17.c, base/dev/misc/lpt.c,
	  base/init/init.c, dosext/dpmi/dpmi.c, dosext/dpmi/dpmi.h,
	  dosext/misc/emm.c, dosext/misc/emm.h, dosext/misc/xms.c,
	  emu-i386/cpu.c, env/video/vc.c, include/bios.h, include/emu.h,
	  include/int.h, include/lpt.h, include/video.h, include/xms.h,
	  plugin/kbd_unicode/dosemu_keys.c:
	Revamp ctrl-alt-del functionality. It quickly reboots dosemu.

2005-09-23  Stas

	* src/arch/linux/dosext/sound/midid/oss.c:
	Fix gcc4 warning again, but without using "static" this time.

2005-09-22  Bart

	* src/arch/linux/dosext/sound/midid/oss.c:
	Fix gcc-4.0 compilation error.

	* src/: base/async/int.c, base/bios/bios.S, base/init/init.c,
	  emu-i386/cpu.c, env/video/video.c, include/memory.h,
	  plugin/commands/builtins.c:
	Use a straightforward BIOS POST jumped to from 0xffff:0x0000 as in real
	BIOSes instead of the return call stack to get to 0000:7c00.

2005-09-21  Stas

	* src/arch/linux/dosext/sound/midid/: midid.c, midout.c, null.c,
	  oss.c, timid.c:
	gcc warnings and indentation fixes.
	Bumped version number, ha-ha-ha.

	* src/arch/linux/dosext/sound/midid/midid.c:
	Ignore the bad data in midi stream, rather than lock-up.
	Also some cleanups and gcc warning fixes.

2005-09-20  Bart

	* src/base/bios/bios.S:
	Moved R/W data in the BIOS to 0xd000, and use indirect jumps/calls instead
	of patched jumps/calls, so that the 0xe000-0xffff area is read-only.
	Added IBM signature at 0xe000.

	* src/dosext/dpmi/dpmi.c:
	Implement debug breakpoints in DPMI (RFE: #937984). This works if a forked
	child can ptrace attach us, i.e. if GDB is not already active and if
	DOSEMU is not suid-root or ran via sudo.

2005-09-20  Stas

	* src/: emu-i386/cpu.c, emu-i386/do_vm86.c, include/cpu.h,
	  include/emu.h:
	Use the separate FPU context for vm86. This fixes the recent
	regressions in CVS (bug #1292250), as well as an old FPU problems
	(bug #1275661).

2005-09-19  Bart

	* src/dosext/dpmi/dpmi.c:
	pic_iret() call in dpmi_realmode_hlt() needs to be pic_iret_dpmi() too.

2005-09-18  Bart

	* etc/dosemu.conf, src/base/async/int.c, src/base/bios/bios.S,
	  src/base/bios/hlt.c, src/base/dev/pic/pic.c,
	  src/base/init/memcheck.c, src/emu-i386/do_vm86.c,
	  src/include/bios.h, src/include/emu.h, src/include/hlt.h,
	  src/include/int.h, src/include/memory.h:
	Activate hlt.c code, and use its registered handlers for ints and PIC.
	Move the BIOS parts under 0xf4000 back beyond 0xfc000.
	Change default EMS page frame to 0xe4000 so that the new space is used
	efficiently, and 16K more UMB space is available.

	* src/: base/async/int.c, emu-i386/do_vm86.c, include/int.h:
	Split off do_int_from_hlt() from do_int(). It simplifies some processing
	since we don't need to check cs:ip again, and allows simplification of
	run_caller_func().

	* src/: base/dev/pic/pic.c, dosext/dpmi/dpmi.c, emu-i386/do_vm86.c,
	  include/pic.h:
	Split pic_iret() into pic_iret() and pic_iret_dpmi(): the callers know
	enough, there's no need to check again. Remove bogus pic_iret() call
	for VM86_STI.

2005-09-18  Stas

	* src/: base/dev/pic/pic.c, dosext/dpmi/dpmi.c,
	  dosext/sound/sound.c, emu-i386/do_vm86.c, include/pic.h,
	  include/vm86plus.h:
	Moved the PIC-internal variables into pic.c, converted the pic
	macros to functions.

	The small code changes:
	- pic_pending() now also takes into account the pic_irqs_active hack
	- disabled the "bad HACK" in sound.c to make it compile

2005-09-17  Bart

	* src/arch/linux/async/: signal.c, sigsegv.c:
	Re-introduce SA_NODEFER (kernel version dependent).

2005-09-17  Stas

	* src/: arch/linux/async/signal.c, base/init/init.c:
	Removed some redundant pic_seti() usages.
	The subsystems that still (ab)use pic_seti() are: sound, rtc, pit and serial.
	New sound won't use it, rtc and serial look easy to fix in the future,
	not sure about PIT though.

2005-09-16  Stas

	* src/base/misc/smalloc.c:
	free(NULL) is perfectly valid.

	* src/plugin/commands/blaster.c:
	New sound code will allow to use the 8bit DMA for the 16bit
	sound when the 16bit DMA is broken/unavail. That's the official
	feature of SB16, lets make blaster.c aware of it.

2005-09-14  Stas

	* src/base/misc/smalloc.c:
	Cosmetic (== hopefully non-intrusive) updates to smalloc.

	* src/arch/linux/mapping/mapfile.c:
	Fixed a very bogus bug with the SHM permissions: 700!=0700 !
	O_CREAT usually gives an RW access regardless, but add some
	security patches here, and that will explain a SIGBUS reported
	recently in ML.

2005-09-13  Stas

	* src/dosext/dpmi/dpmi.c:
	It is better to keep the orig client number instead of the pointer.
	This allows to avoid saving the state of the already terminated client -
	may help if we start doing free() on the client struct when it
	terminates.

	* dist/dosemu:
	beautify

2005-09-12  Bart

	* src/base/bios/bios.S:
	Fix alt-sysrq handling typo in int9. Thanks to Japheth, #1288107

2005-09-12  Stas

	* src/dosext/dpmi/dpmi.c:
	Cache the pointer to the DPMI_CLIENT struct where in_dpmi can
	change, and pass it to return_to_dosemu(). This fixes the watcom
	problem and allows some cleanups. The further cleanups can be
	to use that pointer always, not only for return_to_dosemu(), but
	I think only return_to_dosemu() really cares.

2005-09-11  Bart

	* src/emu-i386/do_vm86.c:
	Remove recursion check for dpmi ints 0x1c,0x23,0x24 that is no longer
	necesary since we use hlt in bios.S.

	* src/plugin/kbd_unicode/serv_xlat.c:
	put_preceding_dead_keys entered the wrong dead keys and forgot about alt.
	Call put_character_symbol recursively to get it right. This fixes
	bug #1262962

2005-09-09  Clarence

	* src/arch/linux/Makefile.main:
	Fix #1224934 - 1.3.2: make install changes permissions of /tmp:

	https://sourceforge.net/tracker/?func=detail&atid=457447&aid=1224934&group_id=49784

	tar 1.14 (e.g. FC4) enabled the opposite of "--no-overwrite-dir" by default.

	At "make install" time, a symbolic link
	"/usr/local/share/dosemu/freedos/tmp" is made to point to "/tmp".  On the
	second invocation of "make install", dosemu-freedos-bin.tgz is unpacked to
	"/usr/local/share" - however it contains a directory "dosemu/freedos/tmp"
	with permissions "rwxr-xr-x".

2005-09-09  Bart

	* src/base/misc/fatfs.c:
	Needs errno.

	* src/: dosext/mfs/mfs.c, include/cpu-emu.h:
	Fix compilation failure with cpuemu disabled.

2005-09-07  Bart

	* src/emu-i386/simx86/sigsegv.c:
	Fix simx86 vgaemu movs op handling. This fixes space quest's and
	jazz jackrabbit's display in simx86.

	* src/emu-i386/simx86/emu86.h:
	simx86: Do not stretch time if the EMUtime goes faster than the TSC.
	The negative adjustments caused wrong multiplications and random hangs.
	Now it looks like the random hangs are gone. There are only consistent
	hangs left, all in DPMI it seems.

2005-09-06  Bart

	* src/plugin/sdl/sdl.c:
	Handle resizing in SDL fullscreen toggling.

	* src/plugin/: X/X.c, kbd_unicode/dosemu_keys.c,
	  kbd_unicode/serv_xlat.c, sdl/sdl.c,
	  kbd_unicode/include/keyboard.h:
	Moved ctrl-alt-p processing to general keyboard code. It saves duplicate
	code and now it works on the console too.

2005-09-05  Bart

	* src/plugin/sdl/sdl.c:
	Always grab if fullscreen is set at init. This fixes the mouse in SDL
	fbdev mode.

	* src/plugin/sdl/: mouse_SDL.c, sdl.c, sdl.h:
	Added support for fullscreen toggling, mouse and keyboard grab (can't
	seperate them), some xmode support, and window title support to the
	SDL plugin.

	* src/: base/misc/dos2linux.c, include/dos2linux.h, plugin/X/X.c,
	  plugin/X/X.h:
	Moved much of X_change_config to dos2linux.c. Much of it will be shared
	with SDL.

	* src/plugin/sdl/sdl.c:
	Allow loading the SDL plugin with Video already set to something else.

2005-09-04  Bart

	* src/: emu-i386/simx86/cpu-emu.c, emu-i386/simx86/protmode.c,
	  emu-i386/simx86/protmode.h, include/emu-ldt.h,
	  dosext/dpmi/Makefile, dosext/dpmi/dpmi.c, dosext/dpmi/emu-ldt.c:
	Use ldt_buffer for simx86's LDT. Merge the codes that update the cached
	LDT. I thought the simx86 version was the nicer of the two.

	* src/dosext/dpmi/dpmi.c:
	Added extra check in get_ldt to make sure that the simx86 LDT matches the
	init-time LDT (which comes from the real modify_ldt).

	* src/base/misc/hma.c:
	simx86: extmem memmove's can also overwrite code

	* src/: base/misc/fatfs.c, dosext/mfs/mfs.c, dosext/misc/xms.c,
	  emu-i386/simx86/codegen-x86.h, emu-i386/simx86/cpatch.c,
	  emu-i386/simx86/emu86.h, emu-i386/simx86/memory.c,
	  emu-i386/simx86/trees.c, include/cpu-emu.h:
	simx86: added e_invalidate: invalidates a memory region, to be used after
	a memcpy to DOS space which may overwrite code. e_dos_read can use this
	function as well, after a plain "read" into aliased space.
	Use a few header adjustments to avoid #ifdef's in the main code.
	Make check_munprotect e_check_munprotect, a global function that only
	unprotects memory that is not low.

2005-09-04  Clarence

	* INSTALL:
	ok, ok, 64-bit is supported now

2005-09-03  Bart

	* src/arch/linux/async/sigsegv.c:
	Localise variables csp and i in dosemu_fault1. This is a workaround for
	a GDB bug (fixed Jan 2005, post 6.3) where it bombs out of a
	"backtrace full" as soon as variable "csp" is not available.

2005-09-01  Bart

	* src/: env/video/vc.c, plugin/kbd_unicode/keyb_raw.c:
	Raw keyboard by itself does not require VC process control: the kernel
	handles raw<->xlate keyboard changes upon mode switching itself.

2005-08-31  Bart

	* src/base/init/memcheck.c:
	Fix gcc warnings.

2005-08-28  Bart

	* src/emu-i386/simx86/interp.c:
	Allow reads from GFX_INDEX in cpuemu.

	* src/base/async/int.c:
	Revert 2UNIX/2DOS changes in int.c (similar to msdos.c)

	* src/emu-i386/simx86/cpatch.c:
	Use macros and straight-asm for the rep instructions.

	* src/emu-i386/simx86/cpatch.c:
	Use straight asm without function overhead. This allows to eliminate _DEBUG
	defines. Use macros to reduce near-duplicate code.

	* src/emu-i386/simx86/cpatch.c:
	Use wri_8 etc. functions in stub_movsb etc. This reduces assembly and
	number of m(un)protect calls further.

	* src/emu-i386/simx86/interp.c:
	Fix warnings for HOST_ARCH_SIM

	* src/emu-i386/simx86/: codegen-arch.h, codegen-x86.c, fp87-sim.c:
	Fix typo, asm constraints and used/unused attributes.

	* src/emu-i386/simx86/codegen-arch.h:
	Re-add.

	* src/emu-i386/simx86/: Makefile, codegen-arch.c, codegen-arch.h,
	  codegen-sim.c, codegen-sim.h, codegen-x86.c, fp87-arch.c, usesim,
	  usex86:
	Replace symbolic link system for simx86 by conditional compilation.
	Fix a dpmi_eflags and case label range issue with codegen-sim.

	* src/emu-i386/simx86/cpatch.c:
	Allow gcc -O2 for newer versions of GCC (need __attribute__((used)))
	Converted some of the assembly in the stubs to C
	Avoid mprotect/munprotect where possible by making use of the aliased
	low memory. This significantly improves simx86 performance.

2005-08-27  Bart

	* src/: arch/linux/async/sigsegv.c, emu-i386/simx86/cpu-emu.c,
	  emu-i386/simx86/emu86.h, emu-i386/simx86/sigsegv.c,
	  include/cpu-emu.h:
	Call e_emu_fault from dosemu_fault instead of installing a private SIGSEGV
	handler. This way simx86 inherits most of the fault handling infrastructure
	around dosemu_fault.

	* src/dosext/dpmi/msdos.c:
	Revert 2UNIX/2DOS changes to msdos.c.

	* src/: arch/linux/mapping/mapping.c, base/async/int.c,
	  base/init/memcheck.c, dosext/mfs/mfs.c, include/bios.h,
	  include/memory.h:
	Replace READ_BYTE macros etc by something more intelligent, which
	allows us to eliminate lowmem_alias again. Move them to memory.h as
	they are not strictly bios related.

2005-08-23  Stas

	* src/base/async/int.c:
	This allows First Encounter game to work with default hogthreshold.
	I actually only changed 0->20 in the idle() call, the rest is just a
	white-space noice.

2005-08-22  Bart

	* src/: base/async/int.c, base/serial/ser_init.c,
	  dosext/dpmi/msdos.c:
	Use WRITE_WORD in ser_init.c. Correct MEMCPY_2DOS etc usage in msdos.c/int.c
	(if you interprete "DOS" as below 1MB+64k of course which is all it
	 manages)

	* src/: arch/linux/async/signal.c, arch/linux/async/sigsegv.c,
	  env/video/instremu.c:
	Don't use SA_NODEFER because it doesn't work as documented, at least, for
	the time being. Explicitly unblock the faulting signal instead.
	Unblock async signals in instremu.

	* src/arch/linux/async/signal.c:
	Use the kernel sigaction unconditionally. As it turned out the Wine
	technique required another workaround which is so glibc-internal dependent
	that it was not worth it.

2005-08-21  Bart

	* src/: base/async/int.c, base/bios/int16.c, base/dev/pic/pic.c,
	  dosext/dpmi/dpmi.c, dosext/mfs/mfs.c,
	  plugin/kbd_unicode/serv_backend.c, include/cpu-emu.h:
	Remove E_M(UN)PROT_STACK and all its users because they are no longer
	necesarry. Use fake_call/int_to where possible.

	* src/: arch/linux/mapping/mapping.c, include/bios.h,
	  env/video/text.c:
	Introduce lowmem_alias pointer and mappings in mapping.c. This provides
	a mirror map of the 0-1MB+64KB area, but not r/w protected. So we can
	access everything from dosemu's main code without causing page faults,
	or necessary mprotect adjustments. NULL page debugging also becomes a
	little cheaper this way.

	* src/base/bios/int10.c:
	Fix not yet existing lowmem_alias.

	* src/base/: init/init.c, mouse/mouse.c:
	Use READ/WRITE* when accessing DOS memory.

	* src/: include/cpu.h, emu-i386/simx86/cpu-emu.c:
	Replace asm push/pop macros by C code, using READ_BYTE etc.
	Use READ/WRITE_WORD for IOFF, ISEG, and SETIVEC.

	* src/: env/video/text.c, include/video.h:
	Moved ATTR and CHAR macros from video.h to text.c. They access internal
	vgaemu RAM, so no need for READ_BYTE etc.

	* src/base/bios/: int10.c, int17.c:
	Use macros to access BIOS variables in int10.c.
	int17.c does not need MUNPROT emulator stuff, because it's all read only.

2005-08-21  Stas

	* src/base/mouse/mouse.c:
	Don't disable the mouse driver on ax=0x1f.
	RBIL says the driver gets really disabled only if you install
	the intvector returned by this function, so it looks like otherwise
	this function does nothing.
	This solves the problem with mcity, for which I previously had
	to use dosbox:)

2005-08-18  Bart

	* etc/global.conf, src/base/bios/Makefile, src/base/bios/int17.c,
	  src/base/dev/misc/lpt.c, src/include/lpt.h:
	Rewrote int17 (thanks to Bochs) to interface to the parallel port hardware,
	so that it works with emulated ports and real i/o ports.
	Implemented basic emulated parallel port hardware that deals with the
	printer. $_printer_commands should be allowed from .dosemurc for suid-root.
	This implements RFE #830601.

2005-08-18  Stas

	* src/base/async/int.c:
	My midnight-accumulation code works better than this.

2005-08-17  Stas

	* src/include/timers.h:
	Compile fix

2005-08-17  Bart

	* src/base/misc/disks.c:
	Added very basic floppy i/o port motor control handling, just to turn it
	off for now.

	* src/base/: async/int.c, bios/bios.S:
	Let INT 8 increment, instead of just set, the midnight flag when the time
	is right. This helps when INT 1A isn't called for longer periods of time,
	and is consistent with some other BIOSes.
	Use READ_DWORD etc. in int.c; small optimization; flag floppy timeout to
	controller (note that the floppy controller port 0x3f2 isn't emulated yet).

	* src/plugin/sdl/keyb_SDL.c:
	Handle all SDL keysyms including keypad, prtscr etc. Fixes #1252147

	* src/base/bios/int10.c:
	Set correct page size for int10/ah=5 in graphics modes. Fixes #1255178

2005-08-16  Bart

	* src/: base/bios/bios.S, emu-i386/do_vm86.c:
	Replace "int xx" in bios.S trampoline by hlt. Minimal change: further
	cleanups are possible.

2005-08-15  Clarence

	* dist/dosemu, src/base/init/config.c:
	Wrapper script: don't pass "dosemu.bin" as argv[0], pass the wrapper scr
	ipt name instead.

	config.c: Look for --version/--help arg anywhere in the argv[] list
	(so as to not complain on "xdosemu --help" which prepends a -X to argv[]).
	Don't print out "xdosemu = dosemu -X" if already using xdos/xdosemu.

2005-08-14  Stas

	* src/include/dosemu_debug.h:
	Bump up the gcc version needed for attribute format.

2005-08-14  Bart

	* src/dosext/mfs/: mangle.c, mangle.h:
	Use new min/max macros in mangle.c.

2005-08-13  Bart

	* src/emu-i386/simx86/interp.c:
	Correct case labels for 0xb0, 0xb1, should not be -1 (CMPXCHG).

2005-08-11  Stas

	* src/: dosext/dpmi/dpmi.c, emu-i386/do_vm86.c:
	Remove the ancient pic_resched hacks.

	* src/dosext/dpmi/dpmi.c:
	Fixes on a failure path (cosmetic)

2005-08-06  Stas

	* src/dosext/dpmi/dpmi.c:
	Initialize the DPMI FPU context to something sensible.
	Also poll the DMA more frequently.
	Be more carefull about the FPU context copying.
	Do FPU context initialization in indirect DPMI switch.

2005-08-05  Stas

	* src/: include/smalloc.h, include/utilities.h,
	  base/misc/smalloc.c:
	Use the compatibility FORMAT macro in a few places.

2005-08-05  Bart

	* src/: arch/linux/mapping/mapfile.c, include/smalloc.h:
	Compatibility with older gcc versions.

2005-08-03  Bart

	* src/env/video/instremu.c:
	Made instremu assembly macros compatible with earlier gcc versions.

2005-08-03  Stas

	* src/plugin/kbd_unicode/serv_backend.c:
	Got tired of the ocasional keypress duplications and increased
	the keyboard char delay to 800uS.
	Actually, the duplicate keypresses have not disappeared in BC IDE
	at all. Set the latency to 2000uS - now they seem to really have
	gone.

	* src/: emu-i386/cpu.c, dosext/dpmi/dpmi.c, dosext/dpmi/dpmi.h,
	  dosext/dpmi/msdos.c, include/cpu.h, include/emu.h:
	Implemented FPU state switching. Needed for my new sound code
	and is a long-overdue anyway.

2005-07-29  Stas

	* src/doc/HOWTO/EMUfailure.sgml:
	Clarify a comment about x-com game.

2005-07-26  Bart

	* src/base/async/int.c:
	Use new min macro.

	* src/base/dev/dma/dma.c:
	Fix warnings.

	* src/: dosext/sound/sound.c, base/dev/dma/dma.c, include/dma.h,
	  include/sound.h:
	Use new min/max macros in sound code, adjust some types to match.

	* src/: include/utilities.h, plugin/X/X.c:
	Use the same type-safe min/max macros as the Linux kernel uses and use
	them in X.c.

2005-07-25  Bart

	* src/env/video/remap.c:
	Added basic 15->32 and 16->32 remapper functions. Based on a patch by
	Mike Nelson, SF #1244195

2005-07-24  Bart

	* src/base/init/parser.y.in:
	No need (and wrong) to free Path_cdrom[which].

	* src/: emu.c, emu-i386/simx86/cpu-emu.c:
	Allow cpuemu when $_rdtsc=(off). It uses RDTSC nevertheless (so should
	check for 586), but now with the timer code just using gettimeofday().

	* src/: arch/linux/async/signal.c, emu-i386/cputime.c,
	  include/timers.h, base/init/init.c, dosext/dpmi/memory.c,
	  emu-i386/simx86/emu86.h, dosext/drivers/aspi.c:
	Replaced HZ by the more modern sysconf(_SC_CLK_TCK).
	The sigalarm handler now updates the time system counter base, so our
	TSC timer is a hybrid just like the one in the Linux kernel. This avoids
	DOS time slow downs because of inactive idle cpu's etc. Correct backtracing
	in emu86.h.

2005-07-24  Stas

	* etc/dosemu.conf, etc/global.conf, src/base/async/int.c,
	  src/base/dev/misc/rtc.c, src/include/iodev.h:
	Applied (by popular demand) the new timemode patch from Andrew Brooks.
	This should have a positive effect of having the cmos values in
	sync with the time in any mode. And it introduces the "linux"
	time source.
	New option is added to dosemu.conf.

2005-07-23  Bart

	* Makefile.conf.in, compiletime-settings, configure, configure.ac,
	  src/emu.c, src/include/cpu.h, src/plugin/sdl/Makefile,
	  src/plugin/sdl/Makefile.conf.in, src/plugin/translate/Makefile:
	Add support for compilation on x86-64.

	* src/env/video/instremu.c:
	We must use "q" and not "r" in byte-operating asm instructions to avoid
	GCC telling us "Error: bad register name `%sil".

	* src/dosext/dpmi/: dpmi.c, dpmi.h:
	Moved ds, es, fs, and gs check selector code into a function.
	Allow 1, 2, and 3 as null selectors. They sometimes seem to occur on
	x86-64. Simplified ValidSelector(): in practice it only needs to check for
	the LDT bit.

	* src/base/mouse/mouse.c:
	We should only erase a text mouse cursor if it's native and drawn, not
	unconditionally if it's non-native.

	* src/arch/linux/async/signal.c:
	Removed unused variable kernel_sa.

	* src/emu-i386/simx86/codegen-arch.c:
	Actually enable the hack to get bgidemo (and doom) working.

	* src/include/cpu.h:
	Forgotten sys/vm86.h change.

	* src/: emu-i386/simx86/cpu-emu.c, emu-i386/simx86/sigsegv.c,
	  env/video/vgaemu.c:
	Make simx86 more functional with DPMI code (both native and emulated).
	Adjusted bogus ((int)_cr2 < 0) test. Signal handlers use the signal stack
	and perhaps queue, and restore eflags, fs and gs. Revert the meanings of
	config.cpuemu==2 and 3. The fault handler takes better care of VGAEMU.

2005-07-22  Bart

	* src/emu-i386/simx86/sigsegv.c, etc/dosemu.conf, etc/global.conf,
	  src/dosext/dpmi/dpmi.c, src/base/init/lexer.l.in,
	  src/base/init/parser.y.in, src/include/cpu-emu.h:
	Introduced new $_cpu_emu option to set to either "off", "vm86" or "full".
	config.cpuemu==4 now means full emulation, 3 means vm86 only.
	Adjusted DPMI to reflect this. CPUEMU's fault handler temporarily leaves
	the vm86-only emulator after a page fault if DPMI is active.
	Disabled non-emulated boot and vbios for now.

	* src/: include/vm86plus.h, include/Asm/vm86.h, base/dev/pic/pic.c,
	  base/misc/ioctl.c, dosext/net/net/ipx.c, emu-i386/do_vm86.c,
	  emu.c:
	Include Asm/vm86.h. Removed #include <sys/vm86.h> because this file is not
	available on AMD64.

2005-07-22  Stas

	* src/dosext/dpmi/dpmi.c:
	Zero out FS/GS upon raw mode switches (bug #1242171)
	Also zero out the "undefined" registers.

2005-07-22  Clarence

	* src/: base/init/config.c, include/emu.h:
	As posted to dosemu-devel put without the usage() change:

	Config documentation cleanup and a little bit of getopt() fixing.

	Complete list of changes (it's smaller than it looks):
	- Remove unused, probably out-of-sync "struct debug_flags d"
	- Pass the same string to the 2 getopt calls and in sync with reality
	  (sometimes we were missing ":" or options entirely)
	- We need "--help" in addition to "--version" (I finally found out that
	  "--version" was the correct way to bring up the help, rather than triggering
	  a syntax error with "-h" :))
	- Remove unused "sizes" variable, group together code for handling obsolete
	  options
	- Print the bad character (not '?') when user types in incorrect option
	- usage():
	  # Remove "[-ABckballtheseareeitherwrongoroutofdateanyway]" etc. from the
	    description
	  # Remove non-existent options, obsolete options
	  # Document secret until now options like -S (so Bart, your SDL secret is out
	:))
	  # In other words, document all the options we have and be consistent with
	    the getopt string
	  # Move "%s --version" lower since it doesn't accept options
	  # Indent "%s --version" and "xdosemu [options]" for consistency with primary
	    command

2005-07-21  Bart

	* src/base/misc/fatfs.c:
	Use e_dos_read() to load the FreeDOS kernel when cpuemu is active.
	Allows running dosemu without using vm86 at all, useful for x86-64.

	* src/emu-i386/simx86/: codegen-arch.c, cpu-emu.c, interp.c:
	The correct expression for the virtual flags in DPMI is
	get_vFLAGS(TheCPU.eflags)
	which gets the VIF from the vm86s structure.

	* src/emu-i386/simx86/: codegen-arch.c, interp.c, sigsegv.c:
	simx86: Corrected vga_read/write calls, and VGAEMU port list. Removed
	is_cli stuff, as a blacklist is not needed here. Set up a hack for
	genbufsize. Enough for bgidemo to work.

2005-07-21  Stas

	* src/base/: init/parser.y.in, serial/ser_init.c:
	Init sptr->dev to NULL as parser now does free() and crashes.
	Have to check on the other similar bugs.

2005-07-20  Bart

	* compiletime-settings, compiletime-settings.devel,
	  default-configure:
	Remove linkstatic in compiletime-settings.*. Re-enable cpuemu in .devel.

	* src/emu-i386/simx86/: codegen-arch.c, cpu-emu.c, interp.c:
	Replace dpmi_eflags with _EFLAGS in simx86. Not quite sure how correct this
	is. Copy the LDT table that dpmi_setup() put up into the simx86 LDT.
	With these changes simx86 works again for DPMI (not perfectly but...).

	* src/emu-i386/simx86/sigsegv.c:
	s/Logical_VGA/vga/

	* src/emu-i386/simx86/protmode.c:
	Fix a bug in simx86's LAR handling. This was *the* major bug in simx86.

2005-07-20  Clarence

	* src/: arch/linux/debugger/mhpdbgc.c, emu-i386/ports.c,
	  env/video/matrox.c:
	Many people don't know how to use fgets() and waste 1 byte :)
	Avoid using hardcoded constants without changing someone else's style too much.

2005-07-20  Bart

	* src/: env/video/vgaemu.c, env/video/video.c, base/bios/int10.c:
	Do the fake call to the int10 post/video set a bit later, and set a few
	more variables in vga_emu_init(). This gets the Bochs vgabios back to work.

2005-07-20  Stas

	* src/plugin/kbd_unicode/serv_backend.c:
	Emulate the bits 0 and 1 of the keyboard_flags_3 (0x40:0x96)
	(fixes #1230579)
	Respect the state of the keyboard_flags_3 instead of relying on
	the one remembered by dosemu (second part of #1230579)

2005-07-20  Bart

	* src/dosext/mfs/: lfn.c, mfs.c, mfs.h:
	LFN MFS fixes: basic volume label for LFN findfirst, give "access denied"
	when trying to remove a non empty dir. Fixes VC move problem, #1238148;
	and cleanups: header files, replace MAXPATHLEN with PATH_MAX.

2005-07-19  Bart

	* src/env/video/: crtcemu.c, vgaemu.c:
	Modify vga_emu_adj_config to adjust VESA modes that are within bounds,
	in general < 2048x1024x8bpp. Setup the CRT mode init that way as well.

	* src/env/video/seqemu.c:
	Set vga.seq.data[4] to the correct value for VESA modes.

2005-07-18  Bart

	* src/base/mouse/mouse.c:
	Let mouse_move_absolute only cause a callback to (e.g.) perhaps warp the
	X cursor if the mouse was clipped.

	* src/base/bios/int10.c:
	Unconditionally set the bios cursor shape variable, even if set to
	invisible. This fixes a problem with DN.

	* src/env/video/vga.c:
	Don't check for the int10 location if $_vbios_post=(1).

2005-07-17  Bart

	* src/env/video/: crtcemu.c, vgaemu.c:
	Adjust some crtc registers in 8bpp vesa modes, and recognize them in
	the adjust config routine. Perhaps that allows a windows vesa driver to
	work.

	* src/base/: mouse/mouse.c, mouse/mousevid.c, bios/bios.S:
	Fix missing 0x typo in mousevid.c; check if the vesa mode was really set.
	The mode is now passed on the stack instead of in cx.

	* src/env/video/: text.c, vgaemu.c:
	Set video to off initially so that the screen won't get updated before the
	initial mode set. Also don't divide by zero in check_cursor_location.
	Fixes #1239421

2005-07-17  Stas

	* src/plugin/X/X.c:
	Properly track FocusIn/FocusOut X events (further fixing #920216)

	* src/: include/mouse.h, base/mouse/mouse.c:
	Replace mouse.rx and mouse.ry with a macros to reduce the
	amount of the variables we should keep in sync.

	* src/base/mouse/mouse.c, src/plugin/X/X.c:
	Move mouse pointer no matter whether it is visible or not
	(part of #920216)
	Forgotten piece of the partial #920216 fix.

2005-07-16  Bart

	* src/: env/video/console.c, env/video/vgaemu.c, include/mouse.h,
	  base/bios/bios.S, base/mouse/gcursor.c, base/mouse/mouse.c,
	  base/mouse/mousevid.c, base/mouse/mousevid.h:
	fix #1206135 by passing bx from vesa mode sets to the mouse mode set
	adjustments. This works for vgaemu and all fixed console vesa modes.
	However, don't draw any mouse cursor: gcursor.c doesn't know about
	LFBs, >8 bpp and bank switching.

	* src/base/init/parser.y.in:
	Removed a free() that was a tad too aggressive.

2005-07-15  Bart

	* src/: base/init/parser.y.in,
	  plugin/translate/config/plugin_parser, base/dev/misc/joystick.c,
	  base/dev/misc/lpt.c, plugin/term/mouse_xterm.c:
	Plugged some memory leaks in the parser (thanks to valgrind). Simplify
	mouse_xterm detection (which was also a leak).

	* src/: base/misc/priv.c, base/misc/utilities.c,
	  arch/linux/async/debug.c, include/dosemu_config.h,
	  arch/linux/debugger/mhpdbgc.c, base/init/config.c:
	Reintroduced dosemu_proc_self_exe, as it comes in really handy for dosdebug.
	Fall back to dosemu_argv[0] for older valgrinds and qemu if it's NULL.
	Plugged a small memory leak.

	* src/arch/linux/async/signal.c:
	Use RTLD_NEXT to find glibc's default (non-pthread) sigaction. Saves a
	bit of effort on our part. This technique is borrowed from Wine: if they
	can do it, we can do it too.

	* src/: env/video/vesa.c, base/bios/int10.c, env/video/console.c,
	  env/video/hgc.c, env/video/vgaemu.c, env/video/video.c,
	  include/video.h:
	Moved BIOS variable init from video.c to int10.c
	Install a small real VGA BIOS for all vgaemu clients, that just contains
	the static functionality table, no fonts.

2005-07-15  Stas

	* src/: arch/linux/async/debug.c, arch/linux/debugger/mhpdbgc.c,
	  base/init/config.c, include/dosemu_config.h, base/misc/priv.c,
	  base/misc/utilities.c:
	Remove dosemu_proc_self_exe. It doesn't work under qemu and
	valgrind, it can have problems with privs, and overall it
	looks useless.

2005-07-14  Bart

	* src/: base/misc/utilities.c, emu-i386/cpu.c, emu-i386/ports.c:
	Use fscanf directly instead of fgets and then sscanf. Avoids some
	arbitrarily sized buffers.

2005-07-13  Bart

	* src/base/bios/int10.c:
	Moved adjust_font_size into a function of its own instead of fiddling with
	the high word of mode in set_video_mode. Implement changing scanlines after
	mode sets so that "mode co80,43" really gives you 43 lines in xdosemu.

2005-07-13  Stas

	* etc/dosemu.conf, src/arch/linux/mapping/mapfile.c,
	  src/arch/linux/mapping/mapping.c,
	  src/arch/linux/mapping/mapshm.c, src/include/mapping.h:
	- Fixed $_mapping="mapfile" by providing the separate ops for
	"mapfile" and "mapshm", otherwise one can't select.
	- Added "mapashm" option for the anon-shm mapping.
	- "mapshm" is now a default.

	* src/base/misc/smalloc.c:
	Don't call any smalloc functions on error path, as they may assert.

	* src/base/init/parser.y.in:
	cosmetic

2005-07-12  Stas

	* etc/dosemu.conf:
	typo.

	* src/dosext/dpmi/: dpmi.c, msdos.c:
	Small fixes.

2005-07-12  Bart

	* src/: base/mouse/mouse.c, include/mouse.h, plugin/X/X.c:
	Made some mouse functions static, removed some unused mouse code.
	Re-enabled Mouse->set_cursor call in mouse_do_cur to be able to warp the
	X cursor. However, be more conservative and safer in warping than before:
	- don't warp if snap_X is active or if the mouse cursor is off.
	- ignore any events caused by pointer warps; they often triggered infinite
	  actions because the event could be different from what we warped to.
	In non grab mode this fixes some issues with SC2000 (dual mouse cursor),
	and VPA (vga planets assistant, clicking didn't move the cursor).

	* src/: base/bios/int10.c, include/memory.h:
	Program display start via crtc for mode sets in terminal mode; fix TEXT_SIZE
	This fixes some new issues with programs that use multiple pages in terminal
	mode.

	* src/: base/init/dev_list.c, plugin/term/mouse_xterm.c:
	Initialize video before mouse and don't use the native (text) cursor
	for the xterm mouse.

2005-07-11  Bart

	* src/plugin/: X/X.c, sdl/sdl.c:
	Revert X and SDL to use video_mode global variable for now. Necessary for
	VESA modes, in particular with z80s (spectrum emulator).

	* src/plugin/X/X.c:
	Correct MIT-SHM X error handling. It didn't work over remote X via ssh.
	Call leavedos from the X error handler, otherwise it leaves DOSEMU
	uncleanly.

	* src/base/bios/int10.c:
	We can't change the number of screen rows in terminal mode when adjusting
	the font size.

2005-07-10  Bart

	* src/: dosext/dpmi/msdos.c, env/video/instremu.c,
	  include/vgaemu.h:
	From Stas: implements decode_modify_segreg_insn (instruction decoder
	for modified segment registers in msdos.c) in instremu.

	* src/: base/bios/int10.c, env/video/video.c, include/video.h:
	Eliminated video_subsys, *height and text_scanlines global variables.
	set_cursor_shape now takes care of setting the BIOS variable as well.
	Cleaned up int10/ah=f to work like a real video bios does.

	* src/: emu.c, base/bios/bios.S, base/init/dev_list.c,
	  base/init/init.c, env/video/vesa.c, env/video/vga.c,
	  env/video/video.c, include/video.h, plugin/X/X.c,
	  plugin/sdl/sdl.c:
	Moved video priv_init/init/close to iodev list; the init no longer needs to
	map any /dev/mem, it all comes from the register_hardware_ram list.
	Always boot via setting a video mode, or POSTing, not just on the console;
	use 0:449 for the mode. Remove most other mode setters.
	Use fake_call_to() where possible.
	Merged init_vga_card() with vga_post_init().
	Eliminated font_height global variable.

	* src/base/init/config.c, src/include/emu.h, src/plugin/translate/translate.c,
	  etc/global.conf, src/base/init/config.c,
	  src/base/init/lexer.l.in, src/base/init/parser.y.in,
	  src/include/video.h, src/plugin/translate/translate_config.c:
	Removed old charset configuration.

	* etc/dosemu.conf, etc/global.conf, src/base/dev/misc/lpt.c,
	  src/base/init/lexer.l.in, src/base/init/parser.y.in,
	  src/include/lpt.h:
	(mostly from Stas) More flexible printer configuration.

2005-07-10  Stas

	* src/env/video/render.c:
	People complain about this leavedos.

	* src/base/misc/utilities.c:
	This message, always being in the log, makes people nervous.

	* src/plugin/commands/unix.c:
	Even a better heuristic can be done if we check for '/' to be
	before ' '.

	* src/plugin/commands/unix.c:
	Use strchr() for '/' to destinguish the dos/linux path.
	Not convinced that it is a bad solution, and it is better
	than now in any case.

2005-07-09  Stas

	* src/arch/linux/mapping/mapping.c:
	realloc() from NULL should malloc(), and also added some
	sanity checks. They may probably trigger some false-positives,
	but I'd like too see them.

	* src/dosext/misc/emm.c:
	Don't pass zero-sized EMS allocations to the memory management
	subsystems. smalloc is really against the zero-sized allocations
	(deliberate decision, won't change), but the EMS specs explicitly
	allows the zero-sized allocations :(
	Fixes the problems with Windows 3.0

2005-07-08  Clarence

	* src/: base/dev/misc/joystick.c, emu-i386/ports.c:

	Rearrange joystick global init order to match def order somewhat.
	Initialise joy_port_[xy] to -1 so that if the port handlers are ever reinstated
	for when there is no joystick and the first joystick port access is an inb,
	the axis bits will be set high like the buttons (the byte returned will be 0xFF).

	Update comments to emphasise Stas' r1.4 change (don't register joy port handlers
	if no joy).

	* etc/dosemu.conf:
	spel

2005-07-08  Bart

	* src/: emu-i386/ports.c, env/video/video.c:
	Replace ioperm by set_ioperm in ports.c; otherwise almost all ports are
	slow using sudo/suid. No wonder why console graphics were so slow.
	Also disable the native speaker when not on the console or you'd get all
	kinds of strange effects when running remotely.

	* src/: base/async/int.c, base/bios/int10.c, base/mouse/mouse.c,
	  env/video/dualmon.c, env/video/vgaemu.c, include/memory.h,
	  include/vgaemu.h, include/video.h:
	Get rid of SCREEN_ADR(), use screen_adr() instead, which uses only BIOS
	variables. Use vga_write*, vga_read*, etc. functions to access VGA memory,
	and adjust those a bit. Cleaned up set_video_mode, but just slightly.

	* src/: base/bios/int10.c, emu-i386/ports.c, env/video/console.c,
	  env/video/crtcemu.c, env/video/hgc.c, env/video/text.c,
	  include/vgaemu.h, include/video.h, plugin/term/terminal.c:
	Eliminated global variables cursor_shape, cursor_blink and char_blink.
	The BIOS now sets these in vga.* via emulated hardware instead.

	* src/: base/async/int.c, base/bios/int10.c, env/video/console.c,
	  env/video/vc.c, env/video/vga.c, include/vc.h:
	Make set_vc_screen_page emulated-hardware instead of BIOS dependent.

	* src/emu-i386/ports.c:
	The port server should ignore SIGINT.

	* src/: base/bios/int10.c, env/video/console.c,
	  env/video/crtcemu.c, env/video/dualmon.c, env/video/hgc.c,
	  env/video/text.c, env/video/vgaemu.c, env/video/video.c,
	  include/video.h, plugin/term/terminal.c:
	Eliminated global variables screen_adr, cursor_row, and cursor_col.

2005-07-07  Bart

	* src/: emu-i386/ports.c, env/video/console.c, env/video/vgaemu.c,
	  env/video/video.c:
	Use a very basic vgaemu for (config.console_video && !config.vga)

	* src/: base/bios/int10.c, env/video/vgaemu.c, env/video/video.c,
	  include/video.h:
	Started merging set_video_mode() and X_set_video_mode()
	clear_screen() now clears the whole screen (all pages)
	video.c calls set_video_mode(video_mode) instead of clear_screen; this
	obsoletes a similar call in vgaemu.c.
	bios_scroll now takes the BIOS screen offset into account.

	* src/: emu.c, base/misc/ioctl.c, emu-i386/do_vm86.c,
	  emu-i386/ports.c, env/video/dualmon.c, env/video/hgc.c,
	  env/video/video.c, include/hgc.h:
	Eliminated hgc.h, made functions in hgc.c static, and some dualmon fixes.

2005-07-05  Clarence

	* dist/dosemu:
	"dosemu -install" fixes:
	1. Allow spaces in private dosemu directory name
	2. actually create a correct "~/.dosemu/drives/c" symlink (needs to be an absolute path)

	Bart, the patch is by no means comprehensive - you should audit the entire file for space
	problems e.g. suppose $HOME had a space in it.

	> Support Requests item #1039909, was opened at 2004-10-04
	> https://sourceforge.net/tracker/?func=detail&atid=457448&aid=1039909&group_id=49784

	* src/base/dev/misc/timers.c:
	+debug

	* src/base/init/config.c:
	fix crash with -h0 and "auto" keytable; IIRC, we have lots of problems with
	dump_config_status() printing before vars have been initialised

	* src/: base/async/dyndeb.c, plugin/X/X.c:
	Unbreak -DX when not invoking executable as "xdos"
	"Unknown debug-msg mask: X"

	It is bogus putting register_debug_class later than config_init()
	as usage() won't show -DX - we're not going to reuse letters anyway
	(we have lots of spare letters and it would be confusing otherwise).

	I would say the same about "./src/plugin/translate/translate.c:    
	register_debug_class('u', 0, "Unicode translation");"
	but unfortunately but it's called earlier than even dyndeb.c:init()
	so not sure if safe to move into there as well.

	* src/base/async/dyndeb.c:
	-double break

	* src/base/mouse/mouse.c:
	stop crash on early leavedos of 'dosemu -U <not a pipe>'

	* dist/mkbindist:
	spel

	* INSTALL:
	too many people ask about x86/64

2005-07-05  Bart

	* src/: base/mouse/mouse.c, include/mouse.h, plugin/X/X.c,
	  plugin/X/X.h, plugin/kbd_unicode/include/keyb_clients.h,
	  plugin/sdl/sdl.h, plugin/term/env_term.h:
	Fix gcc-4.0 build; make some more client structures static.

2005-07-05  Stas

	* src/arch/linux/mapping/mapping.c:
	Fix SIGSEGV when $_mapping set to a wrong value, make dosemu to
	promptly terminate instead.

	* src/dosext/dpmi/msdos.c:
	cosmetic

2005-07-04  Bart

	* src/: base/async/int.c, base/bios/int10.c, base/mouse/mouse.c,
	  env/video/vgaemu.c, env/video/video.c, include/memory.h,
	  include/vgaemu.h, include/video.h:
	Cleaned up int10 cursor positioning code, eliminated some global variables,
	and use BIOS variables more often.

	* src/: emu-i386/ports.c, env/video/vc.c:
	Re-enabled VID_IO and SPECIAL_IO stuff. It's in the wrong place, but
	necessary for console mode without direct port access. Graphical mouse
	cursors still work.

	* src/env/video/crtcemu.c:
	Reverted MODE_CONTROL CRT init change for now.

2005-07-03  Bart

	* src/plugin/X/X_keymaps.c:
	Add forgotten file X_keymaps.c

	* src/: base/bios/int10.c, env/video/vgaemu.c:
	Fix two bugs in terminal mode: int10/ah=0 should set the video memory start
	address and we need to force a mode even if vga.text_width > 80.
	Fixes #1231686

	* configure, configure.ac, src/base/misc/utilities.c,
	  src/base/mouse/Makefile, src/base/mouse/mouse.c,
	  src/base/mouse/mouse_gpm.c, src/base/serial/ser_init.c,
	  src/include/config.h.in, src/plugin/gpm/Makefile,
	  src/plugin/gpm/mouse_gpm.c, src/plugin/term/mouse_xterm.c,
	  src/plugin/term/term_core.c:
	Moved GPM mouse support to a shared-object plugin of its own.
	Now the base dosemu.bin only depends on GLIBC libraries.
	Added logic in mouse_gpm.c to deal with different binary-incompatible
	versions of GPM.

	* Makefile.conf.in, configure, configure.ac,
	  src/base/misc/utilities.c, src/base/mouse/mouse.c,
	  src/env/video/dualmon.c, src/env/video/video.c,
	  src/include/config.h.in, src/include/mouse.h,
	  src/include/video.h, src/plugin/X/X.c,
	  src/plugin/kbd_unicode/dosemu_keys.c,
	  src/plugin/kbd_unicode/keyb_clients.c,
	  src/plugin/kbd_unicode/keyb_none.c,
	  src/plugin/kbd_unicode/include/keyb_clients.h,
	  src/plugin/sdl/Makefile, src/plugin/sdl/sdl.c,
	  src/plugin/term/Makefile, src/plugin/term/keyb_slang.c,
	  src/plugin/term/mouse_xterm.c, src/plugin/term/term_core.c:
	Convert terminal plugin into a shared object.
	Introduce a system to register mouse and keyboard clients instead of
	direct assignments -- they now form a linked list instead of an array.

2005-07-02  Stas

	* src/doc/HOWTO/EMUfailure.sgml:
	From Ryan Underwood:
	PIT acronym is expanded wrong in documentation.

	* src/arch/linux/dosext/sound/midid/Makefile:
	Patch from Ryan Underwood:
	Make midid obey make configuration if it is being built in-tree.

2005-07-02  Bart

	* Makefile.conf.in, configure, configure.ac,
	  src/base/init/config.c, src/base/misc/utilities.c,
	  src/include/config.h.in, src/include/utilities.h,
	  src/plugin/X/Makefile, src/plugin/X/X.c, src/plugin/X/keyb_X.h,
	  src/plugin/kbd_unicode/keymaps.c:
	Convert the X plugin to a shared object.

	* src/: dosext/dpmi/dpmi.c, emu-i386/do_vm86.c,
	  emu-i386/simx86/codegen-arch.c, emu-i386/simx86/codegen-sim.c,
	  emu-i386/simx86/codegen-x86.c:
	Remove X_GRAPHICS #if's.

	* src/plugin/sdl/: keyb_SDL.c, mouse_SDL.c, sdl.c:
	Use <SDL.h> instead of <SDL/SDL.h> in #include. Part of SR #1230661

	* compiletime-settings, compiletime-settings.devel, src/emu.c,
	  src/base/async/dyndeb.c, src/base/init/config.c,
	  src/base/mouse/mouse.c, src/base/speaker/Makefile,
	  src/base/speaker/X_speaker.c, src/env/video/Makefile,
	  src/env/video/X.c, src/env/video/X.h, src/env/video/screen.c,
	  src/env/video/screen.h, src/plugin/X/Makefile, src/plugin/X/X.c,
	  src/plugin/X/X.h, src/plugin/X/X_keysyms.c,
	  src/plugin/X/X_speaker.c, src/plugin/X/keyb_X.c,
	  src/plugin/X/keyb_X.h, src/plugin/X/keyb_X_keycode.c,
	  src/plugin/X/screen.c, src/plugin/X/screen.h,
	  src/plugin/kbd_unicode/Makefile, src/plugin/kbd_unicode/keyb_X.c,
	  src/plugin/kbd_unicode/keyb_X.h,
	  src/plugin/kbd_unicode/keyb_X_keycode.c,
	  src/plugin/kbd_unicode/keyb_clients.c,
	  src/plugin/kbd_unicode/keymaps.c,
	  src/plugin/translate/charsets/X_keysyms.c:
	Converted the X files into a plugin.

	* Makefile.conf.in, compiletime-settings,
	  compiletime-settings.devel, default-configure,
	  src/arch/linux/Makefile.main, src/base/init/config.c,
	  src/base/misc/utilities.c, src/base/mouse/mouse.c,
	  src/include/utilities.h, src/plugin/kbd_unicode/keyb_clients.c,
	  src/plugin/sdl/Makefile, src/plugin/sdl/Makefile.conf.in,
	  src/plugin/sdl/configure, src/plugin/sdl/configure.ac,
	  src/plugin/sdl/sdl.c, src/plugin/sdl/include/sdl_config.h.in:
	Convert the SDL plugin into a real dynamically loaded plugin.
	This allows binary distributions to not depend on libsdl; you only need it
	if you specify -S.

	* src/env/video/crtcemu.c:
	Need to adjust CFG_MODE_CONTROL too, in CRTC_init.

	* src/base/bios/int10.c:
	Removed int10_old, and merged some differing pieces with int10_new.

2005-07-01  Stas

	* etc/global.conf:
	Add $_vbios_file to global.conf.

	* src/dosext/dpmi/: dmemory.h, dpmi.c, dpmi.h, memory.c, msdos.c:
	Hopefully the last "huge cleanups" part.
	- Completed the msdos.c separation by not accessing any of the
	dpmi.c variables directly, use the DPMI API instead.
	- And there seem to be the off-by-one bugs that the segment
	limits were used as a length without +1, fixed.
	- Cleaned up the memory.c API again.
	With this state of affairs I was able to resync my DJGPP port
	of msdos.c rather quickly, so I think the code is now "clean enough".

2005-06-30  Stas

	* src/dosext/dpmi/dpmi.c:
	Cleaned up the hack a little.

	* src/: base/async/int.c, dosext/dpmi/dpmi.c, include/int.h:
	First pass on introducing the Windows Hack (tm) that will allow
	to run the DPMI apps in a Windows Standard mode DOS prompt (hence
	eliminating the need for the DOS prompt support in an Enhanced mode).
	Now running the DPMI in DOS prompt apps is possible, but an attempt
	to switch back to Windows before the DPMI app terminates, will crash.

	* src/dosext/dpmi/: dmemory.h, dpmi.c, dpmi.h, memory.c, msdos.c,
	  msdos.h:
	Next round of the "huge cleanups":
	- Separated memory.c from dpmi.c by passing the root of the memory
	list as a parameter to all the memory.c functions.
	- The DPMI state structure can now be static.
	- Made msdos.c to not use memory.c directly - it now tracks the
	memory allocations itself, as it should under real DOS (backported
	the appropreate code from my DJGPP playground). This is not very
	effective under dosemu, but this is the only possible way under
	real DOS, and is also now unavoidable because msdos.c doesn't any
	longer have the root of the memory list to pass to the memory.c API.
	- Unfortunately the memory.h name is already taken, so the added
	header is called dmemory.h :(

2005-06-29  Stas

	* src/dosext/dpmi/: dpmi.h, msdos.c, msdos.h:
	- All the msdos.c data can now be static
	- Remove the unused variable on which gcc4 complains it is used uninitialized

	* src/: dosext/dpmi/dpmi.c, dosext/dpmi/dpmi.h,
	  dosext/dpmi/msdos.c, dosext/dpmi/msdos.h, base/bios/bios.S,
	  include/bios.h:
	Next step in separating dpmi.c/msdos.c. dpmi.c no longer accesses
	the state struct of the API translator, but it now calls its
	hooks directly, while normally the translator should register
	that hooks via the DPMI API. This will, however, add an extra
	context switches under dosemu, so the current state is probably
	the most adequate for dosemu. A few extra hooks should not be
	a big problem for the DJGPP port either.

	* src/dosext/dpmi/: dpmi.c, dpmi.h, memory.c, vxd.c:
	- Remove the pre-client DPMI_SEL selector. It doesn't need to be
	per-client, we only have to be care to provide the 16bit and 32bit
	version of it separately. This way vxd.c no longer accesses the
	DPMI state structure directly.
	- Moved dpmi_setup() from memory.c to dpmi.c and make it to
	allocate the above two selectors.
	- Made LDT_ALIAS and PMSTACK_SEL really per-client this time
	(the old code that inherits them was forgotten to remove).

2005-06-28  Bart

	* src/: env/video/attremu.c, env/video/crtcemu.c,
	  env/video/gfxemu.c, env/video/miscemu.c, env/video/render.c,
	  env/video/vesa.c, env/video/vgaemu.c, include/vgaemu.h:
	Allow loading the Bochs BIOS (very experimental).
	VGAEMU fixes so that it can change modes. It works with standard VGA modes,
	not VESA modes. You can use it by using a command line option such as
	-I 'video { vga vbios_file /usr/share/vgabios/vgabios.bin }'

	* src/env/video/instremu.c:
	Fix typos

	* src/env/video/instremu.c:
	Allow instremu to work with read-only code.

2005-06-28  Stas

	* src/dosext/dpmi/dpmi.c:
	Moved env restoration to the better place (after the RSP stuff is
	finished).

	* src/dosext/dpmi/: dpmi.c, dpmi.h, msdos.c, msdos.h:
	Some large cleanups:
	- First step at separating the API translator from DPMI. msdos.c
	now has its own state structure, all the translator-related stuff
	moved there from the DPMI structure. msdos.c no longer accesses
	the DPMI structure, but the dpmi.c still accesses the translator
	structure - this can't be addressed without a big functionality
	changes.
	- Cleaned up old_dos_terminate() to make Clarence happy
	- Some cleanups in ConvertSegmentToDescriptor and friends.

2005-06-27  Stas

	* src/env/video/seqemu.c:
	Fix the regression with the Trident code to make Windows happy.

2005-06-26  Bart

	* etc/dosemu.conf, etc/global.conf, src/base/init/parser.y.in,
	  src/base/mouse/mouse.c, src/base/serial/ser_init.c:
	Some fixes to get the mouse back to work in X when $_mouse_dev happens to
	be set to "com1". Avoid talking about X/xterm for $_mouse_dev: it is
	irrelevant for those two.
	Fix a related potential SIGSEGV in the parser.

	* src/base/async/int.c:
	Install a hook function for LFNs via f000:0210 using the new split
	interrupt_function functionality. This fixes bug #1211627.

	* src/base/async/int.c:
	Split the interrupt_function array into two sets, one for revectored
	ints and one for non-revectored ints. This allows using a real DOS mouse
	driver without flipping function pointers, and also repairs
	$_mouse_dev="com1".

	* src/: dosext/dpmi/msdos.c, env/video/instremu.c:
	Use instremu to decode certain segment modifying instructions in msdos.c

	* src/dosext/dpmi/msdos.c:
	Added 32-bit address decoding. Maybe some of this can be merged with
	instremu later. Fixes bug #1227378

2005-06-25  Stas

	* src/: emu.c, env/video/vc.c, plugin/kbd_unicode/keyb_raw.c,
	  base/dev/misc/timers.c, include/emu.h:
	Lets remove the do_ioctl then, sorry for the typo bug...

	* src/dosext/dpmi/dpmi.c:
	Use-after-free detected by smalloc.

	* src/: include/smalloc.h, include/utilities.h, base/misc/lowmem.c,
	  base/misc/smalloc.c, base/misc/utilities.c:
	- Shuffled the assertions in smalloc, since I've seen it asserted.
	- Added the error handling, now all the memory violations will be
	logged with a stack trace.

	* src/base/: bios/int16.c, misc/ioctl.c:
	Adjustments to the hogthreshold code in a hope to address those
	ramblings in an ML.

2005-06-25  Bart

	* src/: dosext/mfs/mangle.c, dosext/mfs/mangle.h, dosext/mfs/mfs.c,
	  dosext/mfs/util.c, env/video/X.c, env/video/X.h,
	  env/video/text.c, include/emu.h, include/mouse.h,
	  plugin/translate/make_attributes.c:
	Removed now-dead non-unicode variations for MFS and X copy/paste.

	* src/: env/video/console.c, env/video/hgc.c, env/video/vc.c,
	  env/video/vga.c, env/video/vga.h, env/video/video.c,
	  include/video.h:
	Console code cleanups.

2005-06-24  Bart

	* src/: base/async/int.c, base/bios/int10.c, base/mouse/mouse.c,
	  base/mouse/mouse_gpm.c, env/video/X.c, env/video/console.c,
	  env/video/crtcemu.c, env/video/dualmon.c, env/video/hgc.c,
	  env/video/text.c, env/video/vc.c, env/video/vgaemu.c,
	  env/video/video.c, include/memory.h, include/video.h,
	  plugin/sdl/sdl.c, plugin/term/mouse_xterm.c,
	  plugin/term/terminal.c:
	Eliminate the two-letter global variables "co" and "li".

	* src/include/emu.h:
	Fix do_ioctl macro. Why not simply remove it by the way?

2005-06-23  Stas

	* src/dosext/dpmi/dpmi.c:
	Fix DPMI RSP functionality which was ruined by the base_addr stuff.

2005-06-22  Bart

	* src/env/video/text.c:
	Turn off the visible selection if anything in it changes (not just the
	attribute but also text), so that *if* something is selected it matches
	what is pasted when you press the middle mouse button.

2005-06-21  Bart

	* src/env/video/: X.c, text.c:
	Fix cursor position with fonts that are 8 pixels high.
	Fixes #1206525: 1.3.2: text mode cursor uses only upper half of cell @80x50

2005-06-21  Stas

	* src/: dosext/net/net/libpacket.c, include/pktdrvr.h,
	  dosext/net/net/pktnew.c:
	Minimal receive mode support for packet driver. Completely untested...

	* src/: emu.c, arch/linux/async/signal.c, base/async/int.c,
	  base/misc/dos2linux.c, base/misc/ioctl.c, env/video/vc.c,
	  include/emu.h:
	Remove the ancient (unused) ioctl queueing code.

2005-06-20  Bart

	* src/env/video/text.c:
	No selection area is shown if the DOS app changed the colours itself.
	Fixes #1206137.

	* src/: include/video.h, plugin/term/terminal.c:
	Terminal code:
	* blinking instead of back background should be set to "blink" at boot time
	* split up utf8 and 8bit character update routines for sanity
	* change The_Charset property that signals an ACS character
	* for Slang 1 in 8bit mode we can't use ACS if blinking is on
	* fix attribute 0
	* for (patched) SLang 1, SLtt_Use_Blink_For_ACS is always set in UTF8 mode,
	  and in 8 bit mode depends on the bright background setting.
	  This fixes a new bug with Norton Utilities.

2005-06-12  Stas

	* src/base/async/int.c:
	Set 0x66 ivec to IRET only when Windows is detected, as some
	programs expects it to be NULL (bug #1218406)
	INT_OFF(0x68) is where we have an IRET (hack) - INT_OFF(0x66) didn't
	have one.

2005-06-04  Stas

	* src/base/mouse/mouse.c:
	Remove the *2 Y multiplication from the PS2 code. It looks
	more like we need to devide it by 2, not multiple.
	The real problem (as it seems to me) is that we do not implement
	the sensitivity options for PS2 interface, and use the int33
	speed settings instead, which is completely bogus. One have to
	add the sensitivity settings for the PS2 pointer.

2005-05-31  Stas

	* src/plugin/kbd_unicode/serv_backend.c:
	Use the bios's keyboard modifiers instead of always relying on the
	internal ones. (bug #1207940)

2005-05-29  Stas

	* src/dosext/dpmi/msdos.c:
	From Japheth: added the translation of int21/ah=43h and ax=71a0h
	Make int21/ah=0 use ah=0x4c to work around some bugs in ms-dos.
	Path from Japheth.

2005-05-26  Stas

	* src/base/async/int.c:
	This works faster.

2005-05-25  Stas

	* src/emu.c:
	Reset fatalerr to 0 in leavedos() to allow the do_call_back() to do
	its final work.

	* src/: base/mouse/mouse.c, base/mouse/mouseint.c, env/video/X.c,
	  include/mouse.h:
	Fixed a diabolical rounding errors in mouse_move_relative(). That
	allowed to remove the hacks with Y coord multiplication, which, in
	turn, should fix all the recent and old sensitivity problems. Lets see.

	* src/: dosext/drivers/cdrom.c, plugin/commands/commands.c:
	- Resetting/reopening cdrom before ejecting helps to eject it more
	reliably.
	- Implemented "eject -t" for closing the tray.

2005-05-24  Stas

	* src/base/mouse/mouse_gpm.c:
	gpm-mouse can lock up dosemu if Gpm_GetEvent() is called on a
	non-blocking fd when there is no data - it then returns the
	random values in a mouse coords, which leads to bad results.
	Added the select() check to avoid the problem.

	* etc/dosemu.conf:
	Some fixes to dosemu.conf. Comments mainly, but also enabled the
	$_lfn_support. Any reasons why it was disabled?

2005-05-23  Stas

	* src/dosext/drivers/cdrom.c:
	Use O_NONBLOCK for cd-rom, that makes eject to work more reliably.
	(suggested by Robert Komar)

	* src/: dosext/drivers/cdrom.c, plugin/commands/commands.c:
	Make eject.com to print some diagnostic on failures.

	* src/env/video/X.c:
	Use the modes with the highest dotclock rates.

2005-05-20  Bart

	* ChangeLog:
	Update ChangeLog with last changes.
2005-05-20  Bart

	* NEWS, src/env/video/vga.c:
	gcc warning; set date in NEWS

	* (almost all files)
	It's 2005 this year.

	* NEWS, doc/EMUfailure.txt, doc/README.txt, man/dosemu.1.in,
	  man/dosemu.bin.1.in, src/doc/HOWTO/EMUfailure.sgml:
	Documentation updates. Mostly grammatical stuff, and a clarification
	about framebuffer consoles: it was possible before with some video cards
	(e.g. SiS) but with others only with major problems (needing fbset after
	exitemu, not being able to switch consoles and then go back etc).

	* configure:
	Regenerated

	* etc/dosemu.conf, src/commands/ems.S:
	Soften language about external XMS drivers a bit. No need to rush
	dosemu-freedos users at the moment since the only known problematic
	program is MS MEM.

2005-05-20  Stas

	* NEWS:
	No need to mention svgalib since it doesn't work very well yet
	(lacks one small fix in svgalib), but mention the fact that dosemu
	can be started from under the fbcon.

	* NEWS:
	Some more news added. But do not mention tasmx since it was just a
	regression at some point after all (2005-02-24 namely)

	* configure.ac:
	Cosmetic about the svgalib detection.

2005-05-19  Bart

	* ChangeLog, NEWS, VERSION:
	NEWS and ChangeLog updates for 1.3.2.

2005-05-10  Bart

	* src/dosext/misc/xms.c:
	Fix the XMS_RET() macro; and making it a function is more efficient.
	Added some comments to hopefully make sure the same bugs don't creep in
	again. This fixes Aladdin's issues with XMS.

2005-05-09  Bart

	* src/base/misc/fatfs.c:
	Don't scan files on fatfs drives for FreeDOS, as this DOS has these
	drives redirected early enough for int13 never to be necessary.
	This can save quite a bit of startup time.

	* src/: base/async/int.c, dosext/mfs/mfs.c, include/redirect.h:
	If the CDS changes, try to redirect any fatfs drives that did not fit in
	the CDS before. This may happen when FreeDOS changes LASTDRIVE from
	config.sys, and more than 4 fatfs drives are defined.

2005-05-08  Bart

	* etc/dosemu.alias, etc/vga10x24.bdf, etc/vga12x30.bdf,
	  etc/vga8x19.bdf, src/arch/linux/Makefile.main:
	Added some more vga fonts, which more or less match 640x480, 800x600
	and 1024x768 resolutions. Thanks to Martin Reuber, OFD Kiel,
	German Fiscal Administration

2005-05-06  Stas

	* src/env/video/: vga.c, vbe.c:
	- Make do_int10_setmode() to do something more than just locking up
	the video bios.
	- Disabled the "special memory mode" - Matrox G550 doesn't honour
	the bit15 (even for that mode!), so the memory was cleared before
	saving. By the way, Matrox can handle our banked saving/restoring
	very well, but Radeon 7500 miserably fails on our bankswitching code.
	- Disabled the "set mode before restore" hack - that never worked
	because of the both the above bugs, it only makes problems.
	- Restoring the ext regs is necessary after saving/restoring the video
	memory (well, without using the "special memory mode" it may not be
	necessary, but I added it to stay safe).

	This makes the console VESA driver pretty much usable.

	* src/dosext/dpmi/msdos.c:
	Really fix int21h/ah=38h this time! tasmx is now finally... yuck

2005-05-05  Stas

	* etc/dosemu.conf, src/include/emu.h, src/include/vc.h,
	  src/env/video/avance.c, src/env/video/cirrus.c,
	  src/env/video/matrox.c, src/env/video/s3.c, src/env/video/sis.c,
	  src/env/video/vbe.c, src/env/video/vga.c:
	Fixed some bugs with $_vmemsize, made it to accept (auto) and (off),
	defaulted to 4096 to make the console switching faster.

2005-05-05  Stas

	* src/arch/linux/dosext/sound/midid/: device.c, device.h, timid.c:
	Cosmetics and gcc-4 warning fixes.

2005-05-04  Stas

	* src/env/video/: svgalib.c, vbe.c:
	Cosmetic.

	* src/: include/debug.h, emu.c:
	Make the gdb stacktracer interface globally available.

	* src/emu-i386/do_vm86.c:
	This sanity check made problems.

2005-05-02  Stas

	* src/env/video/X.c:
	$_X_fixed_aspect can work for the text modes too.

2005-05-02  Bart

	* src/plugin/sdl/include/sdl_config.h.in:
	Added forgotten file sdl_config.h.in

2005-05-01  Bart

	* configure, configure.ac:
	Re-fix auto setting for target-cpu.
	Use -Wno-pointer-sign for gcc-4.0 to avoid obscuring really useful warnings
	for now.

	* src/plugin/sdl/Makefile:
	Fix makefile in previous commit.

	* src/plugin/sdl/: Makefile, configure, configure.ac,
	  config/plugin_config.h, config/plugin_config.h.in:
	Use include/sdl_config.h[.in] included in config/plugin_config.h just like the
	kbd_unicode plugin does. This avoids the "mkpluginhooks-before-configure"
	problem.

	* configure, configure.ac, default-configure:
	#1118031: --target_cpu should be --with-target-cpu or it doesn't work.

	* src/dosext/mfs/mfs.c:
	Let MFS "commit" return TRUE if fsync was successful (it was reversed).
	Happens to fix the problem with Word's "disk is full" message.

2005-05-01  Stas

	* etc/dosemu.conf, src/base/serial/ser_init.c:
	tty locking can be disabled by $_ttylocks=""

2005-05-01  Bart

	* etc/global.conf, src/plugin/kbd_unicode/config/plugin_parser:
	Fix #1110543 Custom keyboard layout
	The underlying foreach parser problem is still a mystery, but as long the
	keytables work...

	* compiletime-settings, compiletime-settings.devel,
	  compiletime-settings.help, configure, configure.ac,
	  default-configure, src/arch/linux/async/signal.c,
	  src/base/mouse/mouse.c, src/env/video/console.c,
	  src/env/video/dualmon.c, src/env/video/video.c,
	  src/include/config.h.in, src/include/video.h,
	  src/plugin/kbd_unicode/dosemu_keys.c,
	  src/plugin/kbd_unicode/keyb_clients.c,
	  src/plugin/term/terminal.c:
	Remove the S-Lang plugin. DOSEMU now cooperates nicely with all SLang
	libraries that are present in Linux distributions, so it is no longer
	necessary. Made a comment about some minor issues with the various
	library versions in existence.
	If no slang-devel library is installed, DOSEMU can now compile without
	terminal support.

	* doc/README.gdb:
	correct typo

	* src/: plugin/term/Makefile, plugin/term/mouse_gpm.c,
	  base/mouse/Makefile, base/mouse/mouse_gpm.c:
	Move mouse_gpm.c from src/plugin/term to src/base/mouse.

	* configure, src/include/config.h.in:
	Regenerate autoconf files.

2005-04-29  Stas

	* src/dosext/dpmi/msdos.c:
	Further fixes for translation of int21h/ah=38h and 5dh

	* src/base/mouse/mousevid.c:
	for text modes too.

	* src/dosext/mfs/mfs.c:
	Debug msg.

	* src/: base/bios/int10.c, base/mouse/mousevid.c,
	  env/video/vgaemu.c, include/vgaemu.h:
	- Fixed 40h:4eh bios value (current video page start)
	- Made the gfx-cursor code to take that value into an account
	(works in Orbits3 properly now)
	- Disabled the X-specific code for gfx-cursor. This can introduce
	the regressions, but as the gfx-cursor for X was added just a few
	days ago (what was that X-specific code then, if there wasn't a
	gfx-cursor under X before?), the regressions on it are not a problem.

	* src/dosext/mfs/mfs.c:
	Off-by-one error in MFS code causes lock-ups (bug #1189666)

2005-04-27  Stas

	* src/dosext/dpmi/msdos.c:
	Fixed int21h/ah=38h translation to get tasmx to work. Yes, tasmx
	used to work sometime in the past, but the bug was always there,
	so it couldn't work properly.
	Also fixed 2 gcc4 warnings.

2005-04-26  Stas

	* src/env/video/X.c:
	Fullscreen mode can now always enable mouse grab.

	* src/base/: init/lexer.l.in, init/parser.y.in, misc/disks.c:
	Applied patch #845119 - 2.8M floppy support.
	The patch was there for 1.5year already - enough!

	* src/: env/video/instremu.c, env/video/vgaemu.c, include/vgaemu.h:
	Moved instremu to the new vga helpers, Logical_VGA_xxx can now be static.

	* src/: include/vgaemu.h, base/mouse/gcursor.c, base/mouse/mouse.c,
	  env/video/vgaemu.c:
	- Added the vga memory access helpers
	- Moved gfx-cursor code to use that helpers
	- Enabled the gfx mouse cursor code under X

	GFX mouse cursor now works under X!

2005-04-24  Stas

	* src/arch/linux/dosext/sound/linux_sound.c:
	Fix recent small regression with sound code (kryptegg works again)

	* src/env/video/vc.c:
	Remove unused (and crap) DUMP_VIDEO

	* src/base/mouse/: gcursor.c, mouse.c:
	Another small step towards the gfx mouse cursor under X.

	* src/env/video/svgalib.c:
	Trying to resurrect the svgalib support.
	It really works much faster than our VESA driver (due to the
	use of the native driver) but it doesn't save the video memory,
	so there may be some problems.

	* configure.ac:
	Added proper svgalib checks. New svgalibs are better, but we can't
	even link the old ones in.
	But not enable it for now - svgalib still misses one very small
	patch that I forgot to submit, and so it crashes, damn. Will have
	to wait for the next version again :(((

	* src/include/vc.h:
	Increase MAX_X_REGS as per the new svgalib.

	* src/env/video/: vc.c, vga.c:
	Disable dump_video(). It can crash if the MAX_X_REGS of dosemu
	mismatches with MAX_REGS of svgalib.

2005-04-20  Stas

	* src/emu-i386/ports.c:
	set_ioperm() should also set the std-handler. This allows the dosemu
	code to call port_outb/port_inb even for the iopermed ports, and the
	real I/O will occur. This is necessary for the mouse gfx code to work
	under X.
	Also disabled HANDLE_VID_IO and HANDLE_SPECIAL. They prevented the
	above code from working and also these features looks completely
	broken and useless.

2005-04-19  Stas

	* src/base/init/: config.c, parser.y.in:
	Repair $_rdtsc

2005-04-17  Stas

	* src/arch/linux/dosext/sound/midid/timid.c:
	Increase timidity timeout from 1 to 3 seconds - timidity is slow
	these days.

	* etc/dosemu.conf, etc/global.conf, src/include/emu.h,
	  src/arch/linux/dosext/sound/linux_sound.c,
	  src/arch/linux/dosext/sound/linux_sound.h,
	  src/base/init/config.c, src/base/init/lexer.l.in,
	  src/base/init/parser.y.in:
	Added the option to control the direct DAC write frequency for OSS.
	No longer need to hack linux_sound.h

	* src/: base/mouse/mouse.c, include/memory.h:
	Moved Mouse_INT_OFF to memory.h and adjusted it instead of changing
	the segment (Stas wake up and stop stumbling around the mouse code!)

	* src/base/mouse/mouse.c:
	Mouse_INT now requires BIOSSEG.

	* src/: env/video/X.c, base/mouse/mouse.c, base/mouse/mouseint.c,
	  plugin/sdl/mouse_SDL.c:
	Enable the native mouse cursor by default (to stay compatible), and
	the X and SDL frontends disable it manually.
	Also "raw" mouse needed the *2 for Y coordinate too. I don't know
	why, maybe the screen resolution is not taken into an account somewhere.

2005-04-16  Stas

	* src/: base/mouse/mouse.c, include/mouse.h:
	Move "native_cursor" to config.mouse, where it actually should be.

	* src/: env/video/X.c, plugin/sdl/mouse_SDL.c:
	X and SDL frontends were erroneously overriding the mouse sensitivity
	values. Also teached X.c about the 2:1 resolution. Native mouse cursor
	now have the proper speed.

	* src/base/mouse/mouse.c:
	Native cursor state should survive save/restore.

	* src/include/memory.h:
	Set 0x33 ivec (mouse) not to 0xf000 segment, as some programs (td)
	are refusing to use it in that case, and the offset should not be 0 too.
	(bug #818094 of myself)

2005-04-15  Stas

	* src/: env/video/X.c, base/mouse/mouse.c, include/mouse.h:
	Enable the native cursor code. Used under X only for now (not for SDL,
	for example). (RFE #1079033 of my own)

	* src/env/video/X.c:
	Disable the selection ability when mouse grab is enabled.

2005-04-14  Stas

	* src/env/video/: X.c, render.c, vbe.c, vga.c:
	Abort dosemu on the fatal video errors instead of having the blank screen.

2005-04-12  Stas

	* src/env/video/X.c:
	Added keyboard grab - hardcoded to Ctrl-Alt-k for now.

	* src/env/video/X.c:
	Remove some ancient code.

2005-04-09  Stas

	* src/: emu-i386/ports.c, base/dev/misc/joystick.c,
	  base/init/parser.y.in:
	Dont try to register the joystick if it is disabled/unavail. (SR #1178900)

2005-04-05  Stas

	* src/env/video/: crtcemu.c, seqemu.c:
	Previous patch needed this too.

	* src/env/video/: crtcemu.c, seqemu.c:
	Kill the optimization that optimizes nothing.

2005-04-04  Stas

	* src/env/video/X.c:
	Handle the unlikely case of the miltiple KeyRelease events.

	* src/dosext/dpmi/dpmi.c:
	This keyboard hack is no longer needed.

	* src/env/video/X.c:
	Filter out the fake X KeyRelease events of the autorepeat keyboard mode.
	This fixes bug #1113468, all the recent keyboard regressions, and the
	number of the old keyboard bugs too.
	There are lots of hacks all around dosemu that were trying to work
	around that problem with the different level of success. They all now
	have to be located and removed.

2005-04-01  Stas

	* etc/global.conf:
	Set $BEING_ON for X too.

2005-03-28  Stas

	* src/plugin/commands/commands.c:
	generic.com should print something usefull too.

2005-03-27  Stas

	* src/plugin/commands/unix.c:
	Nah, use-after-free on error path.

2005-03-26  Stas

	* src/plugin/commands/unix.c:
	Fixes to unix builtin:
	- Dont strip the trailing slashes for the DOS directory path, as this
	path may consist of only that slash (second part of #1152829)
	- Dont terminate if the linux path we wanted to execute, doesn't exist.
	For the DOS path, figuring out the existance is more difficult, so left
	as is for now.

	* src/plugin/commands/builtins.c:
	Small cleanup.

	* src/emu-i386/: cpu.c, ports.c:
	Enlarge line buffer for proc scans, remove smiley ":)" from asm
	constraints (lets put smiles in a comments, not in the code:)

	* src/base/serial/ser_ports.c:
	Update the MSR status before reading it - should make the serial more
	robust.

	* src/base/dev/misc/rtc.c:
	Properly initialize date in cmos. "bios" timesource should now be
	quite usable.

	* src/base/dev/misc/rtc.c:
	Multiple bugs with date in RTC.

2005-03-22  Stas

	* src/include/dos2linux.h, src/base/misc/dos2linux.c,
	  src/plugin/commands/unix.c, src/base/misc/utilities.c,
	  etc/dosemu.conf:
	Fixed (and re-enabled) the terminate-after-execute feature (bug #1152829).
	Also some minor adjustments/leftovers.

2005-03-21  Stas

	* src/base/misc/utilities.c:
	/proc/self/maps can contain lines longer than 100 chars, causing DPMI
	to fail (old bug btw).

	* etc/dosemu.conf:
	0x40000000 for the $_dpmi_base was a bad choise for the non-flexmmap
	kernels. 0x10000000 looks safer.

2005-03-20  Stas

	* src/base/async/int.c:
	Calling io_select() is too expensive, dont do it more than 1000 times
	per second (a cheap fix for the keen4 lockups, but it is still too slow).

	* src/base/mouse/mouse.c:
	This improves the mouse responsiveness a lot.

	* src/base/mouse/mouse.c:
	Repair the mouse too.

	* src/: arch/linux/dosext/sound/linux_sound.c,
	  arch/linux/dosext/sound/linux_sound.h, dosext/sound/sound.c,
	  include/sound.h:
	This should make the sound recording to work properly (bug #1074310,
	was not confirmed)

	* src/doc/HOWTO/EMUfailure.sgml:
	This was fixed.

	* etc/dosemu.conf:
	Set $_X_aspect_43 to (off), as we agreed, AFAIR.
	This fixes z80s emulator visual artifacts, and many games too.

	* src/base/dev/pic/pic.c:
	Remove the PIC recursion.
	This will probably break everything again, but at least the keyboard
	should survive.

	* src/plugin/kbd_unicode/serv_backend.c:
	Preparing (again) the keyboard code for the removal of the PIC
	recursion. We have to simulate the proper delay between the chars,
	otherwise the nasties races are happening, and whatever is typed,
	gets doubled (bug #1037915).
	Set the emulated kbd clock frequency to 27.5KHz (that is, actually,
	after the set2->set1 translation of 8042; the real frequency may
	be slightly different).
	I hope this is the last implicit dependancy the keyboard code had
	to the PIC code. If all the other subsystems have so many too, then
	we'll be in a big troubles:)

2005-03-18  Stas

	* etc/dosemu.conf, etc/global.conf, src/base/init/config.c,
	  src/base/init/init.c, src/base/init/lexer.l.in,
	  src/base/init/parser.y.in, src/base/misc/utilities.c,
	  src/dosext/dpmi/dpmi.c, src/dosext/dpmi/dpmi.h,
	  src/dosext/dpmi/memory.c, src/include/emu.h,
	  src/include/utilities.h:
	Introduce the $_dpmi_base option which allows to choose the address
	of a DPMI memory pool. The problem with the dynamic allocation is
	that some programs can't handle the bit 31 in the pointers, and that's
	what being set now in the recent 2.6 kernels.
	Fixes Mortal Kombat 2 and SerfCity game saving (bug #1164054)

2005-03-17  Stas

	* src/base/async/int.c:
	Returned the old mouse hack of mine instead of the (currently disabled
	anyway) Bart's one. This fixes the mouse for SerfCity game, makes the
	mouse pointer to be syncronized at startup again, and (hopefully)
	removes the possibility of a crash when the DOS sets int33 to some crap.
	This doesn't allow to call into an external mouse driver, but thats
	a useless feature anyway.

	* src/doc/HOWTO/EMUfailure.sgml:
	Updated to reflect the current state of affairs.

2005-03-16  Stas

	* src/: base/init/init.c, plugin/kbd_unicode/include/keyb_server.h,
	  plugin/kbd_unicode/serv_8042.c,
	  plugin/kbd_unicode/serv_backend.c:
	More work on preparing the keyboard code for the PIC recursion removal.

	* src/base/dev/pic/pic.c:
	Remove the now harmfull sanity check from pic_request(). This should
	fix most of the breakages of the previous commit.

2005-03-06  Stas

	* src/plugin/commands/: Makefile, blaster.c, blaster.h, commands.c:
	New helper: blaster.com. Sets the BLASTER and MIDI variables accordingly
	to the dosemu configuration.
	Patch from Ryan Underwood, #1157059.

2005-03-05  Stas

	* src/plugin/kbd_unicode/keymaps.c:
	Fix problem with '<' key in non-keycode mode (bug #818145)

2005-03-02  Stas

	* src/: arch/linux/async/signal.c, base/dev/misc/rtc.c,
	  base/dev/misc/timers.c, base/dev/pic/pic.c, base/init/init.c,
	  base/mouse/mouse.c, base/serial/ser_defs.h,
	  base/serial/ser_irq.c, dosext/net/net/ipx.c,
	  dosext/net/net/pktnew.c, dosext/sound/sound.c, include/iodev.h,
	  include/ipx.h, include/mouse.h, include/pic.h, include/pktdrvr.h,
	  plugin/kbd_unicode/include/keyb_server.h,
	  plugin/kbd_unicode/serv_8042.c:
	Abruptly terminate the PIC recursion usage. Globally, for all drivers.
	This will probably break everything at once, but at least those
	subsystems that were prepared, should tolerate.

2005-03-01  Stas

	* src/: include/emu.h, arch/linux/async/signal.c,
	  base/misc/ioctl.c:
	Trying to unbind SillyG (irqpassing) from PIC recursion. I dont have a
	test-case for it, hope it still work.

	* src/base/mouse/mouse.c:
	Unbind mouse from the PIC recursion.
	That looks pretty much it. Next thing would be to try remove the
	recursion. Havoc to come...

	* src/: base/serial/ser_init.c, base/serial/ser_irq.c,
	  base/serial/ser_ports.c, include/serial.h:
	Trying to unbind serial from PIC recursion.
	Sorry, no way to keep serial functional any longer, lets break it again:)

	* compiletime-settings.devel:
	Linking with svgalib can produce a broken build because the svgalib
	was linked without -Bsymbolic.
	svgalib is probably dead...

2005-02-28  Bart

	* src/plugin/sdl/sdl.c:
	Implemented handling of the SDL_QUIT event so that clicking "x" quits DOSEMU.

	* src/tools/periph/Makefile:
	Do not generate hdimage.dist in the default build as we don't need it anymore.

2005-02-24  Stas

	* src/dosext/dpmi/msdos.c:
	Get rid of DS_MAPPED/ES_MAPPED to make the translator code fully
	re-entrant (again)

	* src/dosext/dpmi/msdos.c:
	Remove some usages of ES_MAPPED/DS_MAPPED.

2005-02-17  Stas

	* src/dosext/dpmi/dpmi.c:
	Call keyb_server_run() from dpmi_fault() to improve the keyboard
	response time (bug #1113468). I hope doing that is safe.

	* src/base/async/int.c:
	Disable the mouse iret hack (again).
	It turned out that DOS initializes the IVT to not always point to irets.
	If PC-DOS is booted without DOS=HIGH, then for some reasons it sets
	int33 (and others) to some crap, then the crash.
	Besides, this code simply asks for being disabled: the recursion have
	to be addressed in do_int(), not here.

2005-02-11  Stas

	* src/base/serial/ser_init.c:
	Made serial ports to work *again*.
	Lets keep them working at least for some time, pleeease! :)

2005-02-07  Stas

	* src/: arch/linux/async/signal.c, base/async/int.c,
	  base/bios/int16.c, base/dev/misc/lpt.c, base/misc/ioctl.c,
	  dosext/net/net/ipx.c, emu-i386/cputime.c, include/timers.h:
	More flexible idle system. For now tuned similar to the current one,
	except for the printer and async I/O, which, when active, give more
	power to dosemu.
	Now we can easily tune the things as per 1.2.1 and better.
	Helper would be nice to allow the run-time adjustments, or perhaps
	we need a section in dosemu.conf dedicated to the idle stuff.

2005-02-06  Bart

	* doc/README.gdb:
	Add some more info about how to deal with GDB and avoid SIGALRM getting
	in the way of single stepping.

	* src/base/bios/int10.c:
	Fix problem with cursor drawing with bigger fonts such as vga11x19.

2005-02-05  Stas

	* src/dosext/dpmi/dpmi.c:
	Per-client stack must be freed on a client termination btw.

2005-02-05  Bart

	* etc/dosemu.conf, etc/global.conf, src/doc/README/config,
	  src/env/video/avance.c, src/env/video/cirrus.c,
	  src/env/video/matrox.c, src/env/video/s3.c, src/env/video/sis.c,
	  src/env/video/vbe.c, src/env/video/vga.c:
	$_vmemsize = (0) now means autodetect just like $_vbios_size = (0).
	If you specify a fixed amount DOSEMU will only try to save/restore this
	amount so console switching does not take such a long time.

	* src/include/emu.h:
	gcc-4.0 warning fixes

	* src/doc/HOWTO/EMUfailure.sgml:
	Add missing "of".

	* src/env/video/text.c:
	Fix gcc-4.0 warning.

	* src/emu-i386/ports.c:
	Remove unused devstat struct.

	* src/base/init/: config.c, lexer.l.in:
	Fix gcc warnings.

	* src/base/serial/ser_init.c:
	ser_init cleanups: use a table instead of switch for default COM settings,
	get rid of some gcc-4.0 warnings.

2005-02-05  Stas

	* src/dosext/dpmi/: dpmi.c, dpmi.h, memory.c:
	Make PM stacks per-client.
	Borland C IDE can benefit from this.

2005-02-04  Stas

	* src/doc/README/dosnet:
	Networking documentation update.
	I am not a doc writer, but I tried to make it short, simple and
	informative. Please dont beat me on that:) It should be better
	than the old (completely outdated) one anyway.

	* src/base/init/config.c:
	Dont parse /proc/cpuinfo if not necessary, plus some cleanups. (SR #1081283)

	* etc/global.conf, src/base/async/int.c, src/base/dev/misc/rtc.c,
	  src/base/init/lexer.l.in, src/base/init/parser.y.in,
	  src/include/emu.h, src/include/iodev.h:
	First pass on merging the timing patch from Paul Crawford and Andrew Brooks.
	This includes BIOS timing and a few fixes and enhancements to the old
	code.
	Linux timing is not yet.

2005-02-01  Stas

	* src/base/serial/ser_irq.c:
	Completely draining the queue appears to be somewhat slow.
	This patch allows up to 2 (QUEUE_THRESHOLD) chars to queue.
	This returns the previous speed while still allowing my test-cases
	to work.

2005-01-30  Stas

	* src/base/serial/ser_irq.c:
	Get the queue size from linux and dont request the TX interrupt
	before it is empty.
	This makes my ancient test-case to work and hopefully is not as
	slow as my previous attempt of using tcdrain().

	* src/base/serial/: ser_defs.h, ser_irq.c, ser_ports.c:
	Made transmit queue a sliding buffer (like the receive one) so that
	the end-start calculation to always give the right result.

2005-01-28  Stas

	* src/: dosext/misc/emm.c, commands/ems.S:
	Added int2f hook to ems.sys to provide the "unhooked" version of
	the XMS callback that we hooked for UMB... Windows really demands
	that (works unreliably otherwise when the native himem.sys is in
	the game).
	Also while I was at it, I reworte the ems.S almost entirely to get
	rid of the ancient crap that was all there.

	* src/: include/serial.h, base/serial/fossil.c,
	  base/serial/ser_irq.c, base/serial/ser_ports.c:
	Replaced tx_buf_bytes/rx_buf_bytes vars with the macros to reduce
	the chances for the counters-out-of-sync bugs.

	* src/base/serial/ser_ports.c:
	Properly update the buffer counters when receiving data. Horrible
	bug in fact, it used to work by a pure luck before - rx_buffer_slide()
	was bringing the counters in sync at some point, but not always, and
	not any more. This bug was there since the creation of the world.
	This fix whould make the fifo transfers much faster and more reliable.
	Closes #1103434.

	* src/base/serial/ser_ports.c:
	Be more carefull about the fifo counter. Mostly cosmetic.

2005-01-26  Stas

	* src/dosext/dpmi/dpmi.c:
	Remove RealModeContext and the surrounding stuff.
	I dont know why it was introduced. It is stated it helps some DJ200
	compiler (djgpp?), but it looks like the hack to work around some
	bugs that are not there any more. If someone know why this stuff
	was necessary, let me know.
	Bart, please see if djgpp feels well now without the hack.

	* src/dosext/dpmi/dpmi.c:
	Made it possible for the 16bit clients to safely access the 32bit API.
	This is not defined in a DPMI specs, so this is a small extension.
	No 16bit client is allowed to use 32bit API, but it is necessary
	for the djgpp-ported API translator to provide the service for 16bit
	clients.

	* src/: include/pci.h, base/dev/misc/pci.c, base/async/pci_bios.c:
	Made pciemu to do something more than just locking up the card
	by fixing the inb/inw.
	Also the header space is enlarged (still reading 64bytes only though).
	Now it works with some cards, but in most cases it still doesnt.
	The cards that reserve an extra PCI ports (like my Radeon) are
	fine, but the ones that dont, usually keep the extended registers
	in the config space, right after the config header. The emulation
	approach cannot fork for them...
	The last argument I've heard against just limiting the direct PCI
	access, was that it would be too slow. But pci_port_inb/pci_port_outb
	already do this!
	I think pciemu have to go away. It is useless, at least for its
	currently intended usage.

2005-01-24  Stas

	* man/dosemu.bin.1.in:
	the related man adjustment

	* etc/dosemu.conf, man/dosemu.bin.1.in:
	Change $_cpu to 586 as people report problems about 386.
	Dosemu is beleived to be 586-safe these days.

2005-01-17  Stas

	* src/env/video/text.c:
	Use MB_LEN_MAX

	* etc/dosemu.conf, etc/global.conf,
	  src/arch/linux/mapping/mapping.c, src/base/async/int.c,
	  src/base/dev/misc/cmos.c, src/base/init/config.c,
	  src/base/init/init.c, src/base/init/lexer.l.in,
	  src/base/init/parser.y.in, src/base/misc/hma.c,
	  src/commands/ems.S, src/dosext/misc/xms.c, src/include/emu.h,
	  src/include/hma.h, src/include/mapping.h, src/include/memory.h,
	  src/include/xms.h:
	Implemented int15 block move support and the infrastructure for
	using the native himem.sys.
	Dont forget to update your ems.sys!

2005-01-15  Stas

	* src/dosext/dpmi/: dpmi.c, msdos.c, msdos.h:
	Got rid of S_xxx macros of msdos.c

	* src/dosext/dpmi/dpmi.c:
	Preserve the high word of ESP across the hw interrupts and exceptions
	for 16bit DPMI clients.
	This fixes the 16bit clients that use the 32bit code with 32bit stack
	sometimes.
	If the 16bit client is interrupted while on 32bit code/stack, it gets
	switched to 16bit stack, where the high word of ESP is lost because of
	the CPU bug. We can save/restore it by hands.
	The 32bit clients that work on 16bit stack are still vulnirable.

	* src/dosext/dpmi/dpmi.c:
	Consolidate the stack switching into enter_lpms()/leave_lpms().
	This saves 8K of the code and will make it easier to make the
	per-client stacks.

2005-01-11  Stas

	* src/base/async/int.c:
	- Improved windows hacks to support Standard mode.
	- Made xtitle code to properly handle DOS shells of Windows.

2005-01-10  Stas

	* src/dosext/dpmi/msdos.c:
	Small bug in int33/ax=0ch translation: offsets of 0 must be allowed.
	(Japheth)

	* src/dosext/dpmi/msdos.c:
	Better fix for int33/ax=14h translation.

2005-01-09  Stas

	* src/env/video/text.c:
	Fixed memory corruptions in save_selection(). utf8 seem to use up to
	6 bytes per char, so the allocated buffer was too small. Also it was
	not properly tracked.
	Are there the charsets that can use more than 6 bytes?

	* src/dosext/dpmi/msdos.c:
	Fixed int33/ax=14h translation (noticed by Japheth)

	* src/dosext/dpmi/dpmi.c:
	Fixed a diabolical bug in do_LAR asm. It was not taking an argument!
	So it operated on whatever random value was in %ax. Sometimes it
	worked because %ax happened to contain the selector, but in most
	cases it just did crap, corrupting the LDT cache. Now z80s emulator
	works (again) and I suppose many other progs do as well.
	This bug was here (presumably) since 1996, and noone noticed?!!!
	This might explain the most of the oddities I observed for years,
	like adding some debugging output makes one program to work and
	breaks another...

	* src/base/mouse/mouse.c:
	Made ps2mouse enable/disable state to not interfere with int33 state.
	Fixes some problems with Windows.

	* src/dosext/dpmi/: dpmi.c, dpmi.h:
	Added DPMI functions 0xe and 0xf.
	Just because these were easy to code up:)

	* src/dosext/dpmi/dpmi.c:
	Added DPMI function 0x801 (free physical mapping).
	This function does nothing for us, but it should not fail.

2005-01-07  Stas

	* src/dosext/dpmi/dpmi.c:
	Dont reset in_win31 before LDT is unprotected (bug of RSP patches)

	* src/dosext/dpmi/dpmi.c:
	Evil typo in a (rarely used) DPMI function 0x50a

	* src/: dosext/dpmi/dpmi.c, dosext/dpmi/dpmi.h, base/bios/bios.S,
	  include/bios.h:
	PM RSP functionality added (DPMI functions 0xc00, 0xc01).
	No sufficient test-case, but needed for djgpp-ported msdos.c

2004-12-29  Stas

	* src/base/async/int.c:
	gcc warning

2004-12-27  Stas

	* src/base/init/init.c:
	Always report Game port and DMA.

	* src/base/bios/bios.S:
	Fixes to bios-reported caps:
	- Table length does not count itself, so it is 8, not 9
	- Report extended keyboard in features byte 2.

2004-12-23  Stas

	* src/dosext/dpmi/: dpmi.c, msdos.c, vxd.c, vxd.h:
	Moved the VxD glue code from msdos.c to vxd.c. msdos.c must be kept
	clean and perhaps it will be possible to port it to DJGPP one day.

2004-12-22  Stas

	* src/dosext/dpmi/vxd.c:
	VTDAPI function 4 added. Media Player (Video for Windows) now works properly.

2004-12-19  Stas

	* src/emu-i386/ports.c:
	Some more debug messages from ports.

2004-12-16  Stas

	* src/dosext/dpmi/dpmi.c:
	2 small fixes:
	- dont trash BP on return from int24 PM inthandler
	- attribute the segments to the proper client for direct LDT writes

2004-12-14  Bart

	* src/dosext/mfs/lfn.c:
	Return FILE_NOT_FOUND if the LFN wildcard search for "delete file"
	does not find anything (Bug #1020635)

2004-12-12  Stas

	* src/dosext/dpmi/dpmi.c:
	Missing return.

	* src/dosext/dpmi/dpmi.c:
	Re-applied accidentally removed commit.

2004-12-11  Stas

	* src/dosext/dpmi/dpmi.c:
	Reflect the exceptions 1,3,4 to realmode handlers as the last resort,
	if neither the exception handler nor the prot.mode interrupt handler
	is installed.

	* src/base/serial/ser_ports.c:
	Dont try to raise IRQ if read() returns -1.

2004-12-10  Stas

	* src/dosext/dpmi/dpmi.c:
	Unhandled exceptions 6 and >=8 should still terminate the client.

	* src/dosext/dpmi/dpmi.c:
	Reflect the unhandled exceptions to protected mode interrupts
	handlers. If such a handler is not installed, the client is
	terminated. This heavily contradicts with the DPMI specs, but
	the specs are nonsense - reflecting the fault exceptions to
	realmode inthandlers cant work.
	(with the input from Japheth)

	* src/: dosext/dpmi/dpmi.c, dosext/dpmi/dpmi.h,
	  dosext/dpmi/memory.c, arch/linux/debugger/mhpdbgc.c:
	Scan the LDT at startup and find all the used entries (usually there
	are none, sometimes one). These entries are not allowed to be changed
	by the DOS code. May help with pthreads.

	* src/plugin/commands/builtins.c:
	Made builtins version checking to work again. com_error() must be
	called only *after* the memory pool is allocated. Fixes the
	"builtin  OOM" problem reported by Reinhard.

2004-12-09  Bart

	* src/include/timers.h:
	Replaced all assembly language in timers.h except for "rdtsc" itself by C.
	This fixes bug #1080784.

2004-12-09  Stas

	* src/dosext/dpmi/dpmi.c:
	Removed most of the ADD_16_32 usages.

	* src/dosext/dpmi/dpmi.c:
	One should not use "m" constraint for the variables that are in
	the stack and the stack pointer is altered... set back to "d".
	(thanks to Reinhard)

2004-12-08  Stas

	* src/dosext/dpmi/dpmi.c:
	Reworked direct context-switching code. It is now 2 times shorter,
	easily readable and more gcc-friendly.

2004-12-07  Stas

	* src/base/serial/ser_init.c:
	Fixed error message

2004-12-03  Stas

	* src/dosext/dpmi/: dpmi.c, dpmi.h, msdos.c:
	- Always use copy_context() instead of direct assignments (bug #1076593)
	- Improved int23 handling

	* src/base/mouse/mouse.c:
	Reset the PS2 pointer callback on mouse reset. Fixes Windows problem
	with mouse.

	* src/dosext/dpmi/dpmi.c:
	Made "Map Device" function to always fail.
	It turned out we dont support that functionality, it just didn't return
	the error. We can't support that before the .nopage method is implemented
	for /dev/mem VMAs in the kernel.
	Changed the DPMI caps again.

	* src/dosext/dpmi/dpmi.c:
	Make sure the realmode callbacks never use an unallocated descriptors.

2004-12-02  Stas

	* src/arch/linux/dosext/sound/linux_sound.c:
	Use blocking sync for "disable speaker" SB function. (part of bug #1074310)
	SNDCTL_DSP_SYNC ioctl() call is blocking. We need threading...

	* src/: base/dev/misc/timers.c, dosext/dpmi/dpmi.c:
	Preserve the "cli_timeout" hack state across the realmode calls.
	Fixes the problem with Death Rally.

	* src/emu-i386/do_vm86.c:
	do_intr_call_back should push "vflags", not "eflags".

	* src/base/serial/: ser_irq.c, ser_ports.c:
	- Disable the left-over modstat timer code. This makes MSR to
	work again (bug #1075088)
	- moved TIOCSSERIAL ioctl closer to TIOCGSERIAL, for safety.

2004-12-01  Stas

	* src/: arch/linux/dosext/sound/linux_sound.c,
	  dosext/sound/sound.c:
	Make sound recording kinda work (part of bug #1074310)

	* src/dosext/mfs/mfs.c:
	dont dump uninitialized memory to the log.

2004-11-29  Stas

	* src/: include/pic.h, include/vm86plus.h,
	  arch/linux/async/signal.c, base/dev/pic/pic.c,
	  base/mouse/mouse.c, base/serial/ser_init.c, dosext/sound/sound.c,
	  base/init/init.c:
	Remove never really used pic_maski/pic_unmaski.

	* src/: base/mouse/mouse.c, include/pic.h, base/async/int.c:
	Unmask IRQ8 and IRQ12 initially.

2004-11-28  Bart

	* src/: base/async/int.c, base/dev/misc/lpt.c, include/lpt.h:
	Printer fixes, enhancements and cleanups:
	* printer_close must reset the write function to the stub.
	* distinguish between "pipe" and "dev" files. The function pointers
	  really make sense now I think.
	* use line buffering for the printer files, so we don't need to wait
	  timeout seconds before output appears
	* after printer_timeout seconds the printer dev/pipe is closed
	* remove unnecessary flush function, fclose/pclose do that automatically

2004-11-28  Stas

	* src/arch/linux/async/sigsegv.c:
	Route coprocessor exceptions to IRQ13 (hints from Japheth).
	This allows Netscape 4.x to work.

	* src/include/pic.h:
	Make IRQ13 unmasked on startup.

	* src/base/init/init.c:
	Enable IRQ13 on PIC, it can be invoked by FPU.

2004-11-28  Bart

	* doc/: EMUfailure.txt, dosemu-HOWTO.txt:
	Regenerate EMUfailure and HOWTO

2004-11-27  Stas

	* src/dosext/dpmi/Makefile:
	Stop mentioning winemu.bat in Makefile.

	* src/base/mouse/mouse.c:
	Added dummy "set rate" function to PS2 mouse. This allows Windows
	to use the mouse without the custom driver.

	* src/: dosext/dpmi/dpmi.c, dosext/dpmi/dpmi.h, emu-i386/do_vm86.c:
	Moved dpmi_init() call to do_vm86.c. All other DPMI calls are now
	ignored if DPMI is not initialized.
	Windows seem to forget to unregister the mouse handler on exit.
	This patch avoids the crash afterwards. There might be better fix
	of course.

	* src/base/async/int.c:
	Setting int66 to iret is a Windows hack.

	* src/: base/bios/bios.S, dosext/dpmi/dpmi.c, dosext/dpmi/dpmi.h,
	  dosext/dpmi/msdos.c, dosext/dpmi/msdos.h, emu-i386/do_vm86.c,
	  include/bios.h:
	- Made the API translator fully reentrant, which allowed lots of cleanups.
	- Implemented the proper reflection to PM of interrupts 0x1c, 0x23, 0x24.
	It never worked properly before.
	Windows feels much better now when accessing the missing floppies or CD.

	* src/dosext/dpmi/winemu.bat:
	winemu.bat is no longer needed as win.com works perfectly.

	* src/dosext/dpmi/: Makefile, dpmi.c, meminfo.c, meminfo.h,
	  memory.c:
	Dont export the /proc/meminfo to the DPMI client. This is just plain
	wrong. It is not supposed to know the real amount of mem or swap on
	a system. It is only supposed to know the amount we allow it to use,
	which is config.dpmi.

	* src/dosext/dpmi/dpmi.c:
	Allow the DPMI API to operate with some reserved descriptors
	(like LDT alias, PM stack and DPMI_SEL).

	* src/dosext/dpmi/dpmi.c:
	Changed the DPMI caps: we do not support the exception restartability,
	and never did. But we do support device mapping - we can map LFB :)

2004-11-23  Stas

	* src/dosext/dpmi/: dpmi.c, dpmi.h, msdos.c:
	Make mouse, ps2 and XMS DPMI callbacks per-client.

	* etc/: dosemu.conf, global.conf:
	Remove $_pm_dos_api from dosemu.conf. $_ems now implicitly controls
	the API translator (as was discussed).

	* THANKS:
	Japheth helped with 32rtm and Windows - thanks.

2004-11-22  Bart

	* src/dosext/mfs/: lfn.c, mangle.c, mangle.h, mfs.c, mfs.h:
	Removed name_ufs_to_dos call from name_convert, so the caller is responsible.
	Often the caller did this already, and so we are saving double work this way.
	Simplified LFN int21/71a8 to work directly on the DOS character set.

	* src/dosext/mfs/: lfn.c, mangle.c, mangle.h, mfs.c, util.c:
	name_convert no longer uppercases. Leave this to the caller if it's
	necessary, and if not it can use strcasecmp style functions.

	* src/dosext/mfs/mfs.c:
	Moved find_again into a function instead of messing around with goto's.

	* src/dosext/mfs/mfs.c:
	Must compare . and .. to the wildcard too. Fixes problem with Rocket Chase

	* src/: base/async/int.c, base/bios/bios.S, dosext/dpmi/msdos.c,
	  emu-i386/do_vm86.c, include/memory.h, include/mouse.h:
	Use a HLT to deal with the hogthreshold code for real mode mouse drivers.
	Correct EOI procedure in bios.S (used by IPX and packet driver)

2004-11-22  Stas

	* src/dosext/dpmi/dpmi.c:
	debug output.

	* src/dosext/dpmi/msdos.c:
	Respect the returned CX value for int21/ah=65,al=1...7.
	(suggested by Japheth)

2004-11-22  Clarence

	* src/plugin/translate/translate_config.c:
	newline

2004-11-21  Bart

	* src/: base/async/int.c, dosext/dpmi/msdos.c, include/mouse.h:
	Call int33 the old way using real_run_int() when it's called from a signal
	handler. In this case DPMI's post extender takes care of the hogthreshold
	code.

2004-11-21  Stas

	* src/emu-i386/do_vm86.c:
	Make sure do_call_back() never executed from within the signal
	context.

	* src/base/async/int.c:
	Disable int33 to DOS callouts. This allows windows to be started
	in enhanced mode by win.com, otherwise crashes.
	The reason is that do_int() can be called from within the signal
	context (by DPMI). Calling realmode code from within the signal
	context is not possible for many reasons (vm86() can emit the signals
	itself, or DPMI may not yet set everything up for realmode code, etc).
	So do_int() must *never* use the do_call_back() variations.

	* src/dosext/dpmi/msdos.c:
	int21/ah=65h calls added to API translator. This allows Win3.11
	install to go further, but it still doesnt finish.

	* src/: dosext/dpmi/dpmi.c, dosext/dpmi/dpmi.h,
	  dosext/dpmi/msdos.c, base/bios/bios.S, include/bios.h,
	  include/cpu.h, plugin/commands/builtins.c:
	- Added XMS calls from DPMI thunk. This allows the Win3.1 installation.
	Win3.11 installation still doesn't work.
	- Some cleanups in msdos.c

	* src/: include/dos2linux.h, plugin/commands/builtins.c:
	Forgotten bits of the previous commit.

	* src/base/async/int.c:
	Introducing "Windows Hacks".
	With these hacks it is now possible to:
	- run Windows 3.1 in an usual way (via win.com) in both the 286 and 386
	mode. The mode will be displayed in the window title.
	- install Windows 3.1 under dosemu. But the installation crashes
	at the very end :( This is to work out later.

2004-11-20  Stas

	* compiletime-settings.devel, src/arch/linux/async/signal.c,
	  src/arch/linux/async/sigsegv.c, src/arch/linux/debugger/mhpdbg.c,
	  src/base/async/int.c, src/base/dev/misc/timers.c,
	  src/base/dev/pic/pic.c, src/dosext/dpmi/dpmi.c,
	  src/dosext/dpmi/dpmi.h, src/dosext/sound/sound.c,
	  src/emu-i386/do_vm86.c, src/include/cpu.h:
	First pass on the IF flag virtualization.
	cpuemu is disabled for now - have to be updated somehow.
	This patch fixes (probably partially) bugs: #1027805, #855948, #855556,
	#811365 and the rest of the world.
	Give it some testing, make sure it doesnt lock up you favourite DPMI app.

2004-11-20  Bart

	* src/base/misc/fatfs.c:
	Fixed problem trying to open io.syskernel.sys if io.sys has 0 bytes.

2004-11-20  Stas

	* src/base/async/int.c:
	int21/ah=6 is output only when dl!=0xff, otherwise it is input and
	must not reset idle. (Bug #1067680)

2004-11-18  Bart

	* src/include/bios.h, src/base/misc/disks.c:
	For floppies call disk_close() only when the floppy MOTOR_TIMEOUT expired.
	Otherwise call fsync(). This improves floppy performance, particularly when
	using kernel 2.6.

	* etc/global.conf:
	Fix typo in $_X_vesamode

2004-11-14  Bart

	* src/: base/async/pci_bios.c, base/dev/misc/pci.c, include/pci.h:
	Restrict PCI configuration space access to the first 64 bytes (16 longs).
	Some machines crash otherwise. Thanks to MIchael and Reinhard Karcher for
	reporting and fixing this.

2004-11-12  Stas

	* etc/dosemu.conf:
	IPX is presumed to be fixed and DPMI-safe.

2004-11-11  Bart

	* src/: arch/linux/mapping/mapping.c, env/video/console.c,
	  env/video/vga.c, env/video/video.c:
	Ignore PCI memory ranges under 1MB. Decouple memcheck_reserve from
	map_hardware_ram for video memory. Fix console=1, graphics=0 mode,
	by fixing its map_hardware_ram but still having a 128K chunk reserved
	at 0xa0000 as virtual hardware RAM.

2004-11-10  Bart

	* src/plugin/commands/builtins.c:
	lowmem_alloc cannot call com_error in case of failure, since com_error
	will call lowmem_alloc again (via com_doswrite). This fails and causes
	infinite recursion.

2004-11-09  Bart

	* src/base/async/int.c:
	int33() now takes over the int33 vector if it points to an iret. This is still
	a bit dirty but not worse than what we did before. I reverted the other
	workarounds.

2004-11-09  Stas

	* src/dosext/dpmi/msdos.c:
	- Set MAX_DOS_PATH to 260 and use it instead of some hardcoded vals
	- Use sprintf instead of memcpy for ax=7160

	* src/dosext/dpmi/msdos.c:
	Better to use MEMCPY_DOS2DOS macro

	* src/dosext/dpmi/msdos.c:
	Silly strncpy vs memcpy confusion.

2004-11-08  Bart

	* src/env/video/text.c:
	Fix invisible mouse selection in colour text programs. This code is what
	the Linux console selection code also uses to invert on VGA displays.

	* src/base/async/int.c:
	Simplified int code a bit: moved some code from run_caller_func() to
	do_int() to avoid checking things twice, and have only one place
	where real_run_int() is called. The mouse workarounds aren't necessary
	anymore; ctrl-c still works.

2004-11-08  Stas

	* src/base/async/int.c:
	If dosemu have no internal function for interrupt, just call the
	DOS interrupt handler. This fixes the problem with ^C.

	* src/dosext/dpmi/dpmi.c:
	Increase instremu count to 10 for LDT writes - looks a bit faster.

	* src/: base/async/int.c, dosext/dpmi/dpmi.c:
	Revector interrupts 0x1c, 0x23 and 0x24 for DPMI.
	This allows windows to handle critical errors like missing diskette
	in drive.

	* src/base/async/int.c:
	Dont call post_boot() anywhere but from int21/ah=4b and even then
	ignore the first invocation.
	The reason is that DOS sets int33 vector (and probably some other)
	to iret on the very late stages of its startup. This hack makes
	mouse to work again.

	* src/dosext/dpmi/dpmi.c:
	- Fix bug with LDT segment expanding (hint from Japheth)
	- This makes it possible to decrease the initial LDT limit to 0xfff

	* src/dosext/dpmi/msdos.c:
	- Increased MAX_DOS_PATH: int21/ax=7160 needs 261 bytes.
	- Added API translation for int21/ax=7160 (Japheth)
	- Fixed bug in translation for int21/ax=7147 (Japheth)

	* src/: dosext/dpmi/dpmi.c, dosext/dpmi/dpmi.h,
	  dosext/dpmi/msdos.c, base/bios/bios.S, base/mouse/mouse.c,
	  include/bios.h:
	Add PS2 mouse support for DPMI.
	This allows WinOS2 to work again (otherwise crashes with recent CVS),
	but mouse no longer works :(
	Maybe there are some bugs, but we need the config switch to choose
	between int15 and int33 interfaces.

	* src/base/serial/ser_init.c:
	Hi Bart:)

	* src/base/serial/ser_ports.c:
	Revert the ser_ports.c patch of 2004-05-07. It seems to be no longer
	necessary and causes problems.

2004-11-05  Bart

	* src/include/serial.h, etc/global.conf, src/base/init/parser.y.in,
	  src/base/serial/ser_init.c:
	Fix parser for $_com1 = "/dev/ttyS0 irq 4" (#1012035)
	Don't try to remove a lock file for virtual com ports -- it just gives
	a spurious ERROR.
	Avoid some buffer overflows and NULL pointer dereferences
	(sptr->dev is a pointer now, space for path determined at runtime,
	 take care of strrchr, remove unused dev_nam array)

	* src/: base/misc/ioctl.c, env/video/matrox.h, include/bitops.h:
	gcc-4.0 warning/error fixes

	* src/: base/init/config.c, base/init/dev_list.c, base/init/init.c,
	  emu.c, include/emu.h:
	Removed the remaining old keyboard code that was still around at various
	places.

	* src/arch/linux/async/signal.c:
	The sigreturn caller really needs to be called __restore and not restore__,
	otherwise gdb will still be confused.

2004-11-04  Bart

	* src/arch/linux/async/signal.c:
	Set the SA_RESTORER flag when calling the kernel sigaction (for the wrapper
	case), because glibc does the same thing. Hopefully that solves some problems
	with GDB on 2.4 kernels.

	* src/: base/bios/bios.S, env/video/X.c, include/mouse.h,
	  include/pic.h, base/mouse/mouse.c, plugin/sdl/sdl.c,
	  plugin/term/mouse_xterm.c:
	Handle user and int15 mouse event handlers via int74/irq12.
	Some DOS mouse drivers hook int74 and only work if we handle events this
	way.

	* src/base/mouse/mouse.c:
	scale ps2mouse dy by a factor 2; the speed_x and speed_y are already changed
	by a video mode switch. Also don't call do_mouse_irq_ps2 if no events occur.
	ctmouse is now more usable without the grab active
	(if you use ctmouse /r1 to disable acceleration).

2004-11-03  Bart

	* src/plugin/: term/keyb_slang.c, translate/translate.c:
	Compute the shift/alt/ctrl modifier for xterms/rxvt instead of relying on
	a very long table that would cover all possibilities.
	Assume high bit means ALT when the external charset is ASCII or "" with C
	locale. Fix segfaults when $_external_char_set = "ascii".

2004-11-03  Stas

	* src/emu-i386/do_vm86.c:
	Remove the re-entry check from do_call_back(), IPX (Reinhard) have
	problems with it.
	do_call_back() must be reenterable, but I am worrying about the
	case where it is re-entered by the VESA switch, after which
	dosemu will be frozen while callback is processing. Probably the
	VESA driver have to wait if any callback is active?

2004-11-03  Bart

	* src/: base/async/int.c, base/mouse/mouse.c, base/bios/bios.S,
	  include/memory.h, include/mouse.h:
	int33() now uses a callback into the mouse driver to make sure the
	hogthreshold is done after the call even for DOS mouse drivers.
	A DOS mouse driver can now redirect int33; in that case we use NOREVECT
	for mouse_int(). To combine this with the callback via the hog code (which
	is always revectored) some extra checks and function pointer adjustments
	have to be made.
	Removed the unused indirect function pointer for the mouse callback.
	Enabling the internal driver no longer always sets the int33 vector.
	Implemented a second mouse callback for the PS/2 mouse BIOS.
	All this combined gives a PS/2 mouse bios that actually works so a
	DOS mouse driver (such as CTMOUSE 1.9) can be loaded into xdosemu --
	although to have it usable one needs to grab the mouse.

2004-11-02  Bart

	* src/doc/HOWTO/dosemu-HOWTO.sgml:
	Removed any version information about Windows 3.x and dosemu.
	This remark was merely a historical saying when the VGA emulator was
	good enough to run Windows 3.x, it doesn't really matter today.
	The 1.2.0 fixes were merely to get it back on track, nothing specific
	to xdosemu vs. console dosemu.

2004-11-02  Stas

	* src/doc/HOWTO/dosemu-HOWTO.sgml:
	Rip some FUD/crap about Windows support from HOWTO:
	- .386 doesnt mean 32bit. There is nearly no 32bit code in Win31.
	- dosemu can run Windows since 1.2.0, not 0.64.3 (or it was broken
	for ages, at least on 1.0.x it doesnt work).
	- Icons do not disappear from Windows desktop, and winos2 doesnt
	make progman.exe to use system.ini instead of progman.ini (who wrote
	that kind of crap?)
	- Some other Windows-related junk ripped.

	* src/dosext/dpmi/dpmi.c:
	Support for unmodified Win31 386 kernel (thanks Japheth!):
	- Dynamically growing LDT, initial limit set to 0x1fff. This
	supercedes the allocation hack I've done for 286 kernel (hack removed).
	- Check for eIP to not exceed the CS limit (CheckSelectors())
	- When Windows creates the invalid LDT entries, just free the
	entry (type 0). This causes LAR to fail, same as if it would be of
	a type 0x0f, which Windows uses. Bingo!

	And oh yeah, there are still no reasons to use the unmodified
	Win31, at least before the proper mouse event translation is
	implemented.

2004-11-01  Bart

	* src/plugin/term/keyb_slang.c:
	If only "20" function keys are available let "F11" appear as shift-F1 to
	DOS apps. This is consistent with older dosemu's; and more DOS apps use
	shift-F1 than F11 (because there was no F11 on XT keyboards).

2004-10-31  Stas

	* src/plugin/commands/: builtins.c, builtins.h:
	- Remove no longer used com_int86()
	- Duplicate some "builtins" error message to the DOS screen

2004-10-31  Bart

	* src/plugin/term/keyb_slang.c:
	keyb_slang.c cleanups and enhancements:
	* Use our own definitions only as fallbacks for the terminfo definitions.
	  Some definitions could be removed because the terminfo is reliable
	  enough.
	* Added logic to translate esc-key into alt-key so many definitions could
	  be removed from the table.
	* Added some entries for shift/ctrl/alt arrow keys etc in xterm and friends
	* Add support for kf1--kf48 as used by recent xterms. Makes it possible
	  to distinguish shift-f1 from f11 and use ctrl-f1 etc.
	* Force application keypad mode to be able to distinguish keypad keys from
	  others.

2004-10-31  Stas

	* src/dosext/dpmi/dpmi.c:
	Remove some leftover debugging stuff.

	* src/: dosext/dpmi/dpmi.c, dosext/dpmi/dpmi.h,
	  dosext/dpmi/memory.c, dosext/dpmi/msdos.c,
	  arch/linux/debugger/mhpdbgc.c, env/video/instremu.c:
	Win3.1 support:
	- Added LDT R/W emulation.
	- Added several tricks that Windows relies upon.
	- Static DPMI initialization is now done only once, in dpmi_memory_init().

	This allows unmodified Win3.1 to work, but only krnl286.exe so far.
	krnl386.exe is not yet.
	There are no advantages in running unmodified windows, compared to WinOS2,
	only the disadvantages, like that you cant use mouse under X (don't even
	try WinOS2 mouse driver under unmodified winkernel, it will crash!).
	But it is an imminent step towards win32s, Win95 etc...

2004-10-30  Bart

	* etc/dosemu.conf, src/plugin/translate/translate_config.c:
	$_term_char_set is obsolete (it really has been for over two years now).

2004-10-30  Stas

	* src/dosext/dpmi/: dpmi.c, dpmi.h:
	Enlarge PM locked stack to 0xf000 as needed for Windows.
	Also be more carefull calculating the stack offsets.

2004-10-30  Bart

	* src/plugin/kbd_unicode/keyb_raw.c:
	Fix gcc warning.

2004-10-30  Stas

	* src/: env/video/instremu.c, env/video/vgaemu.c, include/vgaemu.h:
	Add the "cnt" arg to instr_emu(), which specifies how many insns
	to emulate. 0 means default count. When cnt!=0, signal_pending is ignored.

2004-10-30  Bart

	* src/plugin/: term/terminal.c, translate/charsets/vt100.c:
	Optimize terminal->utf8 support to use a max of 3 bytes: DOS characters
	never get beyond the BMP.
	Implement support for VT100 drawing characters; add this character set.
	Exploit cp437 as the alternate character set on the Linux console.
	This makes the Use_IBM_Codes escape sequence trick superfluous, and
	allows us to even use most IBM characters < 0x20.

2004-10-30  Stas

	* src/base/async/int.c:
	Set vector 0x66 to iret because Win3.1 calls it and crashes otherwise.

	* src/dosext/dpmi/dpmi.c:
	Make FreeAllDescriptors() to actually work.

	* src/: base/mouse/mouse.c, base/async/int.c, include/emu.h,
	  plugin/commands/emumouse.c:
	- Make emumouse to call the mouse_helper() directly, rather than via
	DOS interrupt.
	- Fix the bug with permanently disabling mouse internaldriver.

	* src/: arch/linux/async/signal.c, base/async/int.c,
	  base/bios/bios.S, base/init/init.c, dosext/mfs/mfs.h,
	  dosext/net/net/ipx.c, dosext/net/net/ipxglt.c, include/bios.h,
	  include/cpu.h, include/doshelpers.h, include/emu.h,
	  include/ipx.h, include/pic.h:
	IPX updates:
	- Switch to async IO
	- Route all the callback stuff via PIC
	- Removed all the horrible asm hackery from bios.S, it is all in C now

	This was tested and benchmarked by Reinhard - thanks!
	Benchmarks shows that it is not faster than the old code, but the
	CPU load was dropped from 100% to 10%, which is very good.
	It also should not have the problems with DPMI, but this remains
	unconfirmed. We'll see.

2004-10-27  Bart

	* src/plugin/kbd_unicode/keyb_raw.c:
	The raw keyboard needs to switch back to the original mode when you quit:
	it may not be XLATE, but can be UNICODE as well.

2004-10-27  Stas

	* src/arch/linux/async/signal.c:
	Calling io_select() in sigalrm() is still necessary for dosdebug.

2004-10-27  Bart

	* src/arch/linux/Makefile.main:
	Removed some obsolete advise about xmodmap and xset fp rehash.

2004-10-26  Bart

	* src/env/video/text.c:
	Don't use the remapper unless bitmap fonts are used. This fixes a crash in
	some text mode programs in terminal mode or when an X font is used.

	* src/dosext/dpmi/: dpmi.c, msdos.c:
	Removed more lvalue casts.

	* src/plugin/kbd_unicode/include/keyboard.h:
	Added symbol for Altgr lock which is used in the console keyboard detection.

	* src/plugin/kbd_unicode/keymaps.c:
	Use a more generic approach to scan for alternate keyboards than using the
	KT_ALTERNATE flag.
	The console keyboard detector can now deal with alternate layouts,
	non-ISO-8859-1 symbols and Unicode symbols (if kbd_mode -u is used).

2004-10-25  Bart

	* src/plugin/kbd_unicode/keymaps.c:
	Detect alternate keymaps by checking keys 2 and 3 from the X server.
	Fixes the problem with setxkbmap us,ru

2004-10-25  Stas

	* src/dosext/net/net/pktnew.c:
	Supress error messages.

2004-10-24  Bart

	* src/plugin/kbd_unicode/keymaps.c:
	Only report a mismatch if the X server reports a valid key which is different
	from our valid key. This seems to fix both "uk" and "ru" autodetection.

	* src/dosext/dpmi/dpmi.c:
	Fix gcc warning, remove unnecessary PAGE_SIZE definition.

	* src/plugin/kbd_unicode/keymaps.c:
	Clean up auto detection to use the "X_keysym" character set and to not
	compare too many keys.

2004-10-23  Bart

	* src/: base/init/parser.y.in, plugin/kbd_unicode/keymaps.c,
	  plugin/kbd_unicode/serv_xlat.c,
	  plugin/kbd_unicode/include/keymaps.h:
	The console keyboard auto detection now merges with the US def, instead
	of replacing it.
	Changed $_layout="auto" to no longer blindly trust the console keyboard
	when running under X. A function was borrowed from Wine which compares
	the X keymap with all keymaps that we have (including perhaps the console
	keymap) and choose the one that matches best (as there is no way to
	obtain scancodes from X; X terminals may not be PCs after all).
	Hopefully fixes bug #999831.

	* src/dosext/mfs/mfs.c:
	Don't use asprintf() in exists() as there may not be enough space
	(fullname can become longer in find_file as names are unmangled).
	This caused a very nasty SIGSEGV when trying to delete a mangled name.
	Change to cheaper allocation on the stack with NAME_MAX+1 bytes for
	the filename component.

	* src/dosext/mfs/mfs.c:
	Converted chmod error into a warning; also used for utime() now.
	It now causes DOSEMU to ignore the request (not return an error),
	but only if errno==EPERM (not e.g. EROFS), the directory is writable,
	and chmod would actually change the mode.

	* src/dosext/mfs/mfs.c:
	convert_compare() now checks if the name has a ~ or ? at position 5;
	otherwise we don't need to mangle.
	Simplified extract_filename(), and auspr(): they may assume valid filenames.
	Convert * to ? before searching, so we don't need to check '*' in the
	comparison routines anymore.

	* Makefile:
	Removed the automatic autoconf rule again; it appears to have more drawbacks
	than advantages. Sometimes configure.ac changes only the autoheader part
	so that configure does not change and autoconf is not necessary (only
	autoheader).

2004-10-22  Bart

	* src/env/video/vgaemu.c:
	Fix wrong comparison for character heights. This fixes many fonts in
	graphics modes.

	* src/plugin/: sdl/Makefile, kbd_unicode/Makefile:
	Clean some generated files with make distclean/realclean.

	* src/plugin/sdl/sdl.c:
	Enable key repeat in SDL

2004-10-21  Stas

	* src/arch/linux/async/signal.c:
	Dont trust the "old" action struct, it may contain not what we want.
	This patch allows njamd to be used with dosemu, btw.

	* src/include/pic.h:
	Revert patch of 11.10.2004.
	Reinhard pointed the stupidity of it, and the fact that pic_unmaski()
	takes care about that automagically for more than a year already,
	makes it even not worth fixing.

	* etc/dosemu.conf, src/dosext/net/net/pktnew.c:
	I tested $_novell_hack, it appears to work (for my test-case at least).
	So the comment in the code that said it was disabled (that I propagated
	to dosemu.conf) appeared to be misleading. Removed.

2004-10-20  Bart

	* src/dosext/drivers/cdrom.c:
	Check for ENOTTY when doing the cdrom ioctl before reading. This allows
	using image files with cdrom.sys and *cdex.exe.

2004-10-20  Stas

	* src/dosext/net/net/pktnew.c:
	Dont try to init pkt when disabled in config.

	* src/dosext/mfs/mfs.c:
	Mounting FAT without "quiet" causes many obscure problems for dosemu.

	* src/dosext/net/net/pktnew.c:
	Return two accidentally removed strcpy() calls to packet driver...

2004-10-19  Bart

	* src/arch/linux/Makefile.main:
	Do the final link using a recursive invocation of make. That seems
	to avoid the problems with parallel makes, because this rule can
	now reliably depend on a phony target.

2004-10-18  Bart

	* src/env/video/vbe.c:
	removed protected mode bank switch caller again, because we don't handle
	cli and sti for it.

2004-10-18  Stas

	* src/: include/inifile.h, dosext/net/net/ipx.c:
	Really really remove the dos.ini support.

	* src/dosext/net/net/inifile.c:
	Remove dos.ini again (escaped from previous commit).

	* configure.ac, etc/dosemu.conf, etc/global.conf,
	  src/base/init/lexer.l.in, src/base/init/parser.y.in,
	  src/dosext/net/net/Makefile, src/dosext/net/net/ipx.c,
	  src/include/config.h.in, src/include/emu.h:
	- Removed never used (not even mentioned in docs) dos.ini file support.
	- Added $_ipx_network option to dosemu.conf (was in dos.ini previously).

2004-10-18  Bart

	* src/dosext/mfs/lfn.c:
	Fix semicolon typo. Should solve Clarence' problem.

2004-10-17  Bart

	* src/dosext/mfs/: mangle.h, mfs.c, util.c:
	Use a dos_to_unicode_table to complement unicode_to_dos_table and make
	path_to_ufs faster.

	* src/dosext/mfs/lfn.c:
	Fix possible buffer overflow.

	* src/dosext/mfs/mfs.c:
	For findfirst delay the filename compare and stat to findnext's.
	This makes get_dir() so much faster (70x) that the sigalrm check is no
	longer necessary.
	Also moved the . and .. in root dir check out of the loop in
	scan_dir.

	* src/dosext/mfs/: lfn.c, mangle.c, mangle.h, mfs.c, util.c:
	Reverted VFAT optimization. It's not reliable for say \`o (o with accent
	grave) where the uppercase equivalent does not exist in CP437. The kernel
	does not uppercase it but DOS and DOSEMU convert it to O. So searching
	for POT where the filename is p\`ot means the expensive way is necessary.
	Introduced a DOS uppercase table to be able to do this quickly, and
	let the LFN code use this. Simplify name_ufs_to_dos to no longer do any
	uppercasing as strupperDOS does this much more quickly. Some cleanups
	in scan_dir to make it more similar to what it was before.

2004-10-16  Bart

	* src/dosext/mfs/mfs.c:
	Simplify last part of loop: the strcasecmp for long and short names could
	be the same thing for a non-mangled name on a non-FAT fs.

	* src/dosext/mfs/: mangle.c, mfs.c:
	Fixed a regression in mangle.c with the unicode->dos table.
	Use the stack instead of malloc in name_convert.
	Only mangle all names in the directory if what we are looking for
	is a mangled name in the first place! Otherwise a simple strcasecmp
	is sufficient. That's another 12x faster for scan_dir(non_mangled_name).
	On VFAT (case insensitive fs) we don't need to scan at all.

	* src/: dosext/mfs/lfn.c, dosext/mfs/mangle.c, dosext/mfs/mfs.c,
	  dosext/mfs/util.c, plugin/translate/translate_config.c,
	  plugin/translate/config/plugin_parser,
	  plugin/translate/include/translate.h:
	Use current locale for the external filename character set (leaving
	keyboard/terminal/paste untouched for now). Allows simply using
	strcasecmp instead of slow unicode compare, and mbsrtowcs for the
	unix->dos filename translation. Gives a further 30% speed improvement
	of readdir searches.

	* src/dosext/mfs/mangle.c:
	Use a 64K-sized char table for unicode->DOS lookups. This makes the
	readdir searches about 3x faster.

2004-10-15  Bart

	* src/plugin/kbd_unicode/keyb_clients.c:
	Add the SDL keyboard to the keyb_clients struct.

	* src/env/video/X.c:
	Properly handle TIMESTAMP requests. Now klipper doesn't cause bad events
	anymore.

2004-10-14  Bart

	* src/env/video/X.c:
	Implement support for the TARGETS and TIMESTAMP atoms used in selection.
	This fixes the copy/paste problems with KDE 3.2.3.

2004-10-14  Stas

	* src/: arch/linux/debugger/mhpdbgc.c, emu-i386/do_vm86.c:
	Dont unfreeze dosemu when dosdebug is attached, do it only if
	explicitly asked via dosdebug.

2004-10-13  Bart

	* src/arch/linux/mapping/mapping.c:
	Allow virtual maps of the video memory at 0xa0000 if !config.console_video

	* src/: arch/linux/mapping/mapping.c, base/init/config.c,
	  base/init/init.c, base/init/parser.y.in, dosext/dpmi/dpmi.c,
	  env/video/vbe.c, env/video/vc.c, env/video/vga.c,
	  env/video/vgaemu.c, env/video/video.c, include/emu.h,
	  include/mapping.h, include/pci.h:
	Extend $_hardware_ram to allow maps over 1MB with a virtual base that
	DPMI can get. Implement a new set of hardware RAM functions (register,
	map, list, get) and make $_hardware_ram, VGA(PCI), DPMI, and VESA its
	users. A special type (0) is used for virtual mappings (used by VGAEMU);
	otherwise the memcheck character types are used.
	map_hardware_ram tries to map everything that was registered, including
	the low VGA display memory.

	* src/dosext/mfs/mfs.c:
	Speed up scan_dir by uppercasing the name to search for outside the loop
	and only comparing the mangled short name for SFN searches.
	LFN searches only compare the long name case insensitively.
	Use VFAT_IOCTL_READDIR_SHORT on vfat partitions from non-LFN code to
	make sure that LFN's are invisible when they aren't needed.
	Plug memory leak and page fault if you lredir'ed a non-existent
	directory.

2004-10-13  Stas

	* src/include/emu.h:
	Making config.hogthreshold (and ocasionally a couple of other vars)
	signed - needed for my upcoming hogthreshold updates (using the
	negative thresholds sometimes).

	* src/: arch/linux/async/signal.c, base/async/int.c:
	Moving io_select() from sigalrm to do_periodic_stuff() speeds up the
	packet driver twice.

	* src/env/video/X.c:
	Set the real resolution for fullscrean, not the scaled one.

2004-10-12  Bart

	* etc/dosemu.conf, src/arch/linux/async/signal.c,
	  src/base/init/lexer.l.in, src/env/video/Makefile,
	  src/env/video/vbe.c, src/env/video/vbe.h, src/env/video/vga.c,
	  src/env/video/vga.h, src/include/emu.h, src/include/vc.h,
	  src/include/video.h:
	Add a VESA VBE graphics driver and make that the default. This driver
	should work with any VBE version; an LFB is not necessary
	LFB availability is only possible on PCI boards right now.
	If (say) your PCI VGA BIOS only supports VESA 1.2 then it should even be
	possible to load a TSR such as UNIVBE in DOSEMU and the driver will use
	that.

	Provide a way to force reentry into handle_signals() so that we don't
	miss too many SIGALRMs whilst saving the video memory (a thread would
	perhaps be a nicer solution).

2004-10-12  Stas

	* src/dosext/net/net/pktnew.c:
	Complain if the pkt driver is not able to handle the bandwidth.
	I was not able to trigger that, so I need to know it some queueing
	should be implemented or not.

	* src/include/pic.h:
	Allow PIC to process EOI from pkt and mouse. They no longer need any
	special treatment.

	* src/dosext/net/net/pktnew.c:
	With bound socket we dont need that hack any more.

	* src/env/video/X.c:
	Restore dotclock rate on switching from fullscreen to windowed mode,
	otherwise the very bad things happen.

2004-10-11  Bart

	* src/: base/async/int.c, base/bios/bios.S, emu-i386/do_vm86.c,
	  emu-i386/ports.c, env/video/vga.c, include/bios.h,
	  include/port.h:
	Call int10/ax=mode for PLAINVGA before restoring registers. This helps
	when the BIOS is buggy or we don't restore enough registers ourselves;
	otherwise it doesn't hurt. The BIOS needs a check not to mess with
	the mouse driver.
	From Stas: introduce in_crit_section to make sure that the BIOS survives
	the callback. Allow callbacks when "frozen". Some small cleanups.

2004-10-11  Stas

	* src/dosext/net/net/: libpacket.c, libpacket.h, pktnew.c:
	Packet driver networking updates:
	- Use PF_PACKET/SOCK_RAW sockets instead of the deprecated and buggy
	AF_INET/SOCK_PACKET ones, changed the interfaces accordingly.
	- Put the sockets in a bind state - this allows to use the Async IO,
	which makes the direct NIC access mode ~50x faster.
	- Use simple read/write for IO - this is possible with the binded
	RAW sockets (not with the PACKET sockets though - they insist on
	sendto() even when binded, which is a bug).
	- Some large cleanups.

2004-10-10  Stas

	* etc/dosemu.conf, src/dosext/net/net/libpacket.c,
	  src/dosext/net/net/pktnew.c:
	Direct NIC access no longer requires root all the time, only at
	startup now, similar to dosnet.
	It looks like this was the last thing that required root all the time.

2004-10-09  Stas

	* src/base/serial/ser_ports.c:
	Fix another bug with IIR clearing. (part of #1042020)

2004-10-09  Bart

	* src/: include/vc.h, env/video/Makefile, env/video/vc.c,
	  env/video/vga.c, env/video/vga.h, env/video/video.c:
	vga.c cleanups and changes:
	* made lots of functions static, moved out of vga.h
	* use constant PLANE_SIZE of 64K; always save 256K in standard VGA modes
	* moved the state save to the end of the video init (init_vga_card)
	  and don't let it clear the saved Linux video memory (from Stas)
	* improved diagnostics
	vc.c: repaired dosemu -c

	* src/plugin/kbd_unicode/serv_xlat.c:
	Dead keys should not cause the display of question marks.

	* src/plugin/term/: keyb_slang.c, terminal.c:
	Make DOSEMU compatible with SLang 2.0.

	* src/emu.c:
	Don't call pcibios_init() in emu.c anymore as it's done elsewhere now.

2004-10-09  Stas

	* src/base/serial/ser_irq.c:
	Fix IIR clearing. (part of #1042020)

	* src/base/serial/ser_ports.c:
	Fix the problem introduced by the previous patch...

2004-10-09  Bart

	* etc/dosemu.conf, etc/global.conf, src/base/async/pci_bios.c,
	  src/base/dev/misc/pci.c, src/base/init/parser.y.in,
	  src/env/video/matrox.c, src/env/video/vga.c, src/include/pci.h,
	  src/dosext/dpmi/dpmi.c:
	* cleaned up pci_bios.c<->pci.c interface (Stas)
	* pci_bios.c now registers i/o and memory areas for all PCI devices
	* the real PCI interface can no longer be iopl(3) optimized because
	  of the port server
	* don't allow byte access to port 0xcf9 (can reset the CPU)
	* implemented a read-only PCI emulation interface based on the values
	  found at init. This only applies to selected PCI devices (eg VGA)
	* use PCI emulation by default with console graphics if PCI is available,
	  unless $_pci=(on)
	* allow I/O to all ports that PCI reports about VGA (closes #687024)
	* changed DPMI fn 0x800 to report about mmap'ed PCI memory areas, so
	  that LFB's work in the console
	* removed now obsolete $_console_pci and $_console_ports

2004-10-08  Bart

	* src/env/video/console.c:
	If the Linux console uses fbcon we can force a complete text redraw
	by doing two (round-trip) vc switches; otherwise (vgacon) it doesn't hurt.

	* src/: env/video/vc.c, env/video/vga.c, include/vc.h:
	Only reprogram the graphics and sequencer registers like they are in
	VGA mode 12 when saving/restoring video memory. Skipping the CRT registers
	is sometimes a little easier on the eye, when fbdev causes
	dosemu_vga_screenoff() not to do its job.

2004-10-07  Bart

	* src/emu-i386/do_vm86.c:
	0x66 0xef should be "out dx,eax", NOT "out edx,eax".

2004-10-03  Stas

	* src/base/init/parser.y.in:
	Do not fallback to "direct" for unknown vnet mode, just abort the dosemu.
	Wrong configs should not be allowed.

	* src/dosext/net/net/pktnew.c:
	Do not fallback to dynamic TAP allocation if the requested static
	allocation fails.

	* src/base/misc/smalloc.c:
	smalloc: It turned out safer to fail on zero-sized mallocs, rather than
	to do nothing. Otherwise people expect realloc() to work on the pointers
	returned by malloc(0).

	* etc/dosemu.conf:
	Increased LFB size to 4Mb under X.

	* etc/dosemu.conf, src/base/init/parser.y.in,
	  src/dosext/net/net/libpacket.c:
	- Enabled Packet Driver by default.
	- Clarified the pkt-related options in dosemu.conf.
	- $_vnet="direct" added - same as $_vnet="".

2004-10-02  Stas

	* src/base/serial/ser_ports.c:
	Dont reset "data ready" before the receive queue is empty.
	(Should fix #1029819)

2004-09-30  Bart

	* src/dosext/mfs/mfs.c:
	Include lfn.h (compiler warning)

2004-09-29  Bart

	* src/dosext/misc/xms.c:
	Removed some unnecessary #includes and function.

	* src/: dosext/misc/xms.c, env/video/vesa.c, include/vesa.h:
	Split off VESA definitions into a global header file.
	Always use the "aggressive" way to find UMBs (this is really the clean
	way, the real difference for umb_max is in video.c).
	For this to work the VGAEMU BIOS has to be registered though (in vesa.c).

	* src/arch/linux/mapping/mapping.c:
	Allow kmem mmaps with non-fixed targets.

2004-09-27  Stas

	* src/: include/smalloc.h, base/misc/smalloc.c:
	Made smget_area_size() signed.

	* src/dosext/dpmi/dpmi.c:
	Install the realmode callback trampoline only when program allocates
	the callback. This fixes some extremely buggy program. (Bug #1033901)

	* src/: dosext/dpmi/dpmi.c, dosext/dpmi/dpmi.h, emu-i386/do_vm86.c:
	More accurate realmode callback address calculations.

	* src/base/misc/smalloc.c:
	smalloc: smget_area_size() should return -1 on failure, since 0 can be valid
	(found by megath@users.sourceforge.net)

	* src/base/misc/smalloc.c:
	smalloc: realloc(NULL, size) should work as malloc(size), rather than to fail.
	Bug found by megath@users.sourceforge.net.
	I was sure there are no bugs in smalloc... but dosemu never uses that trick.

2004-09-26  Bart

	* src/base/mouse/mouseint.c:
	Don't (un)freeze the mouse if there is no mouse,  because if we do that
	we get a SIGSEGV.

	* src/env/video/console.c:
	Don't clear the Linux console screen for $_graphics=(1). This will happen
	later anyway.

	* src/env/video/svgalib.c:
	Remove (now) useless #undef SVGALIB_C

2004-09-26  Stas

	* src/base/async/int.c:
	- NULL checks in xtitle code.
	- Replaced !strlen(str) with !str[0] - cosmetic.

	* src/emu-i386/ports.c:
	Make dosemu to work again.

2004-09-25  Bart

	* etc/dosemu.conf, etc/global.conf, src/base/init/lexer.l.in,
	  src/base/init/parser.y.in, src/emu-i386/ports.c,
	  src/include/port.h:
	- export trace_ports from global.conf to dosemu.conf
	- ports are now fast by default unless they are mentioned in $_trace_ports
	- using explicit "fast" or "slow" it is possible to force the ioperm
	  independently of any tracing set -- based on patch #1019824

2004-09-24  Bart

	* src/dosext/mfs/: lfn.c, lfn.h, mfs.c:
	LFN: only explicitly close findfirst handles for ax=71a1, not if no more
	files are found. For unknown filehandles, chain through to DOS to give
	DOSLFN a chance if that is loaded.
	A process termination hook closes all findfirst handles connected to
	the PSP that is terminated.

2004-09-23  Stas

	* src/dosext/dpmi/msdos.c:
	Fix 2 silly bugs in msdos_pre_exec() noticed by Japheth (Bug #1028236)

2004-09-22  Bart

	* src/arch/linux/async/signal.c:
	Remove the signal wrapper wrapper again -- it may not work with some old
	glibc's. So may be worse after all than simply bypassing the wrapper.
	Now detect if glibc installs a wrapper, and if it does, use the kernel
	sigaction instead to force the kernel to call our handlers directly.

	* src/dosext/mfs/lfn.c:
	LFN: don't return . and .. in findfirst/next for root directories.
	don't clobber the getcwd dest more than absolutely necessary.
	small cleanup of /. removal -- this is already done by truename now

2004-09-16  Stas

	* src/base/misc/smalloc.c:
	Cosmetic optimization for smalloc.

2004-09-15  Bart

	* src/env/video/X.c:
	Fix X.c to choose a better fitting resolution if (say) both 320x240 and
	320x200 modes are defined in XF86Config.

	* src/: base/bios/bios.S, dosext/mfs/lfn.c, dosext/mfs/mfs.c:
	Fix two bugs in the LFN support as per #1020635:
	* do not remove embedded spaces before dots and leading spaces.
	* fix interface between int21/ax=716c and int21/ax=6c00 to only transform
	  a "create" into an "open" if a file was really created, not if it already
	  existed, and to set cx to "created" (2).

2004-09-15  Stas

	* src/base/misc/smalloc.c:
	Small improvements and optimizations to smalloc.

2004-09-14  Stas

	* src/plugin/commands/builtins.c:
	com_dosallocmem()/com_dosfreemem() are no longer necessary.
	Why lowmem_alloc()/lowmem_free() are still there is because the
	builtins used to have many memory leaks and other mem violations.
	So allocating a private 2K pool for them is safer than to allow
	them to allocate from the main 32K pool. At least for a time.

	* src/: base/bios/bios.S, base/init/init.c, base/misc/Makefile,
	  base/misc/lowmem.c, include/lowmem.h, include/memory.h,
	  plugin/commands/builtins.c:
	- Shuffled the bios.S a bit to get a 32Kb of low memory for free.
	- Added a management for it - lowmem.[ch]. This is needed for VESA
	support.
	- Since the VESA support is not there yet, the usual victim is builtins,
	which are moved to use that heap instead of the on-fly DOS allocation
	that may be not always safe.

2004-09-13  Stas

	* src/: arch/linux/mapping/mapfile.c, base/misc/Makefile,
	  base/misc/pagemalloc.c, dosext/dpmi/memory.c,
	  include/pagemalloc.h:
	smalloc replaces pagemalloc. The advantages:
	- Allocations are not limited with the page-granularity.
	- Doesnt require garbage-collection and therefore probaly has fewer bugs.
	- Much simpler and smaller code (4K vs 12K).

	* src/: base/misc/Makefile, base/misc/smalloc.c,
	  base/misc/zalloc.c, env/video/matrox.c, env/video/vga.c,
	  include/smalloc.h, include/zalloc.h, plugin/commands/builtins.c:
	Introducing the new memory allocator - smalloc. It is intended to
	replace both zalloc and pagemalloc and being suitable for the VESA
	driver.
	- Replaced zalloc allocator by smalloc. smalloc is only 4K of code,
	compared to 12K of zalloc. The advantages over zalloc:
	-- Has realloc() (smrealloc)
	-- Has normal free(), which doesn't require to specify the length to free.
	-- Code is much smaller and almost as simple as of zalloc.

	* src/: dosext/mfs/mfs.c, emu-i386/do_vm86.c, include/emu.h,
	  plugin/commands/builtins.c, plugin/commands/builtins.h,
	  plugin/commands/commands.c, plugin/commands/dosdbg.c,
	  plugin/commands/lredir.c, plugin/commands/unix.c,
	  plugin/commands/xmode.c:
	Fix dozens of memory violations in builtins, mostly detected by the
	smalloc memory allocator. The fixes include (but not limited to the)
	following:
	- Cease the usage of the low mem considerably by calling the helpers
	directly.
	- Protect do_call_back() against re-entering. This was happening
	when eg. cmdline is interrupted by ^C, it was not able to recover.
	- Track all the allocations of load_and_run_DOS_program() to free it
	on termination (leaks).
	- On dos_read()/dos_write() set int0x23 to our return point, so that
	dosemu can recover even in case of ^C.
	- Fix com_strfree() to free the region of a proper size.
	- dos_helper_r is no longer necessary.
	- com_dosread() was not checking the size specified by caller -
	memory corruption.
	- memory corruption with builtin_name, no longer use DOS mem for it.
	- etc...

	* src/emu.c:
	Fix gcc warning.

	* src/include/shared.h:
	shared.h must die.

	* src/include/emu.h:
	Video memory size should not be of a short type.

2004-09-11  Bart

	* VERSION, configure, configure.ac, src/plugin/commands/generic.S:
	Make generic.S backwards compatible with older DOSEMUs so we can easily
	use DOSEMU 1.2 & 1.3 at the same time. Bump version code to 1.3.1.1
	so that generic.S can do a runtime check. Remove obsolete pthread
	comment in configure.ac (forces reconfigure).

2004-09-10  Bart

	* src/: emu-i386/do_vm86.c, arch/linux/async/signal.c:
	Force restoration of GS before signal handlers but only if
	the libc uses signal wrappers and GS != 0.
	Also restore flags/fs/gs after a vm86 call to work around a bug
	in 2.4 kernels.
	The implementation is hackish -- any beautification improvements
	are welcome, but it seems to work.

	* src/: include/emu.h, arch/linux/async/signal.c:
	Move common sigaction calling code into one static function
	(dosemu_sigaction_wrapper).

	* src/: emu.c, arch/linux/async/signal.c, include/emu.h,
	  base/misc/ioctl.c, emu-i386/simx86/cpu-emu.c, env/video/vc.c,
	  plugin/term/terminal.c:
	Convert ADDSET_SIGNALS_THAT_QUEUE, SETSIG, NEWSETSIG, and NEWSETQSIG from
	macros to functions.

2004-09-10  Stas

	* etc/dosemu.conf:
	$_oss_stalled_frags=(2) - this enables aoss to work.

	* src/emu.c:
	Dont close mouse twice, doing that in iodev_term() is enough.

2004-09-09  Stas

	* src/: include/cpu.h, arch/linux/async/signal.c,
	  dosext/dpmi/dpmi.h, emu-i386/cpu.c:
	Optimization: ucodesel/udatasel are unnecessary, use _emu_stack_frame
	instead.

	* src/: arch/linux/async/sigsegv.c, dosext/dpmi/dpmi.c:
	Prevent DPMI from trashing the entire LDT at startup! This makes
	pthreads much happier, and it was a horrible bug overall.

2004-09-08  Stas

	* src/: arch/linux/async/signal.c, include/emu.h:
	SIGWINCH was hijacked and no longer works for console switching.
	Changed to USR1 - now the console switching works again.

	* src/: base/mouse/mouseint.c, env/video/vc.c, include/mouse.h:
	closing/reopening mouse on console switch doesnt work: we need to call
	DOSEMUMouseSetup() (at least) after opening, but we dont.
	It is better to not close it at all, just halt reading it should be enough.

	* src/plugin/kbd_unicode/keyb_raw.c:
	set_shiftstate() in raw_keyboard_init() causes NULL deref.

	* src/env/video/: svgalib.c, svgalib.h, vga.h:
	There is no conflict anymore between <vga.h> and "vga.h" so svgalib.c
	can include both and svgalib.h can have the extern defs removed.

2004-09-04  Stas

	* src/dosext/dpmi/msdos.c:
	From japheth@users.sourceforge.net:
	Support for the following LFN functions added to PM API translator:
	3b, 41, 4e, 4f, 47, 6c, a1.

	* src/dosext/dpmi/msdos.c:
	Stop assuming 0 being in some regs and converted the mess to use the
	prominent macros.

2004-09-02  Stas

	* src/plugin/commands/: builtins.c, detect.h, generic.S:
	dosemu builtins locks up the machine if started under pure DOS.
	Fixed detect.h and used it to prevent that.

2004-09-01  Stas

	* src/plugin/commands/builtins.c:
	typo.

	* src/dosext/dpmi/dpmi.c:
	A little more info on exception.

	* src/plugin/commands/: Makefile, builtins.c, builtins.h,
	  generic.S, lredir.c, config/plugin_config.h,
	  config/plugin_inte6.h:
	Builtins plugin work:
	- Recursive invocations (unix -r et al) were not handled properly:
	every new invocation allocated the new mem pool, making the previous
	pool unaccessable. Now only one pool is allocated. Refcounting added
	to know when the pool is safe to destroy.
	- The above is an incompatible change for generic.S. Introduced the
	builtins interface versioning. Now if dosemu detects the outdated
	version of builtins, it will not run them and will ask user to upgrade.
	- Removed the code that was intended to allow calling builtins with
	far call. This code was never used and was broken since generic.S
	started to release memory at startup.
	- Moved DOS version checking from builtins.c to lredir.c.

	* src/base/serial/ser_init.c:
	Unlink the stalled lockfiles for serial and some debug messages cleanup.

	* src/emu.c:
	Remove dummy ign_sigs sighandler for leavedos() - our main sighandler
	is now mature enough to handle that, and also this will allow to get
	the stack traces from within the leavedos.

2004-08-30  Stas

	* src/: arch/linux/async/signal.c, emu-i386/do_vm86.c,
	  plugin/kbd_unicode/serv_8042.c,
	  plugin/kbd_unicode/serv_backend.c:
	- Completed the unbinding kbd code from PIC recursion.
	- keyb_server_run() must now be called more frequently, so moved from
	sigalrm handler to loopstep_run_vm86().

	* src/plugin/sdl/sdl.c:
	Please use -Wdeclaration-after-statement gcc option.

	* src/base/serial/: ser_irq.c, ser_ports.c:
	Dont try to clear FIFO when it is not enabled (bug #1012035).

2004-08-29  Bart

	* etc/global.conf:
	Fix problem with in global.conf with $_term_char_set.

	* src/base/misc/Makefile:
	Simplify the Makefile for src/base/misc.

	* src/base/misc/Makefile:
	Fix possible compilation problem (#1007380) that happened in some
	circumstances.

2004-08-28  Bart

	* configure, configure.ac, etc/global.conf,
	  src/plugin/term/terminal.c:
	Allow the utf8 patched slang to be linked in.
	Use "default" (mbrtowc and wcrtomb, following LC_CTYPE) for the output
	charset unless $_external_charset is specified.
	Switch the console to cp437 mode only if "linux" is in $TERM and the
	external character set is single-byte.
	The terminal code can now work with multibyte output character sets
	(including utf-8), if the patched slang (and hopefully slang 2.0 when it's
	released) is used.

	* src/plugin/translate/translate_config.c:
	Use the default (multibyte) charset for the unix_charset instead of
	manually playing with nl_langinfo.

	* src/plugin/translate/charsets/: multibyte.c, utf8.c:
	Fix a bounds check that was the wrong way around in multibyte.c.
	Fix unicode to utf8 conversion for 1- and 2- bytes sequences.

	* src/: arch/linux/async/signal.c, plugin/term/terminal.c:
	Move SIGWINCH sig init to the terminal init function and correct a
	problem where ctrl-alt-fn didn't work on the console with rawkeyboard
	in terminmal mode. Also made sure that vga.text* are set to the right
	values for non 80x25 terminals.

2004-08-15  Stas

	* src/: plugin/kbd_unicode/serv_8042.c, env/video/video.c:
	Repair $_speaker="native":
	- It should not use fast port access, it should go via portserver
	- Dont always disable it, the bug with killing linux is already fixed.

	* src/: base/bios/bios.S, plugin/kbd_unicode/serv_8042.c,
	  plugin/kbd_unicode/serv_backend.c:
	Attempt to unbind the keyboard code from the PIC recursion.

2004-08-15  Bart

	* src/plugin/sdl/sdl.c:
	Add support for resizing windows with SDL

	* Makefile.conf.in, compiletime-settings,
	  compiletime-settings.devel, etc/global.conf,
	  src/base/init/config.c, src/base/mouse/mouse.c,
	  src/base/mouse/mouseint.c, src/env/video/X.c,
	  src/env/video/text.c, src/env/video/video.c, src/include/mouse.h,
	  src/include/vgatext.h, src/include/video.h,
	  src/plugin/kbd_unicode/include/keyb_clients.h,
	  src/plugin/sdl/Makefile, src/plugin/sdl/Makefile.conf.in,
	  src/plugin/sdl/acinclude.m4, src/plugin/sdl/configure,
	  src/plugin/sdl/configure.ac, src/plugin/sdl/keyb_SDL.c,
	  src/plugin/sdl/mouse_SDL.c, src/plugin/sdl/sdl.c,
	  src/plugin/sdl/sdl.h, src/plugin/sdl/config/plugin_config.h.in:
	Added SDL plugin, based on the initial patch by Emmanuel Jeandel.
	Mostly functional, tested for X and fbdev.
	Start dosemu with the -S switch to use it.
	Still missing: dynamic window resizing, ctrl-alt-f/home, keyboard repeat,
	OpenGL/Overlay optimizations, PC speaker support, copy/paste, xtitle.

2004-08-14  Stas

	* src/: base/bios/bios.S, dosext/dpmi/dpmi.c, dosext/dpmi/dpmi.h,
	  dosext/dpmi/msdos.c, emu-i386/do_vm86.c, include/bios.h:
	Allocate realmode callbacks on a client's data area. This allows the
	client to allocate all the 16 callbacks (and avoids any limitations
	on the amount of clients), while still being able to use those of its
	parents parents parents

2004-08-14  Bart

	* src/: env/video/X.c, env/video/render.c, include/render.h:
	Introduce new function (get_mode_parameters() in render.c), which translates
	the vgaemu mode parameters into a convenient display mode.

	* src/: env/video/X.c, env/video/remap.h, env/video/vgaemu.c,
	  include/vgaemu.h, plugin/kbd_unicode/keyb_X.c,
	  plugin/term/terminal.c:
	Move vgaemu_display_type fill-in of fields from X.c to vgaemu.c (vga_emu_init)

	* src/: env/video/X.c, env/video/text.c, include/vgatext.h:
	Move resize_text_mapper() from X.c to text.c.

	* src/: env/video/X.c, env/video/render.c, include/render.h:
	Move the graphics update-related functions from X.c to render.c.
	Simplify the put_ximage interface as src_x/y are always equal to dest_x/y
	the way we call it.

2004-08-13  Bart

	* src/base/dev/misc/lpt.c:
	Fix printer code problem by making all fops members static and the public
	printer_* functions wrappers.

	* src/: arch/linux/async/signal.c, env/video/X.c, env/video/text.c,
	  include/video.h:
	Removed X_blink_cursor (use blink_cursor() in text.c instead) and made the
	call independent of config.X.

2004-08-11  Stas

	* src/dosext/net/net/pktnew.c:
	Small cleanup.

	* src/dosext/dpmi/msdos.c:
	Disable VXDLDR: some DOS progs think they can use it to load vxd
	and crash.

2004-08-09  Stas

	* src/base/dev/pic/pic.c:
	Misplaced bracket in do_irq() caused problems for console mouse
	driver (probably also in 1.2).

	* src/: base/dev/misc/rtc.c, base/dev/misc/timers.c,
	  base/dev/pic/pic.c, base/init/init.c, base/misc/ioctl.c,
	  base/mouse/mouse.c, base/serial/ser_defs.h,
	  base/serial/ser_irq.c, dosext/net/net/pktnew.c,
	  dosext/sound/sound.c, include/emu.h, include/iodev.h,
	  include/mouse.h, include/pic.h, include/pktdrvr.h,
	  plugin/kbd_unicode/serv_8042.c,
	  plugin/kbd_unicode/include/keyb_server.h:
	- Removed global variable pic_ilevel. ilevel is now passed as an argument
	to IRQ handlers. This is another step to upcoming removal of the recursion
	from PIC.
	Note: This change may yield bugs!
	- Fixed packet driver to work with that technique. Other drivers must be
	carefully tested (well, whats the use, they'll be broken again anyway
	when the recursion is removed:).

	* src/base/dev/pic/pic.c:
	Set ISR bits only in do_irq(). We don't need to clear them in
	run_irqs() then, which makes it easier to remove recursion from PIC
	without fixing all the drivers that produce the spurious interrupts.

2004-08-08  Stas

	* src/emu-i386/do_vm86.c:
	Small cleanup.

	* src/: env/video/Makefile, env/video/X.c, env/video/render.c,
	  env/video/text.c, include/render.h, include/vgatext.h,
	  plugin/term/terminal.c:
	Introduce render.c and render.h which form the middle layer between
	SDL and X and the remapper. One global remap_obj (hopefully a file scope
	static later) is defined in render.c.

	* src/dosext/dpmi/memory.c:
	Allocate 5 extra pages for DPMI pool to work around the possible
	memory fragmentation and potential pagemalloc bugs.

	* src/base/misc/pagemalloc.c:
	pagemalloc was refusing the last page.

	* src/dosext/dpmi/dpmi.c:
	Dont touch hi words of %eax/%ebx in dos memory functions of DPMI.
	(Bug #1004472)

	* src/dosext/dpmi/dpmi.c:
	Inherit the realmode callbacks on DPMI client creation. (Bug #1005015)

	* src/base/serial/ser_ports.c:
	Dont tcdrain() after transmitting the char as slows the transfer.
	There might be better ways to avoid queueing.

2004-08-07  Bart

	* src/: arch/linux/async/signal.c, arch/linux/async/sigsegv.c,
	  base/bios/int10.c, env/video/X.c, env/video/console.c,
	  env/video/dualmon.c, env/video/hgc.c, env/video/video.c,
	  include/video.h, plugin/term/terminal.c:
	Eliminated is_mapped field in Video, using checks whether the
	update_screen function pointer is NULL instead.
	Since update_screen now always goes through vgaemu we can use this to
	check for vgaemu instead of config.X.
	Add handle_events function pointer.

2004-08-01  Bart

	* src/: arch/linux/async/signal.c, arch/linux/async/sigsegv.c,
	  base/bios/int10.c, base/mouse/mousevid.c,
	  emu-i386/simx86/interp.c, emu-i386/simx86/sigsegv.c,
	  env/video/X.c, env/video/X.h, env/video/text.c,
	  include/vgatext.h:
	Remove many X_GRAPHICS and X_SUPPORT #ifdefs that are no longer necessary.
	Move (X_)set_textsize from X.c to text.c

2004-07-31  Bart

	* src/: env/video/X.c, env/video/text.c, plugin/term/terminal.c:
	Solve link problem when X is enabled with have_focus.

	* src/: emu-i386/ports.c, env/video/Makefile, env/video/miscemu.c,
	  env/video/remap.h, env/video/vgaemu.c, include/vgatext.h,
	  plugin/term/terminal.c:
	Use vgaemu for the terminal code and unconditionally compile vgaemu support.

2004-07-30  Bart

	* src/arch/linux/mapping/mapfile.c:
	Fix memory leak in case shm_open fails.

	* configure, configure.ac, src/arch/linux/mapping/mapfile.c,
	  src/arch/linux/mapping/mapping.c, src/include/config.h.in:
	Use shm_open and shm_unlink(). This is the new default for $_mapping = "auto"
	(tmpfile is the last resort); if it works out well we can remove mapshm.c later.

	* src/: emu.c, arch/linux/async/signal.c, include/emu.h:
	Allocate the signal stack on DOSEMU's stack instead of allocating it
	statically. Now it is possible to link with Linuxthreads without
	crashing, because the thread handling code is no longer confused
	about the thread id of the stack it is using.

	* configure, src/base/mouse/gcursor.c, src/base/mouse/mouse.c,
	  src/base/mouse/mousevid.c, src/base/mouse/mousevid.h,
	  src/include/config.h.in:
	Rename current_video to mouse_current_video, because of a namespace conflict
	with SDL.

2004-07-29  Bart

	* src/: env/video/X.c, include/vgatext.h, env/video/text.c:
	Move conversion from text map to bitmap in bitmap_draw_string() from X.c
	to text.c.

2004-07-27  Bart

	* src/env/video/Makefile:
	Adjust env/video/Makefile to text.c split.

2004-07-26  Bart

	* src/: include/vgatext.h, env/video/X.c, env/video/text.c:
	(Originally by Emmanuel Jeandel) Split most of the X-independent
	text mode functionality from X.c. That will make it easier to
	implement SDL support.

2004-07-22  Stas

	* src/arch/linux/async/: signal.c, sigsegv.c:
	- Invoking gdb in cleanup_child() is useless
	- Invoke gdb in dosemu_fault() before printing an exception info,
	because printing exception info can sigsegv itself.

2004-07-21  Stas

	* src/arch/linux/dosext/sound/linux_sound.c:
	Write some diagnostic when DSP open fails.

2004-07-19  Stas

	* src/base/dev/misc/lpt.c:
	reset_idle() when printing, and some cleanups.

	* src/dosext/dpmi/memory.c:
	Fix return value check.

	* src/dosext/dpmi/: dpmi.c, dpmi.h, memory.c, msdos.c:
	Attempt to separate committed and uncommitted memory handling on a
	DPMI level. DPMI spec says "Resize Linear Memory Block" (0x505) cannot
	be used on a block allocated with "Allocate Memory Block" (0x501), but
	only on a block allocated with "Allocate Linear Memory Block" (0x504).
	That helps.

	- DPMImalloc() splitted into DPMImalloc() and DPMImallocLinear()
	- DPMImallocFixed() merged into DPMImallocLinear()
	- DPMIrealloc() splitted into DPMIrealloc() and DPMIreallocLinear()
	- "Resize Linear Memory Block" can now create uncommitted pages.

2004-07-17  Stas

	* src/: dosext/dpmi/dpmi.c, arch/linux/async/sigsegv.c,
	  dosext/dpmi/dpmi.h:
	- Make CheckSelectors() to not terminate dosemu, but just to return
	whether the selectors are valid or not. The caller have to decide
	what to do.
	- Dont CheckSelectors() in direct_dpmi_switch() and indirect_dpmi_switch().
	Do it in dpmi_control() instead, which is within dosemu context.

	This all results in that dosemu now drops to dosdebug when encounters
	the invalid selector. A bit easier to debug.

	* src/dosext/dpmi/dpmi.c:
	Check stack segment against being read-only.

2004-07-16  Stas

	* src/dosext/dpmi/msdos.c:
	Clear higher word of %ebx when returning the DTA pointer.
	(bug #991194, Japheth)

2004-07-15  Bart

	* src/env/video/X.c:
	Add bound checks for text cursor drawing. Fixes #990235

2004-07-14  Stas

	* src/dosext/dpmi/vxd.c:
	Fixed bug in VTD VxD (timer). It turned out that dos4gw, at least the
	one from Tenberry, uses this VxD when available, so some games were
	screwed up with the timing.

	* src/emu-i386/do_vm86.c:
	Put the DPMI IF hacks exactly where they used to be in dpmi.c, to avoid
	regressions.

	* src/: base/dev/pic/pic.c, dosext/dpmi/dpmi.c, emu-i386/do_vm86.c:
	Merge the real-mode part of run_dpmi() into run_vm86().
	This allows to remove the "main loop" from dpmi_init(), using the
	loopstep_run_vm86() also for DPMI.
	There is yet another "main loop" in do_irq(), but that would be more
	difficult to remove.
	Note: this is a moderately intrusive change.

	* src/: arch/linux/mapping/Makefile, arch/linux/mapping/mapfile.c,
	  arch/linux/mapping/mapping.c, arch/linux/mapping/pagemalloc.c,
	  arch/linux/mapping/pagemalloc.h, base/init/init.c,
	  base/misc/Makefile, base/misc/pagemalloc.c, dosext/dpmi/dpmi.c,
	  dosext/dpmi/dpmi.h, dosext/dpmi/memory.c, include/pagemalloc.h:
	Use pagemalloc for DPMI allocations since the kernel no longer meets the
	expectations of DOS progs. See comments in memory.c for details.
	This makes GTA to work again.
	What a mess in fact...
	This cannot be done effectively via mapping system because of the problems
	with uncommitted memory.
	This cannot be done via zalloc because zalloc lacks realloc.
	This patch does:
	- Make pagemalloc to manage multiple pools, and move it to src/base/misc
	- Allocate a memory pool for the committed DPMI allocations and manage it
	with pagemalloc. Uncommitted allocations, even after being committed, are
	still handled separately. This probably cannot be generalized.

2004-07-12  Stas

	* src/base/misc/: fatfs.c, fatfs_boot.S:
	Make it possible to terminate dosemu by "any key" when no OS to boot.

	* src/base/misc/fatfs.c:
	Specify the directory where's the OS files are expected to be.

2004-07-11  Stas

	* src/doc/HOWTO/EMUfailure.sgml:
	Updated for 1.2.2 (hi Bart :), removed outdated things because of the
	following events:
	 - Windows (winos2) runs fine
	 - Protected mode "make" runs fine since 1.2.1
	 - DPMI call 0x506 is implemented (in -devel only so far)
	 - Bitmap fonts backported
	 - Keen4 works, you just need the proper version of it.
	(please regenerate docs)

2004-07-11  Bart

	* ChangeLog:
	Update ChangeLog for 1.3.1

	* NEWS, dosemu.spec.in:
	Added one more NEWS entry. Adjust dosemu.spec.in.

	* README, THANKS, doc/EMUfailure.txt, doc/announce,
	etc/dosemu.conf, man/dosemu.1.in, man/dosemu.bin.1.in,
	src/arch/linux/Makefile.main:
	Some minor documentation updates.

	* src/: arch/linux/async/signal.c, base/misc/ioctl.c:
	Block all async signals before signal_init. Avoids that the portserver will
	catch any -- set_process_control is also called from raw_keyboard_init.

2004-07-10  Stas

	* src/dosext/dpmi/dpmi.c:
	(AllocateSpecificDescriptor): we dont need this anymore.

	* src/: base/mouse/mouse.c, base/mouse/mouseint.c, include/mouse.h:
	Dont enable mouse driver before post_boot.
	Dont process mouse events when driver is disabled, to avoid crash.
	Init mouse.speed_x and mouse.speed_y early to avoid divizion by zero
	at startup.

	* NEWS:
	Some more news worth to mention.

2004-07-10  Bart

	* ChangeLog.old, NEWS, ChangeLog, VERSION:
	Renamed old ChangeLog to ChangeLog.old
	The new ChangeLog is now a more GNU-style changelog based on the raw commit
	dates on log messages so we can track more easily when a specific change
	was made.
	User visible changes go into NEWS.

	* src/base/async/int.c:
	reset idle for int21 functions that output

	* src/: emu.c, emu-i386/ports.c, include/emu.h,
	arch/linux/async/signal.c, base/misc/ioctl.c:
	Block SIGIO until signal_init() is called. That's the easiest way to
	avoid problems...
	This makes it possible to avoid all the new extra code in ports.c.
	While I was at it I could remove some related old cruft.

	* src/env/video/vc.c:
	Limit memcpy for VC text mode switching to 32k. Avoids crashes if
	more than 25 lines are used.

2004-07-09  Bart

	* src/emu-i386/ports.c:
	Set all signals that dosemu changed either to a default or ignore
	handler. Unblock all of them.

	* src/dosext/mfs/mfs.c:
	Check for failed lseeks before reads and writes (may happen if the file
	offset is negative). Thanks to Jan Zuchhold <Jan@Zuchhold.com>

2004-07-08  Bart

	* src/arch/linux/mapping/mapshm.c:
	We need string.h for memcpy.

	* src/: base/bios/int10.c, env/video/miscemu.c, env/video/vgaemu.c:
	Fix two vgaemu regressions:
	fonts were wrong in 640x480 and 640x350 VGA graphics modes
	colours were wrong in these modes too
	Fixes some new issues with STDEMO.

	* src/: emu.c, emu-i386/ports.c:
	Fix for #984975. Easiest was after all to to do signal init before 
	deviceinit and port server fork. Then block *all* signals in the
	port server.

2004-07-06  Bart

	* src/: emu-i386/ports.c, include/cpu-emu.h:
	Remove i/o port restrictions for 0x400, asking ioperm instead.
	Will help when the kernel supports a larger bitmap.

	* src/base/bios/int10.c:
	Adjust int10 CGA palette support to do brightness correctly.
	Now and` old CGA pacman is yellow instead of brown as it should be.

	* src/: include/vgaemu.h, base/bios/int10.c, env/video/miscemu.c,
	env/video/vgaemu.c:
	Implement CGA register 0x3d9 emulation + BIOS support. Fixes colours
	in bug #958717

2004-07-05  Bart

	* src/env/video/vgaemu.c:
	Correct screen height for CGA modes (part of #958717)

	* configure, src/include/config.h.in:
	Regenerate configure and config.h.in

2004-07-04  Stas

	* src/dosext/dpmi/: dpmi.c, msdos.c:
	Small fixes and cleanups from the failed Win3.1 support (R/W LDT is
	completely dropped):
	- Never allocate the system descriptors for client (UCODESEL, UDATASEL)
	- Set ldt_buffer and pm_stack to NULL after free()
	- Zero out the entire client struct on DPMI init, rather than some of
	its parts.
	- Dsable NULL-ptr fixing code again.

	* configure.ac, src/dosext/dpmi/Makefile, src/dosext/dpmi/dpmi.c:
	We want windows.
	(please re-run autoheader and autoconf)

2004-07-04  Bart

	* src/base/bios/int10.c:
	Fix || which should be && of course to determine if we use a text or
	a graphics mode. Fixes #982872

	* src/base/mouse/mouse.c:
	Only init the xterm mouse once or you'll get a lot of traffic!
	Closes #959015.

	* etc/vga.bdf, src/env/video/X.c, src/env/video/vgafonts.c:
	The XCHAR kludge to translate 0 to 0x20 (' ') is only necessary for
	vga.pcf, not bitmap fonts. I've corrected vga.pcf but since people may
	use a different vga.pcf than ours (IIRC Debian has a seperate vgafonts
	package) I'll leave the kludge for non-bitmap fonts for the time being.
	In any case this fixes the zx_emul vertical bar problem (#911174)

2004-07-03  Stas

	* src/dosext/misc/emm.c:
	EMM fixes:
	- handle name is 8 bytes ASCII, but dosemu stores it as ASCIIZ,
	  therefore 9 bytes must be reserved.
	- Fix usage of NULL_PAGE, it is not a handle.

2004-07-02  Stas

	* src/dosext/dpmi/dpmi.c:
	OK, but then the ms-linker stops to work again...
	Well, with this hack they both work, but no guarantee something
	else is not broken (this is an obscure case anyway).

	* src/dosext/dpmi/dpmi.c:
	Be more conservative about fixing %esp. Apparently there are the DPMI
	clients that put esp above the TASK_SIZE (somewhere to 0xffffff80) and
	work perfectly (unless I "fix" %esp). No idea how they work, but...

2004-06-28  Bart

	* etc/global.conf:
	Ignore empty "drives" directories for $_hdimage="drives/*".

2004-06-27  Stas

	* src/dosext/dpmi/msdos.c:
	Re-enabled NULL-ptr fixing in msdos.c. This is required by the unmodified
	Win3.1 kernel (not WinOS2 fortunately).

	* src/dosext/dpmi/dpmi.c:
	Properly check for selectors allocation limit. Unmodified Win3.1 requests
	too many descriptors which crash dosemu.

	* src/: dosext/dpmi/vxd.c, dosext/dpmi/Makefile,
	dosext/dpmi/dpmi.c, dosext/dpmi/dpmi.h, dosext/dpmi/msdos.c,
	dosext/dpmi/vxd.h, base/bios/bios.S, include/bios.h:
	VxD hooks for WinOS2.
	This seems to solve all the remaining problems with Win3.1, namely:
	- Alt-Tab now works (SHELL VxD)
	- Timer now works (VTDAPI VxD)

	Note: win32s support is disabled for now - it needs some porting efforts and
	I have lost my test-cases for it.
	Note: Only protected mode entry points are supported. WinOS2 doesnt seem to
	be using the real-mode entry points, so I have not added those.

	It seems Win3.1/WinOS2 works perfectly now as far as I can tell, at least
	similar to how it works under QDPMI.

2004-06-26  Stas

	* src/dosext/dpmi/msdos.c:
	Dont trash %esi if cwd failed.

2004-06-22  Stas

	* src/dosext/dpmi/dpmi.c:
	Make the error message to work again.

	* src/dosext/dpmi/dpmi.c:
	Refer to our docs, not to external.

	* src/dosext/dpmi/memory.c:
	DPMIfree() & co must account only the committed pages. +Some cosmetic.

2004-06-21  Bart

	* src/env/video/s3.c:

	From Reinhard:
	There is a small problem with s3.c, so I can't use it with $_console=1 and
	$_graphic=1. (thanks to Michael)

2004-06-12  Bart

	* src/env/video/vgaemu.c:
	Hercules port range patch from Ryan Underwood.

	* etc/dosemu.conf, src/plugin/extra_charsets/bg-mik.c,
	src/plugin/extra_charsets/cp895.c:
	Add cp895 (Czech/Slovak) (ZUB@atlas.cz)
	Add bg-mik character set (Ivo Tachev, ivotachev@mail.bg)

2004-06-11  Bart

	* src/arch/linux/dosext/sound/midid/timid.c:
	I really have to make seqbuf_dump non-static to avoid the gcc warning...

2004-06-09  Stas

	* src/arch/linux/dosext/sound/midid/timid.c:
	Fix gcc warning.

	* src/: dosext/dpmi/dpmi.c, dosext/dpmi/dpmi.h, env/video/vc.c,
	include/emu.h:
	- Move _emu_stack_frame to emu.h - it must be globally available.
	- Restore fs/gs in console sighandlers - this way dosemu can survive the
	console switch on a NPTL-enabled systems.
	- Set NO_VC_NO_DEBUG to 0 - it only eats debug info.

	* src/arch/linux/async/debug.c:
	cat maps for the reason this time.

2004-06-07  Bart

	* src/env/video/instremu.c:
	From: dcoffin@cybercom.net
	To: bart@dosemu.org
	Subject: Incorrect bitshifts in instremu.c

	Hi Bart,

	     My fiancee really loves playing her old DOS games
	on DOSEMU, so thanks for the hard work!

	     Running my Scrabble game in DOSEMU, I saw visual
	defects.  After many hours of debugging, I traced the
	problem to instremu.c.

	     My code does "shl al,cl", which should set AL to
	zero when CL is 8.  But DOSEMU treats the 8 as though
	it were a zero.  No x86 CPU behaves this way.

	     According to the MASM reference:

	"On the 80186-80386 processors, shift counts larger than
	31 are masked off, but on the 8088 and 8086, larger shift
	counts are performed despite the inefficiency involved."

	     I experimentated with the other shift and rotate
	commands, and then made a patch to imitate the behavior
	of 80186 and later CPUs.  RCL and RCR are especially
	interesting...
	                                Dave Coffin  6/3/2004

2004-06-03  Stas

	* src/plugin/kbd_unicode/serv_8042.c:
	Allow booting with $_xms=(off).
	dosemu always maps HMA, regardless of the $_xms setting. This check does
	nothing but prevents dosemu from booting with $_xms=(off).
	Unfortunaltely Win98/DOS hates our XMS driver, so possibility to disable
	it, must work.

	* src/: arch/linux/debugger/mhpdbgc.c, base/data.c,
	base/dev/misc/lpt.c, base/misc/hma.c, base/misc/ioctl.c,
	dosext/dpmi/dpmi.c, dosext/misc/xms.c, dosext/net/net/pktnew.c,
	emu-i386/do_vm86.c, emu.c, env/video/vc.c, include/dosio.h,
	include/hma.h, include/xms.h, plugin/kbd_unicode/serv_8042.c:
	- dosio.h must die, use hma.h instead
	- small cleanups in hma.c
	- use separate a20_local and a20_global in xms.c

	* src/arch/linux/async/debug.c:
	The more debug info the better.

2004-05-31  Bart

	* src/dosext/mfs/mfs.c:
	Avoid fixed sized buffer and strcpy/strcat in exists()

2004-05-30  Bart

	* src/env/video/X.c:
	Use vga.seq.addr_mode == 2 instead of the number of planes to check for
	chain4 modes of planes. This fixes the Windows logo... #962683

	* src/arch/linux/mapping/mapshm.c:
	For realloc_mapping_shm we can't expand shared anonymous memory using mremap
	so we must allocate a new region and memcpy to it. Fixes a problem with
	WP 5.1's use of EMS

	* src/base/bios/int10.c:
	The int10 BIOS now determines whether a mode is text or graphics from
	the byte at 40:49. Also reduce use of global co and li by peeking these
	values from 40:xx. Eventually co and li should be completely removed.

2004-05-29  Bart

	* src/base/init/parser.y.in:
	Change stop_mouse c_printf to be a little more legible.

2004-05-29  Stas

	* src/dosext/dpmi/msdos.c:
	- Rewrote old_dos_terminate() as per suggestions in bug #909015
	- Disable fix-NULL-deref code as per suggestion in RFE #937984

2004-05-29  Bart

	* src/env/video/: X.c, vgaemu.c:
	Removed line_compare==0 workaround, since the CRTC init now initializes it
	correctly from the CRTC registers. Have to check at a few places in X.c
	to compensate. This fixes some display problems with bananoid.

	* src/env/video/X.c:
	Fix another scan_len case: fixes problems with resizing zx_emul. Only the
	bars remain.

2004-05-28  Bart

	* src/env/video/X.c:
	Force a redraw for bitmap text modes upon resizing. This helps for plain
	text modes but not for funny text modes such as the one zx_emul uses.

	* src/emu-i386/ports.c:
	Replace kernel 2.6 test as agreed upon during the last IRC

2004-05-25  Bart

	* src/env/video/crtcemu.c:
	Fix occasional wrong display or even page fault after an int10 mode change.

2004-05-24  Stas

	* src/dosext/dpmi/memory.c:
	Two use-after-free bugs in uncommitted mem code :(

2004-05-22  Bart

	* src/env/video/X.c:
	Fix hang when non-bitmap fonts were used.

	* src/env/video/: X.c, vgaemu.c:
	Decouple scan_len from co. Sometimes we must use scan_len instead of co...
	Since zx_emul has co=40 but scan_len=48 this is necessary.
	Now zx_emul displays everything correctly except for some annoying vertical bars
	I couldn't get rid off.

	* src/env/video/: X.c, vgaemu.c:
	Correct vgaemu height calculations and relax limits on columns on lines
	(as long as the product*2 is within 64k)

	* src/env/video/: X.c, seqemu.c, vgaemu.c:
	Respect sequencer for determining 8- or 9- pixel wide characters.
	X_update_text_screen should respect a changed display and resize.

	* src/: base/bios/int10.c, env/video/vgaemu.c:
	Text modes in X now update from the aliased memory (high up in the Linux
	address space), instead of 0xa0000-0xc0000; will be necessary to use
	instremu for text modes. Corrected one related screen_adr assignment.

	* src/dosext/dpmi/dpmi.c:
	Use syscall() for modify_ldt. Not sure if this fixes the Fedora problem yet
	but it is consistent with the other syscalls anyway.

	* src/: base/serial/ser_ports.c, arch/linux/async/sigsegv.c,
	dosext/dpmi/dpmi.c, dosext/dpmi/memory.c, include/Linux/serial.h:
	Avoid the direct inclusion of kernel headers that seem to creep in
	by using private copies.

	* src/base/init/parser.y.in:
	Reverted Stas' mouse change with respect to the parser. $_mouse_dev="" should
	not disable the mouse for X/terminal/gpm, only for console.

2004-05-20  Bart

	* src/: include/vgaemu.h, env/video/crtcemu.c, env/video/vgaemu.c:
	Implement CRTC readonly flag (thanks to the dosbox source code for the hint :-P)
	Fixes the myth bug --only 72 out of 200 lines were displayed (#930572)
	Stas please close if you can confirm.

2004-05-20  Stas

	* src/base/serial/ser_ports.c:
	Fix transmit IRQ triggering code of ser_ports.c. Closes bug #944346.

2004-05-19  Bart

	* INSTALL, src/emu-i386/ports.c:
	Added sanity check to see if catching port i/o works.

2004-05-18  Bart

	* src/dosext/net/net/ipxglt.c:
	ipx_interface really should get the same treatment as ipx_route...

2004-05-10  Stas

	* src/base/: mouse/mouseint.c, init/parser.y.in:
	Dont try internaldriver if $_mouse_dev=""

2004-05-09  Stas

	* src/: include/mapping.h, arch/linux/mapping/mapping.c,
	arch/linux/mapping/mapshm.c:
	Dont use mapshm if MREMAP_FIXED is not available (this was implicitly
	checked together with mremap(,0,...), but not any longer).

2004-05-08  Bart

	* configure, configure.ac:
	Respect CFLAGS as set by the user.

	* etc/global.conf:
	Repair $_cpu="emulated"

2004-05-08  Stas

	* src/arch/linux/async/debug.c:
	asprintf() is a GNU extension and needs _GNU_SOURCE before <stdio.h>

2004-05-08  Bart

	* etc/global.conf:
	Add missing endif.

	* configure.ac, default-configure, configure,
	src/base/bios/Makefile, src/env/video/Makefile:
	Don't use CFLAGS for the 16bit BIOS asm files. The -g in there confused
	binutils/gdb and that was the reason for the -gstabs+. Now we can just
	use the standard dwarf-2 debug info in dosemu.
	Also default-configure must check for gpm, not libgpm in compiletime-settings.

	* etc/global.conf:
	Remove warning that wasn't any more ...

	* etc/global.conf:
	Correct new problem with $_chipset

2004-05-07  Bart

	* src/arch/linux/async/: Makefile, debug.c, debug.h, signal.c,
	sigsegv.c:
	Added Stas' auto-gdb patch. I changed two small things: avoid buf[255]
	(potential buffer overflow), and also output what "ldd" says.
	getconf GNU_LIBC_VERSION must be quite recent (GLIBC 2.3+ I think) by
	the way, doesn't work here with 2.2.4
	getconf: Unrecognised variable `GNU_LIBC_VERSION'
	That doesn't hurt though.

	* etc/global.conf, src/base/init/parser.y.in:
	Limit use of strlen in global.conf; move com port processing into a loop.
	For some reason foreach doesn't always play nicely with if :(
	Don't define a serial port in the parser with an empty device ("virtual"
	still works though)
	Please check if this doesn't break your favourite configuration.

2004-05-07  Stas

	* src/base/serial/: ser_init.c, ser_irq.c, ser_ports.c:
	Next round of serial low-latency work: disable the internal timers.
	Now, with the async notifications, we can sync with the real thing instead.
	This gains 20sec improvement here at burning a flash in MC.

	* src/base/serial/ser_ports.c:
	Remove wrong IRQ triggering code from ser_ports.c. Part of bug #944346

2004-05-05  Bart

	* src/: include/video.h, base/init/parsglob.h,
	base/init/parser.y.in:
	Hopefully last bunch of gcc-3.4 adjustments. Compiles cleanly and works now.

	* configure, configure.ac:
	gcc 3.4 doesn't like -mcpu= anymore. Use -mtune= instead.

	* src/dosext/misc/emm.c:
	Avoid lvalue casts.

	* src/dosext/dpmi/dpmi.c:
	Avoid lvalue casts... What a mess, probably push/pop style macros would be
	cleaner...

	* src/: emu-i386/do_vm86.c, include/cpu.h:
	Avoid more deprecated casts. Not sure if prefix66 ^ prefix67 is the right
	thing for ecx... Have to look that up.

	* src/emu-i386/cpu.c:
	Fixed GCC 3.3.3 warning:
	cpu.c:154: warning: use of conditional expressions as lvalues is deprecated
	cpu.c:154: warning: use of cast expressions as lvalues is deprecated

	* src/emu-i386/cputime.c:
	Don't zero trigger1 after usleep.

2004-05-02  Bart

	* src/: base/async/int.c, base/bios/int16.c, emu-i386/cputime.c,
	include/timers.h:
	Consolidated all idling calls that use a trigger into one common function
	with a common trigger. All triggers now reset after each usleep(). Also
	the MFS resets the trigger. There may be more places where that is useful.

	* src/env/video/: X.c, remap.c:
	reconfig.mem should become 0 again after redrawing the text screen.
	fixed an x-offset bug in remap.c: now X.c can properly draw rectangles of
	texts, and not just screen-wide blocks.
	The combination of these two changes makes bitmap fonts much faster.

2004-05-01  Bart

	* src/arch/linux/mapping/mapshm.c:
	From Stas: use MAP_SHARED | MAP_ANONYMOUS instead of IPC.

2004-04-30  Bart

	* src/: arch/linux/mapping/mapping.c, env/video/vc.c:
	Repair !have_mremap_fixed and related vc code.

2004-04-29  Bart

	* src/base/async/int.c:
	Correct int15/ax=e801.

2004-04-29  Stas

	* src/dosext/dpmi/memory.c:
	Fix return value check.

	* src/: arch/linux/mapping/mapping.c, env/video/vc.c:
	- Make MAPPING_COPYBACK to work for MAPPING_KMEM and MAPPING_LOWMEM in all
	cases.
	- Map lowmem instead of unmapping KMEM - this makes the interfaces more
	consistent.

2004-04-26  Bart

	* src/dosext/net/net/ipxglt.c:
	From Michael Karcher: also check /proc/net/ipx/route for kernel 2.6

2004-04-25  Stas

	* src/: include/emu.h, plugin/kbd_unicode/prestroke.c:
	Fix memory corruption in keystroke handling + cleanups. Bug #909588.

2004-04-16  Stas

	* src/emu-i386/cpu.c:
	Fix some in_dpmi misuses. Noticed by japheth@users.sf.net, bug #934921.

2004-04-14  Stas

	* src/: arch/linux/mapping/mapping.c, dosext/dpmi/memory.c:
	Fix mprotect size, cosmetic.

2004-04-12  Bart

	* src/plugin/term/keyb_slang.c:
	Get rid of the "inconsistency in define key" warning message where it's
	harmless.

	* src/env/video/: vc.c, vga.c:
	Fix a couple of small new bugs encountered in the cleaned up video code.

2004-04-11  Bart

	* src/: arch/linux/mapping/mapping.c, env/video/vc.c,
	include/mapping.h:
	Mostly from Stas: use COPYBACK cap to avoid a temporary buffer when
	flipping between /dev/mem memory and low memory.
	Bart: clean up a bit, use size_t instead of off_t (off_t is a signed
	type used for file offsets!) and remove the root checks (if extended
	mremap is available).

	* src/: include/vc.h, env/video/console.c, env/video/vc.c,
	env/video/vga.c, env/video/video.c:
	Clean up vc get/put video ram routines. It should now be clear how and
	where to apply Stas' patch.

	* src/: emu.c, env/video/X.c, include/video.h,
	plugin/term/terminal.c, env/video/console.c, env/video/dualmon.c,
	env/video/hgc.c, env/video/video.c:
	Introduced a priv_init field for the video system. priv_init (for now) calls
	the old console driver init procedure. init calls the console driver
	post_init and for the terminal and X the normal init. Hopefully this doesn't
	break too much -- terminal and X still work.

2004-04-08  Bart

	* src/dosext/mfs/lfn.c:
	Implemented our own LFN filematch routine, with a little help from
	GLIBC. Special trick is to add a period if it's not there so that:
	dir *.
	matches all files without an extension.
	log and log? match log (==log.), but log?? doesn't match.

	* src/dosext/mfs/lfn.c:
	LFN: wildcard delete and findfirst/next need to match both sfn's and lfn's!
	-- in Win98 "dir *1.*" will give you almost all LFNs.
	Next stage will be to dumb down fnmatch with a custom version.

2004-04-07  Stas

	* src/dosext/dpmi/dpmi.c:
	Sanity check triggers false-positives.

2004-04-06  Stas

	* src/include/emu.h:
	Restart syscalls after EINTR. Should fix #885692.

	* src/: dosext/dpmi/dpmi.c, emu-i386/cpu.c, include/emu.h:
	Dont allow client stack to run above the dosemu stack. This is a loosy
	attempt to work around a ESP CPU bug. Seems to get the ancient MS linker
	to work. (bug #929123)

	* src/include/emu.h:
	linux-2.6 needs SA_NODEFER to allow the recursive signal handling. We need
	2 nesting levels of SIGSEGV sometimes. (part of bug #929123)

2004-04-02  Stas

	* src/dosext/dpmi/dpmi.c:
	Dont print debug info twice. Also avoids crash when trying to dump the
	content of an uncommitted page after a Page Fault.

	* src/: base/async/int.c, base/bios/bios.S, dosext/dpmi/dpmi.c,
	dosext/dpmi/msdos.c, dosext/dpmi/msdos.h, include/doshelpers.h,
	include/int.h, include/memory.h:
	- Added wrappers for DOS I/O (int21/ah=0x3f,0x40) to allow read/write >64K.
	- Added helpers to pass data between the high and low mem.
	- PM API Translator adjusted to use the new wrappers for I/O operations.
	- READ_DS_COPIED no longer needed, removed.
	This patch allows 32rtm to work. This is a noticeable step - 32rtm allows
	to run win32 console apps (PE).
	Many thanks to japheth@users.sourceforge.net for locating so many problems
	and providing a usefull hints.

2004-03-30  Bart

	* src/: dosext/mfs/lfn.c, dosext/mfs/mfs.c, dosext/mfs/util.c,
	include/dos2linux.h:
	LFN updates: ported FreeDOS' truename function to be able to handle
	int21/ax=7160 better, and to avoid escaping the drive letter "sandbox".
	"...." = "..\..\.." etc work too.
	Just like dir c:\foo\.. when foo does not exist (another DOS oddity).

2004-03-29  Bart

	* src/emu-i386/ports.c:
	Remove the munmap(low memory) in the portserver. It no longer
	makes sense.

2004-03-29  Stas

	* src/dosext/dpmi/memory.c:
	Always map the uncommitted mem to zeropage.

	* src/: arch/linux/mapping/mapping.c, base/init/init.c:
	- kmem_map_mapping() was necessary only to supply the lowmem hack.
	Since there is nomore a hack, kmem_map_mapping() is unnecessary.
	- add missing alloc_mapping() call.

2004-03-29  Bart

	* src/: emu.c, arch/linux/mapping/mapping.c, env/video/console.c,
	env/video/vc.c, env/video/vga.c, env/video/video.c, include/emu.h,
	include/video.h:
	Introduced video_post_init(): mmaps /dev/mem for video RAM and
	sets up VC switch functionality.  This allows for the complete
	removal of the mapping.c hacks.

	* src/: emu.c, arch/linux/mapping/mapping.c, base/dev/misc/lpt.c,
	base/init/dev_list.c, base/init/init.c, base/mouse/mouse.c,
	base/mouse/mouseint.c, base/serial/ser_init.c, emu-i386/cputime.c,
	emu-i386/ports.c, env/video/X.c, env/video/console.c,
	env/video/vc.c, env/video/video.c, include/emu.h, include/mouse.h:
	Seperate low memory initialization from the rest of the init and fixed
	a few NULL pointer dereferences...
	Note: this allows us to remove some hacks but by keeping a temporary
	fd to /dev/mem open during init we will also be able to mmap video
	ram after dropping privs, so more can be removed in mapping.c...
	Dropping privs can then be done much earlier, and also is independent
	from memory mapping.
	* printer: set BIOS values in printer_mem_setup()
	* video: set BIOS values in video_mem_setup()
	* dev_list: add mouse_reset and serial_reset handlers which just like
	  the keyboard reset handler fill in the BIOS values.
	* call the reset handler just before booting, not immediately after
	  the init handler
	* move the mouse_reset_to_current_video_mode() during init to
	  mouse_post_boot() (current_video_mode may be strange for fbdev now,
	  was 0....)
	* mouse.c: fixed sptr null dereference
	* mouseint.c: fixed mice->dev NULL deref
	* cputime.c: Video may be NULL for first console switches at init while
	  console code is playing with ioctls
	* ports.c -- can derive BIOS_VIDEO_PORT value from dosemu config
	* X.c check for config.X_font being NULL
	* removed a few superfluous calls to clear_screen() and set_video_bios_size()
	* vc.c: can't read the BIOS during the first get_video_ram and console
	  switch --- this really needs to be cleaned up...

2004-03-28  Stas

	* src/arch/linux/mapping/mapping.c:
	MAPPING_LOWMEM implies MAPPING_ALIAS.

	* src/dosext/dpmi/memory.c:
	Account only the committed memory for $_dpmi. Also properly account
	committing/uncommitting pages.

2004-03-28  Bart

	* src/arch/linux/mapping/mapping.c:
	Apply mremap /dev/mem areas functionality.
	Move old skip code over to new memory structure.
	Add #ifdefs for "REQUIRED_KERNEL_VERSION"

2004-03-27  Bart

	* src/arch/linux/mapping/mapshm.c:
	From Stas: replace kernel 2.6.1 check by a cleaner one.

	* src/: arch/linux/mapping/mapping.c, base/init/init.c,
	include/mapping.h:
	Move my hack from init.c to mapping.c, hoping to merge with Stas'
	technique in case mremap is not available.
	Only one file left to change now though...

	* src/: arch/linux/mapping/mapping.c, env/video/dualmon.c,
	env/video/hgc.c, env/video/matrox.c, env/video/vc.c:
	Next chunk of Stas' changes -- this one doesn't really do anything
	except for limiting the size of the patch I want to have a closer
	look at.

	* src/arch/linux/mapping/mapping.c:
	The basic changes need this one too, or DOSEMU is completely broken ...
	(sorry, my fault, Bart)

	* etc/global.conf, src/arch/linux/mapping/mapfile.c,
	src/arch/linux/mapping/mapping.c, src/arch/linux/mapping/mapshm.c,
	src/base/misc/hma.c, src/dosext/dpmi/memory.c,
	src/dosext/misc/emm.c, src/include/mapping.h,
	src/include/Linux/mman.h:
	The small part of Stas' mapping cleanups.
	Remove "console" from global.conf for $_graphics=(1) since it already
	implies "console" in the parser anyway.

2004-03-16  Bart

	* src/base/dev/misc/lpt.c:
	Fix memory leak.

2004-03-15  Bart

	* Makefile.conf.in, src/commands/Makefile,
	src/arch/linux/Makefile.main:
	Define LD at the right place. Remove unnecessary exports in
	Makefile.main

2004-03-13  Stas

	* src/dosext/dpmi/msdos.c:
	Fix bug in function 0x56 (rename file), from #909015
	Properly return the canonicalized filename to DPMI client
	(from bug #909015)

	* src/dosext/dpmi/: dpmi.c, memory.c:
	Escaped bits from previous commit (use RWX, not RW).

2004-03-12  Bart

	* configure:
	autoconf

2004-03-11  Bart

	* VERSION:
	Bump up VERSION in CVS already so people won't confuse it with 
	1.3.0 from the tarball.

2004-03-11  Stas

	* configure.ac:
	More escaped bits from the mapping redesign commit.

	* src/base/misc/: dosio.c, shared.c:
	Escaped bits from the mapping redesign commit.

2004-03-11  Bart

	* src/: arch/linux/mapping/mapping.c, base/init/init.c,
	include/mapping.h:
	Had to create an even bigger hack because the aliased low memory now
	overwrites any /dev/mem areas -- this broke console graphics.
	So we have to be careful to see which areas were already mapped to
	/dev/mem (using a char array that check if a page is /dev/mem or not)
	Hopefully with this working base I can start cleaning things up.

2004-03-10  Bart

	* src/dosext/dpmi/memory.c:
	Need to include "emu.h" before other headers to get config.h including
	_GNU_SOURCE...
	See /usr/include/features.h
	#ifdef  _GNU_SOURCE
	# define __USE_GNU      1
	#endif
	_GNU_SOURCE is documented. __USE_GNU is internal to Glibc (AFAICS)

2004-03-10  Stas

	* src/: arch/linux/mapping/mapping.c, arch/linux/mapping/mapshm.c,
	dosext/dpmi/memory.c, dosext/sound/sound.c,
	arch/linux/dosext/sound/midid/midid.c, base/dev/dma/dma.c:
	- Use RWX permissions for IPC SHM by default instead of RW,
	otherwise we end up with the non-executable first meg (but it
	didnt hurt since on x86 it is possible to execute regardless).
	- Update my e-mail address :)

2004-03-08  Stas

	* src/: emu-i386/do_vm86.c, include/emu.h,
	plugin/commands/builtins.c:
	Alowing interrupts during the callbacks proved to be reliable, making a
	default.

	* src/plugin/commands/comcom.h, src/plugin/commands/commands.c:
	Remove the remaining traces of comcom.

2004-03-07  Stas

	* src/dosext/dpmi/: dpmi.c, dpmi.h, msdos.c:
	Properly free segregs after freeing memory block (from bug #909015)

2004-03-07  Bart

	* src/: emu.c, arch/linux/mapping/mapfile.c,
	arch/linux/mapping/mapping.c, arch/linux/mapping/mapshm.c,
	emu-i386/ports.c, emu-i386/simx86/memory.c, include/mapping.h,
	include/vm86plus.h:
	Removed direct kernel interfaces where possible and replaced inline asm
	by syscall() otherwise -- the latter allows glibc to use sysenter and
	friends.
	The calls for syscall() are extended_mremap, dosemu_sigaction,
	vm86_old and vm86_plus. Note however that dosemu_sigaction is only
	called when sigaltstack is not supported.

2004-03-07  Stas

	* src/: base/bios/bios.S, dosext/dpmi/dpmi.c, include/bios.h:
	- Implemented extended exception stack frame (DPMI 1.0, needed by rtm32)
	- Allow Visible Page Faults (DPMI 1.0, needed by bug #909015 and rtm32)

	* src/: arch/linux/mapping/mapping.c, dosext/misc/emm.c,
	include/mapping.h:
	Update EMM to new mapping flag.

2004-03-07  Bart

	* src/: base/misc/disks.c, base/misc/utilities.c, include/disks.h,
	include/utilities.h, tools/periph/hdinfo.c:
	eliminate libless_llseek. For hdinfo we can use _FILE_OFFSET_BITS==64
	as it's standalone. For disks.c it's safer to explicitly use *64 calls.
	#ifdef __linux__ is a little optimistic but doesn't hurt :)

2004-03-07  Stas

	* src/: arch/linux/async/signal.c, arch/linux/debugger/mhpdbg.c,
	arch/linux/mapping/mapfile.c, arch/linux/mapping/mapping.c,
	arch/linux/mapping/mapshm.c, base/data.c, base/init/init.c,
	base/misc/Makefile, base/misc/hma.c, dosext/dpmi/dpmi.c,
	dosext/dpmi/dpmi.h, dosext/dpmi/memory.c, emu-i386/ports.c, emu.c,
	include/emu.h, include/mapping.h, include/memory.h:
	Mapping system revamp.
	- Added support for lowmem region, it is now a part of SHM segment.
	- Moved DPMI memory away from SHM segment.
	- Updated HMA, DPMI and other subsystems to the new mapping features.

	* src/dosext/dpmi/: dpmi.c, dpmi.h, msdos.c:
	Next part of bug #902742:
	- remaining issues with is_dos_selector() fixed.
	- couple of 16/32bit registers confusion fixed.
	dos_read/dos_write case is not yet.

2004-03-06  Stas

	* src/dosext/dpmi/: dpmi.c, dpmi.h, msdos.c:
	Allocate 6 realmode stacks for each DPMI client instead of 16 for 
	all clients. Blinker extender is now supported (closes SR #855611).
