diff -Nru base088/config.def w088/config.def
--- base088/config.def	2004-07-06 17:37:00.000000000 +1200
+++ w088/config.def	2004-10-25 22:44:42.000000000 +1300
@@ -1,5 +1,5 @@
 TARGET=mame
-EXTRA_SUFFIX=p
+EXTRA_SUFFIX=p88
 
 USE_SCALE_EFFECTS=1
 USE_MMX_INTERP_SCALE=1
@@ -17,6 +17,6 @@
 USE_CUSTOM_BUTTON=1
 USE_INP_CAPTION=1
 USE_AUTO_PAUSE_PLAYBACK=1
-USE_NEOGEO_HACKS=1
+#USE_NEOGEO_HACKS=1
 # USE_UPX=1
 # LAMER=1
diff -Nru base088/playback.bat w088/playback.bat
--- base088/playback.bat	1970-01-01 13:00:00.000000000 +1300
+++ w088/playback.bat	2004-10-25 22:45:10.000000000 +1300
@@ -0,0 +1,11 @@
+@echo off
+move cfg\%1.cfg cfg\%1.bak
+move hi\%1.hi hi\%1.bak
+move nvram\%1.nv nvram\%1.bak
+
+mamep88 %1 -playback %2 %3 %4 %5 %6 %7 %8 %9
+
+move cfg\%1.bak cfg\%1.cfg
+move hi\%1.bak hi\%1.hi
+move nvram\%1.bak nvram\%1.nv
+
diff -Nru base088/record.bat w088/record.bat
--- base088/record.bat	1970-01-01 13:00:00.000000000 +1300
+++ w088/record.bat	2004-10-25 22:44:52.000000000 +1300
@@ -0,0 +1,11 @@
+@echo off
+move cfg\%1.cfg cfg\%1.bak
+move hi\%1.hi hi\%1.bak
+move nvram\%1.nv nvram\%1.bak
+
+mamep88 %1 -record %2 %3 %4 %5 %6 %7 %8 %9
+
+move cfg\%1.bak cfg\%1.cfg
+move hi\%1.bak hi\%1.hi
+move nvram\%1.bak nvram\%1.nv
+
diff -Nru base088/src/cpu/i960/i960.c w088/src/cpu/i960/i960.c
--- base088/src/cpu/i960/i960.c	2004-10-24 22:52:02.000000000 +1300
+++ w088/src/cpu/i960/i960.c	2004-10-25 22:33:42.000000000 +1300
@@ -9,6 +9,7 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <math.h>
+#include <float.h>
 
 
 // Warning, IP = Instruction Pointer, called PC outside of Intel
@@ -1455,7 +1456,7 @@
 			case 0xa: // logbnr
 				i960_icount -= 37;
 				t1f = get_1_rif(opcode);
-				set_rif(opcode, logb(t1f));
+				set_rif(opcode, _logb(t1f));
 				break;
 
 			case 0xb: // roundr
@@ -1525,7 +1526,7 @@
 			case 0xa: // logbnrl
 				i960_icount -= 37;
 				t1f = get_1_rifl(opcode);
-				set_rifl(opcode, logb(t1f));
+				set_rifl(opcode, _logb(t1f));
 				break;
 
 			case 0xb: // roundrl
diff -Nru base088/src/drivers/rohga.c w088/src/drivers/rohga.c
--- base088/src/drivers/rohga.c	2004-09-21 20:02:10.000000000 +1200
+++ w088/src/drivers/rohga.c	2004-10-25 22:33:42.000000000 +1300
@@ -404,7 +404,7 @@
 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 )
 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 )
 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
-	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 )
+	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) PORT_IMPULSE(1)
 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
@@ -412,7 +412,7 @@
 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED )
-	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 )
+	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 ) PORT_IMPULSE(1)
 
 	PORT_START
 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
diff -Nru base088/src/inptport.c w088/src/inptport.c
--- base088/src/inptport.c	2004-10-25 11:16:00.000000000 +1300
+++ w088/src/inptport.c	2004-10-25 22:39:22.000000000 +1300
@@ -112,6 +112,19 @@
 extern void *playback;
 static int pback;
 
+// W: game speed storage
+extern unsigned long framer;
+static unsigned long hold;
+
+// W: Average speed calculation
+double speed_total;
+unsigned int speed_counter;
+
+// W: For regular INP usage
+int isnotwolf;
+
+// W: For input view
+char inputstr[80];
 
 
 
@@ -1987,6 +2000,18 @@
 			}
 
 		}
+
+		// W: Read stored speed
+		if(isnotwolf == 0)
+			mame_fread(playback,&framer,sizeof(framer));
+
+		// For average speed calculations
+		if(!mame_feof(playback)) 
+		{
+			speed_counter++;
+			speed_total += (framer - 0xe143823e);
+		}
+
 		port = Machine->input_ports;
 
 		portnum = 0;
@@ -2025,8 +2050,87 @@
 
 	/* handle recording */
 	if (record != NULL)
+	{
 		for (portnum = 0; portnum < MAX_INPUT_PORTS; portnum++)
 			write_port_value(record, input_port_value[portnum]);
+		hold = 0xe143823e + framer;
+		mame_fwrite(record,&hold,sizeof(framer));
+	}
+
+	memset(inputstr,32,79);
+	inputstr[79] = '\0';
+	for (portnum = 0; portnum < MAX_INPUT_PORTS; portnum++)
+	{
+		for (bitnum = 0, info = &bit_info[portnum][0]; bitnum < MAX_BITS_PER_PORT && info->port; bitnum++, info++)
+		{
+			struct InputPort *port = info->port;
+			
+			if(port->player == options.inpview - 1)
+			{
+			  if(port->type == IPT_JOYSTICK_LEFT && (input_port_value[portnum] & port->mask) != (port->default_value & port->mask))
+			  {
+				inputstr[2] = '_';
+				inputstr[3] = '4';
+			  }
+			  if(port->type == IPT_JOYSTICK_UP && (input_port_value[portnum] & port->mask) != (port->default_value & port->mask))
+			  {
+				inputstr[4] = '_';
+				inputstr[5] = '8';
+			  }
+			  if(port->type == IPT_JOYSTICK_RIGHT && (input_port_value[portnum] & port->mask) != (port->default_value & port->mask))
+			  {
+				inputstr[6] = '_';
+				inputstr[7] = '6';
+			  }
+			  if(port->type == IPT_JOYSTICK_DOWN && (input_port_value[portnum] & port->mask) != (port->default_value & port->mask))
+			  {
+				inputstr[8] = '_';
+				inputstr[9] = '2';
+			  }
+			  if(port->type == IPT_BUTTON1 && (input_port_value[portnum] & port->mask) != (port->default_value & port->mask))
+				inputstr[12] = '1';
+			  if(port->type == IPT_BUTTON2 && (input_port_value[portnum] & port->mask) != (port->default_value & port->mask))
+				inputstr[13] = '2';
+			  if(port->type == IPT_BUTTON3 && (input_port_value[portnum] & port->mask) != (port->default_value & port->mask))
+				inputstr[14] = '3';
+			  if(port->type == IPT_BUTTON4 && (input_port_value[portnum] & port->mask) != (port->default_value & port->mask))
+				inputstr[15] = '4';
+			  if(port->type == IPT_BUTTON5 && (input_port_value[portnum] & port->mask) != (port->default_value & port->mask))
+				inputstr[16] = '5';
+			  if(port->type == IPT_BUTTON6 && (input_port_value[portnum] & port->mask) != (port->default_value & port->mask))
+				inputstr[17] = '6';
+			  if(port->type == IPT_BUTTON7 && (input_port_value[portnum] & port->mask) != (port->default_value & port->mask))
+				inputstr[18] = '7';
+			  if(port->type == IPT_BUTTON8 && (input_port_value[portnum] & port->mask) != (port->default_value & port->mask))
+				inputstr[19] = '8';
+			  if(port->type == IPT_BUTTON9 && (input_port_value[portnum] & port->mask) != (port->default_value & port->mask))
+				inputstr[20] = '9';
+			  if(port->type == IPT_BUTTON10 && (input_port_value[portnum] & port->mask) != (port->default_value & port->mask))
+				inputstr[21] = '0';
+			}
+			if(port->type == IPT_START1 && (input_port_value[portnum] & port->mask) != (port->default_value & port->mask))
+			{
+				inputstr[24] = '1';
+				inputstr[25] = 'P';
+			}
+			if(port->type == IPT_START2 && (input_port_value[portnum] & port->mask) != (port->default_value & port->mask))
+			{
+				inputstr[27] = '2';
+				inputstr[28] = 'P';
+			}
+			if(port->type == IPT_START3 && (input_port_value[portnum] & port->mask) != (port->default_value & port->mask))
+			{
+				inputstr[30] = '3';
+				inputstr[31] = 'P';
+			}
+			if(port->type == IPT_START4 && (input_port_value[portnum] & port->mask) != (port->default_value & port->mask))
+			{
+				inputstr[33] = '4';
+				inputstr[34] = 'P';
+			}
+		}
+	}
+
 
 profiler_mark(PROFILER_END);
 }
diff -Nru base088/src/mame.c w088/src/mame.c
--- base088/src/mame.c	2004-10-25 11:18:16.000000000 +1300
+++ w088/src/mame.c	2004-10-25 22:33:49.000000000 +1300
@@ -109,6 +109,7 @@
 #include "driver.h"
 #include <ctype.h>
 #include <stdarg.h>
+#include <time.h>
 #include "ui_text.h"
 #include "mamedbg.h"
 #include "artwork.h"
@@ -569,7 +570,7 @@
 				/* load the NVRAM now */
 				if (Machine->drv->nvram_handler)
 				{
-					if (record || playback)
+					if ((record || playback) && !options.allownvram)
 						(*Machine->drv->nvram_handler)(0,0);
 					else
 					{
@@ -580,9 +581,28 @@
 					}
 				}
 
+				/* store the start time */
+				if(record)
+				{
+					long t = (long)time(NULL);
+
+					mame_fseek(record,24,SEEK_SET);
+					mame_fwrite(record,&t,sizeof(long));
+					mame_fseek(record,0,SEEK_END);
+				}
+
 				/* run the emulation! */
 				cpu_run();
 
+				// last minute header writing ;)	
+				if(options.record)
+				{
+					short endtime = (long)time(NULL) & 0xffff;
+		
+					mame_fseek(options.record,28,SEEK_SET);
+					mame_fwrite(options.record,&endtime,sizeof(short));
+				}
+
 				/* save the NVRAM */
 				if (Machine->drv->nvram_handler && !record && !playback)
 				{
diff -Nru base088/src/mame.h w088/src/mame.h
--- base088/src/mame.h	2004-10-25 11:16:02.000000000 +1300
+++ w088/src/mame.h	2004-10-25 22:33:49.000000000 +1300
@@ -294,6 +294,9 @@
 #ifdef AUTO_PAUSE_PLAYBACK
 	int		auto_pause_playback;	/* automatic pause after playback is finished */
 #endif /* AUTO_PAUSE_PLAYBACK */
+	int     allownvram;  /* allows NVRAM to be used when recording or playing INPs */
+	int		inpview;  /* enables input viewing and determines which player's to show */
+
 };
 
 
diff -Nru base088/src/osdepend.h w088/src/osdepend.h
--- base088/src/osdepend.h	2004-07-24 15:05:10.000000000 +1200
+++ w088/src/osdepend.h	2004-10-25 22:33:49.000000000 +1300
@@ -237,7 +237,17 @@
 {
 	char name[9];      /* 8 bytes for game->name + NUL */
 	char version[3];   /* byte[0] = 0, byte[1] = version byte[2] = beta_version */
-	char reserved[20]; /* for future use, possible store game options? */
+	char options;  /* Store some options - 
+						Bit 0: cheats enabled
+						Bit 1/2: m68k core (C, ASM, DRC) */
+	char fskip;    /* Store fskip value */
+	char options2; /* More game options - 
+						Bit 0: Sound enabled (I hope) */
+	char cputype;  /* Intel/AMD CPU type */
+	INT64 spd;  /* recorded clock speed */
+	long timestamp; /* date/time INP was started */
+	char reserved2[2];
+	unsigned short check;  /* checksum */
 } INP_HEADER;
 
 
diff -Nru base088/src/ui/options.c w088/src/ui/options.c
--- base088/src/ui/options.c	2004-10-25 12:00:44.000000000 +1300
+++ w088/src/ui/options.c	2004-10-25 22:33:49.000000000 +1300
@@ -516,7 +516,7 @@
 	{ "use_bezels", "bezel", rc_bool, &gOpts.bezels, "1", 0, 0, NULL, "use bezel artwork" },
 	{ "artwork_crop", "artcrop", rc_bool, &gOpts.artwork_crop, "0", 0, 0, NULL, "crop artwork to game screen only" },
 	{ "artwork_resolution", "artres", rc_int, &gOpts.artres, "0", 0, 0, NULL, "artwork resolution (0 for auto)" },
-	{ "cheat", "c", rc_bool, &gOpts.cheat, "1", 0, 0, NULL, "enable/disable cheat subsystem" },
+	{ "cheat", "c", rc_bool, &gOpts.cheat, "0", 0, 0, NULL, "enable/disable cheat subsystem" },
 	{ "debug", "d", rc_bool, &gOpts.mame_debug, "0", 0, 0, NULL, "enable/disable debugger (only if available)" },
 	{ "playback", "pb", rc_string, &gOpts.playbackname, NULL, 0, 0, NULL, "playback an input file" },
 	{ "record", "rec", rc_string, &gOpts.recordname, NULL, 0, 0, NULL, "record an input file" },
diff -Nru base088/src/usrintrf.c w088/src/usrintrf.c
--- base088/src/usrintrf.c	2004-10-16 18:35:20.000000000 +1300
+++ w088/src/usrintrf.c	2004-10-25 22:42:59.000000000 +1300
@@ -38,6 +38,13 @@
 extern void *playback;
 #endif /* AUTO_PAUSE_PLAYBACK */
 
+// W: for speed storage
+extern void* record;
+extern unsigned long framer;
+
+//W: for inp view
+extern char inputstr[80];
+
 /* Variables for stat menu */
 extern char build_version[];
 
@@ -5453,7 +5460,7 @@
 		"Press Select key/button to quit,\n"
 		"Cancel key/button to continue.";
 
-	if (!options.confirm_quit)
+	if (!options.confirm_quit || record)
 		return 1;
 
 	while (1)
@@ -5579,14 +5586,14 @@
 	if (input_ui_pressed(IPT_UI_RESET_MACHINE))
 		machine_reset();
 
-	if (input_ui_pressed(IPT_UI_SAVE_STATE))
+	if (input_ui_pressed(IPT_UI_SAVE_STATE) && !record)
 		do_loadsave(bitmap, LOADSAVE_SAVE);
 
-	if (input_ui_pressed(IPT_UI_LOAD_STATE))
+	if (input_ui_pressed(IPT_UI_LOAD_STATE) && !record)
 		do_loadsave(bitmap, LOADSAVE_LOAD);
 
 #ifndef MESS
-	if (auto_pause || single_step || input_ui_pressed(IPT_UI_PAUSE)) /* pause the game */
+	if ((auto_pause || single_step || input_ui_pressed(IPT_UI_PAUSE)) && !record) /* pause the game */
 	{
 #else
 	if (setup_selected)
@@ -5602,7 +5609,7 @@
 		if (single_step == 0)
 			mame_pause(1);
 
-		while (!input_ui_pressed(IPT_UI_PAUSE))
+		while (!input_ui_pressed(IPT_UI_PAUSE) && !record)
 		{
 			profiler_mark(PROFILER_VIDEO);
 			if (osd_skip_this_frame() == 0)
@@ -5659,14 +5666,14 @@
 				}
 			}
 
-			if (input_ui_pressed(IPT_UI_SAVE_STATE))
+			if (input_ui_pressed(IPT_UI_SAVE_STATE) && !record)
 				do_loadsave(bitmap, LOADSAVE_SAVE);
 
-			if (input_ui_pressed(IPT_UI_LOAD_STATE))
+			if (input_ui_pressed(IPT_UI_LOAD_STATE) && !record)
 				do_loadsave(bitmap, LOADSAVE_LOAD);
 
 			/* if the user pressed F4, show the character set */
-			if (input_ui_pressed(IPT_UI_SHOW_GFX))
+			if (input_ui_pressed(IPT_UI_SHOW_GFX) && !record)
 				showcharset(bitmap);
 
 			if (setup_selected == 0 && input_ui_pressed(IPT_UI_CANCEL))
@@ -5730,6 +5737,14 @@
 						schedule_full_refresh();
 				}
 			}
+			// W: show inp view
+			if(options.inpview != 0)
+			{
+				convert_command_move(inputstr);
+				ui_text(bitmap,inputstr,0,uirotheight - uirotcharheight);
+			}
+
+
 
 			/* add the FPS counter */
 			ui_display_fps(bitmap);
@@ -5788,7 +5803,7 @@
 
 
 	/* if the user pressed F4, show the character set */
-	if (input_ui_pressed(IPT_UI_SHOW_GFX))
+	if (input_ui_pressed(IPT_UI_SHOW_GFX) && !record)
 	{
 		osd_sound_enable(0);
 
@@ -5797,7 +5812,7 @@
 		osd_sound_enable(1);
 	}
 
-	if (input_ui_pressed(IPT_UI_TOGGLE_AUTOFIRE))
+	if (input_ui_pressed(IPT_UI_TOGGLE_AUTOFIRE) && !record)
 	{
 		extern void toggle_autofire(void);
 
@@ -5810,6 +5825,21 @@
 		drawgfx_toggle_crosshair();
 	}
 
+	/* W: Store speed */
+	if(record) 
+	{
+		const struct performance_info *performance = mame_get_performance_info();
+
+		framer = (int)(performance->game_speed_percent + 0.5);
+	}
+
+	// W: show inp view
+	if(options.inpview != 0)
+	{
+		convert_command_move(inputstr);
+		ui_text(bitmap,inputstr,0,uirotheight - uirotcharheight);
+	}
+
 	/* add the FPS counter */
 	ui_display_fps(bitmap);
 
diff -Nru base088/src/windows/config.c w088/src/windows/config.c
--- base088/src/windows/config.c	2004-10-25 12:01:26.000000000 +1300
+++ w088/src/windows/config.c	2004-10-25 22:43:47.000000000 +1300
@@ -49,6 +49,15 @@
 #include "configms.h"
 #endif
 
+//W: For various information put into the WolfMAME header
+cycles_t get_cycles(void);
+void get_cpu(char*);
+extern int win_high_priority;
+extern int frameskip;
+// W: for regular INP usage
+extern int isnotwolf;
+
+
 extern int frontend_help(char *gamename);
 static int config_handle_arg(char *arg);
 
@@ -270,6 +279,8 @@
 	{ "m68k_core", NULL, rc_int, &options.m68k_core, "0", 0, 2, NULL, "change m68k core (0:C, 1:DRC, 2:ASM+DRC)" },
 #endif /* (HAS_M68000 || HAS_M68008 || HAS_M68010 || HAS_M68EC020 || HAS_M68020) */
 //ks hcmame e switch m68k core
+ 	{ "allownvram", "allownv", rc_bool, &options.allownvram, "0", 0, 0, NULL, "Allow the use of NVRAM when recording or playing back INPs" },
+	{ "inpview", "iv", rc_int, &options.inpview, "0", 0, 0, NULL, "Shows a certain player's input on screen in real-time (default 0=disable)" },
 #ifdef UI_COLOR_DISPLAY
 	/* palette */
 	{ NULL, NULL, rc_link, palette_opts, NULL, 0,	0, NULL, NULL },
@@ -564,8 +575,87 @@
 	{
 		INP_HEADER inp_header;
 
+		int a;
+		unsigned short chk = 0;
+		short* ptr;
+
 		/* read playback header */
+		isnotwolf = 0;
 		mame_fread(options.playback, &inp_header, sizeof(INP_HEADER));
+		if (inp_header.version[0] != 'W' || inp_header.version[1] < 84)
+		{
+			fprintf(stderr,"Not a WolfMAME Plus 0.84u5 or later INP file\n");
+			isnotwolf = 1;
+		}
+
+		if(isnotwolf == 0)
+		{
+			if(inp_header.version[2] != 0)
+				printf(_WINDOWS("Recorded in WolfMAME 0.%iu%i\n"),inp_header.version[1],inp_header.version[2]);
+			else
+				printf(_WINDOWS("Recorded in WolfMAME 0.%i\n"),inp_header.version[1]);		
+		
+			printf(_WINDOWS("Recorded system's speed = ~%I64iMHz ("),(inp_header.spd / 1000000));
+			switch(inp_header.cputype)
+			{
+			case 1:
+				printf("Intel)\n");
+				break;
+			case 2:
+				printf("AMD)\n");
+				break;
+			case 3:
+				printf("Transmeta)\n");
+				break;
+			case 4:
+				printf("Cyrix)\n");
+				break;
+			default:
+				printf("Other/Unknown)\n");
+			}
+		
+			switch((inp_header.options>>1) & 0x03)
+			{
+			case 0:
+				printf(_WINDOWS("This recording was made with the C 68k core enabled\n"));
+				options.m68k_core = 0;
+				break;
+			case 1:
+				printf(_WINDOWS("This recording was made with the DynaRec core enabled\n"));
+				options.m68k_core = 1;
+				break;
+			case 2:
+				printf(_WINDOWS("This recording was made with the ASM 68k and DynaRec cores enabled\n"));
+				options.m68k_core = 2;
+				break;
+			default:
+				printf(_WINDOWS("Warning: Unknown -m68k_core option.\n"));
+			}
+		
+			if(inp_header.options & 0x01)
+				printf(_WINDOWS("This recording has cheats enabled\n"));
+			printf("Start date of recording: %s\n",ctime(&inp_header.timestamp));
+
+			if(inp_header.version[1] > 83)
+			{
+				if(inp_header.options2 & 0x01)
+					enable_sound = 1;
+				else
+				{
+					printf("Sound disabled\n");
+					enable_sound = 0;
+				}
+			}
+
+			(INP_HEADER*)ptr = &inp_header;
+			for(a=0;a<12;a++)
+				chk+=(short)*(ptr+a);
+			if(inp_header.check != chk)
+				printf(_WINDOWS("Check failed.  Expected %04x, found %04x\n"),chk,inp_header.check);
+			else
+				printf(_WINDOWS("Checks out OK. [%04x]\n"),chk);
+		}
+
 
 		if (!isalnum(inp_header.name[0])) /* If first byte is not alpha-numeric */
 			mame_fseek(options.playback, 0, SEEK_SET); /* old .inp file - no header */
@@ -686,6 +776,11 @@
 	if (options.record)
 	{
 		INP_HEADER inp_header;
+		cycles_t a,b;
+		int start,end,priority;
+		unsigned short chk = 0;
+		short* ptr;
+		char str[13];
 
 		memset(&inp_header, '\0', sizeof(INP_HEADER));
 		strcpy(inp_header.name, drivers[game_index]->name);
@@ -698,6 +793,62 @@
 		   inp_header.version[1] = VERSION;
 		   inp_header.version[2] = BETA_VERSION;
 		 */
+		inp_header.version[0] = 'W';
+	    inp_header.version[1] = 88;
+		inp_header.version[2] = 0;
+
+		inp_header.options = 0;
+		inp_header.options += options.cheat;
+		inp_header.options += options.m68k_core*2;
+		inp_header.fskip = frameskip;
+
+		inp_header.options2 = 0;
+		inp_header.options2 += enable_sound;
+
+		get_cpu(str);
+		inp_header.cputype = 0;
+		if(strcmp(str,"GenuineIntel") == 0)
+			inp_header.cputype = 1;  // Intel CPU
+		if(strcmp(str,"AuthenticAMD") == 0)
+			inp_header.cputype = 2;  // AMD CPU
+		if(strcmp(str,"GenuineTMx86") == 0)
+			inp_header.cputype = 3;  // Transmeta CPU
+		if(strcmp(str,"CyrixInstead") == 0)
+			inp_header.cputype = 4;  // Cyrix CPU
+
+		// temporarily set our priority higher
+		priority = GetThreadPriority(GetCurrentThread());
+		SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
+
+		// wait for an edge on the timeGetTime call
+		start = timeGetTime();
+		do
+		{
+			end = timeGetTime();
+		} while (start == end);
+
+		a = get_cycles();
+		// now wait for 1/4 second total
+		do
+		{
+			start = timeGetTime();
+		} while (start - end < 250);
+		b = get_cycles();
+
+		// restore our priority
+		// raise it if the config option is set and the debugger is not active
+		if (win_high_priority && !options.mame_debug && priority == THREAD_PRIORITY_NORMAL)
+			priority = THREAD_PRIORITY_ABOVE_NORMAL;
+		SetThreadPriority(GetCurrentThread(), priority);
+
+		inp_header.spd = (b - a)* 4;
+		inp_header.timestamp = (long)time(NULL);
+
+		(INP_HEADER*)ptr = &inp_header;
+		for(a=0;a<12;a++)
+			chk+=(short)*(ptr+a);
+		inp_header.check = chk;
+
 		mame_fwrite(options.record, &inp_header, sizeof(INP_HEADER));
 	}
 
@@ -1026,3 +1177,68 @@
 
 	return newname;
 }
+
+// copied for use here.
+cycles_t get_cycles(void)
+{
+#ifdef _MSC_VER
+	INT64 result;
+	INT64 *presult = &result;
+
+	__asm {
+
+		rdtsc
+		mov ebx, presult
+		mov [ebx],eax
+		mov [ebx+4],edx
+	}
+
+	return result;
+#else
+	INT64 result;
+
+	__asm__ __volatile__ (
+		"rdtsc"
+		: "=A" (result)
+	);
+	return result;
+#endif
+}
+
+void get_cpu(char* v)
+{
+	char vendor[13];
+	long val1,val2,val3;
+	int i;
+	char* ptr;
+
+#ifdef _MSC_VER
+	__asm
+	{
+		mov eax,0
+		cpuid
+		mov val1,ebx
+		mov val2,edx
+		mov val3,ecx
+	}
+#else
+	// use CPUID
+	__asm__ __volatile__ (
+		"movl $0,%%eax\n\t" \
+		"cpuid"
+		: "=b" (val1), "=d" (val2), "=c" (val3)
+	);
+#endif
+	
+	for(i=0;i<4;i++)
+	{
+		(long*)ptr = &val1;
+		vendor[i] = (char)*(ptr+i);
+		(long*)ptr = &val2;
+		vendor[i+4] = (char)*(ptr+i);
+		(long*)ptr = &val3;
+		vendor[i+8] = (char)*(ptr+i);
+	}
+	vendor[12] = '\0'; // Terminate string with NULL
+	strcpy(v,vendor);
+}
diff -Nru base088/src/windows/video.c w088/src/windows/video.c
--- base088/src/windows/video.c	2004-10-16 18:35:20.000000000 +1300
+++ w088/src/windows/video.c	2004-10-25 22:33:50.000000000 +1300
@@ -44,6 +44,14 @@
 // from wind3dfx.c
 extern struct rc_option win_d3d_opts[];
 
+// W: From window.c
+extern unsigned long framer;
+extern void* record;
+extern void* playback;
+extern double speed_total;
+extern unsigned int speed_counter;
+
+extern int isnotwolf;
 
 
 //============================================================
@@ -601,7 +609,9 @@
 	{
 		cycles_t cps = osd_cycles_per_second();
 		printf(_WINDOWS("Average FPS: %f (%d frames)\n"), (double)cps / (end_time - start_time) * frames_displayed, frames_displayed);
-	}
+		if(playback && isnotwolf == 0)
+			printf(_WINDOWS("Average recorded speed: %f%% (%d total frames)\n"),speed_total / speed_counter, speed_counter);
+}
 }
 
 
@@ -648,6 +658,10 @@
 	{
 		dest += sprintf(dest, "\n %d partial updates", performance->partial_updates_this_frame);
 	}
+    if(playback && !mame_feof(playback) && isnotwolf == 0)
+    {
+	      dest += sprintf(dest, "\n Recorded speed: %4lu%%",framer - 0xe143823e);
+    }
 
 	/* return a pointer to the static buffer */
 	return buffer;
@@ -715,7 +729,7 @@
 	}
 
 	// toggle throttle?
-	if (input_ui_pressed(IPT_UI_THROTTLE))
+	if (input_ui_pressed(IPT_UI_THROTTLE) && !record)
 	{
 		throttle ^= 1;
 
diff -Nru base088/src/windows/wind3d.c w088/src/windows/wind3d.c
--- base088/src/windows/wind3d.c	2004-10-16 18:35:20.000000000 +1300
+++ w088/src/windows/wind3d.c	2004-10-25 22:33:50.000000000 +1300
@@ -1100,13 +1100,13 @@
 
 		primary_desc.dwFlags |= DDSD_BACKBUFFERCOUNT;
 		primary_desc.ddsCaps.dwCaps |= DDSCAPS_FLIP | DDSCAPS_COMPLEX | DDSCAPS_3DDEVICE;
-#ifdef _MSC_VER
+//#ifdef _MSC_VER
 		// this is correct for current DX8/9 includes
-		primary_desc.DUMMYUNIONNAMEN(5).dwBackBufferCount = buffer_count;
-#else
+//		primary_desc.DUMMYUNIONNAMEN(5).dwBackBufferCount = buffer_count;
+//#else
 		// this is correct only with older DX includes
 		primary_desc.dwBackBufferCount = buffer_count;
-#endif
+//#endif
 	}
 
 	// then create the primary surface
diff -Nru base088/src/windows/window.c w088/src/windows/window.c
--- base088/src/windows/window.c	2004-10-16 18:35:20.000000000 +1300
+++ w088/src/windows/window.c	2004-10-25 22:33:50.000000000 +1300
@@ -151,6 +151,8 @@
 int win_physical_width;
 int win_physical_height;
 
+// W: speed storage
+unsigned long framer;
 
 
 //============================================================
diff -Nru base088/src/windows/windows.mak w088/src/windows/windows.mak
--- base088/src/windows/windows.mak	2004-10-16 18:35:20.000000000 +1300
+++ w088/src/windows/windows.mak	2004-10-25 22:33:50.000000000 +1300
@@ -133,7 +133,7 @@
 # add our prefix files to the mix (we need -Wno-strict-aliasing for DirectX)
 ifdef USE_GCC
   CFLAGS += -mwindows -include src/$(MAMEOS)/winprefix.h
-  CFLAGSOSDEPEND += -Wno-strict-aliasing
+#  CFLAGSOSDEPEND += -Wno-strict-aliasing
   CFLAGS += -include src/$(MAMEOS)/winprefix.h
 else
   CFLAGS += /FI"windows/winprefix.h"
diff -Nru base088/wolfmameplus.txt w088/wolfmameplus.txt
--- base088/wolfmameplus.txt	1970-01-01 13:00:00.000000000 +1300
+++ w088/wolfmameplus.txt	2004-10-25 22:33:50.000000000 +1300
@@ -0,0 +1,56 @@
+WolfMAME Plus 0.84u5                                                     12/Jul/2004
+Based on MAME 0.84u5 and MAME Plus! 0.84u5, modified by Barry Rodewald
+------------------------------------------------------------------------------------
+
+
+Features
+--------
+
+  - Input viewer, use -inpview <player> to use this.
+  - Cheats are no longer the GUI default (to match the commandline default)
+  - added sound/nosound check, the correct option will also be forced on playback
+  - CPU type check: to make the clock speed display mean more.
+    Checks for Intel, AMD, Cyrix, Transmeta.  Other CPUs marked as 'other/unknown'.
+
+
+- Now with version-based filenames - for those who want it all in one folder.
+
+- Disabled when recording:
+  - Pause
+  - Graphics/Tilemap display (method of pausing)
+  - State saving (another method of pausing)
+  - Autofire toggle key (can still be used through the menus, are you quick enough?)
+  - Speed throttle toggle key
+  - Quit dialog
+
+- Speed saved in the INP
+
+- Version stored in INP header for checking the version that made the recording.
+
+- Various other pieces of information stored in the INP header.
+
+- Added -allownvram/-noallownvram switch for allowing NVRAM to be used when recording.
+  -noallownvram is the default.
+
+- Regular format INPs can be played back now.  Do note that there is no guarantee that
+  regular MAME INPs will work, although some do.  Neo Geo games definitely don't.  MAME
+  Plus Neo Geo INPs are unlikely to work either as WolfMAME doesn't compile in the hacks in 
+  this driver.
+
+- Driver changes:
+  - [NEW] machine/bublbobl.c: rand() fix.
+  - drivers/rohga.c: Other characters are selectable in Wizard Fire/Dark Seal
+  - drivers/psikyo.c: Fixed slowdowns in Battle K-Road [also included in MAME Plus now]
+  - drivers/polyplay.c: mame_rand() fix  [included in MAME Plus now]
+
+
+For language packs and fonts or other MAME Plus! related items, go to the MAME Plus page
+at http://mameplus.yeah.net/
+
+
+Acknowledgements
+----------------
+
+MAME team for making MAME (obviously)
+MAME Plus! team for MAME Plus!
+Mark Longridge for TGMAME.
