From: "kazu" <kazoo@r3.dion.ne.jp>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] QEMU News: Win32 Port
Date: Sun, 4 Apr 2004 02:11:02 +0900 [thread overview]
Message-ID: <001f01c4199e$a4607ad0$0200a8c0@afina> (raw)
In-Reply-To: 406B5612.5050701@bellard.org
[-- Attachment #1: Type: text/plain, Size: 1027 bytes --]
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
[-- Attachment #2: qemu.diff --]
[-- Type: application/octet-stream, Size: 2004 bytes --]
diff -ur qemu.org/dyngen.c qemu/dyngen.c
--- qemu.org/dyngen.c Sat Apr 3 05:56:00 2004
+++ qemu/dyngen.c Sun Apr 4 01:45:42 2004
@@ -1215,6 +1215,19 @@
error("unsupported i386 relocation (%d)", type);
}
#elif defined(CONFIG_FORMAT_COFF)
+ char *temp_name;
+ int j;
+ EXE_SYM *sym;
+ temp_name = get_sym_name(symtab + *(uint32_t *)(rel->r_reloc->r_symndx));
+ if(!strcmp(temp_name, ".data")) {
+ for (j = 0, sym = symtab; j < nb_syms; j++, sym++) {
+ if (strstart(sym->st_name, sym_name, NULL)) {
+ addend -= sym->st_value;
+ }
+ }
+ }
+
+
type = rel->r_type;
switch(type) {
case DIR32:
diff -ur qemu.org/vl.c qemu/vl.c
--- qemu.org/vl.c Sat Apr 3 06:21:32 2004
+++ qemu/vl.c Sun Apr 4 01:45:42 2004
@@ -238,7 +238,7 @@
int load_image(const char *filename, uint8_t *addr)
{
int fd, size;
- fd = open(filename, O_RDONLY);
+ fd = open(filename, O_RDONLY | O_BINARY);
if (fd < 0)
return -1;
size = lseek(fd, 0, SEEK_END);
@@ -645,6 +645,7 @@
}
}
+static MMRESULT timerID;
static void init_timers(void)
{
rt_clock = qemu_new_clock(QEMU_TIMER_REALTIME);
@@ -653,7 +654,7 @@
#ifdef _WIN32
{
int count=0;
- MMRESULT timerID = timeSetEvent(10, // interval (ms)
+ timerID = timeSetEvent(10, // interval (ms)
0, // resolution
host_alarm_handler, // function
(DWORD)&count, // user parameter
@@ -695,6 +696,10 @@
#endif
}
+void quit_timers(void)
+{
+ timeKillEvent(timerID);
+}
/***********************************************************/
/* serial device */
@@ -2134,5 +2139,6 @@
}
term_init();
main_loop();
+ quit_timers();
return 0;
}
prev parent reply other threads:[~2004-04-03 17:15 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-31 23:36 [Qemu-devel] QEMU News: Win32 Port Fabrice Bellard
2004-03-31 23:45 ` [Qemu-devel] " Fabrice Bellard
2004-04-01 2:25 ` Lennert Buytenhek
2004-04-01 4:07 ` John R. Hogerhuis
2004-04-01 8:07 ` Lennert Buytenhek
2004-04-01 7:09 ` John R. Hogerhuis
2004-04-01 8:39 ` John R. Hogerhuis
2004-03-31 23:51 ` [Qemu-devel] " John R. Hogerhuis
2004-04-01 0:06 ` Fabrice Bellard
2004-04-01 7:43 ` [Qemu-devel] QEMU News: Win32 Port - Release Schedule Rudi Lippert
2004-04-01 8:06 ` Hetz Ben Hamo
2004-04-01 8:25 ` Rudi Lippert
2004-04-01 9:24 ` John R. Hogerhuis
2004-04-01 9:30 ` Gaël Varoquaux
2004-04-01 9:58 ` Rudi Lippert
2004-04-01 22:01 ` Fabrice Bellard
2004-04-01 8:55 ` Jean-Michel POURE
2004-04-01 12:26 ` Lionel Ulmer
2004-04-01 13:42 ` Rudi Lippert
2004-04-02 23:26 ` Mark IJbema
2004-04-03 9:35 ` Wesley Parish
2004-04-01 16:31 ` [Qemu-devel] FreeBSD port (was: QEMU News: Win32 Port) Markus Niemistö
2004-04-03 17:11 ` kazu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001f01c4199e$a4607ad0$0200a8c0@afina' \
--to=kazoo@r3.dion.ne.jp \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).