[resending this message, as it didn't get through earlier ?]
Hey guys,
Here's a small patch on the current CVS tree
which fixes:
- BOCHS plugin now recognises the vga_update_interval
setting correctly.
- Reduced the user executable size from approx 1.4MB
to 0.1MB.
- Removed the superfluous --with-sdl command from
configure.in. NOTE: autoconf needs to be rerun
before committing to CVS.
-- Ramon
diff -Nur plex86-old/conf/dos plex86/conf/dos
--- plex86-old/conf/dos Sat Aug 19 13:47:38 2000
+++ plex86/conf/dos Sat Aug 19 14:05:26 2000
@@ -22,7 +22,7 @@
bochs-opt floppya: 1_44=../../1.44a, status=inserted
bochs-opt keyboard_serial_delay: 200
bochs-opt floppy_command_delay: 500
-bochs-opt vga_update_interval: 300000
+bochs-opt vga_update_interval: 50000
bochs-opt mouse: enabled=0
bochs-opt private_colormap: enabled=0
bochs-opt i440fxsupport: enabled=0
diff -Nur plex86-old/configure.in plex86/configure.in
--- plex86-old/configure.in Sat Aug 19 13:47:37 2000
+++ plex86/configure.in Sat Aug 19 13:47:51 2000
@@ -46,10 +46,6 @@
[ --with-Linux Linux host],
)
-AC_ARG_WITH(sdl,
- [ --with-sdl use SDL GUI],
- )
-
AC_ARG_WITH(linux-source,
[ --with-linux-source=dir Linux kernel source dir],
[ LINUX_SRC="$withval" ],
diff -Nur plex86-old/user/plex86.c plex86/user/plex86.c
--- plex86-old/user/plex86.c Sat Aug 19 13:47:38 2000
+++ plex86/user/plex86.c Sat Aug 19 20:56:24 2000
@@ -74,6 +74,7 @@
vm_conf.dump_vm = 0;
vm_conf.exit_wait = 0;
vm_conf.syntax = SX_NONE;
+ plugin_startup ();
diff -Nur plex86-old/user/plugin.c plex86/user/plugin.c
--- plex86-old/user/plugin.c Sat Aug 19 13:47:38 2000
+++ plex86/user/plugin.c Sat Aug 19 16:09:43 2000
@@ -27,13 +27,11 @@
-
-
-static void plugin_init_one(plugin_t *plugin);
/************************************************************************/
/* Plugin initialization / deinitialization */
/************************************************************************/
+static void plugin_init_one(plugin_t *plugin);
plugin_t *plugins = NULL; /* Head of the linked list of plugins */
@@ -143,6 +141,7 @@
}
#endif
+
void
plugin_init_one(plugin_t *plugin)
{
@@ -250,15 +249,14 @@
plugin_t *plugin;
handler_t handler;
}
-ilayer0[PORTS >> 0] = {{ NULL, NULL }}, /* input Single-byte aligns */
-olayer0[PORTS >> 0] = {{ NULL, NULL }}; /* output Single-byte aligns */
-
+ilayer0[PORTS >> 0], /* input Single-byte aligns */
+olayer0[PORTS >> 0]; /* output Single-byte aligns */
static handler_t
- ilayer1[PORTS >> 1] = { NULL }, /* input Word alignment */
- olayer1[PORTS >> 1] = { NULL }, /* output Word alignment */
- ilayer2[PORTS >> 2] = { NULL }, /* input Dword alignment */
- olayer2[PORTS >> 2] = { NULL }; /* output Dword alignment */
+ ilayer1[PORTS >> 1], /* input Word alignment */
+ olayer1[PORTS >> 1], /* output Word alignment */
+ ilayer2[PORTS >> 2], /* input Dword alignment */
+ olayer2[PORTS >> 2]; /* output Dword alignment */
static int
io_sift_alloc_inp(plugin_t *plugin, handler_t handler, int port)
@@ -678,7 +676,7 @@
handler_t handler;
struct intr_t *next;
}
-*ints[256] = { NULL }; /* Heads of linked lists for each int */
+*ints[256]; /* Heads of linked lists for each int */
int
@@ -881,4 +879,28 @@
{
if (save_funct)
save_funct(elapsed);
+}
+
+
+
+/************************************************************************/
+/* Plugin system: plex86 startup function */
+/************************************************************************/
+
+#define ZERO_ARRAY(a) memset (a, 0, sizeof(a))
+
+void
+plugin_startup (void)
+{
+ ZERO_ARRAY(ilayer0);
+ ZERO_ARRAY(ilayer1);
+ ZERO_ARRAY(ilayer2);
+
+ ZERO_ARRAY(olayer0);
+ ZERO_ARRAY(olayer1);
+ ZERO_ARRAY(olayer2);
+
+ ZERO_ARRAY(ints);
+
+ return;
}
diff -Nur plex86-old/user/plugin.h plex86/user/plugin.h
--- plex86-old/user/plugin.h Sat Aug 19 13:47:38 2000
+++ plex86/user/plugin.h Sat Aug 19 14:22:09 2000
@@ -53,6 +53,7 @@
extern plugin_t *plugins;
+void plugin_startup (void);
void plugin_load (char *name, char *args);
plugin_t *plugin_unload (plugin_t *plugin);
void plugin_init_all (void);
diff -Nur plex86-old/user/plugins/bochs/io.cc plex86/user/plugins/bochs/io.cc
--- plex86-old/user/plugins/bochs/io.cc Sat Aug 19 13:47:38 2000
+++ plex86/user/plugins/bochs/io.cc Sat Aug 19 14:00:32 2000
@@ -107,11 +107,14 @@
bx_devices.init();
bx_pc_system.start_timers();
+ if (bx_options.vga_update_interval == 0)
+ bx_options.vga_update_interval = VGA_UPDATE_INTERVAL;
+
memset(&timer, 0, sizeof(timer));
timer.it_value.tv_sec = 0;
- timer.it_value.tv_usec = VGA_UPDATE_INTERVAL;
+ timer.it_value.tv_usec = bx_options.vga_update_interval;
timer.it_interval.tv_sec = 0;
- timer.it_interval.tv_usec = VGA_UPDATE_INTERVAL;
+ timer.it_interval.tv_usec = bx_options.vga_update_interval;
setitimer(ITIMER_REAL, &timer, NULL);
}