Sat Mar 21 14:54:10 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.14.1 released.

	* cia-tmpl.c (update_mycia): Do not check `myciardi' when setting
 	`myciaint'.

Thu Mar 19 19:08:38 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.14.0 released.

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

	* arch/msdos/ui.c (UiInitFinish): Fixed typo: tape must be
 	autostarted from device 1, not 10!  Changed hotkeys for tape
 	attachment/detachment and autostart so that they do not conflict
 	anymore.

	* cia-tmpl.c (int_myciata, int_myciatb): Fixed checks against
 	`myciardi'.  They should now be hopefully correct according to
	Wolfgang Lorentz' CIA docs.
	(read_cia): When reading `CIA_ICR', serve the pending CIA alarms
 	before changing the interrupt status.
	(update_mycia): If a Timer A or Timer B underflow has happened,
 	set the corresponding interrupt bit only if the the last ICR read
 	has happened before it.

	* arch/unix/widgets/DirMgr.c [__FreeBSD__ || __NetBSD__]: #undef
 	HAVE_REGEXP_H.
	* arch/unix/widgets/RegExp.c [__FreeBSD__ || __NetBSD__]:
 	Likewise.

Tue Mar 17 22:20:51 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.52.

Tue Mar 17 21:39:50 1998  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* arch/unix/widgets/Makefile.in (%.o, .c.o): Use `$(SRCDIR)/$*.c'
 	instead of `$<'.
	* arch/unix/readline/Makefile.in (%.o, .c.o): Likewise.

Mon Mar 16 14:01:41 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.51.

	* arch/unix/ui_xaw.c [!PET] (UiTogglePetDiag): Disabled.
	[__alpha] (UiFileSelect): Yet another workaround for the
 	FileSelector: create it only the first time this function is
 	called, and do not XtDestroy it before returning.

Sun Mar 15 22:10:26 1998  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* include/crtc.h (crtc_set_screen_width): Removed prototype.
	(crtc_set_screen_mode): New prototype.

	* crtc.c (crtc_set_screen_width): Removed.
	(crtc_set_screen_mode): New function.  Not only the screen width
 	are set but also the screen base address (`screenmem') as well as
 	the valid bits of the CRTC address lines.  Reverse mode is only
 	enabled when relevant address bit is not valid for screen address.

	* petmem.c (set_std_9tof): New function to set standard 8032/8096
 	and 8296 mapping for $9000-$ffff.  Used in `store_8x96()' and
 	`initialize_memory()'.
	(store_8x96, initialize_memory): Call `ste_std_9tof()' if standard
 	map is to be set.
	(mem_powerup, mem_load, initialize_memory): All RAM is now set to
 	power-on values on hard reset, unused memory areas are caught by
 	`read_unused()'.
	(mem_load): Call `crtc_set_screen_mode()' with appropriate
 	parameters.

	* pets.c, include/pets.h (pet_table): Added crtc screen address
 	mask to table, added 8296 info.

	* resources.h, resources.c (AppResources): Added `-petram9',
 	`-petramA' and `-petdiag' resources and command line parameters,
 	set appropriate defaults.

	* arch/unix/menu.h (PetUserportSubmenu): New menu for PET userport
	(RightMenu) add userport menu for PET.

	* ui_xaw.c (UiTogglePetDiag): New function to toggle PET
 	diagnostic pin on the userport.

Sun Mar 15 21:42:55 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* cia-tmpl.c (int_myciata, int_myciatb): Changed the `myciardi'
 	test to make more demos and Andreas' NMI test work.  Not sure this
 	is 100% correct, though.

Sun Mar 15 16:53:41 1998  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* 6510core.c [__1541__ && TRUE1541_ROTATE]: Removed `VIA_PCR'
	check from the emulation of `PHP', `BVC' and `BVS'.

	* true1541.c (true1541_byte_ready): Only check for byte ready if
 	the byte ready line is active.
	(true1541_sync_found): Removed call to `true1541_rotate_disk()'.

	* viad2.def (STORE_PCR) [TRUE1541_ROTATE]: Inserted call to
 	`true1541_rotate_disk()'.

Sat Mar 14 16:21:38 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* asm.c: Declare `ram' correctly.
	(interpret_line, find_instr, parse_arguments): Cast `char's to
	`int's when using `isspace()' and `isalpha()'.

Thu Mar 12 17:43:45 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.50.

	* 6510core.c (STORE_ABS_X_RMW, STORE_ABS_Y_RMW): New macros.  All
	the RMW instructions use these ones (instead of `STORE_ABS_X()'
	and `STORE_ABS_Y()') in the `absolute,X' and `absolute,Y'
	addressing modes.

	* c64/vicii.c (int_rasterfetch): In case `CHECK_SPRITE_DMA',
 	schedule a new `A_RASTERFETCH' alarm and return only if the next
	fetch alarm is in the future.

Thu Mar 12 14:06:09 1998  Teemu Rantanen  <tvr@cs.hut.fi>

	* maincpu.c (reset): Call `autostart_reset()'.

	* c64/autostart.c: New variable `autostart_ignore_reset'.
	(reboot_for_autostart): Set it to 1.
	(autostart_reset): New function.
	* include/autostart.h: Prototype here.

Wed Mar 11 21:50:11 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.49.

	* c64/vicii.c (int_rasterfetch): In case `FETCH_SPRITE', dispatch
	a pending rasterfetch event if not returning.

Wed Mar 11 21:03:20 1998  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* true1541.c (true1541_motor_control): New function.  Now
 	`byte_ready_active' honours the status of the drive's motor.
	* include/true1541.h: Prototype gere.

	* viad2.def (STORE_PRB): Call `true1541_motor_control' if the
	motor flag is changed.  The stepper motor does not move if
	the drive's motor is off.

Tue Mar 10 15:58:46 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.48.

	* drive.c (find_devno): Cast to `int' when passing to `isspace'.

	* Makefile.in (depend): Actually build dependencies only if
 	`@MKDEP@' is defined; otherwise, give a warning message and do
 	nothing.

	* petcat.c (main): Changed type of `c' from `char' to `int'.

	* configure.in: Check for `XtToolkitInitialize' in `-lXt', instead
	of `XtVaSetValues'.

	* include/interrupt.h (check_irq_delay, check_nmi_delay): Updated
 	prototypes.
	(cpu_int_status_init): Likewise.

	* asm.c: Do not #include "mem.h" anymore.  Declare `ram' as extern
	(ugly kludge before we really cleanup the memory interface).

Mon Mar  9 20:27:28 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.47.

Mon Mar  9 17:21:16 1998  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* raster.c (handle_visible_line, handle_end_of_frame) [__CRTC__]:
 	AND `memptr' with the `addr_mask'.

	* pet/crtc.c: New variable `addr_mask'.
	(crtc_init): Set its value according the number of columns in the
 	current PET.  `screenmem' points to $8000 in RAM.
	(crtc_update_memory_ptrs): AND the value of the screen address
	`scraddr' with `addr_mask'.

Mon Mar  9 13:30:31 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* configure.in: Position of the `-lXt' and `-lXmu' tests swapped.

Mon Mar  9 00:51:17 1998  Teemu Rantanen  <tvr@cs.hut.fi>

	* sid.c (flush_sound): Don't send as much `zero' -data to
 	soundcard on `click' if adjusting sound is set.

	* sid.c (flush_sound): Use adjusting sound algorithm if no speed
 	limit is set (even when no adjusting sound is selected).

	* sid.c, resource.c, arch/unix/ui_xaw.c, arch/unix/menu.h,
 	include/resource.h: Reverted my previous patch, it didn't work
 	well enough.  See my previous entry (Mar 2 22:57:01 1998).

Sun Mar  8 18:40:02 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.46.

	* include/resources.h [!AUTOSTART]: Enable the `autostartName'
 	member.

	* memutils.c (mem_load_sys_file) [__MSDOS__]: Removed debugging
 	message.

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

	* vic20/vic.c (store_vic): When changing the value of `text_cols',
	set `memptr_inc' to the same value too.

Sat Mar  7 15:11:45 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* pet/crtc.c (crtc_update_memory_ptrs): Enable
 	`CRTC_STANDARD_MODE' or `CRTC_REVERSE_MODE' according to bit 12 in
 	`scraddr'.
	(store_crtc): When writing to register #12, call
 	`crtc_update_memory_ptrs()'.
	(draw_line): Renamed to `draw_standard_line'.
	(draw_line_2x): Renamed to `draw_standard_line_2x'.
	(draw_line_cached): Renamed to `draw_standard_line_cached'.
	(draw_line_cached_2x): Renamed to `draw_standard_line_cached_2x".
	(draw_reverse_line, draw_reverse_line_2x): New functions.
	(draw_reverse_line_cached, draw_reverse_line_cached_2x): New
 	functions.
	(video_resize): Register the new functions for the
 	`CRTC_REVERSE_MODE'.

	* include/crtc.h: New constant `CRTC_REVERSE_MODE'.

	* pet/crtc.c (store_crtc): Set the value of `memptr_inc' according
 	to register #1.
	(fill_cache, draw_line, draw_line_2x): All the characters after
 	the first `memptr_inc' ones are blanks.

	* raster.c (handle_visible_line) [!__VIC_II__ && !__VDC__]:
	Increment `memptr' by `memptr_inc', not `SCREEN_TEXTCOLS'.

	* include/raster.h [!__VIC_II__]: New variable `memptr_inc'.

Fri Mar  6 17:21:25 1998 Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* pet/crtc.c (crtc_update_memory_ptrs): Calculate `scraddr'.

	* petmem.c (store_8x96): Put the printf for the $FFF0 register
 	store into a debug flag.

Thu Mar  5 23:43:51 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* tapeunit.c: #include <unistd.h>.

Thu Mar  5 21:40:27 1998  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* Makefile.in: Removed trailing `/bin' from `INSTALL_BINDIR'.

Wed Mar  4 21:54:22 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.45.

	* resources.c (describe_cmd_line_options) [!__MSDOS__]: Removed
 	built-in pager.

	* arch/unix/ui_xaw.c: New variables `LeftMenuWidget',
 	`RightMenuWidget'.
	(UiOpenCanvasWindow): Initialize them.
	(UiPopdownSubmenusAction): Pop them down.

	* vic20/via1.def (GLOBALS): Declare `keyarr' as `extern'.

Wed Mar  4 17:32:59 1998  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* Makefile.in: Renamed `EPREFIX' to `exec_prefix' as it was only
 	used once (in `INSTALL_BINDIR') and it is used as default for
 	`@bindir@'.  New variable `INSTALL_BINS_TO' for `@bindir@' such
 	that `--bindir' works as configure option.  Used in
 	`INSTALL_BINDIR'.

	* pet/petmem.c (patch_2001): Changed the patch to not use $0401 as
 	default load/save address but to read the load address from the
 	file and save from $0400 again.

Tue Mar  3 22:51:43 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.44.

	* c64/vicii.c (store_vic): Ooops...  Missing `vic_ii_fetch_clk =
	new_fetch_clk' added.

Mon Mar  2 22:57:01 1998  Teemu Rantanen  <tvr@cs.hut.fi>

	* sid.c (flush_sound): Improved the old speed adjustment algorithm
	even more.

	* sid.c (setadjustment): New function.  Changes internal speed
 	adjusting algorithm -mode.

	* sid.c (siddata_t): New fields adjust, noclick and clksum.

	* tapeunit.c (is_valid_prgfile, attach_tape_image, find_header):
 	Made possible to attach CBM executable file as a tape image.
  	Executable is recognized from the load -address ($0801 or $0401)
 	and size (< 64k).

	* zfile.c (extensions, is_valid_extension, try_uncompress_archive):
	New function which checks valid extensions from an array.

	* resources.c (resources, options, resources_set_defaults):
	Removed soundSpeedAdjustment -option.

	* arch/unix/ui_xaw.c (UiToggleSoundSpeedAdjustment): Removed.

	* arch/unix/menu.h (SoundSubmenu): Removed sound speed adjustment
 	toggle from the menu.

	* include/resources.h (AppResources): Removed field
 	soundSpeedAdjustment.

Tue Mar  3 13:04:54 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.43.

	* raster.c (add_int_change_border): If `skip_next_frame' is
	nonzero, apply the change immediately.

	* c64/vicii.c (store_vic): When writing to $D016 and `CSEL'
 	changes from 1 to 0 at cycle 56, open the right border only if
 	`blank_enabled' is nonzero or the left border is open.

	* raster.c (emulate_line): Do not display a blank line if
	`open_left_border' is nonzero.

	* c64/vicii.c (store_vic): When writing to $D015, never postpone
 	the next VIC-II fetch event if forcing a sprite DMA check.

Mon Mar  2 22:48:11 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* utils.c [!HAVE_MEMMOVE] (memmove): Return `target', not `dest'.

	* include/utils.h [!HAVE_MEMMOVE]: Fixed prototype.

Sun Mar  1 22:49:24 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.42.

Sun Mar  1 13:35:09 1998  Teemu Rantanen  <tvr@cs.hut.fi>

	* tapeunit.c (attach_tape_image): Removed from `*.P00' detection
 	the check for correct `.P00' extension in the filename.  Now it
 	checks the file header only.  Previous way didn't work with
 	compressed images.

	* zfile.c (try_uncompress_with_zip): Removed.
	(try_uncompress_archive): Replaced by this one, which now handles
 	`.zip', .`lzh', `.zoo', `.tar', `.tgz' and `.tar.gz' files.
	(try_uncompress): use it.

	* arch/unix/ui_xaw.c (UiHandleSpecialKeys, UiToggleTurbo): Added
 	turbo -feature suggested by Chris.Link@StudServ.Stud.Uni-Hannover.DE
	which sets refresh -rate to a low value as well as runs cpu as
 	fast as possible.  Bound to F9 on X11.

Sun Mar  1 10:35:11 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* c64/vicii.c (check_sprite_dma): Fixed so that it does not allow
 	a reset of the DMA during an existing DMA.
	(turn_sprite_dma_on): New helper function for
 	`check_sprite_dma()'.

	* c64/vicii.c (store_vic): When writing to $D012, never trigger
	IRQs if the line for raster IRQs has not changed.

	* 6510core.c (DO_INTERRUPT) [TRACE]: Display a debugging message
 	when an IRQ or NMI is triggered and `TRACEFLG' is nonzero.

	* 6510core.c: Use #defined symbol `TRACEFLG' instead of `traceflg'
	or `true1541_traceflg' directly.
	* maincpu.c (mainloop): `#define TRACEFLG traceflg'.
	* 1541cpu.c (true1541_cpu_execute): `#define TRACEFLG
	true1541_traceflg'.

	* 1541cpu.c (true1541_cpu_execute): `cycles -= MAX_TICKS - 1' ->
 	`cycles -= MAX_TICKS' when `cycles' is greater than `MAX_TICKS'.

Sat Feb 28 23:10:34 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* true1541.c: New variable `attach_clk'.
	(true1541_prevent_clk_overflow): Subtract
 	`PREVENT_CLK_OVERFLOW_SUB' from it when preventing the clock
 	counters from overflowing.
	(true1541_attach_floppy): Set `attach_clk' to the value of
 	`true1541_clk'.
	(true1541_read_disk_byte): Return zero if less than
 	`TRUE1541_ATTACH_DELAY' cycles have elapsed since the attachment
 	of the current disk image.

Thu Feb 28 19:45:14 1998  Teemu Rantanen  <tvr@cs.hut.fi>

	* arch/unix/vsync.c: Experimented with new sleeping algorithm for
 	frame skipping that makes better use of cpu at least on Linux.
	(update_elapsed_frames, set_timer_speed, timer_sleep, do_vsync):
	Modified.

Sat Feb 28 15:55:23 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.41.

	* c64/vicii.c: Removed `cl_ss_collmask' and `cl_sb_collmask'.
	* include/raster.h [SCREEN_NUM_SPRITES > 0]: Moved here.
	* raster.c (handle_visible_line_with_cache): If no update is
 	actually done, set the collisions on the current line
	(`cl_ss_collmask' and `cl_sb_collmask') to the corresponding
 	values in the cache.

	* configure.in: If not on MS-DOS, check for `SDL_OpenAudio()' in
 	the `-lSDL' library and for the `SDL_audio.h' and `SDL_sleep.h'
 	headers.
	* include/autoconf.h.in: Updated accordingly via `autoheader'.

Sat Feb 28 15:47:02 1998  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* Makefile.in (install.bin): Install the binaries from the correct
	directory.

Fri Feb 27 13:47:34 1998  Ettore Perazzoli  <ettore@comm2000.it>

	Faster implementation of interrupts.
	* include/interrupt.h: Removed `nmi_triggered' member from `struct
 	cpu_int_status'; new member `global_pending_int'.
	(set_nmi, set_irq, trigger_reset, trigger_trap): New interrupt
 	handling.
	(ack_nmi, ack_reset, ack_trap): New functions.
	(check_pending_interrupt): Removed parameter `clk'.  Just return
 	`cs->global_pending_int'; do not handle delays in here anymore.
	(check_irq_delay, check_nmi_delay): New functions.
	(cpu_int_status_init): Set `cs->global_pending_int' to zero.
	* 6510core.c (DO_INTERRUPT): Adapted to the new interrupt code.
  	If an interrupt is pending, check for the delay before dispatching
 	it.  Do not use `HANDLE_PENDING_ALARM', `CHECK_PENDING_ALARM',
 	`CHECK_PENDING_INTERRUPT', `TRAP' anymore.  Do everything through
 	`CPU_INT_STATUS'.
	* maincpu.c (mainloop): #define `CPU_INT_STATUS' to
	`maincpu_int_status'.  Do not #define `HANDLE_PENDING_ALARM',
	`CHECK_PENDING_ALARM', `CHECK_PENDING_INTERRUPT', `TRAP' anymore.
	* 1541cpu.c (true1541_cpu_execute): Likewise, #defining
	`CPU_INT_STATUS' to `true1541_int_status'.

Thu Feb 26 12:35:47 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* include/interrupt.h: Removed `strobe_status' from `struct
 	cpu_int_status'.
	(strobe_irq, strobe_nmi, remove_strobe): Removed.
	(true1541_strobe_nmi, maincpu_strobe_nmi): Ditto.
	(check_pending_interrupt): Do not remove or check for strobe
 	NMI/IRQs anymore.

	* 6510core.c [__1541__ && TRUE1541_ROTATE]: Removed redundant
 	`true1541_rotate_disk()' from the emulation of `PHP', `BVC' and
 	`BVS' opcodes.

Wed Feb 25 10:30:56 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* 1541cpu.c: Removed variable `true1541_cpu_running'.

	* c64/autostart.c (autostart_advance): If in mode
 	`AUTOSTART_ERROR', set the original 1541 emulation mode.

Wed Feb 25 23:46:20 1998  Teemu Rantanen  <tvr@cs.hut.fi>

	* sid.c (voice_t, doosc, setup_voice): Removed wtm -field.  Fixed
 	wtl accordingly.

	* sid.c (voice_t, NSHIFT): Noise register rv now has upper bits
 	garbage.

	* sid.c (update_sid): Optimized inner loop.

	* sid.c: Support for Simple DirectMedia Layer.  New device named
 	`sdl'.  Tested on Linux.

	* sid.c (flush_sound): Improved sound speed finetuning algorithm.
  	Should work better now in any case, most notably no more jumpy
 	frame rate with adjusting sound.  Should also give little better
 	fps with automatic refresh setting.

	* sid.c (adjusting_sound): Function removed.

	* include/sid.h: Removed `adjusting_sound()' prototype.

	* arch/unix/vsync.c (do_vsync): Removed references to
	`adjusting_sound()' and all related code.

Tue Feb 24 11:11:31 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.40.

	* true1541.c [FAST_BUS]: New variables `drive_port', `cpu_port'.
	(update_ports) [FAST_BUS]: New function.
	(serial_bus_drive_write, serial_bus_cpu_write) [FAST_BUS]: Call
 	it.
	(serial_bus_drive_read) [FAST_BUS]: Return `drive_port'.

	* arch/msdos/ui.c (UiInitFinish): Added "Autostart Drive 8" and
	"Autostart Tape" commands to `attach_submenu'.

	* c64/autostart.c (autostart_device): New function.

	* true1541.c (true1541_set_half_track): New function.
	(true1541_move_head): Use it.
	(initialize_true1541): Position the head on track 1.

	* Makefile.in (${BINDIR}/x64, ${BINDIR}/xvic, ${BINDIR}/xpet): Do
 	not create a symlink to the binary in the `bin' directory anymore.
	(${BINDIR}/c1541, ${BINDIR}/petcat): Likewise.

	* arch/unix/ui_xaw.c (UiAttachTape, UiAttachDisk, UiSmartAttach):
	Handle errors from `autostart_*()' functions.

	* c64/vicii.c (draw_hires_sprite, draw_mc_sprite): New parameter
 	`line_ptr'.
	(draw_all_sprites, draw_all_sprites_2x): Likewise.  Callers
 	updated.
	(draw_sprites): Pass `frame_buffer_ptr' as `line_ptr' to
 	`draw_all_sprites()' and `draw_all_sprites_2x()'.
	(update_sprite_collisions): New function.
	* raster.c (emulate_line) [__VIC_II__]: Call
 	`update_sprite_collisions()' on those lines which we do not want
 	to update, but might contain sprites.
	(handle_blank_line) [__VIC_II__]: Call
 	`update_sprite_collisions()'.

	* include/1541cpu.h, 1541cpu.c
 	(true1541_cpu_prevent_clk_overflow): Return type changed to `int'.
  	Return nonzero if the clock counters have been decremented.
	* true1541.c (true1541_prevent_clk_overflow): Subtract from
 	`rotation_last_clk' only if `true1541_prevent_clk_overflow()'
 	returns nonzero.

Mon Feb 23 10:21:55 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/msdos/vsync.c: #include "autostart.h".
	(do_vsync) [AUTOSTART]: Call `autostart_advance()'.

	* arch/msdos/tuifs.c, arch/msdos/tuimenu.c: #include "vice.h".
	* arch/msdos/video.c, arch/msdos/vsync.: Likewise.

	* include/types.h: Do not include "autoconf.h".
	* petcat.c, parallel.c, tape.c: #include "vice.h".

	* mon.c (mon_disassemble): Display an error message and return if
 	`nargs' is not 1, 2 or 3.

	* arch/msdos/video.c, arch/msdos/kbd.c: Added some debugging
 	messages.

	* c64/vicii.c (vic_ii_init) [!NEED_2x]: Pass 1 as
	`max_pixel_width' and `max_pixel_height' to `init_raster()'.

	* arch/msdos/kbd.c (kbd_init): Lock `queue_command',
 	`command_queue' and `num_queued_commands'.

	* memutils.c (mem_load_sys_file) [__MSDOS__]: Fixed typo (missing
 	closed parenthesis in call to `concat()').
	(mem_load_sys_file): If `name' is NULL or a pointer to a
 	zero-length string, just return -1.
	(create_name) [__MSDOS__]: Use `/' instead of `\' when building
 	the complete path name.

	* configure.in: Do not force `LDFLAGS' to `-b i386-go32' if `$CC'
 	is something different from `gcc'.

	* include/pia.h: Fixed typo: `signal_pia2' -> `signal_pia1'.

	* pet/viap.def: #include "crtc.h".

	* arch/unix/ui_xaw.c (UiAttachTape) [!CBM64 && !C128]: Do not
	declare it.
	(UiDetachTape) [!CBM64 && !C128]: Ditto.

	* serial.c [!PET]: Do not declare `traps_installed'.

	* true1541.c (true1541_rotate_disk): `last_clock' renamed to
 	`rotation_last_clk' and moved out of the function.
 	(true1541_prevent_clk_overflow): New function.
	* 1541cpu.c (true1541_prevent_clk_overflow): Renamed to
	`true1541_cpu_prevent_clk_overflow'.
	* include/1541cpu.h, include/true1541.h: Updated prototypes.

	* c64/vicii.c (store_vic): Fixed kludge for RMW instruction so
 	that it works correctly when the last store happens at the first
 	cycle of the line.
	(store_d011): Never trigger IRQs.

Sun Feb 22 16:26:34 1998  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* Makefile.in: Updated PET ROM names.

	* vice.h: Updated PET ROM names.

	* pets.c (pet_table): Added editor ROM name to `pet_table[]';
 	added new entries for more PET models.

	* pets.h: Added `editorName' to `struct PetInfo'.

Sun Feb 22 11:59:43 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.39.

	* arch/unix/menu.h: "Reset" and "Power-On Reset" moved to a
 	stand-alone "Reset" submenu.

	* include/autostart.h, c64/autostart.c
 	(read_disk_or_tape_image_contents): Removed.
	* arch/unix/ui_xaw.c (read_disk_or_tape_image_contents): Moved
	here and made static.
	(UiSmartAttach) [CBM64 || C128]: New function.
	* arch/unix/menu.h: New menu item for smart-attachment of files.

	* arch/unix/ui_xaw.c (UiAttachAutostart): Removed.

	* c64/autostart.c: New variable `orig_true1541_state'.
	(autostart_advance): When switching to mode
 	`AUTOSTART_LOADINGDISK', set `orig_true1541_state' to the current
 	value of `app_resources.true1541'.  When finished loading, enable
 	or disable the true 1541 emulation according to its value.

	* c64/autostart.c (autostart_advance): Added explicit
	`AUTOSTART_DONE' and `AUTOSTART_ERROR' cases in the `switch'
	statement.

	* arch/unix/ui_xaw.c (UiInfo) [UNSTABLE]: Display "(unstable)"
	under the version number.

	Little cleanup for const-safeness.
	* include/c1541.h: Removed `pc_get_cbmname' prototype.
	* include/tape.h (is_pc64name, write_pc64header, is_t64name): File
 	name parameters all made const.
	* include/tapeunit.h, tapeunit.c (attach_tape_image): Parameter
 	`name' made const.
	* include/drive.h, drive.c (attach_floppy_image, find_devno):
 	Parameter `name' made const.
	* include/serial.h, serial.c (serial_select_file): Parameter
 	`file' made const.

	* tapeunit.c (attach_tape_image): If there is no valid header, do
 	not try to use it as a raw binary file; report an error instead.

	* arch/unix/ui_xaw.c: #include "autostart.h" only if `AUTOSTART'
	is #defined.
	(UiFileSelect) [!AUTOSTART]: Always disable the "Autostart" button.

	* utils.c (get_current_dir): Maximum size of the `getcwd()' buffer
	(`len') made static.

	* arch/unix/ui_xaw.c, arch/unix/ui_xaw.h (UiFileSelect): New
 	parameters `allow_autostart', `button_return'; all callers
 	updated.  Display "Autostart" button in the FileSelectorWidget
 	only if `allow_autostart' is nonzero.  Return the button pressed
 	by the user in `button_return'.
	(UiAttachTape, UiAttachDisk): Handle the new "Autostart" button.

	* arch/unix/ui_xaw.h: Added `Button_Autostart' value to `UiButton'
	enum.

	* arch/unix/ui_xaw.c (UiAutostartButtonCallback): New function.
	(UiBuildFileSelector): Add it to the callbacks for the "autostart"
 	button of the FileSelector widget.

	Replaced "Up" button with "Autostart" button in the FileSelector.
	* arch/unix/widgets/FileSel.c (ButtonUp): Renamed to
 	`ButtonAutostart'.  Instead of moving to the ancestor directory,
 	just call the callback functions in `autostartButtonCallback'.
	(ChildrenCreate): Display the "Autostart" button instead of the
 	"Up" button.  The widget name is changed from "up_button" to
 	"autostart_button".
	(ChildrenUpdate): Do not change the sensitivity of the "Autostart"
 	button anymore.
	* arch/unix/widgets/FileSelP.h: Renamed `FS_I_UP_BUTTON' to
 	`FS_I_AUTOSTART_BUTTON'.  New `autostart_button_callback' member
 	in `XfwfFileSelectorPart'; new macro `FSAutostartCallbacks'.  New
	`show_contents_button' and `show_autostart_button' members in
	`XfwfFileSelectorPart'; new macros `FSShowAutostartButton' and
	`FSShowContentsButton'.
	* arch/unix/widgets/FileSel.h: New constants
 	`XtNautostartButtonCallback', `XtNshowContentsButton',
	`XtNshowAutostartButton'.
	* arch/unix/widgets/FileSel.c: Added new resource items for
	`autostartButtonCallback', `showContentsButton' and
	`showAutostartButton' to `resources'.
	(SetValues): Make the "Autostart" button sensitive if the
	currently selected file exists.  Handle the `showContentsButton'
	and `showAutostartButton' resources.
	(SelectFileByIndex): Ditto.
	(UnselectAll): Make the "Autostart" button non-sensitive if the
	currently selected file exists.

	* c64/autostart.c (reboot_autostart, prepare_autostart): Removed.
	(autostart_autodetect, autostart_tape, autostart_disk): New
 	functions.
	(autostart_init): New function.
	(reboot_for_autostart): New (static) function.
	(advance_autostart): Renamed to `autostart_advance'.
	* main.c (main) [AUTOSTART]: Call `autostart_init()' and then
	`autostart_autodetect()' to autostart images specified on the
 	command-line.
	* arch/unix/ui_xaw.c (UiAttachAutostart): Use
	`autostart_autodetect()' instead of `reboot_autostart()'.

	* include/autostart.h, include/warn.h: Prevent multiple inclusion
 	via cpp.

Sat Feb 21 17:03:57 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.38.

	* c64/vicii.c (store_vic): When accessed by an RMW instruction,
 	trigger a raster IRQ if bit 8 of the current raster line and bit 8
 	of the IRQ raster line are equal and bit 0 of $D01A is set.
	(store_d011): When accessed by an RMW instruction, trigger a
 	raster IRQ if the lowmost 8 bits of the current raster line are
 	equal to the lowmost 8 bits of the IRQ raster line and bit 0 of
 	$D01A is set.

Sat Feb 21 14:21:43 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.37.

	* arch/unix/menu.h: Enable the `XSync' option even if `__unix' is
 	not defined.

	* arch/unix/kbd.c (kbd_event_handler): If the pressed key is not
	shifted on the real C64 keyboard, release the right shift too.

	* arch/msdos/kbd.c (queue_command, kbd_flush_commands): New
 	functions.
	(my_kbd_interrupt_handler): When RESTORE is pressed/released or a
 	reset is requested, queue the commands using `queue_command'
 	instead of executing them immediately.
	* arch/msdos/vsync.c (do_vsync): Call `kbd_flush_commands()'.

	* cia-tmpl.c (int_myciatb, int_myciata): Check whether the
 	interrupt flag has been cleared before the current interrupt tick
 	in the NMI case too.

Fri Feb 20 15:37:20 1998  Teemu Rantanen  <tvr@cs.hut.fi>

	* arch/unix/xdebug.c [R_SP]: #undef `R_SP' (Digital UNIX defines
 	it for its own purposes).

Fri Feb 20 13:40:44 1998  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* Makefile.in: Changed PET ROM names in `PETROMS'.
	(cleandirs, cleaninstall): New targets to install after removing
 	the old binaries

	* vice.h: Changed PET ROM names (`KERNAL*NAME').  Names are now
 	the same for DOS and Unix

	* pet/pets.c: Added PetInfo entry for PET3032 with business
	keyboard to the `pet_table'.

Fri Feb 20 09:44:53 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* true1541.c: New variables `GCR_track_start_ptr',
 	`GCR_track_size', `GCR_head_offset'.
	(true1541_move_head): Update `GCR_track_start_ptr' and
 	`GCR_track_size'.
 	(true1541_rotate_disk): Use `GCR_track_start_ptr',
	`GCR_head_offset' and `GCR_track_size' instead of
	`track_GCR_start', `track_GCR_end' and `head_ptr'.
	(true1541_read_disk_byte): Likewise.
	(true1541_sync_found): Likewise.
	(true1541_write_gcr): Likewise.
	(true1541_rotate_disk): Removed redundant `if
	(finish_byte)' check.  Sped up `bits_moved' and `head_ptr'
 	recalculation when `last_mode' is nonzero (read mode).
	(true1541_set_byte_ready): Moved before `true1541_rotate_disk()'
	and made inline.

Thu Feb 19 22:59:02 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.36.

	* Makefile.in: Moved `$(PETDIR)/pia.c' from `VICESRC' to `PETSRC'.
  	Moved `$(VICDIR)/vic20mem.h' from `VICEHDR' to `VICSRC'.
	Moved `$(PETDIR)/petmem.h' from `VICEHDR' to `PETSRC'.
	Moved `$(PETDIR)/pets.h' from `VICEHDR' to `PETSRC'.
	Moved `$(C64DIR)/c64mem.h' from `VICEHDR' to `C64SRC'.
	Added `$(INCLUDEDIR)/autostart.h' to `VICEHDR'.

Thu Feb 19 21:05:49 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.35.

	* zfile.c: Removed `COMPR_FAIL' value from `enum
 	compression_type'; replaced by `COMPR_RDONLY'.
	(try_uncompress): If all the `try_uncompress_with_*' calls fail,
 	just return `COMPR_NONE'.
	(try_uncompress_with_zip): If we have found a suitable disk or
 	tape image in the ZIP archive but `write_mode' is nonzero, return
 	a zero-length string.
	(try_uncompress_with_zip): Fixed memory leak: free `argv[0..4]'
 	after spawning `unzip'.
	(try_uncompress_with_zip): Added some debugging info.
	(zfopen, zopen): Do not handle the `COMPR_FAIL' case after calling
 	`try_uncompress()' anymore.
	(zfopen): If the temporary file name returned by `try_uncompress'
 	has zero length, set `errno' to `EACCES' and return NULL.
	(zopen): Likewise, but return -1 instead of NULL.

	* main.c: #include "autostart.h".

Thu Feb 19 10:09:16 1998  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* pia.c (pia1_update_irq, pia2_update_irq): Set IRQ line only if
 	active transition has occured (bit 7 for CA1) _and_ the IRQ flag
 	(bit 0 for CA1) is set.
	(signal_pia1): Set active transition not only when the interrupt
 	is enabled but always.
	(store_pia1, store_pia2): When writing the control register reset
 	CA2/CB2 irq flag when output mode is selected (bit 6 is supposed
 	to be always 0 then).  Also call `pia[12]_update_irq()' after
 	setting the register.

	* pet/pia.c: Removed `irq_a' and `irq_b' entries from `piareg'.
	(pia1_update_irq, pia2_update_irq): New functions to check all IRQ
 	conditions and set IRQ lines appropriately.
	(signal_pia1): Fixed bit to check for positive or negative
 	transition, set IRQ flag in ctrl register and call
 	pia1_update_irq.
	(store_pia1, store_pia2): When writing the control register only
 	set the lower 6 bits, as the upper two are the interrupt flags and
 	kept.
	(read_pia1, read_pia2): When reading PRA and PRB clear the
 	appropriate interrupt flags in the control register, and call
 	`pia?_update_irq()'.

Wed Feb 18 21:22:15 1998  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* pet/petmem.c (mem_load): Fixed PET2001 char ROM generation
 	again.  Earlier assumptions did not hold true.

	* pet/crtc.c: #include "pia.h" for PIA CB* line transitions.
	(int_rasterdraw): Give state of `offscreen' line through to PIA1
 	CB1, instead of using strobe IRQs.

	* pet/pia.c: #include "pia.h" and "interrupt.h".
	(reset_pia1): Clear PIA1 interrupt line.
	(reset_pia2): Clear PIA2 interrupt line.
	(signal_pia1): New function to detect control input line changes.
	(read_pia1): Clear interrupt flag if PRB being read.

	* include/vmachine.h: New interrupt flag lines for PET: "I_PIA1",
 	"I_PIA2".

	* include/pia.h: New line transition definitions for PIA:
 	`PIA_SIG_CA[12]', `PIA_SIG_CB[12]', `PIA_SIG_FALL',
 	`PIA_SIG_RISE'.

Tue Feb 17 21:48:15 1998  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* pet/pets.h: Renamed member `ieee' to `pet2k' in `struct
 	PetInfo'.  Occurences updated.

	* pet/petmem.c (mem_load): Load only 2k of character generator
 	ROM.  The rest is generated (second part is inverted).  If pet2001
 	then upper and lower characters are swapped, and graphics/text
 	mode are swapped.

Thu Feb 19 15:30:04 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.34.

	* raster.c (emulate_line): Always display a blank line if
	`blank_enabled' is nonzero.

	* c64/autostart.c: #include "vice.h", "true1541.h" and "ui.h".

	* arch/unix/ui_xaw.c (UiAttachAutostart): Do not dynamically
	reallocate the file name returned by `UiFileSelect'.

	* pet/pets.c: #include "vice.h".

	* true1541.c (serial_bus_cpu_write): Removed unused variable
 	`old_cpu_bus'.

	* serial.c, include/serial.h (drive_reset): Renamed to
 	`serial_reset'.  All occurences updated.

	* include/vice.h: New constants `KERNAL2001NAME',
	`KERNAL4032BNAME'.
	* pet/pets.c: Use them instead of hard-coded strings in the
	`pet_table'.

	* pet/pets.h: Avoid multiple inclusion via cpp.

	* resources.c: `projectdir' renamed to `projectDir'.  All
	occurences updated.

	* configure.in: Check for `gettimeofday' again (was removed by
 	accident in 0.13.0.32).

	* arch/unix/widgets/TextField.c (ConvertSelection): `(void **)'
 	cast replaced with `(char **)'.

Wed Feb 18 19:46:39 1998  Douglas Carmichael  <dcarmich@mcs.com>

	* arch/unix/widgets/RegExp.c (RegExpCompile) [__FreeBSD__]: Return
	without calling `compile' which is not available on FreeBSD.

Wed Feb 18 19:21:04 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Makefile.in (DOCS): The new `recomment.html' by Andr replaces
 	the old `recomment' documentation file.

Tue Feb 17 19:06:24 1998  Teemu Rantanen  <tvr@cs.hut.fi>

	* sid.c (reset_sid): Argh, stupid bug. Forgot to mark SID register
 	values dirty after modifying them.

	* zfile.c: Read-only support for ZIP-compressed files.
	Added `COMPR_ZIP' and `COMPR_FAIL' to `enum compression type'.
	(try_uncompress_with_zip): New function.
	(try_uncompress): Try ZIP.

	* c64/autostart.c: New file.  Implements a feature to
 	automatically load and start a program from either disk or tape
 	image.
	* include/autostart.h: New file.
	* include/vice.h [CBM64]: #define `AUTOSTART'.
	* include/resources.h [AUTOSTART]: New entry for autostart image
 	(`autostartName') in `struct _AppResources'.
	* arch/unix/vsync.c (do_vsync): Call `advance_autostart()' at
 	every vsync.
	* arch/unix/ui_xaw.c (UiAttachAutostart): New function.
	* arch/unix/menu.h: New left menubar -entry for autostart.
	* main.c (main): Initialize autostart.
	* resources.c (options): New cmdline option `-autostart'.
	* Makefile.in (C64SRC,C64_LOBJS): Added `autostart.c' to `C64SRC'
 	and `autostart.o' to `C64_LOBJS'.

Tue Feb 17 18:48:35 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* include/drive.h: Do not #include "fs_unix.h" anymore.

Mon Feb 16 17:31:15 1998  Andreas Boose  <boose@rzgw.rz.fh-hannover.de>

	* drive.c (ip_execute): Changed to a more realistic user handling
 	of `U*' commands.  Now all the 256 command options are recognised.
  	Fixed `UI' (warm reset), `UI+' and `UI-' (change IEC bus speed),
 	`UJ' (cold reset) and `U0' (set user command vector) return
 	messages.

Sun Feb 15 23:30:27 1998  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* Makefile.in: Added `@LIBOBJS@' to `COMMON_OBJS'.
	Renamed `X64_DEPS' to `C64_DEPS', added `COMMON_LIBS'.
	Renamed `XVIC_OBJS' to `VIC_DEPS', added `COMMON_LIBS'.
	Renamed `XPET_OBJS' to `PET_DEPS', added `COMMON_LIBS'.
	Removed all but `c1541.o' from `C1541_OBJS'.
	New def `C1541_DEPS', has `C1541_OBJS' and the former rest from
 	`COMMON_OBJS'.
	Removed all but `petcat.o' from `PETCAT_OBJS'.
	New def `PETCAT_DEPS', has `PETCAT_OBJS', `READLINE' and the
 	former rest.
	(COMMON_OBJS): Extended the rule to `COMMON_OBJS',
 	`TRUE1541_OBJS', `PARALLEL_OBJS', `C1541_OBJS', `PETCAT_OBJS'
	(c1541): Only depends from `C1541_DEPS'.

	* configure.in: Moved `READLINE' and `WIDGET' libraries from
 	`SYSPEC_OBJS' to `LIBOBJS' when compiling for Unix.  Clear
 	`LIBOBJS' when compiling for MS-DOS.

Sun Feb 15 16:04:49 1998  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* pet/petmem.h: Moved to pet directory. Added PET2001_CHECKSUM.

	* include/petmem.h: Moved to `pet/petmem.h'.
	* include/vic20mem.h: Moved to `vic20/vic20mem.h'.
	* include/c64mem.h: Moved to `c64/c64mem.h'.
	* Makefile.in (VICEHDR): Moved `$(INCLUDEDIR)/vic20mem.h' to
 	`$(VICDIR)/vic20mem.h', `$(INCLUDEDIR)/c64mem.h' to
 	`$(C64DIR)/c64mem.h', `$(INCLUDEDIR)/pets.h' to `$(PETDIR)/pets.h'
 	and `$(INCLUDEDIR)/petmem.h' to `$(PETDIR)/petmem.h'.
 	(VICESRC): Removed `pia.c'.
	(PETSRC): Moved here.
	(C64_OBJS, VIC20_OBJS, PET_OBJS): Removed `drive.o'.
	(COMMON_OBJS): Moved here.

	* drive.c (fs_info): Added dirmpos to hold the memory position
	of a directory.
	(read_fs): Compute memory position of directory line for PET.
	(open_fs): Compute memory position of directory line for PET.

	* serial.h (drive_reset): Added prototype.

	* resources.h: Added `projectdir' member to `_AppResources'.

	* maincpu.c: #include "mem.h" and "drive.h".

	* memutils.c (mem_load_sys_file): Make allocation of paths
 	dynamic, to allow the use of the `projectdir' resource.

	* parallel.c: Outcommented some stuff.

	* petmem.c: Added headers reset routine.
	(initialize_memory): Map $ef00 to ROM if pet2001, as this page
	has some patched routines.
	(patch_2001): New function to patch PET 2001 ROM to make IEEE work.
	(mem_load): Check PET2001 model and checksum and call patch_2001.

	* include/pets.h (pet_table): Flipped ieee flag 0 <-> 1, renamed
 	model 8296 to 8096.

	* pet/viap.c (store_via): Call par_set_atn and par_set_nrfd with
	0 or 1 only.

	* resources.c (resources): Added saved value projectdir.
	(resources_set_defaults): Set default for projectdir.

	* serial.c (parallelattention): "OR" all the status outputs to
 	return.
	(drive_reset): New function that closes all open files.

	* sid.c: Added "types.h" include because it's needed for "mem.h".

Sun Feb 15 21:29:50 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.33.

	* memcmp.c (memcmp): New file, new function.
	* Makefile.in: Added `memcmp.c' to `VICESRC'.

Sat Feb 14 14:38:08 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* include/vice.h: No longer #define `SYSINFO' when we
 	`systeminfo.h' is available.

	* include/vice.h: #include <autoconf.h> instead of "autoconf.h".

	* 6510core.c: Removed `extern' declaration for `traceflg'.

	* drive.c: #include <dirent.h>.

	* configure.in: Check whether we have the `sys/param.h' include.

	* include/fs_unix.h: Removed.

	* include/vice.h: Added definition for `GET_PATH_MAX'.  #define
	`NEED_GET_PATH_MAX' if the maximum path length must be determined
	at runtime.  All occurrences of `PATH_MAX' replaced with
	`GET_PATH_MAX' in the sources.
	(PATH_VAR): New macro.

	* utils.c, include/utils.h [!HAVE_ATEXIT] (atexit): New function.

	* configure.in: Check whether `atexit' and `memmove' exist.
  	Removed the several other checks for libc functions that we are
 	not trying to replace anyway.

	* misc.c, include/misc.h (xstrdup, strndup): Removed.

	* include/vice.h: Removed check for `HAVE_MEMMOVE'.

	* misc.c, include/misc.h (memmov): Removed.
	* utils.c, include/utils.h [!HAVE_ATEXIT] (memmov): Moved here.

	Changes for X11R4 compatibility:
	* arch/unix/widgets/TextField.c (ConvertSelection): Changed cast
	to `XPointer *' into a cast to `void **'.
	* arch/unix/kbd.c (handle_joy_emu): Use the `XK_KP*' cursor
	movement keysyms only if available.

	* maincpu.c, 1541cpu.c: #include "patchlevel.h".
	* maincpu.c [UNSTABLE]: #define `TRACE'.
	* 1541cpu.c [UNSTABLE]: Ditto.

	* arch/unix/ui_xaw.c (UiOpenCanvasWindow): Modified the
 	translation table for the pop-up menus so that it works also when
 	ScrollLock or CapsLock are enabled.

Wed Feb 11 22:45:49 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.32.

	* raster.c (handle_visible_line_without_cache): Always copy the
	whole line in double-size/double-scan mode.

Tue Feb 10 20:38:47 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.31.

	* Makefile.in (VICEHDR): `pets.h' moved to the `INCLUDEDIR'.

	* c64/vicii.c (store_vic): Always record the changes for $D021 in
	`background_color' too.

	* include/interrupt.h (set_nmi): Silly silly me.  If
 	`last_stolen_cycles_clk' <= `clk', set `nmi_clk' to `clk', not
 	`last_stolen_cycles_clk'!

Fri Feb  9 00:21:00 1998  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* pets.h: Added 8x96 mapping register flag to `struct PetInfo'.
	* pet/petmem.c (read_ext8, store_ext8, read_extC, store_extC): New
 	functions for 8x96 extended memory.
	(read_vmirror, store_vmirror, read_unused, store_dummy): More
 	functions for 8x96 memory.

	* pet/petmem.c (read_io, store_io): Made more similiar to the real
 	thing: only $e8xx has I/O, and the chip outputs are ANDed when
 	more than one is selected.  This approximates the real behaviour
 	quite well.

	* pet/pets.c (pet_set_model): Clear the ROM name entries.

	* Makefile.in (COMMON_OBJS): Moved `memutils.o' here from
	emulator-specific object lists.

	* include/pets.h: New members in `struct PetInfo': `ramSize',
 	`videoSize', `IOSize', `crtc'.  Removed `pet_set_kernal()'
 	prototype.
	* pet/pets.c: Updated to use them.

	* include/resources.h, resources.c: Added petrom* resources to
 	struct to hold the name of the ROMs.

	* memutils.c (mem_load_sys_file): If a ROM file is now 2 bytes too
 	large, discard starting address.  If a ROM file is larger or equal
 	to `minsize', but not as big as `maxsize', load to the end of the
 	given ROM space.

	* pet/petmem.c: New constant `RAM_ARRAY', set to 0x2000 to include
	the 8x96 expansion RAM.
	(read_io, store_io): Changed to reflect crtc flag.  Implemented
 	better I/O mapping (as read from schematics).  Initialize memory
 	according to the `videoSize' and `IOSize' members of `PetInfo'
 	values.  Load the PET ROM extensions.

Sun Feb  8 16:06:09 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* c64/vicii.c (_draw_idle): Paint the background in the
 	`overscan_background_color'.

Sun Feb  8 14:55:34 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.30.

	* include/sprites.h (SPRITE_PIXEL, SPRITE_PIXEL_2x): The new
 	collision mask is a logical OR between the old collision `collmsk'
 	and the value in `collmskptr[pos]', but not with the `sprite_bit'.

	* c64/vicii.c (draw_hires_sprite, draw_mc_sprite): When in idle
 	state, sprite-background collisions cannot happen.

Sat Feb  7 14:46:53 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.29.

	* c64/vicii.c (set_video_mode): If the `overscan_background_color'
 	changes, record the change with `add_int_change_background'.
	(draw_black_background, draw_black_background_2x): Removed.
	(draw_std_background, draw_std_background_2x): Use
 	`overscan_background_color' instead of `background_color'.
	(video_resize): Do not use `draw_black_background' or
 	`draw_black_background_2x' anymore.
	(store_vic): When $D021 is changed, record the change within the
 	line in `overscan_background_color', but not for
 	`background_color'.

	* pet/pets.h, pet/pets.c (pet_set_video): Renamed to
 	`pet_set_video_width'.
	(pet_set_keyb): Renamed to `pet_set_keyboard_type'.

	* include/resources.h: `video' renamed to `videoWidth', `keyb'
	renamed to `keyboardType', `model' renamed to `petModel'.
	Occurrences updated.

	* resources.c: "PetVideo" resource renamed to "VideoWidth",
 	"PetKeyb" renamed to "KeyboardType".  "-video" option renamed to
 	"-videowidth", "-keyb" renamed to "-keyboardtype".

	* include/fs_cbm.h (C1541_VERSION_MINOR): C1541 Version 2.03.

	* c1541.c (usage): Added info for `-zcreate'.

Sat Feb  7 14:43:34 1998  Ricardo Ferreira aka Storm  <storm@esoterica.pt>

	Implemented `unlynx' and `system' commands in c1541.
	* c1541.c (disk_system, disk_unlynx): New functions: added
 	corresponding entries in `disk_cmds'.
	(usage): Added info for `-unlynx'.

Sat Feb  7 00:03:35 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* include/interrupt.h (steal_cycles): Return if `num' is zero.
  	Add `num - 1' cycles to `irq_clk' and `nmi_clk' (this should be
 	consistent with the change in 0.13.0.28).
	(set_irq, set_nmi): FIXME? If `last_stolen_cycles_clk' is equal to
 	`clk', set `nmi_clk' (or `irq_clk') to the value of `clk' instead
 	of `last_stolen_cycles_clk -1'.

Fri Feb  6 02:06:25 1998  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* Makefile.in: Added `pet/pets.c' to `PETSRC', `pet/pets.o' to
 	`PET_LOBJS', and `pet/pets.h' to `VICEHDR'.

	* memutils.c, memutils.h (mem_load_sys_file): New parameters
 	`minsize' and `maxsize' replace old `size'.  Callers updated.

	* resources.h: Added video, keyb and model entries to
	app_resources structure.

	* mon.c: `MAXBANKADDR' is not 0x7fff for PET, but 65535

	* pet/petmem.c (mem_load): When loading the kernal ROM file, allow
 	short files as long as they have the minimum file size given by
 	the PET model.

	* pets.h: define PET model info structs.

	* pets.c: New file: define PET model infos, for the different
 	hardware functions to change the hardware definitions. Use
 	app_resources.video to determine screen width.  Use
 	app_resources.keyb to determine keyboard layout.

	* raster.c (handle_visible_line_without_cache): Add checks for
 	`__VIC_II__' for `overscan_background_color' that only makes sense
 	for C64.

	* resources.c: Define new PET resources and command line options:
	"-model 3032" allows selection of different hardware models,
	"-keyb {business|graphics}" allows different keyboard layouts,
	"-video {40|80}" sets the screen width.
	Changed the command line option struct definition to include a
	function to be called when the option is changed at the command line.
	Set the default model to 8032.

Fri Feb  6 12:00:10 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.28.

	* include/interrupt.h (steal_cycles): Increment `irq_clk' and
 	`nmi_clk'.

	Fixed sprite priorities.
	* include/sprites.h (SPRITE_ONE_PIXEL, SPRITE_ONE_PIXEL_2x): New
 	parameter `do_draw'.  If zero, do not actually put the sprite
 	pixel in the buffer; otherwise, put it only if no other sprite
 	pixel has already been painted in that place.  Renamed to
 	`SPRITE_PIXEL' and `SPRITE_PIXEL_2x', respectively.
	(_SPRITE_MASK, _MCSPRITE_MASK, _MCSPRITE_DOUBLE_MASK): New
 	parameter `gfxmsk'.  Decide whether a certain sprite pixel must
 	visible or not according to the corresponding bit in `gfxmsk'.
	(_MCSPRITE_MASK, _MCSPRITE_DOUBLE_MASK): Removed `msk' parameter.
  	Callers updated.
	(SPRITE_MASK, SPRITE_MASK_2x): New parameter `gfxmsk': pass it to
 	`_SPRITE_MASK()'.
	(MCSPRITE_MASK, MCSPRITE_MASK_2x): New parameter `gfxmsk', pass it
 	to `_MCSPRITE_MASK()'.
	(SPRITE_TWO_PIXELS, SPRITE_TWO_PIXELS_2x): Removed.
	(SPRITE_DOUBLE_MASK, SPRITE_DOUBLE_MASK_2x): Removed.
	* c64/vicii.c (draw_hires_sprite, draw_mc_sprite): Adapted to the
 	new versions of the sprite macros.
	(draw_hires_sprite): Removed optimization for double-width sprites
	in the foreground (not possible anymore).
	(draw_all_sprites_2x, draw_all_sprites): Inverted the order for
	sprite drawing.

	* include/interrupt.h (set_nmi, set_irq): If the IRQ or NMI is set
 	after a DMA, set `irq_clk' or `nmi_clk' to `last_stolen_cycles_clk
 	- 1' instead of `last_stolen_cycles_clk'.  I am not 100% sure of
 	this, but it appears to fix all the current problems with sprite
 	timings.

	* 6510core.c: `pending_interrupt' is now an `enum cpu_int' instead
	of an int.

	* include/interrupt.h: `IK_NONE' in `enum cpu_int' now defined as
 	zero; all the other bits are shifted to the right by one position.

Thu Jan 29 14:45:03 MET 1998 Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* arch/unix/ui_xaw.c (UiOpenCanvasWindow): Moved color allocation
 	in to the top, and setting the toplevel colormap resource after
 	that.  This allows allocating a new colormap when the old one runs
 	out of colors.
	(UiAllocColors): Renamed to `UiDoAllocColors'
	(UiAllocColors): New function.  It calls `UiDoAllocColors' and
 	checks if there were enough colors available.  If not it allocates
 	a new colormap and tries to call UiDoAllocColors again.

Thu Feb  5 16:30:07 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.27.

	* include/vicii.h (VIC_II_IS_BITMAP_MODE): New macro.
	* c64/vicii.c (_draw_idle): If the current mode is a bitmap one
	(`VIC_II_IS_BITMAP_MODE'), the background is black.
	(store_d011): If on the `FIRST_DMA_LINE', set `allow_bad_lines'
	according to the value of bit 4 if the new $D011 value.

Fri Jan 30 03:25:31 1998  Michael Schwendt  <sidplay@geocities.com>

	* sid.c: New parameters for band-pass filter.
	Reconfigured high-pass filter because it did depend too
	much on the low-pass optimized parameter table.

Mon Feb  2 16:18:34 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.26.

	* configure.in: Do not add `X_CFLAGS' to `CFLAGS' anymore.

	* raster.c (handle_visible_line_without_cache): Update the borders
 	if the overscan background color has changed since the last
 	update; handle open borders in the cache correctly.

Sun Feb  1 21:42:25 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.25.

	* raster.c (add_int_change_next_line, add_ptr_change_next_line):
 	If this frame is being skipped, don't add the change to the list,
 	but apply it immediately instead.

	* c64/vicii.c (set_sprite_x): New function.
	(store_vic): Use it to update the sprite X coordinates.

	* c64/vicii.c (store_vic): Better approximation for changes in the
 	$D027...$D02E, $D01B and $D01C registers: the change is visible on
 	the next line if the X coordinate of the corresponding sprite is
 	smaller than the current X coordinate of the raster; otherwise,
 	it's immediately visible on the current line.

	* c64/vicii.c (store_vic): If the X coordinate of a sprite is
 	changed and the old X coordinate is larger than both the current X
 	position of the raster and the new X coordinate, hide the sprite
 	for this line (by setting its X coordinate to `SCREEN_WIDTH').

Sun Feb  1 19:28:02 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.24.

	* c64/vicii.c (store_vic): Fixed typo: `cycle <
	SPRITE_FETCH_CYCLE' -> `cycle <= SPRITE_FETCH_CYCLE'.

Sun Feb  1 14:16:50 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.23.

	* c64/vicii.c (store_vic): (Temporary?) hack to make changes in
 	the X coordinates of the sprites work.

	* arch/msdos/ui.c [CBM64]: Added toggles for SID filters and SID
 	model.

	* main.c (preserve_workdir): Pass `PATH_MAX' to `getcwd' as the
 	maximum buffer length because not all versions of DJGPP support
 	the value `-1' (GNU extension).

	* configure.in: Consider `msdos' (not just `go32') as a valid
 	`host_vendor' string for MS-DOS cross-compilation.
	When configured for MS-DOS cross-compilation, prepend `CFLAGS'
	with `-b i386-go32' if the compiler is named `gcc'.

	Implemented disk/tape image contents preview in the MS-DOS file
 	browser:
	* arch/msdos/tuifs.c: #include "tuiview.h".
	(tui_file_selector): New parameter `read_content_func'.  If the
 	user presses `space' on a file name, the contents of the file
 	(extracted via `read_content_func') are displayed.
	* arch/msdos/ui.c: #include "drive.h", "tape.h".
	* arch/msdos/ui.c (attach_disk_callback): Call `tui_file_selector'
 	with `read_disk_image_contents' as `read_content_func'.  `#if 0'ed
 	part removed.
	(attach_tape_callback): Call `tui_file_selector' with
 	`read_tape_image_contents' as `read_content_func'.

Sun Feb  1 13:49:19 1998  Andreas Boose  <boose@rzgw.rz.fh-hannover.de>

	* true1541.c: `READ_WRITE_MODE' and `BYTE_READY_ACTIVE' macros
 	removed.  New variables `read_write_mode' and `byte_ready_active'.
	(true1541_update_viad2_pcr): New function to set `read_write_mode'
 	and `byte_ready_active'.
	(true1541_rotate_disk): Use new flags `read_write_mode' and
 	`byte_ready_active' instead of macros.  #include "via.h" and
 	"viad.h" removed.

	* include/true1541.h: Fixed typo `true1541_rotate' ->
	`true1541_rotate_disk'.
	New prototype `true1541_update_viad2_pcr'.

	* viad2.def (STORE_PCR): Call `true1541_update_viad2_pcr()'
 	whenever PCR bits are changed.

Sat Jan 31 15:51:16 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.22.

	* c64/vicii.c (set_video_mode): Load `overscan_background_color'
 	from the value of the $D021 register.
	(store_vic) [NO_SPRITE_HACK]: First try at getting the timing for
 	changes in the sprite X coordinates right.

	* c64/vicii.c (_draw_ext_text_2x): Actually draw only the
 	characters in the specified interval, as expected.

	* c64/vicii.c (int_rasterfetch): Fixed typo in case
 	`FETCH_MATRIX': `matrix_fetch_done' -> `!matrix_fetch_done'.
  	Damn.

	* 6510core.c: Changed so that interrupts are checked for after
 	each instruction.  Opcodes that change the I flag do not need to
	explicitly check for interrupts anymore.
	(DO_PENDING_INTERRUPT): Removed (now unused).
	* include/interrupt.h (force_interrupt_check): Removed.
	(true1541_force_interrupt_check, maincpu_force_interrupt_check):
	Removed.
	(serve_next_alarm): Made `void': do not handle the special
	`_A_FORCE_INTERRUPT_CHECK' case and do not return the status of
	the pending interrupts anymore.
	* cia-tmpl.c (my_set_int): Removed calls to
 	`force_interrupt_check'.
	* c64/vicii.c (vic_ii_trigger_light_pen): Likewise.

Fri Jan 30 11:51:28 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.21.

	* c64/vicii.c (int_rasterfetch): In case `FETCH_SPRITE', always
 	schedule a fetch alarm if `offset' is zero.
	(int_rasterfetch): Set the values for `fetch_idx' and
 	`vic_ii_fetch_clk' before (not after) calling `do_memory_fetch()'.
	(set_video_mode): Delay the effect of a change in the output by 2
 	character positions.

Wed Jan 21 19:23:54 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* include/vicii.h (VIC_II_IS_ILLEGAL_MODE): Return zero (instead
 	of nonzero) if the parameter is the "special" idle mode.

Thu Jan 15 00:21:00 1998  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* serial.h: Changed `struct serial_s' to have `int isopen[16]'
 	instead of `int isopen'.  Now it can be checked for every
 	secondary address if the channel is open.

	* serial.c: Changed all checks of `isopen' in the serial struct to
 	use secondary address as index in `isopen[16]'.
	Removed some `#if 0' stuff.

	* parallel.c: Removed some `#if 0' stuff.

Tue Jan 20 22:25:38 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.20.

	* 6510core.c: Dispatch interrupts only after all the pending
	alarms have been served.

Mon Jan 19 22:05:44 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.19.

	* 6510core.c (DO_INTERRUPT): Copy parameter into a variable to
 	avoid cpp side effects.

Wed Jan 14 21:41:25 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.18.

	* c64/vicii.c: `ycounter_reset_checked' made static.

	* c64/vicii.c (draw_black_background, draw_black_background_2x):
	New functions.
	(video_resize): Use them instead of `draw_std_background' and
	`draw_std_background_2x' for the hires and illegal modes.
	New variable `force_black_overscan_background_color'.

Tue Jan 13 10:30:02 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* 6510core.c (do_interrupt): Converted to cpp macro and renamed to
	`DO_INTERRUPT()'.

	* include/vicii.h (VIC_II_IS_ILLEGAL_MODE): New macro.
	* c64/vicii.c (_draw_idle): Use it to check whether the video mode
 	is an illegal one.
	(set_video_mode): Set `overscan_background_color' properly,
 	according to the selected video mode.

	* raster.c (handle_visible_line_with_cache): Use
 	`overscan_background_color' instead of `background_color'.
	(handle_visible_line_without_cache): Likewise

	* include/raster.h: Member `background_color' of `struct
 	line_cache' renamed into `overscan_background_color'.
	New variable `overscan_background_color'.

Mon Jan 12 01:04:51 1998  Teemu Rantanen  <tvr@cs.hut.fi>

	* sid.c (print_voice): Made work with `-DWAVETABLES'.

	* sid.c (setup_sid): New warning if program uses filters and
	filters are disabled.

	* sid.c (init_sid): Argh.  `psid->emulatefilter' was set too late.
  	This broke filter -toggle from Ui -menus.

	* include/sid.h: New prototype `reset_sid()'.

	* sid.c (reset_sid): New routine.

	* maincpu.c (reset): Reset SID.

Sun Jan 11 00:55:16 1998  Andreas Boose  <boose@rzgw.rz.fh-hannover.de>

	* c64/vicii.c (int_rasterfetch): In case `FETCH_SPRITE', handle
 	wrap over of `memptr'.

Sat Jan 10 14:11:08 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* c64/vicii.c (store_vic): Fixed hiding of sprite whose X
	coordinate is > $1F8.

	* include/interrupt.h (steal_cycles, maincpu_steal_cycles): New
 	parameter `start_clk'.  Calculate `last_stolen_cycles_clk' from
        it.
	* c64/vicii.c (do_memory_fetch, int_rasterfetch): Callers updated.

Fri Jan  9 23:50:07 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.17.

	* Makefile.in (${BINDIR}/xvic): Link with `-lm'.

	* c64/vicii.c (int_rasterfetch): Do not bother calculating `sub'
	if `offset' is zero; just set it to zero as well.

	* 6510core.c: Instead of dispatching pending interrupts after each
 	alarm, dispatch all the alarms and then the interrupts.  Repeat
 	this until there are no more pending alarms left.
	(do_interrupt): New function; replaces the `DO_INTERRUPT()' cpp
 	macro.  It now serves all the kinds of interrupts enabled in the
 	passed parameter, except when IRQ and NMI are both enabled and
 	then it dispatches the NMI only.  I am not sure whether this is
 	correct, though.
	* maincpu.c (JAM): Use `do_interrupt()' instead of
 	`DO_INTERRUPT()'.
	* 1541cpu.c (JAM): Likewise.

Fri Jan  9 00:29:54 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* c64/vicii.c (draw_hires_sprite, draw_mc_sprite): Removed
 	`x_expanded' and `in_background' parameters.  They are now read
 	from the sprite array.
	(store_vic): Make sure sprites on X coordinates $1F8 - $1FF are
 	not visible and do not cause collisions.

Thu Jan  8 23:24:02 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.16.

	* c64/vicii.c (read_vic): Handle delay on line 0 for $D012 reads
 	correctly!
	(int_rasterfetch): Always set a new alarm after
 	`CHECK_SPRITE_DMA'.

Thu Jan  8 20:39:19 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.15.

	* Makefile.in (${C64_OBJS}): Enabled again.

	* raster.c (handle_visible_line_with_cache) [!__VIC_II__]: Do not
	set `background_color' in the cache for the current line.

Tue Jan  6 17:56:55 1998  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.14.

	* include/interrupt.h: New members `num_last_stolen_cycles' and
 	`last_stolen_cycles_clk' in `struct cpu_int_status'.
	(cpu_int_status_init): Initialize them.
	(prevent_clk_overflow): Handle them.
	(steal_cycles): New function.
	(set_irq, set_nmi): (Try to) handle delays correctly when cycles
 	have been stolen just before the call.
	* c64/vicii.c (do_memory_fetch, int_rasterfetch): Use
 	`maincpu_steal_cycles()' to steal CPU cycles.

Mon Jan  5 06:36:00 1998  Daniel Sladic  <sladic@eecg.toronto.edu>

	* drive.c (disk_import_zipfile): New function: creates a new disk
 	image and fills it with the contents from zipfiles [1!...,2!...,
 	etc.] using the `zcreate' command in c1541

	* drive.c (read_zipped_sector): New function: reads the next
 	sector in a zipfile image.

Sun Jan  4 22:25:22 1998  Andreas Boose  <boose@rzgw.rz.fh-hannover.de>

	* true1541.h: #define TRUE1541_ROTATE, so that it is enabled again
	by default.

	* true1541.c: #include "viad.h".
	(BYTE_READY_ACTIVE): New macro.
	(true1541_rotate_disk): If byte ready is not activated, just
	return.

Fri Dec 26 22:01:48 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* raster.c (handle_visible_line_with_cache): Handle
	`background_color'.  [__VIC_II__] Fix the color of the area
 	between the end of the left border and the start of the graphics
	when `xsmooth' is > 0.

	* include/raster.h: New member `background_color' in `struct
 	line_cache'.

Wed Dec 24 10:28:23 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/unix/ui_xaw.c, arch/unix/menu.h: Occurences of `SubMenu'
 	replaced with `Submenu'.

	* arch/unix/menu.h, arch/unix/ui_xaw.c: New menu items for
 	toggling filters and SID model.  Menu hierarchy reorganized.

	* arch/unix/ui_xaw.c (UiBuildPopupMenu, UiPositionSubMenuAction):
	Fixed to handle multilevel submenus properly.
	(UiSubMenuPopdownCallback): Likewise.

	* sid.c (init_sid): Set `newsid' and `emulatefilters' according to
	the app_resources.

	* resources.c [CBM64 || C128]: New resources `sidFilters' and
 	`sidModel', and corresponding command-line options.
	(resources_set_defaults): Set defaults for them.

	* Makefile.in (${BINDIR}/x64): Link with `-lm'.

Wed Dec 24 00:39:48 1997  Andreas Boose <boose@rzgw.rz.fh-hannover.de>

	* zfile.c: Added bzip v2 support.
	(try_uncompress_with_bzip, compress_with_bzip): New functions.
	(compress, try_uncompress): Add type `COMPR_BZIP'.

Tue Dec 23 19:20:49 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* c64/vicii.c (update_int_raster): Delay interrupts on line 0 by 1
	cycle.
	(read_vic): Emulate 1-cycle delay for line 0.

	* c64/vicii.c (store_d011): When switching from 24- to 25- line
 	mode in the last line of the lowmost 24-line mode border at cycle
 	> 0, turn screen blanking on.  When switching from 25- to 24- line
 	mode in the last line of the uppermost 25-line border at cycle >
 	0, turn screen blanking off.

Tue Dec 23 19:06:14 1997  Andreas Boose  <boose@rzgw.rz.fh-hannover.de>

	* c64/vicii.c (check_sprite_dma): Fixed handling of `exp_flag'
	when a new sprite DMA is activated.

Tue Dec 23 09:49:55 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* raster.c (emulate_line): Removed `ycounter' reset for non-VIC-II
	chips.
	(handle_end_of_frame): Moved here.

	* c64/vicii.c (int_rasterfetch): If the next fetch event has to be
 	dispatched immediately, avoid returning with a
 	`maincpu_set_alarm_clk' call, so that we save some time.

Mon Dec 22 13:46:11 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* c64/vicii.c (check_sprite_dma): Set the `exp_flag' according to
 	the value of the Y expansion bit.  $D015 tricks are still not
 	working correctly, though...

	* 6510core.c (RLA, RLA_IND_Y): Set `RMW_FLAG' to 0 when the opcode
 	is done executing.

	* cia-tmpl.c (store_mycia): Fixed kludge for latch writes during
 	timer underflows: set the counter value to the latch value only if
 	the timer is actually running (`CIAT_RUNNING').

	* configure.in: Make the `c64', `pet' and `vic20' directories
 	instead of `x64d', `xvicd', `xpetd'.

Mon Dec 22 13:26:32 1997  Teemu Rantanen  <tvr@cs.hut.fi>

	* sid.c: Comments.

Sat Dec 20 02:36:47 1997  Michael Schwendt  <sidplay@geocities.com>

	* sid.c (init_sid, setup_sid): Added floating pointer filter emulation.
	Can be turned off at run-time.
	(init_filter, dofilter): New functions.
	(struct voice_s): Touched.

	* sid.c (init_sid): Fixed initialization of wavetable30.  Moved
 	noise table initialization to a single loop.

Sun Dec 21 14:50:40 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.13.

	* c64/vicii.c (store_vic): Removed debugging message for
 	out-of-screen raster interrupts.
	(store_vic): Force an extra DMA check in case any $D015 (sprite
 	activation) bits are changed from 0 to 1 at cycle
 	`SPRITE_FETCH_CYCLE + 1'.
	(store_vic): If the Y coordinate of a sprite is changed at cycle
 	`SPRITE_FETCH_CYCLE + 1' and the new value matches the lower 8
 	bits of the raster line number, force a sprite DMA check.

Sat Dec 20 21:52:01 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* c64/vicii.c (check_sprite_dma): In case we have to enable DMA
 	for a new sprite, invert the expansion flag instead of setting its
 	value to the one of the sprite expansion bit.

Fri Dec 19 23:45:29 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* include/wave6581.h, include/wave8580.h: New files (grabbed from
	Michael's SIDplay sources).  Changed `ubyte' into `BYTE'.
	* sid.c: Removed `ubyte' #definition before #including wavetable
	header files.

Wed Dec 19 22:38:46 1997  Teemu Rantanen  <tvr@cs.hut.fi>

	Lots of changes inspired by SIDPLAY source code and email-exchange
 	with the author Michael Schwendt:
	* sid.c: Support for wavetables.  Implemented all waveforms.
	* sid.c (update_sid): Fix noise register value when hard sync
 	happens.
	(read_sid): Use oscillator value instead of rand() on 0x1b read if
 	noise waveform is used.
	(read_sid, store_sid, init_sid): Fixed write-only registers read.
	(setup_voice): Attempt to implement noise locking
	(when wavetables are used).

Wed Dec 19 03:59:57 1997  Michael Schwendt  <sidplay@geocities.com>

	* sid.c (init_sid, doosc): Moved parts of noise emulation to three
 	256 bytes long precalculated arrays. This saves a lot of shift
 	instructions.

Thu Dec 18 19:01:44 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.12.

	* 6510core.c (PLP): Handle the 1->0 transition of the I flag
 	correctly.

	* include/6510core.h (OPINFO_SET_DELAYS_INTERRUPT): Removed
	dangling `;' at the end of the macro.
	(OPINFO_SET_ENABLES_IRQ, OPINFO_SET_DISABLES_IRQ): Likewise.

Wed Dec 17 13:14:41 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.11.

	* 6510core.c (RTI): Never delay pending IRQs.

	* mon.c (mon_memdump, mon_disassemble): Fixed to make wrapping
 	around $FFFF work.

	* include/interrupt.h (force_interrupt_check): Always force a new
 	alarm even if there is already one pending.
	(_A_FORCE_INT_CHECK): New constant `_A_FORCE_INT_CHECK'.  Replaced
 	use of -1 as the alarm id with this one.

Mon Dec 15 11:45:27 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* configure.in: Append the contents of `X_CFLAGS' to `CPPFLAGS',
 	so that header tests check in the X11 directories.

	* arch/unix/ui_xaw.c (UiOpenCanvasWindow, UiBuildPopupMenu):
 	Pop-up menu translations modified so that they work with NumLock
 	turned on too.

	* c64/vicii.c (draw_all_sprites_2x): Clear the `sprline' correctly.

Sun Dec 14 12:05:38 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.10.

	* Makefile.in (VICEMISC): `cia1.def' and `cia2.def' moved from
	`VICEMISC' to `C64SRC'.
	`via1.def' and `via2.def' moved from `VICEMISC' to `VIC20SRC'.
	`viap.def' moved from `VICEMISC' to `PETSRC'.
	`viad1.def' and `viad2.def' moved to `VICESRC'.

	* include/interrupt.h (check_pending_interrupt): If the last
 	executed opcode has enabled previously disabled IRQs, IRQ is not
 	executed.

	* 6510core.c (OPCODE_DISABLES_IRQ, OPCODE_ENABLES_IRQ): New macro.
	(SEI): If the interrupt flag was previously 0, use
 	`OPCODE_DISABLES_IRQ()' to remember that.
	(CLI, RTI, PLP): If the interrupt flag was previously 1 and now
 	becomes 0, use `OPCODE_ENABLES_IRQ()' to remember that.
	(DO_INTERRUPT): If an IRQ is pending and the last opcode disabled
 	IRQs (i.e. changed the I flag from 0 to 1), dispatch it even if
 	the I flag is now 1.

	* include/6510core.h (OPINFO_SET): New parameters `disables_irq'
 	and `enables_irq'.  Callers updated.
	(OPINFO_DISABLES_IRQ, OPINFO_SET_DISABLES_IRQ): New macros.
	(OPINFO_ENABLES_IRQ, OPINFO_SET_ENABLES_IRQ): New macros.
	(OPINFO_SET_DELAY): Renamed to `OPINFO_SET_DELAYS_INTERRUPTS'.

	* 6510core.c (BRANCH): Delay interrupts only if branch is taken
 	within the same page.

	* drive.c (detach_floppy_image): Message changed from ``Detaching
	floppyimage'' to ``Detaching disk image''.

	* 1541cpu.c (LAST_OPCODE_INFO): #define `LAST_OPCODE_INFO' instead
	of `LAST_OPCODE'.

Fri Dec 12 22:24:12 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* c64/vicii.c (store_vic): First try to implement 1->0 transitions
	of sprite expansion bits at cycle 15 correctly...  I am not sure
	this is 100% correct, though.

	* mon.c (mon_save): Added newline character in the ``Saving
 	file...''  message.

	* Makefile.in (dist): Make the `c64', `vic20' and `pet'
	directories under `src', not under the toplevel directory.

Fri Dec 12 21:35:55 1997  Jouko Valta  <jopi@stekt.oulu.fi>

	* mon.c: New #defines (`BAD_CORE_FORMAT', `BAD_CORE_IO' and
 	`BAD_CORE_CPU') for dump/undump return values.  Enable dumping
 	commands if `VICE_DUMP' is #defined.
	(undump): If file cannot be opened or ram dump cannot be read,
 	return `BAD_CORE_FORMAT'.
	(mon_undump): Tell the user whether the operation was successfull
 	depending on the return value of `undump()'.
	(mon_down, mon_up): Show registers and print a message telling the
 	user that she has gone down (up) the stack.
	(mon): Print a message before returning.

	* memutils.c (create_name): If `path' is NULL, return `name'.

Fri Dec 12 21:30:31 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/unix/readline/sysunix.c: #define _POSIX_C_SOURCE before
	#include <termios.h> (patch for Solaris 2.x).

Wed Dec 10 16:58:18 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.9.

	* include/interrupt.h: New member `last_opcode_info_ptr' in
 	`cpu_int_status'.
	(check_pending_interrupt) [INTERRUPT_DELAY != 0]: Use it to check
 	whether we must delay the interrupt by one cycle.
	(cpu_int_status_init): New parameter `last_opcode_info_ptr':
 	assign its value to the corresponding member in the struct.
	Callers updated.

	* 1541cpu.c: New variable `true1541_last_opcode_info'.  #define
 	`LAST_OPCODE' to it.

	* maincpu.h, maincpu.c, 1541cpu.h, interrupt.h: #include
 	"6510core.h".

	* 6510core.c: If `LAST_OPCODE_INFO' is #defined, #define
 	`OPCODE_DELAYS_INTERRUPT' to delay the interrupt by one cycle.
  	Otherwise, #define it to empty.
	(BRANCH): If the branch is taken, use `OPINFO_DELAYS_INTERRUPT' to
	delay the interrupts.

	* include/6510core.h: New file.

	* include/maincpu.h: Declare `last_opcode_info' for all the
 	machines.

	* maincpu.c, maincpu.h: Renamed `last_opcode' into
 	`last_opcode_info'.  This variable is now used to remember whether
 	the last opcode causes the interrupts to be delayed by one cycle.
	(This happens with conditional branch instructions when the branch
 	is taken.)
	* 6510core.c: Renamed `LAST_OPCODE' into `LAST_OPCODE_INFO'

Tue Dec  9 19:53:56 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.8.

	* Makefile.in (%.o): Brought back in, with `%.c' as the
 	dependence.

	* Makefile.in: Added `-I$(SRCDIR)' to `INCLUDES' so that
 	`raster.c' can be included properly by emulator-specific files.

	* vicii.c: Moved to `c64/vicii.c'.
	* vic.c: Moved to `vic20/vic.c'.
	* crtc.c: Moved to `pet/crtc.c'.
	* Makefile.in: Updated accordingly.

	* maincpu.c: Make `last_opcode' available on VIC20 and PET too.

Thu Dec  9 19:22:40 1997  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* c64/c64mem.c: #define CBM64 to make mkdep work correctly.
	* pet/c64mem.c: Likewise, #define PET.
	* vic20/vic20mem.c: Likewise, #define VIC20.

	Some emulator-specific files moved to separate directories (`c64',
	`vic20', `pet').
	* cia1.def, cia1.c, cia2.def, cia2.c, c64mem.c: Moved to `c64'.
	* via1.def, via1.c, via2.def, via2.c, vic20mem.c: Moved to
	`vic20'.
	* viap.def, petmem.c: Moved to `pet'.
	* via.c: Moved to `pet' and renamed to `viap.c'.
	* Makefile.in: Updated accordingly.
	* configure.in: Make emulator directories when not compiling from
	the source directory.

	* convio: New file.
	* convvia, convcia: Removed.
	* cia1.def, cia2.def: Added definitions for `mycpu', `myclk' and
	`mycia'/`MYCIA' to be used with the new `convio' script.
	* via1.def, via2.def, viad1.def, viad2.def, viap.def: Likewise
	with `myvia'/`MYVIA'.

Thu Dec  9 19:10:42 1997  Andreas Boose  <boose@rzgw.rz.fh-hannover.de>

	* 6510core.c [__1541__]: Update VFLAG on PHP too.  Do not change
 	VFLAG if disk controller is off.

	* true1541.c (true1541_update_zone_bits): New function for setting
 	speed according to the zone bits of VIA2 PRB.

	* viad2.def (STORE_PRB): Call true1541_update_zone_bits whenever
 	zone bits are changed.

Sun Dec  8 22:54:01 1997  Daniel Sladic  <sladic@eecg.toronto.edu>

	* viad2.def (STORE_PCR): Handle read/write mode change for
 	rotation.

	* true1541.c (true1541_rotate_disk) [!TRUE1541_ROTATE]: Move
 	handling of `finish_byte' so backed up bytes are handled on the
 	right side of a mode change.

	* true1541.c [!VIC20]: Allow compilation for VIC20 by disabling
 	`FAST_BUS'.

	* true1541.c: #include "viad2.h" to explicitly declare
 	`read_viaD2()'.

Mon Dec  8 21:13:00 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.7.

	* include/interrupt.h (check_pending_interrupt): Delay by one more
 	cycle if the last opcode was a conditional branch.

	* vicii.c (set_memory_ptrs): Fixed timing for vbank changes
	according to Andreas' tests.

Sun Dec  7 15:45:05 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.6.

	* cia-tmpl.c (store_mycia): Implemented (hopefully) correct
 	behavior when writing to the timer latches during an underflow.
  	At least, this makes Andreas' CIA Timer A test suite happy.

	* vicii.c (store_d011): Set `draw_idle_state' to 0 when switching
 	from idle to display state before the start of the line and when
 	switching from display to idle after cycle 0.

Fri Dec  5 21:55:19 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* misc.c (sprint_disassembled): Display the opcode number at the
 	left of the mnemonic.

	* include/misc.h (eff_address): Do not prototype `strndup'.

	* 6510core.c (NOOP_ABS): New macro for handling extra read
 	accesses in NOOP opcodes correctly.
	(NOOP_ABS_X): Handle extra read accesses.

	* configure.in: When not using GCC, do not prepend the initial
	value of `CFLAGS' when setting the new `CFLAGS'.

Thu Dec  4 22:20:41 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.5.

Thu Dec  4 19:02:10 1997  Daniel Sladic  <sladic@eecg.toronto.edu>

	* true1541.c (true1541_read_disk_byte) [!TRUE1541_ROTATE]: Do not
	increment `head_ptr'.

Thu Dec  4 18:59:41 1997  Andreas Boose  <boose@rzgw.rz.fh-hannover.de>

	* sid.c (read_sid): Write-only registers return zero.

Wed Dec  3 21:27:27 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* cia-tmpl.c (store_mycia): When writing to the timer latches,
 	update the chip status up to the clock preceding the current one.

	* Makefile.in (%.o): Removed.

Mon Dec  1 17:19:12 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* cia2.def (STORE_CIAPA): Always call `mem_set_vbank', do not care
	whether the video bank has actually changed or not.

	* vicii.c (vic_ii_set_vbank): Also dispatch `I_RASTERDRAW' if
 	necessary.  Do not try to optimize if the new bank is the same as
 	the old one anymore.
	(set_memory_ptrs): Not inlined anymore.

	* cia-tmpl.c (reset_mycia): Initialize the latches to 0xffff
	instead of 0x1.  Maybe we have found the correct values at
	last...?

	* zfile.c: Do not #define `PATH_MAX' anymore.

	* resources.c (make_backup_file_name): New version: returns a
 	malloced string instead of the address of a statically allocated
 	one.
	(resources_save): Adapted to the new version of
 	`make_backup_file_name'.

Sun Nov 30 00:42:32 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.4.

	* 1541cpu.c: New variable `true1541_traceflg'.  New #defined
	option `TRACE'.
	* 6510cpu.c [TRACE && __1541__]: Trace 1541 instructions if
	`true1541_traceflg' is non-zero.

	* true1541.c: Handling of IEC bus made faster (warning: it does
	not work with VIC20 yet!).

	* raster.c (resize): Corrected resizing when pixel size is larger
 	than 1x1.

Sat Nov 29 14:56:23 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* true1541.c: Removed unused variable `idlecount' and all the
 	assignments to it.

	* cia2.def (READ_CIAPA, READ_CIAPB, STORE_CIAPA): Made (slightly)
 	more efficient.

	* configure.in: Do not check for `mmap' anymore.

Sat Nov 29 11:59:51 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.3.

	* arch/unix/ui_xaw.c (UiFileSelect): Call `concat' correctly.

	* utils.c (concat): Put the missing `\0' at the end of the string.

Sat Nov 29 11:27:29 1997  Daniel Sladic  <sladic@eecg.toronto.edu>

	Exact emulation of disk rotation (experimental and untested).
	* true1541.c: New static variables `byte_ready',
 	`GCR_write_value', `rot_speed_bps'.
	(true1541_rotate_disk): New function.
	(true1541_read_disk_byte) [TRUE1541_ROTATE]: Update the disk motor
 	position and return the value that is currently under the head.
	(true1541_byte_ready): New function.
	(true1541_sync_found) [TRUE1541_ROTATE]: Return the value
	according to the exact position of the disk motor.
	(true1541_write_gcr) [TRUE1541_ROTATE]: Rotate the disk and set
	`GCR_write_value' to the value of the byte to write.
	* viad2.def (STORE_PRA) [TRUE1541_ROTATE]: Update the drive motor
	position before writing the GCR byte.
	* 6510core.c [__1541__ && TRUE1541_ROTATE]: In the main opcode
 	switch(), BVC and BVS update the disk motor position and set the
 	overflow bit if one byte is ready, and then branch according to
 	its value.
	(LOCAL_SET_OVERFLOW) [__1541__ && TRUE1541_ROTATE]: Update the
 	disk motor position and set byte ready to 0 before actually
 	setting the overflow bit.

Sat Nov 29 00:25:17 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* cia-tmpl.c (store_mycia): Fixed bug when latches are zero: when
 	emulating the 1-cycle delay for counter stop, check whether the
 	timer counter is > 0 before decrementing it.

Fri Nov 28 20:50:17 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.2.

	* arch/unix/ui_xaw.c (UiInitFinish): Set the `WM_COMMAND' property
 	in the newly created toplevel, copying the value from the old one.

	* include/vicii.h: Define VIC-II's black color as really black.

	* Makefile.in: Removed petlp-related stuff.

	* resources.c (resources_set_defaults): Set the `CharName'
	resource to the value of the `CHARNAME' constant.

	* c64mem.c, vic20mem.c, petmem.c: Declare `chargen_rom' here.
	* c64mem.c, vic20mem.c, petmem.c (mem_load): Always load the
 	character generator ROM from the file specified in the `CharName'
 	resource.

	* char.c: Removed.
	* Makefile.in: Removed `char.c' from `VICESRC', and corresponding
 	object files from `C64_OBJS', `PET_OBJS' and `VIC20_OBJS'.  Added
 	the chargen ROM image `chargen' to the lists of ROM files
 	(`C64ROMS', `VIC20ROMS', `PETROMS').

	* true1541.c (initialize_true1541, true1541_enable): Return type
 	changed to int.  Return -1 on error, 0 on success.
	(true1541_enable): Before doing the rest, try to initialize the
 	true 1541 emulation.  If not successful, return -1 and explicitly
 	turn true 1541 emulation off.

Fri Nov 28 20:39:48 1997  Giuliano Procida  <gpp10@cam.ac.uk>

	* include/true1541.h: New constant `TRUE1541_ROM_CHECKSUM'.
	* true1541.c (initialize_true1541): Calculate ROM checksum and
	make sure it's correct.

Thu Nov 27 12:40:31 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.13.0.1.

	* arch/unix/ui_xaw.c (UiInitFinish): Realize the top-level widget,
 	but give it a 1x1 size and make it invisible by setting
 	`mappedWhenManaged' to False.

	* arch/unix/ui_xaw.c (UiOpenCanvasWindow): Name the shell widget
	with the title of the window.

	* arch/unix/kbdef.h [PET]: Made Shift-Tab actually work by using
 	the `XK_ISO_Left_Tab' keysym.  Changed keyboard mapping: Tab->Tab,
 	LeftAlt->RVS, RightControl->RPT.  8032 and 4032 mappings made more
	similiar.

	* configure.in: New arg `--with-xaw3d', so that we use Xaw3d only
	if the user want us to.

	* raster.c (resize) [!SCREEN_BORDERWIDTH_VARIES]: Changed resize
 	policy.  The graphics area between the borders is now always
 	centered in the window.

Wed Nov 26 18:28:00 1997  Ettore Perazzoli  <ettore@comm2000.it>

	* include/crtc.h: Changed screen constants.
	* crtc.c (crtc_init): Set `display_ystart' and `display_ystop'
 	accordingly.

	* Makefile.in: All the non-html files now have no extension.

	* arch/unix/ui_xaw.c (UiDispatchNextEvent): New function.
	(UiError, UiMessage, UiJamDialog, UiPopup): Use
 	`UiDispatchNextEvent' instead of `UiDispatchEvents' when waiting
	for user's reaction.
	(UiFileSelect, UiInputString, UiInfo, UiTogglePause): Likewise.

	* arch/unix/ui_xaw.c (UiFileSelect): Do not use statically
 	allocated arrays anymore.  Use `get_current_dir' instead of
 	`getcwd'.

	* main.c (preserve_workdir) [__MSDOS__]: Pass -1 as the buffer
	length to `getcwd' so that it allocates as much space as needed
	(GNU extension!).

	* zfile.c (zfile_list_add) [!__MSDOS__]: Completion of the file
 	name with the path made safe.  Moreover, it uses `get_current_dir'
 	instead of `getcwd'.

	* utils.c (concat): New version: it now concatenates an arbitrary
	number of strings.  All callers updated.

	* utils.c (get_current_dir): New function.

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 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.

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'.

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  Andr 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  Andr 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  Andr 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  Andr 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.
