Tue Nov 25 16:43:59 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0 released.

	* include/patchlevel.h: #undef `UNSTABLE'.

	* include/types.h: Do not use regparm if `NO_REGPARM' is defined.
  	Regparms seem to be randomly broken in the recent PGCC snapshots I
 	am using.

Mon Nov 24 21:04:00 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* true1541.c (true1541_move_head): Print the current position of
 	the head in tracks instead of half tracks, as suggested by
 	Andreas.

Sun Nov 23 20:21:30 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.20.

	* Makefile.in: Added `$(JOY_OBJS)' to `VICE_OBJS'

	* Makefile.in ($(BINDIR)/xvic, $(BINDIR)/xpet): Create symlink to
 	the actual binary in the current directory, not in the source one.

	* 6510core.c (STORE_ABS_X, STORE_ABS_Y): Increment the clock cycle
 	counter before the write access, not after it!

Fri Nov 21 20:56:33 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.19.

	* sid.c (test_write, sun_write): Cast `RFSH_PER_SEC' to int when
	passing to `usleep()'.
	#define `FRAGS_PER_SECOND' to `RFSH_PER_SEC' with a cast to int.

Thu Nov 20 10:28:39 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.18.

	* drive.c (floppy_create_directory): If the directory is longer
 	than the allocated buffer, return -1 as the length of the created
 	directory.
	(open_1541): If `floppy_create_directory' returns a negative
 	length, signal a `FILE NOT FOUND' error and return `SERIAL_ERROR'.

	* include/vice.h: #define `MITSHM' only if also
 	`HAVE_XSHMPUTIMAGE' is #defined.

	* include/acconfig.h, include/autoconf.h.in: New autoconf'ed macro
 	`HAVE_XSHMPUTIMAGE'.
	* configure.in: When checking for the presence of `XShmPutImage'
 	in `libXext', define the `HAVE_XSHMPUTIMAGE' macro if the test is
 	successfull.  Fixed `CPPFLAGS' <-> `CFLAGS' typo.

	* vicii.c (store_vic): Fixed handling of changed $D016 values.

Wed Nov 19 10:31:32 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.17.

	* drive.c (floppy_create_directory): Put one single space after
 	the block size field, instead of two.  Do not use `strlen()' to
 	find the length of the line anymore.  When checking for buffer
 	overflows, make sure there is enough space for two entries instead
	of just one.

	* Version 0.12.99.16.

	* drive.c (close_1541): If the buffer is not in use, return
 	`SERIAL_OK' instead of `SERIAL_ERROR' (I am not sure about this,
 	should be checked better).

	* arch/unix/ui_xaw.c: #include "utils.h".

	* arch/unix/kbdef.h: Do not allow shifts to be combined with the
 	numeric keys (`XK_[0-9]' keycodes).

	* sid.c: #include "utils.h".
	(flush_sound): Use `xmalloc' instead of `malloc'.

Tue Nov 18 13:17:39 1997  Teemu Rantanen  <tvr@cs.hut.fi>

	* sid.c (flush_sound): Out of array memory access fixed.

Sun Nov 16 21:27:58 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.15.

	* doc/History: Removed.
	* Makefile.in: Removed it from `DOCS'.

	* mkdep: Removed useless `\1' in sed regexp.

	* arch/unix/ui_xaw.c (UiAllocColors): Use `xmalloc' instead of
 	`malloc'.

	* drive.c (open_1541): Allocate the directory buffer with
 	`xmalloc' instead of `malloc'.

Wed Nov 12 10:07:45 1997  Martin Pottendorfer  <Martin.Pottendorfer@aut.alcatel.at>

	* Makefile.in (stddrive.o): Prefixed `drive.c' with `$(SRCDIR)'.
	(stdprinter.o): Prefixed `printer.c' with `$(SRCDIR)'.

	* configure.in: Prefixed `$srcdir' with `../' for proper symlink
 	generation.

	* arch/unix/widgets/Makefile.in (DirMgr.o): Replaced `$(SRCDIR)/'
 	with `./' before `autoconf.h' dependency.
	(FileSel.o): Ditto.
	(RegExp.o): Ditto.

Tue Nov 11 15:28:53 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.14.

	* Makefile.in (catpages): Made `.PHONY'.

	* include/vice.h [__MSDOS__]: #define `JOYSTICK'.

	* configure.in: Do not put `-DALLOW_UNALIGNED_ACCESS' in the
	`CFLAGS' anymore.
	* include/vice.h [__i386__]: #define `ALLOW_UNALIGNED_ACCESS'.

	* configure.in: If the user has specified no options in `CFLAGS',
 	run the `AC_PROG_CC' test to find what compiler we have.  If we
 	have GCC, override `CFLAGS' with more optimizing options and run
 	the test again so that we are sure they work.
	On the other hand, if the user has set some value to `CFLAGS',
 	just run the test once and do not override it.

	* Makefile.in: Added `$(TRUE1541_OBJS)' and `$(PARALLEL_OBJS)' to
 	`VICEOBJS'.

	* Makefile.in (.c.o): Replaced with a `%.o' target.
	* arch/unix/readline/Makefile.in, arch/unix/widgets/Makefile.in:
 	Ditto.

	* Makefile.in: Install VICE under `$PREFIX/lib/vice', not
 	`$PREFIX/lib/VICE'.
	* include/vice.h: Changed `LIBDIR' #definition accordingly.

	* configure.in: Do not use the `-m486' option when compiling for
 	x86 with gcc.

	* arch/unix/widgets/Makefile.in, arch/unix/readline/Makefile.in:
	Updated dependencies to use `SRCDIR'.

	* Makefile.in, arch/unix/widgets/Makefile.in: Removed `VPATH'
 	assignment.

	* mkdep: Fixed object -> source file name conversion so that it
	works for every configuration directory.

	* configure.in: If we are configuring from the original `src'
 	directory, set `@BINDIR@' to `$(TOPDIR)/bin'.  Otherwise set it to
 	`./bin', create the `./bin' directory and make symlinks to the ROM
 	directories in it.
	* Makefile.in: Define `BINDIR' from autoconf.

	* arch/msdos/vsync.c (do_vsync): Update joystick status on the
	VIC20 too.

	* arch/msdos/joystick.c (joystick_init): Explicitly set joystick
	availability flag to zero if no joystick is found.

	* arch/msdos/kbdef.h: Finally implemented complete PET 8032
 	keyboard layout.

	* arch/unix/joystick.c: #include "types.h" before everything else.

	* arch/unix/kbdef.h (keyconvmap) [CBM64 || VIC20]: Do not allow
 	shifts to be combined with period, sterling, left arrow or minus.

	* include/vic.h: #define `SCREEN_BORDERWIDTH_VARIES'.

	* raster.c: Removed special handling of zero border width.
  	Instead, do not fix the border if `SCREEN_BORDERWIDTH_VARIES' is
 	#defined.

	* include/vic.h: #define `VIC_SCREEN_BORDERWIDTH' to
	`display_xstart' and `VIC_SCREEN_BORDERHEIGHT' to
	`display_ystart'. 

Mon Nov 10 22:25:04 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/msdos/ui.c (UiMain): Always force `app_resource.speed' to
 	100 if sound is turned on.

	* sid.c (aix_init, flush_sound): Use `xmalloc' instead of
 	`malloc'.

	* include/raster.h: `window_width', `window_height',
 	`window_x_offset', `window_y_offset', `window_first_line',
 	`window_last_line' and `window_first_x' made unsigned.

	* true1541.c: #include "vice.h" before everything else.

	* true1541.c (GCR_data_writeback): Definition made static as in
	the prototype.
	* arch/unix/xdebug.c (set_asm, draw_asm): Ditto.

Sun Nov  9 14:35:54 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.13.

	* arch/msdos/kbdef.h: Added a few missing PET 8032 keys.

	Circular directory fix, as suggested by Martin.
	* drive.c: New constant `DIR_MAXBUF'.
	(open_1541): Malloc `DIR_MAXBUF' bytes as the directory buffer
 	when opening "$".
	(floppy_create_directory): Check whether we are overflowing the
 	buffer.

	* raster.c (resize): Changed resize policy when
	`SCREEN_BORDERWIDTH' or `SCREEN_BORDERHEIGHT' is zero.
	
	* raster.c (handle_end_of_frame) [VIC20]: Do not set the border
 	color.

Sat Nov  8 11:10:36 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* via1.def (READ_PRA, READ_PRB): Implemented joystick read and
 	reverse keyboard polling (let's hope it's correct this way).
	* via2.def (READ_PRA): Implemented joystick read.

	* raster.c (resize) [VIC20]: Force the window X offset to 0.

	* vic.c: New macros `RASTER_Y', `RASTER_CYCLE'.
	(read_vic): For registers 3 and 4, return the current raster line
	number according to `RASTER_Y' instead of `rasterline'.

Fri Nov  7 12:14:11 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* vic.c (store_vic): Implemented the X/Y origin registers.
	(int_rasterdraw): Turn border on at raster line 0.

	* include/vic.h: Corrected screen size constants.  We now consider
 	the upper non-visible area as a border, and define the left border
	width to `display_xstart'.

	* configure.in: Check for `XQueryExtension' (instead of
	`XShmQueryExtension') in `-lXext'.

Thu Nov  6 15:14:31 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.12.

	* vic20mem.c: #include <string.h>

	* vicii.c (store_vic): $D016 made a little faster by handling only
	changed values.

Thu Nov  6 23:10:01 1997  Teemu Rantanen  <tvr@cs.hut.fi>

	* mkdep: Extract the base name of the object file using
	`basename', instead of a `sed' regexp.

Wed Nov  5 19:06:49 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.11.

	* arch/msdos/kbd.c (my_kbd_interrupt_handler): Reset when F12 is
	pressed, not when it is released.

	* arch/msdos/kbd.c (my_kbd_interrupt_handler, kbd_install):
 	Implemented virtual shift key. 
	* arch/msdos/kbdef.h: Updated keyboard definitions to take
 	advantage of it.

Tue Nov  4 21:26:41 1997  Ettore Perazzoli <ettore@comm2000.it>

	* configure.in: Moved `-lXext' check right after `-lX11'.  Check
 	for `XShmQueryExtension' in `-lXext' instead of `XShmPutImage'.

	* arch/unix/joystick.c: #include "kbd.h", "resources.h", "types.h".

Tue Nov  4 16:27:46 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* vic20mem.c (mem_set_tape_sense): New (dummy) function.

	* resources.c (resources_save): Copy loop for the configurations
	of the other emulators made smaller.
	(resources_set_defaults): Set 320x200 mode for C64, 640x480 for
	VIC20 and PET.

	* arch/msdos/ui.c (UiInitFinish): Added 50 and 75 msec values for
 	the sound buffer size.

	* arch/msdos/tuifs.c (file_list_read): Added missing `closedir'
 	call.

	* raster.c, include/raster.h: New variables `window_x_offset',
 	`window_y_offset'.
	* raster.c (refresh_all, refresh_changed, resize): Use them, so
	that the screen is centered on the window if the window is larger
	than it.  On X11, always force the window not to be larger than
	the screen anyway.

	* arch/msdos/kbd.c (_led_set): Changed delay between 0x60 port
	writes from 10 to 1 msec.

Tue Nov  4 12:26:07 1997  Martin Pottendorfer  <Martin.Pottendorfer@aut.alcatel.at>

	* Makefile.in: New variables `UNIXODIR', `READLINEODIR',
 	`WIDGETODIR', `MSDOSODIR', `ARCHODIR'.
	Changed `READLINE' and `WIDGETS' to reference the object dir.
	Changed `BINDIR' to reference relative to the cwd.
	Changed `C64ROMDIR', `VIC20ROMDIR', `PETROMDIR' to be relative to
 	`TOPDIR'.
	`INCLUDES' prefixed with `-Iinclude'.
  	All final links changed to generate relative to cwd.
	(install): Adjusted to new build.
	$(VIC20_OBJS): Changed to consider $(SRCDIR).
	(cia1.c, cia2.c, via1.c, via2.c, viad2.c, viad1.c, via.c): Ditto.
	(clean, mrproper): Changed to consider object dirs.  Remove
	`include/autoconf.h' instead of `autoconf.h'.  Remove
 	`Makefile.old' also.
	(depend): Pass `CFLAGS' to `mkdep'.

 	* arch/unix/readline/Makefile.in, arch/unix/widgets/Makefile.in:
 	Get `VPATH', `BASDIR' and `SRCDIR' from autoconf.  Added `-I.' to
 	CC line.

 	* configure.in: Check whether gethostbyname needs `-lnsl'.
  	Introduced `ARCHODIR' which references the directory of the
 	architecture-specific objects.
 	Create needed directories (Don't know if this is done properly on
 	the autoconf-sense; It works as expected now...).

	* mkdep: Prefix each source with `srcdir' except if it's already
 	prefixed.

Mon Nov  3 12:32:29 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* raster.c (handle_visible_line_with_cache): Fixed typo: when
 	writing the right border, check `open_right_border' instead of
 	`open_left_border'.  Fill the space between the border and the
	graphics with the background color before painting borders,
	sprites or background.

	* resources.c (resources_set_defaults): Enable video cache by
	default for the PET on MS-DOS.

	* include/vmachine.h: Quick cleanup (still not enough).

	* arch/msdos/vsync.c: #include "joystick.h".
	* arch/msdos/vsync.c (do_vsync) [CBM64]: Call `joystick_update()'.

	* include/cia.h: Added `cia1_prevent_clk_overflow' and
	`cia2_prevent_clk_overflow' prototypes.

	* arch/unix/vsync.c (vsync_prevent_clk_overflow): Removed extern
 	prototypes within the function, #include necessary chip headers.
  	* arch/unix/vsync.c (vsync_prevent_clk_overflow): Ditto.
	
	* arch/msdos/kbdef.h: Implemented (hopefully) correct PET
 	40-column keyboard layout.

	* c64mem.c, vic20mem.c, petmem.c (mem_powerup) [__MSDOS__]: Do not
	print any messages.

	* arch/msdos/ui.c [PET]: Removed resolution menu.

	* crtc.c (crtc_init) [__MSDOS__]: Force 320x200 VGA mode for 40
 	column screen, 640x480 for the 80 column one.  Force double scan
 	mode too.

	* resources.c [__MSDOS__]: The `VgaMode', `DoubleScan' and
 	`DoubleSize' resources cannot be changed on PET anymore.

	* arch/msdos/kbd.c (my_kbd_interrupt_handler) [PET]: PgUp does not
 	trigger the NMI anymore.

	* crtc.c (crtc_ArrangeWindow): Renamed to `crtc_arrange_window'.

	* arch/msdos/video.h (canvas_refresh): Do not blit if `screen' is
 	NULL.

	* viap.def, pia.c: Removed `keyarr' declarations.

	* arch/msdos/kbd.c, arch/msdos/kbd.h: Changed `keyarr' and
 	`rev_keyarr' from BYTE to int.
	* arch/unix/kbd.c, arch/unix/kbd.h: Ditto.
	* via1.def: Ditto.

Sun Nov  2 19:26:35 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.10.

	* sid.c (setup_sid, update_sid, setup_voice): Made inline.

        * resources.c (wait_user) [__MSDOS__]: Set the input stream to
 	text mode.

	* arch/msdos/ui.c (UiInit): Do not set stdin to binary mode 
	anymore.
	(UiMain): Do it here instead, and restore the previous one when
 	returning.

Sat Nov  1 12:26:24 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/msdos/ui.c: Removed `Sound Card Setup' command in the 
	`Sound Settings' submenu.
	(sound_card_setup_callback): `#if 0'ed out.

	* main.c (main) [__MSDOS__]: Enable manual MIDAS configuration on 
	startup if the user requested it via the
	`doSoundSetup' resource.

	* resources.c, resources.h: New resource `doSoundSetup'.  It is
	not listed in the `resources' because we don't want it to be saved
	and/or loaded from the configuration file.
	* resources.c (resources_set_defaults): Initialize it here.

	* arch/msdos/vsync.c (vsync_init): Initialize joystick.

	* arch/msdos/ui.c (toggle_joystick_callback): Show the user that a
 	real joystick is used for the port that is not emulated through
 	the keypad.

	* arch/unix/vsync.c (do_vsync): Poll joystick status every time we
 	are called.

	Implemented joystick support on MS-DOS.
	* arch/msdos/joystick.c, arch/msdos/joystick.h: New files.
  	Updated `Makefile.in' accordingly.

	* arch/msdos/ui.c (sound_card_setup_callback): Close sound after
	configuring MIDAS.

	* arch/msdos/vmidas.c (vmidas_init): If we cannot setup the timer
	callbacks again, exit.

Fri Oct 31 19:48:58 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/msdos/kbd.c (my_kbd_interrupt_handler): Do not keep account
 	of the status of all the keys, but just of the modifiers (Alt,
 	Ctrl, Shift).  This is done by using a new `modifiers' struct and
 	by removing the old `key_status' array.  Moreover, ESC has effect
 	when pressed, not when released.
	(kbd_install): Initialize `modifiers' instead of the removed
 	`key_status'.

Thu Oct 30 10:44:51 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.9.

	* c64mem.c (mem_set_tape_sense): New function.
 	(pport_changed): Set the value of memory location 1 according to
 	the value of the tape sense status.
	* tapeunit.c (detach_tape_image, attach_tape_image): Emulate a
	pressed PLAY when the tape image is attached, release it when the
	image is detached.
	
	* reu.c (close_reu): Save REU image when closing.
	* reu.c (reset_reu): Load REU image when resetting the first time
	we are called.

	* utils.c (load_file, save_file): New functions.

	* resources.c (resources_set_defaults) [__MSDOS__]: The default
 	path for the REU save file is now the `boot_path'.

	* arch/msdos/ui.c (UiInitFinish): Removed sound speed adjustment.
	(toggle_sound_adjustment_callback): #if 0'ed out.

	* arch/msdos/tui.c (tui_init): Force 25-column mode.

	* arch/msdos/vsync.c (set_timer_speed): Force timer speed to 100%
 	if sound is turned on.

	* c64mem.c (read_io2): Added missing IEEE488 and REU handling.
	
	* tapeunit.c (tapereceive): Set end address to the value of the
	`EAL' vector, not to its value minus 1.
	
	* configure.in: When checking for the Linux joystick, quote
 	assignment value for `JOY_OBJS' correctly.

Wed Oct 29 10:45:08 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* zfile.c: Added some more debugging messages.

	* arch/msdos/ui.c (mon_trap): Switch `stdin' mode to `O_TEXT'
	before entering the monitor.

	* arch/msdos/kbd.c (my_kbd_interrupt_handler): Keep account of
 	what keys are currently pressed.  `F12' resets, `Ctrl-F12' clears
	memory and resets.

	* arch/msdos/ui.c (attach_tape_callback, attach_disk_callback):
 	Added listing of the `.T6Z' and `.D6Z' files in the file selector.

	* zfile.c (try_uncompress, compress): Enable MS-DOS.
	(try_uncompress_with_gzip): Consider `name' a valid gzipped file
 	name also if it has a 3-character extension whose last character
 	is a `z' or `Z' (the convention used by the MS-DOS version of
 	gzip).

	* utils.c (spawn) [__MSDOS__]: Implemented MS-DOS version.
	
	* utils.c (spawn) [!__MSDOS__]: In the child process, exit if the
	files for output redirection cannot be open.

	* raster.c (emulate_line, handle_visible_line): Fixed
	`memptr'/`ycounter' behavior on the VIC20/PET.

	* vic.c: Implemented reverse mode.
	(draw_reverse_line, draw_reverse_line_cached): New functions.
	(draw_reverse_line_2x, draw_reverse_line_cached_2x): More new
 	functions.
	(store_vic): Enable reverse mode according to bit 3 in $900F.
	* vic.h (VIC_REVERSE_MODE): New macro.
	(VIC_NUM_VMODES): Now changed to 2.
	
	* vic20mem.c (initialize_memory): Fixed memory map.

	* Makefile.in (clean): Do not use `find' and `xargs' anymore.

	* configure.in: Check for the `Xt' library before the `Xaw' one.

	* sid.c: #include <fcntl.h>, not <sys/fcntl.h>.

	* include/types.h: #define `REGPARM*' to empty if not on i386.

Tue Oct 28 10:58:27 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.8.

	* vicii.c (store_vic): Calculate the number of write cycles from
	`rmw_flag' instead of `maincpu_num_write_cycles()'.

	* c64mem.c (pport_changed): Force PLAY button sense.
	
	Implemented write hooks for current video bank.
	* c64mem.c: Increased memory tables so that they can be indexed
	with the video bank number.
	* c64mem.c (mem_set_vbank): New function.
	* cia2.def: Call it when the video bank is changed.
	* vicii.c: Made `vbank' static.
	(store_vbank): New function.
	(screen_init): Removed.
	(vic_ii_set_vbank): Replaced by this one.

	* vicii.c (_draw_idle): Use `gfx_msk_ptr' instead of `gfx_msk' 
	when drawing the sprites.

	* maincpu.c: Removed `reg_pcp' and fixed `EXTERN_PC' behavior.

	* c64mem.c (store_zero): When writing to the processor port,
 	update the memory configuration only if the value is changed.

	* cia-tmpl.c (int_myciatb, int_myciata): Anticipate by 1 cycle the
	alarm for the next `A_MYCIAT[AB]' event.
	
	* traps.c: Disable debugging info.

Mon Oct 27 12:35:36 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.7.

	* joystick.c: Moved to `arch/unix'.
	* arch/unix/joystick.h: New file.  All the modules that need the
	joystick now #include it if `HAS_JOYSTICK' is #defined.

	* c1541.c: Removed __STDC__/__cplusplus kludging and GEMDOS stuff.

	* traps.c: Enable debug info with the `DEBUG_TRAPS' #define
 	instead of `DEBUG'.

	* include/vice.h (KERNAL4032NAME, KERNAL8032NAME, KERNAL3032NAME)
 	[__MSDOS__]: Define smaller 8.3 names.

	* include/pia.h: New file.

	* crtc.c (crtc_set_screen_width): New function.
	* crtc.c (crtc_set40, crtc_set80): Removed.

	* main.c (main): Moved PET kernal checking and screen width
	selection to `mem_load' in `petmem.c'.

	* main.c (main): Removed initialization of Z80 and old timer code.

	* pia.c (read_pia1, store_pia1): AND the address with 3.
	* pia.c (read_pia2, store_pia2): Ditto.

	* vic.c (read_colorram, store_colorram): Removed.

	* arch/msdos/tuimenu.c (tui_menu_handle): When handling hotkeys,
	check that the pressed key has a code < 0x100.

	* arch/msdos/ui.c (UiInit): Force `stdin' to binary mode.

	* Makefile.in: Compile different versions of `asm.o', 'misc.o' and
 	`traps.o' for VIC20, PET and C64.
	* Makefile.in: Compile `vic20mem_VIC20.o', `c64mem.o' and
 	`petmem_PET.o'.

	* include/mem.h: New file, updated Makefile.in.
	* include/vic20mem.h, vic20mem.c: Ditto.
	* include/petmem.h, petmem.c: Ditto.
	* include/c64mem.h, c64mem.c: Ditto.

Fri Oct 24 08:30:57 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* include/viad.h: New file.
	* include/cia.h: Added prototypes.

	* tape.c (filelength): Removed.
	* utils.c (file_length): New function, replaces `filelength'.

	* serial.c: Use `debugFlag' instead of `pardebug'.
	(attach_serial_device): Use `stralloc()' instead of `xstrdup()'.

	* Replaced usage of `debugflg' and `verflg' with the the values in
	`app_resources'.

	* mon.c (mon): Use `app_resources.hexFlag' instead of `hexflg'.
	Do not use `app_resources.testFlag' or `verflg' anymore.

	* table.c: Removed.  Opcode table moved to `asm.c'.
	* cpu.h: Removed.  Contents moved to `maincpu.h' and `asm.h'.
	
	* Removed `op.c' and `include/mnemonics.h'.

	* include/vice.h: New #define `PRINTER'.  If not #defined, no
	printer support is attempted.
	* Makefile.in: Do not link `printer.o' (it's broken at this
 	point).

	* include/drive.h: #include "fs_cbm.h" and "fs_unix.h", which are
	not included separately anymore.

	* drive.c: Cleanup: removed `CEXTRACT' and unused stuff.

	* include/serial.h: Removed compatibility with K&R C.

	* Removed `include/extern.h' and `include/proto.h', moved
 	prototypes and extern declarations to module-specific headers.
	Updated #include lists in all the modules.
	* include/mon.h: New file.

	* include/traps.h: New file.  Moved `trap_t' type from
 	`include/types.h'.

Wed Oct 22 13:13:19 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* reu.c: Temporarily disabled load/saving of REU.

	* maincpu.c: Removed `STANDALONE' setup.

	* Implemented new memory access scheme: all `store_*()' and
	`read_*()' functions are called by passing parameters in the
	registers (via `REGPARM*').
	* memutils.c, memutils.h: New files.
	* maincpu.c, maincpu.h, macro.h: Updated to the new memory access
	scheme.
	* mon.c: Disabled `dump' and `undump' commands.
	Do not use `create_name' any longer.
	* main.c: Removed autodump and memory access statistics.
	* memory.c, memory.h: Removed.
	* include/patchrom.h: New file.

	* Makefile.in: Ditto.

	* reu.c: Renamed `reuc' into `reu'.  Functions made const-safe.
	* include/reu.h: New file.

	* main.c: Removed `emuinfo'.  Little cleanup.

	* arch/unix/kbdef.h, arch/unix/kbd.c: More cleanup.
	(kbd_event_handler): Clean up all the keyboard matrix (except real
	shift keys) when a modifier is released.

Tue Oct 21 16:57:39 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* resources.c: #include "utils.h"

	* true1541.c (true1541_write_gcr): Return without doing anything
	if no floppy is attached to the true 1541 emulation.

	* include/types.h: Define REGPARM1, REGPARM2, and REGPARM3.

Tue Oct 21 14:20:29 1997  Teemu Rantanen  <tvr@cs.hut.fi>

	* sid.c (init_sid): Fixed SID frequencies to sound correct instead
	of being in sync with the system clock.

	* sid.c (MIDAS): Fixed midas_bufferstatus() to automatically adapt
	to the buffersize MIDAS internally selected.

Mon Oct 20 10:40:25 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.6.

	* main.c (main) [__MSDOS__]: Ignore `SIGINT'.

	* arch/msdos/ui.c, arch/msdos/vsync.c: Implemented performance
 	meter.

	* arch/unix/vsync.c (do_vsync): Flush sound after slowing down,
 	instead of flushing it before.

	* cia-tmpl.c: Delay all `A_MYCIATA' and `A_MYCIATB' alarms by 1.

Sun Oct 19 16:50:07 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.5.

	* arch/msdos/vsync.c (do_vsync): Flush sound after slowing down,
	instead of doing it before. 

	* pia.c, viap.def, via1.def: #include "kbd.h".

	* utils.c (make_backup_filename) [__MSDOS__]: Implemented correct
	backup file name creation.

	* main.c (exit64): Disable `SIGINT' to prevent the user from
	breaking the cleanup process.

	* vicii.c (store_d011): When on the first valid line for DMA,
	check whether bad lines are enabled by looking at bit 4 of
	`value', not `blank' as it is assigned only afterwards!  (was
	broken on Oct 13).

Sat Oct 18 14:41:17 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* include/vmachine.h (RFSH_PER_SEC): More accurate definition,
 	derived from the exact values given for the CPU clock frequency.
	Now it is a double instead of an int.

	* arch/msdos/vsync.c (set_timer_speed): Calculate the rate for the
 	timers using `RFSH_PER_SEC'.

	* arch/msdos/kbd.c (kbd_install): Initialize the keyboard matrix.

	* arch/unix/kbd.c, arch/msdos/kbd.c: Fixed Restore behavior.
	
	* arch/unix/kbd.c, arch/unix/kbdef.h: Fixed right shift.
	* arch/unix/kbdef.h: Map the CBM key to left Meta too, for
 	compatibility with those machines that do not have Alt or map Alt
 	as Meta.

Sat Oct 18 11:03:22 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.4.

	* cia-tmpl.c (store_mycia): Do not delay the timer stop by 2
 	cycles if forcing load.

	* arch/unix/ui_xaw.c (UiFileSelect): Workaround for the randomly
 	disappearing listing in the file selector (XfwfScrolledList bug?):
 	always build the file selector from scratch and XtDestroy it
	before returning.

	* sid.c (midas_init): Use normal mix quality instead of the high
	one (slower, and we do not need it anyway).

	* arch/unix/kbd.c: `#define DEBUG_KBD' commented out.

Thu Oct 16 11:38:42 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.3.

	* arch/msdos/ui.c (enable_log): Log in the `boot_dir', not in
	the current one.

	* main.c (main): Use `EMULATOR' as the emulator id when
 	printing the greeting message, not `EMULATED_MACHINE'.

	* resources.c (default_resource_file): Load resource file from the
 	boot path instead of the current directory.
	(resources_set_defaults): Set the default value of `directory' to
 	`boot_path'.

	* utils.c, utils.h (concat): New function.

	* arch/unix/kbd.h, arch/unix/kbd.c arch/unix/kbdef.h: Updated as
	the Unix counterparts.  Added pound (Ins), up arrow (Del), restore
	(PgUp).

	* arch/unix/kbd.c (set_keyarr): New function.
	(kbd_event_handler): General code cleanup.

	* include/vmachine.h: Moved keyboard-related constants to
 	`kbd.h'.
	* cia1.def: #include "kbd.h".
	* include/extern.h, cia-tmpl.c: Removed `keyarr' declaration.

	* arch/unix/kbdef.h (keyconv): Changed `keybit' into `column'.
	Changed the table accordingly.
	* arch/unix/kbd.c (rev_keyarr): New variable, to speed up CIA1
	Port A reads.  Handle `column' instead of `keybit' in the
	`keyconvmap'. 
	* cia1.def (READ_CIAPA): Do the reverse matrix read using
 	`rev_keyarr', with a considerable speedup.

	* vicii.c (NEED_2x): New macro.  If disabled, disables all the 2x
	drawing functions and #defines `pixel_width' and `pixel_height' to
	1.
	* raster.h: Do not declare `pixel_width' and `pixel_height' if
	they already exist as macros.

	* include/maincpu.h (maincpu_num_write_cycles): Moved the table to
	`maincpu.c'.

Wed Oct 15 09:23:03 1997  Ettore Perazzoli <ettore@comm2000.it>

	* zfile.c (try_uncompress) [__MSDOS__]: Always report a failure,
 	as we cannot do this on MS-DOS (yet).

	* raster.c (handle_visible_line): Never use the cache if borders
	are open.

	* mon.c (mon): No longer enable text from here.
	* arch/msdos/ui.c: ``Monitor'' command.
	
	* ui.c: ``VICE Info'' submenu.

	* include/patchlevel.h (UNSTABLE): New macro.

	* tuiview.c, tuiview.h: New files.

	* arch/msdos/tui.c (tui_clear_screen): Do not write the emulator 
	type on the first line anymore.
	* arch/msdos/ui.c (UiMain): Write it in this function instead.

	* Makefile.in (VICEOBJS): Fixed typo.

	* ui.c: Fixed for VIC20/PET compatibility.  Now `xpet.exe' and
	`xvic.exe' work.

        * ui.c: ``Change directory'' command.

	* utils.c, utils.h (remove_spaces): New function.

	* arch/msdos/vmidas.c (vmidas_config): New function.
	* arch/msdos/ui.c (sound_card_setup_callback): Use it.
	* arch/msdos/vmidas.c (vmidas_startup): Added support for loading
 	MIDAS configuration file.

	* main.c (set_boot_path): New function.

Tue Oct 14 14:47:05 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* raster.c (handle_visible_line_with_cache): Handle open borders
 	correctly.

	* vicii.c (set_video_mode): Cache the last video mode set so that
	we do not save unnecessary changes.

	* arch/msdos/ui.c, arch/msdos/tuifs.c: Little cosmetic changes.

	* arch/msdos/tuimenu.c (tui_menu_add_item, set_label): Subtract 1
 	from the menu item width because of the hot-key underscore.
	(tui_menu_add_submenu): Ditto.  Also consider the length of the
 	parameter string if needed.

	* arch/msdos/ui.c (enable_log): Open log file in text mode.
	
	* arch/msdos/ui.c: Implemented sound sample rate and sound buffer
 	size submenus.  Added item in the sound submenu for manual MIDAS
 	configuration.

	* include/vice.h [__MSDOS__]: Set a smaller default sound buffer
	size (100ms).

	* Makefile.in (depend), mkdep: Fixed for /bin/sh compatibility.

	* raster.c, raster.h: Renamed `window_x_offset' to
	`window_first_x'.

	* arch/msdos/vsync.c (set_timer_speed): Force 100% speed if using
 	automatic refresh rate and there is no speed limit.

	* vicii.c (vic_ii_init): Do not call `store_vic()' anymore.

	* 6510core.c: Implemented idle accesses in SH* opcodes.

	* include/maincpu.h (maincpu_num_write_cycles): Replaced wrong
 	opcode table with the (hopefully) correct one.

Mon Oct 13 00:03:28 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.2.

	* sid.c (midas_close): Check whether MIDAS has already been shut
	down before stopping channels and streams.

	* resources.c: Disable ``SoundSuspendTime'' on MS-DOS.
	(resources_set_defaults) [__MSDOS__]: Disable sound speed
	adjustment by default.

	* arch/msdos/midas.c, arch/msdos/midas.h: New files.
	* sid.c, arch/msdos/vsync.c: Use the new MIDAS wrapper functions.
	* sid.c (midas_init, midas_close): Do not shut down MIDAS with
 	`MIDASclose' any longer.
 	* arch/msdos/ui.c (toggle_sound_callback): Turn sound off if
 	`app_resources.sound' is zero.

	* vicii.c: More fixes for bugs reported by Andreas.
	(read_vic): Always return bit 0 in $D018 and bits 6,7 in $D016 as
 	1.
	(store_d011): Moved `vic[0x11]' assignment to the end.
	(store_d011): Check whether display must be turned on before
	setting the new value for the global blank flag.  Turn display on
	only if we are at cycle > 0.

Sun Oct 12 15:43:45 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.1.

	* cia-tmpl.c: General code cleanup.  Removed global `rclk',
 	replaced with local variables.
	(int_myciata, int_myciatb): Do not check whether the call offset
 	is negative anymore.
	(mycia_dump): (Temporarily?) #if 0'ed out.

	* vicii.c (store_vic): Change sprite X positions, multicolor flag
 	and background flag on next line (instead of this line) if the
 	change happens in the second half of the line.

	* vicii.c (store_vic): Don't use `vic[0x19]' explicitly anymore,
 	but always use `videoint' instead.  This also fixes a
 	$D019-related bug reported by Andreas.

Sun Oct 11 19:41:39 1997  Andreas Boose  <boose@rzgw.rz.fh-hannover.de>
	
	* cia-tmpl.c (store_mycia): When writing to the TOD, mask out
	undefined bits and flip AM/PM on hour 12.

Sat Oct 11 15:13:00 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* cia-tmpl.c (store_mycia): Removed ``Pacland'' hack (we don't
	need it anymore).

	* 6510core.c: Implemented idle reads for all the opcodes,
 	excluding the ``NOP'', ``NOOP'' and ``SH*'' ones.

	* cia-tmpl.c: Removed assignments to `debugflg'.

Fri Oct 10 20:49:32 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* mkdep: Use `-M' instead of `-MM' when calling the C preprocessor
 	(more portable).

	* cia1.def (STORE_CIAPB): Handle software light pen trigger.

	* vicii.c: Implemented light pen interrupts.
	(vic_ii_trigger_light_pen): New function.
	(light_pen): New variable.
	(reset_vic_ii): Init it.
	(int_rasterdraw): Untrigger the light pen when in line 0.

	* include/interrupt.h (maincpu_force_interrupt_check): New macro.
	(true1541_force_interrupt_check): Ditto.

Thu Oct  9 14:08:38 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.99.0.

	* raster.c (reset_raster): Do not reset sprites anymore.

	* resources.c (resources_load): Update menus after fixing the
 	resources.
	(resources_set_defaults): Update menus before returning.

Wed Oct  8 08:38:44 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* resources.c (resources): Enabled `speed' and `refreshRate' (and
 	the corresponding command-line options) for MS-DOS too.

	* cia-tmpl.c (store_mycia, read_mycia): Dispatch VIC-II alarms
	before handling the registers.
	* true1541.c (serial_bus_cpu_read, serial_bus_cpu_write): Do not
	dispatch VIC-II fetch alarms any longer.

	* vicii.c, raster.c, include/raster.h, include/vicii.h: New
 	cycle-based VIC-II emulation.
	* include/sprcycles.h: New file.

	* maincpu.c (last_opcode): New variable.
	* include/maincpu.h (maincpu_num_write_cycles): New function.

	* cia-tmpl.c: Some important bug fixes.
	(update_mycia): Made `tmp' signed, compare `xclk' against
 	`mycia_tau + 1' instead of `mycia_tau' (and to `mycia_tbu + 1'
	instead of `mycia_tbu') when updating the timers.
	(store_mycia): Added 1 cycle-delay for Timer A or Timer B stop;
 	fixed delays when timer starts or is reloaded.
	(int_myciatb): Always set `mycia_tbu' to zero when the timer
 	stops.

	* Renamed `via[12].h' and `cia[12].h' to `via[12].def' and
 	`cia[12].def', respectively.

	* Makefile.in: Added Unix-specific and MS-DOS-specific source file
 	lists.
	(dist): Handle the new directory structure and build the tar.gz
	in the top-level directory.

	* mkdep (makefile): Use `$CPP' instead of `cc -E' to call the
 	C preprocessor.

	* Makefile.in (.c.o): Explicitly specify the output file so that
 	we can compile objects to directories different from this one.
	(VICEOBJS): Changed so that there are no duplicates (well,
 	almost).

	* mkdep: Operate on `Makefile', not `Makefile.in'.
	When calling the C preprocessor, pass `INCLUDE' as options.
	Handle file names that contain slashes correctly.
	Changed to derive dependencies from object file names only.

	* Makefile.in: New variable `INCLUDES'.
	(depend): export it to `mkdep' when calling it.

Tue Oct  7 21:20:48 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Reorganized the directory structure: system-specific things go
	under `arch', common includes under `include'.
	* Makefile.in: New variable `ARCHDIR'.
	* configure.in: Define `@ARCHDIR@'.  Set system-specific object
 	paths relative to `$(ARCHDIR)'.

	* sid.c: Check whether `__MSDOS__' instead of `HAVE_MIDAS_H' is
 	#defined when enabling the MIDAS driver.
	Added dirty kludge to avoid redefinition of `DWORD' when including
	`midasdll.h'.

	* configure.in: If cross-compiling for MS-DOS, check for `gcc-dos'
 	if present, otherwise use `gcc' and set CFLAGS and LDFLAGS to
 	compile for target `i386-go32' using `-b'.
	Added new MS-DOS text-based interface files.
	
Mon Oct  6 08:53:36 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* resources.c (resources_set_defaults) [__MSDOS__]: Set defaults
 	for `vgaMode'.

Sun Oct  5 22:51:12 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* resources.c (resources_save): When calling `fopen()', use "rt"
 	for MS-DOS and "r" for Unix.

Thu Oct  2 17:37:00 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* utils.c (xrealloc, xmalloc): Display the number of bytes we
	tried to allocate when we fail.

	* video_d.h, video_d.c (video_ack_vga_mode): New function.
	* resources.c (resources): Call it when `VGAMode' changes.

	* serial.c (image_file_name): New function.

Sun Sep 28 17:32:12 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* cia-tmpl.c (reset_mycia): Initialize latches to 0xffff and 
	counters to 0.  This is what Wolfgang Lorentz' CIA docs say.
	Removed `mycia[CIA_TAL]' and `mycia[CIA_TBL]' initialization.
	(int_myciata, int_myciatb): Do not check `rclk' against `myciardi'
	if we are setting NMIs.

	* interrupt.h (maincpu_int_status): New member `nmi_triggered'.
  	Removed `last_nnmi'.
	(check_pending_interrupt, set_nmi): Corrected NMI handling, using
 	`nmi_triggered' instead of `last_nnmi'.  As soon as 0->1 edge is
 	detected, the NMI is triggered for 2 cycles later.  No further
 	1->0 transitions (unless in the same cycle as the 0->1 one) can
 	untrigger the NMI, even if they happen before the CPU starts
 	calling the NMI routine.
 	(check_pending_interrupt): If we have an NMI pending but it's too
 	early to deliver it, check whether we have an IRQ instead of just
 	returning `IK_NONE'.
	
Sat Sep 27 12:14:07 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* cia-tmpl.c (my_set_int): Do not handle the 2-cycle interrupt
 	delay here any longer, as this is already done by the interrupt
 	routines!

Thu Sep 25 22:31:46 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* cia-tmpl.c (reset_mycia): Initialize the latches to 1 and
	counters to 0xffff instead of zero.

	* utils.h [__MSDOS__]: Include <process.h>.

Wed Sep 24 19:05:52 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* utils.c: #include "vice.h".  #include <vfork.h> if available.

	* configure.in: Added `AC_FUNC_VFORK'.
	
Mon Oct  6 22:32:35 1997  Teemu Rantanen  <tvr@cs.hut.fi>

	* configure.in, autoconfig.h.in: Checks for UMS/UMSAudioDevice.h,
 	UMS/UMSBAUDDevice.h and -lUMSobj.

	* sid.c: Autoconfig checks for AIX

	* sid.c: Final changes to the MIDAS -support to get it to work.

Tue Sep 30 01:17:49 1997  Teemu Rantanen  <tvr@cs.hut.fi>

	* vice.h (SOUND_SAMPLE_BUFFER_SIZE): Changed default from 500ms to
	350ms.

	* vice.h: No more need to undefine the SOUND on MSDOS.

	* sid.c (uss_init): Final fixes for Jaroslav Kysela's GUS drivers. It
	sometimes returns less fragments than we are requesting.

	* sid.c: MIDAS support.

Wed Sep 24 11:16:53 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.0.17.

	* vicii.c (store_vic): Bug fix: when writing to $D012, do nothing
 	if the new value is equal to the old one.

Mon Sep 22 18:36:51 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* vsync_x.c (do_vsync): When using dynamic refresh rate and
 	sleeping is needed, set `elapsed_frames' to -1 before sleeping,
 	instead of sleeping and setting it to 0 afterwards.

	* ui_xaw.c (UiBuildInfoDialog): Changed the name of the local
	variable `main' into `pane'.

	* widgets/Makefile.in (mrproper): Do not remove `widgets.a'.

Sun Sep 21 11:45:05 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* vsync_x.c (set_timer_speed): Set `timer_ticks' before calling
 	`update_elapsed_frames()' (not after).
	(timer_sleep): Added extra `update_elapsed_frames()' call before
	sleeping.

	* interrupt.h: #include "vmachine.h".
	(PREVENT_CLK_OVERFLOW_SUB): Force it to be multiple of
 	`CYCLES_PER_RFSH'.  This is needed by the upcoming cycle-exact
 	VIC-II emulation.

	* Makefile.in: Some changes taken from Giuliano's patches for the
 	Debian distribution.
	(install.bin, install.roms, install.docs, uninstall): Do a `set
 	-e' before everything else.
	(INSTALL_DOCDIR): New variable.  Use it instead of
 	`$(INSTALL_LIBDIR)/doc' when needed.
  	S(INSTALL_MANDIR)/c1541.$(INSTALL_MANEXT): New target to install
 	the c1541 manual page.  Added to the `install.man' dependencies.
	(uninstall): Remove the c1541 manpage.
	(mrproper): Remove VERSION too.

	* vsync_x.c: New constant `MAX_SKIPPED_FRAMES', #defined as 10.
	(do_vsync): Limit the number of consecutive skipped frames
	according to its value.

	* info.c: Added Giuliano Procida <gpp10@cam.ac.uk> and Chris Sharp
 	<sharpc@hursley.ibm.com> to the contributors' list.

Sat Sep 20 01:11:30 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* interrupt.h: Ooops... removed `next_alarm_backup' and
 	`next_alarm_clk_backup' from `struct cpu_int_status'.  This saved
 	time, but was wrong!
	(force_interrupt_check, prevent_clk_overflow): Do not use them 
	anymore.
	(serve_next_alarm): If `next_alarm' is -1 (force pending interrupt
 	check) call `find_next_alarm()' instead of using their values.

Fri Sep 19 02:10:56 1997  Teemu Rantanen  <tvr@cs.hut.fi>
 
 	* vsync_x.c: Rewrote itimer -stuff to use gettimeofday().
 	After lots of hacking finally works better than the old
  	one.
 
 	* sid.c (blockalarm, unblockalarm): Not needed anymore, removed.
 
 	* menu.h: Added more values to sound buffer size -popupmenu.
 
Thu Sep 18 00:35:26 1997  Teemu Rantanen  <tvr@cs.hut.fi>
 
 	* sid.c: Speed adjustment disabling and all related changes.
 	Disabling speed adjustment will give a lot better fps if automatic
 	frame rate setting is used. It will on the other hand click badly if
 	VICE cannot keep 100% speed.
 
 	* sid.c: Sound suspending code. Disables sound for a moment if
	temporary performance -related sound problem is detected.

 	* sid.c (uss_init, uss_bufferstatus): Cleaned up code and
 	fixed (hopefully) some new bugs.
 
 	* sid.c (blockalarm, unblockalarm): New routines to block alarms
 	when we are writing data to sound -device.
 
 	* sid.c: AIX sound support by Chris Sharp (sharpc@hursley.ibm.com).
 	There is still some code cleanups to do and configure -code is
 	missing.
 
 	* menu.h, resources.c, resources.h: Added sound speed adjustment
 	toggle and sound suspend time selection to popupmenu, resources and
 	command line.
 
Sun Sep 14 23:45:11 1997  Ettore Perazzoli  <ettore@comm2000.it>

 	* sid.c (uss_write): If `write()' fails, print a description of 
 	the error using `perror()'.
 	
Sat Sep 13 12:12:04 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* utils.c: #include <sys/wait.h>, not <wait.h>.  
	#include <sys/types.h>

Fri Aug 23 14:44:12 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Makefile.in: Removed `readdir.c' from `VICESRC'.

	* Version 0.12.0.16.

	* tape.c (read_tape_image_contents): Put number of entries used
	at the end of the list.  If the number of entries reported is 0,
	force it to 1 instead of 30.

	* charsets.h: Declare `ctrl1', `ctrl2' and `cbmkeys' as externs.
	* petcat.c: Remove `ctrl1', `ctrl2' and `cbmkeys' declarations.
	#include <charsets.h>

	* Makefile.in: Added `charsets.o', `utils.o' and `zfile.o' to
 	`PETCAT_OBJS'.

Fri Aug 22 18:32:28 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* ui_xaw.c (fallback_resources): Default width for ShowText widget
	made slightly larger.

	* mon.c (mon_cmds): Fixed wrong descriptions of the ``number'' and 
	``>'' commands as reported by Jouko.

	* c1541.c (print_listing): Removed.
	(disk_list): Use `floppy_read_directory' instead of
 	`print_listing'.

	* info.c (contrib_text): Added Martin Pottendorfer.

	* tape.c (check_t64_header): Use the value of `maxentries' for the
 	stdout message, do not calculate it again.

	* ui_xaw.c (UiFileSelect): New parameter `read_content_func': call
 	this function to display the contents if not NULL.  `UiAttachDisk'
 	and `UiAttachTape' pass `read_disk_image_contents' and
 	`read_tape_image_contents', respectively.

	* drive.c: #include "utils.h".

	* drive.c, drive.h (floppy_read_directory): New function.
	* drive.c, drive.h (read_disk_image_contents): New function,
	partially derived from `readdir.c'.
	* tape.c, tape.h (read_tape_image_contents): New function,
 	partially derived from `readdir.c'.
	* tape.c: Added some missing includes.
	* Makefile.in: Removed `readdir.o' from `COMMON_OBJS'.

	* utils.c (bufcat): New function. 

Fri Aug 22 11:10:32 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* ui_xaw.c (UiError, UiMessage, UiShowText, UiJamDialog): Call
 	`UiPopdown' on the shell widget before XtDestroying it.
	
	* ui_xaw.c (UiContentsButtonCallback): New function.
	(UiBuildFileSelector): Add it to the callback list for the contents
 	button in the file selector widget.
	(UiFileSelect): If the contents button is pressed, show contents
 	using `vice_readdir'.
	(UiReadImageDir): Removed.
	(fallback_resources): Change font for ShowText widget to
	`lucidatypewriter' (i.e. fixed width).

	* ui_xaw.c (UiBuildShowText, UiShowText): New `width' and `height'
 	parameters.  All callers changed.

	* ui_xaw.h (enum UiButton): Add `Button_Contents'.

	* widgets/FileSel.c (ButtonContents): Call contents button
 	callbacks instead of `UiReadImageDir'; no need to pass the file
 	name anymore.  Removed `UiReadImageDir' prototype.

	* widgets/FileSelP.h: Added callback for ``contents'' button.
	(XfwfFileSelectorPart): Added `contents_button_callback'.
	(FSContentsCallbacks): New macro to access it.
	* FileSel.c (resources): Added its initialization values here.
	* widgets/FileSel.h (XtNcontentsButtonCallback): New: #defined to
	name it.

	* widgets/FileSel.c (ChildrenCreate): Renamed `dir_button' widget
	to `contents_button'; changed `Dir' label into `Contents'.

	* widgets/FileSelP.h, widgets/FileSel.c: Renamed `FS_I_DIR_BUTTON'
 	to `FS_I_CONTENTS_BUTTON'.
	* widgets/FileSel.c (ButtonDir): Renamed to `ButtonContents'.

Thu Aug 21 11:29:42 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* info.c (contrib_text): Added Arthur Hagen <art@broomstick.com>
	to the thank list.

	* Makefile.in: Removed unused `VICII_OBJS', `CRTC_OBJS', `VIC_OBJS'
	targets.

	* Makefile.in: Renamed `vic.o' into `vic_VIC20.o' in `VIC20_OBJS'.
  	In `PET_OBJS', renamed `crtc.o' into `crtc_PET.o' and `pia.o' into
 	`pia_PET.o'.
	(${VIC20_OBJS}, ${PET_OBJS}): Replaced `$<' with a substitution
 	reference on `$@' so that we do not need GNU make anymore (thanks
 	to Arthur Hagen <art@broomstick.com> for pointing this out).  *
 	char.c: New file.  * Makefile.in (VICESRC): Removed `char_C64.c',
 	`char_VIC20.c' and `char_PET.c'.  Added `char.c'.
	Replaced `char_C64.o' with `char.o' in `CBM64_OBJS'.  Renamed to
 	`C64_OBJS'; all occurrences updated.

Mon Aug 18 14:35:34 1997  Martin Pottendorfer  <Martin.Pottendorfer@aut.alcatel.at>
 
	* drive.c (set_disk_geometry): Removed `static' since it is used
 	in `readdir.c'.
 
	* ui_xaw.c (UiReadImageDir): New Function; displays directory
 	contents in an ErrorDialog.  Called from Button callback in
 	FileSel.c (ButtonDir).

	* widgets/FileSel.c, widgets/FileSelP.h: Added button `Dir' to
	FileSelector Widget.

	* readdir.c (do_diskdir, do_tapedir, vice_readdir): New file with
	new functions.
	* Makefile.in: Added `readdir.c' to `VICESRC' and `readdir.o' to
 	`COMMON_OBJS'.

Tue Jul 29 16:27:14 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* zfile.c (compress_with_gzip, try_uncompress_with_gzip): Launch
	gzip using the new `spawn' function. 

	* utils.c, utils.h (spawn): New function.

	* zfile.c (compress): Make a backup file before compressing; if
 	compression fails restore it, otherwise remove it.
	
	* utils.c, utils.h (make_backup_filename, make_backup_file): New
	functions. 

	* cia-tmpl.c (store_mycia): Add one more cycle for delay when
 	timers are reloaded; #define `STORE_OFFSET' to 0.  This seems to
 	be less correct, according to the CIA test suite, but fixes some
 	demos that use the CIA to synchronize the $D011 VIC-II tricks.

Fri Jul 25 02:26:49 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Makefile.in (${BINDIR}/c1541): Add `$(READLINE)' dependency.

	* vicii.c (set_memory_ptrs): Fixed wrong debugging message
	for video memory address.

	* Version 0.12.0.15.

	* vicii.c (_draw_hires_bitmap_2x): Use `hr_table_2x' (not
 	`hr_table'!) and use it right.
	(_draw_ext_text_2x): Ditto.
	
Thu Jul 24 15:23:33 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* kbd_d.c (kbd_led_init, initial_led_status, kbd_led_cleanup):
 	Removed.
	(kbd_init): Do not call `kbd_led_init()'.
	(kbd_exit): New function, handle restoring of old LED setting
 	here.
	(kbd_init): Move `atexit()' call to the end; use `kbd_exit()' as
 	the atexit function instead of `kbd_uninstall()'.

	* tui.h (CENTER_X, CENTER_Y): Changed to match the coordinate
 	system of the new functions (i.e. starting from 0, not 1).
	
	* tui.c: Implemented new console output functions (much faster
 	than using the ones in <conio.h>): `tui_put_char()',
 	`tui_hline()', `tui_vline()', `tui_display()'.
	Removed `display()', all callers changed to use `tui_display()'
	instead.
	* tui.c, tuifs.c, ui_d.c: All functions rewritten to use the new
 	functions instead of the conio ones.
	
	* kbd_d.c (kbd_uninstall): Report a message when doing this.  Do
	not call `exit()' when failure happens.

	* Version 0.12.0.14.

	* xdebug.c (StopCb): Always switch to `DS_Halt' status when
 	arriving here.
	(TraceTrap): New behavior: always update registers and dispatch UI
 	events; install `TraceTrap' only if we are still in trace mode
 	after dispatching UI events (we might have changed status in the
 	meantime).

	* zfile.h: #include <sys/stat.h>, <sys/types.h> and <fcntl.h>.
	Fix typo: prototype `zfclose()', not `fclose()'.
	* zfile.c: Remove those includes from here, add <errno.h>.
	
	* zfile.c (PATH_MAX): #define to 4096 if still not defined after
 	including the headers.

Tue Jul 22 00:47:27 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.0.13.

	* interrupt.h (trigger_trap): Fixed braino:
 	`should_check_pending_interrupt' must not be incremented if the
 	TRAP condition is already active!

	* Version 0.12.0.12.

	* Makefile (C1541_OBJS): Add `zfile.o' and `utils.o'.

	* drive.c: (floppy_write_block): When an error occurs, use `perror' to
	explain it.

	Implemented attaching of compressed disk images.
	* zfile.c, zfile.h, utils.c, utils.h: New files.
	* Makefile.in: Add them in `VICESRC', `VICEHDR'.
	* Makefile.in: Add `utils.o' and `zfile.o' to `COMMON_OBJS'.
	* drive.c: (open_1541, attach_floppy_image, detach_floppy_image):
 	Open/close disk image files using `zopen()'/`zclose()' instead of
 	standard `open()'/`close()'.

	* tapeunit.c (attach_tape_image, detach_tape_image): Open/close
 	tape image files using `zfopen()'/`zfclose()' instead of standard
 	`fopen()'/`fclose()'.

	* ui_xaw.c (UiInit): Force `UiAutoRepeatOn()' to be called on
	exit using `atexit()'.
	* main.c (exit64): Do not call `UiAutoRepeatOn()' any longer.

	* Version 0.12.0.11.

	* vsync_x.c, vsync_d.c: `elapsed_frames' made volatile.

	* interrupt.h (trigger_trap): Changed semanthics: when being
	called more than one time at the same clock cycle, the latest
	call wins (instead of the first one).

	* ui_xaw.c: Changed fallback label for `debug' button to "Debug"
 	to more easily fit in the popup window.
	(UiJamDialog): Jam dialog renamed to "errorDialog" and shell
 	renamed to "errorDialogShell".  Add corresponding fallback
 	resources to `fallback_resources'.  Rename local variable
	`ErrorDialog' to `JamDialog'.

	* maincpu.c (JAM): Display the jam dialog even if we are not
 	halted.

Tue Jul 21 23:10:24 1997  Andre Fachat  <fachat@physik.tu-chemnitz.de>

	* maincpu.c (JAM): Handle new return values from `UiJamDialog()'.

	* xdebug.c, xdebug.h: New `skipButton' widget.
	(RegisterBar): XtCreate it.
	(XDebugEnableTrap, UpdateStatus): Handle it.
	(StopTrap, SkipCb): New functions.
	(xdebug_enable): Call `XDebugEnableTrap()' directly.
	
	* ui_xaw.c, ui_xaw.h: New `debug' button: add `Button_Debug' to
	`enum UiButton' and a resource item to `fallback_resources'.
	* ui_xaw.c (activate_xdebug_window): New function.
	(UiActivateXDebugger): Call it here.
	(UiDebugButtonCallback): New function.
	(UiJamDialog): Added a `debugButton' and its handling.  Return 1
	for the `monitor' button or 2 for the `debug' one.
	
Mon Jul 21 10:18:42 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.0.10.

	* ui_xaw.c (UiPositionSubMenu): `root_width', `root_height' and
	`foo' made signed.

	* video_x.c (video_init): Use `XQueryExtension' to check whether
	the X server can actually handle the MITSHM extensions.

	* vicii.c (get_black): Do not clear `gfx_msk' as we already do it
	when drawing.

Fri Jul 18 12:47:46 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* vicii.c (store_d011): Make `r' (tmp for `int_raster_line')
 	signed.
	(store_vic): Ditto for case 0x12.
	
	* vicii.c: Use one single `mc_table' instead of `mctext_table_0',
 	`mctext_table_1'... and `mc_table_0', `mc_table_1'...  All drawing
 	routines and `init_drawing_tables()' changed.

	* mon.c (mon_dump): Changed output message (``core dumped''
	sounded too much like an error).

	* vicii.c: Changed all drawing macros to inline functions; renamed
	all of them to lower case; rewritten better optimized versions.
	(video_resize): Do not call `init_drawing_tables()' any longer.
	Removed `built_tables' flag.

Thu Jul 17 18:36:51 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* vicii.c: Removed `hr_table_0', `hr_table_1', `hr_table_2' and
 	`hr_table_3'.  Use smaller `hr_table' and `hr_table_2x' instead,
 	in all the functions that used them.
	(init_drawing_tables): Initialize the new tables instead of the
	old ones.

Wed Jul 16 15:53:16 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* vicii.c (DRAW_MULTICOLOR_TEXT, DRAW_MULTICOLOR_TEXT_2x): Make
	`c' non-static (gives slightly better performance).

	* ui_d.c (UiMain): Always call `UiUpdateMenus()' at the beginning.

	* ui_d.c (UiJamDialog): New function.
	* ui_d.h: Prototype here.

	* kbd_d.c (_set_led): New function.
	(kbd_led_set, kbd_led_cleanup, kbd_led_init): Re-implemented 
	handling of keyboard LEDs.

Sun Jul  6 18:14:01 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.0.9.
	
	* raster.h (struct line_cache): New member `gfx_msk'.
	* vicii.h: Moved `GFXMSK_SIZE' here.  Renamed to
 	`SCREEN_GFXMSK_SIZE'.
	* vicii.c: Rename `gfxmsk' to `gfx_msk'.
	(draw_hires_sprite, draw_mc_sprite): New arg `gfxmsk'.  Use the
	mask it points to instead of the global `gfx_msk'.
	(draw_all_sprites, draw_all_sprites_2x): Ditto.  All callers
	changed to pass the appropriate mask (global or cached).
	* vicii.c: All drawing macros now accept a new parameter that
 	specifies the foreground mask to use.  All callers changed to pass
 	the appropriate mask.
	
Fri Jul  4 18:14:06 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* vicii.c (get_mc_text): Cache $D023 into `colordata1[1]' instead
 	of `colordata2[0]'. 

Mon Jun 30 20:29:26 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.0.8.

	* true1541.c (true1541_write_gcr): Update `GCR_data' and mark
 	track as dirty only if the floppy is attached in read-write mode.

	* drive.c (floppy_error_messages): Add new "WRITE PROTECT ON"
 	error message.
	(IPE_WRITE_PROTECT_ON): #define this as its code.
	(open_1541, close_1541, write_1541): Generate write protect error
 	if writing to a write-protected disk image.
	(do_block_command, write_1541, do_rename, do_validate, do_format):
 	Return `IPE_WRITE_PROTECT_ON' if disk image is write-protected.
	(ip_execute): When emulating the `S' (scratch) command, generate
 	write protect error if disk image is write-protected.

	* true1541.c (true1541_write_protect_sense): When a disk is in the
 	drive and there have been no disk changes, return the value of the
 	`ReadOnly' flag in `true1541_floppy' instead of always 0.
	If there has been a disk change, make sure there is at least one
 	transition by returning the NOT of the read-only flag.
	
	* drive.c (attach_floppy_image): If the image cannot be opened
 	read write, try to open it read only.  Set the `ReadOnly' flag in
 	`floppy' accordingly.  If the image has been attached in read-only
 	mode, tell the user about that.

	* drive.h (DRIVE): Unused `mtime' and `changed' members removed.
  	New member `ReadOnly'.

Sun Jun 29 15:48:22 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* true1541.c: #define `TRUE_GCR_WRITE' by default.
	
	* true1541.c (true1541_detach_floppy): Do nothing if
	`true1541_floppy' is NULL.

	* serial.c (serial_select_file) [HAVE_TRUE1541]: Call
	`true1541_detach_floppy()' before attaching the new image.

Fri Jun 27 22:33:17 1997  Andre Fachat  <fachat@physik.tu-chemnitz.de>

	* via-tmpl.c (store_myvia): Fix write accesses to PRA_NHS.
	
	* via2.h (STORE_PRA): Fix output value for serial bus.

	* viad2.h (STORE_PRA): Write GCR byte after setting PRA, not
 	before.
	(STORE_PRA, STORE_PRB, READ_PRA, READ_PRB): Handle DDR correctly.
	(STORE_PCR): Implement read/write flag (bit 5).
	
Fri Jun 27 13:20:55 1997  Teemu Rantanen  <tvr@cs.hut.fi>

	* true1541.c (convert_4bytes_to_GCR): Added two missing bits to
	and -statements.

	* true1541.c (convert_GCR_to_sector): Search the beginning of
 	sector data instead of using a constant.  Convert 260 bytes
 	instead of 256.  Return buffer filled with zeroes if sector data
 	is not found.

	* true1541.c (true1541_move_head): Call `GCR_data_writeback()'
 	before the head is moved.

	* true1541.c (GCR_data_writeback): Save sector data from correct
	offset to disk.

Tue Jun 24 22:47:34 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.0.7.

	* maincpu.c (mainloop) [!DEBUG]: Do not set `reg_pcp'; this can
	prevent the compiler from putting `reg_pc' into a register.

	* interrupt.h (set_irq, set_nmi) [!DEBUG]: Do not print debugging
	information for `debugflg'.

	* vice.h (DEBUG): New option, disabled by default.

	* vicii.c (int_raster): Fixed silly error: trigger the IRQ at
 	`int_raster_clk', not `int_raster_clk - INTERRUPT_DELAY'.

Tue Jun 24 22:00:13 1997  Andre Fachat  <fachat@physik.tu-chemnitz.de>

	* via-tmpl.c, via1.h, via2.h, viad2.h, viad1.h, viap.h: Moved the
 	definition of the interrupt functions to via*.h instead of using
 	`mycpu_set_int'.
	#ifdeffed some debugging information.
		
	* cia-tmpl.c, cia.h, cia1.h, cia2.h: Complete timer rewrite.
	
	* maincpu.c: New variable `reg_pcp' (allows access to `reg_pc'
	from out of `mainloop').
	(mainloop): Make it point to `reg_pc' before starting.
	
	* interrupt.h: Enable `HANDLE_INTERRUPT_DELAY' by default.
	(set_irq, set_nmi): Do not subtract from clock values when
 	checking for the delay (they are unsigned!).
	(set_irq, set_nmi): Added some debugging information when
 	`debugflg' is set.

	* Makefile.in (mrproper): Delete every file we create (this time
	it's for real).
	* widgets/Makefile.in (mrproper): Ditto.
	* readline/Makefile.in (mrproper): Ditto.

	* 6510core.c (DO_DEBUG): New macro.
	(DO_INTERRUPT): Use it here.

Tue Jun 24 21:42:25 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* true1541.c (GCR_data_writeback): Verbosity added to error
 	message for failure of `floppy_write_block()'.

	* serial.c (remove_serial): Call `detach_floppy_image()' after
	(not before) `true1541_detach_floppy()' as the latter needs the
 	disk image to be open to update it when full GCR emulation is
 	enabled.

Sun Jun 22 12:59:52 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* info.c (contrib_text): Added Salvatore Valente
 	<svalente@mit.edu> to the thank list.

	* cia2.h (STORE_CIAPA): Call `serial_bus_cpu_write()' correctly.
  	Before this change, we used `byte' as the value of PRA, which is
 	wrong as this hook is also used for DDRA.
	(STORE_CIAPA): Handle video banks only if value is changed.

Sun Jun 22 12:19:05 1997  Daniel Sladic  <sladic@eecg.toronto.edu>

	* true1541.c: Added disk image update when writing raw GCR data to
 	the disk.
	New variables `From_GCR_conv_data' and `GCR_dirty_track'.
	(convert_GCR_to_4bytes, convert_GCR_to_sector): New functions.
	(GCR_data_writeback): New function.
	(true1541_disable, true1541_detach_floppy, true1541_move_head):
 	Call it here.

Thu Jun 19 14:48:08 1997  Teemu Rantanen  <tvr@cs.hut.fi>

	* sid.c (flush_sound): Added more debug information if we're
	having fragment problems.

	* sid.c (uss_bufferstatus): Use info.bytes if it differs from the
 	info.fragments*info.fragsize.  They should always be the same as
 	we write full fragments.

	* sid.c (uss_init): Argh.  At least OSS/Commercial SB PnP returns
 	one more fragments on GETOSPACE than allocated.  Thanks for
 	Salvatore Valente <svalente@mit.edu> for helping me to fix this.

Mon Jun 16 00:29:42 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.0.6.

	* ui_xaw.c (UiMessage, UiError, UiJamDialog): Call
 	`UiDispatchEvents()' before returning to make sure the dialog is
 	actually popped down.

	* widgets/RegExp.h: #undefine `HAVE_REGEXP_H' if under glibc 2.0.x
 	(regexps have been reported to be broken in it).

Sun Jun 15 18:09:58 1997  Andre Fachat  <fachat@physik.tu-chemnitz.de>

	* 6510core.c (JAM): Removed.
	* 1541cpu.c, maincpu.c (JAM): Define two different versions here.
  	The `maincpu.c' one calls `UiJamDialog()', the `true1541cpu.c' one
 	`UiError()'.

	* ui_xaw.c: Implemented new dialog for handling CPU JAMs.
	(UiJamDialog, UiResetButtonCallback, UiMonButtonCallback): New
 	functions.
	(fallback_resources): Add resources for `resetButton.label' and
 	`monButton.label'
	* ui_xaw.h (UiButton): `Button_Reset' and `Button_Mon' added.
	Prototype for `UiJamDialog'.

Fri Jun 13 00:57:09 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* true1541.c (TRUE_GCR_WRITE): New option, #undefined by default.
	(true1541_write_gcr, initialize_true1541, true1541_trap_handler):
 	Install write trap only if #undefined.
	(true1541_write_trap): Don't compile if #defined.

	* reu.c (reset_reuc): Try to load image only if `reuram' is NULL
 	(i.e. RAM not allocated yet).

	* reu.c (activate_reuc): New function.
	* memory.c: Prototype here.
	* ui_xaw.c (UiToggleREU): Call it when enabling the REU.
	* resources.c (resources): Make it `change_func' for the `REU'
	resource. 

	* memory.c (create_name): If `path' is an empty string, just
	return `name'.

	* vice.h (REUNAME): Define to "reu.c64".

	* resources.c (options): Enable `-reuimage' option.

	* reu.c (reset_reuc, close_reuc): Do not specify a directory for
 	the REU image.
	(close_reuc): Do not do anything if `reuram' is NULL (i.e. we have
 	not initialized the REU yet).  

	* memory.c (SaveFile): If `path' is NULL, save in the current
	directory.  [new behavior]

	* reu.c (reset_reuc): Return zero even if no REU image has been
	loaded. 

	* maincpu.c (reset): Pass NULL as `file_name' to `reset_reuc()'.

	* reu.c (close_reuc, reset_reuc): Little changes to make output
 	more consistent.
	(reset_reuc, close_reuc): If `file_name' is NULL, default to
 	`app_resources.reuName'.
	(read_reuc, store_reuc): If `reuram' is NULL when we are called,
 	reset the REU (and thus allocate memory for it).
	
Fri Jun 13 00:32:42 1997  Daniel Sladic  <sladic@eecg.toronto.edu>

	* true1541.c: Started true GCR emulation when writing.  [actual
 	disk image file updates are still missing]
	(NUM_BYTES_SECTOR_GCR): Changed to 353.
	(convert_sector_to_GCR): Moved Sync to the end as it should.
	(true1541_sync_found): Re-implemented to fetch Sync correctly.
	(initialize_true1541, true1541_trap_handler): Removed write sector
 	trap at $F597.
	(true1541_write_trap): `#if 0'ed out.
	(true1541_write_gcr): No longer warn about unsupported operation;
 	put `val' into the GCR image insted.

Thu Jun 12 11:50:07 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* widgets/FileSel.c (SetValues): When `FSPattern' changes, free
	the old value after (not before!) copying it.

Wed Jun 11 13:54:18 1997  Teemu Rantanen  <tvr@cs.hut.fi>

	* sid.c: Implemented combination of pulse and sawtooth waveforms.
 
Tue Jun 10 16:45:22 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* interrupt.h (check_pending_interrupt): Removed NMI/IRQ delay
 	emulation when `INTERRUPT_DELAY' is #defined to zero.
	(set_nmi, set_irq) [!HANDLE_INTERRUPT_DELAY]: Do not set `nmi_clk'
 	and `irq_clk'.

Mon Jun  9 22:21:23 1997  Teemu Rantanen  <tvr@cs.hut.fi>
 
 	* sid.c (doosc): Argh. The high and low values of the pulse
 	waveform were mixed. This didn't show up until combined waveforms
 	were implemented.
 
Mon Jun  9 10:59:49 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* true1541 (true1541_warn): Made static.

	* Version 0.12.0.5.

	* widgets/FileSel.c (GotoDeepestLegalDirectory): Fix silly bug in
	`~' substitution: now works even if `~' is not followed by `/'.

	* cia-tmpl.c (int_myciatb): Remove the `A_MYCIATB' alarm if `rclk'
 	is different from both `myciatbi' and `myciatbirq'.

Sun Jun  8 18:48:21 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* vic.c (store_vic): Local variable `tmp' removed [unused].

	* xdebug.c, vicii.c, via-tmpl.c: Usage of %ld with CLOCKs
 	corrected.
	
	* configure.in: AC_DECL_SYS_SIGLIST.
	* main.c (break64) [AC_DECL_SYS_SIGLIST]: Print a description of
	the received signal from `sys_siglist[]'.

	* 1541cpu.c (true1541_cpu_reset): Initialize
 	`true1541_int_status'.

	* interrupt.h (cpu_int_status_init): Set `next_alarm_clk' to
	`CLOCK_MAX' instead of zero.

Sun Jun  8 16:43:21 1997  Teemu Rantanen  <tvr@cs.hut.fi>

	* sid.c: Implemented combination of pulse and triangle waveforms.

Sun Jun  8 14:49:36 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Makefile.in: Added `tounix' and `toiso' to `UTILS'.

	* interrupt.h (struct cpu_int_status): New members
 	`next_alarm_clk_backup' and `next_alarm_backup'.
	(force_interrupt_check, prevent_clk_overflow): Handle them.
	(serve_next_alarm): Use them to find the next alarm instead of
 	using `find_next_alarm()'.
	
	* interrupt.h (trigger_reset, trigger_trap): Use
 	`force_interrupt_check()'.
	(maincpu_trigger_trap, true1541_trigger_trap): Pass
 	`clk' instead of `clk + 1' to `trigger_trap()'.
	(maincpu_trigger_reset, true1541_trigger_reset): Pass `clk'
 	instead of `clk + 1' to `trigger_reset()'.

	* vicii.c (update_int_raster): Subtract `INTERRUPT_DELAY' from
 	`int_raster_clk', so that it works as we expect, no matter what
 	its value is.
	(int_raster): Calculate `int_raster_clk' for the next frame every
 	time we are called.  Use `maincpu_set_irq_clk()' to trigger the
 	IRQ.

	* interrupt.h: (HANDLE_INTERRUPT_DELAY): New option, #undef'ed by
 	default.
	(INTERRUPT_DELAY): New constant.  Set it to zero if
 	`HANDLE_INTERRUPT_DELAY' is not defined.
	(struct cpu_int_status): New members `irq_clk', `nmi_clk'.
	(set_irq, set_nmi): New arg `clk'.  Set `irq_clk' or `nmi_clk' to
 	its value when a new IRQ or NMI is generated.  All callers
 	changed.
	(force_interrupt_check): New function.
	(check_pending_interrupt): New arg `clk'; all callers changed.
  	When detecting an IRQ or NMI, use `clk' and `INTERRUPT_DELAY' to
 	decide whether the CPU can already detect them.  If not, force
 	another interrupt check.
	(prevent_clk_overflow): Handle `irq_clk' and `nmi_clk'.
	(maincpu_set_int_clk, maincpu_set_irq_clk, maincpu_set_nmi_clk)
	(true1541_set_int_clk, true1541_set_irq_clk,true1541_set_nmi_clk):
 	New macros.

Fri Jun  6 19:20:54 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* raster.c (do_sprite_fetch): Always set `memptr_inc' for the
 	sprite to 3 if it not Y-expanded; 3 <-> 0 flip for Y-expanded
 	sprites made faster.

	* interrupt.h (serve_next_alarm): Don't set the clk value for the
 	next pending alarm to CLOCK_MAX any longer.  [this was useless, as
 	the handler is expected to change it anyway]
	(serve_next_alarm): Calculate `offset' from `next_alarm_clk'
 	instead of `alarm_clk[next_alarm]'.

Thu Jun  5 23:38:43 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.0.4.

	* types.h: CLOCK typedeffed to DWORD for future portability of
	snapshots.

Wed Jun  4 18:52:43 1997  Teemu Rantanen  <tvr@cs.hut.fi>

	* sid.c (print_voice, print_sid, dump_flush): improved debugging
	if -DDEBUG is defined.

	* sid.c (read_sid): return value written to sid instead of zero.

	* sid.c (setup_sid): 'filters not implemented' warning was given
	based on pulse width of voice 2 instead of filter settings (silly
	typo).

Tue Jun  3 20:42:32 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.0.3.

	* vic.c (store_vic): Fake resizing removed.

	* vsync_x.c (set_timer_speed): Call `sigaction()' before
 	`setitimer()'; otherwise the SIGALRM might kill us if the machine
 	is slow.

	* vicii.c (int_rasterdraw, int_rasterfetch): use `CLOCK_MAX'.

Tue Jun  3 18:54:21 1997  Andre' Fachat  <fachat@physik.tu-chemnitz.de>

	* cia-tmpl.c (mycia_prevent_clk_overflow): Don't subtract from
 	`myciatai', `myciatairq', `lastmyciatai', `myciatbi', `myciatbirq'
 	and `lastmyciatbi' if they are zero.

Tue Jun  3 10:35:32 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* interrupt.h (serve_next_alarm): Disable the alarm being served
 	by putting `CLOCK_MAX' in `alarm_clk', not zero.

Mon Jun  2 21:14:51 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* interrupt.h (prevent_clk_overflow): Subtract
 	`PREVENT_CLK_OVERFLOW_SUB' only from active alarm sources.
	(CLOCK_MAX): New constant: defines the maximum value for a CLOCK
 	counter.  All functions in interrupt.h changed to use it when
 	possible.

	* vsync_x.c (vsync_prevent_clk_overflow): "PREVENT CLK OVERFLOW!"
  	message commented out.

Mon Jun  2 18:02:50 1997  Teemu Rantanen  <tvr@cs.hut.fi>

	* sid.c (setup_voice, store_sid, voice_t): Fixed gate toggle
	between two samples [fixes missing notes in some songs].

Sun Jun  1 22:42:14 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.0.2.

Sat May 31 16:22:18 1997  Teemu Rantanen  <tvr@cs.hut.fi>

	* sid.c: uss: support for 8bit soundcards.

Fri May 30 17:34:08 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.12.0.1.

	* drive.c (attach_floppy_image, detach_floppy_image): Removed
	calls to `true1541_attach_floppy()' and `true1541_detach_floppy()'.
	* serial.c (serial_select_file, remove_serial): Moved here [fixes
	problems when attaching images to different devices with true1541
	turned on].

	* vicii.c (store_d011): Added handling of bad line generation at
 	cycle 13 [correct? fixes the demo "The End" by Flash Inc.].

Thu May 29 20:47:33 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* info.c (contrib_text): Added Bernhard Schwall to the thank list.

	* kbd_x.c (kbd_event_handler): Fixed right Shift release bug as
	suggested by Bernhard Schwall.

	* Makefile.in: `ChangeLog' added to `VICEMISC'.

	* widgets/RegExp.c: Include <regexp.h> only if available.

	* vicii.c (int_rasterdraw): Trigger the collision IRQs only if the
	collision registers were cleared before this line.  [this fixes
	the problems with "Paradroid"]

	* raster.c (do_sprite_fetch): Message for # of cycles stolen by
	sprites removed [even when traceflg != 0].

Wed May 28 17:38:29 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* main.c: Wrong return type of `break64()' in prototype fixed
	[should be RETSIGTYPE, not void].

Tue May 27 16:47:20 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* kbd_x.c (handle_joy_emu): Added support for diagonal directions
	using 7, 9, 1 and 3 from the numeric keypad.  `KP_Insert' added
	for fire.

	* configure.in: Check for digital joystick support, i.e. `struct
 	DJS_DATA_TYPE' in joystick.h.
	* joystick.c (joystick): Use it only if available.
	* menu.h [HAS_JOYSTICK]
	(SetJoystickDevice1SubMenu, SetJoystickDevice2SubMenu): Disable
 	`digital joystick' items if not available.

