public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
* Windows 98 dos box patch
@ 2009-05-29  6:01 Ingo Brueckl
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Brueckl @ 2009-05-29  6:01 UTC (permalink / raw)
  To: linux-msdos

I don't know whether this is of any interest to anybody besides me, but my
dos editor has some extra features when running in a Windows 98 dos box, so
I made him think dosemu is what he expects by the following patch:

diff -Nur dosemu-1.4.0.orig/src/base/async/int.c dosemu-1.4.0/src/base/async/int.c
--- dosemu-1.4.0.orig/src/base/async/int.c	2007-05-04 07:59:48.000000000 +0200
+++ dosemu-1.4.0/src/base/async/int.c	2009-05-21 16:04:30.000000000 +0200
@@ -1789,10 +1789,10 @@
     }
     switch (LO(ax)) {
       case 0x00:		/* WINDOWS ENHANCED MODE INSTALLATION CHECK */
-    if (in_dpmi && in_win31) {
+    if (win98 || (in_dpmi && in_win31)) {
       D_printf("WIN: WINDOWS ENHANCED MODE INSTALLATION CHECK: %i\n", in_win31);
       if (win31_mode == 3)
-        LWORD(eax) = 0x0a03;
+        LWORD(eax) = (win98 ? 0x0a04 : 0x0a03);   /* fake running Win98 */
       else
         LWORD(eax) = 0;
       return 1;
diff -Nur dosemu-1.4.0.orig/src/base/init/config.c dosemu-1.4.0/src/base/init/config.c
--- dosemu-1.4.0.orig/src/base/init/config.c	2007-05-04 16:19:41.000000000 +0200
+++ dosemu-1.4.0/src/base/init/config.c	2009-05-21 16:04:30.000000000 +0200
@@ -62,7 +62,7 @@
  * they are eaten by secure_option_preparse().
  */
 static const char * const getopt_string =
-       "23456ABCcD:dE:e:F:f:H:h:I:i::kL:M:mNOo:P:Sstu:Vv:wXx:U:"
+       "23456ABCcD:dE:e:F:f:H:h:I:i::kL:M:mNOo:P:Sstu:Vv:wWXx:U:"
        "gK"/*NOPs kept for compat (not documented in usage())*/;


@@ -1028,6 +1028,9 @@
 	case 'w':
             config.X_fullscreen = !config.X_fullscreen;
 	    break;
+	case 'W':
+            win98 = 1;
+	    break;
 	case 'M':{
 		int             max_mem = config.vga ? 640 : MAX_MEM_SIZE;
 		config.mem_size = atoi(optarg);
diff -Nur dosemu-1.4.0.orig/src/include/emu.h dosemu-1.4.0/src/include/emu.h
--- dosemu-1.4.0.orig/src/include/emu.h	2007-05-04 07:59:48.000000000 +0200
+++ dosemu-1.4.0/src/include/emu.h	2009-05-21 16:04:30.000000000 +0200
@@ -333,6 +333,7 @@

 config_t;

+EXTERN int win98 INIT(0);

 #define SPKR_OFF	0
 #define SPKR_NATIVE	1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Windows 98 dos box patch
       [not found] <838f4dc10905290245j21b77811ga6405983b677cea4@mail.gmail.com>
@ 2009-05-29 13:49 ` Ingo Brueckl
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Brueckl @ 2009-05-29 13:49 UTC (permalink / raw)
  To: Stuart Axon; +Cc: linux-msdos

Stuart,

 > I'm curious - If you run genecyst with this, do you get long filenames ?

Actually, this is exactly why I did it. With this patch my editor recognizes
that long filenames are available. :-)

 > (it seems to check for windows, not just LFN support) ?

Yes, it checks for Windows, but this is where my editor makes its decision.

Actually, the patch should be enhanced to take the version which will be
reported instead of just returning Windows 98's 4.10.

Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-29 13:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-29  6:01 Windows 98 dos box patch Ingo Brueckl
     [not found] <838f4dc10905290245j21b77811ga6405983b677cea4@mail.gmail.com>
2009-05-29 13:49 ` Ingo Brueckl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox