Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

QEMU trunk builds for DOS - keyboard bug fix (Announce)

posted by Rugxulo Homepage, Usono, 17.03.2009, 00:42

> > But I played with the Qemu v0.91 source for myself and "fixed" the bug.
> >
> > Here is the modified
> > source code.
>
> Thanks! :-) I'll have a look at it.

Rod. P. on news://comp.os.msdos.djgpp mentioned a small QEMU patch of his too, which may or may not be interesting for you:

> QEMU 0.8.2 works on Win98SE, but QEMU 0.9.1 needs some help.
> I posted a patch here. IIRC, it didn't fix cdrom images.
> But, (since I didn't/don't have email to send to them) I don't
> think ever got to the QEMU team:
>
> http://groups.google.com/group/alt.os.development/msg/b4dc0fc1a7d501fc?hl=en

diff -Naur qemu-0.9.1/block-raw-win32.c qemu-0.9.1.win98se/block-raw-win32.c
--- qemu-0.9.1/block-raw-win32.c 2008-01-06 14:38:42.000000000 +0000
+++ qemu-0.9.1.win98se/block-raw-win32.c 2008-02-13 20:37:46.000000000 +0000
@@ -34,6 +34,10 @@
 #define FTYPE_CD     1
 #define FTYPE_HARDDISK 2

+#if 1
+#define WIN98SE
+#endif
+
 typedef struct BDRVRawState {
     HANDLE hfile;
     int type;
@@ -103,7 +107,11 @@
 #ifdef QEMU_IMG
     overlapped = FILE_ATTRIBUTE_NORMAL;
 #else
+#ifndef WIN98SE
     overlapped = FILE_FLAG_OVERLAPPED;
+#else
+    overlapped = FILE_ATTRIBUTE_NORMAL;
+#endif
 #endif
     if (flags & BDRV_O_DIRECT)
         overlapped |= FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH;
@@ -131,7 +139,12 @@
     memset(&ov, 0, sizeof(ov));
     ov.Offset = offset;
     ov.OffsetHigh = offset >> 32;
+#ifndef WIN98SE
     ret = ReadFile(s->hfile, buf, count, &ret_count, &ov);
+#else
+    SetFilePointer(s->hfile,ov.Offset,&ov.OffsetHigh,FILE_BEGIN);
+    ret = ReadFile(s->hfile, buf, count, &ret_count, NULL);
+#endif
     if (!ret) {
         ret = GetOverlappedResult(s->hfile, &ov, &ret_count, TRUE);
         if (!ret)
@@ -153,7 +166,12 @@
     memset(&ov, 0, sizeof(ov));
     ov.Offset = offset;
     ov.OffsetHigh = offset >> 32;
+#ifndef WIN98SE
     ret = WriteFile(s->hfile, buf, count, &ret_count, &ov);
+#else
+    SetFilePointer(s->hfile,ov.Offset,&ov.OffsetHigh,FILE_BEGIN);
+    ret = WriteFile(s->hfile, buf, count, &ret_count, NULL);
+#endif
     if (!ret) {
         ret = GetOverlappedResult(s->hfile, &ov, &ret_count, TRUE);
         if (!ret)

 

Complete thread:

Back to the forum
Board view  Mix view
22632 Postings in 2109 Threads, 402 registered users, 351 users online (0 registered, 351 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum