This patch fixes the video corruption in Nethack for DOS when no video mode is specified in defaults.nh and the F3 key is hit. This patch provided by Patrick Clot More bug fixes and patches can be found at http://www.csh.rit.edu/~topher/nethack diff -aur orig-nethack-3.4.3/sys/msdos/pckeys.c nethack-3.4.3/sys/msdos/pckeys.c --- orig-nethack-3.4.3/sys/msdos/pckeys.c 2003-12-07 18:39:14.000000000 -0500 +++ nethack-3.4.3/sys/msdos/pckeys.c 2004-01-05 23:00:16.000000000 -0500 @@ -38,10 +38,12 @@ # ifdef SIMULATE_CURSOR switch(scancode) { case 0x3d: /* F3 = toggle cursor type */ - HideCursor(); - cursor_type += 1; - if (cursor_type >= NUM_CURSOR_TYPES) cursor_type = 0; - DrawCursor(); + if (iflags.usevga) { + HideCursor(); + cursor_type += 1; + if (cursor_type >= NUM_CURSOR_TYPES) cursor_type = 0; + DrawCursor(); + } break; # endif case 0x74: /* Control-right_arrow = scroll horizontal to right */ diff -aur orig-nethack-3.4.3/sys/msdos/video.c nethack-3.4.3/sys/msdos/video.c --- orig-nethack-3.4.3/sys/msdos/video.c 2003-12-07 18:39:14.000000000 -0500 +++ nethack-3.4.3/sys/msdos/video.c 2004-01-05 23:01:31.000000000 -0500 @@ -930,15 +930,15 @@ # endif # ifdef SCREEN_VGA if (vga_detect()) { - iflags.hasvga = 1; + iflags.hasvga = 1; + iflags.usevga = 1; } # endif /* * Auto-detect Priorities (arbitrary for now): * VGA */ - if (iflags.hasvga) { - iflags.usevga = 1; + if (iflags.hasvga && iflags.usevga) { /* VGA depends on BIOS to enable function keys*/ iflags.BIOS = 1; iflags.rawio = 1;