From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B9okP-0000Oi-SA for qemu-devel@nongnu.org; Sat, 03 Apr 2004 12:15:57 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B9oeN-00063O-BY for qemu-devel@nongnu.org; Sat, 03 Apr 2004 12:10:16 -0500 Received: from [211.5.2.79] (helo=nm01omta019.dion.ne.jp) by monty-python.gnu.org with smtp (Exim 4.30) id 1B9oe3-0005d1-5p for qemu-devel@nongnu.org; Sat, 03 Apr 2004 12:09:23 -0500 Message-ID: <001f01c4199e$a4607ad0$0200a8c0@afina> From: "kazu" References: <406B5612.5050701@bellard.org> Subject: Re: [Qemu-devel] QEMU News: Win32 Port Date: Sun, 4 Apr 2004 02:11:02 +0900 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_001C_01C419EA.13FBB080" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. ------=_NextPart_000_001C_01C419EA.13FBB080 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hello, Fabrice Bellard wrote: > I commited an experimental win32 port of QEMU. I did not test it yet, > but it compiles. It is based on Kazu port, but I made heavy > modifications to minimize the number of ifdefs and to factorize the > "dyngen" utility code. This is a patch for current CVS. A patch of dyngen.c is only for cc_table. It is in op.c, so a location of cc_table[CC_OP].compute_c() in op_update_inc_cc function has a offset value from a head of .data section not a head of cc_table. So it needs to modify addend. In vl.c, O_BINARY needs to read binary file. timeKillEvent ends timer. To test the program, apply this patch, make and type at i386-softmmu directory if linux.img is at the top of qemu source code: i386-softmmu$ ./qemu.exe -L ../pc-bios --hda ../linux.img Double hyphen needs to set hard disk image. If there is not texi2html at make, type at the top of source code: qemu$ touch qemu-doc.html There is a problem. Keybord layout is wrong in Japanese. I can not type in Linux. Have fun, kazu ------=_NextPart_000_001C_01C419EA.13FBB080 Content-Type: application/octet-stream; name="qemu.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="qemu.diff" diff -ur qemu.org/dyngen.c qemu/dyngen.c=0A= --- qemu.org/dyngen.c Sat Apr 3 05:56:00 2004=0A= +++ qemu/dyngen.c Sun Apr 4 01:45:42 2004=0A= @@ -1215,6 +1215,19 @@=0A= error("unsupported i386 relocation (%d)", type);=0A= }=0A= #elif defined(CONFIG_FORMAT_COFF)=0A= + char *temp_name;=0A= + int j;=0A= + EXE_SYM *sym;=0A= + temp_name =3D get_sym_name(symtab + *(uint32_t = *)(rel->r_reloc->r_symndx));=0A= + if(!strcmp(temp_name, ".data")) {=0A= + for (j =3D 0, sym =3D symtab; j < nb_syms; j++, sym++) {=0A= + if (strstart(sym->st_name, sym_name, NULL)) {=0A= + addend -=3D sym->st_value;=0A= + }=0A= + }=0A= + }=0A= +=0A= +=0A= type =3D rel->r_type;=0A= switch(type) {=0A= case DIR32:=0A= diff -ur qemu.org/vl.c qemu/vl.c=0A= --- qemu.org/vl.c Sat Apr 3 06:21:32 2004=0A= +++ qemu/vl.c Sun Apr 4 01:45:42 2004=0A= @@ -238,7 +238,7 @@=0A= int load_image(const char *filename, uint8_t *addr)=0A= {=0A= int fd, size;=0A= - fd =3D open(filename, O_RDONLY);=0A= + fd =3D open(filename, O_RDONLY | O_BINARY);=0A= if (fd < 0)=0A= return -1;=0A= size =3D lseek(fd, 0, SEEK_END);=0A= @@ -645,6 +645,7 @@=0A= }=0A= }=0A= =0A= +static MMRESULT timerID;=0A= static void init_timers(void)=0A= {=0A= rt_clock =3D qemu_new_clock(QEMU_TIMER_REALTIME);=0A= @@ -653,7 +654,7 @@=0A= #ifdef _WIN32=0A= {=0A= int count=3D0;=0A= - MMRESULT timerID =3D timeSetEvent(10, // interval (ms)=0A= + timerID =3D timeSetEvent(10, // interval (ms)=0A= 0, // resolution=0A= host_alarm_handler, // function=0A= (DWORD)&count, // user = parameter=0A= @@ -695,6 +696,10 @@=0A= #endif=0A= }=0A= =0A= +void quit_timers(void)=0A= +{=0A= + timeKillEvent(timerID);=0A= +}=0A= /***********************************************************/=0A= /* serial device */=0A= =0A= @@ -2134,5 +2139,6 @@=0A= }=0A= term_init();=0A= main_loop();=0A= + quit_timers();=0A= return 0;=0A= }=0A= ------=_NextPart_000_001C_01C419EA.13FBB080--