2008-03-27 Bart * [r1853] ChangeLog, NEWS: DOSEMU 1.4.0.1 * [r1852] configure, configure.ac, src/commands/Makefile, src/plugin/commands/Makefile: Fix 64-bit compilation on 32-bit systems and vice versa. * [r1851] src/base/bios/hlt.c, src/dosext/mfs/mfs.c, src/plugin/kbd_unicode/keyb_raw.c: Fix more gcc warnings for 64-bit compilation. * [r1850] src/base/bios/int10.c, src/plugin/term/terminal.c: Cleaner fix for terminal memory map race. 2008-03-26 Bart * [r1849] VERSION: DOSEMU 1.4.0.1 * [r1848] Makefile: Remove configure.lineno on distclean. * [r1847] src/base/init/lexer.l.in: Avoid gcc-4.3 warning about unused input function in lexer. * [r1846] src/base/bios/int10.c, src/plugin/term/terminal.c: Add a call to video->update_screen to int10/ah=0 modesets to make sure the terminal is initialized. Fixes a race (though it should be done more cleanly). 2008-03-25 Bart * [r1845] src/arch/linux/dosext/sound/midid/timid.c, src/plugin/midimisc/mid_o_tmdty.c: In timidity plugin and midid code: use socketpair as a bidirectional pipe: older versions (current as of 2008 :( ) of timidity write to stdin and we can catch that to avoid waiting 3 seconds at select at DOSEMU startup. 2008-03-21 Bart * [r1844] src/dosext/mfs/lfn.c: Add missing "return" for LFN findnext error. Fixes #1801411: Running File Wizard crashes DOSEMU 1.4.0.0. * [r1843] src/plugin/term/keyb_slang.c, src/plugin/term/terminal.c: Added some diagnostics to check for UTF-8 terminal mismatches; "fixes" bug #1729556. 2008-03-18 Bart * [r1842] src/emu-i386/simx86/trees.c: Try to fix #1910153 again: we need to round to PAGE_SIZE for the loop termination test because of backwards jumps and NOJUMPS. * [r1841] src/emu-i386/simx86/codegen-sim.c: SF-Patch #1683073: handle 16bit address overflow in string instructions. Fixes overflow in the simulator of cpu-emu. Adjusted from Michael Karcher's patch. 2008-03-17 Bart * [r1840] src/emu-i386/simx86/trees.c: Bail out of node-to-invalidate check loop for the sorted list once the base (instead of the PC-beginning of the block) is past the affected address. Really fixes #1910153: SkyRoads failure: JIT fails some self-modifying code (Michael Karcher). 2008-03-16 Bart * [r1839] src/emu-i386/simx86/trees.h: Fix #1910153 SkyRoads failure: JIT fails some self-modifying code. The dnpc field needs to be signed because it can be negative and is compared to negative "int"s in BreakNode. 2008-03-11 Bart * [r1838] src/emu-i386/simx86/sigsegv.c: Patch #1910535, Michael Karcher: fix for "e_vgaemu_fault corrupts eip/rip" * [r1837] src/env/video/vgaemu.c: In Super-VGA modes, do *not* wrap memory at 256k. SF patch #1910415, Michael Karcher; fixes bug #1806787. 2008-02-18 Stas * [r1836] src/base/dev/dma/dmanew.c, src/base/dev/sb16/sb16.c: OK, the good-bye cannot be that rude any more. My apologies to the sound.c authors for that silly remark of mine and I hope you can do a good work on my code. 2007-12-06 Bart * [r1835] src/arch/linux/async/sigsegv.c: Use fpregset_t instead of _fpstate to avoid problems with Debian's glibc for x86_64. 2007-09-24 Bart * [r1834] src/emu-i386/simx86/codegen-sim.h, src/emu-i386/simx86/codegen-x86.h: Replace BT24 and BTA inline asm by C. 2007-09-23 Bart * [r1833] src/emu-i386/simx86/interp.c: Michael Karcher: #1800717 cpuemu: BOUND is signed. The current bound implementation does a signed compare instead of an unsigned one. This patch should fix it. * [r1832] src/base/async/int.c, src/base/dev/misc/lpt.c, src/emu-i386/simx86/interp.c: Implement the bound instruction (albeit fully interpreted). Make sure that int 5 does not try printscreen if there is no printer. * [r1831] src/emu-i386/simx86/interp.c: From Michael Karcher: #1763170 CPU emu: implement INTO correctly. The INTO instruction should generate the overflow execption only if the overflow flag is set, not on every invocation. * [r1830] src/emu-i386/simx86/interp.c: From Michael Karcher: SF #1763169 CPU emu: handle prefixed jumps correctly: The distance in a (not 8-bit) jump instruction is encoded according to operand size, not address size. There is some wrong documentation in this regard, even the processor reference manual I usually use. The size of CX used in JCXZ is depending on the address size, as correctly implemented in dosemu. * [r1829] src/emu-i386/simx86/interp.c: From Michael Karcher, #1763166 CPU emu: ignore access to unknown VGA ports Currently, dosemu crashes on read/write access to unhandled ports in the VGA range when cpuemu is enabled. While this is acceptable behaviour while developing, it is not helpful for the end user, who has a program probing for different SVGA cards by direct hardware access. 2007-06-11 Bart * [r1828] src/dosext/mfs/lfn.c, src/tools/Makefile: Fixed some warnings with 64-bit builds. 2007-06-05 Bart * [r1827] etc/global.conf, src/plugin/X/X.c: Fix $_X_winsize; also enable to use it, and X_aspect_43 with text modes with bitmapped fonts. 2007-06-04 Bart * [r1826] src/dosext/dpmi/msdos.c: Add DPMI API translation support for int21/ax=71a6. * [r1825] src/base/async/int.c, src/dosext/mfs/lfn.c, src/dosext/mfs/mfs.c, src/dosext/mfs/mfs.h, src/include/dos2linux.h: Implement the LFN handle functions int21/ax=5704,5,6,7, and 71a6. Also avoid using the set attribute ioctl on non-FAT filesystems. 2007-06-03 Bart * [r1824] dist/dosemu: Correct dosemu script. * [r1823] src/plugin/sdl/sdl.c: Fix SDL video mode chooser if only one mode is available. * [r1822] src/plugin/X/X.c: Fix "dosemu -w" for X and error messages for $DISPLAY not set. * [r1821] src/plugin/kbd_unicode/keymaps.c, src/plugin/term/terminal.c: Prompt if the keyboard layout can't be auto-detected. Initialize the SLang terminal screen draw routines as late as possible (the first time something needs to be drawn) so that other error messages can still be seen on the normal (non-SLang) terminal screen. * [r1820] dist/dosemu, dist/dosemu.bindist, dist/dosemu.systemwide, man/dosemu.bin.1.in, src/arch/linux/Makefile.main, src/base/init/config.c, src/include/emu.h, src/plugin/X/X.c, src/plugin/X/X_font.c, src/plugin/term/terminal.c: Move xset functionality to obtain the X fonts and the terminal < 25 lines warnings from dosemu to dosemu.bin. 2007-06-01 Bart * [r1819] src/base/async/int.c, src/base/bios/int10.c, src/base/dev/pic/pic.c, src/base/init/config.c, src/base/init/parser.y.in, src/base/misc/dump.c, src/dosext/dpmi/dpmi.c, src/dosext/mfs/mfs.c, src/dosext/mfs/mfs.h, src/dosext/misc/xms.c, src/dosext/net/net/pktnew.c, src/emu-i386/simx86/cpu-emu.c, src/include/Asm/vm86.h, src/include/machcompat.h: Change longs in vm86.h to ints to be consistent between x86-64 and i386. * [r1818] src/base/bios/int10.c, src/env/video/crtcemu.c, src/env/video/seqemu.c, src/env/video/vgaemu.c: Fix VESA text modes (fixes SR#1728817). 2007-05-30 Bart * [r1817] src/plugin/commands/generic.S: Fix preprocessor confusion. 2007-05-28 Bart * [r1816] src/base/async/int.c, src/base/misc/dos2linux.c, src/dosext/mfs/mangle.h, src/dosext/mfs/util.c, src/include/dos2linux.h, src/plugin/X/X.c, src/plugin/sdl/sdl.c, src/plugin/term/terminal.c, src/plugin/translate/include/translate.h, src/plugin/translate/translate.c: Better fix for X window titles & UTF-8. The title is now passed to the plugin using a wchar_t string. 2007-05-25 Bart * [r1815] src/dosext/mfs/lfn.c, src/dosext/mfs/mfs.c, src/dosext/mfs/mfs.h: Let find_file report FILE_NOT_FOUND or PATH_NOT_FOUND in an extra parameter depending on whether the directory where the file to be searched would be in exists or not. 2007-05-23 Bart * [r1814] src/base/init/parser.y.in, src/dosext/mfs/mfs.c, src/env/video/vgaemu.c: Fix a memory leak and some other issues found by Valgrind. 2007-05-21 Bart * [r1813] src/emu-i386/simx86/sigsegv.c: CPUEMU: do not mix up LDT accesses with emulator page faults, and translate non-zero based DPMI addresses to the correct pointer. 2007-05-18 Bart * [r1812] etc/global.conf, src/base/init/lexer.l.in, src/base/init/parser.y.in, src/env/video/vesa.c, src/include/emu.h: Use vgaemubios_file internally to get the Bochs BIOS to avoid mixing up with using it with console graphics, and be able to run it in a non-root console. * [r1811] src/doc/README/config, src/plugin/X/screen.c, src/plugin/kbd_unicode/include/keyb_clients.h, src/plugin/kbd_unicode/keyb_clients.c, src/plugin/translate/config/plugin_parser, src/plugin/translate/include/translate.h, src/plugin/translate/translate_config.c: Improve pasting in X into DOSEMU too, trying to ask for UTF-8, then iso2022, and then iso8859-1. This obsoletes the use of $_external_char_set for pasting. * [r1810] src/base/async/int.c: Add forgotten init memset of mbstate_t unix_state to 0. Fixes crash on x86-64. * [r1809] src/env/video/text.c, src/include/vgatext.h, src/plugin/X/screen.c: Improving pasting text from DOSEMU: follow guidelines about which character sets to use (in practise we must usually convert to UTF8 nowadays). * [r1808] src/plugin/kbd_unicode/keyb_clients.c: Check for -1 return from character_count (if an invalid multibyte character string is pasted for example), so DOSEMU won't crash. * [r1807] src/base/bios/int10.c: Add missing semicolon in int10.c * [r1806] src/arch/linux/debugger/mhpdbgc.c, src/base/async/int.c, src/base/misc/disks.c, src/base/misc/fatfs.c, src/base/misc/userhook.c, src/base/misc/utilities.c, src/dosext/mfs/lfn.c, src/dosext/mfs/mangle.c, src/dosext/mfs/mangle.h, src/dosext/mfs/mfs.c, src/dosext/mfs/mscdex.c, src/dosext/mfs/util.c, src/include/dos2linux.h, src/include/utilities.h, src/plugin/commands/builtins.c, src/plugin/commands/commands.c, src/plugin/commands/dosdbg.c, src/plugin/commands/lredir.c, src/plugin/commands/msetenv.c, src/plugin/commands/xmode.c: Force within-ASCII uppercasing for ASCII letters for toupperDOS and friends. Consistently use toupperDOS etc. functions instead of toupper etc. to avoid problems with the dotless i as used in Turkish and some other languages. In fatfs.c convert from the Linux to the DOS character set, and vice versa for the X title display. 2007-05-17 Bart * [r1805] src/base/bios/bios.S: Always covert ax=6cxx to 6c00 for the int21/ah=6c LFN->DOS converter. 2007-05-16 Bart * [r1804] src/env/video/vesa.c: Allow larger Bochs vgabios'es to be used than 32K. 2007-05-14 Bart * [r1803] src/emu-i386/simx86/interp.c: Implemented lock prefix (either ignored, or illegal op). 2007-05-13 Bart * [r1802] src/emu-i386/simx86/cpu-emu.c: SIMX86: Don't try to stretch time using RDTSC if $_rdtsc=(off) * [r1801] src/emu-i386/simx86/cpu-emu.c, src/emu-i386/simx86/interp.c: Push IOPL_MASK on the stack for pushf and int. Fixes vm86 mode detection of DOS4GW when $_dpmi=(off). * [r1800] src/arch/linux/async/signal.c: Revert DPMI-inability detection change from #1799. * [r1799] src/arch/linux/async/signal.c, src/arch/linux/async/sigsegv.c, src/dosext/dpmi/dpmi.c, src/dosext/dpmi/dpmi.h, src/emu-i386/simx86/sigsegv.c, src/env/video/vgaemu.c: When handling signals, check for a valid DPMI selector, which means that it is an LDT selector and not reserved by glibc or similar, e.g. for pthreads. Else, and that includes the whole GDT, assume we interrupt DOSEMU code. SystemSelector() in DPMI now refers to anything not covered by the above, plus dpmi_sel16 & dpmi_sel32. This fixes crashes with Xen-DOM0 on x86-64 where cs is 0x33 on entry to signal handlers but set to 0xe033 after the first syscall. 2007-05-11 Bart * [r1798] src/emu-i386/simx86/interp.c: Remove (replace by an e_printf) debug code that aborts CPUEMU if 4 or more 0's in a row are executed. Some .com programs do this to skip over data (Reinhard Karcher). * [r1797] dist/dosemu, src/emu.c: Moved DOSDRIVE_D environment manipulation from the dosemu script to dosemu.bin so it also works with sudo. * [r1796] src/arch/linux/async/debug.c, src/arch/linux/async/sigsegv.c, src/base/init/init.c: Reorganize some debug reporting a bit. uname and the GCC version number are now always reported in boot.log. Added some bug report instructions. * [r1795] src/plugin/X/X.c, src/plugin/sdl/sdl.c, src/plugin/term/term_core.c: Fix terminal init problem (no terminal input running xdosemu) if no dynamically linked plugins are used. * [r1794] default-configure: Check the default bitness of gcc, instead of blindly relying on uname. * [r1793] src/dosext/dpmi/dpmi.c, src/emu-i386/cpu.c, src/emu-i386/simx86/sigsegv.c, src/include/emu.h: Implement some workarounds for the CPU ESP bug. It is unlikely that it will be worked around in 64-bit kernels. Compare with segment limits instead of what is supposed to be kernel space (it isn't on x86-64). Fixes the ancient MS Linker and the Need For Speed demo on x86-64. 2007-05-10 Bart * [r1792] src/emu-i386/simx86/sigsegv.c: Do not patch code that has just tried to overwrite code instead of data. Fixes a crash with Larry. 2007-05-09 Bart * [r1791] src/dosext/mfs/mfs.c: As the read-only attribute is mostly ignored for directories in DOS, the dos_would_allow check for writable directories doesn't make much sense. Instead simply check if the file is writable. * [r1790] src/dosext/mfs/mfs.c: It is possible to work around the x86-64 FAT compat-ioctl kernel bug. Thanks to Wine. 2007-05-08 Bart * [r1789] src/arch/linux/async/signal.c, src/emu.c: Force $_cpu_emu="full", and do not crash, if %cs is not saved for signal handlers on x86-64 (kernels < 2.6.15, #1713659). * [r1788] src/arch/linux/dosext/sound/midid/oss.c, src/arch/linux/dosext/sound/midid/timid.c, src/plugin/midimisc/mid_o_oss.c: Declare *seqbuf_dump static before including soundcard.h. Hopefully that solves all warnings and errors with the variations out there. * [r1787] src/plugin/kbd_unicode/keymaps.c: Do not attempt to load the X plugin if X isn't compiled. * [r1786] src/dosext/mfs/lfn.c: int21/ax=7160/cl=1,2 must return an error if the file does not exist. Fixes problems with FreeCOM mkdir not preserving the LFN directory name. * [r1785] src/dosext/mfs/mfs.c: Ignore attempts to translate the archive and read-only attributes to Unix permissions for directories. Fixes problem with pkunzip (Joe Ripley, linux-msdos). 2007-05-07 Bart * [r1784] dist/autoexec.bat, dist/config.sys, src/base/async/int.c, src/plugin/commands/blaster.c: Reduce lines of output in config.sys, autoexec.bat, blaster, and the banner, so everything fits on 25 lines. * [r1783] src/dosext/mfs/lfn.c: Fix more illegal writes in the LFN code (crashed DJGPP gcc with cpuemu=vm86). 2007-05-06 Bart * [r1782] Makefile, Makefile.conf.in, src/Makefile.common, src/arch/linux/Makefile.main, src/commands/Makefile: Speed up 'make' a bit: - don't use bash anymore; remove bash-isms and eliminate pwd -P - don't use the intermediate tmp directory for make install anymore - use -rR make flags to ignore built-ins and made some built-ins explicit * [r1781] configure, configure.ac, src/plugin/kbd_unicode/configure, src/plugin/sdl/configure: Execute sub-configures by hand to avoid autoconf warnings and possible future breakage. * [r1780] Makefile.conf.in, configure, configure.ac, default-configure: Allow dash to be used as sh in out-of-tree builds. * [r1779] Makefile.conf.in: Do not forget sndfile and alsa libraries when building without dynamically loaded plugins. * [r1778] src/base/bios/int10.c: Implement INT10/AH=1c (save/restore video state) 2007-05-05 Bart * [r1776] ChangeLog, NEWS, dist/config.sys, dist/dosemu.bindist, dist/mkbindist: Last minute fix for 1.4.0: fix #1713278 COMSPEC setting wrong. Use config.sys/autoexec.bat distributed from here in the bindist instead of the one in dosemu-freedos-*-bin*. * [r1775] NEWS, ChangeLog: Release 1.4.0. * [r1774] INSTALL, README, README.bindist, doc/README.txt, doc/announce, src/base/init/install.c, src/doc/README/config, src/doc/README/header: More documentation updates; added a quick more basic introduction at the beginning of README.txt. 2007-05-04 Bart * [r1773] VERSION, doc/DANG.txt, doc/README-tech.txt, doc/README.txt, doc/announce, doc/dosemu-HOWTO.txt, etc/dosemu.conf, src/doc/DANG/DANG.sgml, src/doc/HOWTO/dosemu-HOWTO.sgml, src/doc/README/Priv-usage, src/doc/README/SECURITY, src/doc/README/config, src/doc/README/port-io, src/doc/README/recover, src/doc/README/runasuser: Documentation updates for 1.4.0. * [r1772] src/dosext/mfs/lfn.c, src/emu-i386/simx86/codegen-sim.c, src/plugin/commands/lredir.c: gcc-2.95 compatibility fixes. * [r1771] src/base/init/config.c, src/emu-i386/ports.c: Convert error about direct port i/o without root into a warning. Err about using "-s" without enough privileges. * [r1770] src/arch/linux/Makefile.main: Fix man page out-of-tree building. * [r1769] (almost all files changed) Update copyright line to 2007. * [r1768] dosemu.spec.in: Added missing new directory and symbolic link to dosemu.spec. * [r1767] src/arch/linux/Makefile.main: Make man files at "make" instead of "make install" time. * [r1766] dist/dosemu, dist/dosemu.bindist, dist/mkbindist, man/dosemu.bin.1.in, src/arch/linux/Makefile.main, src/base/init/config.c, src/base/init/install.c, src/base/init/parser.y.in, src/base/misc/fatfs.c: Allow --Flibdir for suid configurations, as it hasn't been used to locate global.conf for years. Document the allowance for --Flibdir/--Fimagedir. Repair bindist/mkbindist to work with the new FreeDOS configuration. This means using --Flibdir and $DOSEMU_LIB_DIR instead of the hardcode DOSEMULIB_DEFAULT. Run mkfontdir at "make" instead of "make install" time when possible. * [r1765] src/plugin/commands/lredir.c: Fix lredir c: d: 2007-05-03 Bart * [r1764] configure, configure.ac, src/plugin/sdl/Makefile: Fix forgotten make distclean file in SDL plugin; add -lXext for Xxf86vm checking on certain systems. * [r1763] INSTALL, configure, configure.ac: Check for the existence of the Xxf86vm and Xext libraries, not just header files. Adjust INSTALL instructions. * [r1762] config.guess, config.sub, configure, configure.ac: Don't use -mtune by default. It doesn't bear much relation to 'uname -m' anymore on anything newer than a Pentium Pro. * [r1761] etc/dosemu.users.example, src/base/init/config.c, src/base/init/parser.y.in, src/base/misc/priv.c, src/include/priv.h: Register the difference between sudo and suid-root. Use c_all as the default for users who run dosemu via sudo so dosemu.users does not need to be edited for that case, leaving the default "restricted" (only console graphics at the console, no remote direct hardware access) setting for suid-root. 2007-05-02 Bart * [r1760] src/arch/linux/Makefile.main: Use -rm instead of rm to deal with non-existing directories. Use bdftopcf at make time instead of make install. Fixes problems reported at linux-msdos (perry hargrave). * [r1759] src/base/init/parser.y.in: Repair $_sound=(on). You would only get the old sound driver via $_sound=(1). 2007-05-01 Bart * [r1758] src/env/video/dualmon.c, src/env/video/hgc.c, src/env/video/matrox.c, src/env/video/vc.c: Mark all mapped video memory PROT_EXEC, similar to the VGAEMU memory. Solves a few problems with console video on x86-64. * [r1757] src/emu-i386/simx86/fp87-x86.c: Use aliased memory for emulation of FSTENV/FSAVE. * [r1756] src/emu-i386/simx86/cpatch.c: There is a slight chance that the CPUEMU cpatch stubs hit VGA memory. For that case there is a simple instruction decoder but we must use explicit assembly instructions. Fixes another problem with Norton SysInfo. 2007-04-30 Bart * [r1755] src/emu-i386/simx86/codegen-sim.c: Fix regression in vgaemu handling from #1754. Fix problem with rep movs with df set backwards for simulated cpuemu with planar VGA modes. * [r1754] src/emu-i386/simx86/codegen-sim.c, src/emu-i386/simx86/sigsegv.c, src/env/video/vgaemu.c: Fix problems with programs that try to access unmapped VGA memory or write to ROM in CPUEMU, such as Norton SysInfo. 2007-04-29 Bart * [r1753] src/dosext/mfs/mfs.c: Check for FAT filesystem before attempting to use the VFAT ioctls. Also check if the first entry is ".\0" to avoid an ioctl32 bug in kernels <= 2.6.21.1. 2007-04-27 Bart * [r1751] VERSION, NEWS, ChangeLog, doc/DOSEMU-HOWTO.txt, etc/dosemu.conf: Regenerate documentation. Release 1.3.5. * [r1750] src/plugin/commands/lredir.c, src/plugin/commands/msetenv.c: Avoid CPUEMU problems with msetenv. Only set DOSEMU_LASTREDIR if no drive letter was given; improve lredir command line processing with C and R. * [r1749] etc/dosemu.conf, src/base/dev/misc/lpt.c: Flush every second when printing. Fix $_lptx="" to not register any ports. * [r1748] src/dosext/dpmi/msdos.c: Fix #1638135 (int 21h, ax=6300 not translated currently, japheth) * [r1747] src/dosext/mfs/mfs.c, src/dosext/mfs/mfs.h: Always return . and .. as the first two entries for findfirst/findnext to be consistent with real DOS. On Linux they can be somewhere in the middle. 2007-04-26 Bart * [r1746] src/base/misc/dos2linux.c, src/include/dos2linux.h, src/plugin/commands/lredir.c, src/plugin/commands/unix.c: Apply #1691712 make lredir able to automatically choose next free drive II (Stuart Axon) * [r1745] INSTALL: Made a note about libXxf86vm (#1644784) * [r1744] man/dosemu.1.in: [ 1692149 ] Describe --version in man page (fix for 1245033) (Stuart Axon) * [r1743] src/doc/HOWTO/dosemu-HOWTO.sgml: Some HOWTO updates by Stuart Axon (#1692299). * [r1742] src/emu-i386/simx86/codegen-sim.c, src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/codegen.h, src/emu-i386/simx86/cpatch.c, src/emu-i386/simx86/interp.c, src/emu-i386/simx86/tables.c: Handle 16bit address overflow in cpuemu string instructions. (#1683078, slightly adjusted from Michael Karcher's patch) 2007-04-23 Bart * [r1741] src/base/init/config.c, src/dosext/dpmi/dpmi.c, src/dosext/dpmi/dpmi.h, src/emu-i386/cpu.c, src/include/cpu.h, src/include/emu.h: Use fxsave/fxrstor when available on i386 to deal with SSE fp. Make sure the fxsave buffer is paragraph aligned (fixes a bug with DJGPP gcc on x86_64). 2007-04-22 Bart * [r1740] src/dosext/dpmi/dpmi.c: Check fs/gs values before loading them on x86-64. Preserves 64 bit segment bases on Intel chips (but apparently makes no difference on AMD's). 2007-04-20 Bart * [r1739] src/dosext/dpmi/dpmi.c: Fix LFB w/console graphics for x86-64. * [r1738] src/base/async/pci_bios.c, src/base/dev/misc/pci.c, src/env/video/matrox.c, src/include/pci.h: Fix PCI support on x86-64. * [r1737] src/emu-i386/do_vm86.c, src/include/cpu.h: Use fnsave instead of fsave for saving the FPU state. Should fix #1436788. * [r1736] src/plugin/term/keyb_slang.c, src/plugin/translate/charsets/utf8.c: Fix problems with utf-8 multibyte input in terminals (reported by Grigory Batalov, linux-msdos). 2007-03-29 Bart * [r1735] dist/dosemu, src/base/init/config.c: Avoid bash-ism "exec -a"; use an environment variable instead. * [r1734] src/emu-i386/simx86/codegen-x86.c: Fix gcc warning. * [r1733] src/emu-i386/simx86/codegen-sim.c: Fix shift/rotate instructions in simulator (Michael Karcher, #1687296) * [r1732] src/emu-i386/simx86/codegen-x86.c: Fix spurious crashes with "linker: node busy" (Michael Karcher, #1687298) 2007-03-24 Bart * [r1731] src/emu-i386/simx86/codegen-sim.c, src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/tables.c: Fix rep scas/cmps when eCX is 0 (#1683190, with Michael Karcher) 2007-03-18 Bart * [r1730] src/emu-i386/simx86/cpatch.c: Fix to SVN #1727 stosw fix (Michael Karcher, #1679675) 2007-03-17 Bart * [r1729] src/emu-i386/simx86/interp.c: Fix problem with push when single stepping in cpuemu (#1682620, M. Karcher) * [r1728] src/emu-i386/simx86/interp.c: Fix cpuemu bug with sbb, affects GNUish ls and tasm (#1682575) 2007-03-13 Bart * [r1727] src/emu-i386/simx86/cpatch.c: Save eax in stosw stub (Michael Karcher, #1679675) 2007-03-11 Bart * [r1726] src/emu-i386/simx86/cpu-emu.c, src/emu-i386/simx86/interp.c: Use leavedos(1) for EMU86 failure to drop into dosdebug; improve diagnostics. For rep outs, use not_permitted and let the port code deal with it instead of quitting DOSEMU. * [r1725] src/emu-i386/simx86/cpatch.c, src/emu-i386/simx86/trees.c: Break node if current eip is in a page to be unprotected; fixes bug #1678581 2007-03-10 Bart * [r1724] src/dosext/mfs/dosc.c, src/dosext/mfs/lfn.c: LFN: avoid writing to write-protected memory (thanks Michael Karcher) * [r1723] src/base/bios/setup.c, src/base/init/init.c, src/base/misc/disks.c, src/dosext/dpmi/emu-ldt.c, src/dosext/dpmi/msdos.c, src/dosext/misc/xms.c, src/dosext/net/net/ipx.c, src/emu-i386/ports.c, src/emu-i386/simx86/fp87-x86.c, src/emu-i386/simx86/sigsegv.c, src/tools/periph/dexeconfig.c, src/tools/tools86.c: Replaced 'long *' by 'int *' or 'uint32_t *' for 64-bit compatibility. 2007-02-28 Bart * [r1722] src/env/video/instremu.c: Fix problem with constraints in inline assembler. 2006-12-10 Bart * [r1721] src/include/sound, src/include/sound/midi.h, src/include/sound/sndpcm.h, src/include/sound/sound.h, src/plugin/sdl/snd_o_SDL.c: Add forgotten files from Stas' new sound code. * [r1720] src/arch/linux/dosext/sound/midid/io.c, src/arch/linux/dosext/sound/midid/midid.c, src/arch/linux/dosext/sound/midid/timid.c: Integrated most of the other midid changes by Stas. * [r1719] Makefile.conf.in, compiletime-settings, compiletime-settings.devel, configure, configure.ac, default-configure, src/base/sound/sndpcm.c, src/include/config.h.in, src/plugin/alsa, src/plugin/alsa/Makefile, src/plugin/alsa/mid_o_alsa.c, src/plugin/sndfile, src/plugin/sndfile/Makefile, src/plugin/sndfile/snd_o_wav.c: Added ALSA and libsndfile plugins from Stas. 2006-11-29 Bart * [r1718] compiletime-settings, compiletime-settings.devel, etc/dosemu.conf, etc/global.conf, src/arch/linux/Makefile.main, src/base/dev/dma/Makefile, src/base/dev/dma/dma.c, src/base/dev/dma/dmanew.c, src/base/dev/sb16, src/base/dev/sb16/Makefile, src/base/dev/sb16/adlib.c, src/base/dev/sb16/adlib.h, src/base/dev/sb16/dspio.c, src/base/dev/sb16/dspio.h, src/base/dev/sb16/sb16.c, src/base/dev/sb16/sb16.h, src/base/dev/sb16/ymf262.c, src/base/dev/sb16/ymf262.h, src/base/init/dev_list.c, src/base/init/parser.y.in, src/base/sound, src/base/sound/Makefile, src/base/sound/midi.c, src/base/sound/nullsnd.c, src/base/sound/nullsnd.h, src/base/sound/sndpcm.c, src/dosext/sound/sound.c, src/include/dma.h, src/include/sound.h, src/plugin/midimisc, src/plugin/midimisc/Makefile, src/plugin/midimisc/mid_i_pipe.c, src/plugin/midimisc/mid_o_midid.c, src/plugin/midimisc/mid_o_oss.c, src/plugin/midimisc/mid_o_pipe.c, src/plugin/midimisc/mid_o_tmdty.c, src/plugin/sdl/Makefile: Integrate most of Stas' new sound code, for now run-time selectable using $_sound = (2). 2006-11-25 Bart * [r1717] src/dosext/dpmi/dpmi.c: Fix trap flag handling regression for DPMI (#1602643) * [r1716] src/arch/linux/dosext/sound/midid/Makefile, src/arch/linux/dosext/sound/midid/device.c, src/arch/linux/dosext/sound/midid/device.h, src/arch/linux/dosext/sound/midid/midid.c, src/arch/linux/dosext/sound/midid/midout.c, src/arch/linux/dosext/sound/midid/null.c, src/arch/linux/dosext/sound/midid/oss.c, src/arch/linux/dosext/sound/midid/seqops.h, src/arch/linux/dosext/sound/midid/timid.c: Merged trivial changes and makefile improvements from Stas' new midid code. * [r1715] src/arch/linux/Makefile.main: Do not erase all previous FreeDOS files when upgrading. Remove risky comment between semicolons. 2006-11-22 Bart * [r1714] src/plugin/sdl/keyb_SDL.c: Fix AltGr handling with SDL. It was confused with ScrollLock. * [r1713] src/plugin/sdl/keyb_SDL.c: Try to use keysyms where possible in the SDL keyboard code. Implemented workaround for altgr and broken unicode support in older SDL versions. 2006-11-21 Bart * [r1712] src/plugin/X/X.c: Fix double mouse cursor problem with Arachne. 2006-11-18 Bart * [r1710] VERSION, NEWS, ChangeLog, src/doc/DANG/DANG.sgml, src/doc/README/CDROM, doc/DANG.txt, doc/README.cpuemu, doc/README.txt, doc/EMUfailure.txt: Added CDROM lredir documentation. Regenerate documentation. Release 1.3.4. * [r1709] src/arch/linux/async/debug.c, src/base/init/lexer.l.in, src/base/misc/fatfs_boot.S, src/base/misc/utilities.c, src/dosext/dpmi/memory.c, src/dosext/dpmi/vxd.c, src/dosext/dpmi/windefs.h, src/emu-i386/simx86/codegen-sim.c, src/emu-i386/simx86/codegen-x86.c, src/include/cpu.h: GCC-2.95 and x86-64 VXD compatibility changes. * [r1708] INSTALL, src/base/init/install.c: Fixed -install for other DOSes than the supplied FreeDOS and adjust README. 2006-11-16 Bart * [r1707] src/emu-i386/simx86/sigsegv.c: Fixed some 64-bit rip usage, and the division by zero exception. * [r1706] configure, configure.ac, src/include/config.h.in, src/include/dlmalloc.h: Fixed gcc warning in dlmalloc and removed some obsolete autoconf macros. 2006-11-15 Bart * [r1705] src/arch/linux/Makefile.main: Rearranged the messages after make install, so it is more clear that the FreeDOS tarball is missing. * [r1704] src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/interp.c, src/emu-i386/simx86/modrm-gen.c, src/emu-i386/simx86/protmode.c, src/emu-i386/simx86/protmode.h, src/emu-i386/simx86/tables.c: Segment handling and address calculation optimizations for cpuemu. 2006-11-14 Bart * [r1703] configure, configure.ac: Added configure checks for bdftopcf and mkfontdir. * [r1702] dist/dosemu: Allow DOSDRIVE_D to be overridden. * [r1701] src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/tables.c: Optimize the O_MOVS_SetA cpuemu op. 2006-11-13 Bart * [r1700] ChangeLog, NEWS: Updated NEWS and ChangeLog 2006-11-12 Bart * [r1699] COPYING.DOSEMU, src/env/video/vgafonts.c: Added VGA font and dlmalloc copyrights for completeness. * [r1698] dist/autoemu.bat, dist/autoexec.bat, dist/config.emu, dist/config.sys, src/arch/linux/Makefile.main, src/base/init/install.c, src/base/misc/fatfs.c: The previous approach had circular symbolic links for directories which is bad as it confuses DOS programs. It seems clearer to create a drive_z directory with contents equal to the old freedos directory (even though there may not be a freedos present). * [r1697] dist/dosemu, src/base/init/config.c, src/base/init/install.c, src/emu.c, src/include/dos2linux.h, src/include/emu.h, src/plugin/commands/unix.c: Create no-prompt initial boot for DOSEMU+FreeDOS with a welcome screen. The liability disclaimer just needs to be confirmed. Removed the win4lin check from the dosemu script and moved the terminal instructions to the main code. * [r1696] dist/autoemu.bat, dist/autoexec.bat, dist/config.emu, dist/config.sys, dosemu.spec.in, src/arch/linux/Makefile.main, src/base/init/install.c, src/base/misc/fatfs.c: Remove the tarballs with symlinks. Instead, point d: to the systemwide FreeDOS directory during config.sys processing and use z: after that. Install config.sys et al from dosemu. * [r1695] etc/dosemu.conf, etc/global.conf, src/base/dev/misc/lpt.c, src/base/init/lexer.l.in, src/base/init/parser.y.in: Use $_lpt1, $_lpt2, and $_lpt3 for printer configuration and disable the printer IRQ for now since it's not used. Fixes #1492201. * [r1694] src/base/async/int.c, src/base/bios/setup.c, src/include/int.h: Fix missing LFN support after ctrl-alt-del (#1487899) * [r1693] INSTALL, compiletime-settings, compiletime-settings.devel, compiletime-settings.help, configure, configure.ac, default-configure, src/emu.c, src/plugin/sdl/acinclude.m4, src/plugin/sdl/configure, src/plugin/sdl/configure.ac: Use JIT cpuemu by default on x86-64, and don't force -m32 any longer. Introduce target_bits compile time option to optionally set -m32 or -m64. Updated SDL configure script and added a link check for cross-compilation. 2006-11-11 Bart * [r1692] dist/dosemu: Use `id -ur` instead of $UID for dash compatibility. * [r1691] src/arch/linux/async/signal.c, src/dosext/dpmi/dpmi.c, src/emu-i386/cpu.c, src/include/cpu-emu.h: Fix compilation with cpuemu off. * [r1690] src/emu-i386/simx86/codegen-sim.c, src/emu-i386/simx86/codegen-sim.h, src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/codegen-x86.h, src/emu-i386/simx86/emu86.h, src/emu-i386/simx86/sigsegv.c, src/env/video/instremu.c, src/env/video/vgaemu.c, src/include/vgaemu.h: Implemented better VGAEMU support for simulated cpuemu and eliminated the e_vga_base and e_vga_end variables. * [r1689] src/arch/linux/async/signal.c, src/emu-i386/simx86/cpu-emu.c, src/emu.c, src/env/video/vc.c, src/include/emu.h, src/plugin/term/terminal.c: Handle all async signals except those that call leavedos using sigasync() which calls the correct sighandler using a function pointer array. The real signal handlers are all set in signal.c:signal_init() now. Add SIGWINCH & SIGPROF to the queue block list because of their nature. * [r1688] src/emu-i386/simx86/sigsegv.c, src/emu-i386/simx86/trees.c: Fixed some issues with self-modifying code. * [r1687] src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/tables.c, src/emu-i386/simx86/trees.c: Removed GenBufSize hack and adjusted the op size array. * [r1686] src/emu-i386/simx86/interp.c, src/env/video/instremu.c, src/include/cpu.h: Avoid "lahf" (may not be available on x86-64) and use READ_BYTE for IS_IRET. 2006-11-10 Bart * [r1685] src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/cpu-emu.c, src/emu-i386/simx86/interp.c, src/emu-i386/simx86/trees.c: Fixed a bug in InvalidateSingleNode and DPMI TheCPU.eflags handling. Under normal circumstances IOPL should never be set there. * [r1684] configure, configure.ac: Add -lm to LIBS as DOSEMU now uses a few math functions. * [r1683] src/emu-i386/simx86/fp87-sim.c: Fixed rounding to integer in the FPU simulator. * [r1682] src/emu-i386/simx86/codegen-x86.c: Fix das/aas/aam for x86-64. * [r1681] src/emu-i386/simx86/codegen-sim.c, src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/fp87-sim.c, src/emu-i386/simx86/interp.c: Fixed ENTER/IDIV/DIV/IMUL/DAS and some FPU cases that failed with the QEMU i386 emulator test program. 2006-11-09 Bart * [r1680] src/emu-i386/simx86/interp.c: Correct ofsseg array for DPMI 2006-11-08 Bart * [r1679] src/emu.c, src/include/emu.h: Forgotten sigjmp_buf declarations from r1677. * [r1678] src/plugin/sdl/sdl.c: Enable X background pause for SDL * [r1677] src/base/misc/utilities.c, src/emu.c: Use sigsetjmp/siglongjmp because signal handlers may be involved in leavedos. * [r1676] src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/sigsegv.c: Fix BSF and BSR, and don't use code patches for DPMI code for cpuemu="full". Fixes Duke Nukem 3D in this mode. * [r1675] src/emu-i386/simx86/interp.c: Use the operand size instead of the address size for jump destination masking. Fixes some issues with cpuemu in DPMI. * [r1674] src/emu-i386/simx86/codegen-x86.c: Fix vgaemu in compiled code. * [r1673] src/emu-i386/simx86/codegen-sim.c, src/emu-i386/simx86/interp.c: Fixed IMUL regressions from r1670. 2006-11-07 Bart * [r1672] src/emu-i386/simx86/codegen-sim.c, src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/interp.c: Use load/op/store for inc&dec, and optimize inc/dec byte reg. * [r1671] src/emu-i386/simx86/codegen-sim.c, src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/interp.c: Use load/op/store for xchg and actually use xchg in generated code as well. * [r1670] src/emu-i386/simx86/codegen-sim.c, src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/interp.c: Use load/op/store for cpuemu (I)MUL, (I)DIV, NEG, and NOT. * [r1669] src/emu-i386/simx86/codegen-sim.c, src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/codegen.h, src/emu-i386/simx86/interp.c: Use "op %al,reg" style instructions in cpuemu instead of "op (%edi),%al" to avoid certain VGA memory reads. * [r1668] src/base/misc/dump.c, src/dosext/dpmi/dpmi.c: Fixed a DPMI ctrl-c problem (missed in_dpmi_dos_int), and avoid dumping unreachable memory in dump.c, which may double-fault. 2006-11-06 Bart * [r1667] src/dosext/dpmi/memory.c: Save actual dpmi base pointer in config.dpmi_base. * [r1666] src/emu-i386/simx86/cpu-emu.c, src/emu-i386/simx86/fp87-x86.c: Changed fp87 absolute addresses to bx-relative so that the FPU works for x86-64 for JIT cpuemu, and improve x86-64 cpuemu fault handling. * [r1665] src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/trees.c: Fixed VGA read/write for x86-64. Misc adjustments to deal with 64-bit pointers. Add forgotten #include. 2006-11-05 Bart * [r1664] src/base/misc/Makefile, src/base/misc/dlmalloc.c, src/base/misc/smalloc.c, src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/memory.c, src/emu-i386/simx86/trees.c, src/include/dlmalloc.h, src/include/smalloc.h: Use Doug Lea's malloc (forced to use mmap with PROT_EXEC) instead of smalloc for cpuemu. It is a lot faster. * [r1663] src/base/misc/smalloc.c, src/emu-i386/simx86/memory.c, src/include/smalloc.h: Introduce smalloc_fast and smfree_fast: these clobber the allocated memory to improve the speed of smfree (eliminating a linear search). Used by cpuemu: shaves ~25% off DOS boot time. * [r1662] src/base/misc/smalloc.c, src/include/smalloc.h: Changed smalloc to use a double-linked list for a little performance improvement. * [r1661] src/emu-i386/simx86/codegen-sim.c, src/emu-i386/simx86/cpu-emu.c, src/emu-i386/simx86/trees.c, src/emu-i386/simx86/trees.h: Clean up HOST_ARCH_X86 use. * [r1660] src/emu-i386/simx86/codegen.h, src/emu-i386/simx86/cpatch.c, src/emu-i386/simx86/cpu-emu.c, src/emu-i386/simx86/syncpu.h: Implemented stos/movs patches for x86-64. * [r1659] src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/interp.c, src/emu-i386/simx86/trees.h: Pass clink as a pointer instead of as a possibly truncated int. * [r1658] src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/trees.c, src/emu-i386/simx86/trees.h: Clean up pointer casts in cpuemu tree handling. Use int instead of long where possible/appropriate. 2006-11-04 Bart * [r1657] src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/codegen-x86.h, src/emu-i386/simx86/codegen.h, src/emu-i386/simx86/cpatch.c, src/emu-i386/simx86/cpu-emu.c, src/emu-i386/simx86/syncpu.h, src/emu-i386/simx86/trees.c: Implemented stack/write code patches for x86-64 and fixed an associated bug in trees.c. * [r1656] src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/codegen.h, src/emu-i386/simx86/cpatch.c, src/emu-i386/simx86/cpu-emu.c, src/emu-i386/simx86/protmode.c, src/emu-i386/simx86/sigsegv.c, src/emu-i386/simx86/syncpu.h: Reorganised the SynCPU structure and rep stos/movs code patches to use call (%ebx), and enable those on x86-64. 2006-11-02 Bart * [r1655] src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/codegen-x86.h, src/emu-i386/simx86/cpatch.c, src/emu-i386/simx86/emu86.h: Cleaned up cpuemu eflags handling. DF is now always handled via TheCPU.eflags instead of the stack flag image, and always clear between instructions. Disabled the pushf VIF trick which doesn't seem to work as advertised. * [r1654] src/emu-i386/simx86/interp.c: Correct cpuemu regression from rev #1652 2006-11-01 Bart * [r1653] src/emu-i386/simx86/codegen-sim.c: Correct flag handling in AAA, AAS, DAS, DAA, CMPS*, SCAS* in the cpuemu interpreter. Fixes problems with FD DEBUG's "a" command. * [r1652] src/emu-i386/simx86/cpu-emu.c, src/emu-i386/simx86/interp.c: Fix single stepping in cpu-emu (including dosdebug). 2006-10-31 Bart * [r1651] src/env/video/render.c, src/env/video/text.c, src/include/render.h, src/plugin/X/X.c, src/plugin/sdl/mouse_SDL.c, src/plugin/sdl/sdl.c: Fix palette and mouse with SDL for fbdev/fullscreen/256 colors. * [r1650] (almost all files changed) Update year to 2006. COPYING now contains the pure GPL, and COPYING.DOSEMU the other copyright details. Distribute the GPL and COPYING.DOSEMU with rpm's from dosemu.spec. Clarified the clause on redistribution of repackaged official packages. * [r1649] src/plugin/X/X.c, src/plugin/sdl/sdl.c: Don't call SDL_UpdateRects with 0 rectangles: it may crash. Fix the close (x) window button in xdosemu. 2006-10-30 Bart * [r1648] src/env/video/text.c, src/plugin/X/X.c, src/plugin/X/X.h, src/plugin/X/X_font.c, src/plugin/sdl/sdl.c: Don't call X functions directly from SDL code, that won't work with SDL libraries that are not directly linked with X. Added more checks for x11.window availability. Fixed mouse/input focus cursor blinking situation. * [r1647] src/plugin/sdl/sdl.c: Initialize most of the X support before creating the first window (except for window and font), where it was done previously. Avoids some issues with dynamic loading. * [r1646] src/plugin/X/X_font.c: Fix crash in SDL if X_font = "" (thanks Reinhard). 2006-10-29 Bart * [r1645] src/env/video/text.c, src/include/vgatext.h, src/plugin/X/X.c, src/plugin/X/X_font.c, src/plugin/sdl/sdl.c: Add X font support to the SDL plugin. There's a bit of a trick involved (a second "Display") to receive all expose events. Did some associated cleanup. * [r1644] src/plugin/X/Makefile, src/plugin/X/X.c, src/plugin/X/X.h, src/plugin/X/X_font.c: Moved X font handling into a seperate file with seperate static variables, so X fonts can be used by SDL later. * [r1643] dist/dosemu: Replace bash-isms in dosemu script with sh constructs. * [r1642] src/env/video/text.c, src/plugin/X/X.c: Introduce a new Window in the X code, drawwindow, that is a subwindow of either the fullscreen or the normal window, so can be reparented (technique borrowed from SDL). The main advantage is that the X server can take care of shift_x/shift_y for text modes. Also no need to copy gc's any more. Fix crash for a too eager update_cursor(). 2006-10-28 Bart * [r1641] src/env/video/render.c, src/env/video/text.c, src/include/render.h, src/include/vgatext.h, src/plugin/X/X.c, src/plugin/sdl/sdl.c: Create a "bitmap" text system in render.c that is shared by X and SDL. Implemented line drawing (for mono underline) on the canvas. The text cursor and underlining now go through the remapper on X. Remove scaling from the previously used X calls (impossible with X fonts). Screen updates now lock the surface during the whole update for SDL; the SDL code pushes rectangles to be updated and sends them in one go. Mode changes need to be checked before locking the surface: moved the mode adjust calls out of the common update code. * [r1640] src/arch/linux/async/signal.c, src/env/video/text.c, src/include/vgatext.h, src/plugin/X/X.c, src/plugin/sdl/sdl.c, src/plugin/term/terminal.c: Remove update function in text_system struct. The only user was X with XFlush but XFlush is not necessary if XPending is called often enough. Moved event handler call in signal.c after update calls to be sure of that. Similarly the mouse cursor update is best placed before other updates. * [r1639] src/env/video/seqemu.c, src/env/video/text.c, src/env/video/vesa.c, src/include/vgatext.h, src/plugin/X/X.c, src/plugin/sdl/sdl.c, src/plugin/term/terminal.c: Remove X_resize_text_screen from text_system structure. Resizes are done on demand by update_screen(); set vga.reconfig.re_init to be sure of that in all cases. * [r1638] src/emu-i386/simx86/codegen-sim.c: Correct DAA & DAS in simulator. * [r1637] src/emu-i386/simx86/codegen-x86.c: Implement AAD and AAM replacements for x86-64. * [r1636] src/emu-i386/simx86/codegen-x86.c: Implement JIT code for AAA,AAS,DAA, and DAS for x86-64 as they are not available in long mode. Fixes FreeDOS debug which uses DAA, in particular. 2006-10-26 Bart * [r1635] src/base/init/parser.y.in, src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/codegen-x86.h, src/emu-i386/simx86/codegen.h, src/emu-i386/simx86/cpu-emu.c, src/emu.c, src/include/cpu-emu.h: Enable dynamic code generation for x86-64. Almost all generated code is the same as for i386, but it's still a bit unstable, and slower than simulation because of excessive page faulting: code patching isn't working yet. But FreeDOS boots. Only enabled for $_cpu_emu="vm86", not for the default "off" for now. Marked InCompiledCode as volatile to simplify asm constraints. * [r1634] src/emu-i386/simx86/codegen-sim.c, src/emu-i386/simx86/codegen-sim.h, src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/codegen-x86.h, src/emu-i386/simx86/codegen.h, src/emu-i386/simx86/cpu-emu.c, src/emu-i386/simx86/interp.c, src/emu-i386/simx86/trees.c: cpuemu: replaced use of inline asm __memcpy by memcpy. GCC does a good job now and asm __memcpy isn't portable. * [r1633] src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/fp87-x86.c: cpuemu: fix asm compilation on x86-64. 2006-10-24 Bart * [r1632] src/arch/linux/async/sigsegv.c, src/dosext/dpmi/dpmi.c, src/emu-i386/simx86/sigsegv.c, src/plugin/commands/builtins.h: Improve cpuemu fault handling and diagnostics; avoid a few more page faults in DOSEMU code. * [r1631] src/base/init/config.c, src/dosext/dpmi/dpmi.c, src/emu-i386/simx86/codegen-x86.c, src/include/emu.h: simx86: shortened asm code, check correct CPU feature flags for prefetcht0, and fix DPMI Jazz Jackrabbit crash with $_cpu_emu="vm86". 2006-10-23 Bart * [r1630] src/base/init/parser.y.in, src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/cpatch.c, src/emu-i386/simx86/sigsegv.c, src/include/cpu-emu.h: Link in most of the JIT code for x86-64. Small crucial parts still disabled. * [r1629] src/arch/linux/debugger/Makefile, src/arch/linux/dosext/sound/midid/Makefile, src/tools/periph/Makefile: Use LDFLAGS without -rdynamic to link misc binaries. * [r1628] etc/dosemu.conf, src/base/init/lexer.l.in, src/base/init/parser.y.in, src/emu-i386/simx86/Makefile, src/emu-i386/simx86/codegen-arch.h, src/emu-i386/simx86/codegen-sim.c, src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/codegen.h, src/emu-i386/simx86/cpatch.c, src/emu-i386/simx86/cpu-emu.c, src/emu-i386/simx86/emu86.h, src/emu-i386/simx86/fp87-sim.c, src/emu-i386/simx86/fp87-x86.c, src/emu-i386/simx86/interp.c, src/emu-i386/simx86/sigsegv.c, src/emu-i386/simx86/trees.c, src/include/cpu-emu.h, src/include/emu.h: Select JIT or simulated CPU emulation at runtime instead of at compiletime. 2006-10-22 Bart * [r1627] src/arch/linux/async/signal.c, src/arch/linux/async/sigsegv.c, src/emu-i386/cpu.c, src/include/emu.h: Replaced tls_setup hack with something just a little cleaner. The 64bit fs and gs bases are restored in signal handlers. To avoid an expensive syscall it is first checked if the bases really need to be set by comparing the memory fs/gs and the original base point to. There is a very small chance that that involves a page fault, which needs to be fixed up. * [r1626] src/include/cpu.h: Fix FPU save/restore on x86-64. 2006-10-20 Bart * [r1625] src/base/misc/Makefile, src/base/misc/fatfs.c, src/base/misc/fatfs.h, src/base/misc/fatfs_boot.S: Simplify linking in fatfs_boot.S, similar to bootsect.S before. * [r1624] src/tools/periph/Makefile, src/tools/periph/bootsect.S, src/tools/periph/bootsect.h, src/tools/periph/mkfatimage.c, src/tools/periph/mkfatimage16.c: Link compiled bootsect.S directly into mkfatimage* instead of using hex. Get rid of things that are overwritten in bootsect.S; I can't find anything left (C) Peter Norton. 2006-10-19 Bart * [r1623] src/base/bios/Makefile, src/env/video/remap_asm.S: Adjustments for older GCCs and 64-bit noexecstack. * [r1622] src/base/bios/Makefile, src/base/bios/bios.S, src/dosext/dpmi/dpmisel.S, src/env/video/Makefile, src/env/video/remap_asm.S, src/env/video/vesabios.S, src/env/video/vesabios_pm.S, src/include/macros86.h: Added sections to assembly files to mark a non-executable stack. (suggestion from James Courtier-Dutton, linux-msdos). For bios.S and vesabios.S it was necessary to compile without intermediate linking, which adds a few "-bios_f000"'s but simplifies Makefiles considerably. * [r1621] src/dosext/dpmi/dpmi.c: Fix C problem with wrongly placed label. * [r1620] src/arch/linux/async/signal.c, src/arch/linux/async/sigsegv.c, src/dosext/dpmi/dpmi.c, src/dosext/dpmi/dpmisel.S, src/dosext/dpmi/dpmisel.h: Use IRET to jump into DPMI client code on x86-64. It's nice because it pops up ss:esp even for same-privilege transfers from long mode. To avoid the infamous 16-bit stack ESP corruption issue the iret stack frame is allocated at 0x100000000 or a similar address with bits 16-31 zero. 2006-10-18 Bart * [r1619] src/arch/linux/async/signal.c, src/arch/linux/async/sigsegv.c, src/arch/linux/debugger/dis8086.c, src/arch/linux/mapping/mapping.c, src/base/misc/ioctl.c, src/dosext/dpmi/dpmi.c, src/dosext/dpmi/dpmi.h, src/emu-i386/cpu.c, src/emu-i386/do_vm86.c, src/emu-i386/simx86/cpu-emu.c, src/emu.c, src/env/video/vc.c, src/include/cpu.h, src/include/emu.h, src/include/vm86plus.h, src/plugin/term/terminal.c: Cleaned up vm86plus.h. Created a new init_handler function in signal.c which takes care of flags, %fs, %gs etc. dis8086 64-bit compat. Create dpmi_iret_setup for exiting signal handlers to DPMI client code. * [r1618] src/arch/linux/debugger/dis8086.c, src/arch/linux/debugger/mhpdbgc.c, src/base/misc/dump.c, src/emu-i386/simx86/cpu-emu.c, src/env/video/instremu.c, src/include/dis8086.h: Replaced disassembler of unclearly licensed origin by one adapted from 2asm via MAME and DOSBox. 2006-10-17 Bart * [r1617] src/plugin/commands/unix.c: Fixed quiet switching for dosemu in dumb mode with a given command. 2006-10-12 Bart * [r1616] src/dosext/dpmi/dpmi.c, src/dosext/dpmi/dpmisel.S: Improve direct DPMI switch jmp for x86-64: don't use instructions that change flags after popf, eliminate use of r10, and tell gcc that r8 and r9 are clobbered. 2006-10-11 Bart * [r1615] src/arch/linux/async/sigsegv.c, src/dosext/dpmi/dpmi.c, src/dosext/dpmi/dpmi.h, src/dosext/dpmi/dpmisel.S, src/dosext/dpmi/dpmisel.h: Removed sigsetjmp/longjmp usage for DPMI again. A tiny amount of assembly can do it more efficiently (saves the sigprocmask syscall that sigsetjmp makes). 2006-10-10 Bart * [r1614] src/arch/linux/async/sigsegv.c, src/dosext/dpmi/dpmi.c, src/dosext/dpmi/dpmisel.S, src/dosext/dpmi/dpmisel.h, src/emu-i386/cpu.c, src/emu-i386/simx86/cpu-emu.c: Implemented native DPMI code execution for x86-64. Only tested with a simple Openwatcom "wcc hello.c" but that works. It needed a few workarounds involving %ss and in particular a nasty hack for %fs (used for TLS). * [r1613] src/emu-i386/simx86/codegen-x86.h, src/emu-i386/simx86/codegen.h, src/emu-i386/simx86/cpu-emu.c, src/emu-i386/simx86/protmode.c, src/include/emu-ldt.h: Change lots of long * to int * in CPUEMU. Now basic DPMI works for $_cpu_emu="full" on x86-64. * [r1612] src/arch/linux/async/debug.c: Add an extra backtrace without full (in case gdb with full fails), and a simple backtrace using glibc backtrace(), for suid-root. * [r1611] src/base/async/int.c, src/dosext/dpmi/dpmi.c, src/include/Asm/ldt.h: Changed lots of longs to int in the DPMI and LDT code, and a few for int15(extmem). Now DPMI LDT entry allocation works for 64bit. * [r1610] src/arch/linux/mapping/mapping.c: Map DPMI, LFB, and hardware RAM high memory into the first 2G of address space on x86-64 using MAP_32BIT. * [r1609] src/arch/linux/debugger/mhpdbgc.c, src/emu-i386/simx86/sigsegv.c, src/include/mhpdbg.h: Fix dosdebug (ldt, symbol reading) and cpu exception printf for 64-bit. * [r1608] src/dosext/dpmi/dpmi.c, src/emu-i386/simx86/codegen-sim.c, src/include/bitops.h: Replaced simulated BITOP code by non-self-modifying code, adding the used change_bit and find_bit_r inline functions to bitops.h. Some more long->int conversions for 64bit compatibility. 2006-10-08 Bart * [r1607] src/include/cpu.h, src/include/timers.h: Fix rdtsc (fixes random slow-downs and hangs) and unix.com in 64-bit. Getting more usable. * [r1606] src/plugin/sdl/sdl.c: Tweak fullscreen mode selection (for 320x200 you now get 640x400 instead of 640x350) in SDL, and work around a crash for fbdev etc. * [r1605] src/plugin/X/X.c, src/plugin/X/screen.c, src/plugin/X/screen.h, src/plugin/sdl/sdl.c: Move X dependent part of copy/paste support into screen.c. Support copy/paste with SDL/X11. * [r1604] src/plugin/X/X_keysyms.c, src/plugin/X/keyb_X_keycode.c: Fix Alt-Gr handling with Xorg 7.1 (Reinhard & Michael Karcher) * [r1603] src/env/video/vc.c: Fix i386 compilation. * [r1602] default-configure: Fix configure with environment variables. * [r1601] src/arch/linux/async/signal.c, src/arch/linux/async/sigsegv.c, src/base/misc/dump.c, src/base/misc/utilities.c, src/emu-i386/cpu.c, src/emu-i386/simx86/cpu-emu.c, src/emu-i386/simx86/sigsegv.c, src/emu-i386/simx86/syncpu.h, src/env/video/vc.c, src/include/cpu-emu.h, src/include/cpu.h, src/include/emu.h: Implemented proper x86_64 signal handling. Have just one sigalrm handler. Fix error() to not mysteriously give different output on stderr compared to boot.log. Very basic stuff works now (freedos dir/exitemu). * [r1600] src/base/misc/dump.c, src/dosext/dpmi/dpmi.c, src/dosext/dpmi/dpmi.h, src/dosext/dpmi/msdos.c, src/dosext/mfs/mfs.c, src/dosext/mfs/mfs.h, src/dosext/net/net/ipx.c, src/emu-i386/simx86/codegen-sim.c, src/emu-i386/simx86/codegen-sim.h, src/emu-i386/simx86/cpu-emu.c, src/emu-i386/simx86/fp87-sim.c, src/emu-i386/simx86/host.h, src/emu-i386/simx86/interp.c, src/include/cpu.h, src/include/dos2linux.h, src/plugin/X/X.c, src/plugin/X/screen.c, src/plugin/term/keyb_slang.c, src/plugin/term/terminal.c: More 64-bit compatibility, mostly changing "long" to "int". 2006-10-07 Bart * [r1599] src/env/video/vgaemu.c, src/include/vgaemu.h: Make vga.mem.scratch_page a void * to avoid having to shift all the time, and 'unsigned int' did not suffice for x86-64 any more. * [r1598] src/arch/linux/debugger/dosdebug.c, src/arch/linux/debugger/mhpdbg.c, src/arch/linux/debugger/mhpdbgc.c, src/base/bios/hlt.c, src/base/bios/int10.c, src/base/bios/setup.c, src/base/dev/dma/dma.c, src/base/dev/pic/pic.c, src/base/init/config.c, src/base/init/init.c, src/base/init/memcheck.c, src/base/mouse/mouse.c, src/base/speaker/console_speaker.c, src/dosext/dpmi/msdos.c, src/dosext/drivers/aspi.c, src/dosext/mfs/lfn.c, src/dosext/mfs/mangle.c, src/dosext/mfs/mfs.c, src/dosext/mfs/mscdex.c, src/dosext/misc/emm.c, src/dosext/misc/xms.c, src/dosext/sound/sound.c, src/emu.c, src/env/video/remap.c, src/env/video/remap_pent.c, src/env/video/vga.c, src/include/dos2linux.h, src/include/memory.h, src/plugin/commands/blaster.c, src/plugin/translate/Makefile, src/plugin/translate/translate.c: Fix all x86-64 warnings in the main DOSEMU code. 64bit DOSEMU links now. * [r1597] src/emu-i386/simx86/cpatch.c, src/emu-i386/simx86/cpu-emu.c, src/emu-i386/simx86/host.h, src/emu-i386/simx86/interp.c, src/emu-i386/simx86/memory.c, src/emu-i386/simx86/sigsegv.c, src/include/emu-ldt.h: Fix x86-64 simx86 warnings. * [r1596] src/arch/linux/async/signal.c, src/arch/linux/async/sigsegv.c, src/arch/linux/mapping/mapfile.c, src/arch/linux/mapping/mapping.c, src/arch/linux/mapping/mapshm.c, src/base/dev/misc/rtc.c, src/base/misc/disks.c, src/base/misc/dos2linux.c, src/base/misc/dump.c, src/base/misc/fatfs.c, src/base/misc/ioctl.c, src/base/misc/smalloc.c, src/dosext/dpmi/dpmi.c, src/dosext/dpmi/msdos.c, src/dosext/dpmi/vxd.c, src/dosext/dpmi/windefs.h, src/emu-i386/cpu.c, src/emu-i386/do_vm86.c, src/emu-i386/simx86/Makefile, src/emu-i386/simx86/codegen-sim.c, src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/cpu-emu.c, src/emu-i386/simx86/fp87-x86.c, src/emu-i386/simx86/sigsegv.c, src/emu-i386/simx86/trees.c, src/include/bitops.h, src/include/cpu-emu.h, src/include/cpu.h, src/include/emu.h, src/include/vm86plus.h: Another batch of x86_64 changes. Using the native x86_64 sigcontext after all, where _rip is EIP or RIP (from DOSEMU itself) and _eip is always 32-bit. 2006-10-06 Bart * [r1595] src/dosext/dpmi/dpmi.c, src/dosext/dpmi/dpmi.h, src/env/video/hgc.c, src/env/video/instremu.c, src/env/video/remap.c, src/env/video/remap_asm.S, src/env/video/text.c, src/env/video/vbe.c, src/env/video/vc.c, src/env/video/vesa.c, src/env/video/vesabios_pm.S, src/env/video/vgaemu.c, src/env/video/video.c, src/include/cpu.h, src/include/memory.h, src/include/termio.h, src/include/vgaemu.h, src/include/video.h: First batch of x86-64 compatibility changes, mostly relating to integer to pointer conversions. instremu is most affected. 2006-10-05 Bart * [r1594] src/arch/linux/Makefile.main: Correct "tail +9" command to "tail -n +9". Closes #1516259. * [r1593] src/arch/linux/debugger/dis8086.c, src/dosext/misc/emm.c, src/env/video/vc.c: Fix gcc-4.2 warnings. * [r1592] 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/emu.c, src/env/video/dualmon.c, src/env/video/hgc.c, src/env/video/matrox.c, src/env/video/vc.c, src/env/video/vgaemu.c, src/include/mapping.h: Change mapping definitions to be more similar to the libc prototypes, to save on casting (particularly for x86-64, later). Handle alias maps via a separate alias_mapping() function because here are two pointers instead of pointer + offset. * [r1591] src/include/memory.h: Fix gcc warning in cmos.c. * [r1590] src/dosext/dpmi/dpmi.c, src/emu-i386/simx86/cpu-emu.c: Basic cpu-emu DPMI fixes. At least Jazz Jackrabbit starts now, but it's still not very stable. * [r1589] src/arch/linux/async/signal.c, src/arch/linux/async/sigsegv.c, src/dosext/dpmi/dpmi.c, src/dosext/dpmi/dpmi.h, src/emu-i386/simx86/cpu-emu.c, src/include/cpu-emu.h, src/include/cpu.h: Do not store the dpmi retcode in _eax any more, but return it using the normal C mechanism. There are also some basic cpuemu DPMI fixes. 2006-10-04 Bart * [r1588] src/arch/linux/async/sigsegv.c, src/dosext/dpmi/dpmi.c, src/dosext/dpmi/dpmi.h, src/dosext/dpmi/dpmisel.S, src/dosext/dpmi/dpmisel.h: Clean up unused returns, marking functions "noreturn". Move some some more asm to dpmisel.S, and make dpmisel() as small as possible. Using dpmisel() as %cs for the intermediate jmp just confuses the selector checks so this isn't implemented after all. Avoid various casts. * [r1587] src/arch/linux/async/sigsegv.c, src/dosext/dpmi/dpmi.c, src/dosext/dpmi/dpmi.h, src/emu-i386/cpu.c, src/emu-i386/simx86/sigsegv.c, src/env/video/vgaemu.c, src/include/cpu.h: Remove _emu_stack_frame. Use a special static eflags_fs_gs struct to save and restore those, and handle the rest using the real CPU segment registers, using asm macros. * [r1586] src/dosext/dpmi/dpmi.c: Eliminate one-time indirect DPMI switch to save FPU context. It's not necessary any more after inheriting it from vm86. 2006-10-03 Bart * [r1585] src/dosext/dpmi/dpmi.c, src/emu-i386/cpu.c, src/emu-i386/do_vm86.c: Do not save and restore the emulator FPU state (only VM86 and DPMI states): savefpstate (fsave) also resets the current FPU state which is good enough for calling FPU-using routines. * [r1584] src/base/dev/misc/rtc.c: Replace 1e6 by 1000000: no need for floating point here. * [r1583] src/base/bios/bios.S, src/dosext/dpmi/Makefile, src/dosext/dpmi/dpmi.c, src/dosext/dpmi/dpmisel.S, src/dosext/dpmi/dpmisel.h, src/dosext/dpmi/msdos.c, src/dosext/dpmi/vxd.c, src/include/bios.h: Move all protected mode HLTs and the intermediate direct DPMI jmp to a seperate memory area from the BIOS, and point dpmi_sel() to that. 2006-10-01 Bart * [r1582] configure, configure.ac: Better fix for configure (the previous one only worked with one option). 2006-09-30 Bart * [r1581] configure, src/include/config.h.in, src/plugin/kbd_unicode/configure, src/plugin/kbd_unicode/include/kbd_unicode_config.h.in, src/plugin/sdl/configure: Regenerate autoconf-generated files with autoconf 2.60a. * [r1580] configure.ac: Fix argument issue with calling default-configure from configure. * [r1579] src/base/init/lexer.l.in, src/base/init/parser.y.in: Use strtoul to parse dosemu.conf numbers so that hardware ram etc work with negative addresses. * [r1578] etc/dosemu.conf, src/arch/linux/mapping/mapping.c, src/base/misc/utilities.c, src/dosext/dpmi/memory.c, src/include/mapping.h, src/include/utilities.h: Use non-zero mmap target addresses without MAP_FIXED. This avoids the need to parse /proc/self/maps. Make (auto) the new default for $_dpmi_base. Change dpmi_alloc_pool for $_dpmi_base=(auto) to reject negative addresses; it will then try an address 128MB past the current brk limit which is fairly close to the old default. * [r1577] src/arch/linux/mapping/mapfile.c, src/env/video/vgaemu.c: Move VGAEMU LFB memory out of the shared memory pool (it can be anonymous). Now the memory pool can be mmap'ed rw instead of rwx (better protection with exec-shield); just the DOS-accessible memory is rwx. * [r1576] src/arch/linux/mapping/mapfile.c: Implemented workaround for failed PROT_EXEC on noexec shm mounts. * [r1575] src/arch/linux/async/signal.c, src/arch/linux/async/sigsegv.c, src/dosext/dpmi/dpmi.c, src/dosext/dpmi/dpmi.h: Use sigsetjmp() and siglongjmp() to enter and return from DPMI, instead of fiddling with CPU registers using assembly language, greatly simplifying direct_dpmi_switch(). It will also be portable to x86-64. The changes are as minimal as possible but more cleanups can certainly be done (most of the _emu_stack_frame can be eliminated for instance). 2006-09-28 Bart * [r1574] src/base/bios/bios.S, src/dosext/dpmi/dpmi.c, src/include/memory.h: Use a special mmap'ed area for direct dpmi switching. This avoids using the BIOS for data transfers and (wrt Stas' solution) has the advantage of working with -fpic/pie 2006-04-29 Bart * [r1573] src/plugin/term/terminal.c: Streamline terminal character write and ACS table construction routines. Don't use ACS characters when it's not necessary (the external charset already contains the required characters); this helps with $_external_charset="cp437" on xterm -k8 -font vga (Putty makes no difference). Only use ACS characters that are specified by the relevant terminfo entry. * [r1572] src/plugin/X/X.c: Enable use of unicode fonts for $_X_font, such as uni-vga, but also misc-fixed*iso10646-1. The logic assumes DOS codepage encoding for fonts with 256 or less characters, and UCS-16 otherwise. * [r1571] src/base/bios/bios.S, src/dosext/dpmi/dpmi.c, src/include/memory.h: Apply %cs segment limit workaround for direct_dpmi_switch on exec-shield kernels. Fixes #1478658: Crash on every DPMI program under Linux 2.6.16. 2006-04-11 Bart * [r1570] src/include/pci.h: Avoid problems with by just defining the PCI_ constants ourselves. * [r1569] src/base/init/config.c: Moved -2 -3 etc option parsing after config file parsing so they actually work. 2006-03-11 Bart * [r1568] src/env/video/render.c: Scale small modes towards ~640x400 (shows testcase for #1443448 in the right proportions) 2006-03-05 Bart * [r1567] src/emu-i386/cputime.c: Fix TSC handling during DOSEMU freeze. Fixes #1441256 keyboard issue (current cvs) 2006-03-04 Stas * [r1566] src/base/bios/bios.S, src/dosext/dpmi/dpmi.c, src/dosext/dpmi/dpmi.h, src/dosext/dpmi/msdos.c, src/dosext/dpmi/msdos.h, src/include/bios.h: Preserve the PM regs unpon the realmode interrupts. That allows to merge the msdos_pre_exec() with msdos_pre_extender(), and msdos_post_exec() became completely unnecessary and removed. Also cleaned up the dpmi_init() and removed the "psp" field from the DPMI struct (msdos.c now handles PSP) 2006-03-04 Bart * [r1565] src/tools/periph/Makefile: Fix dependency for bootsect.h after make distclean. 2006-03-04 Stas * [r1564] src/dosext/dpmi/dpmi.c, src/dosext/dpmi/dpmi.h, src/dosext/dpmi/msdos.c, src/dosext/dpmi/msdos.h: Remove wrong env-mangling code (#1442375) 2006-03-04 Bart * [r1563] src/include/vc.h, src/tools/tools86.c: Fix GCC warnings. * [r1562] src/commands/Makefile, src/plugin/commands/Makefile, src/tools/Makefile, src/tools/periph/Makefile: Use dependencies for commands and tools; using intermediate .o files was the easiest (and GCC-version-independent) way to do this. Fixes #1415598 (build deps for commands are missing). 2006-03-04 Stas * [r1561] src/base/misc/utilities.c: reapplying * [r1560] configure.ac: reapplying 2006-03-04 Bart * [r1559] src/env/video/render.c: Dirty everything in vgaemu re-inits. Fixes #1407567 (vgaemu problem with stdemo). 2006-03-03 Bart * [r1558] (all directories) Set ignore properties on directories. * [r1557] src/base/serial/ser_init.c, src/dosext/misc/xms.c: Replace $Header$ by $ Id: $ (svn only understands $ Id: $) * [r1556] src/commands/cmdline.c, src/commands/detect.h, src/commands/dosdbg.c, src/commands/emulib.h, src/commands/emumouse.c, src/commands/lredir.c, src/commands/msetenv.c, src/commands/precompiled/autoexec.bat, src/commands/turboc.cfg, src/commands/unix.c, src/commands/xmode.c: Set svn:eol-style to CRLF for all DOS text files. 2006-02-28 Bart * [r1555] src/include/vm86plus.h: Don't set force_return_for_pic. I'll leave it in the macro like this for now, so if we really find a testcase we can re-enable it. * [r1554] src/arch/linux/async/signal.c, src/base/dev/pic/pic.c, src/dosext/dpmi/dpmi.c: More correct handling of VIP; only have it set when VIF is not set, and and a hardware interrupt is requested. Optimize DPMI so that it does not return to dosemu code when interrupts are pending but VIF is not set. * [r1553] src/include/cpu.h: Change pointer casts to use unions (to allow -O2 without -fno-strict-aliasing). This does not allow removal of -fno-strict-aliasing but is a step in that direction. 2006-02-27 Stas * [r1552] src/dosext/dpmi/vxd.c, src/dosext/dpmi/windefs.h: Compile in the win32s support. It is still not activated, but at least it is now clear what functions needs to be implemented (not too much). 2006-02-27 Bart * [r1551] src/base/init/config.c, src/base/init/init.c, src/base/init/parser.y.in, src/base/misc/utilities.c, src/base/serial/ser_init.c, src/env/video/vc.c, src/env/video/video.c, src/include/emu.h, src/include/utilities.h, src/include/video.h, src/plugin/gpm/mouse_gpm.c, src/plugin/kbd_unicode/keyb_raw.c, src/plugin/term/mouse_xterm.c, src/plugin/term/term_core.c: Replaced is_console(), check_console() and config.console by a single on_console() function. Moved console config scrubbing to config_post_process(). Made scr_state_init() static. 2006-02-26 Stas * [r1550] src/dosext/dpmi/msdos.c: Never copy >64K * [r1549] src/dosext/dpmi/dpmi.c, src/emu.c: unused includes 2006-02-24 Bart * [r1548] src/base/bios/int10.c: set cursor shape after font height adjustments in int10/ah=0. Fixes #1418023 duke3d and cursor at wrong location * [r1547] src/base/init/parser.y.in: Move getpwuid() check to only do this when DOSEMU is executed suid or sudo: there is no need to access /etc/passwd when running non-suid. 2006-02-20 Stas * [r1546] src/base/bios/bios.S, src/dosext/dpmi/dpmi.c, src/dosext/dpmi/msdos.c, src/dosext/dpmi/vxd.c, src/dosext/dpmi/vxd.h, src/dosext/misc/emm.c, src/include/bios.h: Cosmetic stuff. Mostly moving the VXD code from dpmi.c to vxd.c. 2006-02-20 Bart * [r1545] src/plugin/commands/emumouse.c: Fix printf warnings. 2006-02-16 Stas * [r1544] src/base/misc/fatfs.c: Make sure to add command.com/config.sys/autoexec.bat to FAT image before the virtual floppy overflows. 2006-02-14 Stas * [r1543] src/emu.c: Regard config.exitearly better than before. * [r1542] src/base/misc/fatfs.c: This makes PartitionMagic happy again. * [r1541] src/base/misc/disks.c: Replaced a few early leavedos() with "exitearly" to avoid crashes. * [r1540] src/base/bios/bios.S: Added Ctrl-Alt-Del handling into bios. Dosemu handling still overrides though, as it seem to work "better" for some reasons. * [r1539] src/base/dev/pic/pic.c: This should fix the keyboard bug of #1430175 2006-02-13 Stas * [r1538] src/dosext/dpmi/dpmi.c: Fix corner case with VIF handling (#1430175) * [r1537] src/base/dev/pic/pic.c: This hack is no longer necessary. * [r1536] src/dosext/dpmi/msdos.c, src/include/doshelpers.h: Translation for dosemu PRINT_STRING helper. 2006-02-11 Stas * [r1535] src/include/dos2linux.h, src/plugin/commands/commands.c: Extended dpmi.com 2006-02-09 Stas * [r1534] src/base/misc/disks.c, src/base/misc/fatfs.c, src/include/disks.h, src/plugin/commands/lredir.c: - Made it possible to boot FreeDOS from virtual floppy - Scan boot dir only once for any DOS, instead of 2 times for FreeDOS and 5 for other DOSes. (not scanning for FreeDOS at all makes it impossible to boot from virtual floppy) - lredir now tries the FAT automatically when source redirection doesnt exist (for the recent redir-duplication feature) * [r1533] src/emu-i386/do_vm86.c, src/emu.c, src/include/emu.h: Shut up do_call_back() a little. (part of #1422921) 2006-02-08 Stas * [r1532] src/dosext/dpmi/dpmi.c, src/emu-i386/do_vm86.c, src/emu.c, src/include/emu.h: Call the hardware stuff from the DPMI too. (part of #1422921) * [r1531] src/base/init/parser.y.in: Print more info about "illegal user" 2006-02-08 Bart * [r1530] src/dosext/mfs/lfn.c, src/dosext/mfs/mfs.c, src/dosext/mfs/mfs.h: Merge common rmdir, mkdir, and rename MFS code between SFN and LFN. Fix problem with opening files in the root directory. Honour read only drives in the LFN code. Fixes #1426126 (LFN problem with current DosEmu) 2006-02-07 Bart * [r1529] src/base/init/lexer.l.in, src/base/init/parser.y.in, src/base/init/parsglob.h: Remove pointer casts and parsglob.h in the parser for better type safety. Use the Bison types typed_expr, int_expr, bool_expr, real_expr, and string_expr instead of the casts in V_VAL, I_VAL, B_VAL, R_VAL, and S_VAL. An integer "expression" now derives from a typed_expr (the union); its fp counterpart is a "real_expression". Remove unused TIMINT and OPTIONS tokens. Moved string quote removal from the lexer to the parser to be able to handle 'a' (and not "a" or a) cleanly as a character integer constant. 2006-02-06 Stas * [r1528] src/dosext/dpmi/msdos.c: Fix DPMI corrupting the EMS state. (#1415332) 2006-02-03 Bart * [r1527] src/base/init/parser.y.in, src/base/init/parsglob.h: Made the parser 64-bit clean. 2006-02-02 Stas * [r1526] src/base/dev/pic/pic.c, src/dosext/sound/sound.c, src/include/pic.h: Reenabled sound hack. Apparently it won't be replaced by the new code ever before 1.4. * [r1525] src/emu.c: use LOWMEM() * [r1524] src/base/dev/misc/rtc.c: pic_untrigger() on ACK. 2006-02-01 Stas * [r1523] src/base/misc/smalloc.c, src/dosext/dpmi/memory.c, src/include/smalloc.h: - Added uncommitted memory support to smalloc - Used that to make the free()'d DPMI memory uncommitted (FR#1417852) * [r1522] src/base/bios/bios.S, src/base/bios/setup.c, src/include/memory.h: Fix intvectors 1e, 41, 46. This makes it possible to use win98dos (even with $_lfn_support=(on)), because this fix stops the memory corruptions which happen when win98dos *writes* to the disk tables. * [r1521] src/base/async/int.c: This must be error(). * [r1520] src/base/bios/hlt.c: Take start_addr into account for hlt. 2006-01-31 Bart * [r1519] dist/dosemu: Fix dosemu script (#1420769) 2006-01-31 Stas * [r1518] src/base/async/int.c: Fixed "bpint" and "tf" of dosdebug. 2006-01-31 Bart * [r1517] src/arch/linux/mapping/mapfile.c, src/base/async/dyndeb.c, src/base/misc/hma.c, src/dosext/misc/emm.c, src/env/video/matrox.c, src/env/video/vgaemu.c: Remove various to-int-casts of (mostly mmap'ed) pointers. The one in matrox.c was a bug with flex-mmap. 2006-01-30 Bart * [r1516] src/dosext/misc/xms.c, src/env/video/vgaemu.c: Fix Bochs vgabios (and manual mode setting in general) interaction with vga.mem.wrap. Let XMS register all 6 relevant bytes within the hlt table (that aren't all hlt, but that does not matter). Fixes #1418856. * [r1515] src/emu-i386/cpu.c, src/emu-i386/simx86/cpu-emu.c, src/emu-i386/simx86/interp.c, src/emu-i386/simx86/protmode.c, src/emu-i386/simx86/protmode.h, src/emu-i386/simx86/sigsegv.c, src/emu-i386/simx86/syncpu.h: Use "int" instead of "long" for most things referring to 32-bit entities in cpuemu (for 64 bit compatibility), and changed the related printf()s. * [r1514] src/base/serial/ser_init.c, src/dosext/dpmi/msdos.c, src/dosext/mfs/mfs.c, src/dosext/misc/emm.c, src/dosext/net/net/ipx.c, src/emu-i386/simx86/interp.c, src/env/video/vc.c, src/env/video/vesa.c, src/env/video/vgaemu.c, src/plugin/sdl/sdl.c: Change %#x with casts to %p without casts in debug printf()s. * [r1513] src/env/video/vc.c, src/plugin/kbd_unicode/keyb_raw.c: Remove ioctl casts that are unnecessary and wrong for 64=bit code. 2006-01-28 Stas * [r1512] src/doc/HOWTO/EMUfailure.sgml: Updated. * [r1511] src/base/dev/misc/rtc.c, src/emu-i386/do_vm86.c, src/include/cmos.h: Implemented the RTC periodic IRQ generator (better later than never:) Closes FR#1406011. There are not too much of those urgently missing/missed parts now. dosemu now only lacks the proper LPT support, and well, the sound. The rest is there. 2006-01-28 Bart * [r1510] src/base/init/install.c: Fix wrong strlen() in terminal_read(). * [r1509] src/base/init/install.c, src/emu.c: Fix disclaimer file content and behaviour with console_video on. 2006-01-28 Stas * [r1508] src/dosext/dpmi/dpmi.c: "Linux DOSEMU" must die. ;-) * [r1507] src/base/async/int.c: - Made kill_time() to use sigsuspend() instead of select() - Removed some #if0'd stuff - Removed precard_xxx and card_init since they seem to be unused 2006-01-28 Bart * [r1506] src/base/async/int.c, src/base/init/install.c, src/base/init/parser.y.in, src/base/misc/dos2linux.c, src/base/misc/utilities.c, src/emu.c, src/include/dos2linux.h, src/include/dosemu_debug.h: Move disclaimer and install prompts from dos_post_boot to banner code, using BIOS calls. 2006-01-27 Stas * [r1505] src/dosext/misc/emm.c: Release EMS memory upon soft-reboot, or it overflows. * [r1504] src/base/misc/disks.c: Report virtual floppy as read-only. * [r1503] src/dosext/dpmi/dpmi.c, src/dosext/dpmi/msdos.c, src/dosext/dpmi/msdos.h: Don't let the dpmi_exec code to touch the EMS page. (probably fixes #1415332) * [r1502] src/base/dev/misc/rtc.c: Next bunch of the copy/paste fixes. :( * [r1501] src/base/dev/misc/rtc.c: Nasty copy/paste bugs of the previous commit. 2006-01-26 Stas * [r1500] src/base/async/int.c, src/base/dev/misc/cmos.c, src/base/dev/misc/rtc.c, src/include/cmos.h: - Sorted and applied all the Eric Auer's RTC fixes, except those that look wrong. - Did some (rather heavy-handed) cleanups and reorganizations, along with the minor fixes here and there, in a preparation to the periodic IRQ generator. - Got rid of pic_seti()/rtc_int8() usage. * [r1499] src/commands/ems.S, src/include/emm.h: - Use a separate message for ems.sys when the XMS is disabled. - Made ems.sys to respect the version again. Note that the ver checking was introduced because ems.sys had a severe bug which caused the obscure lock-ups for some programs. And besides, what was the reason behind *that* way of disabling the check? - Incremented ems.sys version 2006-01-25 Bart * [r1498] src/base/async/int.c: Correct si and bp in process_master_boot_record(). Make int.c 64-bit clean. 2006-01-25 Stas * [r1497] src/base/misc/fatfs.c: Fix a few fat bugs in FAT12 2006-01-23 Bart * [r1496] src/dosext/mfs/lfn.c, src/dosext/mfs/mfs.c: Improve UNC support so that it works with environment variables, LFNs and "dir" (depending on the command.com that is used). * [r1495] src/dosext/mfs/mfs.c, src/dosext/mfs/mfs.h: Added basic support for UNC pathnames in the style \\LINUX\FS\BIN\LS, using a permanent "drive 32". 2006-01-22 Stas * [r1494] src/plugin/commands/lredir.c: Convinced myself that &ptr->memb is not a dereference and therefore is safe to use with the DOS addresses. 2006-01-22 Bart * [r1493] dist/dosemu, dist/dosemu.bindist, dist/dosemu.systemwide, man/Makefile, man/dosemu.1.in, man/dosemu.bin.1.in, src/arch/linux/Makefile.main, src/base/async/int.c, src/base/init/Makefile, src/base/init/config.c, src/base/init/install.c, src/base/init/parser.y.in, src/emu.c, src/include/emu.h: Moved all the dosemu script questions to C. This allows asking in the DOSEMU window after booting if possible (so window managers don't need to specify "run in terminal" anymore), and avoiding question if not necessary (if the user already installed a DOS manually). Propagate dosemu -install option to dosemu.bin -i option. Remove X first start info, users probably know how to operate the "x" button on an X window. 2006-01-21 Stas * [r1492] src/plugin/commands/lredir.c: Carefull with the DOS memory accesses. * [r1491] src/plugin/commands/lredir.c: Implemented an ability for lredir to replicate the redirection of an existing drives, even the not redirected ones. * [r1490] etc/global.conf, src/base/misc/disks.c, src/base/misc/fatfs.c, src/base/misc/fatfs.h, src/base/misc/fatfs_boot.S, src/base/misc/ioctl.c, src/dosext/mfs/mfs.c, src/include/disks.h, src/include/dos2linux.h, src/include/fatfs.h: - Implemented FAT12 emulation. - Made $_vbootfloppy, $_floppy_a etc to accept the directories. - Made it possible to boot from a directory as from floppy ($_vbootfloppy) Fixes (the ones from the top of my head): - vol label must not contain slashes (NDD complains) - vol label must not contain lowercase letters - disabled the emusys hackery in fatfs: it was reverting the effect of the subst_file_ext() and didn't work. - made serial numbers unique for all drives - fix crash in some cases when the boot system is unavailable (fatfs_boot.S) And probably some more I cant recall... * [r1489] src/commands/ems.S, src/dosext/misc/xms.c: Dont use internal XMS if it is disabled in the config. 2006-01-19 Stas * [r1488] src/base/misc/disks.c: (cosmetic) This used to hide real bugs from gcc. 2006-01-19 Bart * [r1487] dist/dosemu, dist/dosemu.bindist, dist/dosemu.systemwide: Use a clearer menu system for initial DOSEMU-FreeDOS installation. I hope to convert most of this to C, to be executed inside the DOSEMU window later. * [r1486] src/base/async/int.c, src/emu.c, src/include/emu.h: Move liability disclaimer prompt to dos_post_boot in most circumstances: no console video and using a directory DOS boot. * [r1485] dist/dosemu, dist/dosemu.bindist, dist/dosemu.systemwide, dist/mkbindist, src/arch/linux/Makefile.main: Split dosemu script into systemwide, non-systemwide, and common sections, so some processing is simplified and can be done at compiletime, not runtime. 2006-01-18 Stas * [r1484] src/base/misc/disks.c: Fix 2 NULL-deref bugs. 2006-01-17 Bart * [r1483] src/dosext/net/net/ipx.c: Use #define'd constant for IPX. * [r1482] src/dosext/drivers/cdrom.c, src/dosext/net/net/ipx.c: Fix compiler warnings. The gcc-4.1 warning for ipx.c was a real bug too. 2006-01-16 Bart * [r1481] src/dosext/mfs/lfn.c, src/dosext/mfs/mfs.c: Store LFN volume label at offset 0x2c, and \0 at offset 0x130 for int21/ax=714e. Fixes spaces problem of #1400179 * [r1480] src/plugin/X/X.c: Re-init font_width & font_height upon X mode re-init. Fixes #1406522 xdosemu: cursor in text mode causes slight pollution. 2006-01-14 Bart * [r1479] src/dosext/mfs/lfn.c: Accept * as wildcard spec for LFN volume labels (#1400179) * [r1478] src/env/video/crtcemu.c: Set blanking start in crtc registers for VESA modes. Fixes 800x600 modes (etc), #1406001 Quake cannot change gfx resolution in X 2006-01-14 Stas * [r1477] src/doc/HOWTO/EMUfailure.sgml: Update EMUfailures. 2006-01-14 Bart * [r1476] src/plugin/gpm/Makefile: From Hans de Goede: #1405681 patch fixing x86_64 compilation. * [r1475] src/base/bios/int10.c: Remember clear video memory bit correctly. Fixes #1405682 vgaemu problem with win98dos. * [r1474] src/emu-i386/simx86/codegen-x86.c, src/emu-i386/simx86/emu86.h, src/emu-i386/simx86/memory.c, src/emu-i386/simx86/trees.c: Use smalloc for the generated code buffer in simx86 on a PROT_EXEC mmap. Fixes #1404395. 2006-01-13 Bart * [r1473] src/arch/linux/mapping/mapping.c, src/emu-i386/simx86/memory.c: Remove accidentally unremoved alias code from mapping.c simx86: mark PROT_READ memory as PROT_EXEC as well (#1404395) 2006-01-12 Stas * [r1472] src/base/dev/pic/pic.c, src/dosext/dpmi/dpmi.c: cosmetic: - add sanity checks to pic_iret() - stop calling pic_iret() from dpmi.c - this was an optimization which looks unsafe now when all the HLT checks are removed. - Unhardcode the pic HLT address! The memory.h things should IMO never be hardcoded in different places. 2006-01-12 Bart * [r1471] src/env/video/miscemu.c: Replace horizontal retrace logic with the method used in DosBox. Solves issues with Commander Keen4 reported on linux-msdos. 2006-01-07 Bart * [r1470] src/dosext/misc/xms.c: Fix the new internal XMS driver's free/largest memory reporting. 2006-01-06 Bart * [r1469] src/base/misc/disks.c, src/dosext/mfs/mfs.c, src/include/redirect.h: Make sure that the redirection resetter only clears internal state and not DOS state. Merge some common code from Cancel*Redirection into a new function RemoveRedirection. * [r1468] src/dosext/dpmi/dpmi.c: Revert if (Segments[_ss >> 3].is_32) { change which wasn't meant to be. 2006-01-04 Bart * [r1467] src/base/misc/disks.c, src/dosext/mfs/mscdex.c: Reset redirections on ctrl-alt-del. Remove a few too vocal debug printfs. * [r1466] src/base/async/int.c, src/commands/cdrom.S, src/dosext/drivers/cdrom.c, src/dosext/mfs/Makefile, src/dosext/mfs/lfn.c, src/dosext/mfs/mfs.c, src/dosext/mfs/mfs.h, src/dosext/mfs/mscdex.c, src/include/emu.h, src/plugin/commands/lredir.c: Added support for int2f/ax=15xx (MSCDEX CDROM functions). Thanks to dosbox. These make it possible to use low-level access with lredir'ed CDROMs so that MSCDEX/SHSUCDX/DOSLFN are not necessary (see also FR:1389792 volume label support for cdroms and redirected drives), using a new 'C' lredir option. Also use dos_read() in cdrom.c instead of read() because it may go straight to DOS memory. 2006-01-03 Bart * [r1465] src/arch/linux/mapping/mapping.c, src/base/async/int.c, src/base/init/memcheck.c, src/base/misc/hma.c, src/env/video/vgaemu.c, src/include/memory.h: Implement int15/ax=e820 (necessary for fdxxms.sys), and some memcheck infrastructure to construct the memory map. Avoid putting nul characters in the debug log (use 'e' for emulated hardware RAM). 2006-01-02 Bart * [r1464] src/env/video/render.c, src/env/video/vgaemu.c: Take the blanking register into account for determining height and width. Force width/height changes to update the window as well. This fixes #1124658 Problems with TIM * [r1463] src/env/video/render.c, src/env/video/vgaemu.c, src/include/vgaemu.h: Implement vgaemu wrapping around the video memory. This fixes the colour flicker problem in Commander Keen 4. * [r1462] src/base/bios/int10.c: Fix offset to copy font data from in int10/ax=11*0 (vga_RAM_to_RAM). Fixes #1394280 (X video problems with Cubic and Fast Tracker) * [r1461] src/env/video/vgaemu.c: Adjust the width when the number of bpp's change. Fixes Fast Tracker 2 display completely (#1394280) * [r1460] src/dosext/dpmi/dpmi.c: Search and replace DPMI_CLIENT.is_32 by Segments[_cs>>3].is_32 at the right places for GPF handling. There may be more of these necessary (or _ss>>3). Fixes part of bug #1394280 (Fast Tracker problem): the outw's became outd's * [r1459] INSTALL, README, dist/dosemu, doc/README.txt, man/dosemu.1.in, man/dosemu.bin.1.in, src/doc/README/X, src/doc/README/batch: Documentation updates, in particular about batch operation and X. Don't let "dosemu -dumb" complain if less than 25 lines are present. 2006-01-01 Stas * [r1458] src/doc/README/Windows, src/doc/README/config: Minor doc fixes. 2006-01-01 Bart * [r1457] doc/README.txt, etc/dosemu.conf, src/doc/README/CDROM, src/doc/README/Windows, src/doc/README/config, src/doc/README/header: Misc README.txt and dosemu.conf documentation updates (also obsoletes (#1245910 Documentation for timemode) * [r1456] etc/dosemu.conf, src/doc/README/mouse: Adapt and apply #1153944 improve mouse documentation. * [r1455] Makefile.conf.in, configure, configure.ac, man/Makefile, man/dosemu.1.in, man/dosemu.bin.1.in, man/ru/dosemu.1.in, man/ru/dosemu.bin.1.in: Set version and date automatically in man pages. * [r1454] src/dosext/mfs/mfs.c: Do not attempt open/ioctl for attributes for FIFOs etc, only for regular files and directories. 2005-12-31 Bart * [r1453] src/dosext/mfs/lfn.c: Do not clear carry if we do not support LFN for the drive. Fixes #1394114 "weird cd problem with dosemu-1.3.3" * [r1452] src/commands/ems.S: Remove comment about himem.sys. It is a personal decision whether people like to use himem.sys, himem.exe, fdxms.sys, fdxxms.sys or the internal XMS driver, all of which have their advantages and disadvantages. 2005-12-31 Stas * [r1451] src/commands/ems.S, src/dosext/misc/xms.c, src/include/smalloc.h: - Make sure smpool is always initialized before using smfree/smdestroy on it. - Give the hint about the external XMS driver usage, if not making it a default. 2005-12-31 Bart * [r1450] src/base/init/config.c, src/base/misc/dos2linux.c, src/include/dos2linux.h, src/plugin/commands/unix.c: Mostly from Clarence: unix.com patches in dosemu-exec-friendly.diff, so that "dosemu keen1.exe" works again. But do not use heuristics that split options from commands, by making quotes of filenames that contain spaces compulsory. 2005-12-30 Bart * [r1449] src/env/video/remap.c: Map white to white for 15->32 and 16->32. Closes #1244513 color correction while converting 555,565 to 888 color. * [r1448] VERSION, etc/dosemu.conf, etc/global.conf, src/base/async/int.c, src/base/misc/hma.c, src/base/misc/smalloc.c, src/commands/ems.S, src/dosext/misc/emm.c, src/dosext/misc/xms.c, src/include/doshelpers.h, src/include/hma.h, src/include/smalloc.h, src/include/xms.h: Let the internal XMS driver use int15 memory and smalloc. ems.sys can activate it if no other XMS driver is loaded. Merge old $_xms and $_ext_mem into a single $_xms option. Correct int15/88 and e801. ems.sys uses less resident memory if the XMS UMB handler is not hooked. 2005-12-29 Bart * [r1447] etc/dosemu.conf, etc/global.conf, src/base/init/config.c, src/base/init/parser.y.in: Introduce $_pci=(auto) to make the meaning of $_pci more clear. Initialize $_netdev in restricted suid mode. Report VESA in config.c. 2005-12-28 Bart * [r1446] src/base/dev/misc/pci.c: From: Michael and Reinhard Karcher. There was a problem with word and byte accesses to PCI configuration spaces. * [r1445] src/base/async/pci_bios.c: From: Michael and Reinhard Karcher. Fix segfaults in the PCI BIOS because pciConfigType was a NULL pointer. * [r1444] config.guess, config.sub, install-sh: Update autoconf helper scripts. 2005-12-27 Bart * [r1443] etc/dosemu.conf, etc/global.conf, src/base/init/parser.y.in: Allow "wholedisk" access config from dosemu.conf. Remove $_mounted_devices checks from global.conf (parser.y.in already checks). Closes FR #993179 Whole disk access. * [r1442] src/base/init/lexer.l.in: Correct and report line counter in the lexer. 2005-12-26 Bart * [r1441] etc/dosemu.conf, etc/global.conf: Add $_cdrom CDROM configuration to dosemu.conf. * [r1440] src/dosext/mfs/mfs.c: Initialise the "attr" field at two forgotten places. * [r1439] src/dosext/mfs/lfn.c, src/dosext/mfs/mfs.c, src/dosext/mfs/mfs.h: Add support for FAT_IOCTL_GET/SET_ATTRIBUTES to directly manipulate attributes on FAT partitions. Consolidate utime/chmod calls from LFN/SFN to enforce calling dos_would_allow(). 2005-12-24 Bart * [r1438] src/base/init/config.c: cpu_override() does not know about config.realcpu anymore. The checks are done later in config_post_process. * [r1437] src/include/memory.h: The BIOS size was reduced but I had not adjusted memory.h. Fixed. Solves problem with ZIPKEY (reported by Ralph Alvy, linux-msdos) * [r1436] src/emu-i386/cputime.c: Use sigsuspend() instead of usleep() in idle(). Fixes #1387967 (dosemu 1.3.3: keyboard is "sticky" on some apps) without resorting to speed 0. 2005-12-23 Bart * [r1435] src/base/misc/priv.c: Initialize the group vector to the original user's one when using sudo. * [r1434] src/base/init/config.c, src/base/misc/priv.c, src/base/misc/utilities.c, src/emu-i386/cpu.c, src/include/dosemu_config.h: Save a file descriptor to /proc/self/maps for Fedora kernels in suid mode; otherwise we lose access after dropping privileges. * [r1433] src/env/video/vc.c: Fix dosemu -s -c: set_process_control must unblock SIG_ACQUIRE/SIG_RELEASE. 2005-12-22 Bart * [r1432] src/base/async/pci_bios.c, src/base/dev/misc/pci.c: Added some (untested) support for PCI configuration mechanism 2; fix GCC warnings. 2005-12-22 Stas * [r1431] src/dosext/dpmi/dpmi.c: Fix flags handling on prot-mode hardware interrupts (#915452) Also removed some no longer valid comments. * [r1430] etc/dosemu.conf: Clarify comment. 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 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 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 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 ' * 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 instead of 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 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 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 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).