1999-04-24  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 1.0.

	* arch/msdos/menudefs.c (attach_disk_callback): Also show
	compressed files.
	(attach_tape_callback): Likewise.

1998-04-24  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* rsuser.h (rsuser_enabled): make the variable prototype "extern"...

1999-04-22	Andreas Dehmel  <dehmel@forwiss.tu-muenchen.de>

	* arch/riscos/*: fixed some full screen problems.

	* arch/riscos/petdummy.c: removed some dummy functions now
	provided by standard source tree.

1999-04-22  Dag Lem  <resid@nimrod.no>

	* arch/unix/xaw/uicommands.c: Replaced `#ifdef USE_RESID' with `#ifdef
 	HAVE_RESID'.
	* arch/msdos/menudefs.c: Likewise.

1999-04-22  Tibor Biczo  <crown@mail.matav.hu>

	* arch/win32/ui.c: Include <commctrl.h> only when compiling
	  with MSVC. This is only needed because of some buggy
	  outdated Mingw headers are still in use. :)

1999-04-22  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.62.

1999-04-21  Tibor Biczo  <crown@mail.matav.hu>

	* Makefile.am (EXTRA_DIST): Added c1541.dsp, petcat.dsp, x128.dsp,
	  x64.dsp, xcbm2.dsp, xpet.dsp, xvic.dsp.

	* arch/win32/Makefile.am (EXTRA_DIST): Added msvc/config.h, arch.dsp.

	* arch/win32/arch.dsp: New file. MSVC project file for Win32 arch
	  library.

	* arch/win32/archdep.c: Include <stdio.h>. Don't include <dir.h> when
	  compiling with MSVC. Don't include <unistd.h> when compiling with
	  MSVC.

	* arch/win32/joystick.c (joystick_handle_key): Make compiler happy and
	  put ';' to default case into switch.

	* arch/win32/msvc/config.h: New file. Configuration file to use when
	  compiling with MSVC.

	* arch/win32/res/rc: MSVC resource compiler doesn't like spaces
	  between concatenated Strings, removed space.

	* arch/win32/ui.c: Include <commctrl.h>.
	  (UI_COMMON_HOTKEYS, c64_accel): MSVC doesn't have VK_* defines,
	  replaced them with keycodes.
	  (clear): New function. Clears window areas which are outside of
	  the framebuffer.
	  (window_procedure): Call exposure_handler in WM_SIZE.
	  Complete rewrite of WM_PAINT handling. Now if dialog boxes are
	  moved, the underlying emulator screen updates correctly.

	* arch/win32/uiattach.c (ui_attach_dialog): Use unnamed union members
	  when compiling with MSVC.

	* arch/win32/uicbm2set.c (ui_cbm2_settings_dialog): Use unnamed union
	  members when compiling with MSVC.

	* arch/win32/uidrive.c (ui_drive_settings_dialog): Use unnamed union
	  members when compiling with MSVC.

	* arch/win32/uipetset.c (ui_pet_settings_dialog): Use unnamed union
	  members when compiling with MSVC.

	* arch/win32/uivicii.c (ui_vicii_settings_dialog): Use unnamed union
	  members when compiling with MSVC.

	* arch/win32/video.c (main_fbuff): New variable to store framebuffer
	  pointer.
	  (frame_buffer_alloc): Save pointer to allocated framebuffer.
	  (main_canvas): New variable to store canvas pointer.
	  (canvas_create): Save pointer to created canvas.
	  (canvas_refresh): Method changed. It only invalidates the modified
	  rectangle, this generates WM_PAINT calls, and the message process
	  function will put the changed grpahic data to the screen through
	  canvas_render.
	  (canvas_render): New function, actually it takes over what
	  canvas_refresh done before. Use unnamed unions when compiling with
	  MSVC.

	* arch/win32/video.h: Export main_fbuff, main_canvas and canvas_render.

	* arch/win32/winmain.c (ParseCommandLine): New function. Generates
	  argc, argv when compiling with MSVC.

	* c128/Makefile.am (EXTRA_DIST): Added c128.dsp.

	* c128/c128.c: Don't include <unistd.h> when compiling with MSVC.

	* c128/c128.dsp: New file. MSVC project file for c128 library.

	* c128/c128iec.c (iec_update_ports_embedded): New function. Embeds
	  iec_update_ports for extarnal calls.

	* c1541.c: Don't include <unistd.h> when compiling with MSVC.

	* c1541.dsp: New file. MSVC project file for c1541.

	* c64/Makefile.am (EXTRA_DIST): Added c64.dsp, c64c128.dsp.

	* c64/c64.c: Don't include <unistd.h> when compiling with MSVC.

	* c64/c64.dsp: New file. MSVC project file for c64 library.

	* c64/c64c128.dsp: New file. MSVC project file for c64c128 library.

	* c64/c64iec.c (iec_update_ports_embedded): New function. Embeds
	  iec_update_ports for external calls.

	* cbm2/Makefile.am (EXTRA_DIST): Added cbm2.dsp.

	* cbm2/c610.c: Don't include <unistd.h> when compiling with MSVC.

	* cbm2/c610iec.c (iec_update_ports_embedded): New fucntion. Embeds
	  iec_update_ports for external calls.

	* cbm2/cbm2.dsp: New file. MSVC project file for cbm2 library.

	* drive/Makefile.am (EXTRA_DIST): Added drive.dsp.

	* drive/drive.c: Don't include <unistd.h> when compiling with MSVC,
	  include <sys/types.h> instead.

	* drive/drive.dsp: New file. MSVC project file for drive library.

	* findpath.c: Don't include <unistd.h> when compiling with MSVC.

	* findpath.h: Don't include <unistd.h> when compiling with MSVC.

	* fsdevice.c: Don't include <unistd.h> when compiling with MSVC.

	* iecdrive.h: Removed export of iec_update_ports, added export of
	  iec_update_ports_embedded.

	* mon.c: Don't include <unistd.h> when compiling with MSVC.

	* pet/Makefile.am (EXTRA_DIST): Added pet.dsp.

	* pet/pet.c: Don't include <unistd.h> when compiling with MSVC.

	* pet/pet.dsp: New file. MSVC project file for pet library.

	* pet/petiec.c (iec_update_ports_embedded): New function. Embeds
	  iec_update_ports for external calls.

	* petcat.dsp: New file. MSVC project file for petcat.

	* raster.c: Don't include <unistd.h> when compiling with MSVC.
	  (framebuff_width, framebuff_height) New variables to store
	  framebuffer dimensions.
	  (init_raster): Store framebuffer dimensions.
	  (translate_client_to_framebuffer): New function. Needed for the
	  Win32 port. Translates client window coordinates into framebuffer
	  coordinates.

	* sid/Makefile.am (EXTRA_DIST): Added sid.dsp.

	* sid/resid.cc: Moved include of system headers outside of
	  extern "C".

	* sid/sid.dsp: New file. MSVC project file for sid library.

	* snapshot.c: Don't include <unistd.h> when compiling with MSVC.

	* sounddrv/Makefile.am (EXTRA_DIST): Added sounddrv.dsp.

	* sounddrv/sounddrv.dsp: New file. MSVC project file for sounddrv
	  library.

	* sounddrv/sounddc.c (HandleNotifications, TimerCallbackFunction):
	  Corrected casting when getting last_played_sample.

	* tape.c: Don't include <unistd.h> when compiling with MSVC.

	* types.h: Define DWORD as unsigned long when compiling with MSVC.

	* utils.c: Don't include <unistd.h> when compiling with MSVC.

	* vdrive-iec.c: Don't include <unistd.h> when compiling with MSVC.

	* vdrive.c: Don't include <unistd.h> when compiling with MSVC.

	* vic20/Makefile.am (EXTRA_DIST): Added vic20.dsp.

	* vic20/vic20.c: Don't include <unistd.h> when compiling with MSVC.

	* vic20/vic20.dsp: New file. MSVC project file for vic20 library.

	* vic20/vic20iec.c (iec_update_ports_embedded): New function. Embed
	  iec_update_ports for external calls.

	* vice.h: When compiling with MSVC define alloca as _alloca.

	* vicii/Makefile.am (EXTRA_DIST): Added vicii.dsp.

	* vicii/vicii.dsp: New file. MSVC project file for vicii library.

	* x128.dsp: New file. MSVC project file for x128.

	* x64.dsp: New file. MSVC project file for x64.

	* xcbm2.dsp: New file. MSVC project file for xcbm2.

	* xpet.dsp: New file. MSVC project file for xpet.

	* xvic.dsp: New file. MSVC project file for xvic.

	* zfile.c: Don't include <unistd.h> when compiling with MSVC.

	* zipcode.c: Don't include <unistd.h> when compiling with MSVC.

1999-04-20	Andreas Dehmel  <dehmel@forwiss.tu-muenchen.de>

	* arch/riscos/*: added support for full screen mode.

	* drive.c: replaced puts() statement with call to log_warning()

1999-04-19  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.61.

	* arch/msdos/menudefs.c: Fixed shortcuts for drive type menu.

	* arch/msdos/menudefs.c, arch/msdos/menudefs.h,
	arch/msdos/c64ui.c: Some ROM set stuff.

1998-04-19  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* pet/petsound.c (petsnd_reset): call sound_reset
	(sound_machine_reset): new function

	* sid/resid.h, sid/resid.cc (resid_sound_machine_reset): new function
	and prototype

	* sid/sid.c (sid_reset): call sound_reset
	(sound_machine_reset): new function

	* sound.c (sound_reset): new function. calls sound_machine_reset
	when psid pointer available

	* sound.h (sound_reset, sound_machine_reset): new prototypes

	* vic20/vic.c (store_vic): replace store_sound with store_vic_sound

	* vic20/vic20.c (machine_reset): replace sound_reset with 
	sound_vic_reset

	* vic20/vic20sound.c (sound_vic_reset): renamed from sound_reset,
	call new sound_reset function
	(store_vic_sound); renamed from store_sound
	(sound_machine_reset): new function

	* vic20/vic20sound.h (store_sound, sound_reset): removed prototypes
	(store_vic_sound, vic_sound_reset): new prototypes

1999-04-18  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.60.

	* arch/unix/xaw/c64ui.c, arch/win32/resc64.rc,
	arch/win32/resc128.rc, arch/win32/resvic.rc, arch/win32/respet.rc,
	arch/win32/rescbm2.rc, arch/msdos/menudefs.c: Changed "datasette"
	into "datassette".

	* drive/drive.h: Increased timeout values for detaching and
	attaching a disk image.

	* maincpu.c (clk_overflow_callback): Removed debugging output.

1998-04-15  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* c64/c64tpi.def (READ_PA, READ_PB): add "clk" parameter to 
	drive*_cpu_execute
	* cbm2/c610tpi1.def (READ_PA): likewise
	* pet/petpia1.def (READ_PA): likewise
	* pet/petpia2.def (READ_PA): likewise

1999-04-13  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.59.

	* maincpu.c (maincpu_init): Set proper clock overflow value.
	* drive/drivecpucore.c (mydrive_cpu_early_init): Likewise.

	* drive/drivecpucore.c, drive/drivecpu0.c, drive/drivecpu1.c,
	drive/drivecpu.h (mydrive_cpu_reset_clk): New function.

	* drive/drive.c (set_drive_true_emulation): Reset maincpu<->
	drive clock coupling.

1999-04-13  Tibor Biczo  <crown@mail.matav.hu>

	* arch/win32/Makefile.am: Changed resource file extensions from
	  .r to .rc, to avoid clash with automake 1.4, who thinks that
	  it is a Fortran extension. Also this conforms to the MSVC
	  standard.

	* arch/win32/res.rc arch/win32/resc128.rc arch/win32/resc64.rc
	  arch/win32/rescbm2.rc arch/win32/respet.rc arch/win32/recvic.rc:
	  Changed file extensions from .r to .rc . Chaged inclusion of
	  'res.r' to 'res.rc'.

1998-04-13  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* drive/drivecpu0.c (MYCPU_NAME): new define to "DRIVECPU0"
	* drive/drivecpu1.c (MYCPU_NAME): new define to "DRIVECPU1"

	* drive/drivecpucore.c (snap_module_name): use MYCPU_NAME

1999-04-12  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.58.

	* vic20/vic20.c (machine_init): Check for successful VIC
	initialization.

	* arch/unix/xaw/uicommands.c (read_disk_image_contents): Destroy
	image contents struct.
	(read_tape_image_contents): Changed likewise.

	* drive/drivecpucore.c (mydrive_cpu_prevent_clk_overflow): Removed
	debugging code.
	* maincpu.c (clk_overflow_callback): Likewise.

1998-04-12  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* palette.c (palette_load): do not call get_line() within the
	while condition. Seems to be a bug in DEC cc.

1998-04-12  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* data/PET/*.vkm: allow space being unshifted _and_ shifted
	* data/CBM-II/busi_uk.vkm: likewise

1999-04-12  Martin Pottendorfer  <pottendo@attie9.aut.alcatel.at>

	* imagecontents.c (image_contents_destroy): Fixed segfault on
	broken `testdisk.d64' image.

1999-04-11  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.57.

	* arch/unix/xaw/uicommands.c, arch/unix/xaw/c64ui.c: Move
	datasette menu to C64 specific UI.

	* arch/win32/resc128.r, arch/win32/resvic.r, arch/win32/respet.r,
	arch/win32/rescbm2.r: Removed datasette menu.

	* arch/msdos/menudefs.c, arch/msdos/c64ui.c, arch/msdos/c128ui.c,
	arch/msdos/vic20ui.c, arch/msdos/petui.c, arch/msdos/c610ui.c,
	arch/msdos/menudefs.h: Datasette is available for C64 only.

1999-04-11  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.56.

	* drive/drivecpucore.c (mydrive_cpu_init): Moved initialization
	of the VIA, CIA and WD1770 to `mydrive_cpu_early_init'.

1998-04-10  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* ciacore.c (clk_overflow_callback): assume myclk has already 
	been updated to the new value
	(mycia_reset): set cia_read_clk to 0

	* maincpu.c (maincpu_reset): set clk to new value _before_ calling
	machine_reset().

1998-04-09  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* interrupt.c (cpu_int_status_time_warp): check whether subsctracting
	"sub" gives an underflow on irq_clk and nmi_clk and handle that.

1999-04-09  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.55.

	* clkguard.c (clk_guard_prevent_overflow): Fixed calculation of
	the `sub' value.

1998-04-08  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* arch/unix/kbd.c (kbd_event_handler): Ignore key events when 
	keymap is not loaded.

1999-04-07  Andreas Dehmel  <dehmel@forwiss.tu-muenchen.de>

	* arch/riscos/*: fixed Andre's acia-fixes, double-clicking on
	  imagecontents-file autostarts it, added datasette support, several
	  small updates.

	* ciatimer.c: additional include for varargs.

	* pruser.c, rsuser.c, rs232.h, print.h: removed remaining occurrances
	  of file_desc_t and ILLEGAL_FILE_DESC.

1998-04-07  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* arch/unix/kmap.c (set_keymap_file): fix "brown paper bag" type typo

1998-04-06  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* data/PET/Makefile.am: add chargen.de and busi_de.vkm to file lists

	* data/PET/busi_de.vkm: new file, contributed by U. Guettich
	Now uses busi_uk.vkm as template and does only changes.

	* data/PET/busi_uk.vkm: fix some keys

	* data/PET/graphics.vkm: fix some keys

	* data/PET/posg_de.vkm: fix some keys

	* doc/vice.texi: update docs on PET keymap resources/options/ROM names.

	* arch/unix/kmap.c (NUM_KEYBOARD_MAPPINGS): new define to limit
	the number of keymap file entries
	(set_keymap_file): check range.
	* arch/unix/petkmap.c: likewise

	* arch/unix/petkmap.c (my_keymap_res_name_list, keymap_file_list):
	add German keymap files
	(set_keymap_gr_sym_file, set_keymap_gr_pos_file,
	set_keymap_buk_sym_file, set_keymap_buk_pos_file): fix keymap index
	(set_keymap_bde_sym_file, set_keymap_bde_pos_file): new functions
	(resources). fix keymap index, add German keymap resources.
	(cmdline_options): add German keymap options.

	* arch/unix/xaw/petui.c (pet_keybd_submenu): add German keymap entry
	(radio_ChargenName): new callback to set ChargenName resource
	(pet_romset_submenu): add entries to load Original or German 
	charset.

1999-04-05  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.54.

	* drive/drivecpucore (mydrive_cpu_init): Removed alarm
	initialization as this is already done in
	`mydrive_cpu_early_init'.

1998-04-05  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* ciatimer.h (ciat_reset): remove timer alarm on reset.

1999-04-05  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/unix/print.c (set_devbaud): `#if 0'ed out.

1999-04-04  Ettore Perazzoli  <ettore@comm2000.it>

	* drive/drive.c (drive_vsync_hook): Pass `clk' as the parameter
	for the `driveX_cpu_execute()' functions.
	* c64/c64.c (machine_write_snapshot): Likewise.
	* c64/c64cia2.c (read_ciapa): Likewise.
	(read_ciaicr): Likewise.
	* c64/c64iec.c (iec_cpu_write_conf1): Likewise.
	(iec_cpu_write_conf2): Likewise.
	(iec_cpu_write_conf3): Likewise.
	(iec_cpu_read): Likewise.
	(parallel_cable_cpu_write): Likewise.
	(parallel_cable_cpu_read): Likewise.
	(parallel_cable_cpu_pulse): Likewise.
	* c64/c64tpi.c (read_tpi): Likewise.
	* cbm2/c610tpi1.def (READ_PA): Likewise.
	* cbm2/c610cia1.c (read_ciapa): Likewise.
	* pet/petvia.c (read_prb): Likewise.
	* pet/petpia2.c (read_pia2): Likewise.
	* pet/petpia1.c (read_pia1): Likewise.
	* vic20/vic20iec.c (iec_pa_read): Likewise.
	(iec_pa_write): Likewise.
	(iec_pcr_write): Likewise.
	* c128/c128iec.c (iec_cpu_write_conf1): Likewise.
	(iec_cpu_write_conf2): Likewise.
	(iec_cpu_write_conf3): Likewise.
	(iec_cpu_read): Likewise.
	(iec_fast_cpu_write): Likewise.
	(parallel_cable_cpu_write): Likewise.
	(parallel_cable_cpu_pulse): Likewise.
	(parallel_cable_cpu_read): Likewise.
	* c128/c128cia1.c (read_ciaicr): Likewise.

	* drive/drivecpucore.c (mydrive_cpu_execute): New parameter
	`clk_value'.  Use it instead of `clk'.
	* drive/drive.c (drive_cpu_execute): Likewise.

	* drive/drive.c (drive0_clk_overflow_callback): Removed.
	(drive1_clk_overflow_callback): Removed.
	(drive_clk_overflow_callback): New function.  Operates on drive 1
	or on drive 0 according to the passed `data' parameter.  Moreover,
	it properly warps time in the alarm context and CPU int status.
	(drive_init): Updated to use `drive_clk_overflow_callback()' with
	different callback data instead of `drive0_clk_overflow_callback()'
	and `drive1_clk_overflow_callback()'.
	(drive_prevent_clk_overflow): Return the number of cycles
	subtracted.

1999-04-04  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.53.

	* fliplist.c (flip_set_current): Copy filename instead of just
	referencing it because on win32 the filename is already invalid
	when `flip_add_image' is called.

	* arch/win32/res.h, arch/win32/resc64.r, arch/win32/resc128.r,
	arch/win32/resvic.r, arch/win32/rescbm2.r, arch/win32/respet.r,
	arch/win32/ui.c: Added flip list support.

	* rsuser.c, rsuser.h: Adapted to new overflow handling.

	* drive/viad.h, vic20/vic20via.h, pet/petvia.h: Removed unused
	prototypes.

	* drive/drivecpucore.c, drive/drivecpu0.c, drive/drivecpu1.c,
	drive/drivecpu.h (mydrive_cpu_early_init): New function.

	* main.c (MAIN_PROGRAM): Setup drive overflow and alarm handling
	before starting the machine specific initialization.

1999-04-03  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.52.

	* viacore.c, viacore.h, vic20/vic20via1.c, vic20/vic20via2.c,
	drive/via1drive0.c, drive/via2drive0.c, drive/via1drive1.c.
	drive/via2drive1.c, pet/petvia.c: Adapted to new overflow
	handling.

	* drive/wd1770.c, drive/wd1770.h, drive/drivecpucore.c,
	drive/drivecpu.0, drive/drivecpu1.c: Likewise.

	* drive/drive.c: Likewise.

1999-04-03  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/unix/xaw/ui.c (ui_set_bestmode): Removed.
	(vidmode_available): Removed debugging messages about available
	video modes.

	* ciacore.c (clk_overflow_callback): Removed debugging message.

	* arch/unix/vsync.c (vsync_prevent_clk_overflow): Removed.
	(clk_overflow_callback): New function.
	(vsync_init): Install it in `maincpu_clk_guard'.

	* vicii/vicii.c (store_vbank): Calculate `mclk' at every cycle of
	the `do...while()' loop as `clk' might change.

	* maincpu.c (maincpu_init): Temporarily use a hardcoded value
	instead of `PREVENT_CLK_OVERFLOW_TICK'.
	* drive/drivecpucore.c (mydrive_cpu_init): Likewise.

	* interrupt.h: Removed `PREVENT_CLK_OVERFLOW_TICK' #define.

	* interrupt.h: Removed `CLOCK_MAX' #define.
	* types.h: Moved here.

	* maincpu.c (clk_overflow_callback): Warp the `cpu_int_status'
	time.

	* interrupt.c (cpu_int_status_time_warp): New function.

1999-04-03  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.51.

	* arch/unix/xaw/uicommand.c (attach_disk): Removed calls to
	`flip_set_current' as this belongs to `file_system_attach_disk'
	and not to the UI!

	* fliplist.c, fliplist.h (flip_set_current): `filename' is const.

	* attach.c (file_system_attach_disk): Call `flip_set_current' when
	a disk is attached.

	* arch/msdos/menudefs.c: Added flip list menu.

	* arch/msdos/kbd.c: Added flip list short-cuts.

1998-04-03  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* arch/riscos/print.c (print_open): return int value
	(fd): new array to hold file descriptors for
	the devices, indexed by int from print_open. Fix all occurances
	* arch/riscos/rs232.c: likewise

	* arch/win32/print.c (print_open, print_putc, print_flush): 
	return -1 for error.

	* c128/c128cia1.c (mycpu_rmw_flag): new define 
	* c64/c64cia1.c: likewise
	* c64/c64cia2.c: likewise
	* cbm2/c610cia1.c: likewise

	* drive/cia1571drive0.c (mycpu_rmw_flag): new define.
	include drivecpu.h
	* drive/cia1571drive1.c: likewise
	* drive/cia1581drive0.c: likewise
	* drive/cia1581drive1.c: likewise

	* drive/drivecpu.h (drive0_rmw_flag, drive1_rmw_flag): new externals

	* ciacore.c (cia_last_read): new variable to keep the byte
	read the last time read_mycia() has been called.
	(store_mycia): check rmw_flag and handle it.
	(read_mycia): save every return value in cia_last_read.
	Cleanup when reading ICR.
	(peek_mycia): cleanup when reading ICR

1999-04-02  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.50.

1998-04-02  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* aciacore.c (fd): change type from file_desc_t to int, because
	it simply is _no_ File descriptor, but an index in a table in 
	arch/unix/rs232.c. Fix all occurances.
	(clk_overflow_callback): renamed from acia_prevent_clk_overflow.
	(myacia_init): add a clk_guard callback registration
	Open the log for the ACIA.
	(int_acia): when issuing CPU interrupts use the IRQ enabling
	bits in the command register.

	* arch/unix/rs232.c (rs232_open): truncate the dump file when
	it already exists.

	* c64/c64acia1.c (mycpu_clk_guard): new definition
	(MYACIA): change the name to include the '"'. 
	* cbm2/c610acia1.c: likewise
	* pet/petacia1.c: likewise

	* rs232.h (rs232_open): return type is int.

1998-04-01  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* doc/vice.texi: add section "Printer problems"
	update default printer settings
	Make PETMEM version 1.1 and PETROM version 1.0

	* arch/unix/print.c (resources): change default entries

	* arch/unix/xaw/uisettings.c (flush_printer4): new function
	(printer_settings_menu): add entry to flush IEC4 printer device

	* prdevice.c (prdevice_close_printer): new function to flush the
	printer device
	(currfd): changed from file_desc_t to int - this is an index in a
	table in arch/unix/print.c, who got the idea this is a real fd?
	Fixed all occurances.
	* print.h (print_open): change return value to int.

	* prdevice.h (prdevice_close_printer): new prototype

	* pruser.c (set_up_enabled): do not check for ILLEGAL_FILE_DESC,
	because print_open return value is not an fd.

1998-04-01  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* doc/vice.texi: updated snapshot docs for PETMEM and CIA modules

	* ciacore.c (mycia_init): use the correct names for alarms and
	timer states.
	(mycia_read_snapshot_module, mycia_write_snapshot_module): use
	correct names for the snapshot modules.

	* ciatimer.c (ciat_print_state): new function to print a timer
	state, including human-readable versions of the state bits.
	(ciat_table): moved from header file to c file.

	* ciatimer.h (CIAT_STACKLEN): removed
	(ciat_tstate_t, ciat_t, ciat_table): rearranged prototypes within file.
	Made ciat_table extern
	(ciat_set_alarm, ciat_update): propagate oneshot bits before 
	doing a "warp stopped".
	(ciat_set_latchlo, ciat_set_latchhi): set alarm in case there is
	a load in the next few cycles that has been taken into account by
	set_alarm.
	(ciat_load_snapshot): set alarm after restoring timer, and if 
	reading V1.0 snapshot, auto-propagate oneshot bits too.

1999-03-31  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.49.

	* vdrive.c (floppy_read_block, floppy_write_block): Only use drive
	emulation for drive #8 and #9.

	* imagecontents.c (open_image): Use fake drive instead of drive
	#8.

1998-03-31  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* c128/c128.c: include ciatimer.h
	(machine_init): call ciat_init_table to init CIA tables.
	* c64/c64.c: likewise
	* cbm2/c610.c: likewise	
	* vic20/vic20.c: likewise (VC1571 emulation)
	
	* ciacore.c (cia_strobe_ta, cia_strobe_tb): removed.
	(clk_overflow_callback): fix timer update
	(mycia_init): remove strobe function from call to ciat_init.
	(store_mycia): before storing to CRB, always update TA, just in case
	for cascade mode
	(int_ciata): step timer b only when timer b is startet!
	(mycia_write_snapshot_module, mycia_read_snapshot_module):
	fix and adapt to ciat_* code. bump minor version from 0 to 1.

	* ciacore.h (cia_tap, cia_tbp): removed

	* ciatimer.c (ciat_init_table): new function, Fills in the 
	CIA timer propagation table: new state = table[old state],
	where the state is a simple int value.

	* ciatimer.h: new cia timer implementation. The timer state
	consists of a bit array, the counter and the latch value.
	a clk tells when this description is valid.
	ciat_update propagates the timer from the clock where it is
	valid to the current clock.
	ciat_set_alarm computes the clock of the next underflow
	from the state.

1999-03-31  Daniel Sladic  <sladic@eecg.toronto.edu>

	* mon.c [Ullrich von Bassewitz]: (mon_disassemble_to_string) Print
	operand bytes before instruction. Check for "label+1" in absolute
	addressing.
	(disassemble_instr) Change the way labels are printed; print them
	before the instruction on a separate line.
	(mon_add_name_to_symbol_table) Don't issue multiple label warning if
	they have the same value.

	* mon_lex.l [Ullrich von Bassewitz]: Extend acceptable symbols
	for label names.

	* mon_parse.y: Handle undefined labels. Fix segfaults from loading
	labels.

1999-03-30  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.48.

	* ciatimer.h (ciat_set_latchlo): Removed unused variables.
	(ciat_ack_alarm): Likewise.

	* ciacore.c (int_ciata): Removed unused variables.

	* Makefile.am: Added `usleep.h'.

1999-03-30  Thomas Bretz  <tbretz@physik.tu-muenchen.de>

	* alarm.c, autostart.c, c64/c64mem.c, c64/patchrom.c,
	drive/drive.c, findpath.c, findpath.h, interrupt.h, main.c,
	memutils.c, utils.c, vicii/vicii.c, zfile.h: Fixed includes for
	OS2.

	* sysfile.c (sysfile_open): Use binary mode for `fopen'.

	* usleep.c (usleep): OS2 specific changes.

	* usleep.h: New file.

1999-03-30  Ettore Perazzoli  <ettore@comm2000.it>

	* ciacore.c (cia_do_set_int): Return value changed to `void'.

1999-03-26  Ettore Perazzoli  <ettore@comm2000.it>

	* maincpu.c (clk_overflow_callback): New function.
	(maincpu_init): Add it to `maincpu_clk_guard'.

	* sid/sid.c (sid_reset): Removed `sound_prevent_clk_overflow()'
	call.  FIXME: This is looking for troubles.
	* vic20/vic20sound.c (sound_reset): Likewise.
	* pet/petsound.c (petsnd_reset): Likewise.

	* drive/drivecpu0.c: Removed `*_prevent_clk_overflow()' #defines.
	New `mydrive_clk_guard' #define.
	* drive/drivecpu1.c: Likewise.

	* drive/drivecpucore.c: New variable `mydrive_clk_guard'.
	(mydrive_cpu_init): Initialize clk guard.

	* c64/c64cia1.c: No longer #define `mycia_prevent_clk_overflow'.
	#Define `mycpu_clk_guard' instead.
	* c64/c64cia2.c: Likewise.
	* c128/c128cia1.c: Likewise.
	* drive/cia1571drive0.c: Likewise.
	* drive/cia1571drive1.c: Likewise.
	* drive/cia1581drive0.c: Likewise.
	* drive/cia1581drive1.c: Likewise.
	* cbm2/c610cia1.c: Likewise.

	* ciacore.c (mycia_prevent_clk_overflow): Removed.
	(clk_overflow_callback): New function.
	(mycia_init): Install it.

	* sound.c (sound_prevent_clk_overflow): Removed.
	(prevent_clk_overflow_callback): New static function.
	(sound_init): Install it into `maincpu_clk_guard'.

1999-03-26  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.47.

	* vicii/vicii.c: #include "c64.h".
	(vic_ii_init): Use C64_PAL_CYCLES_PER_RFSH

	* Makefile.am: Added `clkguard.h' and `clkguard.c'.

1998-03-26  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* ciatimer.h (ciat_t): add lastz, the clock of the last underflow.
	(ciat_update): set value of lastz
	(ciat_read_timer, ciat_read_cnt, ciat_do_read_timer): split first
	function into two, ciat_do_read_timer that returns either the 
	real counter value (called from cia_read_cnt) or the value after
	a possible load (called from cia_read_timer).
	(ciat_set_latchlo): take effect even when load has happened 
	one cycle before.
	(ciat_set_ctrl): when stopping timer, handle oneshot.
	When starting the timer while underflow occurs, restart timer
	When force loading+start a timer, handle underflow at this
	cycle
	
1998-03-26  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* ciacore.c: all occurances of ciat_set_alarm: add clk parameter
	(cia_strobe_ta, cia_strobe_tb): new functions to be 
	called as a callback when an unexpected underflow happens...
	(is this a hack or a feature?)
	(mycia_init): add strobe functions to ciat_init call.
	(read_mycia): If a read is called with the same clock cycle
	as before, update (increase) internal counter to handle opcode 
	fetch. If new clock is higher, reset the internal counter
	(mycia_prevent_clk_overflow): handle cia_read_clk
	
	* ciatimer.h (cia_state_t): remove latch value
	(ciat_t): add latch value, and strobe function. Fix all occurances
	add last_ack clock value that is set in ciat_ack_alarm
	(ciat_update): process only if last update was strictly earlier
	(ciat_prevent_clk_overflow): handle last_ack
	(ciat_read_timer): when nextz is increased by latch+1 in ack_alarm,
	remove the add and do not return module latch value - if latch is
	changed while timer running this otherwise breaks!
	(ciat_set_ctrl): when force load and start the timer, a pulse
	might leak through to PB6/7 toggle or Timer B count TA???
	(ciat_ack_alarm): set last_ack clock

1999-03-25  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/unix/xaw/uicommands.c: Moved fliplist commands to a
	separate submenu.

	* drive/drivecpucore.c (mydrive_cpu_init): Use
	`IDENTIFICATION_STRING' instead of bogus `"MYIDENTIFICATION"'.

	* drive/drivecpu0.c (IDENTIFICATION_STRING): New #define,
	replacing old bogus `MYIDENTIFICATION'.
	* drive/drivecpu1.c (IDENTIFICATION_STRING): Likewise.

	* drive/drivecpucore.c (mydrive_cpu_prevent_clk_overflow):
	Temporarily `#if 0'ed out.

	* vicii/vicii.c (vic_ii_prevent_clk_overflow): Removed.
	(clk_overflow_callback): New function (does the same thing as the
	previous one, but has `clk_guard_callback_t' parameters).
	(vic_ii_init): Setup `clk_overflow_callback()' as a clk overflow
	callback for the main CPU and setup the clk base to
	`CYCLES_PER_RFSH'.

	* c64/c64.c (vsync_hook): Prevent overflow via the maincpu clk
	guard.  #include "clkguard.h".
	* c128/c128.c (vsync_hook): Likewise.
	* vic20/vic20.c (vsync_hook): Likewise.
	* pet/pet.c (vsync_hook): Likewise.
	* cbm2/c610.c (vsync_hook): Likewise.

	* interrupt.c (prevent_clk_overflow): Removed.

	* interrupt.h (maincpu_prevent_clk_overflow): Removed.

	* maincpu.c: New variable `maincpu_clk_guard'.
	(maincpu_init): Initialize it.

1999-03-24  Ettore Perazzoli  <ettore@comm2000.it>

	* clkguard.c (clk_guard_new): New function.
	(clk_guard_init): New function.
	(clk_guard_set_clk_base): New function.
	(clk_guard_get_clk_base): New function.
	(clk_guard_add_callback): New function.
	(clk_guard_destroy): New function.
	(clk_guard_prevent_overflow): New function.

	* clkoverflow.c: New file.

	* clkoverflow.h: New file.

	* alarm.c (alarm_context_time_warp): New function.

1998-03-24  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* ciacore.c (my_set_int): do not automatically set ICR bit 7
	when activating the int line
	(check_ciatodalarm): set int line when TOD interrupt
	(cia_do_set_int): set int line with checking of read_icr
	(store_mycia): when writing to ICR, use cia_do_set_int
	(read_mycia): set ciardi _before_ updating timers
	(int_ciata, int_ciatb): use cia_do_set_int.

	* ciatimer.h (ciat_update): when in single step mode,
	check nextz and return an underflow when necessary.
	(ciat_is_running): check whether ciat_ack_alarm just 
	disabled the timer and return 0 if so.
	(ciat_single_step): delay underflow one cycle by issuing
	and alarm via nextz

1998-03-24  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* ciatimer.h (CIAT_STACKLEN): make state stack length configurable
	(ciat_state_t, ciat_t, ciat_init, ciat_reset, ciat_update, 
	ciat_single_step, ciat_set_ctrl): change oneshot handling.
	(ciat_update): if called "before" a previous call, log it.
	remove handling of whether this is an underflow clock or not.
	(ciat_is_underflow_clk): new function
	(ciat_is_running): new function

	* ciacore.c (_CIA_FUNC): defined either as "static" or "static inline"
	(cia_update_ta, cia_do_update_ta): split former function into those	
	two. The first one handles issued alarms, the second the real 
	update. Always cia_update_ta is called, except probably in 
	int_ciata/int_ciatb.
	(cia_update_tb, cia_do_update_tb): likewise
	(cia_do_step_tb): similar to cia_do_update_tb, only call single
	stepping instead of update.
	(read_mycia, store_mycia): use ciat_is_underflow_clk() instead 
	of cia_tap/cia_tbp
	(store_mycia): when writing CRB and enabling couting TA, then 
	also update and set alarm on timer A
	(read_mycia): when reading CRA/CRB use ciat_is_running() to determine
	start/stop bit.
	(int_ciata, int_ciatb): change call to ciat_update the same way
	as cia_do_update_t*.
	When calling my_set_int, add 1 to the clock.

1999-03-21  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.46.

	* sounddrv/soundsgi.c: #include <stdio.h>.

	* drive/drive.c: Removed old warning cruft.

	* drivecpucore.c (drive_jam): Print the correct drive type.

	* drivecpu0.c, drivecpu1.c: Removed unnecessary includes.

	* arch/win32/res.r: This is not an ALPHA release anymore.

	* c128/c128mem.c (read_mmu, store_mmu): No need to be inlined.
	Removed useless includes.
	(read_empty_io, store_empty_io): Removed.

	* c64/c64mem.c: Removed useless includes.

1998-03-20  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* Makefile.am: add ciatimer.h

	* c64/c64cia1.c, c64/c64cia2.c (CIAT_DEBUG): remove definition

	* ciacore.c (read_mycia): do not call ciat_update before 
	calling int_ciata/tb
	(int_ciata): add clock parameter to ciat_single_step

	* ciatimer.c: remove timer code, just keep logging code

	* ciatimer.h: new file. basically the old ciatimer.h but with
	define to either make it inline or a single compile in ciatimer.c
	(ciat_update): fix computation of number of underflows

1999-03-20  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.45.

	* c128/c128mem.c (read_chargen): Fixed address calculation.
	(read_d0xx, store_d0xx, read_d4xx, store_d4xx, read_d5xx,
	store_d5xx, read_d6xx, store_d6xx, read_d8xx, store_d8xx,
	read_dcxx, store_dcxx, read_dcxx, store_dcxx): Removed.
	(read_d7xx, store_d7xx, read_io1, store_io1, read_io2,
	store_io2): Simplified.
	(store_bank_io, read_bank_io, peek_bank_io, initialize_memory):
	Changed to new memory banking.

1998-03-19  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* arch/unix/joystick.c: remove C++-style comments from behind
	cpp directives.

	* arch/unix/xaw/ui.c (initBlankCursor): changed no_data from
	unsigned char to char to make OSF1 cc happier

	* autostart.c (autostart_prg): change cbm_name and p00_header_file_name
	from BYTE to char to make OSF1 cc happier

	* c1541.c (quit_cmd): add return to make OSF1 cc happier.
	* main.c (cmdline_help): likewise

	* c64/c64cia1.c (read_ciaicr): remove ";" from empty definition
	* cbm2/c610cia1.c (read_ciaicr): likewise

	* cbm2/crtc.c (addr_mask, scraddr, chargen_rel, hw_double_cols):
	remove definitions.

	* tap.c (tap_header_read): cast argument for strncmp from BYTE*
	to char*

1998-03-19  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* autostart.c (autostart_prg): if fname_split gave a "NULL" directory,
	use "." instead.

	* fsdevice.c (set_fsdevice_8_dir, set_fsdevice_9_dir, 
	set_fsdevice_10_dir, set_fsdevice_11_dir): do not accept NULL
	paths. Replace them with "" instead.

1998-03-19  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* cbm2/crtc.c (do_update_memory_ptrs): make non-inline and 
	move to end of file, because video_mode is defined in crtccore.c
	that is included.
	* pet/crtc.c: likewise

	* pet/petmem.c (petmem_2001_buf_ef): fix declaration.

1998-03-18  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* ciatimer.c (ciat_update): return a new flag that is set when the 
	last underflow is at the current clock cycle.

	* ciacore.c (cia_update_ta, cia_update_tb): call ciat_update with 
	additional parameter to set port bit
	(store_mycia): when storing CRA/CRB reset port toggle bit when 
	starting the timer.
	(read_mycia, store_mycia, peek_mycia): when accessing port b,
	port bit check.

1999-03-18  Dag Lem  <resid@nimrod.no>

	* arch/unix/vsync.c (do_vsync): Flush sound device in warp mode.
	* arch/msdos/vsync.c (do_vsync): Likewise.
	* arch/riscos/vsync.c (do_vsync): Likewise.
	* src/sound.c (sound_run_sound, sound_flush, sound_set_warp_mode):
	Keep non-realtime devices running in warp mode.

1999-03-17  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.44.

	* imagecontents.c (open_image): Set drive unit.

	* c128/c128mem.c (initialize_memory): Added IO/Chargen banking
	table.
	(read_d0xx, read_d4xx, read_d5xx, read_d6xx, read_d7xx, read_d8xx,
	read_dcxx, read_ddxx): Fix up the `chargen_rom' address.

1998-03-16  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* ciacore.c (cia_update_tb): check whether we count TA underflows
	If so, issue any delayed alarm function calls to update timers
	(store_mycia): when writing to CRB then set bit 5 always when
	single stepping (count TA, count CNT, ...) is selected
	(int_ciata): when we need alarm functions on underflow, issue alarm
	Fix checks for timer state when counting SDR and stepping TB
	(int_ciatb): when we need alarm functions on underflow, issue alarm

	* ciacore.h (cia_tas, cia_tbs): removed

	* ciatimer.c (CIAT_NEED_LOG): new define to include log functions,
	even when complete debugging is not enabled
	(ciat_state_t): running renamed to runp2 - now only one when 
	phi2 is counted; all occurances fixed
	(ciat_set_ctrl): handle single-step modes

1999-03-15  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.43.

	* datasette.c (datasette_read_bit): Removed call to
	`alarm_context_update_next_pending'.  Increased pause to 20ms.
	
	* vdrive.c (floppy_write_block): If a G64 image is attached use
	GCR routines to write blocks.

	* mon.c (mon_block_cmd): Removed special GCR handling.

	* vdrive-iec, drive/drive.c, drive/wd1770.c, vdrive.c: Changed to
	new block write API.

	* autostart.c (autostart_prg): Use `1' and `0' for `FALSE' and
	`TRUE' as this define is missing on some architectures.

	* arch/msdos/menudefs.c (ui_create_main_menu): Added datasette
	submenu.

	* tape.c (tape_get_file_name): Return TAP file name too.

1999-03-15  Ettore Perazzoli  <ettore@comm2000.it>

	* alarm.c (alarm_unset): Argh.  Update the "next pending alarm"
 	index if we are moving a pending alarm when removing the specified 
	alarm.

1999-03-14  Ettore Perazzoli  <ettore@comm2000.it>

	* alarm.c (alarm_unset): Don't copy the alarm on itself if it's
 	the last in the array.  Case when no pending alarms are left after
 	unsetting made slightly faster by avoiding the call to
 	`alarm_context_update_next_pending()'.

1999-03-14  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.42.

	* arch/msdos/archdep.c (archdep_default_sysfile_pathlist): Use
	relative paths.

	* drive/drive.c (GCR_data_writeback): Made extern and renamed to
	`drive_GCR_data_writeback'.
	(GCR_find_sector_data, GCR_find_sector_header): Do not use global
	track constants.
	(drive_read_block, drive_write_block): New functions.

	* drive/wd1770.c, imagecontents.c, mon.c, vdrive-iec.c, vdrive.c:
	Changed to new read block API.

	* mon.c (mon_block_cmd): Added support for G64 image block
	commands.  Can be removed soon in favour of a generic solution.

	* vdrive.c (floppy_read_block): If a G64 disk image is attached
	use GCR routines to read blocks.
	(attach_floppy_image): Set drive constants for G64 images too.

	* c1541.c (drive_read_block): Stub.

1998-03-14  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* c64/c64cia1.c, c64/c64cia2.c (CIAT_DEBUG): add definition to 
	add debug code to cia timers
	(myciat_logfl): add definition to allow global variable when debug
	mode enabled.

	* ciacore.c (store_mycia, read_mycia, int_ciata, int_ciatb): 
	add calls to macros CIAT_LOGIN/CIAT_LOGOUT to print 
	CIA timer debug code messages
	(read_mycia): when reading ICR, call int_ciata and int_ciatb 
	with the correct timer value.

	* ciatimer.c (CIAR_DEBUG): new define to include debug code.
	(is defined in c64/c64cia*.c, but undef'd here. If the undef
	is removed, only the c64 CIAs get debug code.
	(CIAT_LOGIN, CIAT_LOG, CIAT_LOGOUT): new macros to 
	log debug messages to stdout. All functions use those macros now.
	(myciat_logfl): variable that when 1, enabled logging.
	(ciat_ack_alarm): debug code: when debugging is enabled,
	produce a core file when ack_alarm is called too early.

1999-03-14  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.41.

	* mon.c (mon_block_cmd): Implemented block read and write
	commands.

1999-03-13  Ettore Perazzoli  <ettore@comm2000.it>

	* autostart.c: Converted to use `log.c' instead of `warn.c' for
	logging and made a bit less noisy.  Removed (now useless)
	`AUTOSTART_HASFILE' case.

	* fsdevice.c (fs_find_pc64_name): If `opendir()' fails, return
	NULL.

	* c64/c64.c: Removed `rawaddr' stuff.
	* cbm2/c610mem.c: Likewise.
	* pet/petmem.c: Likewise.
	* vic20/vic20.c: Likewise.
	* c128/c128.c: Likewise.

	* arch/win32/archdep.c (archdep_path_is_relative): New function,
	same as the one for MS-DOS.

	* arch/msdos/archdep.c (archdep_path_is_relative): New function.

	* arch/unix/archdep.c (archdep_path_is_relative): New
	function.

	* utils.c: #include "archdep.h".
	(path_is_relative): New function.

	* autostart.c: Removed `rawaddr' stuff.
	(autostart_prg): New function.
	(autostart_autodetect): Use `autostart_prg()' instead of
	`autostart_rawfile()'.
	(autostart_rawfile): Removed.

	* p00.c (p00_read_header): Do not set `*recsize_return' if
	`recsize_return' is NULL.

1999-03-13  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.40.

	* datasette.c (datasette_read_bit): Calculate proper gap length
	for version "1" TAP images.

	* arch/msdos/menudefs.c (attach_tape_callback): Display TAPs too.
	(ui_datasette_submenu): New menu.
	(datasette_callback): New function.

	* arch/win32/res.h, arch/win32/resc64.r, arch/win32/resc128.r,
	arch/win32/resvic.r, arch/win32/respet.r, arch/win32/rescbm2.r:
	New datasette controls.

	* arch/win32/ui.h (handle_wm_command): Added datasette controls.

1998-03-13  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* ciatimer.c (ciat_set_ctrl): load timer even when not running
	when force load bit is set.
	Also force load the timer when it is already running.

1998-03-11  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* ciacore.c (cia_update_ta, cia_update_tb): new wrapper
	function for ciat_update(). They handle the stuff that has
	to be done when underflows occur.
	All occurances of ciat_update have been relaced with these functions.
	(read_mycia): call cia_update_t* before reading control registers
	because of resetting start/stop bit in oneshot mode.

	* ciatimer.c (ciat_set_ctrl): fix handling of one-shot bit.

1999-03-11  Dag Lem  <resid@nimrod.no>

	* sounddev/soundwav.c: Code cleanup.

1999-03-10  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.39.

	* arch/unix/mouse.c: Removed volatile from `_mouse_enabled'.

1998-03-10  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* src/Makefile.am: add ciatimer.c

	* src/ciacore.c: remove old timer code and include ciatimer.c instead.

	* src/ciatimer.c: new file that exports functions to operate on
	a CIA timer struct.

1999-03-09  Dag Lem  <resid@nimrod.no>

	* sound.h: Declare sound_init_wav_device.

	* sound.c (sound_init): Initialize RIFF/WAV dump sound device.
	
	* sounddrv/Makefile.am: Added soundwav.c.
	
	* sounddev/soundwav.c: RIFF/WAV dump sound device implementation.

1999-03-08  Dag Lem  <resid@nimrod.no>

	* sid/resid.cc (resid_sound_machine_open): Enable/disable reSID
	external filter.

1999-03-08  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.38.

	* datasette.c (datasette_read_bit): Call
	`alarm_context_update_next_pending' to get the alarm unscheduled.
	Added support for `FORWARD' and `REWIND'.
	(datasette_set_motor): Only trigger alarms at edges.
	(datasette_forward, datasette_rewind): New functions.

	* c64/c64mem.c (pla_config_changed): Fixed motor control bit.

	* tape.c (tape_detach_image, tape_attach_image): Switch tape traps
	off when a TAP image is attached.

	* tap.h: Added new members `mode' and `size' to `tap_t'.

	* tap.c (tap_open): Stop the datasette when a new tape is
	attached and set the file size.

1999-03-07  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.37.

	* vic20/cartridge, c64/cartridge.c, c64/c64mem.c, prdevice.c,
	c1541.c, vdrive.c, mon.c, memutils.c, fsdevice.c: Do not include
	`file.h', include `archdep.h' instead.

	* file.h: Removed.

	* arch/unix/archdep.h, arch/msdos/archdep.h, arch/win32/archdep.h,
	arch/riscos/archdep.h: Moved mode definitions for file IO here.

	* arch/unix/archdep.c, arch/msdos/archdep.c, arch/win32/archdep.c,
	arch/riscos/archdep.c (archdep_setup_signals): New function.

	* drive/drivecpu0.c, drive/drivecpu1.c: Define `mydrive_traceflg'.

	* drive/drive.c (drive_read_snapshot_module): Initialize shifter.
	(drive_rotate_disk): Save number of bits in the shift register.
	(drive_sync_found): Also consider the bits in the shift register.

1998-03-07  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* arch/msdos/kbd.h, arch/msdos/petkbd.c, arch/win32/kbd.h, 
	arch/win32/petkbd.c (pet_kbd_init_resources, 
	pet_kbd_init_cmdline_options): new prototypes and functions, 
	returning the return value of kbd_init_*()

	* arch/riscos/kbd.c, arch/riscos/kbd.h (pet_kbd_init_resources, 
	pet_kbd_init_cmdline_options): call kbd_init_* functions.

	* cbm2/c610.c, pet/pet.c (machine_init_resources): remove 
	architecture check for pet_kbd_init_resources.
	(machine_init_cmdline_options): remove architecture 
	check for pet_kbd_init_cmdline_options.

1999-03-06  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.36.

	* vic20/vic20.c (machine_read_snapshot): Read drive snapshot
	module too.

	* arch/msdos/tuimenu.c (tui_menu_handle): Removed useless define.

	* sid/sid.c, vice.h: Do not define `HAVE_MOUSE' as this is defined
	in `config.h' now.

	* arch/unix/mouse.c (mouse_init): Added stub.

	* arch/unix/video.c, arch/unix/video.h: Changed `MITSHM' to
	`USE_MITSHM'.

	* c64/c64.c, c128/c128.c, vic20/vic20.c, pet/pet.c, cbm2/c610.c:
	Removed MSDOS and WIN32 specific keyboard initialization.

	* arch/msdos/c64kbd.h, arch/msdos/c128kbd.h, arch/msdos/vic20kbd.h,
	arch/msdos/petkbd.h, arch/msdos/c610kbd.h: Use `kbd.h' instead.

	* arch/win32/c64kbd.h, arch/win32/c128kbd.h, arch/win32/vic20kbd.h,
	arch/win32/petkbd.h, arch/win32/c610kbd.h: Use `kbd.h' instead.

	* arch/unix/kbd.c, arch/unix/kdb.h: Use machine specific keyboard
	initialization.
	* arch/riscos/kbd.c, arch/riscos/kdb.h: Changed likewise.

	* arch/unix/mouse.c: #include "ui.h".

	* interrupt.c (cpu_int_status_init): Removed unused variable.

	* main.c: Use `HAVE_MOUSE' instead of testing the OS type.

1998-03-05  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* arch/msdos/archdep.c, arch/msdos/archdep.h,
	arch/riscos/archdep.c, arch/riscos/archdep.h,
	arch/win32/archdep.c, arch/win32/archdep.h (archdep_default_logger):
	new (empty) function & prototype. Can later be used to buffer
	log output until log window or whatever is needed for display
	comes up.

	* arch/unix/archdep.c, arch/unix/archdep.h (archdep_default_logger):
	new function + prototype. Prints log given to stdout (console)
	when log code has not yet been fully fired up.

	* arch/unix/xaw/ui.c (vidmodeavail,use_fullscreen,
	use_fullscreen_at_start,timeout): made static (and only defined
	if USE_VIDMODE_EXTENSION is defined
	(ui_check_mouse_cursor): surround fullscreen check with 
	#ifdef USE_VIDMODE_EXTENSION
	
	* c128/c128iec.c, c64/c64iec.c (parallel_cable_cpu_write):
	removed handshake parameter and via*_signal calls.
	(parallel_cable_cpu_pulse): new function to signal the
	parallel cable pulse handshake from cpu to drive
	(parallel_cable_cpu_read): remove via*_signal calls.

	* c64/c64cia2.c (store_ciapb): remove handshake flag from 
	parameters to parallel_cable_cpu_write().
	(pulse_ciapc): call parallel_cable_cpu_pulse.

	* c64/c64iec.h (parallel_cable_cpu_write): fix prototype
	(parallel_cable_cpu_pulse): new prototype

	* log.c (log_helper): if log_file is not yet set and log
	is default log, then use archdep_default_logger()

1998-03-05  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* resources.c (resources_read_item_from_file): return new 
	error code -2 when item was parsed correctly, but the resource
	had not been found.
	(resources_load): when resources_read_item_from_file returns
	-2 then do not abort, simply print a warning.

	* romset.c (romset_load): when resources_read_item_from_file returns
        -2 then do not abort, simply print a warning.

1999-03-04  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.35.

	* mon.c (mon_save_file, mon_load_file): Handle different memory
	spaces.

1998-03-03  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* c64/c64cia1.c, cbm2/c610cia1.c, drive/cia1571drive0.c,
	drive/cia1571drive1.c, drive/cia1581drive0.c, drive/cia1581drive1.c
	(pulse_ciapc): new (empty) inline function 
	(store_ciapa, store_ciapb): remove ADDRESS from function.

	* c64/c64cia2.c (store_ciapa, store_ciapb): remove ADDRESS from 
	function. only call parallel_cable_cpu_write function as when 
	writing to DDRB (without handshake). Do not call 
	pruser_write_data() anymore because this takes effect when handshaking
	only
	(pulse_ciapc): call parallel_cable_cpu_write function with handshake.
	Also call pruser_write_data().

	* ciacore.h (store_ciapa, store_ciapb): remove ADDRESS from function.
	(pulse_ciapc): new prototype

	* ciacore.c (store_mycia): store value to PA and DDRA calls 
	store_ciapa only when value has changed.
	store value to PB and DDRB calls store_ciapa only when value 
	has changed, but pulse_ciapc is always called when storing 
	to PB.
	(read_mycia): after calling read_ciapb, call pulse_ciapc to
	do handshake.
	(peek_mycia): when peeking PB, use same code as read_mycia, but
	do _not_ call pulse_ciapc

1998-03-03  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* ciacore.c (reset_mycia, int_ciatod, mycia_write_snapshot_module,
	mycia_read_snapshot_module): when setting the TOD alarm,
	use new variable cia_todclk.
	(mycia_prevent_clk_overflow): handle clock overflow for
	cia_todclk.

	* ciacore.h (cia_todclk): new variable

1999-03-02  Oliver Schaertel  <orschaer@forwiss.uni-erlangen.de>

	* unix/Makefile.am, arch/unix/xaw/ui.c, unix/xaw/c128ui.c,
	unix/xaw/c64ui.c, unix/xaw/ui.c, xaw/ui.h, arch/unix/mouse.c,
	arch/unix/mouse.h, sid/sid.c, main.c:
	Added c1351-mouse support to unix-versions. 
	
1999-02-27  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.34.

	* drive/drivecpu0.def, drive/drivecpu1.def, drivecpu-tmpl.c:
	Removed.

	* drive/drivecpu0.c, drive/drivecpu1.c, drive/drivecpu.h: Changed
	to new drive CPU core implementation.

	* drive/drive.c, drive/drive.h: The RAM of the drive belongs to
	the CPU core.

	* vicii/*: Moved `c64/vicii.c', `c64/vicii.h', `c64/sprcrunch.h',
	`c64/sprcycles.h', `c64/sprites.h' to a separate directory.

	* vicii/Makefile.am: New file.

	* Makefile.am, c64/Makefile.am, c128/Makefile.am: Changed to new
	loaction of VIC-II code.

	* c128/c128mem.c: `vicii.h' can be included as ordinary include
	file now.

	* arch/riscos/Makefile.am: Added `uiimage.c' and `uiimage.h' to
	`libarch_a_SOURCES'.

1999-02-23  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.33.

	* c128/c128mem.c (initialize_memory): Fixed typo.

	* datasette.c (datasette_read_bit): Handle zero gaps.

	* drive/cia1571drive0.def, drive/cia1571drive1.def,
	drive/cia1581drive1.def, drive/cia1581drive1.def: Removed.

	* drive/cia1571drive0.c, drive/cia1571drive0.c,
	drive/cia1571drive0.c, drive/cia1571drive0.c: Changed to new CIA
	core implementation.

	* cia-tmpl.c: Removed.

1998-02-23  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* c128/Makefile.am: removed c128cia1.def and build rules for
	c128cia1.c

	* c128/c128cia1.def: removed file

	* c128/c128cia1.c: basically a copy of the old c128cia1.def
	with some renaming

	* cbm2/Makefile.am: removed c610cia1.def and build rules for
	c610cia1.c

	* cbm2/c610cia1.def: removed file

	* cbm2/c610cia1.c: basically a copy of the old c610cia1.def
	with some renaming

1998-02-23  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* c64/Makefile.am [libc64_a_SOURCES, libc64c128_a_SOURCES]: remove
	c64cia2.def
	[BUILT_SOURCES, c64cia2.c]: remove build rules for c64cia2.c

	* c64/c64cia1.c [CIA_TIMER_DEBUG]: new (old) define to log
	debug information.
	[mycia_debugFlag, MYCIA_NAME]: new defines
	(store_ciapa, store_ciapb): add addr as parameter, because 
	this is used to check whether port or ddr is being written to.

	* ciacore.c (mycia_debugFlag, CIA_TIMER_DEBUG): fix all occurances
	of those variable/define to make debug logging work again.
	(ciaier, cia[CIA_ICR]): rename the latter to the former - 
	consistent use makes reading easier
	(reset_mycia): call log_open with MYCIA_NAME as parameter.
	(store_mycia): add "addr" as parameter to store_ciapa/pb calls.
	should this be made a separate "set_outfl" or so function?
	(ciaflag): removed - was never set.

	* ciacore.h (do_reset_cia, store_sdr, read_ciaicr, store_ciapa,
	store_ciapb, undump_ciapa, undump_ciapb, read_ciapa, read_ciapb):
	add prototypes for inline functions.
	(ciaflag): removed.

	* c64/c64cia2.def: removed

	* c64/c64cia2.c: basically a copy of the old c64cia2.def, with
	lots of renaming.

1999-02-22  Andreas Dehmel <dehmel@forwiss.tu-muenchen.de>

	* src/arch/riscos/*: added support for ROMSets and imagecontents.

	* fixpoint.c: added missing space.

	* imagecontents.c: needs ROlib.h for O_RDONLY on RISC OS.

	* romset.c: fixed small bug when clearing the archive.

	* sysfile.c: removed old romset hack on RISC OS.

	* utils.c: defined get_current_dir() on RISC OS.

1999-02-21  Martin Pottendorfer  <Martin.Pottendorfer@alcatel.at>

	* Makefile.am
	(base_sources): Added fliplist.c
	(noinst_HEADERS): Added fliplist.h

	* fliplist.[ch]: New files; Implementation of fliplist handling.

	* arch/unix/xaw/uicommands.c:
	(attach_disk_image_submenu[]): Added menu entries + hotkeydefs for
	fliplist functions.

1999-02-21  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.32.

	* arch/unix/xaw/uicommands.c (ui_tape_commands_menu): Added
	datasette control menu.

	* tape.c (tape_attach_image, tape_detach_image): Try to attach TAP
	tape images too.

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

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

	* c64/c64.c (machine_init): Initialize datasette.

	* c64/c64datasette.c: New file.

	* c64/c64mem (pla_config_changed): Report change of datasette
	motor status.

	* vic20/vic20datasette.c, pet/petdatasette.c,
	cbm2/c610datasette.c: New files.

1999-02-21  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.31.

	* alarm.h, alarm.c (alarm_set): Made inline.

1998-02-20  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* Makefile.am [noinst_HEADERS]: add ciacore.h
	[EXTRA_DIST]: add ciacore.c

	* c64/Makefile.am [libc64_a_SOURCES]: remove c64cia1.def
	[BUILT_SOURCES, c64cia1.c]: remove build rule

	* c64/c64cia1.def: removed file

	* c64/c64cia1.c: basically a copy of c64cia1.def, but including
	ciacore.c

	* ciacore.h, ciacore.c: new files. Handles CIA for c64cia1 now. 
	Other CIAs not (yet) converted. Basically a copy of cia-tmpl.c, 
	with lots of renaming.

	* 6510core.c [FETCH_OPCODE]: cast reg_pc to (int) before comparing
	to bank_limit when compiling with WORDS_BIGENDIAN or without unaligned
	memory access (!ALLOW_UNALIGNED_ACCESS), i.e. most RISC machines for
	example.

1999-02-21  Martin Pottendorfer  <Martin.Pottendorfer@alcatel.at>

	* Makefile.am 
	(base_sources): Added fliplist.c
	(noinst_HEADERS): Added fliplist.h

	* fliplist.[ch]: New files; Implementation of fliplist handling.

	* arch/unix/xaw/uicommands.c: 
	(attach_disk_image_submenu[]): Added menu entries + hotkeydefs for
	fliplist functions.

1999-02-17  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.30.

	* drive/drivecpu-tmpl.c (mydrive_trap_handler): Fixed typo.

	* c128/c128mem.c (initialize_memory): Use fast opcode fetch for
	RAM $c000-$feff of bank 0 too.

	* c64/cartridge.c (cartridge_attach_image): Do not close a file
	descriptor twice.

1999-02-16  Tibor Biczo  <crown@mail.matav.hu>

	* arch/win32/Makefile.am (libarch_a_SOURCES): Added winhack.h.

	* arch/win32/archdep.c (archdep_default_sysfile_pathlist): Changed
	  list of search paths from absolute into relative.

	* arch/win32/res.h (IDM_HELP): Added menu identifier for Help menu
	  item.

	* arch/win32/resc128.r, arch/win32/resc64.r, arch/win32/rescbm2.r,
	  arch/win32/respet.r, arch/win32/resvic.r: Added Help menu item.

	* arch/win32/ui.c (handle_wm_command): Handle Help menu item.
	  Starts application associated with html files on
	  DOC\vice_toc.html .

	* arch/win32/winhack.h: New file.

1999-02-16  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.29.

	* c64/cartridge.c (cartridge_attach_image): Free scratch buffer.

	* c128/c128mem.c (initialize_memory): Use fast opcode fetch for
	RAM $0200-$3fff of bank 0 too.

1998-02-15  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* data/PET/posg_de.vkm: add KP_Enter to emulate "=" char in
	positional mapping.

1998-02-15  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* sysfile.c (set_system_path): when expanding the path, make 
	relative paths absolute by prepending the current directory.
	Include <string.h> for strstr().

1998-02-15  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* arch/unix/xaw/ui.c (ui_select_file): save current directory
	and restore it after selecting a file. Save the fileselector 
	directory and restore it before opening it again.

	* drive/drive.c (drive_read_rom_snapshot_module): if drive type
	is 1541, do a checksum on the ROM.

1999-02-15  Tibor Biczo  <crown@mail.matav.hu>

	* arch/unix/xaw/ui.c (drive_led_on_red_pixel, drive_led_on_green_pixel):
	  Split drive_led_on_pixel into drive_led_on_red_pixel &
	  drive_led_on_green_pixel.
	  (do_alloc_colors): Allocate green pixel for drive led.
	  (ui_display_drive_led): Display green or red active drive led.

	* arch/win32/ui.c (window_proc): Display green or red active drive
	  led.

	* drive/drive.c (drive_enable): Fixed typo. Drive led type was
	  always selected with drive type of unit #8.

1999-02-14  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.28.

	* c64/c64mem.c (pla_config_changed): Fixed processor port
	implementation.

	* c128/c128mem.c (read_ram, store_ram, read_top_shared,
	store_top_shared): New functions.
	(initialize_memory): Implemented memory banking.
	(read_basic_lo, read_basic_hi, read_editor, read_hi): Only return
	ROM values.

1999-02-13  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.27.

	* drive/drive.c, drive/via1drive0.c, drive/via1drive1.c,
	drive/drivecpu-tmpl.c, arch/unix/xaw/uisettings.c,
	arch/win32/res.h, arch/win32/res.r, arch/win32/uidrive.c,
	arch/msdos/menudefs.c: Added 1541-II disk drive support.

	* c128/c128mem.c (mem_read_snapshot_module): Only load ACIA
	snapshot when `HAVE_RS232' is defined.

1998-02-12  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* c128/c128mem.c (mem_load_kernal): before loading the ROM, deinstall
	all traps - serial _and_ tape - and install them afterwards.
	* c64/c64mem.c: likewise
	* vic20/vic20mem.c: likewise

1998-02-12  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* data/C64/Makefile.am: add default.vrs
        
	* data/C64/default.vrs: new file

	* arch/unix/Makefile.am: remove c64romset.c and c64romset.h 

	* arch/unix/c64romset.c, arch/unix/c64romset.h: removed

	* arch/unix/xaw/c64ui.c (RomSetMenu, radio_RomSet, romset_submenu):
	removed
	(c64_romset_submenu): new submenu to load single ROMs and romsets
	(c64_ui_init): removed romset stuff.

	* c64/c64.c: do not include c64romset.h
	(machine_init_resources): do not call c64romset_init
	* c64/c64mem.c: do not include c64romset.h
	(default_chargen_rom_name, default_basic_rom_name, 
	default_kernal_rom_name, romsets, number_romsets, romset_name): removed
	(mem_load_kernal, mem_load_basic, mem_load_chargen):
	new functions to load the single ROMs.
	(set_chargen_rom_name, set_kernal_rom_name, set_basic_rom_name):
	load the ROMs when the ROM name has changed.
	(mem_get_romset_name, mem_get_romsets, mem_get_numromsets, 
	mem_add_romset, mem_load_romset_file, mem_romset_loader,
	mem_set_romset, isRomInRomSet): removed.
	(c64mem_get_kernal_checksum, c64mem_get_basic_checksum):
	new functions to get the checksums. Called by mem_load_* and
	mem_read_rom_snapshot.
	(mem_load): removed romset code
	(mem_write_rom_snapshot_module): uninstall the traps before writing
	the ROMs and install them afterwards.
	(mem_write_rom_snapshot_module): uninstall the traps before reading
	the ROMs and install them afterwards.
	Also get ROM checksums. 

1998-02-12  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* Makefile.am: rename crtc-tmpl.c to crtccore.c

	* cbm2/Makefile.am: remove crtc.def from sources and crtc.c from 
	BUILT_SOURCES and remove rule to build crtc.c
	* pet/Makefile.am: likewise

	* cbm2/crtc.def, cbm2/crtc.c: renamed former to latter. Added
	some necessary includes and make the MEMORY_PTRS define an
	inline function. Include crtccore.c in the end.
	* pet/crtc.def, crtc/crtc.c: likewise

	* crtc-tmpl.c: removed

	* crtccore.c: renamed from crtc-tmpl.c

1998-02-12  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* Makefile.am: replace acia-tmpl.c with aciacore.c

	* acia-tmpl.c: renamed to aciacore.c

	* aciacore.c: new file, from acia-tmpl.c
	Change calls to set_int_noclk(&maincpu_int_status,...) to 
	mycpu_set_int_noclk. 
	(myacia_write_snapshot_module): write offset of next alarm.
	(myacia_*): rename all static vars to acia_*.
	
	* c128/c128.c (vsync_hook): call acia1_prevent_clk_overflow()
	* c64/c64.c (vsync_hook): likewise
	* cbm2/c610.c (vsync_hook): likewise
	* pet/pet.c (vsync_hook): likewise

	* cbm2/c610.c (machine_init): if HAVE_RS232 defined, call 
	rs232_init.

	* pet/pet.c: (machine_init): if HAVE_RS232 defined, call 
	rs232_init.
	(machine_reset): if HAVE_RS232 defined, call rs232_reset.

	* c64/c64acia.h (acia1_prevent_clk_overflow): new prototype
	* cbm2/c610acia.h: likewise
	* pet/petacia.h: likewise

	* c64/Makefile.am: remove c64acia1.c from BUILT_SOURCES and 
	c64acia1.def from sources at all. Remove rule to build
	c64acia1.c
	* pet/Makefile.am: likewise for petacia1
	* cbm2/Makefile.am: likewise for c610acia1

	* c64/c64acia1.def, cbm2/c610acia1.def, pet/petacia1.def: removed files

	* interrupt.h (maincpu_set_int_noclk): new convenience definition

	* maincpu.h: include config.h

	* c64/c64acia1.c, pet/petacia1.c, cbm2/c610acia1.c: renamed
	from *.def, added definitions for the transformation of 
	myacia -> acia1

1998-02-12  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* acia-tmpl.c (int_myacia): made static

	* c64acia.h (int_myacia): removed prototype
	(acia1_init): added prototype.
	* cbm2/c610acia.h: likewise
	pet/petacia.h: likewise

	* cia-tmpl.c (int_myciata, int_myciatb, int_myciatod): made static

	* c64/c64cia.h (int_cia1ta, int_cia1tb, int_cia1tod): removed
	prototypes.
	(int_cia1ta, int_cia1tb, int_cia1tod): likewise
	* cbm2/c610cia.h: likewise +
	(cia1_init): added prototype
	* drive/ciad.h: likewise

	* drive/via1drive0.c (A_MYVIA*, mycpu_*set_alarm): remove defs
	(int_myviat*): remove defs
	* drive/via1drive1.c: likewise
	* drive/via2drive0.c: likewise
	* drive/via2drive1.c: likewise

	* pet/petvia.c: (A_MYVIA*, mycpu_*set_alarm): remove defs
        (int_myviat*): remove defs
	(myvia_init, MYVIA_NAME, mycpu_alarm_context): added defs
	include maincpu.h
	* vic20/vic20via1.c: likewise	
	* vic20/vic20via2.c: likewise	

	* drive/viad.h (via*_init): add prototypes
	(int_via*): remove prototypes
	* pet/petvia.h: likewise
	* vic20/vic20via.h: likewise

	* cbm2/c610cia.h: include maincpu.h

	* src/viacore.c (int_myviat*): made static

	* crtc-tmpl.c: include alarm.h and maincpu.h
	(raster_draw_alarm): new struct for alarm handling. change
	alarm handling to new version.
	(crtc_init): call alarm_init

	* c128/c128.c (machine_init): call cia[12]_init and acia1_init
	(machine_reset): remove alarm handler init

	* cbm2/c610.c (machine_init): call cia1_init and acia1_init
	(machine_reset): remove alarm handler init

	* pet/pet.c (machine_init): call via_init and acia1_init
	(machine_reset): remove alarm handler init. Also call reset_acia1
	(machine_read_snapshot): do not reset ACIA when no acia in 
	snapshot - done in ACIA code.

	* vic20/vic.c: include alarm.h and maincpu.h
	(raster_draw_alarm): new struct for new alarm code. Change
	all alarm handling approprately.
	(reset_vic): new function to reset VIC-I
	(vic_init): call alarm_init.

	* vic20/vic.h (reset_vic): new prototype

	* vic20/vic20.c (machine_init): call via1_init and via2_init.
	(machine_reset): remove alarm handler init
	Also call reset_vic.

1999-02-11  Tibor Biczo  <crown@mail.matav.hu>

	* arch/win32/res.h (IDM_SAVEQUICK, IDM_LOADQUICK): Added identifiers
	  for Quick Snapshot menu items.

	* arch/win32/resc128.r, arch/win32/resc64.r, arch/win32/rescbm2.r
	  arch/win32/respet.r, arch/win32/resvic.r: Added Quick Snapshot
	  load and save menu items.

	* arch/win32/ui.c: Include archdep.h.
	  (c64_accel, c128_accel, cbm2_accel, vic_accel, pet_accel):
	  Added shortcut keys for Quick Snapshot menu items.
	  (ui_init): Update sizes of shortcut key tables.
	  (save_quicksnapshot_trap): New function. Saves Quick Snapshot
          image, deletes oldest quick snapshot file if we have 10 already,
	  collapse files if any missing.
	  (load_quicksnapshot_trap): New function. Loads last Quick Snapshot
	  file.
	  (scan_files): New function. Finds available Quick Snapshot files.
	  (handle_wm_command): Handle Quick Snapshot menu items.

	* findpath.c (findpath): Change '/' into '\' on Win32.

	* findpath.h: Use ';' as path separator on Win32.

1999-02-11  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.26.

	* drive/drive.h: Define drive active LED colors.

	* drive/drive.c (drive_set_disk_drive_type): Set color of active
	LED.  (drive_enable, set_drive0_type, set_drive1_type,
	drive_read_snapshot_module): Update drive LED color.

	* arch/unix/xaw/ui.c, arch/unix/xaw/ui.h, arch/win32/ui.c,
	arch/win32/ui.h, arch/msdos/ui.c, arch/msdos/ui.h,
	arch/riscos/ui.c, arch/riscos/ui.h (ui_enable_drive_status):
	Added parameter for drive active LED color.

1998-02-11  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* BUGS: remove the 8x96 video bug description - fixed

	* data/PET/Makefile.am (roms, romsets): change the filenames 
	appropriately
	
	* data/PET/pet*, data/PET/kernal*, data/PET/basic*, data/pet/edit*:
	split the ROMs up into basic, kernal and editor ROMs that are loaded
	separately.

	* data/PET/*.vrs: fix ROM names, include basic ROMs.

	* arch/unix/xaw/petui.c (pet_romset_submenu): fix .vrs filenames
	add entry to load BASIC ROM.

	* pet/pet.c (machine_reset): call petmem_reset instead of 
	superpet_reset

	* pet/petmem.c (mem_load_basic): new function to load BASIC ROM.
	(petmem_patch_2001, petmem_unpatch_2001,  mem_read_patchbuf,
	petmem_2001_buf_ef, petmem_2001_patchbuf_f1, petmem_2001_patchbuf_f3,
	petmem_2001_patchbuf_f4, petmem_2001_patchbuf_f6): fixed/new 
	functions for the now self-contained
	PET Kernal 1 patch. unpatching does not need to load the ROM again
	now. ROM area is not used for patch area anymore, instead an own
	side-array is used, petmem_2001_buf_ef with mem_read_patchbuf
	to access it. The petmem_2001_patchbuf_f* areas are used to 
	save the patched ROM areas and are copied back on unpatch.
	(set_kernal_rom_name): load kernal only when name has changed.
	(set_basic_rom_name): new function
	(set_pet2k_enabled): use petmem_[un]patch_2001() to patch/unpatch
	the PET kernal 1.
	(resources): new entry "BasicName" for BASIC ROM.
	(cmdline_optione): new entry "-basic"
	(superpet_reset,  petmem_reset): renamed former to latter because
	it now resets 8x96 mapping as well.
	(set_std_9tof): if ROM patched, use petmem_2001_buf_ef as 
	patch area, not a ROM area that might be overwritten. 
	(initialize_memory): save map_reg value and store it to 
	$fff0 if not 0, thus saving the complete mapping.
	(petmem_get_kernal_checksum, petmem_get_editor_checksum): the
	two only functions that set the kernal/editor checksum. Both
	are called exactly when the appropriate ROM is loaded either
	via mem_load_* or via snapshot, before any trap/patch is installed.
	(petmem_checksum): according to the saved checksums, install traps.
	use separate kernal/editor checksums now.
	(mem_load_basic): new function. 
	(mem_load_kernal, mem_load_editor): fixed to new ROM formats.
	(mem_load): call mem_load_basic().
	(set_screen): call initialize_memory instead of set_vidmem.
	(mem_read_ram_snapshot): call initialize_memory() 
	(mem_write_rom_snapshot): do not set IO size to 256 byte when
	Kernal 1 is loaded.
	(mem_read_rom_snapshot): unpatch 2001 ROM when patched
	If IO size has changed, initialize_memory.
	Call petmem_get_kernal/editor_checksum(), patch 
	(pet_table): add editor/basic ROM names to all entries
	(pet_set_model_info): set Basic ROM name
	
	* pet/petmem.h (PET_*_CHECKSUM): remove combined kernal/editor
	checksum and introduce separate checksums.
	
	* pet/pets.h (PET_*NAME): fix PET ROM names. 
	(PetInfo, PetRes): add BASIC ROM name

1999-02-09  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.25.

1999-02-09  Andreas Dehmel  <dehmel@forwiss.tu-muenchen.de>

	* arch/riscos/*: cartridge freeze support and drag and drop
	of system ROMs.

	* resources.c: implemented resources_query_type (was defined in
	resources.h but never implemented).

	* romset.c, romset.h: now fully functional romset archives.

	* sysfile.c: general cleanup of the RISC OS bits.

1998-02-09  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* pet/petmem.c (set_editor_rom_name): load ROM even if the 
	name is the same as the old one - the kernal can overwrite it,
	thus we have to make it sure that it's there.

1998-02-09  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* doc/vice.texi: add mapping of RUN/STOP key to docs.

	* c128/c128mem.c (mem_load_kernal, mem_load_basic, mem_load_chargen):
	check for empty filename
	(mem_kernal_checksum, mem_basic_checksum): new functions to 
	compute and check the checksums of the kernal/basic ROMs.
	Called by mem_load_{kernal|basic} and mem_read_rom_snapshot.
	(mem_write_rom_snapshot_module): deinstall traps before saving
	the ROM images; install traps after saving. Thus unmodified
	ROMs are written.
	(mem_read_rom_snapshot_module): deinstall traps before loading,
	After loading the snapshot, install traps again.
	Issue a warning after loading the snapshot that dumped romsets
	and saved settings are not current anymore.
	* cbm2/c610mem.c (mem_load_kernal, mem_load_basic, mem_load_chargen,
	mem_checksum, mem_write_rom_snapshot_module,
	mem_read_rom_snapshot_module): likewise
	* pet/petmem.c (petmem_checksum, mem_load_kernal, mem_load_editor,
	mem_write_rom_snapshot_module, mem_read_rom_snapshot_module): likewise
	* vic20/vic20mem.c (mem_kernal_checksum, mem_load_kernal,
	mem_basic_checksum, mem_load_basic, mem_load_chargen, 
	mem_write_rom_snapshot_module, mem_read_rom_snapshot_module): likewise

	* vic20/vic20mem.c (mem_read_rom_snapshot, mem_write_rom_snapshot):
	fix memory addresses.
	(mem_read_ram_snapshot, mem_read_rom_snapshot): check for 
	major version number.

	* c128/c128mem.c (mem_read_snapshot_module): do not reset 
	ACIA and TPI when their modules are not read - this is done
	in the ACIA and TPI modules themselves.

	* cbm2/c610mem.c (mem_read_ram_snapshot, mem_write_ram_snapshot):
	actually _use_ the hwconfig byte to save the value of the 
	hardwired switches in the CBM-II
	(mem_read_ram_snapshot, mem_read_rom_snapshot): check for 
	major version number.

	* vic20/cartridge.c (cartridge_attach_image): check for NULL
	filename.

1999-02-09  Ettore Perazzoli  <ettore@comm2000.it>

	* alarm.c (alarm_context_dispatch): Moved to `alarm.h' and made
 	inline.
	(alarm_context_update_next_pending): Likewise.

	* drive/via1drive0.c: #define `mycpu_alarm_context' and `MYVIA_NAME'
	appropriately.  Removed alarm #defines required by the old API.
	* drive/via2drive0.c: Likewise.
	* drive/via1drive1.c: Likewise.
	* drive/via2drive1.c: Likewise.

	* viacore.c (reset_myvia): Use the new alarm API.
	(store_myvia): Likewise.
	(int_myviat1): Likewise.
	(int_myviat2): Likewise.
	(myvia_read_snapshot_module): Likewise.

	* drive/drivecpu-tmpl.c (mydrive_cpu_init): Initialize the two
	VIAs and the 1571/1581 CIAs using the new `*_init()' hooks.

	* drive/via1drive0.c (myvia_init): #Define to `via1d0_init'.
	* drive/via2drive0.c (myvia_init): #Define to `via2d0_init'.
	* drive/via1drive1.c (myvia_init): #Define to `via1d1_init'.
	* drive/via2drive1.c (myvia_init): #Define to `via2d1_init'.

	* viacore.c (myvia_init): New function, initializing the VIA
	alarms with the new API.

	* rsuser.c: Use the new alarm API.

	* drive/drivecpu-tmpl.c (mydrive_cpu_init): Initialize the alarm
 	context.

	* c64/c64.c (machine_init): Call `acia1_init()'.

	* acia-tmpl.c (myacia_init): New function.
	(myacia_write_snapshot_module): Temporarily `#if 0'ed out part
	using `alarm_clk' from the old `cpu_int_status' struct.  TO BE
	FIXED.
	(reset_myacia): Updated to use the new `alarm*' functions.
	(myacia_read_snapshot_module): Likewise.
	(store_myacia): Likewise.
	(int_myacia): Likewise.

	* interrupt.c (prevent_clk_overflow): Do nothing for now.  TO BE
	FIXED.
	(interrupt_read_snapshot): Do not reset alarms anymore.

	* interrupt.h: Removed all the alarm-specific stuff.
	(cpu_int_status_init): Removed `num_ints' parameter; all callers
 	updated.

	* drive/drivecpu-tmpl.c: New variable `mydrive_alarm_context'.

	* maincpu.c (reset): Temporarily pass 0 as the number of alarms to 
	`cpu_int_status_init()'.

	* cia-tmpl.c: New variable `mycia_alarm'.  Removed
	`MYCIA_USE_INLINE' stuff.
	(mycia_init): New function.
	(my_set_tai_clk): Use the new `alarm_*' functions to set/unset
 	alarms.
	(my_unset_tai): Likewise.
	(my_set_tbi_clk): Likewise.
	(my_unset_tbi): Likewise.
	(reset_mycia): Likewise.
	(int_myciata): Likewise.
	(int_myciatb): Likewise.
	(int_myciatod): Likewise.
	(mycia_write_snapshot_module): Likewise.  WARNING: This breaks
	snapshot functionality.
	(mycia_read_snapshot_module): Likewise.

	* c64/c64.c (machine_init): Call `cia1_init()' and `cia2_init()'.

	* vmachine.h: Alarm list `#if 0'ed out.

	* c64/vicii.c: New static variables `raster_fetch_alarm',
 	`raster_draw_alarm' and `raster_irq_alarm'.
	(vic_ii_init): Initialize them.
	(update_int_raster): Use the new `alarm_*' functions to set/unset
 	alarms.
	(reset_vic_ii): Likewise.
	(store_vic): Likewise.
	(int_raster): Likewise.
	(int_rasterfetch): Likewise.
	(int_rasterdraw): Likewise.
	(vic_ii_prepare_for_snapshot): Likewise.
	(vic_ii_read_snapshot_module): Likewise.

	* c64/c64.c (machine_reset): Do not initialize the alarm handler
	array anymore.

	* 6510core.c: Use the new `alarm_context*' functions and
	`ALARM_CONTEXT' to check and dispatch pending alarms.

	* c64/c64.c (machine_init): Call `maincpu_init()'.
	* pet/pet.c (machine_init): Likewise.
	* c128/c128.c (machine_init): Likewise.
	* cbm2/c610.c (machine_init): Likewise.
	* vic20/vic20.c (machine_init): Likewise.

	* maincpu.c: New variable `maincpu_alarm_context'.  New #define
 	`ALARM_CONTEXT'.
	(maincpu_init): New function.

	* alarm.h, alarm.c: New files, new alarm implementation.

1999-02-07  Tibor Biczo  <crown@mail.matav.hu>

	* arch/win32/c64ui.c: Include kbd.h.

	* arch/win32/kbc.c (set_keymap_index): Patch for not implemented
	  positional keyboard mapping.

	* arch/win32/uipetset.c (init_dialog): Changed KeymapIndex
	  resource value from 1 to 2.
	  (dialog_proc): Same here.

1999-02-07  Tibor Biczo  <crown@mail.matav.hu>

	* arch/win32/c64ui.c (c64_ui_specific): Added cartridge freeze
	  handling.

	* arch/win32/kbd.c (kbd_clear_matrix): New function, clears
	  keyboard matrix.

	* arch/win32/kbd.h (kbd_clear_matrix): Added prototype for new
	  function.

	* arch/win32/res.h (IDM_CART_FREEZE): New identifier for cartridge
	  freeze menuitem.

	* arch/win32/resc128.r arch/win32/resc64.r arch/win32/rescbm2.r
	  arch/win32/respet.r arch/win32/resvic.r: Added shortcut keys
	  to menu items.
	  arch/win32/resc64.r: Added cartridge freeze menu item.

	* arch/win32/ui.c (toggle_list): Added shortcut key to
	  WarpMode toggle.
	  (c64_accel) (c128_accel) (cbm2_accel) (pet_accel) (vic_accel):
	  Added shorcut key definition tables.
	  (ui_init): Added shortcut key resource init.
	  (ui_init_finish): Set shortcut accelerator cleanup routine
	  to exit list.
	  (ui_exit): Destroy shortcut accelerators.
	  (ui_dispatch_next_event): Handle shortcut accelerators.
	  (handle_wm_command): Handle shortcut acceleratos.
	  Changed from mem_powerup to machine_powerup when HardReset.

1999-02-08  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.24.

	* c128cpu.c: Removed `NO_INSTRUCTION_FETCH_HACK', `JUMP', `STORE',
	`DO_NOT_INCLUDE_MEM_READ_BASE', `LOAD' defines.

	* c128/c128mem.c: Introduced memory config tables for read, write,
	base and limit.  (initialize_memory, store_mmu): Changed for new
	banking.

	* c64/c64mem.c: Removed some obsolete debugging messages.

1999-02-07  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.23.

	* c64/c64mem.c (initialize_memory): Added support for ROML/ROMH
	bank limits.

	* drive/drivecpu-tmpl.c (JUMP): Added support for bank limits.

1998-02-07  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* pet/petmem.c (pet_set_conf_info): new function to set all 
	PET resources _except_ the ROM-related ones. Used by 
	mem_read_ram_snapshot.
	(petres): made from PetInfo to PetRes.
	(mem_load_kernal, mem_load_editor, mem_load_chargen): check
	for IS_NULL(filename)
	(mem_write_ram_snapshot): changed version from 1.0 to 1.1, added
	byte that describes whether the emulator uses positional or
	symbolic mapping - I wonder whether that belongs here, it's not
	a state of the emulated machine, but can be _very_ convenient.
	(mem_read_ram_snapshot, mem_read_rom_snapshot): check major
	version of snapshot file.
	(mem_read_ram_snapshot): use a local PetInfo struct instead of 
	changing the resources before calling pet_set_conf_info now.
	(mem_write_rom_snapshot): deinstall traps before saving the 
	snapshot, and install them again afterwards by calling petmem_checksum.
	(mem_read_rom_snapshot): "uninstall" current ROMs by setting
	the resources to NULL. They can only be saved with a snapshot
	and thus a "dump ROMset" would yield bogus values.
	Compute checksum over kernal/editor and install traps if necessary.
	(pet_set_model_info): split pet_set_conf_info off of it.

	* pet/pets.h (PetInfo): remove run-time struct entries
	(PetRes): old PetInfo struct, but ROM names can be changed.

	* pet/petvia.c (undump_pcr): call crtc_set_char() to restore
	upper/lower char selection on snapshot load.

1999-02-06  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.22.

	* 6510core.c: Reduced code duplication of `NOOP' commands.
	Removed some old debugging cruft.

	* arch/msdos/tuimenu.c (tui_menu_handle): Handle `K_Left' and
	`K_Right'.
	* arch/msdos/tuiimagebrowser.c (tui_image_browser): Changed
	likewise.

	* c128/c128mem.c (mem_load_kernal, mem_load_basic,
	mem_load_chargen): Return `0' on success.

	* vic20/vic20mem.c (mem_load): Removed unused variables.

	* c1541.c (name_cmd): Corrected pointer mismatch.

	* vdrive-iec (floppy_create_directory): `name' made const.
	* vdrive.c, vdrive.h (vdrive_dir_find_first_slot): Likewise.

	* vdrive.h: Made const `find_name' of struct `_DRIVE'.

	* vdrive.c (floppy_name_match): Made const parameter `name'.

	* drive/via1drive0.c, drive/via1drive1.c, drive/via2drive0.c,
	drive/via2drive1.c (store_pra): Use `oldpa_value' instead of
	`old_pa'.

	* traps.h: Made const `name' of struct `trap_t'.

	* pet/pets.h: Made const `chargenName', `kernalName', `editorName',
	`memBname', `memAname', `mem9name' of struct `PetInfo'.

	* parallel.c: Made const `name' of struct `State_t'.

	* sound.c (closesound, suspendsound): Parameter is const.

	* vic20/vic20sound.c (sound_machine_store): Use `divide' instead
	of `div'.

	* zfile.c: Made const strings in struct `valid_archives'.
	(try_uncompress_archive, try_uncompress_zipcode,
	try_uncompress_lynx, try_uncompress): Made const.

	* imagecontents.c (image_contents_read_disk): Do not use nested
	variable names.
	* arch/unix/xaw/uimenu.c (ui_menu_create): Likewise.

	* arch/unix/xaw/vic20ui.c: Removed unused `toggle_RAMBlock4'.

	* c128/c128iec.c: #include "c64iec.h".

	* arch/win32/uicbm2set.c (enable_controls_for_cbm2_settings):
	Commented out unused function.

	* mon.h (mon_disassemble_to_string): Added prototype.

1999-02-05  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.21.

1998-02-05  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* data/C128/Makefile.am [c128_DATA]: added file default.vrs

	* data/C128/default.vrs: new file

	* Makefile.am (maincpu_sources): remove maincpu.def
	(EXTRA_DIST): remove cpu-tmpl.c
	(BUILT_SOURCES): remove maincpu.c

	* arch/unix/xaw/c128ui.c (c128_romset_submenu): new submenu to 
	load ROMs/romsets
	(c128_menu): add "Memory settings" submenu for romsets

	* c128/Makefile.am (libc128_a_SOURCES): remove c128cpu.def
	(BUILT_SOURCES): remove c128cpu.c

	* c128/c128cpu.c: Only a few lines left and an include of maincpu.c

	* c128/c128mem.c (mem_load_kernal, mem_load_basic, mem_load_chargen):
	new functions to load ROMs from resource names.
	(set_chargen_rom_name, set_kernal_rom_name, set_basic_rom_name):
	call mem_load_*() functions to load ROMs when resources change.
	(mem_load): call mem_load_*() functions to actually load the ROMs.

	* cbm2/c610mem.c, pet/petmem.c, vic20/vic20mem.c (mem_load): return 
	with error when any of the mem_load_*() functions fail.

	* cpu-tmpl.c, maincpu.def: removed files

	* maincpu.c: define INSTRUCTION_FETCH_HACK only if "Veto" define
	NO_INSTRUCTION_FETCH_HACK is not defined (needed in x128)

	* romset.c (romset_load): do not call mem_load() anymore - setting
	the resources does the trick already.

	* TODO: Added a wishlist for future development (not in the works,
	no promises, after 1.0 anyway.)

1998-02-04  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* arch/msdos/menudefs.c (quit_callback): change serial_remove to
	serial_remove_file.

	* cbm2/Makefile.am (libcbm2_a_SOURCES, BUILT_SOURCES): 
	remove c610cpu.def. Also 
	(c610cpu.c): not built anymore

	* cbm2/c610cpu.def: removed file

	* cbm2/c610cpu.c: not the generated file anymore; now just defined
	what's different in cbm-II and includes maincpu.c

	* cbm2/c610mem.c (bank_base, bank_limit, old_reg_pc): new variables 
	for bank change handling.
	(set_bank_exec): set bank_limit and bank_base when execution bank
	changes.
	(mem_load): fill $f0800-$f1000 with $ff as well.
	(mem_set_bank_pointer): new function to set addresses to bank_base 
	and bank_limit.

	* romset.c (rosmet_dump): change s to const char, removing some
	compile warnings.

1998-02-04  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* arch/unix/xaw/vic20ui.c (vic20_romset_submenu): new entries to
	load system ROMs

	* vic20/vic20mem.c (mem_romset_resources_list): add cartridge
	resources
	(mem_load_kernal, mem_load_basic, mem_load_chargen):
	new functions to load the appropriate ROM image
	loads only when roms_loaded has been set in mem_load, after init.
	(set_chargen_rom_name, int set_kernal_rom_name, set_basic_rom_name):
	call functions to actually load ROMs when the resource is 
	changed
	(mem_load): call mem_load_{kernal|basic|chargen} instead of
	loading the ROMs itself.

1999-02-04  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.20.

	* maincpu.def (mainloop) [INSTRUCTION_FETCH_HACK]: Call
	`mem_set_bank_pointer'.  (JUMP): Update `old_reg_pc' too.

	* mem.h, c64/c64mem.c, vic20/vic20mem.c, pet/petmem.c
	(mem_set_bank_pointer): New function.

	* c64/c64mem.c (pla_config_changed): Adjust bank base and limit.

1999-02-04  Tibor Biczo  <crown@mail.matav.hu>

	* arch/win32/res.h (IDM_SIDTYPE_6581, IDM_SIDTYPE_8580):
	  Added identifier's for SidModel menu entries.

	* arch/win32/resc128.r, arch/win32/resc64.r: Added menuitems for
	  SidModel selection.

	* arch/win32/rescbm2.r: Added Resid enabler menu item.
	  Added SidModel selection menu items.

	* arch/win32/respet.r, arch/win32/resvic.r: Removed SidFilter
	  toggle from menu.

	* arch/win32/ui.c (SidType): Added new struct for possible elements
	  of SidModel resource, to link them to the appropriate menu entries.
	  (value_list): Added SidModel resource into list of checked resources
	  when displaying the menu.
	  (ui_update_menus): Check if queried resource exists or not, and
	  only update menu entries if it does.
	  (handle_wm_command): Add handlers for SidModel selection menu entries.

1998-02-04  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* pet/petmem.c (petres): default startup with sensible values
	(set_video): allow cols=0 again for autodetection from ROM.
	(set_chargen_rom_name, set_editor_rom_name, set_rom_module_9_name,
	set_rom_module_a_name, set_rom_module_b_name): load new ROM
	only when new name is different from old.
	(set_std_9tof): use petres.rompatch to enable PET2001 ROM patch
	mapping.
	(petmem_patch_2001): set petres.rompatch
	(petmem_checksum): do not print messages when same checksum 
	occured (but install traps etc)
	(petmem_convert_chargen_2k): fixed
	(mem_load_kernal): clear petres.rompatch after loading.
	Call initialize_memory() to enable/disable PET2k patch mapping.
	(mem_load): call tape_deinstall before overwriting ROM area
	with emtpy values.

	* pet/pets.h (PetInfo): add rompatch to struct.

1998-02-03  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* arch/unix/xaw/c610ui.c (cbm2_romset_submenu): new entries to
	unload Basic and Cartridge ROMs.

	* arch/unix/xaw/petui.c (toggle_Basic1, toggle_Basic1Chars): 
	new callbacks for resources Basic1 and Basic1Chars
	(pet_romset_submenu): new entries to load/unload the ROMs.
	Also enable/disable Pet2k patches.

	* arch/unix/xaw/uisettings.c, arch/unix/xaw/uisettings.h 
	(ui_unload_rom_file): new function

	* cbm2/c610mem.c (mem_load_basic, mem_load_cart_1, mem_load_cart_2,
	mem_load_cart_4, mem_load_cart_6): if ROM is not loaded, fill
	area with $ff instead.

	* pet/Makefile.am (libpet_a_SOURCES): remove pets.c

	* pet/pet.c (machine_init_resources, machine_init_cmdline_options):
	remove calls to pet_*

	* pet/pet.c, pet/petmem.c, pet/petpia1.def, pet/pets.h: 
	renamed all occurances of (PetInfo) pet to petres. removed
	petres->pet define.

	* pet/petmem.c (mem_load_chargen, mem_load_kernal, mem_load_editor,
	mem_load_rom9, mem_load_romA, mem_load_romB): new functions to
	load appropriate ROMs or fill the area with empty values.
	handle petres.basic_start to not overwrite overlapping ROMs.

	* pet/pets.c, pet/petmem.c (set_iosize, set_crtc_enabled,
	set_superpet_enabled,  set_ram_9_enabled, set_ram_a_enabled,
	set_ramsize, set_video, set_chargen_rom_name, 
	set_kernal_rom_name, set_editor_rom_name, set_rom_module_9_name,
	set_rom_module_a_name, set_rom_module_b_name, resources,
	cmdline_options, pet_table, pet_set_model_info, pet_set_model,
	pet_check_info):
	moved from pets.c to petmem.c. Setting ROM name esource 
	also loads the ROM now.
	(set_pet2k_enabled, set_pet2kchar_enabled): new functions for
	Basic1 and Basic1Chars resource.
	(patch_2001, petmem_patch_2001): renamed from former to latter
	(petmem_checksum): new function to handle traps etc depending
	on ROM checksums
	(petmem_convert_chargen_2k): new function to convert Pet2k
	chargen and convert back.
	(mem_load): moved all load stuff into 
	
	* pet/pets.h (PetInfo): added pet2kchar flag, rom_video
	(former screen_width), basic_start, kernal_checksum and
	editor_checksum

	* tape.c, tape.h (tape_deinstall): new function to deinstall tape
	traps.

1999-02-03  Andreas Dehmel  <dehmel@forwiss.tu-muenchen.de>

	* arch/riscos/archdep.c, sysfile.c: complete_path_return may be NULL
 
	* romset.c, romset.h: Added functions to handle files containing
	multiple romset definitions. romset_select() still incomplete.

1999-02-03  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.19.

1998-02-02  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* arch/unix/xaw/c610ui.c (cbm2_romset_submenu): add entries to
	load single ROM files

	* arch/unix/xaw/uisettings.c (ui_load_rom_file): new callback
	to select a ROM file and save it to a resource.

	* arch/unix/xaw/uisettings.h (ui_load_rom_file): new prototype

	* cbm2/c610mem.c (mem_load_chargen, mem_load_kernal, mem_load_basic,
	mem_load_cart_1, mem_load_cart_2, mem_load_cart_4, mem_load_cart_6):
	new functions. Each one loads a different ROM. The function is 
	called when setting the resources. To avoid startup trouble,
	the ROM is only loaded when "rom_loaded" is set, which is done
	in mem_load, that also calls those routines after setting
	rom_loaded.
	(set_chargen_rom_name, set_kernal_rom_name, set_basic_rom_name,
	set_cart1_rom_name, set_cart2_rom_name, set_cart4_rom_name, 
	set_cart6_rom_name): call appropriate mem_load_*() 
	routine to replace ROM when the resource is changed.
	(mem_load): remove all ROM loading (moved to mem_load_*()) and
	call mem_load_* instead, after enabling the ROM loading by
	setting rom_loaded.

1999-02-02  Andreas Dehmel  <dehmel@forwiss.tu-muenchen.de>

	* arch/riscos/*: some bugfixes, Romset support, updated cartridges,
	added SuperPET.

	* c64/c64mem.c: proper ANSI signatures, fixed 1541 romset bug.

	* sounddrv/soundacorn.c: some restructuring for more stability.

1998-02-01  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* doc/vice.texi: Add a romset file description; Fix that the
	path contains the $HOME/.vice/EMU directory; Move the .vicerc
	file to .vice/vicerc in the docs as well.

	* arch/unix/archdep.c (archdep_default_resource_file_name):
	add "const" to a variable.
	(archdep_default_save_resource_file_name):
	add "const" to a variable; give concat an end marker for the 
	variably sized argument list...

1999-02-01  Tibor Biczo  <crown@mail.matav.hu>

	* serial.c (serial_select_file): Added #ifdef HAVE_PRINTER to
	prdevice initialization.
	(serial_remove_file): Added #ifdef HAVE_PRINTER to prdevice
	detaching.

1999-01-31  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.18.

	* c64/c64mem.c (set_reu_enabled): Call `activate_reu' when REU is
	enabled.

	* drive/drive.c (drive_write_protect_sense): Clear attach clock
	correctly.

	* drive/via2drive0.c, drive/via2drive1.c (read_pra): Fixed long-
	standing and stupid bug with drive data port and attach clock.

1998-01-31  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* arch/unix/xaw/video.c (cmdline_options):
	change wrong "XSync" resource name to "UseXSync", i.e.
	make "-xsync" and "+xsync" work again.
	(video_init): check for display number in the DISPLAY variable
	when autodetecting local or remote execution. 
	Now display number >= 10 is assumed to be a ssh connection,
	thus not local.

	* romset.c (romset_load, romset_dump): call log_message
	instead of log()...

1998-01-31  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* data/CBM-II/Makefile.am (cbm2_DATA): add .vrs files

	* data/CBM-II/rom128h.vrs, data/CBM-II/rom128l.vrs, 
	data/CBM-II/rom256h.vrs, data/CBM-II/rom256l.vrs,
	
	* data/PET/Makefile.am (romsets): remove default.vrs, because
	there is no default.

	* data/PET/default.vrs: removed

	* data/VIC20/Makefile.am (vic20_DATA): added default.vrs

	* data/VIC20/default.vrs: new file

	* arch/unix/xaw/c128ui.c, arch/unix/xaw/c610ui.c,
	arch/unix/xaw/c64ui.c, arch/unix/xaw/petui.c
	(palette_submenu): add entry for custom load (why does VIC20 
	does not have a palette menu?)

	* arch/unix/xaw/c610ui.c (cbm2_romset_submenu: new submenu
	(model_settings_submenu): new entry for romsets.

	* arch/unix/xaw/petui.c (petui_dump_romset): removed (moved
	to uisettings.c)
	(pet_romset_submenu): adjusted to available romset files
	
	* arch/unix/xaw/uisettings.c (ui_load_palette): new function
	to load a custom palette file.
	(ui_dump_romset): new function to load custom romset
	(set_printer_dump_file): replaced by set_printer_exec_file,
	because file selector cannot select non-existing file :-(

	* arch/unix/xaw/uisettings.h (ui_dump_romset,ui_load_palette):
	new prototypes

	* arch/unix/xaw/vic20ui.c (vic20_romset_submenu): new submenu
	(memory_settings_submenu): new entry for romsets

	* c128/c128iec.c, c64/c64iec.c, vic20/vic20iec.c: include stdio.h, 
	because resources.h needs FILE*

	* c128/c128mem.c, c64/c64mem.c, cbm2/c610mem.c, pet/petmem.c,
	vic20/vic20mem.c (mem_romset_resources_list): new list of resources 
	to be saved in a romset file

	* mem.h (mem_romset_resources_list): new prototype

	* romset.c (romset_load): log the load
	(romset_dump): use char** instead of variable args list to get the
	list of resources to save.
	Log the save.

	* romset.h (romset_dump): changed prototype

	* vic20/vic20.c (rawaddrs): enter the allowed VIC20 Basic start
	addresses.

1999-01-31  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.17.

	* resources.h: #include <stdio.h>.

	* drive/drive.h: Added `attach_detach_clk' to struct `drive_t'.

	* drive/drive.c: Added correct write protection bit emulation when
	a disk image is attached and an existing one is automatically
	detached.

1998-01-31  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* data/PET/Makefile.am (romsets): new list of romset files

	* data/PET/default.vrs, data/PET/rom1.vrs, /data/PET/rom2b.vrs,
	data/PET/rom2g.vrs, data/PET/rom4b4.vrs, data/PET/rom4b8.vrs,
	data/PET/rom4g.vrs: new romset definition files.

	* Makefile.am (noinst_HEADERS, base_sources): add romset.[ch]

	* arch/unix/xaw/petui.c (petui_dump_romset): new function to 
	dump a romset file.
	(pet_romset_submenu): new submenu with the romset entries.
	(model_settings_submenu): add entry for ROMset submenu

	* arch/unix/xaw/uisettings.c (ui_set_romset, ui_load_romset):
	new functions to set (load) a predefined romset or prompt
	the user for a romset file.

	* arch/unix/xaw/uisettings.h (ui_set_romset, ui_load_romset):
	new prototypes 

	* resources.c (resources_write_item_to_file): new function to 
	save a resource given by name to a given file.
	(resources_get_default_value): new function, returns const
	pointer to the default value for the resource. Thought I'd
	use it, but is not used so far.
	(read_resource_item, resources_read_item_from_file):
	renamed from former to latter and made publicly available.

	* resources.h (resources_get_default_value, 
	resources_write_item_to_file, resources_read_item_from_file):
	new prototypes

	* romset.c, romset.h: new file. contains 
	(romset_load): loads a file that contains a number of resource 
	lines and then calls mem_load().
	(romset_dump): writes out a file with the given resources in it.

1998-01-30  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* arch/unix/print.c (resources): set default for PrDevice2 to
	"|petlp -F PS|lpr" instead of without the "-F PS". This option
	enables postscript output by default.

	* prdevice.c (write_pr): automagically open the printer device
	if the printer is written to without a previous open_pr.
	(prdevice_detach): flush & close printer device.
	(attach_prdevice, detach_prdevice): new empty functions
	for calling from serial_select_file and serial_remove_file.

	* serial.c (serialcommand, serialattention, serialsendbyte, 
	parallelcommand, parallelattention, parallelsendbyte): 
	change semantics of the serialdevice[]->isopen[] entry. 
	If 0, then no open has been done on the channel. 
	If 1, then open is in progress (computer is sending the
	filename).
	If 2, then the file has successfully been opened.
	Also now, even if isopen[] is _0_, send the byte to the
	device code! This is needed as "OPEN1,4" does not 
	send the open to the bus, thus the printer cannot be
	opened the usual way.
	(serial_remove, serial_remove_file): rename serial_remove to 
	serial_remove_file. Call detach_prdevice for printers 4 and 5.
	(serial_select_file): Call attach_prdevice for printers 4 and 5.
	(serial_detach_device): new function. Set the "inuse" flag to 0,
	such that accessing the device returns "Device not present".

	* serial.h (serial_remove): removed prototype
	(serial_remove_file,serial_detach_device): new prototypes

	* attach.c, c128/c128.c, c64/c64.c, cbm2/c610.c, pet/pet.c,
	vic20/vic20.c (machine_shutdown): rename serial_remove to 
	serial_remove_file.

	* autostart.c (rawaddr): new variable. Points to a list of valid
	BASIC prg start addresses for the current emulator.
	(autostart_init): add parameter _rawaddr.
	(autostartmode): add AUTOSTART_HASFILE to enum
	(autostart_advance): check for _HASFILE and handle it.
	(autostart_rawfile): new function to detect a raw CBM file.
	Does not work for compressed files.
	(autostart_autodetect): check raw CBM files.

	* autostart.h (autostart_init): changed prototype.

	* c128/c128.c, c64/c64.c, pet/petmem.c, vic20/vic20.c, cbm2/c610mem.c 
	(machine_init, mem_load): when calling autostart_init, 
	add rawaddrs parameter. 

1999-01-30  Oliver Schaertel  <orschaer@forwiss.uni-erlangen.de>

	* arch/unix/xaw/ui.c: Fixed compiling problems on machines
 	without XFree86 with videomodextensions.
	Added commandline option for fullscreen option.

	* c64/c64mem.c, drive/drive.c: Fixed some bugs in RomSet-code.

	* c64/vicii.c, crtc-tmpl.c, vic20/vic.c: Added commandline options
	for doublesize and doublescan in fullscreen-mode.
	
1999-01-30  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.16.

	* 6510core.c (FETCH_OPCODE): Added missing cast.

	* arch/win32/ui.c (save_snapshot_trap, load_snapshot_trap,
	mon_trap): New functions.
	(handle_wm_command): Use traps to load and save snapshots and to
	call the monitor.

	* arch/win32/uisnapshot.c (ui_snapshot_load_dialog): Fixed
	extension name.

	* res.r (IDD_SNAPSHOT_SAVE_DIALOG): Added name.

1998-01-29  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* cbm2/c610cpu.def (JUMP,FETCH_OPCODE,p0,p1,p2,opcode_t,PRE_CPU_LOOP): 
	add handling of bank_limit if INSTRUCTION_FETCH_HACK is defined.

	* cbm2/c610mem.c (mem_read_limit_tab, mem_read_limit_tab_ptr): 
	new variables to hold the bank_limit values.
	(set_bank_exec, initialize_memory): handle bank_limit tables

	* crtc-tmpl.c (crtc_init): do not set the screen width to 
	40 columns - makes screen width flicker in xcbm2
	Now works.

	* pet/petmem.c (set_std_9tof,store_8x96,set_vidmem,initialize_memory):
	set -1 in mem_read_limit_tab for non-bank_base access.

	* vic20/vic20mem.c (set_mem): handle mem_read_limit_tab
	(initialize_memory): remove bogus -1 fill of mem_read_limit_tab.

1999-01-29  Tibor Biczo  <crown@mail.matav.hu>

	* arch/win32/res.h (IDM_MONITOR): Added identifier for Monitor
	  menu item.

	* arch/win32/resc128.r arch/win32/resc64.r arch/win32/rescbm2.r
	  arch/win32/respet.r arch/win32/resvic.r: Included monitor
	  into menu.

	* arch/win32/ui.c: Include maincpu.h.
	  (handle_wm_command): Handle monitor menu item.

	* mon.c: Include windows.h when compiling for Win32.
	  (readline): Flush mon_output, otherwise the screen
	  will not be updated correctly on Win32.
	  (mon): Added console window opening and closing code.

1999-01-28  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.15.

	* 6510core.c (FETCH_OPCODE): Check whether PC is within the memory
	range limits instead of using `bank_base'.

	* c128/c128cpu.c, cbm2/c610cpu.c, cpu-tmpl.c (mem_read_limit):
	New function to update the memory range limit.

	* c64/c64mem.c: New variables `mem_read_limit_tab' and 
	`mem_read_limit_tab_ptr'.
	(initialize_memory): Set memory range limits.  New array
	`limit_tab' containing memory range limits.

	* drive/drivecpu-tmpl.c: New variable `bank_limit'. Set to `-1'
	for the moment.

	* maincpu.def: Define `INSTRUCTION_FETCH_HACK'.
	(JUMP): Also update memory range limit.

	* mem.h: New variable `mem_read_limit_tab_ptr'.

	* pet/petmem.c: Adjusted names of memory range limit variables to
	match the CPU ones.

	* vic20/vic20mem.c: New variables `mem_read_limit_tab' and
	`mem_read_limit_tab_ptr'.  Set all limits to `-1' for now.

1998-01-28  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* pet/petmem.c (_mem_read_limit_tab, _mem_read_limit_tab_ptr):
	new variables to hold/point to the bank_limit tables.
	(initialize_memory, set_std_9tof, store_8x96, set_vidmem):
	in all places where _mem_read_base_tab is set, set _mem_read_limit_tab
	as well.

1998-01-28  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* 6510core.c (SAX_ZERO): exchange two lines -> make it look
	similar to STA_ZERO now, and magically fixes the SAX_ZERO bug
	introduced when removing the opcode fetch hack (compiler 
	stuff (gcc version 2.7.2.1)?)

	* arch/msdos/archdep.c, msdos/archdep.h, win32/archdep.h,
	win32/archdep.c (archdep_default_save_resource_file_name): new 
	function/prototype.
	Returns same value as archdep_default_resource_file_name.
	(On Unix is creates the ".vice" subdirectory in $HOME if it 
	does not exist when saving resources)

	* maincpu.c (FETCH_OPCODE, p0, p1, p2, opcode_t): embraced
	with a check for not existing INSTRUCTION_FETCH_HACK.

1999-01-28  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.14.

1998-01-28  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* arch/unix/archdep.c (archdep_home_path): new function, returns
	the homedirectory.
	(archdep_default_sysfile_pathlist): add $HOME/.vice to system 
	search path; use archdep_home_path.
	(archdep_default_resources_file_name): use archdep_home_path
	(archdep_default_save_resources_file_name): new function. returns
	same value as archdep_default_resources_file_name, but checks if
	the $HOME/.vice directory exists and if not, creates it.
	uses archdep_home_path

	* arch/unix/archdep.h (archdep_home_path,
	archdep_default_save_resource_file_name): new prototypes

	* resources.c (save_resources): use 
	archdep_default_save_resource_file_name instead of
	archdep_default_resource_file_name

	* c128/c128mem.c, c64/c64mem.c (mem_load, initialize_memory):
	move initialization of *_mem_log from initialize_memory to 
	mem_load, because the latter is called earlier. Also change check
	from "!=LOG_ERR" to "==LOG_ERR" to make it open when it is not
	yet defined.

	* vic20/vic20mem.c (mem_load, initialize_memory):
	move initialization of *_mem_log from initialize_memory to
	mem_load, because the latter is called earlier.
	(cmdline_options): add -kernal, -basic and -chargen cmdline
	options.

	* maincpu.def (INSTRUCTION_FETCH_HACK, FETCH_OPCODE, p0, p1, p2,
	opcode_t): change/add definitions to remove opcode fetch hack 
	from maincpu. This makes it slower, but more accurate (emulator
	test suite)
	
1999-01-26  Oliver Schaertel  <orschaer@forwiss.uni-erlangen.de>

	* c64/c64mem.c, drive/drive.c: Fixed problems with loading
	default roms.

	* arch/unix/xaw/ui.c: Forbid switching back to fullscreen in 
	same cases, which can lock up the X-server.
	
1999-01-26  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.13.

	* c64/c64cia1.def, c128/c128cia1.def, vic20/vic20via1.c,
	vic20/vic20via2.c, pet/petvia.c cbm2/c610cia1.def,
	arch/unix/joystick.c, arch/unix/kbd.c, arch/unix/kbd.h,
	arch/win32/joystick.c, arch/win32/kbd.c, arch/win32/kbd.h,
	arch/msdos/joystick.c, arch/msdos/kbd.c, arch/msdos/kbd.h,
	arch/msdos/mouse.c, arch/riscos/joystick.c, arch/riscos/kbd.c,
	arch/riscos/kbd.h: Renamed `joy' to `joystick_value'.

	* arch/msdos/joystick.c, arch/msdos/menudefs.c: Renamed
	`num_joysticks' to `number_joysticks'.

1999-01-25  Tibor Biczo  <crown@mail.matav.hu>

	* arch/win32/res.h (IDM_STATUS_WINDOW): Added identifier definition
	  for status window communication.

	* arch/win32/ui.c (ui_init): Create status window for drive leds.
	  Removed sizeable border from Window style.
	  (ui_resize_canvas_window): Add status window height to requested
	  window height. Updated AdjustWindowRect to new window style.
	  (SetStatusWindowParts): New function, sets up status window.
	  (ui_enable_drive_status): Added functionality.
	  (ui_display_drive_track): Same.
	  (ui_display_drive_led): Same.
	  (ui_toggle_drive_status): Removed not used function.
	  (window_proc): Added WM_SIZE handler to resize status window.
	  Added WM_DRAWITEM to update parts in the status window.
	  In WM_PAINT handler substract size of status window when calling
	  exposure_handler.

	* arch/win32/ui.h (ui_toggle_drive_status): Removed prototype of
	  unused function.

	* arch/win32/uisound.c: Removed 50msec entry from Buffer size
	  setting.

1999-01-24  Michael Klein  <100.251394@germanynet.de>

	* c1541.c (name_cmd): New function.

1999-01-23  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.12.

	* drive/drive.c (GCR_data_writeback2): Fixed wrong number of
	parameters given to `log_error'.
	* c64/c64mem.c (mem_set_romset): Likewise.
	* tape.c (tape_receive_trap): Likewise.
	* vdrive.c (attach_floppy_image): Likewise.

	* c64/cartridge.c, c64/c64mem.c, cartridge.h: Added support for
	Funplay and Super Games cartridges.

	* arch/msdos/c64ui.c, arch/msdos/c128ui.c: Mouse is called "1351".

	* snapshot.c (snapshot_open): Do not `fclose()' a NULL pointer!

1999-01-23  Oliver Schaertel  <orschaer@forwiss.uni-erlangen.de>

	* arch/unix/c64romset.h, arch/unix/c64romset.c: New files.
	Implements searching for RomSets in vice-paths.

	* arch/unix/Makefile.am: Added c64romset.h and c64romset.c.

	* arch/unix/xaw/c64ui.c, c64/c64.c, c64/c64mem.c,
	c64/c64mem.h: More work on RomSet loading.

	* arch/unix/xaw/ui.c: Fixes for fullscreen-mode.

	* crtc-tmpl.c: Clear framebuffer in fullscreen-modes.

	* findpath.c: Removed the NEWSEMATIC-stuff

1999-01-23  Michael Klein  <100.251394@germanynet.de>

	* log.h: GCC Minor version number is called `__GNUC_MINOR__'.
	Corrected `log_*' prototypes.

1999-01-22  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.11 and 0.16.1a.

	* info.c: Updated.

1999-01-21  Tibor Biczo  <crown@mail.matav.hu>

	* arch/win32/Makefile.am (libarch_a_SOURCES): Added uisound.c,
	  uisound.h.

	* arch/win32/res.h: Added defines for sound setting dialog box.

	* arch/win32/res.r: Added sound setting dialog box.

	* arch/win32/resc128.r arch/win32/resc64.r arch/win32/rescbm2.r
	  arch/win32/respet.r arch/win32/resvic.r: Added menu entry for
	  sound settings dialog box.

	* arch/win32/ui.c: Include uisound.h.
	  (handle_wm_command): Call sound settings dialog box handler.

	* arch/win32/uisound.c: New file. Implements sound settings dialog
	  box.

	* arch/win32/uisound.h: New file.

1999-01-21  Oliver Schaertel  <orschaer@forwiss.uni-erlangen.de>

	* arch/unix/xaw/c64ui.c, arch/unix/xaw/ui.c, arch/unix/xaw/ui.h,
	arch/unix/xaw/uisettings.c:
	Fixed some fullscreenmode bugs and made some enhancements.	

	* c64/c64mem.c: Small RomSet fixes.

1999-01-21  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.10.

	* arch/win32/joystick.c: #include <ddraw.h>.

1999-01-20  Tibor Biczo  <crown@mail.matav.hu>

	* arch/win32/Makefile.am (uijoystick.c uijoystick.h): Added
	  new files.
	  Added res.r to the dependenci list of resc128.o, resc64.o,
	  rescbm2.o, respet.o, resvic.o.

	* arch/win32/joystick.c: Implemented joystick support for Win32.
        * arch/win32/joystick.h: Same here.

	* arch/win32/kbd.c: Include joystick.h.
	  (_kbd_extended_tab): Added missing Divide button on keypad.
	  (joystick_handle_key): Removed from here, it's now in joystick.c.
	  (kbd_code_to_string): New function for UI support.

	* arch/win32/kbd.h (doskbd_codes): Renamed to kbd_code_t.
	  Removed extern from function prototypes.
	  Added prototype for _kbd_extended_key_tab and kbd_code_to_string.

	* arch/win32/res.h: Added identifiers for Joystick dialogs.

	* arch/win32/res.r: Added dialog definitions for Joystick UI.

	* arch/win32/resc128.r arch/win32/resc64.r arch/win32/rescbm2.r
	  arch/win32/respet.r arch/win32/resvic.r: Added joystick setting
	  into menu.

	* arch/win32/ui.c: Include uijoystick.h.
	  (handle_wm_command): Added joystick menu handling.

	* arch/win32/uijoystick.c: New file. Implements UI for joystick.
	* arch/win32/uijoystick.h: New file.

	* arch/win32/video.c: Define prototype of video_resize.

	* arch/win32/vsync.c: Include joystick.h.
	  (do_vsync): Call joystick_update.

	* main.c: Define prototype of video_free.

1999-01-20  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.9.

1999-01-19  Oliver Schaertel  <orschaer@forwiss.uni-erlangen.de>

	* arch/unix/xaw/ui.c: Fixed some fullscreenmode bugs.
	
	* arch/unix/xaw/ui.c, c64/c64ui.c, arch/unix/xaw/uimenu.c,
	c64/c64mem.c, c64/c64mem.h: Make 'ticks' in RomSet- and
	Fullscreen-menus.
		
1999-01-19  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.8.

	* viacore.c, drive/via1drive0.c, drive/via1drive1.c,
	drive/via2drive0.c, drive/via2drive1.c, vic20/vic20via1.c,
	vic20/vic20via2.c, pet/petvia.c: Set correct snapshot name.

1999-01-19  Oliver Schaertel  <orschaer@forwiss.uni-erlangen.de>

	* arch/unix/xaw/ui.c, arch/unix/xaw/ui.h,
	arch/unix/xaw/uimenu.c:
	Added automatic hide of mouse-pointer in fullscreenmode.

	* c64/c64mem.c: (mem_load_romset_file): Use allocation
	functions of util.c instead of unix functions.
	
1999-01-18  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.7.

	* cpu-tmpl, c128/c128cpu.def: Do not include the function
	`mem_read_base' when `_mem_read_base_tab_ptr' is not used.
	Otherwise the native IRIX 6.2 compiler barfs.

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

	* arch/Makefile.am: Added RISC OS directory.

	* arch/riscos/Makefile.am: New file.

1998-01-18  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* doc/vice.texi (RS232 usage): new section to explain step by step
	how to use the RS232 emulation

	* crtc-tmpl.c (crsr_set_dirty): add checks whether crsr address
	is out of screen and whether crsr is enabled at all

	* pet/petmem.c (set_vidmem): new function to set the video
	memory ($8***) only.
	(initialize_memory): call set_vidmem to set video memory area.
	(set_screen): when setting crtc to 40 columns, always set
	vmask to 1k - otherwise switching in 8296 moves the screen
	to $9000 :-(
	Now call set_vidmem to set the $8*** memory are.

	* pet/pets.c (pet_check_info): when using SuperPet, do not set
	RAMsize to 128k but to 32k.
	(set_video): call pet_check_info and set_screen only when the
	value has been set. Do not call initialize_memory, as setting the
	screen memory is done in set_screen.

1999-01-18  Andreas Dehmel  (dehmel@forwiss.tu-muenchen.de)

	* arch/riscos/*: RISC OS specific files for 0.16.1.

1999-01-18  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.6.

	* arch/win32/res.h, arch/win32/resc128.r, arch/win32/resc64.r,
	arch/win32/rescbm2.r, arch/win32/respet.r, arch/win32/resvic.r:
	Added menu entries for drive sync settings.
	
	* arch/win32/ui.c: #include "drive.h".  (handle_wm_command):
	Handle drive settings too.  (ui_update_menus): Use the item id to
	check for end of struct instead of the value as drive sync
	settings allow negative values too.

	* arch/win32/video.c, sounddrv/sounddx.c: Removed or commented out
	some unused variables.

	* crtc-tmpl.c, vic20/vic.c: Added missing `NEED_2x' to make MSDOS
	and MS Windows port compile again.

1999-01-17  Oliver Schaertel  <orschaer@forwiss.uni-erlangen.de>

	* utils.c, utils.h: (xcalloc): New function (like calloc).

	* arch/unix/xaw/ui.c, arch/unix/xaw/c64ui.c:
	Replaced all `calloc' with `xcalloc'.

	* arch/unix/xaw/ui.c: (set_fullscreen): Consider
 	`window-DoubleSize` changes in fullscreen-mode.
	
1999-01-16  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.5.

	* findpath.c (findpath): Use old routine.

1999-01-16  Oliver Schaertel  <orschaer@forwiss.uni-erlangen.de>

	* arch/unix/xaw/c128ui.c, arch/unix/xaw/c610ui.c,
	arch/unix/xaw/c64ui.c, arch/unix/xaw/petui.c,
	arch/unix/xaw/ui.c, arch/unix/xaw/ui.h,
	arch/unix/xaw/uimenu.c, arch/unix/xaw/uisettings.c,
	arch/unix/xaw/uisettings.h, arch/unix/xaw/vic20ui.c,
	c64/c64mem.c, c64/vicii.c, crtc-tmpl.c, pet/crtc.c,
	raster.c, vic20/vic.c: More work on fullscreenmode.
	
1999-01-16  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.4.

	* c128/c128.c, c64/c64.c, cbm2/c610.c, pet/pet.c, vic20/vic20.c:
	Removed unused joystick cruft.

	* drive/via1drive0.c, drive/via2drive0.c, drive/via2drive0.c,
	drive/via2drive1.c: (undump_acr, store_acr, store_sr, store_t2l):
	Added missing functions.  (res_via): Renamed.

	* pet/petvia.c, vic20/vic20via1.c, vic20/vic20via2.c: New files
	derived from the *.def files.

	* via-tmpl.c, pet/petvia.def, vic20via1.def, vic20via2.def:
	Removed.

	* viacore.c: Replaced some macros by functions.

1999-01-15  Luca Montecchiani <m.luca@usa.net>

	* arch/unix/joystick.c , arch/unix/joystick.h
	Support for new 1.1.x Linux joystick driver with automatic
	fall back to old API if an old driver is detected at runtime.
	This is pretty useful for binary distributions of VICE (deb,rpm)
	people can built them with new driver header don't worry about
	nothing, VICE autodectect old driver and fallback automagically
	to older routine.

1999-01-15  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.3.

1999-01-15  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.2.

	* findpath.c (findpath): Commented out "path detection fix".

	* c64/c64mem.c: Removed 2nd #include <stdio.h>.
	(mem_romset_loader): Install ROM traps after loading new kernal.

1999-01-14  Oliver Schaertel  <orschaer@forwiss.uni-erlangen.de>

	* arch/unix/xaw/ui.c (set_fullscreen):
	Forbid videomode-switching in fullscreen. Restore
	the pre-fullscreen videomode.

	* arch/unix/xaw/ui.c: Replaced all `printf' with
	`log_error' or `log_message'

	* arch/unix/xaw/c64ui.c: Added `RomSets'-menu.
	
	* c64/c64mem.c. c64/c64mem.h (mem_get_romsets,
	mem_get_numromsets, mem_load_romset_file,
	mem_load_romset, me_romset_loader):
 	New function for selectable `RomSets'.

	* drive/drive.c, drive/drive.h (reload_rom_1541): 
	New function for selectable `RomSets'.
	
	* findpath.c (findpath): Fixed error in relative/absolute
	path detection.	

1999-01-14  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.1.

	* viacore.h, viacore.c; New files derived from `via-tmpl.c'.

	* Makefile.am, drive/Makefile.am: Updated to include new files and
	removed rules for `via*.def' files.

	* via1drive0.c, via1drive1.c, via2drive0.c, via2drive1.c: Removed
	automatic built source.  Move code from `via*.def' files here and
	changed to use functions instead of macros.
	
1999-01-13  Oliver Schaertel  <orschaer@forwiss.uni-erlangen.de>

	* arch/unix/xaw/c610ui.c, arch/unix/xaw/petui.c,
	arch/unix/xaw/ui.c, arch/unix/xaw/ui.h,
	arch/unix/xaw/uicommands.c,
	arch/unix/xaw/uisettings.c, c64/vicii.c,
	c64/vicii.h,cbm2/crtc.c
	crtc-tmpl.c, crtc.h, main.c, pet/crtc.c
	pet/petmem.c, raster.c, vic20/vic.c, vic20/vic.h:
	Again fixes for fullscreen-mode.

1999-01-14  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* arch/unix/joystick.c, arch/unix/joystick.h: Use Dan's new
	joystick driver again.

1999-01-13  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.1.

1998-01-13  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* c610/c610.c, pet/pet.c (machine_init): set external variable
	cbm2_init_ok resp. pet_init_ok to 1, to allow *_set_model to
	call mem_load etc.

	* c610mem.c, c610mem.h (cbm2_init_ok): new global variable to
	indicate when the emulator got into machine_init. Calling
	mem_load etc from cbm2_set_model() is malicious when this
	variable is still 0.
	(cbm2_set_model): check cbm2_init_ok before calling mem_load etc.

	* pets.c, pets.h (pet_init_ok): new global variable to
	indicate when the emulator got into machine_init. Calling
	mem_load etc from pet_set_model() is malicious when this
	variable is still 0.
	(pet_set_model): check pet_init_ok before calling mem_load etc.

1999-01-13  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* main.c (MAIN_PROGRAM): Call `joystick_init_resources' and
	`joystick_init_cmdline_options' even when no hardware joystick
	support is found.

	* c1541.c, mon.c, resources.c, utils.c, zfile.c: Only include
	`strings.h' when this header file is present.

	* info.c: Added Oliver to list of contributors.

1998-01-13  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* c1541.c (DiskFormats): Changed struct part from "char ImageFormat"
	to "signed char ImageFormat" to allow comparision <0.

	* c1541.c, mon.c, resources.c, utils.c, zfile.c: Include
	<strings.h> to get prototype for strcasecmp on AIX.

1999-01-13  Oliver Schaertel  <orschaer@forwiss.uni-erlangen.de>

	* arch/unix/xaw/c610ui.c, arch/unix/xaw/petui.c, 
	c64/vicii.c, c64/vicii.h,cbm2/crtc.c, crtc-tmpl.c,
	crtc.h, pet/crtc.c, pet/petmem.c, vic20/vic.c,
	vic20/vic.h: Fixed problems with fullscreen-mode
	and changing number of columns or changing emulation-modes.
 	
	* arch/unix/xaw/uisettings.c (toggle_DoubleScan):
	DoubleScan can now enabled/disabled again.
	
	* arch/unix/xaw/ui.c, arch/unix/xaw/ui.h (video_setfullscreen):
 	New function introduced, but not used yet.

	* arch/unix/xaw/c64ui.c: Added hotkey for swaping joystick ports.

1999-01-13  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.0.5.

	* arch/msdos/menudefs.c (attach_tape_callback,
	detach_tape_callback): Call proper tape functions.

	* arch/unix/xaw/uicommands.c (detach_tape): Use
	`tape_detach_image' to detach tapes.
	* arch/win32/ui.c (handle_wm_command): Changed likewise.

	* c1541.c: #include <stdarg.h>, #include <limits.h>.
 	(create_cmd): Some cosmetics to get the compiler silent.

	* t64.c (t64_seek_to_next_file): Set the starting file number to
	`-1' on rewind.

	* tape.c, tape.h (tape_find_header_trap): Duh, set end address too.
	(tape_get_file_name): New function.

	* utils.c (spawn) [WIN32]: Define `_S_IREAD' and `_S_IWRITE' when
	not present.

	* arch/unix/xaw/uisettings.c (toggle_DoubleSize,
	toggle_DoubleScan): Grey out this menu entries when fullscreen
	mode is enabled.

1999-01-13  Oliver Schaertel  <orschaer@forwiss.uni-erlangen.de>

	* arch/unix/xaw/ui.c, unix/xaw/uicommands.c, c64/vicii.c,
	crtc-tmpl.c, vic20/vic.c: Some small fullscreen support tweaks.

	* main.c (MAIN_PROGRAM): Added some more `HAS_JOYSTICK'.

1998-01-13  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* main.c (MAIN_PROGRAM,exit64): embrace calls to joystick_init
	and joystick_close with #ifdef HAS_JOYSTICK

1999-01-12  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.0.4.

	* main.c (MAIN_PROGRAM): Disabled error message as this can crash
	the emulator. Some real fix is required here.

1999-01-11  Oliver Schaertel  <orschaer@forwiss.uni-erlangen.de>

	* arch/unix/xaw/ui.c, arch/unix/xaw/uisettings.c, main.c,
	arch/unix/xaw/ui.h: Added support for fullscreen mode.

	* c64/vicii.c, c64/vicii.h, crtc-tmpl.c, crtc.h, vic20/vic.c,
	vic20/vic.h (video_setfullscreen): New function.

	* types.h: Always define `BYTE' as `unsigned char'.

1999-01-11  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.0.3.

	* arch/msdos/menudefs.c (attach_disk_callback): Removed `lnx' from
	filter pattern.

	* arch/msdos/uisnapshot.c (file_name_callback): Check for `NULL'
	before copying file name.

1999-01-11  Tibor Biczo  <crown@mail.matav.hu>

	* utils.c (spawn): Implemented spawn function for Win32.

	* zfile.c (zfile_list_add): On Win32 file names always contain
	full path information.

1999-01-10  Andreas Dehmel  <dehmel@forwiss.tu-muenchen.de>

	* vice.h, sid/sid.c sid/resid.cc: casting large floating point
	values to integers produces undefined results; on RISC OS these
	are unrecoverable floating exceptions. Therefore I added the
	macros BIG_FLOAT_TO_INT, BIG_FLOAT_TO_UINT to vice.h to handle
	casting potentially large FP-values to (un)signed integers by
	optionally applying fmod() first. These should be used whenever
	clocks, sound_sample_position() and similarily unbounded floating
	values are cast to ints (not all casts, of course!)

	* sounddrv/soundacorn.c: some restructuring.

1999-01-09  Michael Klein  <100.251394@germanynet.de>

	* vdrive.c, vdrive.h (vdrive_bam_read_bam): Made non-static and
	added missing `break' statement.

	* imagecontents.c (image_contents_read_disk): Use
	`vdrive_bam_read_bam' to retrive BAM data.

1999-01-08  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.0.2.

	* arch/msdos/menudefs.c (attach_disk_callback): Updated filter for
	the file selector.
	* arch/win32/ui.c (handle_wm_command): Likewise.
	* arch/win32/uiattach.c (dialog_proc): Likewise.

	* arch/msdos/tuifs.c (file_list_read_lfn, file_list_read_nolfn):
	Added support for multiple filter pattern.
	(tui_file_selector): Fixed dereference of NULL pointer.

	* arch/win32/archdep.c, arch/win32/c64ui.c, arch/win32/ui.c:
	Removed unused variables.

	* zfile.c: Updated archive extensions.

1999-01-07  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.0.1.

1999-01-07  Tibor Biczo  <crown@mail.matav.hu>

	* arch/win32/ui.c (handle_wm_command): Disks were always
	attached to device 8. Fixed.

	* arch/win32/uiattach.c (dialog_proc): Disks were always
	attached to device 8. Fixed.

1998-01-07  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* configure.in: Only check for `sys/audio.h' when compiling on
	HP-UX.

1998-01-06  Luca Montecchiani  <m.luca@usa.net>

	* arch/unix/joystick.c, arch/unix/joystick.h: New joystick driver.

1999-01-04  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.16.0.

	* arch/msdos/vicesb.c (vicesb_detect): Use new logging system
	instead of using stdio.
	* sounddrv/soundsb.c (sb_write): Changed likewise.

	* arch/msdos/vsync.c (vsync_disable_timer): Fixed CBM-II sync.

	* arch/win32/res.r: Updated dates.

	* attach.c, drive/drive.c: Increased snapshot major to `1'.

1999-01-04  Daniel Sladic  <Daniel_Sladic@evans.stampede.cs.cmu.edu>

	* mon.c, mon.h: Better handling of errors during file operations.
	Dump/undump now work. First try at io command. (not working)
	Merged load/bload and save/bsave functions. Changed symbol file
	format to a list of monitor commands. Chaned monitor prompt.
	Support exit/quit as attached commands to checkpoints.

	* mon_lex.l, mon_parse.y: Some minor bug fixes. Moved determination
	of base of ambiguous numbers to the parser to make use of semantic
	information.

	* arch/unix/joystick.c: Support for new API but is #defd out
	until I can do some testing.

1999-01-03  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.15.0.42.

	* arch/msdos/archdep.c, arch/msdos/tuifs.c, tuiimagebrowser.c,
	arch/msdos/uisnapshot.c, arch/msdos/vicesb.c, arch/msdos/video.c,
	arch/msdos/vsync.c, c128/c128mem.c 

	* arch/msdos/grabkey.c (lock_stuff): Commented out.

	* arch/msdos/menudefs.c, arch/msdos/ui.c, c1541.c, info.c
	arch/unix/xaw/uicommands.c: Some tweaks to update version number,
	dates, copyright, VICE home page URL and some features.

	* c64/vicii.c (set_double_size_enabled): Only compile this function
	when `NEED_2x' is defined.
	* crtc-tmpl.c (set_double_size_enabled): Likewise.

	* pet/pet.c (set_model_name): Commented out unused function.
	* pet/pets.c (set_kbd_type): Likewise.
	* sounddrv/soundsb.c (interrupt_function_end): Likewise.

1999-01-03  Tibor Biczo  <crown@mail.matav.hu>

	* arch/win32/archdep.h (archdep_num_text_lines,
	  archdep_num_text_columns): Added function prototypes.

	* arch/win32/joystick.h (joystick_close): Added function prototype.

	* arch/win32/kbd.c: Include stdlib.h.

	* arch/win32/lose32.h (main_program): Added function prototype.

	* arch/win32/ui.c: Include tape.h and vsync.h.
	(RefreshRateValues): Add missing braces.
	(SpeedValues): Add missing braces.
	(value_list): Add missing braces.

	* arch/win32/uidrive.c: Include uilib.h

	* arch/win32/video.c (canvas_refresh): Added casts to remove
	some warnings.

	* arch/win32/vsync.c: Removed timer event callback thread.
	(vsync_cleanup): Removed obsolete function.
	(do_vsync): Complete rewrite.

	* arch/win32/vsync.h (vsync_cleanup): Removed prototype.

	* arch/win32/winmain.c (WinMain): Added missing return at end of
	  function.

	* autostart.c (autostart_advance): Fixed a string handling bug.

	* sounddrv/sounddx.c (sound_debug): Changed OutputDebugString
	call to log_debug.
	Complete rewrite of all functions. Added streaming support
	for NT.

1998-12-21  Andreas Dehmel  <dehmel@forwiss.tu-muenchen.de>

	* mon.c: hex_mode was used uninitialized.

	* raster.c, sound.c, sound.h, sounddrv/soundacorn.c: put RISC OS
	sound polling on a timer event rather than ``check every couple
	of rasterlines''.

	* sound.c: initializing snddata.issuspended with -1 must have been
	an error (device doesn't suspend properly the 1st time).

1998-12-30  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.15.0.41.

	* arch/unix/archdep.h: Moved definition of `LIBDIR' and `DOCDIR'
	here.

	* arch/unix/kbd.c, arch/unix/video.c, arch/unix/xaw/petui.c,
	arch/unix/xaw/ui.c, arch/unix/xaw/uisnapshot.c, c128/c128.c,
	crtc-tmpl.c, drive/via1drive0.def, drive/via1drive1.def,
	pet/petmem.c, sid/resid.cc, tpi-tmpl.c: Removed unused variables.

	* fsdevice.c (open_fs): Do not modify const char.

	* arch/unix/xaw/uicommands.c: #include "archdep.h".

	* arch/unix/xaw/widgets/MultiList.c: Initialize variables `fg_gc'
	and `item'.

	* c64/c64mem.c (pla_config_changed): Reverted to old routine.
	(initialize_memory): Initialize watchpoints for wrap around too.

	* log.c (log_open): Initialize `new_log'.

	* pet/pet.c: #include <stdlib.h> and #include <unistd.h>.

	* prdevice.c (open_pr): Made `name' const.

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

	* vice.h: Removed architecture dependent filename handling.

1998-12-21  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.40.

1998-12-20  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/unix/xaw/uicommands.c (toggle_pause): Rewrote by means of
 	`ui_pause_emulation()' and `ui_emulation_is_paused()'.
	(load_snapshot): Use a trap IFF the emulation is not paused.
	(activate_monitor): Likewise.

	* arch/unix/xaw/ui.c (ui_pause_emulation): New function; pause
	mode is now achieved through a trap, so that registers are
	exported first.
	(ui_emulation_is_paused): New function.
	(pause_trap): Trap for pause mode.

	* vdrive-iec.h: #include "vdrive.h".

	* c1541.h: Removed.

	* vdrive.c (vdrive_command_set_error): `message' made const.
	(floppy_parse_name): Local variable `p' made const.

	* serial.c (serial_attach_device): `char *' argument of `openf'
 	pointer made const.  All the `*_open' functions updated
 	accordingly.

	* arch/msdos/menudefs.c: Do not #include "tapeunit.h" anymore.

	* arch/msdos/archdep.c: #include <conio.h>.

	* arch/unix/xaw/uicommands.c (pause_trap): New CPU trap to pause
 	the emulation.
	(toggle_pause): Trigger `pause_trap' instead of running the event
 	loop yourself.  This way CPU registers are exported before
	entering pause mode.

	* arch/unix/xaw/c64icon.xpm (icon_data): Made const.
	* arch/unix/xaw/c128icon.xpm (icon_data): Likewise.
	* arch/unix/xaw/vic20icon.xpm (icon_data): Likewise.
	* arch/unix/xaw/peticon.xpm (icon_data): Likewise.
	* arch/unix/xaw/c610icon.xpm (icon_data): Likewise.

	* arch/unix/xaw/uicommands.c (run_c1541): Close sound.

	* main.c (replace_hexcodes): New function to replace `$xx'
	substrings into the corresponding hex codes.
	(MAIN_PROGRAM): Replace hex codes in the program name, if any.

	* c64/c64mem.c (pla_config_changed): Applied Andr's patch to fix
	the MMUFETCH test of Wolfgang's test suite.  Somebody should check
	this on a real C64.

1998-12-20  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* zfile.c (try_uncompress_zipcode): Changed to new c1541
	interface.

	* c1541.c (zcreate_cmd): Rewrote file name handling as the old one
	could not cope with path names.

	* arch/unix/joystick.c, arch/unix/kbd.c, arch/unix/kbd.h,
	arch/unix/kmap.c, arch/unix/petkmap.c, arch/unix/xaw/uimenu.h,
	arch/unix/xaw/uisettings.c, autostart.c, c1541.c, c1541.h,
	charsets.c, charsets.h, fsdevice.c, fsdevice.h, imagecontents.c,
	kbdbuf.c, kbdbuf.h, mon.c, parallel.c, petcat.c, rsuser.h,
	serial.c, serial.h, sid.c, vdrive-iec.c, vdrive-iec.h, vdrive.c,
	vdrive.h, warn.c, warn.h, zfile.c: Added missing `const' to text
	variables and added proper type casting.

	* arch/unix/joystick.h: Removed unused external declaration of
	`ajoyfd' and `djoyfd'.

	* arch/unix/petkmap.c (set_keymap_file): Use `kmap_index' instead
	of `index'.

	* arch/unix/xaw/c610ui.c: #include "vsync.h".

	* arch/unix/xaw/checkmark.xbm: `checkmark_bits' has to be
	unsigned char as values above 0x7f exceed range of char.
	* arch/unix/xaw/right_arrow.xbm: Changed likewise.
	* arch/unix/xaw/uimenu.c: Changed likewise.

	* arch/unix/xaw/uisettings.c: Removed unused defines `SidFilters'
	and `SidModel'.

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

	* cbm2/c610mem.c: Removed unused variables `byte' and `flag'.

	* interrupt.c: Removed unused variable `i' and `b'.

	* prdevice.c (fn): Added parameter `void'.
	* serial.c (fn, serialcommand): Likewise.

	* snapshot.c: Removed unused variable `start_pos'.

	* tape.c (fn): Removed unused function declaration.

1998-12-20  Ettore Perazzoli  <ettore@comm2000.it>

	* sounddrv/soundfs.c (fs_init): Do not stralloc `param' anymore:
 	this was an unnecessary memory leak.
	* sounddrv/sounddump.c (dump_init): Likewise.

	* sound.h (sound_device_t): Parameter `device' changed into
	`param' and made const.  All the `*_init()' sound driver functions 
	updated accordingly.

1998-12-20  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* drive/wd1770.c (wd1770d0_prevent_clk_overflow):
	Handle overflows of the `drq' timer.
	(wd1770d1_prevent_clk_overflow): Likewise.
	(read_wd1770): Emulate `drq' bit of the wd1770 controller.
	(reset_wd1770): Reset `drq' timer too.
	(wd1770_command_seek): Set `drq' bit after completion of the seek
	command.  Updated logging messages.
	(wd1770_job_code_read, wd1770_job_code_write): Made static.

	* drive/wd1770.h: Added new member `set_drq' to `wd1770_t'.

	* arch/unix/xaw/c610ui.c: Include the correct icon.

	* arch/unix/xaw/widgets/FileSel.c 
	(XfwfFileSelectorChangeDirectory): Made directory name const.

	* c64/cartridge.c (cartridge_set_default): Added parathensis for
	proper type casting.

	* cia-tmpl.c (my_set_tbi_clk): Use `tbi_clk' instead of `clk'.
	(my_set_tai_clk): Changed likewise.

	* crtc-tmpl.c: Changed name of `min' and `max' macros as they clash
	with mingw32 defines.

	* drive/drive.c (drive_set_pal_sync_factor): Use `new_sync_factor'
	instead of `sync_factor'.
	(drive_set_ntsc_sync_factor): Changed likewise.
	(drive_set_1571_sync_factor): Changed likewise.

	* mon.c, mon.h (mon_cmd_get_token, mon_cmd_get_next_state): Use
	`mon_index' instead of `index'.

	* raster.c (open_output_window): Made `win_name' const.

	* snapshot.c, snapshot.h (snapshot_create, snapshot_open): Use
	`snapshot_machine_name' instead of `machine_name'.

	* sound.h (sound_device_t): Made member `*name' const.

	* sounddrv/sounddump.c (dump_init): Copy filename to `param' as
	this pointer is not const.
	* sounddrv/soundfs.c (fs_init): Changed likewise.

1998-12-15  Ettore Perazzoli  <ettore@comm2000.it>

	* zfile.c (try_uncompress_lynx): Free all the allocated elements
	in the `argv[]' array.

1998-12-16  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.39.

	* petcat.c: Added prototypes for static functions.  #include
 	"p00.h".

	* c1541.c (attach_cmd): Removed unused variables.
	(block_cmd): Likewise.
	(show_cmd): Likewise.
	(validate_cmd): Likewise.
	(rename_cmd): Setup `dest_name' and `src_name' properly.

	* vic20/vic20mem.c (mem_read_rom_snapshot_module): Removed some
	unused variables.

1998-12-15  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* arch/unix/xaw/c64ui.c (attach_cartridge_image_submenu): Removed
	separate menu entry for Ocean cartridges.

	* c64/c64mem.c: Reduced `roml_banks' and `romh_banks' to 16 banks.
	(store_io1, mem_attach_cartridge): Removed bank 16 handling for
	Ocean cartridges.

	* c64/cartridge.c (cartridge_attach_image): Moved attach code for
	Ocean cartridges to the CRT section.

	* cartridge.h: Changed number for Ocean cartridges to `5'.

1998-12-15  Tibor Biczo <crown@mail.matav.hu>

	* arch/win32/archdep.c (archdep_num_text_lines): New function.
        (archdep_num_text_columns): New function.

	* arch/win32/video.c (canvas_refresh): Speeds up 8 and 16 bit
 	screencopy. Handling of clip lists are implemented.

	* Version 0.15.0.38.

1998-12-14  Ettore Perazzoli  <ettore@comm2000.it>

	* zfile.c (try_uncompress_lynx): Adapted to the new c1541 syntax.

	* vice.h: Removed unused `SYSINFO' and `JOYSTICK' defines.

	* c1541.c: Swapped `arg[1]' and `arg[2]'.

	* sid/sid.c (sound_machine_read): Type of `rvstore' changed from
	`DWORD' to `WORD'.

1998-12-14  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* c1541.c (unlynx_cmd): Also consider the size of the last block
 	when calculating length of file.  Changed to set the correct file
 	type.  Removed unused variable `err'.

	* drive/drive.c (set_drive0_type, set_drive1_type): Do not detach
	disk if it does not match drive type.
	(drive_attach_floppy): Do not return an error if disk format does
	not match drive type.
	(GCR_data_writeback): Removed unused variable `rc'.

1998-12-08  Ettore Perazzoli  <ettore@comm2000.it>

	* Makefile.in (INCLUDES): Put `@JOYSTICK@' on the same line as the
 	previous one to avoid problems when it's substituted to an empty
 	string.

	* Version 0.15.0.37.

1998-12-08  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* arch/win32/Makefile.am: Added CBM2 directory to `INCLUDES'.
  	Added `uicbm2set.c', `uicbm2set.h', `uipetset.c' and `uipetset.h'
 	to `libarch_a_SOURCES'.

	* arch/win32/c610ui.c (c610_ui_init): Register cbm2 specific menu
	entries.
	(cbm2_ui_specific): New function.
	* arch/win32/petui.c: Changed likewise.

	* arch/win32/res.h: Added new elements for PET and CBM settings
	menu.

	* src/arch/win32/res.r: Updated about dialog.

	* arch/win32/rescbm2.r, arch/win32/respet.r: Added new dialogs.

	* arch/win32/uicbm2set.c: New file.
	* arch/win32/uicbm2set.h: New file.
	* arch/win32/uipetset.c: New file.
	* arch/win32/uipetset.h: New file.

	* README: Added Tibor Biczo to list of VICE team members.

1998-12-08  Andreas Dehmel  <dehmel@forwiss.tu-muenchen.de>

	* acia-tmpl.c, rsuser.c: fixed last remaining checks of fd to use
 	ILLEGAL_FILE_DESC (affects petacia1.c, c610acia1.c).

	* fsdevice.c: switch on drive LED when opening a channel on RO.
  
	* fixpoint.h: previous version was mangled due to missing tabs.
 
	* sid.c: added remaining fixpoint code (parts were missing the 1st
 	time).

	* log.c: additional include.
 
	* main.c: no atexit-handler on RO.
 
	* sound.c, sound.h, sounddrv/soundacorn.c, sid/sid.c: removed 8bit
 	ulaw-specific code, everything 16bit linear now.
  
	* warn.c: removed RO-varargs-hack.

1998-12-07  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* c64/c64mem.c (pla_config_changed): Bit #6 or #7 of the data port
 	can be `1' too.

1998-12-06  Tibor Biczo  <crown@mail.matav.hu>

	* arch/win32/ui.c: Removed inclusion of tapeunit.h.
	(handle_wm_command): Updated tape attach ui to new API.

	* arch/win32/video.c: Include log.h.
	(video_debug): Changed fprintf to log_debug.
	Removed newline character from end of debug messages.
	(set_physical_colors): Force unused bits of color
	lookuptable to be zero.
	(canvas_refresh): Speeded up 24 bit case.

	* arch/win32/vsync.c (vsync_debug): Changed fprintf to log_debug.
	Removed newline character from end of debug messages.

	* c1541.c (split_args): Added \t and \n as separator chars.

	* cbm2/c610mem.c (initialize_memory): Removed logfile opening.
	(mem_load): Added logfile opening.

	* pet/petmem.c (initialize_memory): Removed logfile opening.
	(mem_load): Added logfile opening.

1998-12-06  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/msdos/archdep.c (archdep_num_text_lines): New function.
	(archdep_num_text_columns): New function.

	* vdrive.c (floppy_read_directory): Removed trailing `\n'.

	* c1541.c: New `dir' command (alias for `list').

	* c1541.c (pager_init, pager_print): New functions for the pager.
	(help_cmd): Use it.
	(list_cmd): Use it.

	* arch/unix/archdep.c (archdep_num_text_columns): New function.
	(archdep_num_text_lines): New function.

	* c1541.c (show_cmd): New `show' command.

	* Makefile.am (c1541_SOURCES): Added `info.c'.

	* utils.c [!HAVE_STRNCASECMP] (strncasecmp): `strncasecmp()'
	replacement borrowed from GLIB.
	[!HAVE_STRCASECMP] (strcasecmp): `strcasecmp()' replacement
	borrowed from GLIB.

	* c1541.c (main): When started in interactive mode, print out some
 	information about the copyright, the licensing conditions and the
 	lack of warranty.

	* Version 0.15.0.36.

	* imagecontents.c (image_contents_read_tape): Rewritten to use
 	`t64.c'.

1998-12-05  Ettore Perazzoli  <ettore@comm2000.it>

	* imagecontents.c (image_contents_new): New function.
	(image_contents_read_disk): Use it.
	(image_contents_read_tape): Use it.
	(image_contents_free): Renamed to `image_contents_destroy()'.
	Callers updated.

	* t64.c (t64_header_read): Silently accept T64 images with zero
 	entries as if they declared to have one.  *Sigh!*

	* main.c [__hpux]: Removed some lovely HP cruft.

	* main.c (cmdline_attach): Argh.  Fixed wrong `free()' call.

	* utils.c (fname_split) [__MSDOS__ || WIN32]: Fixed bug with `/'
	and `\' handling: the last `/' or `\' is what counts for splitting 
	the file name.

	* c1541.c (system_cmd): Removed.
	(main): All the lines starting with '!' are passed to the shell
 	via `system()' after removing the '!', without any other parsing.

	* maincpu.def (CPU_LOOP_STUFF) [IO_AREA_WARNING]: Use
 	`log_debug()'.
	(evaluate_speed) [!EVALUATE_SPEED]: Removed.

	* mon.c (disassemble_instr): Always disassemble in hex mode.

	* vdrive.c (read_disk_image_contents): Removed.

	* tape.c (read_tape_image_contents): Removed.

	* imagecontents.c (image_contents_to_string):  New function.

	* main.c (MAIN_PROGRAM): Use `tape_attach_image()' instead of
 	`serial_select_file()'.
	* arch/unix/xaw/uicommands.c (attach_tape): Likewise.
	(smart_attach): Likewise.
	* autostart.c (autostart_tape): Likewise.
	* arch/msdos/menudefs.c (attach_tape_callback): Likewise.

	* serial.c: Removed all the tape-related stuff.

	* tape.c (tape_detach_image): Removed args.  Return value made
 	`int'.
	(tape_attach_image): Only one `name' arg.

	* sound.c: Default value of resource `SoundDeviceName' reverted to 
	NULL as it should be.

	* c1541.c (tape_cmd): Rewritten to use `t64.c'.
	(main): Execute interactive commands only if there is at least one
 	argument (the command name).

	* t64.c (t64_read_byte): New function.

	* tape.c (tape_init): Do not install tape as a serial device.
	(tapereceive): Renamed to `tape_receive_trap'.
	(findheader): Renamed to `tape_find_header_trap'.

	* c1541.c: Fixed number of arguments for the `unlynx' command.

1998-12-05  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* c64/c64mem.c (mem_attach_cartridge, initialize_memory): Added
	support for Ultimax carts.
	* c64/cartridge.c (cartridge_attach_image): Likewise.
	* cartridge.h: Likewise.

	* c64/vicii.c (set_memory_ptrs): If Ultimax is enabled calculate
	`charbase' according to the Ultimax memory layout.

1998-12-03  Ettore Perazzoli  <ettore@comm2000.it>

	* tape.c (read_tape_image_contents): Made temporarily not-working
	to let it compile.

	* imagecontents.c (image_contents_read_tape): Temporarily made
	not-working by removing usage of `TAPE_HDR_SIZE'.

	* serial.c (serial_get_file_name): Temporarily do nothing for
 	tapes.

	* tape.c: Massive rewrite to take advantage of `t64.c' and get rid
 	of lots of cruft.  P00 and PRG files cannot be attached as tapes
 	anymore (but they can be put back in rather easily if we really
	want them to be).
	(tape_init): Changed order of parameters.  Callers updated.

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

1998-12-03  Andreas Boose  <boose@linux.rz.fh-hannover.de>
	
	* arch/win32/vic20ui.c (vic20_ui_specific): Corrected cartridge
	names.

	* vdrive.c (get_std71_header): Set flag for 2 sides.
	(get_std81_header): Likewise.

1998-12-02  Tibor Biczo <crown@mail.matav.hu>

	* arch/win32/ui.c (ui_init): Changed bogus log_error calls to
 	log_debug calls.

	* arch/win32/video.c (frame_buffer_free): Check if memory we are
 	trying to free is really allocated.

	* maincpu.def (evaluate_speed): Replaced fprintf call to
 	log_debug.

1998-12-02  Ettore Perazzoli  <ettore@comm2000.it>

	* petcat.c: Removed some crufty prototypes.

	* Makefile.am (c1541_SOURCES): Added `tape.c'.
	(petcat_SOURCES): Likewise.

	* tape.c (read_tape_image_contents): Moved here from old
	`tape.c'.  Make it use stdio files instead of Unix files.

	* tapeunit.c: Renamed to `tape.c'.
	* tapeunit.h: Renamed to `tape.h'.

	* tapeunit.c: (Temporarily?) removed support for attached P00
 	files.

	* vdrive.c (read_disk_image_contents): Removed.

	* tapeunit.c (check_t64_header): New function, derived from older
 	`check_t64_header()' in `tape.c'.
	(check_tape): Removed (cruft).

	* tape.c: Removed several functions.  Functions formerly using
 	them now use the ones from `p00.c'.
	(is_pc64name): Removed.
	(read_pc64header): Likewise.
	(write_pc64header): Likewise.
	(pc_get_cbmname): Likewise.
	(is_t64name): Likewise.
	(check_t64_header): Likewise.

	* Makefile.am (c1541_SOURCES, petcat_SOURCES): Added `p00.c'.

	* p00.h: New file.

	* p00.c: New file.  This replaces lots of cruft from `tape.c' and
	also makes P00 support 100% portable.
	(p00_check_name): New function, derived from `is_pc64name()' in
 	`tape.c'.
	(p00_read_header):  New function, derived from `read_pc64header()' 
	in `tape.c'.
	(p00_write_header): New function, derived from
	`write_pc64header()' in `tape.c'.

	* c1541.c (write_cmd): Do not use `pc_get_cbmname()' anymore:
 	`read_pc64header()' is more than enough.

	* mon.c: Adapted to the new `asm.c'/`asm.h'.
	(mon_disassemble_to_string): New function.
	(mon): Print `\n' at EOF.

	* asm.c, asm.h: Removed lots of cruft and restyled.
	(asm_opcode_info_get): New function.
	(asm_addr_mode_get_size): New function.

	* misc.c, misc.h: Removed.

	* asm.c: Removed declaration of `ram'.

	* arch/msdos/tuimenu.h (TUI_MENU_DEFINE_TOGGLE): Use
 	`_tui_menu_toggle_helper()'.
	(TUI_MENU_DEFINE_RADIO): Use `_tui_menu_radio_helper()'.

	* arch/msdos/tuimenu.c (_tui_menu_toggle_helper): New function.
	(_tui_menu_radio_helper): New function.

	* c1541.c: Added `exit' command (same as `quit').

	* arch/unix/xaw/uimenu.h (UI_MENU_DEFINE_TOGGLE): Use
 	`_ui_menu_toggle_helper()'.
	(UI_MENU_DEFINE_RADIO): Use `_ui_menu_radio_helper()'.
	(UI_MENU_DEFINE_STRING_RADIO): Use
 	`_ui_menu_string_radio_helper()'.

	* arch/unix/xaw/uimenu.c (_ui_menu_toggle_helper): New function.
	(_ui_menu_radio_helper): New function.
	(_ui_menu_string_radio_helper): New function.

	* Version 0.15.0.35.

	* misc.c (sprint_binary): Removed `HEX' constant.
	(sprint_disassembled): Parameter `base' renamed to `hex_mode'.  If 
	nonzero, it causes hex output to be produced.

	* mon.c (disassemble_instr): Renamed `mode' to `hex_mode'.  Do not 
	use the `MODE_HEX' constant anymore.

	* asm.c: Do not #include "mshell.h" anymore.
	* mon.c: Likewise.

	* misc.c: Likewise.

1998-12-01  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.34.

	* arch/unix/xaw/c64ui.c: "Freeze" command renamed to "Cartridge
 	freeze".

	* c1541.c: Version bumped up to 3.0.

	* mshell.c, mshell.h: Removed.  Yahoo!

	* fsdevice.c (fs_error): Removed newline in log message.

	* vdrive.c (vdrive_command_set_error): Removed newline in log
 	message.

	* c1541.c: Massive rewrite to get rid of various problems.  Syntax
 	has been changed, and you can now specify a drive number with a
 	"@n:" (where `n' is 8 or 9) whenever a file name is required.
  	Several potential buffer overflows have been fixed.  `extract'
	command made portable.

1998-11-30  Ettore Perazzoli  <ettore@comm2000.it>

	* vdrive.c (vdrive_command_format): If `ActiveFd' is negative for
	this unit, return `IPE_NOT_READY'.

	* c1541.c: Renamed `DriveNum' to `drive_number'.  Renamed
	`DriveData' to `drives'.
	(create_image): Return -1 if something fails instead of exiting
	the program.

	* arch/win32/ui.c (ui_init): Removed newlines from logging
	messages and changed log channel from `LOG_ERR' to `LOG_DEFAULT'.

1998-11-30  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* c1541.c (disk_extract): Retrive file names in a much more sane
	way.
	(disk_unlynx): Do not use `vdrive_open()' to create files as it
	does not allow the creation of files with invalid file name.  Use
	new low-level function `vdrive_open_create_dir_slot()' instead.

	* vdrive-iec.c (vdrive_open_create_dir_slot): New function.
	(vdrive_open): Call `vdrive_open_create_dir_slot' to create files.

1998-11-30  Ettore Perazzoli  <ettore@comm2000.it>

	* parallel.c (DoTrans) [PARALLEL_DEBUG_VERBOSE]: Debugging
	definition put back in.

	* log.c: Renamed `LogFile' into `LogFileName'.
	(log_init): Use the default log file name if `LogFile' is an empty 
	string.

	* c1541.c: Removed all the `COPY_TO_LEFT'.  Removed `values' and
 	`types' arrays.  Temporarily disabled all the device number
 	handling (default to `DevNum').  Do not #include <mshell.h>
 	anymore.
	All the `disk_*' functions now take two parameters, `nargs' and
	`args', for the parameter list, instead of using globals.
	Removed `newname' global.
	(split_args): New function.
	(main): Use it.
	(disk_sectordump): Make all arguments (except `dev') mandatory.
	(usage): Split the string on multiple lines in a portable way.
	[__riscos] (ui_set_drive_leds): Removed.
	(print_error_message): New function.
	(lookup_and_execute_command): New function.
	(main): Heavily restructured to take advantage of the new
 	functions.
	(read_line): New function.
	(disk_raw_command): Removed `OPEN15' cruft.
	(disk_list): Only allow one pattern.
	(disk_system): Do not return the return value from `system()'
	anymore.
	(main): Definition changed to ANSI style (with prototype).

	* mshell.c (read_line): Removed.

	* serial.c (serial_select_file): Do not find the device number in
	the file name if the given device number is negative anymore.

	* vdrive.c (find_devno): Removed.

	* mshell.c (split_args): Removed.

	* asm.h: Removed lots of cruft.

	* misc.c (sprint_ophex): Removed.

	* asm.c (ass): Removed.
	(interpret_line): Removed.
	(interpret_instr): Removed.
	(find_instr): Removed.
	(parse_arguments): Removed.
	(modename): Removed.

	* main.c (end64): Removed.
	(MAIN_PROGRAM): Use `return' instead of `exit()' for consistency.

	* tapeunit.c (tape_attach_image): If the file format is invalid,
	detach the tape.

1998-11-29  Tibor Biczo <crown@mail.matav.hu>

	* arch/win32/Makefile.am (libarch_a_SOURCES): Added archdep.c,
 	archdep.h. Removed archdefs.h

	* arch/win32/archdefs.h: Renamed file to archdep.h.

	* arch/win32/archdep.c: New file.

	* arch/win32/resvic.r: Fixed typo.

	* arch/win32/ui.c (ui_init): Changed fprintf to log_error.

1998-11-29  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.33.

	* main.c (MAIN_PROGRAM): Use `archdep_program_name()' to put the
 	program name into the log intro.

	* arch/msdos/archdep.c (archdep_program_name): New function.

	* arch/unix/archdep.c (archdep_program_name): New function.

	* main.c (MAIN_PROGRAM): Do not embed newlines in the log intro.

1998-11-29  Tibor Biczo <crown@mail.matav.hu>

	* arch/win32/ui.c (res_possible_values): New struct typedef.
        (RefreshRateValues, SpeedValues, value_list): New static arrays.
	(ui_update_menus): Added support for mutual exclusive menu
 	entries.
        (ui_dispatch_next_event): Replaced ExitProcess call with exit, so
 	atexit functions work now correctly.
        (about_dialog_box): Handles WM_CLOSE command.
        (handle_wm_command): Corrected RefreshRate resource settings.
  	Removed ui_update_menus call.
        (window_proc): Added ui_update_menus call to WM_ENTERMENULOOP
 	handling, now menu entries will reflect the correct state of
 	resources if they are handled in ui_update_menus.  Removed
 	vsync_cleanup call from WM_DESTROY handling.

	* arch/win32/video.c: Include <mmsystem.h>, don't include
 	<windowsx.h>.
        (video_debug): Removed OutputDebugString call, debug string goes
 	to logfile now.
        (canvas_refresh): Added support variables, and code sequence to
 	measure canvas_refresh performance and number of moved bytes.

	* arch/win32/vsync.c (vsync_debug): Removed OutputDebugString
 	call, debug string goes to logfile now.
	(do_vsync): Doesn't try to start timer Thread when relative_speed
 	is zero.
        (vsync_disable_timer): Implemented missing functionality.

	* sounddrv/sounddx.c: Added support for 8bit soundcards.

1998-11-24  Martin Pottendorfer  <Martin.Pottendorfer@alcatel.at>

	* zfile.h: added `#ifndef _MODE_T_' around the typedef to make my
 	win32 build environment work. (This is needed when Mumit Khan's
 	version of Mingw32 headers are used.)

1998-11-29  Ettore Perazzoli  <ettore@comm2000.it>

	* log.h [__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR > 4)]: Use
 	`__attribute__' for printf-style function prototypes.

	* petcat.c: Removed `logfile' and `errfile'.
	(main): Do not init `logfile' and `errfile'.

	* arch/win32/ui.c (handle_wm_command): On `IDM_SETTINGS_LOAD' and
 	`IDM_SETTINGS_DEFAULT' update menus.

	* arch/msdos/menudefs.c (load_settings_callback): If successful,
 	update menus.
 	(restore_default_settings_callback): Update menus.
	
	* resources.c: Do not #include "ui.h" anymore.
	(resources_set_defaults): Do not call `ui_update_menus()' anymore.
	(resources_load): Likewise.

	* Makefile.am: Replaced occurences of `$(READLINE)' with
	`@READLINE@' for consistency.

	* arch/unix/sysdep.c: Renamed to `archdep.c'.  All `sysdep_*'
	functions renamed to `archdep_*'.  All callers updated.
	* arch/msdos/sysdep.c: Likewise.

	* c1541.c: Removed `errfile' and `logfile'.
	(main): Do not initialize `errfile' and `logfile' anymore.  Call
	`log_init_with_fd' with `stdout' as the argument instead.

	* Makefile.am (c1541_SOURCES, petcat_SOURCES): Added `log.c',
 	`cmdline.c' and `resources.c'.
	(c1541_LDADD, petcat_LDADD): Added `@ARCH_DIR@/archdep.o'.

	* fsdevice.c: #include "log.h".
	* imagecontents.c: Likewise.

	* log.c (log_init_with_fd): New function.

1998-11-29  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* configure.in: Use separate resource files for any machine.
	* arch/win32/Makefile.am: Changed likewise.

	* doc/Makefile.am: Added `g64.txt' to `doc_DATA'.

	* doc/g64.txt: New file written by Peter Schepers
	<schepers@ist.uwaterloo.ca>.

	* arch/win32/c128ui.c: Include `res.h' instead of `resc64.h'.
	* arch/win32/c64ui.c: Likewise.
	* arch/win32/ui.c: Likewise.
	* arch/win32/uiattach.c: Likewise.
	* arch/win32/uidrive.c: Likewise.
	* arch/win32/uisnapshot.c: Likewise.
	* arch/win32/uivicii.c: Likewise.
	* arch/win32/vic20ui.c: Likewise.

	* arch/win32/print.c (print_open, print_putc, print_flush): Return
	a value.

	* arch/win32/res.h: Former named `resc64.h'.

	* arch/win32/res.r, arch/win32/resc128.r, arch/win32/resc64.r,
	arch/win32/rescbm2.r, arch/win32/respet.r, arch/win32/resvic.r:
	Split `resc64.r' into common and machine specific files.

	* c1541.c, mon.c, vdrive-iec.c, vdrive.c, vdrive.h: Renamed lots
	of function to unified `vdrive_' name space.

	* fs_cbm.h: Define `BAM_VERSION_1541' and `BAM_VERSION_1581'.

	* info.c: Added Peter Schepers to list of contributors.

	* vdrive.c (vdrive_command_validate, vdrive_command_format): Added
	1571 and 1581 disk drive support.

	* c1541.c (disk_validate): Call `vdrive_command_validate'.

	* vdrive-iec.c, vdrive.c: Changed `do_initialize', `do_format',
	`do_copy' and `do_rename' to some better naming and made these
	functions 1571 and 1581 aware.
	(ip_execute): Made scratch command 1571 and 1581 aware.
	(vdrive_bam_clear_all): New function.
	(vdrive_get_max_sectors): New function.

	* vdrive.h, vdrive-iec.c, vdrive.c: Changed `find_next_slot',
	`remove_slot' and `set_find_first_slot' to new naming.

	* arch/unix/xaw/c64ui.c (attach_cartridge_image_submenu): Added
	stub to attach Ocean cartridge image.

	* c64/c64mem.c: Added support for Ocean cartridges.
	(read_roml, read_romh): Allow more than 4 banks.

	* c64/cartridge.c: Added support for Ocean cartridges.
	* cartridge.h: Likewise.

1998-11-29  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.32.

	* arch/msdos/vicesb.c (vicesb_detect): SB Pro maximum frequency
 	changed to 45454 (we always do mono output!).

	* sysfile.c (sysfile_init): Removed `boot_path' parameter.
  	Removed system-specific #ifdefs.  Use
 	`sysdep_default_sysfile_pathlist()'.

	* main.c: Removed `boot_path' and `progname'.  Removed
	some system-specific #ifdefs.
	(MAIN_PROGRAM): Call `sysdep_startup()'.  Do not call
 	`set_boot_path()' anymore.

	* main.c [__riscos]: Removed `-logfile' command-line option.

	* resources.c (default_resource_file): Removed.
	(resources_load): Use `sysdep_resource_file_name()' instead of
 	`default_resource_file()'.
	(resources_save): Likewise.

	* arch/msdos/sysdep.c: New file, modeled after
 	`arch/unix/sysdep.c'.
	
	* arch/unix/sysdep.c: New file.
	(sysdep_default_resource_file_name): New function.
	(sysdep_open_default_log_file): New function.
	(sysdep_startup): New function.
	(sysdep_boot_path): New function.
	(sysdep_default_sysfile_pathlist): New function.

	* arch/unix/sysdep.h: New file.

	* arch/unix/archdefs.h: Removed.

1998-11-29  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* c128/c128mem.c (mem_read_rom_snapshot_module): If module is not
 	found return no error as this module is optional.

	* c1541.c: Changed parameter for `vdrive_allocate_sector'.

	* drive/drivecpu-tmpl.c (mydrive_mem_init): Turn on WD1770 support
	for 1571 disk drive.

	* fs_cbm.h: Removed `BAM_*' macros.

	* vdrive.c, vdrive.h (check_track_sector): Fixed 1581 sector count.
	(alloc_next_free_sector): Use the correct directory track.
	(vdrive_bam_set, vdrive_bam_clr, vdrive_bam_isset): New functions
	replacing `BAM_*' macros.
	(vdrive_bam_calculate_track): New function.
	(vdrive_bam_sector_free): New function.
	(vdrive_allocate_sector, vdrive_free_sector): Changed to handle
	1571 and 1581 disk drives.
	(floppy_write_bam): Changed likewise.

1998-11-29  Ettore Perazzoli  <ettore@comm2000.it>

	* c64/c64.c (machine_read_snapshot): Enabled snapshot version
	check again.

	* arch/unix/joystick.c: `ajoyfd', `djoyfd', `joyxcal', `joyycal',
 	`joyxmin', `joyxmax', `joyymin', `joyymax' made static.

	* Makefile.am (x128_LDADD): Add `@LEXLIB@'.
	(xvic_LDADD): Likewise.
	(xpet_LDADD): Likewise.
	(xcbm2_LDADD): Likewise.

1998-11-28  Ettore Perazzoli  <ettore@comm2000.it>

	* main.c (MAIN_PROGRAM): Convert `autostart_prg' to PETSCII before 
	using.

	* vic20/vic20.c: Removed `WriteHeader' trap.

	* c128/c128.c: Removed `WriteHeader' trap.

	* c64/c64.c: Removed `WriteHeader' trap.

	* cbm2/c610cia.h: #include "snapshot.h".

	* cbm2/c610acia.h: #include "snapshot.h".

	* pet/petmem.c (pet4_tape_traps): Removed `WriteHeader' traps.

1998-11-27  Ettore Perazzoli  <ettore@comm2000.it>

	* alloca.c (i00afunc): Reverted to use `stderr'.

	* misc.c (print_stack): Removed.

	* fsdevice.c: Removed debugging stuff.

	* tapeunit.c (writeheader): Removed.
	(tapereceive): Removed unused commands; only keep "read block".
	(tape_attach_image): Do not use `perror()'.  Removed support for
	creating files.

	* parallel.c: Cruft!

	* mon.c (mon_save_file): Converted back to use stdio and stderr.

	* tape.h: #include <stdio.h>

	* charsets.c (p_toichar): Removed.
	(set_locale): Removed.
	(str_to_lang): Removed.

	* autostart.c (autostart_autodetect): Use `warn()' instead of
 	`printf()'.

	* cbm2/c610mem.c: Even more cruft gone.

	* pet/pet.c: Some more cruft removed.

	* crtc-tmpl.c: Removed lots of cruft.  `dwg_table*' variables made 
	static.

	* vic20/vic20via1.def (show_keyarr): Removed.

	* vdrive.c: `deleted files' made static.

	* via-tmpl.c: Removed some debugging cruft.

	* Updated all the files previously using `errfile' and `logfile'
 	to use the new logging facility.

	* drive/drive.h: Added `log' to `struct drive_s'.

	* vice.h: Removed `logfile' and `errfile' variables.  Do not
 	#include <stdio.h> anymore.

	* main.c (MAIN_PROGRAM): Removed RISC-OS log initialization part.
  	Removed `logfile' and `errfile' variables.  Call
 	`resources_init()' right after `atexit()'.
	(MAIN_PROGRAM): Removed command-line and resource initialization.
	(init_cmdline_options, init_resources): Moved here.  Initialize
	log resources/command-line options.

	* arch/msdos/log.c, arch/msdos/log.h: Removed.
	
	* log.c, log.h: New files.
	(log_open): New function.
	(log_close): New function.
	(log_error): New function.
	(log_message): New function.
	(log_debug): New function.
	(log_init_resources): New function.
	(log_init_cmdline_options): New function.

	* arch/msdos/kbd.c: Removed `DEBUG_KBD' stuff.

	* arch/msdos/grabkey.c (install_kbd_handler): Removed debug message.

	* arch/msdos/ui.c (ui_init_finish): Do not call `log_enable()'
 	anymore.

	* arch/msdos/tuiimagebrowser.c (tui_image_browser): Added missing
	`break' in case `K_Down'.
	(go_backward): Removed cruft.

1998-11-25  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.31.

	* sid/sid.c: Unconditionally #include "fixpoint.h".

1998-11-23  Andreas Dehmel  <dehmel@forwiss.tu-muenchen.de>

	* fixpoint.c, fixpoint.h: New files for fixpoint numbers (see
 	sid.c changes).

	* main.c: Added new commandline-switch "-logfile" for RISC OS,
 	changed logfile redirection, no signal handlers on RISC OS.

	* maincpu.c: Only define function evaluate_speed when
 	EVALUATE_SPEED defined.
	
	* mon_lex.c: Always define YY_ALWAYS_INTERACTIVE on RISC OS.
	
	* rsuser.c, acia-tmpl.c, vdrive.c: Consistent change to
 	file_desc_t and ILLEGAL_FILE_DESC.

	* snapshot.c: Define off_t on RISC OS, no inclusion of unistd.h
	
	* sound.c: Removed #undefs that were necessary with old
 	write/close hack on RISC OS.
	
	* sysfile.c: Fixed sysfile_open so it works on RISC OS _and_ Unix.
	
	* utils.c: Don't include sys/wait.h on RISC OS either.
	
	* types.h: Changed the POSIX-emulation from makros to wrapper
 	functions.
	
	* c128/c128.c, c64/c64.c, pet/pet.c, vic20/vic20.c: Removed
 	various stubs functions formerly introduced on RISC OS (these were
 	moved to arch/riscos).
	  
	* c128/c128.c, c64/c64.c, vic20/vic20.c, cbm2/c610.c: Don't
 	include unistd.h on RISC OS.
	
	* cbm2/c610mem.c: Made chargen and basic names into makros with
 	different initialisiers for RISC OS / other platforms.
	
	* drive/drive.c: Split function GCR_data_writeback into two
 	functions because I got internal compiler errors when compiling
 	with optimization on GCC 2.7.2.

	* pets.c: Changed one remaining printf to fprintf(logfile,...)
	
	* sid.c: Changed synthesis code and table initializers to allow
 	fixpoint code.  On all platforms but RISC OS this translates to
 	exactly the same code as before.  Use vreal_t as the
 	float/fixpoint type, REAL_VALUE(x) to init a vreal_t number with
 	x, REAL_TO_INT(y) to transform a vreal_t number y to an int and
 	REAL_MULT(x,y) to multiply two vreal_t numbers.

	* sounddrv/soundacorn.c: New file.

	* raster.c: Corrected order of (i < length) statements (Array
 	Bound Reads in Purify).
	
	* c128/c128.c, c64/c64mem.c, drive/drive.c: Set m to NULL after a
 	successful call to snapshot_module_close (which frees m).
  	Otherwise you can get Free Memory reads (Purify).

1998-11-24  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* fs_cbm.h: Added drive constants for 1571 and 1581 drives.

	* vdrive.c (floppy_free_block_count): Count free blocks for 1571
	and 1581 as well.
	(do_validate, alloc_next_free_sector): Use 1541 constants.
	(find_next_directory_sector): New function.
	(find_next_slot): Made 1571 and 1581 aware.

1998-11-24  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/msdos/tuiimagebrowser.c (tui_image_browser): Help message
 	at the bottom of the screen.
	(tui_image_browser): Do not react to left and right cursor keys
 	anymore.  Page Down, Page Up, Home and End now work as expected
 	too.

	* autostart.c (load_snapshot_trap): Do not use
 	`autostart_program_name' inappropriately anymore.
	(disk_attention_callback): Pass PETSCII strings instead of ASCII
 	to `kbd_buf_feed'.
	(autostart_advance): Likewise.

	* kbdbuf.c: Type of `queue' changed to `BYTE'.
	(kbd_buf_feed): Type of parameter `s' changed from `const char *'
 	to `const BYTE *'.
	(kbd_buf_flush): Do not convert from ASCII to PETSCII anymore.

	* arch/msdos/kbd.c (menu_trap): Shut down compiler with an
	additional cast.

	* utils.c (spawn) [__MSDOS__]: Close file descriptors properly.

	* Version 0.15.0.30.

	* vdrive.c (allocate_sector): (Temporarily?) replace
	`BAM_EXT_BIT_MAP_1541' with `BAM_EXT_BIT_MAP' to make Andreas'
	previous patches compile.

1998-11-24  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Makefile.am: Added `vdrive-iec.h' to `noinst_HEADERS'.
	Added `vdrive-iec.c' to `base_sources' and `c1541_SOURCES'.

	* arch/win32/Makefile.am: Applied Martin's `windres' fix.

	* c1541.c: Changed `*_1541' functions to `vdrive_*' as the
	functions are no longer 1541 specific.
	* vdrive.c: Likewise.

	* fsdevice.c: Removed #include <assert.h>.
	* vdrive.c: Likewise.

	* fsdevice.h: Rewrote prototypes.
	* vdrive.h: Likewise.

	* vdrive-iec.c: New file.
	* vdrive-iec.h: New file.

	* vdrive.c: Removed some cruft from the past.
	Moved IEC functions to `vdrive-iec.c'.
	(vdrive_calculate_disk_half, vdrive_get_max_sectors): New 
	functions.
	(alloc_first_free_sector, alloc_next_free_sector): Made 1571 and
	1581 aware.

	* vdrive.h: Set `DIR_MAXBUF' to max 1581 directory size.

1998-11-24  Ettore Perazzoli  <ettore@comm2000.it>

	* c64/vicii.c (vic_ii_read_snapshot_module): Update
 	`visible_sprite_msk'.

1998-11-22  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* c64/vicii.c (turn_sprite_dma_on): Removed check for DMA.
	(check_sprite_dma): Do not reset DMA if already turned on, but
 	still do DMA on this line.

1998-11-22  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/msdos/kbd.c (kbd_flush_commands): Removed debugging
 	message for the menu trap.

	* Version 0.15.0.29.

	* imagecontents.c (circular_check, circular_check_init): New
	functions to check for a circular block chain.
	(image_contents_read_disk): Use them, and return NULL if the
	directory is circular.

	* arch/msdos/tuifs.c (tui_file_selector): Do not call the
 	`contents_func' if the file is a directory.
	(tui_file_selector): Border color changed from `MENU_FORE' to
 	`MENU_BORDER'.
	(file_selector_display_path): Likewise.

	* arch/msdos/tuiimagebrowser.c: #include "cbmcharsets.h".
	(display_item): Display using the PETSCII -> charset conversion.
	(tui_image_browser): Backspace switches charset.

	* arch/msdos/ui.c (ui_main): Setup CBM graphics charset.

	* c64/vicii.c (turn_sprite_dma_on): Do not reset DMA if already
 	turned on.

1998-11-21  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* arch/msdos/Makefile.am: Added `archdefs.h' to
	`libarch_a_SOURCES'.
	* arch/unix/Makefile.am: Likewise.

	* arch/win32/Makefile.am: Added `archdefs.h', `uivicii.h' and
	`uivicii.c' to`libarch_a_SOURCES'.

	* arch/msdos/archdefs.h: New file.
	* arch/unix/archdefs.h: New file.
	* arch/win32/archdefs.h: New file.

	* arch/win32/c128ui.c (c128_ui_specific): New function.
	(c128_ui_init): Register c128 specific UI.

	* arch/win32/c64ui.c (c64_ui_specific): Added call to VIC-II UI
	dialog.

	* arch/win32/resc64.h, arch/win32/resc64.r: Added new menu items
	for VIC-II settings.

	* arch/win32/ui.c (ui_message): Use correct icon.
	(handle_wm_command) [IDM_SETTINGS_LOAD]: Fixed typo.

	* arch/win32/uiattach.h: #include <windows.h>.

	* arch/win32/uisnapshot.c (ui_snapshot_save_dialog_proc): Added
	handling for `OK' and `Cancel' button.  (ui_snapshot_save_dialog):
	Use a simple dialog box instead of a property sheet.

	* arch/win32/uivicii.c: New file.
	* arch/win32/uivicii.h: New file.

	* fsdevice.c: Moved architecture dependant filesystem operators to
	`archdefs.h'.

	* resources.c: Moved architecture dependant resource file name to
	`archdefs.h'.

	* vdrive.c (check_header): Use `image_size' for all architectures.

1998-11-19  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/msdos/cbmcharsets.c: New file.

	* arch/msdos/tuicharset.c: New file.

	* arch/msdos/tuicharset.h: New file.

1998-11-18  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* arch/msdos/c64ui.c (attach_cartridge_submenu_items): Added menu
	entry for Super Snapshot cartridge.

	* arch/msdos/menudefs.c (drive_settings_submenu): Fixed length
	of menu entries.

	* arch/win32/Makefile.am: Set include directories for `windres'.
	
	* arch/win32/resc64.r: Include "config.h" instead of
	"../../config.h".

	* c1541.c: Use 1541 specific drive constants.
	* imagecontents.c: Likewise.
	* vdrive.c: Likewise.

	* drive/drivecpu-tmpl.c (mydrive_jam): Fixed drive jam dialog.

	* drive/via1drive0.def (READ_PRA) [DRIVE_TYPE_1571]: Rotate disk
	to update the byte ready status.
	* drive/via1drive1.def: Likewise.

	* fs_cbm.h: Define 1541, 1571 and 1581 drive constants.

	* vdrive.c (initialize_1541): Use xmalloc.
	(floppy_read_bam, set_disk_geometry): Made 1571 and 1581 aware.

	* vdrive.h: Added `bam_name' and `bam_id' to struct DRIVE.  Set max
	BAM size to 3 blocks.  Removed unused macros.

1998-11-18  Tibor Biczo <crown@mail.matav.hu>

	* Makefile.am: Added x64_LDFLAGS, x128_LDFLAGS, xvic_LDFLAGS,
        xpet_LDFLAGS, xcbm2_LDFLAGS variables.
        Included X64_WINRES, X128_WINRES, XVIC_WINRES, XPET_WINRES,
        XCBM2_WINRES in appropriate xxx_LDADD.

1998-11-18  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/unix/xaw/ui.c (ui_exit): Exit with a zero error code.

	* main.c: `-help', `-?' and `-default' do not need a parameter.

1998-11-17  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.28.

	* c64/c64.c (SNAP_MAJOR): Set to 1.
	* cpu-tmpl.c (SNAP_MAJOR): Likewise.
	* sid/sid.c (SNAP_MAJOR): Likewise.
	* c64/vicii.c (SNAP_MAJOR): Likewise.

	* arch/msdos/uisnapshot.c (write_snapshot_callback): Check that a
 	file name has been specified before attempting to save the
 	snapshot.
	(file_name_callback): Concat the `.vsf' extension to the file name
 	if the user does not specify one.
	(snapshot_selector): Show `.vsf' files only.

1998-11-17  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* configure.in: Determine the C compiler to use when compiling for
 	Windows.

	* arch/win32/resc64.r: Moved autostart to the top of the `file'
	drop down menu.  Added resid, refresh, speed and resources UI
	control elements.  Updated `help' dialog.  Moved the device
	manager and the drive settings menu entry to the `settings' pop
	down menu.
	* arch/win32/resc64.h: Likewise.

	* arch/win32/ui.c: Added `SidUseResid' and `WarpMode' to the list
	of resources which can be switched on/off from the menu.
	(ui_message): New function (using a wrong symbol for the moment).
	(handle_wm_command): Added support for resid, refresh, speed and
	resources UI control elements.

	* c1541.c: Added D64/D71/D81 format commands to `disk_cmds'.
	(create_image): Do not write a header when the disk type is other
	than X64.
	(open_image): Set the correct disk drive type and track numbers
	for any requested format.
	(disk_format): Also allow the creation of D71/D81 disk images.
	(disk_format_x64, disk_format_d64, disk_format_d71,
	disk_format_d81): New functions.

	* resources.c: Changed the resource file name of the Windows port
	from the Unix to the MSDOS version.

	* vdrive.h: Defined disk image types.

	* vice.h: Removed mingw32 hack.

1998-11-17  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/unix/xaw/c128ui.c: Added separator for reSID item in the
	"SID settings" submenu.
	* arch/unix/xaw/c64ui.c: Likewise.

	* arch/unix/xaw/uicommands.c: `M-s', `M-l' hotkeys for loading and
 	saving snapshots.

	* c64/vicii.c (draw_std_background_2x): Use `PIXEL()', not
 	`PIXEL2()'.

	* arch/unix/xaw/ui.c (ui_select_file): Removed Alpha hack
 	completely.  Removed useless allocation of directory string.

	* arch/msdos/menudefs.c (attach_disk_callback): Let the user
 	autostart any file in the disk image.
	(attach_tape_callback): Likewise for tape images.

1998-11-16  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* arch/win32/Makefile.am: Added `uilib.c', `uilib.h',
	`uisnapshot.h' and `uisnapshot.c' to `libarch_a_SOURCES'.

	* arch/win32/c64ui.c (c64_ui_specific): New function.
	(c64_ui_init): Register C64 UI specific functions.

	* arch/win32/c64ui.h (c64_ui_init): Made extern.

	* arch/win32/resc64.h: Added menu structures for other machines 
	(should be moved out later) and for the snapshot UI dialog.
	* arch/win32/resc64.r: Likewise.

	* arch/win32/ui.c: #include "machine.h", #include "uilib.h" and
	#include "uisnapshot.h".
	(ui_init): Initialize different menus for any machine.
	(ui_register_machine_specific): New function.
	(select_file): Moved to `uilib.c'.
	(handle_wm_command): Also handle machine specific UI entries.
	Updated filter for any `ui_select_file' dialog.

	* arch/win32/uiattach.c: #include "attach.h",
	#include "autostart.h", #include "uilib.h".
	(dialog_proc): Handle button press events.

	* arch/win32/uidrive.c (enable_controls_for_drive_settings): New
	function to grey out UI elements of this dialog.
	(init_dialog): Allow to change extend policy and idle method.
	(dialog_proc): Save changes to the resources.

	* arch/win32/uilib.c: New file.
	* arch/win32/uilib.h: New file.
	* arch/win32/uisnapshot.c: New file.
	* arch/win32/uisnapshot.h: New file.

	* arch/win32/vic20ui.c (vic20_ui_specific): New function.
	(vic20_ui_init): Register VIC20 UI specific functions.

	* c1541.c: Do not include <sys/param.h> as this is already done
	in `vice.h'.

	* cbm2/c610.c: Specifiy `machine_class'.

	* machine.h: Define `CBM2' machine class.

	* vice.h: On WIN32 we do not have a readline library.

1998-11-16  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/msdos/tuifs.c (tui_file_selector): Parameter
 	`read_image_contents_func()' replaced by parameter
 	`image_contents_func()'; new parameter `browse_file'.  If
 	`image_contents_func' and `browse_file' are not NULL, let the user
 	browse the image and select a file, which is returned in
 	`*browse_file'.

	* sid/resid.cc (resid_sound_machine_calculate_samples): Return 0.

	* arch/msdos/tuiimagebrowser.h: New file.

	* arch/msdos/tuiimagebrowser.c: New file.

	* imagecontents.c: New file.
	(image_contents_read_disk): New function.
	(image_contents_read_tape): New function.

	* imagecontents.h: New file.

	* vdrive.h: `floppy_free_block_count()' prototype.

	* vdrive.c (floppy_free_block_count): Made non-static.

	* arch/msdos/tuiview.c (update): Removed.
	(tui_view_text): Use `tui_display_text()' instead of `update()'.

	* arch/msdos/tui.c (tui_display_text): New function.

	* arch/msdos/tuiview.c: #include "utils.h".
 	(find_prev_line, find_next_line): Removed.  Use the versions from
 	`utils.c' instead.

	* utils.c (find_next_line): New function.
	(find_prev_line): New function.

1998-11-14  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.27.

1998-11-14  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* arch/win32/Makefile.am: Added `uidrive.c' and `uidrive.h' to
	`libarch_a_SOURCES'.

	* arch/win32/resc64.h: Define new drive objects.

	* arch/win32/resc64.r (IDD_DRIVE_SETTINGS_DIALOG): New dialog.

	* arch/win32/ui.c: #include "uidrive.h".
	(handle_wm_command): Call the drive settings dialog.

	* arch/win32/uidrive.c: New file.
	* arch/win32/uidrive.h: New file.

	* main.c (set_boot_path): If `boot_path' is NULL set it to the
	current directory.

	* utils.h: #include "types.h".  Changed file descriptors to
	`file_desc_t'.

	* vice.h: Added mingw32 compatibility defines.

1998-11-13  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* attach.c, c64/patchrom.c, c64/reu.c, cbm2/c610.c, c610cia1.def,
 	cbm2/c610iec.c, cbm2/c610mem.c, charsets.c, cia-tmpl.c,
 	crtc-tmpl.c, drive/wd1770.c, memutils.c, pet/petmem.c, rsuser.c,
 	sid/sid.c, snapshot.c, sounddrv/soundaix.c,
 	sounddrv/soundallegro.c, tpi-tmpl.c, traps.c, vdrive.c, zfile.c:
 	Changed all `printf' to `fprintf'.  Print to `logfile' or
 	`errfile' instead to `stdout' or `stderr' so the output can be
 	written into a file.

1998-11-13  Andreas Dehmel  <dehmel@forwiss.tu-muenchen.de>

	* 6510core.c, acia-tmpl.c, alloca.c, attach.c, autostart.c,
	c128/c128.c, c128/c128mem.c, c1541.c, c1541.h, c64/c64.c,
	c64/c64mem.c, c64/cartridge.c, c64/patchrom.c, c64/reu.c,
	c64/vicii.c, charsets.c, cpu-tmpl.c, crtc-tmpl.c, drive/drive.c,
	drive/drivecpu-tmpl.c, findpath.c, findpath.h, fsdevice.c, gcr.c,
	info.c, main.c, maincpu.def, memutils.c, misc.c, mon.c, mshell.c,
	palette.c, palette.h, parallel.c, pet/pet.c, pet/petmem.c,
	pet/petpia1.def, pet/petpia2.def, pet/pets.h, pet/petvia.def,
	petcat.c, pia-tmpl.c, prdevice.c, print.h, pruser.c, raster.c,
	resources.c, rs232.h, serial.c, sound.c, sound.h, sysfile.c, tape.c,
	tapeunit.c, traps.c, types.h, utils.c, vdrive.c, vdrive.h,
	via-tmpl.c, vic20/cartridge.c, vic20/vic.c, vic20/vic20.c,
	vic20/vic20iec.c, vic20/vic20mem.c, vic20via1.def, vice.h, warn.c,
	zfile.c, zfile.h, zipcode.c, zipcode.h: Changed all `printf' to
	`fprintf'.  Print to `logfile' or `errfile' instead to `stdout' or
	`stderr' so that the output can be written into a file.  Use
	`file_desc_t' as return value of POSIX open.  Compare the file
	descriptor with `ILLEGAL_FILE_DESC' to check whether it is valid
	or not.  Do not inlcude system header like `unistd.h', `fcntl.h'
	or `sys/stat.h' when compiling on RISC OS.  Include "ROlib.h"
	when necessary.

	* alloca.c: Ifdef'ed out this file on RISC OS.
	* findpath.c: Likewise.

	* c128/c128.c: Added tempoary stubs `cartridge_detach_image' and
	`pet_set_model' to compile the RISC OS port.
	* c64/c64.c: Likewise.
	* pet/pet.c: Likewise.
	* vic20/vic20.c: Likewise.

	* c1541.c: Set drive LEDs in virtual drive emulation when compiled
	on RISC OS.
	* vdrive.c: Likewise.

	* fsdevice.c: Define file system separators for POSIX and RISC OS
	file systems.

	* info.c: Do not use newlines within a string.

	* machine.h: Added ID for any machine.

	* main.c: Do not use `break64' or `exit64' on RISC OS.
	(MAIN_PROGRAM): Use custom log and error files on RISC OS.

	* memutils.c (mem_load_sys_file): Do not use `s.st_size' to
	determine the length of a file on RISC OS.
	* utils.c (file_length): Likewise.
	* vdrive.c: Likewise.

	* mon.c: `stop_output': New variable.
	(handle_abort): New function to abort monitor output.

	* raster.c (handle_mode_change): New function.

	* sound.c (sound_synthesize): New function. Call 
	`sound_init_vidc_device' when compiled on RISC OS.

	* sysfile.c (sysfile_open): RISC OS uses a different method for
	path handling.  Not activated yet!

	* types.h: Only use ANSI IO functions on RISC OS.

	* vic20/vic.c (DRAW_LINE_2x): Inserted dummy separator.

1998-11-12  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* configure.in: Added `xmingw32' host compiler support.

	* arch/unix/kbdef.h (shift_type): Omitted comma after last element.
	* mon.h (mon_int): Likewise.

	* arch/unix/xaw/ui.c (ui_popup): The last 4 parameter of
	`XGetGeometry' need to be `unsigned int'.
	* arch/unix/xaw/uimenu.c (position_submenu): Likewise.

	* arch/unix/xaw/uicommands.h: Removed external declaration of
	`ui_cartridge_commands_menu',

	* attach.c: Added missing cast.
	* c1541: Added missing cast.
	* c64/cartridge.c: Added missing cast.
	* drive/drive.c: Added missing cast.
	* gcr.c: Added missing cast.
	* mon.c: Added missing cast.
	* pet/petmem.c: Added missing cast.
	* snapshot.c: Added missing cast.
	* vdrive.c: Added missing cast.

	* c128/c128mem.c: `rom_loaded' made static.
	(mem_bank_read, mem_bank_write): Avoid empty `case' element.
	* pet/petmem.c (mem_bank_read), mem_bank_write): Likewise.

	* c64/c64mem.c: `rom_loaded' made static.
	* cbm2/c610mem.c: `rom_loaded' made static.
	* drive/drive.c: `rom_loaded' made static.
	* pet/petmem.c: `rom_loaded' made static.
	* vic20/vic20mem.c: `rom_loaded' made static.

	* c64/c64rsuser.c (c64_rsuser_init): Do not return something.
	* vic20/vic20rsuser.c (vic20_rsuser_init): Likewise.

	* c64/vicii.h: Removed external declaration of `vbank'.

	* cbm2/c610mem.c: Removed unused `REGPARM'.

	* fsdevice.c (open_fs): Use `NULL' instead of `0'.

	* mem.h: Removed external declaration of `rom_loaded'.
	* vic20/vic20mem.h: Likewise.

	* mon.h: Removed external declaration of `register_string' and
	`memspace_string'.

	* pet/petmem.c (patch_2001): Use `BYTE' instead of `char'.

	* zfile.c (try_uncompress_zipcode, try_uncompress_lynx): Use
	`char' instead of `unsigned char'.

1998-11-12  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/unix/video.c (frame_buffer_alloc): Added a cast in the
	assignment to `tmpframebuffer'.

	* arch/unix/xaw/checkmark.xbm: `checkmark_bits' changed from
 	`unsigned char []' to `char []'.

	* arch/unix/xaw/right_arrow.xbm: `right_arrow_bits' changed from
	`unsigned char []' to `char []'.

	* arch/unix/xaw/uimenu.c: `display' and `screen' renamed to
 	`my_display' and `my_screen', respectively.
	(position_submenu): Pass pointers to unsigned (intead of signed)
 	ints to `XGetGeometry' where appropriate.

	* arch/unix/xaw/ui.c: `wm_command_data' made a pointer to an
 	unsigned char.
	(ui_open_canvas_window): Added proper cast in the call to
 	`XtAddEventHandler()'.

1998-11-10  Tibor Biczo <crown@mail.matav.hu>

	* arch/win32/kbd.c (kbd_debug): Added printf to output debug
 	information to stdout.

	* arch/win32/uiattach.c (dialog_proc): Removed printing of debug
 	information.

	* arch/win32/video.c (video_debug): Added printf to output debug
 	information to stdout.
	(set_palette): Added default return value.
	(set_physical_colors): Added default return value.

	* arch/win32/vsync.c (vsync_debug): Added printf to output debug
 	information to stdout.
        (vsync_cleanup): Changed OutputDebugSring call to DEBUG.

1998-11-10  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.26.

1998-11-08  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* drive/drive.c (drive_check_image_format): New function.
	(set_drive0_type, set_drive1_type): Check if the drive type
	matches the disk image type.  Initialize ROM traps after the
	firmware is loaded.  (drive_initialize_rom_traps): Install 1581
	disk drive related traps.
	(drive_attach_floppy): Check for correct disk image type.
	(drive_detach_floppy): Also detach D81 disk images.
	(drive_vsync_hook): Call `wd1770_vsync_hook'.

	* drive/drivecpu-tmpl.c (mydrive_trap_handler): Also handle 1581
	disk drive related traps.
	(mydrive_cpu_execute): Calculate `last_exc_cycles' within the CPU
	execution loop.

	* drive/wd1770.c: #include "drive.h", #include "drivecpu.h".
	(wd1770d0_prevent_clk_overflow, wd1770d1_prevent_clk_overflow):
	Also handle overflow of `led_delay_clk'.  Fixed some typos.
	(reset_wd1770): Reset `led_delay_clk' as well.
	(wd1770_job_code_read, wd1770_job_code_write): New functions.
	(wd1770_handle_job_code): New function to emulate 1581 job codes.
	(wd1770_vsync_hook): New function.

	* drive/wd1770.h: Added new member `led_delay_clk' to `wd1770_t'.

	* vdrive.c (attach_floppy_image): Do not allow to attach disks of
	the wrong type.
	(get_std81_header): New function.
	(check_header): Also check for D81 disk images.

1998-11-08  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/msdos/kbd.c: Added missing `K_KPDIV' code to
 	`_kbd_extended_key_tab[]'.

	* arch/msdos/tuifs.c (tui_file_selector): Now Alt + letter changes
	drive, instead of Ctrl + letter.

	* c64/vicii.c (RASTER_CHAR): Added cast to `int' to `cycle' for
 	safeness.
	(RASTER_X): Likewise.
	(store_vic): Moved effect of $D016 forward one cycle.

1998-11-05  Daniel Sladic  <sladic@eecg.toronto.edu>

	* c128/c128.c, c64/c64.c, cbm2/c610.c, pet/pet.c,
	vic20/vic20.c: (machine_init) Monitor support for drive 9.

	* drive/drivecpu-tmpl.c: Replaced e_disk_space with mymonspace
	which is defined in the .def files.

	* mon.h: Drive 9 support.

	* mon.c: Added drive 9 support. 
	(mon_bank): Fixed memspace handling.
	(disassemble_instr): Print out labels when disassembling.
	(mon_save_symbols): Stop writing out "default" for the memory space.
	(mon_symbol_table_lookup_name,mon_symbol_table_lookup_addr): Handle
	default memspaces.
	(mon_add_name_to_symbol_table): Don't print out message is replacing
	a label with the same address. Allow multiple labels for an address.
        Fix hashing bug.
	(make_prompt): Change prompt format.

	* mon_parse.y: Drive 9 support. Allow labels to be used where
	addresses can.

	* mon_lex.l: Fixed memspace handling for bank command.
	Allow underscores in label names.

	* drivecpu0.def, drivecpu1.def: Added mymonspace define.

1998-11-05  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* 6510core.c: Use the same `JAM' macro for all opcodes causing a
	CPU jam.

	* arch/msdos/vsync.c: Only include "vmidas.h" when compiling with
	MIDAS support.

1998-11-05  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/msdos/menudefs.c: Implemented parallel cable selection and
 	40-track support setting for both drives.

	* mon.c (mon_print_registers): Changed `AR' into `AC'.

1998-11-03  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.25.

1998-11-03  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* c64/c64iec.c: Use a parallel port value for each drive port.
	(parallel_cable_drive_write): Split into two functions.
	* c128/c128iec.c: Likewise.
	* cbm2/c610iec.c: Likewise.
	* pet/petiec.c: Likewise.
	* vic20/vic20iec.c: Likewise.

	* drive/drive.c: Fixed some wrong entries in `cmdline_options'.
	(drive_read_snapshot_module): Set parallel port to `0xff' first.

	* drive/via1drive0.def (UNDUMP_PRA): Undump parallel cable value.
	* drive/via1drive1.def (UNDUMP_PRA): Likewise.

1998-11-03  Ettore Perazzoli  <ettore@comm2000.it>

	* vice.h [DJGPP]: Do not #include `<sys/param.h>'.

	* arch/msdos/sidui.c: Replaced `#ifdef USE_RESID' with `#ifdef
 	HAVE_RESID'.

1998-11-01  Ettore Perazzoli  <ettore@comm2000.it>

	* cmdline.c (cmdline_parse): Argh.  Fixed check for missing
 	parameter.

1998-10-30  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.24.

	* arch/unix/video.c (ui_init): Prepare the data for the WM_COMMAND
 	property.
	(ui_init_finish): Set the WM_COMMAND data prepared by `ui_init()'
	instead of creating a toplevel and copying the data from it.

	* arch/unix/video.c (video_init): Do not set any GC values.
	Create the GC from the toplevel window, not from the root window.
	* arch/unix/xaw/ui.c (ui_open_canvas_window): XtVaSetValues for
 	visual and depth for the new shell.
	(ui_create_transient_shell): Ditto.
	[Adapted from a patch by Mattias Engdegrd <f91-men@nada.kth.se>
	to make non-default display depths actually work.]

1998-10-30  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* c64/c64iec.c (parallel_cable_cpu_undump): New function.
	
	* c128/c128iec.c (parallel_cable_cpu_undump): New function.

	* c64/c64cia2.def (UNDUMP_CIAPB): Undump parallel port value.

	* drive/drive.c (drive_write_snapshot_module,
	drive_read_snapshot_module): Do not put `have_new_disk' into
	snapshot image.

	* drive/drivecpu-tmpl.c (mydrive_jam): New function.
	(mydrive_cpu_execute): Do not save the old PC value and do not
	change `bank_base' everytime the drive CPU is executed.
	Calculate `stop_clk' before emulating the drive CPU.
	Calculate `last_exc_cycles' once after the drive is emulated.
	(JAM): Removed old `JAM()' macro.
	(mydrive_set_bank_base): New function.

	* mon.c (mon_set_reg_val): Call `drive0_set_bank_base' to
	update the `bank_base' of the drive CPU emulation.

1998-10-27  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.23.

1998-10-27  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* via-tmpl.c (store_myvia): for port A and port B only call 
	update_myviairq() when the changed flags are set in the IER
	(read_myvia): call int_myviat[12] only when a timer- or 
	interrupt-related register is read, not for a port register.
	Also for port A and port B only call update_myviairq() when the 
	changed flags are set in the IER

1998-10-27  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* c128/c128.c (machine_write_snapshot): Pass `save_roms' to drive
	snapshot module too.
	* c64/c64.c (machine_write_snapshot): Likewise.
	* cbm2/c610.c (machine_write_snapshot): Likewise.
	* pet/pet.c (machine_write_snapshot): Likewise.
	* vic20/vic20.c (machine_write_snapshot): Likewise.

	* drive/drive.c: #include "attach.h".
	(drive_rotate_disk, drive_sync_found, drive_set_half_track,
	drive_write_protect_sense, drive_update_viad2_pcr,
	drive_read_viad2_prb): Changed to use pointer to drive_t structure
	instead of using an array.
	(drive_read_disk_byte, drive_write_gcr, drive_update_zone_bits,
	drive_motor_control): Removed.
	(drive_write_snapshot_module): Also save drive ROMs images.
	(drive_read_snapshot_module): Read drive images.
	(drive_write_rom_snapshot_module): New function.
	(drive_read_rom_snapshot_module): New function.

	* drive/drive.h: Added new member `*clk' to drive_t.

	* drive/drivecpu-tmpl.c (_drive_byte_ready): Use a pointer to
	drive_t structure.

	* drive/via2drive0.def (STORE_PRA): Write GCR byte. 
	(STORE_PRB, UNDUMP_PRB): Update zone bits and motor control.
	(READ_PRA): Read GCR byte.  
	* drive/via2drive1.def: Changed likewise.

1998-10-26  Tibor Biczo <crown@mail.matav.hu>

	* arch/win32/Makefile.am (libarch_a_SOURCES): Added c128kbd.c,
 	c128kbd.h, c128ui.c, c128ui.h, c610kbd.c, c610kbd.h, c610ui.c,
 	c610ui.h, c64kbd.h, petkbd.c, petkbd.h, petui.c, petui.h,
 	vic20kbd.c, vic20kbd.h, vic20ui.c, vic20ui.h.
        (libarch_a_LIBADD): Removed resc64.o.

	* arch/win32/c128kbd.c: New file.
	* arch/win32/c128kbd.h: New file.
	* arch/win32/c128ui.c: New file.
	* arch/win32/c128ui.h: New file.
	* arch/win32/c610kbd.c: New file.
	* arch/win32/c610kbd.h: New file.
	* arch/win32/c610ui.c: New file.
	* arch/win32/c610ui.h: New file.

	* arch/win32/c64kbd.c (c64_keyboard): Replaced conversion table
 	with MS-DOS version.
	(c64_kbd_init): New function.

	* arch/win32/c64kbd.h: New file.

	* arch/win32/dirent.h (struct dirent): Removed const from d_name.

	* arch/win32/kbd.c: Implemented keyboard conversion table
 	support. It now works the same as in the MS-DOS port.  Added
 	extended scancode handling.

	* arch/win32/kbd.h (KBD_ROWS): Set it to 16.
        (kbd_init): Changed function definition.

	* arch/win32/petkbd.c: New file.
	* arch/win32/petkbd.h: New file.
	* arch/win32/petui.c: New file.
	* arch/win32/petui.h: New file.

	* arch/win32/ui.c (ui_resize_canvas_window): Replaced hard coded
 	main window handle with window handle passed to function.
        (ui_enable_drive_status): Placeholder function added.
        (ui_display_drive_track): Changed to support more than one drive.
        (ui_display_drive_led): Same here.
        (ui_ask_confirmation): Placeholder function added.

	* arch/win32/ui.h (ui_button_t): New definitions for ui button
 	results.
        (ui_drive_enable_t): Added definitions.

	* arch/win32/vic20kbd.c: New file.
	* arch/win32/vic20kbd.h: New file.
	* arch/win32/vic20ui.c: New file.
	* arch/win32/vic20ui.h: New file.

	* arch/win32/video.h: Patch to avoid double definitions of
 	BYTE,WORD,DWORD.

	* c128/c128.c: Added Win32 support for keyboard init.
	* c64/c64.c: Same here.
	* cbm2/c610.c: Same here.

	* maincpu.def (evaluate_speed): Added Win32 version.

	* pet/pet.c: Added Win32 support for keyboard init.

	* sounddrv/sounddx.c: Implemented sound streaming.

	* sysfile.c (default_path): Added /DRIVES for MS-DOS and Win32.

	* types.h: Changed the definiton of BYTE, WORD, DWORD from typedef
 	to #DEFINE when compiling for Win32.  This was needed to avoid
 	conflicts with the windows headers.  Before windows.h is included
 	we have to #UNDEF them.

	* vic20/vic20.c: Added Win32 support for keyboard init.

1998-10-26  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* /drive/via1drive0.def, drive/via1drive1.def,
 	drive/via2drive0.def, drive/via2drive1.def, vic20/vic20via1.def,
 	vic20/vic20via2.def
	(UNDUMP_ACR): add empty definition for UNDUMP_ACR

	* pet/petvia.def (UNDUMP_ACR): call sound on/off switch
	when undumping ACR

	* via-tmpl.c (myvia_read_snapshot_module): move the restore
	macro calls for STORE_SR, UNDUMP_PCR to the end, and add
	UNDUMP_ACR macro call.
	Someday this should probably go into one UNDUMP_VIA....

1998-10-26  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* attach.c (vdrive_write_snapshot_module): New function.
	(vdrive_read_snapshot_module): New function.

	* c64/cartridge.c (cartridge_attach_image): Handle 16KB CRT
	cartridges.

	* drive/drive.c (drive_write_snapshot_module): Save disk images
	of virtual disk drives too.  Save `sync_factor' to snapshot image.
	Removed unnecessary `GCR_image' variable.
	(drive_read_snapshot_module): Changed likewise.

	* mon.c (mon_print_registers): Fixed typo.

	* via-tmpl.c (myvia_read_snapshot_module): Fixed `VIA_SR' and
	`VIA_PCR' undump.

1998-10-24  Ettore Perazzoli  <ettore@comm2000.it>

	* tapeunit.c (t64_find_next): Do not allow scanning the whole tape 
	directory more than once.

	* mon.c (mon): If `readline()' returns zero, exit monitor.

1998-10-21  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* via-tmpl.c (myvia_read_snapshot_module,
 	myvia_write_snapshot_module): fix latch handling, esp. restoring
 	it. myviatal had been restored, but not myvia[VIA_T1L*]....
	
1998-10-20  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.22.

1998-10-19  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* c64/patchrom.c (patch_rom): fix detection of non-numeric
	kernal revisions. Set i to 0 before using it as index in the 
	patch table....

	* c128/c128mem.c (mem_write_rom_snapshot_module, 
	mem_read_rom_snapshot_module): new functions to save/restore the 
	C128 ROMs in the snapshot.
	Currently saves Kernal, Chargen, Basic and Editor ROM.
	Does not save any cartridge stuff.
	(mem_write_snapshot_module, mem_read_snapshot_module):
	call the ROM snapshot functions.

	* c64/c64mem.c (mem_write_rom_snapshot_module,
        mem_read_rom_snapshot_module): new functions to save/restore the 
        C64 ROMs in the snapshot.
	Currently saves Kernal, Chargen, and Basic ROM.
        Does not save any cartridge stuff.
        (mem_write_snapshot_module, mem_read_snapshot_module):
        call the ROM snapshot functions.

1998-10-19  Ettore Perazzoli  <ettore@comm2000.it>

	* main.c (break64) [!__MSDOS__]: Completely removed the old
 	"congratulations! you have found a bug in VICE!" hack.

	* crtc-tmpl.c (crtc_set_screen_mode): Fixed parse error from
 	Andr's latest change; use parameter `num_cols' instead of
	`crtc_cols', which is no longer defined.

1998-10-18  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* crtc-tmpl.c (DOUBLE_SIZE_ENABLED): new define to replace
	double_size_enabled in the double-size checks. Defined to 
	the variable under Unix, add an additional check for screen_xpix>320
	for DOS.
	(crtc_init, crtc_set_screen_mode): remove DOS check for double size.
	(video_resize, crtc_update_timing): replace double_size_enabled
	variable with define.

1998-10-16  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* autostart.c: include machine.h and snapshot.h
	(autostartmode): new enum entry AUTOSTART_HASSNAPSHOT
	(load_snapshot_trap): new CPU trap to load a snapshot 
	from the autostart code.
	(autostart_advance): new case for AUTOSTART_HASSNAPSHOT;
	set trap for loading of snapshot and disable autostart.
	(autostart_snapshot): new function to check if a file is
	a snapshot and setup for autostart. Use global 
	machine_name[] for snapshot emulator type.
	(autostart_autodetect): add a check for a snapshot file

	* cbm2/c610.c (machine_read_snapshot, machine_write_snapshot):
	use the global (already existing) machine_name[] as snapshot
	name
	* vic20/vic20.c: changed likewise
	* pet/pet.c: changed likewise

	* main.c (cmdline_options): add "-core" and "+core" entries
	to set DoCoreDump entries.
	(resources, do_core_dumps, set_do_core_dumps): new stuff
	to setup the "DoCoreDump" resource
	(main): register the local resources as well
	If do_core_dumps is set, then do not install signal handlers to 
	catch core dumps
	(break64): remove call to user interface but exit directly

	* crtc-tmpl.c [IS_DOUBLE_HEIGHT_ALLOWED]: new define. Is true if
	height (charheight * lines) fits into framebuffer even if double size
	(screen_height, screen_width): removed, SCREEN_HEIGHT and SCREEN_WIDTH
	are now set from screen_xpix/screen_ypix plus the appropriate
	SCREEN_BORDER*
	(video_resize): check id double height is allowed before setting
	height to double value
	(crtc_update_timing): If double_size_enabled do for the height
	an equivalent check as for the width. If the screen gets to
	high, first (temporarily) disable double height, then reduce
	number of lines per character.
	(screen_rasterlines): new variable to hold the timing-wise height
	of the screen. SCREEN_HEIGHT only holds the display-wise
	height of the screen.
	(crsr_set_dirty): check if rasterline is in valid range before
	setting the dirty flag.
	(DRAW, DRAW_2x): do not use pixel-counting SCREEN_WIDTH but
	SCREEN_MAX_TEXTCOLS when filling the rest of the line with
	blanks.

	* crtc.h: remove most CRTC_* defines and define SCREEN_* directly.
	[SCREEN_HEIGHT, SCREEN_WIDTH]: taken from XPIX/YPIX plus the
	appropriate borders
	[SCREEN_LAST_RASTERLINE]: new define for to indicate when rasterline
	overflows
	[FRAMEB_WIDTH, FRAMEB_HEIGHT]: new defines that contain the size
	of the allocated framebuffer. We must never let SCREEN_WIDTH
	and SCREEN_HEIGHT become larger than this.
	
	* pet/pets.c [DEBUG]: undef

	* raster.c [FRAMEB_WIDTH, FRAMEB_HEIGHT]: if not defined, define
	to the old values given to frame_buffer_alloc().
	[SCREEN_LAST_RASTERLINE]: if not defined, define to SCREEN_HEIGHT
	(init_raster): use FRAMEB_* when calling frame_buffer_alloc()
	(emulate_line): if __CRTC__ is defined, only do changes check 
	and frame_buffer_ptr update etc only if rasterline is
	less than SCREEN_HEIGHT
	If rasterline is equal to SCREEN_LAST_RASTERLINE instead of 
	SCREEN_HEIGHT to reset rasterline.

1998-10-16  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* c128/c128iec.c: Changed `update_ports' to `iec_update_ports' and
	made non-static.
	* c64/c64iec.c: Likewise.

	* c64/c64.c (machine_write_snapshot): Execute drive CPU before
	doing a snapshot.

	* cbm2/c610iec.c (iec_update_ports): New stub.
	* pet/petiec.c
	* vic20/vic20iec.c

	* drive/drive.c (initialize_rotation): Moved initialization of the
	rotation table to new function `initialize_rotation_table'.
	(drive_init): Initialize `clock_frequency' too.
	(drive_cpu_execute): New function.
	(drive_write_snapshot_module): Do not save module if true drive
	emulation is off.
	(drive_read_snapshot_module): Switch off true drive emulation if
	module is not found.  Initialize drive rotation table.  Setup ROM
	images before installing traps.  Enable drives after everything is
	initialized.  Call `iec_update_port' to update the IEC bus.

	* drive/drivecpu-tmpl.c (mydrive_cpu_read_snapshot_module): Reset
	all other chips while the snapshot is read.

	* drive/drivecpu0.def: #define "MYCPU".
	* drive/drivecpu1.def: #define "MYCPU".

	* drive/via1drive0.def (UNDUMP_PRA): Get pointer to iec_info
	struct.
	* drive/via1drive1.def (UNDUMP_PRA): Likewise.

1998-10-15  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* drive/drive.c (drive0_trap_handler, drive1_trap_handler):
	Removed separate trap functions.
	(drive_write_snapshot_module): If GCR image should not be saved
	set `GCR_image' to zero.  Also save `parallel_cable_enabled',
	`idling_method' and `extend_image_policy'.
	(drive_read_snapshot_module): Do not use the general
	`set_drive_true_emulation' switch.  Also initialize drive cpu
	memory, set the actual drive ROM and idle method.

	* drive/drivecpu-tmpl.c (mydrive_mem_init): Made non-static.
	(mydrive_trap_handler): New common trap function.

1998-10-14  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.21.

	* c64/reu.c (read_reu): Register $9: fixed silly 6 -> 9 typo
 	(damn!) and no longer force bit 5 to be returned as 1.
	Register $A: force returned bits 5-0 to be 1.

	* vic20/vic.c (vic_read_snapshot_module): Call `sound_close()'
	before restoring the snapshot.

1998-10-14  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* vic20/vic.c (vic_write_snapshot_module): exchange writing
	of color RAM and memptr.

	* vic20/vic20mem (mem_read_rom_snapshot_module): set ROM mapping
	flags in mem_rom_blocks such that initialize_memory actually 
	maps the ROM.

	* acia-tmpl.c, cia-tmpl.c, pia-tmpl.c, tpi-tmpl.c, via-tmpl.c
	(*_DUMP_VER_MAJOR): set to 1, like described in the docs.

	* cbm2/c610mem.c (mem_read_rom_snapshot_module, 
	mem_write_rom_snapshot_module): Set major version number to 1, 
	remove flag handling and always save images and no filenames.
	(mem_read_ram_snapshot_module, mem_write_ram_snapshot_module):
	set major version number to 1.
	* pet/petmem.c: changed likewise
	* vic20/vic20mem.c: changed likewise

1998-10-14  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/msdos/c64ui.c: Added menu items for PC64 and C64S palettes.
	* arch/msdos/c128ui.c: Likewise.

	* arch/unix/xaw/c64ui.c: Added menu items for PC64 and C64S
 	palettes.
	* arch/unix/xaw/c128ui.c: Likewise.

1998-10-12  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* Version 0.15.0.20.

	* c64/c64iec.c (iec_calculate_callback_index): Fixed typo.
	* c128/c128iec.c (iec_calculate_callback_index): Fixed typo.

	* c64/c64mem.c (mem_set_vbank): Removed check if the video bank
	has changed.
	* c128/c128mem.c (mem_set_vbank): Changed likewise.

	* c64cia2.def (PRE_CIA_FUNCS): `iec_cpu_write_callback' made
	static.  `vbank' new variable.
	(STORE_CIAPA, UNDUMP_CIAPA): Check if video bank has changed.

	* drive/drive.c (cmdline_options): Fixed some typos.

1998-10-12  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* arch/unix/xaw/petui.c (set_KeyboardType): fix typo

	* cbm2/cbm610mem.c (mem_write_rom_snapshot_module): save images
	only
	(mem_read_rom_snapshot_module): return 0 if not found - optional 
	(mem_read_snapshot_module): check for return value of both

	* crtc-tmpl.c (crtc_update_timing, crtc_init) add static prototype
	for crtc_update_timing, and call it in crtc_init.
	(crtc_set_screen_mode): call crtc_update_memory_ptrs because
	of change of vmask

	* pet/petmem.c (rom_9_loaded, rom_A_loaded, rom_B_loaded): new
	variables. Set if ROM in $9***, $A*** or $B*** is valid.
	(petmem_convert_chargen): new function, convert 2k chargen ROM image
	to internal format.
	(mem_load, mem_read_rom_snapshot_module): call petmem_convert_chargen
	(mem_load): when reading extension ROMs, set rom_*_loaded. Also
	if extension ROM is 2k, move it to the begining of the ROM area.
	(set_screen): store values in CRTC registers 6, 12 and 13 if no
	CRTC available.
	(mem_read_ram_snapshot_module, mem_write_ram_snapshot_module,
	mem_read_rom_snapshot_module, mem_write_rom_snapshot_module,
	mem_read_snapshot_module, mem_write_snapshot_module): renamed
	original functions to _ram_ functions, fix them up.
	_rom_ functions are new, and new original functions call both,
	_ram_ and _rom_ functions.

	* pet/pets.c (pet_set_model_info): new function to set all the 
	model resources from a PetInfo struct. called from set_pet_model
	and mem_read_ram_snapshot_module.
	(pet_set_model): call pet_set_model_info.
	(check_info, pet_check_info): renamed check_info to pet_check_info.

	* vic20/vic20mem.c [VIC_ROM_BLK*{A|B}] new defined for 
	mem_rom_blocks. defines a bit for each of the possible 4k ROM
	blocks.
	(set_ram_block_*_enabled): unset the ROM enabled
	flag if RAM is enabled.
	(initialize_memory): check for both 4k blocks as ROM in every 
	RAM block.
	(mem_attach_cartridge): if cartridge attached, unmap RAM.
	Keep track of attached ROMs in mem_rom_blocks
	(mem_detach_cartridge): Keep track of attached ROMs in mem_rom_blocks
	(mem_read_ram_snapshot_module, mem_write_ram_snapshot_module,
	mem_read_rom_snapshot_module, mem_write_rom_snapshot_module,
	mem_read_snapshot_module, mem_write_snapshot_module): renamed
	original functions to _ram_ functions, fix them up.
	_rom_ functions are new, and new original functions call both,
	_ram_ and _rom_ functions.

1998-10-09  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* c128/c128.c, c128/c128mem.c, c64/c64.c, c64/c64mem.c, cbm2/c610.c,
	mem.h, pet/pet.c, /pet/petmem.c, /vic20/vic20.c, vic20/vic20mem.c 
	(mem_write_snapshot_module): 
	add parameter "save_roms" to calls, protoype and definitions.
	
	* cbm2/c610mem.c (mem_read_ram_snapshot_module): renamed from 
	mem_read_snapshot_module;
	(mem_read_snapshot_module): new function that calls 
	mem_read_{ram|rom}_snapshot_module
	(mem_read_rom_snapshot_module): new function that reads in the 
	ROM dump
	(mem_write_snapshot_module, mem_write_ram_snapshot_module, 
	mem_write_rom_snapshot_module): changed likewise
	(mem_set_basic_text): removed bogus stuff in mem_set_basic_text
	(cmdline_options): added -cart1 option. Fixed bug that mapped -cart6
	to Cart2Name!
	(resources): added Cart1Name
	(set_cart1_rom_name, cart_1_name): new function/variable for 
	$1*** ROM area
	(mem_load): load cart1 ROM if value there.

	* snapshot.h, snapshot.c (snapshot_write_string, snapshot_read_string,
	snapshot_module_write_string, snapshot_module_read_string):
	new functions to read/write variable-sized, malloc-ed strings
	from/to a snapshot.

1998-10-09  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* crtc-tmpl.c (new_screen_charheight, new_crtc_screen_textlines,
	new_crtc_cycles_per_line, new_crtc_vertical_total, 
	new_crtc_vertical_adjust, new_memptr_inc): new variable to put
	the changed values in. They are evaluated when crtc_update_timinig()
	is called.
	(screen_height, screen_width, screen_xpix, screen_ypix): new
	"read-only" variables that are referenced in the crtc.h macros
	for raster.h. They are set when crtc_update_timing() is called
	and are not allowed to be changed otherwise.
	(crtc_update_timing): new function to check "new_*" variables
	and set screen/window width/height appropriately
	(store_crtc): removed window/screen resize handling, instead
	set "new_*" variables only.
	(crtc_set_screen_mode): call crtc_update_timing with forced
	recomputation. (removed own window resize handling)
	(int_rasterdraw): if in the first rasterline, call crtc_update_timing()
	to check if any of the variables has changed.

	* crtc.h [CRTC_SCREEN_HEIGHT, CRTC_SCREEN_WIDTH, CRTC_SCREEN_XPIX,
	CRTC_SCREEN_YPIX]: redefine to variables, not an arithmetic
	expression with up to 3 variables.

1998-10-08  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* doc/vice.texi: fix C610 -> CBM-II

	* cbm2/c610.c (machine_write_snapshot, machine_read_snapshot):
	add calls to sid_{read|write}_snapshot_module(). 

	* crtc-tmpl.c (store_crtc): for certain registers check if
	the value written differs from the previous value. If not,
	return immediately.
	(crtc_vertical_total, crtc_vertical_adjust): new variables
	for registers 4 and 5 to be able to compare previous values
	
	* crtc.h (CRTC_SCREEN_HEIGHT): use crtc_vertical_total
	and crtc_vertical_adjust instead of crtc[].

1998-10-08  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* cbm2/c610.c (cbm2_rfsh_per_sec, cbm2_cycles_per_rfsh): new
	variables that are set with the default values from the header file.
	(machine_init): call vsync_init and sound_init with those
	variable names. 
	(machine_set_cycles_per_frame): new functions. CRTC calls it
	to set a new framerate.
	* pet/pet.c: Changed likewise

	* cbm2/c610.h: remove NTSC defines except fro the CYCLES_PER_SECOND.
	* pet/pet.h: changed likewise

	* crtc-tmpl.c (crtc_screen_textlines, crtc_cycles_per_line):
	new variables to keep the CRTC state
	(crtc_cols) removed
	(IS_DOUBLE_WIDTH_ALLOWED): new define for checking if a window is
	wide enough to allow stretching in x-direction
	(store_crtc): various changes to adapt to the newly set 
	frame timing. Calling machine_set_cycles_per_frame sets
	the timing of the machine.
	(crtc_set_screen_mode): fix handling when we change the window
	width when double_size_enabled is true.
	(also fixed in store_crtc(0/1,*))
	(rasterline_start_clk): new variable to hold the clk value
	of the active rasterline.
	(int_rasterdraw): set rasterline_start_clk
	(crtc_read_snapshot_module, crtc_write_snapshot_module): 
	write values of rasterline and position in rasterline, and
	ignore when reading.

	* crtc.h: removed most constants. Instead defined the necessary 
	DEFINES from the new CRTC state variables.

	* machine.h (machine_set_cycles_per_frame): new prototype

	* pet/crtc.def (MEMORY_PTRS): fix occurance of crtc_cols

	* pet/petmem.c (set_screen): if PET does not have CRTC, set
	video to sane values.

1998-10-07  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* Makefile.am, cbm2/Makefile.am, data/Makefile.am,
	arch/unix/xaw/Makefile.am, cbm2/Makefile.am (x610, c610, xcbm2, cbm2):
	rename all c610 to cbm2 and x610 to xcbm2

	* configure.in: create data/CBM-II/Makefile and src/cbm2/Makefile
	instead of the C610 ones.

1998-10-06  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.19.

	* arch/unix/xaw/uimenu.c (make_menu_label): Always return a
	malloced string.

1998-10-06  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* arch/unix/xaw/uisettings.c: Separated parallel cable and extend
 	disk entries for each drive.

	* c64/c64iec.c (iec_cpu_write): Split into four functions.
	(iec_calculate_callback_index): New function.
	* c128/c128iec.c: Changed likewise.

	* c610/c610iec.c: Added `iec_calculate_callback_index' stub.
	* pet/petiec.c: Likewise.
	* vic20/vic20iec.c: Likewise.

	* c64/c64cia2.def (STORE_CIAPA): Changed to call IEC write
	functions depending on `iec_callback_index'.
	(UNDUMP_CIAPB, READ_CIAPB, READ_CIAICR): Changed to handle two
	separate parallel cables.

	* drive/drive.c: Moved parallel cable and extend disk variables
	into struct `drive_t'.
	(set_drive_true_emulation): Recalculate the IEC callback index.
	(set_drive0_type, set_drive1_type, drive_disable): Likewise.
	(set_drive_parallel_cable_enabled): Split to handle both drives
	separately.
	(set_extend_image_policy): Changed likewise.
	Updated resources and command line options.

	* drive/via1drive0.def (STORE_PRA, READ_PRA): Added support for
	two separate parallel cables.
	* drive/via1drive1.def (STORE_PRA, READ_PRA): Likewise.

1998-10-06  Ettore Perazzoli  <ettore@comm2000.it>

	* palette.c (palette_load): Fixed memory leak.

	* serial.c (serial_attach_device): If `name' is not NULL, free it.

	* arch/unix/xaw/uimenu.c (ui_menu_create): Fixed memory leak (the
	string returned by `make_menu_label()' was not being freed).

	* raster.c (init_raster): Use `SCREEN_MAX_HEIGHT' for allocating
	the frame buffer instead of `SCREEN_HEIGHT'.
	(reset_raster): Use `SCREEN_MAX_HEIGHT' instead of `SCREEN_HEIGHT'.

	* crtc-tmpl.c (crtc_read_snapshot_module): Do not read the raster
 	cycle/line values.
	(crtc_write_snapshot_module): Do not save the raster cycle/line
 	values.

	* main.c (break64): If called before initialization is finished,
	exit without a dialog.  If it's an "interesting" signal, dump core 
	via `abort()'.

	* crtc.h: New file.

	* c610/crtc.h: Removed.

	* pet/crtc.h: Removed.

	* crtc-tmpl.c (store_crtc) [__MSDOS__]: Handle character height.

	* pet/crtc.h: Removed `#if PAL's because they are misleading.

	* sid/Makefile.am (INCLUDES): Added back `@RESID_INCLUDES@'.

	* c64/vicii.c (vic_ii_powerup): New function.
	(vic_ii_init): Call it.

	* arch/unix/xaw/uicommands.c (powerup_reset): Call
 	`machine_powerup()' instead of `mem_powerup()' and then
 	`maincpu_trigger_reset()'.
	* arch/msdos/menudefs.c (hard_reset_callback): Likewise.
	* arch/msdos/kbd.c (kbd_flush_commands): Likewise with the
	`KCMD_HARD_RESET' command.

	* c610/c610.c (machine_powerup):  New function.

	* c128/c128.c (machine_powerup): New function.

	* pet/pet.c (machine_powerup): New function.

	* vic20/vic20.c (machine_powerup): New function.

	* c64/c64.c (machine_powerup): New function.

	* machine.h (machine_powerup): New function, required for all the
 	machines.

1998-10-05  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.18.

	* drive/drivecpu-tmpl.c (mydrive_cpu_reset): Set `last_clk' to the
 	current value of `clk' so that the drive reset happens
 	immediately.
	(mydrive_cpu_execute): As a safety measure, if the new clk is
	lower than the old clk, don't do anything.

	* arch/unix/xaw/ui.c (ui_open_canvas_window): Track display label
 	made larger.

	* sid/Makefile.am (INCLUDES): Removed `RESID_INCLUDES'.

1998-10-05  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* c128/c128iec.c (iec_drive_write): Split to `iec_drive0_write()'
	and `iec_drive1_write()'.
	(iec_drive_read): Split to `iec_drive0_read()' and
	`iec_drive1_read()'.
	* c610/c610iec.c: Likewise.
	* c64/c64iec.c: Likewise.
	* pet/petiec.c: Likewise.
	* vic20/vic20iec.c: Likewise.

	* c64/Makefile.am: Updated `BUILT_SOURCES'.
	* pet/Makefile.am: Updated `BUILT_SOURCES'.

	* drive/cia1581drive0.def (STORE_CIAPB): Use `iec_drive0_write()'.
	(READ_CIAPB): Use `iec_drive0_read()'.
	* drive/cia1581drive1.def: Changed likewise.

	* drive/via1drive0.def (UNDUMP_PRB, STORE_PRB, READ_PRB): Use new
	drive IEC functions.
	* drive/via1drive1.def: Likewise.

	* iecdrive.h: New functions `iec_drive0_write',
	`iec_drive0_write', `iec_drive0_read' and `iec_drive1_read'.

	* vic20/vic20iec.c: Added new status signals for the second drive.
	(resolve_bus_signals): Use status signals of both drives to
	calculate the bus value.
	(iec_pa_write, iec_pcr_write): Also calculate data modifier for
	the second drive.

	* c128/c128iec.c (iec_cpu_write): Do not calculate IEC bus when a
	parallel drive is enabled. 
	* c64/c64iec.c (iec_cpu_write): Changed likewise.

	* drive/drive.c (set_drive0_idling_method): Set idle method before
	inserting traps.  Also remove ROM checksum patch when no idle trap
	is selected.
	(set_drive1_idling_method): Changed likewise.
	(drive_initialize_rom_traps): Also save ROM checksum routine.

	* drive/drive.h: Added new member `rom_checksum' to `drive_t'.

1998-10-05  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/msdos/menudefs.c (ui_create_main_menu): Added snapshot
 	submenu.

	* arch/msdos/uisnapshot.h: New file.

	* arch/msdos/uisnapshot.c: New file.

	* arch/msdos/tuimenu.c (tui_menu_handle): Let the menu item
 	callback override the default behavior using the `behavior'
 	parameter.
	(tui_menu_call_callback): New parameter `behavior': if not NULL,
 	pass it to the menu callback; if NULL, pass a pointer to a dummy
 	variable instead.
	
	* arch/msdos/tuimenu.h: Added parameter `behavior' to
 	`tui_menu_callback_t'.
	(TUI_MENU_CALLBACK): Updated #definition likewise.

	* c64/c64mem.c: #include "ui.h".

	* utils.c (file_exists_p): New function.

	* arch/unix/xaw/uisettings.c: 40-track and parallel cable submenus
 	made common to both drives.

1998-10-04  Ettore Perazzoli  <ettore@comm2000.it>

	* acia-tmpl.c (rs232_open): Made non-static.
	(rs232_close): Made non-static.
	(rs232_putc): Made non-static.
	(rs232_getc): Made non-static.

	* c128/c128mem.h: #include "types.h".

	* vic20/vic20.c: #include <unistd.h>.

	* c128/c128.c: #include <unistd.h>.
	(machine_write_snapshot): Removed bogus variable `rval'.

	* arch/unix/xaw/uisnapshot.c (save_callback): Pass the
	`save_disks' and `save_roms' flags to `machine_write_snapshot()'.

	* c64/c64.c (machine_write_snapshot): New parameters `save_roms',
 	`save_disks'.
	* pet/pet.c (machine_write_snapshot): Likewise.
	* c128/c128.c (machine_write_snapshot): Likewise.
	* vic20/vic20.c (machine_write_snapshot): Likewise.

	* drive/drive.c (drive_write_snapshot_module): New parameter
 	`save_disks'.  If zero, don't save GCR images in the snapshot.

	* arch/unix/xaw/uisnapshot.c (build_snapshot_dialog): Only
 	possible settings for the "Save disk" option are "On" and "Off".
	(save_callback): Updated accordingly.
	
	* c610/c610.c: `machine_name' changed to "CBM-II".

	* Makefile.am (LINK): Define to `@LINKCC@ $(CFLAGS) $(INCLUDES)
 	$(CPPFLAGS)'.

	* c64/Makefile.am (INCLUDES): Do not include `RESID_INCLUDES'.

1998-10-04  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* configure.in: add data/DRIVES to list of subdirectories

	* data/C128/Makefile.am, data/C64/Makefile.am,
 	data/VIC20/Makefile.am, data/PET/Makefile.am,
 	data/C610/Makefile.am, data/DRIVES/Makefile.am: move dos ROM
 	images from emulator directories to DRIVES directory

	* data/C610/busi_uk.vkm: fixup keyboard mapping

	* data/Makefile.am: add DRIVES subdirectory

	* acia-tmpl.c (myacia_irq_res, myacia_set_irq): use a special int
 	variable instead of the IRQ IK_* value directly for the resource

	* arch/msdos/c610kbd.c (c610_keyboard): fix C610 keyboard table

	* arch/unix/print.c (print_open): use append mode instead of 
	overwrite mode

	* arch/unix/xaw/c610ui.c (c610_modelline_submenu) new submenu for
 	the hardware swtiches

	* arch/unix/xaw/uisettings.c (acia1_irq_submenu): use ints instead
	of IK_* values
	(radio_Drive8Type, radio_Drive9Type): modelled after the 
	UI_MENU_DEFINE_RADIO(), but greys out the entry if drive
	does not work on the available bus.

	* c128/c128iec.c, c64/c64iec.c, pet/petiec.c, c610/c610iec.c, 
	vic20/vic20iec.c, iecdrive.h (iec_available_busses): new function 
	that returns a value to tell if serial IEC and/or parallel IEEE 
	handling is available.

	* c610/c610mem.c (cbm2_model_line, set_cbm2_model_line): new
 	functions to handle hardware switch of the CBM-II models
	(resources): change default for chargen from "chargen" to
 	"chargen.600", ModelLine as nwe resource and default to 50Hz C6x0.
	(cmdline_options): -modelline new option
	(modtab): add line entry to struct for modelline; add C7x0 models.
	(cbm2_set_model): set modelline when setting model

	* c610/c610tpi2.def (cbm2_model_port_mask,
 	set_cbm2_model_port_mask): set the hardware switches for the
 	CBM-II model

	* c610/crtc.h, pet/crtc.h (CRTC_SCREEN_CHARHEIGHT): define to 
	screen_charheight.

	* crtc-tmpl.c (store_crtc): set screen_charheight appropriately 
	
	* drive/drive.c (set_drive0_type, set_drive1_type): if drive
	to be set is not availbale (due to incompatible bus) set default
	for the available bus
	(drive_match_bus): match the drive type with the available bus

	* drive/drive.h (drive_match_bus): new prototype

	* fsdevice.c (resources): change default for FSDevice11SaveP00
	to not create P00 files

	* sysfile.c (sysfile_init): add data/DRIVE to system file search
	path
	
1998-10-02  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.17.

	* c64/vicii.c (set_video_mode): Removed wrong optimization used
 	when adding background changes for `overscan_background_color'
	(fixes "Just in Case").  Many thanks to Andreas for finding a way
	to make the bug more apparent.

	* main.c (break64) [!__MSDOS__]: Open a dialog and ask the user
 	whether she wants to dump core.  If she wants to, exit via
 	`abort()'.
	(MAIN_PROGRAM): Autostart snapshot files too.

	* arch/unix/xaw/ui.c (build_confirm_dialog): Do not set the
	`resize' field in `message' to False.

	* mon_parse.y (disk_rules): `CMD_LOAD' and `CMD_BLOAD' use
	`opt_address', not `address'.

	* data/C610/Makefile.am, data/PET/Makefile.am (roms): add
	dos2031 ROM image

1998-10-01  Teemu Rantanen  <tvr@cs.hut.fi>

	* sounddrv/sounddummy.c: Added STDC_HEADERS around standard C headers.
	Also make sure vice.h is included first.
	* sounddrv/sounddump.c: Likewise.
	* sounddrv/soundfs.c: Likewise.
	* sounddrv/soundspeed.c: Likewise.
	* drive/drive.c: Likewise.
	* drive/drive.h: Likewise.
	* drive/drivecpu-tmpl.c: Likewise.
	* drive/wd1770.c: Likewise.
	* c64/c64.c: Likewise.
	* c64/c64mem.c: Likewise.
	* c64/c64rsusers.c: Likewise.
	* c64/cartridge.c: Likewise.
	* c64/patchrom.c: Likewise.
	* c64/reu.c: Likewise.
	* c64/vicii.c: Likewise.
	* sid/sid.c: Likewise.
	* acia-tmpl.c: Likewise.
	* asm.c: Likewise.
	* autostart.c: Likewise.
	* c1541.c: Likewise.
	* charsets.c: Likewise.
	* cia-tmpl.c: Likewise.
	* cmdline.c: Likewise.
	* cpu-tmpl.c: Likewise.
	* crtc-tmpl.c: Likewise.
	* via-tmpl.c: Likewise.
	* findpath.c: Likewise.
	* findpath.h: Likewise.
	* fsdevice.c: Likewise.
	* gcr.c: Likewise.
	* interrupt.c: Likewise.
	* interrupt.h: Likewise.
	* kbdbuf.c: Likewise.
	* main.c: Likewise.
	* mem.h: Likewise.
	* memutils.c: Likewise.
	* misc.c: Likewise.
	* mon.c: Likewise.
	* mon.h: Likewise.
	* mon_lex.l: Likewise.
	* mon_parse.y: Likewise.
	* mshell.c: Likewise.
	* palette.c: Likewise.
	* parallel.c: Likewise.
	* petcat.c: Likewise.
	* prdevice.c: Likewise.
	* pruser.c: Likewise.
	* raster.c: Likewise.
	* resources.c: Likewise.
	* rsuser.c: Likewise.
	* serial.c: Likewise.
	* snapshot.c: Likewise.
	* sound.c: Likewise.
	* sysfile.c: Likewise.
	* sysfile.h: Likewise.
	* tape.c: Likewise.
	* tapeunit.c: Likewise.
	* tpi-tmpl.c: Likewise.
	* traps.c: Likewise.
	* utils.c: Likewise.
	* utils.h: Likewise.
	* vdrive.c: Likewise.
	* vdrive.h: Likewise.
	* warn.c: Likewise.
	* zfile.c: Likewise.
	* zfile.h: Likewise.
	* zipcode.c: Likewise.

	* drive/drive.c: Added define 'AVOID_STATIC_ARRAYS' around big static
	arrays. Changed them to be malloced by the init routines.
	* drive/drive.h: Likewise.
	* drive/drivecpu-tmpl.c: Likewise.
	* c64/c64mem.c: Likewise.
	* c64/vicii.c: Likewise.
	* mem.h: Likewise.

	* c64/cartridge.c (cartridge_attach_image): Changed big stack array to
	be malloced and freed.

	* maincpu.c: '#include <sys/time.h>' around ifdef HAVE_SYS_TIME_H.

	* sound.c (sound_init): Call sound_init_ce_device() if needed.

	* sound.h: New prototype sound_init_ce_device().

	* types.h: Don't define WORD or DWORD if on Windows CE.

	* utils.c (spawn): Not implemented on Windows CE.

	* vdrive.c (attack_floppy_image): Fixed multiline string.

	* vice.h: Include ce32.h if on Windows CE.

	* zfile.h: Typedef mode_t if on Windows CE.

	* sid/sid.c (sound_machine_open): Ooops, sid initialization routines
	called at wrong	order (fixes armalyte intro).

1998-10-01  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* Makefile.am (INCLUDES): add drive subdirectory
	(xpet_LDADD, xpet_DEPENDENCIES, xpet-all, x610_LDADD,
	x610_DEPENDENCIES, x610-all): add $(drive_lib) or 
	libdrive to make it compile with true disk drive emulation

	* arch/unix/xaw/c610ui.c, arch/unix/xaw/petui.c (c610_ui_init,
	pet_ui_init): add ui_par_drive_settings_menu

	* arch/unix/xa/uisettings.c (set_drive8_type_submenu, 
	set_drive9_type_submenu): add VC2031 disk drive
 	(set_par_drive8_type_submenu, set_par_drive9_type_submenu): new 
	submenus for IEEE drives only.
	(par_drive_settings_submenu): new, drive settings for IEEE disk drives
	(ui_par_drive_settings_submenu): new, to be included in button menu

	* arch/unix/xaw/uisettings.h (ui_par_drive_settings_menu): new
 	prototype

	* c610/Makefile.am (INCLUDES): add drive subdirectory
	(libc610_a_SOURCES): add c610iec.c

	* c610/c610.c, pet/pet.c: include drive.h
	(machine_init_resources): call drive_init_resources
	(machine_init_cmdline_options): call drive_init_cmdline_options
	(machine_init): add file_system_set_hooks call to make vdrive and
	drive.c aware of each other.
	call drive_init. Add drive0_monitor_interface to monitor_init
	(machine_reset): call drive_reset()
	(vsync_hook): call drive_vsync_hook()
	Also call drive_prevent_clk_overflow()
	Call joystick() if JOYSTICK is defined (copied from C64)
	(machine_read_snapshot, machine_write_snapshot): call
	drive_{read|write}_snapshot_module
	
	* c610/c610cia1.def: include drive.h
	(STORE_CIAPA, UNDUMP_CIAPA): fix call to parallel_cpu_set_bus
	(READ_CIAPA): call drive{01}_cpu_execute if drive emulation enabled

	* c610/c610iec.c, pet/petiec.c: new file, dummy to make drive 
	emulation work; copied from vic20/vic20iec.c

	* c610/c610tpi1.def: include drive.h
	(READ_PA): call drive{01}_cpu_execute if drive emulation enabled

	* c64/c64iec.c (iec_cpu_write): check for VC2031 type and do not
	set ATN interrupt flag

	* c64/c64tpi.def: include drive.h
	(ieee_is_dev, ieee_is_out): new variables for the 75161 control lines
	(STORE_PA, STORE_PB, UNDUMP_PA, UNDUMP_PB, READ_PA, READ_PB): fix 
	IEEE bus handling to 75161/75160 logic

	* drive/drive.c (dos_rom_name_2031): new variable.
	(set_drive1_type): add 2031 type check
	(set_doe_rom_name_2031): new func
	(resources, cmdline_options): new DosName2031 and -dos2031 entries
	(drive_rom2031): new array
	(rom2031_loaded): new flag	
	(drive_set_disk_drive_type): fix 2031 handling
	(drive_load_rom_images): load 2031 ROM

	* drive/drive.h (DRIVE_ROM2031_SIZE) new define
	(drive0_parallel_set_atn, drive1_parallel_set_atn): new prototypes

	* via1drive0.def: include parallel.h
	(PRE_VIA_FUNCS): add drive0_parallel_set_atn()
	(UNDUMP_PRA, STORE_PRA): call parallel_drv0_set_bus() when 2031
	(UNDUMP_PRB, STORE_PRB): call appropriate parallel_drv0_ser_*() when
	2031 emualtion
	(READ_PRA, READ_PRB): read parallel_* data when appropriate
	(RESET): set serial bus lines inactive and iec_info to NULL when 2031

	* via1drive1.def: see via1drive0.def

	* parallel.c (parallel_set_atn, parallel_clr_atn): call 
	drive{01}_parallel_set_atn() when IEEE atn line changes.

	* pet/petpia1.def: include drive.h
	(READ_PA): call drive{01}_cpu_execute when drive emulation is enabled

	* pet/petpia2.def: include drive.h 
        (READ_PA): call drive{01}_cpu_execute when drive emulation is enabled

	* pet/petvia.def: include drive.h
        (READ_PRB): call drive{01}_cpu_execute when drive emulation is enabled

	* pia-tmpl.c (read_mypia): move ORB masking to template where it
 	belongs

	* serial.c (parallelcommand, parallelsendbyte, parallelreceivebyte):
	If device is 8 or 9 and drive 0 or 1 resp. are emulated directly,
	do not serve IEEE bus, return device not present instead

	* via-tmpl.c (MYVIA_NEED_LATCHING): new define that implements
	the port input latching. When latching is enabled reading the port
	reads the value of the port when the last CA1/CB1 active
	transition occured, instead of the current port value
	Currently outcommented in case it would break anything
	(myvia_ila, myvia_ilb): new variables to hold the input latch values
	(myvia_read_snapshot_module, myvia_write_snapshot_module):
	read/save input latch values.

1998-10-01  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.16.

1998-10-01  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* c128/c128mem.c: Added cartridge memory interface.

	* c64/Makefile.am: Added `c64cart.h' to `libc64_a_SOURCES'.

	* c64/c64cart.h: New file.

	* c64/c64mem.c: #include "c64cart.h".  Made `roml_bank',
	`romh_bank' and `export_ram' non-static.

	* c64/vicii.c: #include "c64cart.h".
	(int_rasterfetch) [FETCH_SPRITE]: Added Ultimax memory
	configuration.

	* drive/drive.c: Added new disk type `DRIVE_TYPE_2031' to all
	functions using `DRIVE_TYPE_*'.
	(drive_read_image_snapshot_module): Set `drive[].drive_floppy' to
	`NULL'.

	* drive/drive.h: Defined `DRIVE_TYPE_2031'.

	* drive/drivecpu-tmpl.c: Added new disk type `DRIVE_TYPE_2031' to
	all functions using `DRIVE_TYPE_*'.
	
1998-10-01  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/unix/xaw/uicommands.c (save_snapshot_trap): Call
 	`ui_snapshot_dialog()'.

	* arch/unix/xaw/uisnapshot.h (ui_snapshot_dialog): New file.

	* arch/unix/xaw/uisnapshot.c (ui_snapshot_dialog): New file, new
 	function.

1998-09-30  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* mon.c (mon_cmd_array): add entries for bload and bsave
	(mon_bload_file, mon_bsave_file): new functions

	* mon.h (mon_bload_file, mon_bsave_file): new prototypes

	* mon_parse.y (CMD_BLOAD, CMD_BSAVE): new tokes for the new cmds
	(disk_rules): add rules for CMD_BLOAD and CMD_BSAVE
	
1998-09-30  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/unix/xaw/ui.c (build_error_dialog): Fixed `XtNskipAdjust' in
 	`buttonBox'.
	(ui_jam_dialog): Likewise.

	* sounddrv/soundsgi.c: Added missing `#endif'.

1998-09-29  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.15.

	* maincpu.c (maincpu_read_snapshot_module): Removed `rwm_flag'
 	kludge.

	* c128/c128.c (machine_read_snapshot): Call
 	`vic_ii_prepare_for_snapshot()' and read the VIC-II snapshot last.
	(machine_write_snapshot): Write the VIC-II snapshot last.

	* c64/c64.c (machine_read_snapshot): Call
 	`vic_ii_prepare_for_snapshot()' and read the VIC-II snapshot last.
	(machine_write_snapshot): Write the VIC-II snapshot last.

	* c64/vicii.c (vic_ii_prepare_for_snapshot): New function.

1998-09-29  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* c128/c128.c (c64rsuser.h): include to avoid a warning.

	* c610/c610cia1.def, c610/c610tpi1.def, c64/c64tpi.def,
	pet/petpia1.def, petpia2.def, pet/petvia.def, serial.c:
	rename pardebug to parallel_debug;
	rename par_set_*() funcs to parallel_cpu_set_*() funcs;
	rename par_* variables to parallel_* variables

	* parallel.c, parallel.h: 
        rename pardebug to parallel_debug;
        rename par_* variables to parallel_* variables
	(parallel_set_eoi, parallel_set_ndac, parallel_set_nrfd,
	parallel_set_dav, parallel_set_atn, parallel_clr_eoi,
	parallel_clr_ndac, parallel_clr_nrfd, parallel_clr_dav,
	parallel_clr_atn): new functions to set/clr a bit in the
	corresponding parallel_* variables. The mask parameter
	is either ANDed or ORed with the variable and determines
	the bit to set/clr. A change in line status - if parallel_*
	changes from zero to not-zero or vice versa - is signaled
	to the parallel IEEE488 emulation code to handle filesystem
	access.
	(parallel_{emu|cpu|drv0|drv1}_set_{eoi|atn|dav|nrfd|ndac}):
	new inline functions. Set or clr the appropriate (PARALLEL_EMU, 
	PARALLEL_CPU, PARALLEL_DRV0, PARALLEL_DRV1) bit in the 
	parallel_* state variables via parallel_{clr|set}_*().
	emu is the filesystem access emulator, cpu the main CPU
	code (C64, PET, C610), and drv0/1 two possible emulated
	disk drives.
	(parallel_{emu|cpu|drv0|drv1}_set_bus): new functions
	for each device to set the bus lines.

	* arch/unix/xaw/c128ui.c (c128_ui_init): add snapshot submenu

	* c128/c128.c (machine_read_snapshot, machine_write_snapshot):
	copied functions from C64.

	* c128/c128mem.c (mem_write_snapshot_module, mem_read_snapshot_module):
	new functions to read/write C128 memory. Mostly a copy from C64, but
	saves MMU instead of CPU registers and does not save REU module.

	* c610/c610cpu.def (INSTRUCTION_FETCH_HACK, FETCH_OPCODE): remove
 	instruction fetch hack, define FETCH_OPCODE instead.

	* c610/c610mem.c (mem_read_snapshot_module,
 	mem_write_snapshot_module): fix memory size handling. Now the
 	right amount of memory is saved/ read.

	* via-tmpl.c (ca2_state, cb2_state): new variables to save the
	state of the CA2 and CB2 handshake outputs. Use VIA_SET_CA2() and
	VIA_SET_CB2() to set the line states. read/write Handshake
	should now work.
	(read_myvia, store_myvia, myvia_signal): handle read/write
	handshake of CA2/CB2.
	(myvia_read_snapshot_module, myvia_write_snapshot_module):
	add state of CA2 and CB2 to snapshot

	* drive/via1drive0.def, via1drive1.def, via2drive0.def,
	drive/via2drive1.def, vic20/vic20via1.def, vic20/vic20via2.def
	(VIA_SET_CA2, VIA_SET_CB2): new (empty) defines that should someday
	replace STORE_PCR.

	* pet/petvia.def (VIA_SET_CA2, VIA_SET_CB2, STORE_PCR): moved
	stuff from STORE_PCR to VIA_SET_CA2 and VIA_SET_CB2.

1998-09-29  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* c64/c64mem.c (store_io2, read_io2, store_io1): Add Final
	Cartridge III banking.
	(mem_freeze_cartridge): Added FC3 banking and fixed a typo.
	(cartridge_config_changed): Set new variable `ultimax'.

	* c64/cartridge.c (cartridge_attach_image): Enabled FC3 cart.

	* drive/Makefile.am: Added all built sources to `BUILT_SOURCES'.

	* drive/drive.c (drive_init): Initialize new variables
	`drive[].GCR_image_loaded' and `drive[].read_only'.
	(drive_attach_floppy, drive_detach_floppy): Set
	`drive[dnr].GCR_image_loaded' whenever a GCR image is present.
	(drive_write_gcr): Do not check for disk.
	(drive_write_protect_sense): Use the read only flag of the
	`drive' structure.
	(GCR_data_writeback): If no disk is attach do not write back gcr
	data.
	(drive_write_snapshot_module, drive_read_snapshot_module):
	Do not dump `ByteReadyActive', `Enable', ReadWriteMode' and
	`RomIdleTrap'.  Added `GCRImage' and `ReadOnly' to the snapshot.
	(drive_write_image_snapshot_module): New function.
	(drive_read_image_snapshot_module): New function.

	* drive/drive.h: Added `GCR_image_loaded' and `read_only' to the
	drive structure.

	* drive/via1drive0.def: Removed `via1d0_set_atn'.
	* drive/via1drive1.def: Likewise.

	* drive/via2drive0.def (UNDUMP_PCR): Undump PCR.
	* drive/via2drive1.def (UNDUMP_PCR): Undump PCR.

	* pet/petvia.def: Define `UNDUMP_PCR'.
	* vic20/vic20via1.def: Likewise.
	* vic20/vic20via2.def: Likewise.
	* drive/via1drive0.def: Likewise.
	* drive/via1drive1.def: Likewise.

	* via-tmpl.c (myvia_read_snapshot_module): Use `UNDUMP_PCR'
	instead of `STORE_PCR'.

1998-09-29  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* arch/unix/c610ui.c (set_joystick_device1, set_joystick_device2,
 	swap_joystick_ports, set_joystick_device_1_submenu,
 	set_joystick_device_2_submenu, joystick_settings_submenu,
 	joystick_settings_menu): new menus and functions to handle
 	Joysticks in the C500/600/700.
	(c610_ui_init): add joystick submenu to right mouse button menu.

	* c610/c610cia1.def (RESET_CIA, STORE_CIAPB, POST_CIA_FUNCS):
	rename userport_printer_* funcs to pruser_* funcs
	(READ_CIAPA): if IEEE is set to output then line voltage
	is high, not the IEEE bus value. Also let joystick 1 and 2
	triggers pull down pins PA6 and PA7
	(READ_CIAPB): Joystick 1 and 2 pull down appropriate lines.

	* c64/c64cia2.def (RESET_CIA, STORE_CIAPA, STORE_CIAPB,
	UNDUMP_CIAPB, POST_CIA_FUNCS): rename userport_printer_* funcs to
	pruser_* funcs

	* pet/petvia.def, vic20/vic20via2.def (STORE_PRA, UNDUMP_PRA,
	STORE_PCR, RESET_VIA, POST_VIA_FUNCS): rename userport_printer_*
	funcs to pruser_* funcs

	* pruser.c, pruser.h (userport_printer_write_data,
	userport_printer_set_busy, userport_printer_write_strobe):
	rename userport_printer_* to pruser_*

1998-09-27  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.14.

	* drive/viad.h: Added some missing `int's to VIA snapshot function
 	prototypes.

1998-09-27  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* drive/drive.c (drive_read_snapshot_modules,
	drive_write_snapshot_modules): move read/write of CPU state
	_before_ the VIA restore (because of clk value).

	* via-tmpl.c (myvia_write_snapshot_module): write extra byte
	if timers are running for an interrupt or not.
	(via_restore_int): move #ifdef define to top of file.
	(myvia_read_snapshot_module): use "myclk" instead of "clk" for
	initializing the rclk value...
	Unset the timers before reading the module
	fix timer constants (that were off by one)
	setup timers for interrupt when the extra byte in the snapshot
	says so, otherwise not.
	Use via_restore_int and not a #if construct

	* vic20/vic20mem.c (mem_read_snapshot_module,
	mem_write_snapshot_module): Add dump of colorram.

1998-09-27  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* c128/c128iec.c (iec_cpu_undump): New function.

	* c64/c64iec.c (iec_info): Made static again.

	* c64/c64mem.c (store_io2, mem_attach_cartridge): Added Final
	Cartridge banking.  (initialize_memory): Added Final Cartridge
	banking and added a missing `break'.

	* c64/cartridge.c (cartridge_attach_image): Added support for
	Final Cartridge III.  Not activated yet.

	* cartridge.h: Define `CARTRIDGE_FINAL_III'.

	* drive/drive.c (set_drive0_type, set_drive1_type): Only enable
	drive when true drive emulation is enabled.
	(cmdline_options): Updated command line options.
	(drive_write_snapshot_module): Save pointer to the rotation table.
	(drive_read_snapshot_module): Recalculate `GCR_track_start_ptr'.

	* drive/via1drive0.def (UNDUMP_PRB): Undump IEC bus values.
	* drive/via1drive1.def (UNDUMP_PRB): Likewise

	* vic20/vic20iec.c: #include "ciad.h".
	(iec_pa_read, iec_pa_write): Added support for two drives.

1998-09-27  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* c610mem.c (mem_load): change load of charrom to keep original
	16 bytes/char mapping

	* c610/crtc.h (BYTES_PER_CHAR): set to 16 for new character ROM
	mapping

	* crtc-tmpl.c (screen_charheight): new variable to contain the
	number of screen rasterlines per character. For now always set
	to 8.  In several places removed the assumption of 8 lines/char
	and use screen_charheight.
	(crtc_set_char, crtc_update_memory_ptrs): double the computed
	chargen_rel value as it is for 8 bytes/char in the charom.
	(DRAW): here and in other macros, make them slightly faster by
	checking "faster" cursor conditions first.
	Do not assume 8 lines/char.
	(crtc_read_snapshot_module, crtc_write_snapshot_module):
	Save cursor state and restore it.

	* pet/crtc.h (BYTES_PER_CHAR): set to 16 bytes/char in the charom

	* pet/petmem.c (mem_load): expand 8 bytes/char charom to
	16 bytes/char for crtc code
	(set_screen): set the number of screen lines per character
	to 8 when we disable the crtc.
	(mem_read_snapshot_module): handle module name correctly.
	(had not yet been changed to new snapshot_module_open semantics...)

	* pet/petmem.h (PET_CHARGEN_ROM_SIZE): double the size
	of the character ROM, as we now have 16 bytes/char

	* acia-tmpl.c (acia_ticks): new variable instead of define. holds
	the number of clk ticks for one char.
	(acia_baud_table): list of baud rates for the ACIA chip.
	(reset_myacia, myacia_read_snapshot_module, store_myacia):
	use machine_get_cycles_per_sec() to compute right interrupt rate
	from baud rate
	(alarm_active): new variable, keeps track if an alarm is scheduled.
	is used in myacia_read/write_snapshot_modules().
	(myacia_read_snapshot_module): open/close rs232 device depending
 	on value read.

	* arch/unix/video.c (do_try_mitshm, try_mitshm): current behaviour
	is to change the resource try_mitshm depending if we are on the
	same machine or not. When you save the settings, this is saved
	and bugs out when it is saved with MITSHM, but runs on a machine
	without. This fixes that.

	* c128/c128.c, c64/c64.c, pet/pet.c, vic20/vic20.c, c610/c610.c
	(machine_get_cycles_per_second): new functions to return
	the number of cycles per second.

	* c610/c610cia1.def (cia1_restore_int): new define to comply to
	new cia-tmpl.c handling. replaces set_int_noclk redefine.

	* c610/c610mem.c (mem_read_snapshot_module, mem_write_snapshot_module):
	fix memory block addresses and memory size computation...

	* c64/c64rsuser.c, vic20/vic20rsuser.c (c64_rsuser_init,
	vic_rsuser_init): call machine_get_cycles_per_second for it

	* cia-tmpl.c (mycia_set_int_clk, mycia_restore_int): new handling.
	if they are not defined, define them to set_int() and
	set_int_noclk(). Currently mycia_set_int_clk is redefined in
	most .def files to maincpu_set_int_clk, and this is defined
	in interrupt.h. This is ugly and should go away when we have
	decided whether putting those things into the .def file
	themselves (either as static inline or #define functions)
	(my_set_int,my_set_tai_clk,my_unset_tai,my_set_tbi_clk,
	my_unset_tbi,update_tai,update_tbi): new inline functions,
	translated from cpp #defines.
	(my_set_int): semantic has changed. we don't need I_MYCIAFL,
	because it is known to the function itself.
	(reset_mycia): compute myciatodticks from CYCLES_PER_SEC
	to give accurate time. CYCLES_PER_SEC, if not defined, is
	set to 1000000. In c610/c610cia1.c CYCLES_PER_SEC is defined
	as machine_get_cycles_per_second(). This should actualy be
	done in the C64/c128 as well....

	* crtc-tmpl.c (hw_double_cols): new flag, if the hardware doubles
	the number of columns stored in the CRTC registers.
	(store_crtc): Do not check for crtc_cols==80 but for
	hw_double_cols. Do not limit number of characters per
	line (memptr_inc).
	(crtc_set_screen_mode): ignore NULL pointer as screen parameter.
	Also set hw_double_cols from bit 1 in hwflags (bit 0 is crsr_enable)
	(fill_cache): check that crtc_cols >= memptr_inc when
	computing the number of emptry columns.
	(crtc_read_snapshot_module, crtc_write_snapshot_module):
	remove wrting of screenmem address relative to ram, as it does
	not work...  Instead of crsr_enable save crsr_enable and
	hw_double_cols.
	(crtc_read_snapshot_module): call SIGNAL_VERT_BLANK_OFF

	* machine.h (machine_get_cycles_per_second): new prototype

	* pet/petmem.c (set_screen): if cols==80 then set hw_double_cols
	flag when calling crtc_set_screen_mode.

	* tpi-tmpl.c (mytpi_set_int): invert the interrupt before processing
	it - IRQ lines are low active, but we are calld with state != 0
	for an active IRQ here....
	(mytpi_read_snapshot_module): fix type that called TPI_SET_CA
	twice.

1998-09-25  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.13.

	* cpu-tmpl.c (reset): Invert `NUMOFINT' and `NUMOFALRM'.

	* drive/drivecpu-tmpl.c (reset): Invert `DRIVE_NUMOFINT' and
 	`DRIVE_NUMOFALRM'.

1998-09-25  Martin Pottendorfer  <Martin.Pottendorfer@alcatel.at>

	* c64/c64.c: Added `resources.h'.

	* c64/c64mem.c (mem_write_snapshot_module): Added `HAVE_RS232'
	preprocessor directive around ACIA module, in order to make
	dos-compilation work again.

1998-09-25  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* c64/c64cia2.def (UNDUMP_CIAPA): Call `iec_cpu_undump'.

	* c64/c64iec.c, c64/c64iec.h (iec_cpu_undump): New function.

	* drive/drive.c: Removed #include "interrupt.h" and "vmachine.h".
	(drive_write_snapshot_module, drive_read_snapshot_module):
	Do not save `detach_clk' twice.  Also include `GCR_head_offset'
	and `GCR_read' to snapshot image.

	* drive/drivecpu-tmpl.c (mydrive_cpu_write_snapshot_module,
	mydrive_cpu_read_snapshot_module): Also save `last_exc_cycles'.

	* arch/msdos/vsync.c (vsync_init): Changed parameter to `hertz'.
	* arch/msdos/vsync.h: Likewise.
	* arch/unix/vsync.c: Likewise.
	* arch/unix/vsync.h: Likewise.
	* arch/win32/vsync.c: Likewise.
	* arch/win32/vsync.h: Likewise.

	* arch/unix/xaw/ui.c (fallback_resources): Changed back to 12
	pixel font.

	* arch/unix/xaw/uisettings.c (toggle_DriveEnable): Removed.
	(set_drive8_type_submenu, set_drive9_type_submenu): Added menu
	type entry "None".
	(drive_settings_submenu): Removed drive enable menu entries.

	* drive/drive.c (set_drive_true_emulation): Enable drives when
	true emulation is switched on.
	(set_drive0_enabled, set_drive1_enabled): Removed.
	(set_drive0_type, set_drive1_type): Enable drive when a drive
	type other than "None" is enabled.
	(resources): Default for drive #9 is "None".
	(drive_sync_found, drive_write_protect_sense): Made inline.
	(drive_enable): Changed to new true emulation switch handling.
	(drive_set_byte_ready): Removed.
	(drive_rotate_disk): Removed `mode_changed' parameter.  Moved
	`byte_ready_active' check out of this routine.
	(drive_sync_found): Changed return value to correspond with VIA2
	PRB bit#7.
	(drive_write_protect_sense): Changed likewise.
	(drive_write_snapshot_module, drive_read_snapshot_module):
	Removed `OldHalfTrack', `OldLedStatus' and `Side' entries.  Added
	`RotationTablePtr'.  Save GCR data of the current tack back to
	image before doing a snapshot.

	* drive/drive.h: Define `DRIVE_TYPE_NONE'.

	* drive/drivecpu-tmpl.c: Changed `_drive_set_byte_ready()' and
	`_drive_byte_ready()' to use the `drive' structure.
	(mydrive_cpu_write_snapshot_module,
	mydrive_cpu_read_snapshot_module): Added `cycle_accum' and
	`last_clk' to snapshot.  Set `bank_base' after loading snapshot.

	* drive/via1drive0.def (UNDUMP_PRA): Set sync factor and side.
	* drive/via1drive1.def (UNDUMP_PRA): Likewise.

	* drive/via2drive0.def (UNDUMP_PRB): Set LED status, zone bits and
	motor status.
	* drive/via2drive1.def (UNDUMP_PRB): Likewise.

1998-09-25  Ettore Perazzoli  <ettore@comm2000.it>

	* c64/vicii.c (set_sprite_x): Added +8 offset to raster X values
 	used for sprite X <-> raster X comparisons (it should now be
 	correct, according to Andreas' `sprx1.prg' test routine).

	* vdrive.h: Removed `struct dirslot'.
	* c1541.c: Moved here.

1998-09-24  Ettore Perazzoli  <ettore@comm2000.it>

	* crtc-tmpl.c (crtc_init): If `init_raster()' fails, return NULL.

	* vic20/vic.c (vic_init): If `init_raster()' fails, return NULL.

	* c64/vicii.c (vic_ii_init): If `init_raster()' fails, return
 	NULL.

	* c1541.c: Version 2.05.
	(main) [__MSDOS__ || WIN32]: Set default file mode to binary.

1998-09-23  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.12.

	* c128/c128mem.c (store_mmu): Fixed value of shared RAM size.

	* c64/c64mem.c (peek_bank_io): Call `peek_vic()' for $D000..$D3FF.

	* c64/vicii.c (peek_vic): New function.  Use a new
	`vic_unused_bits[]' array to figure out which bits must be forced
	to 1 in the return value.
	(vic_ii_enable_extended_keyboard_rows): When enabling extended
	keyboard rows, set the unused bit mask of $D02F to 0xf8;
	otherwise, set it to 0xff.

	* crtc-tmpl.c (crtc_read_snapshot_module): Set the `A_RASTERDRAW'
	alarm.

	* c64/c64mem.c (mem_write_snapshot_module): Dump IEEE 488 and ACIA
	modules if enabled.
	(mem_read_snapshot_module): Undump IEEE 488 and ACIA, setting the
	corresponding resource values according to the presence of the
	modules.

	* c64/c64.c (machine_write_snapshot): Do not dump TPI and ACIA.
	(machine_read_snapshot): Do not undump TPI and ACIA.

	* c64/vicii.c (store_vbank): Store the new value before
	dispatching the fetch event if necessary.

1998-09-22  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* pet/crtc.def, pet/petmem.c: include petpia.h instead of pia.h

	* Makefile.am (EXTRA_DIST): add pia-tmpl.c

	* arch/unix/xaw/petui.c (pet_ui_init): add snapshot commands to
	left mouse button menu.

	* c610/c610.c (machine_read_snapshot): trigger reset if reading
	of snapshot failed.

	* c610/c610acia1.def (set_int_noclk): redefined to tpi1_restore_int

	* c610/c610cia1.def (set_int_noclk): redefine to tpi_restore_int

	* c610/c610tpi.h (tpi1_restore_int, tpi2_restore_int): new prototypes

	* c610/tpi1.def (UNDUMP_PA, UNDUMP_PB, UNDUMP_PC): new defines

	* c610/tpi2.def, c64/c64tpi.def (UNDUMP_PA, UNDUMP_PB, UNDUMP_PC):
	new defines
	(mycpu_set_int, mycpu_restore_int): redefine as empty while loop
	instead of nothing.

	* c64/c64.c (machine_read_snapshot): if acia or tpi are not read
	reset the chips to remove pending interrupts

	* cia-tmpl.c (mycia_read_snapshot_module): clear alarms only if
	module is found, otherwise do not change state

	* pet/Makefile.am (libpet_a_SOURCES): removed pia.c, pia.h and
	added petpia.h, petpia1.def, petpia2.def, petpia1.c, petpia2.c
	(petpia1.c, petpia2.c): added dependencies to build files
	from template and .def files.

	* pet/pet.c (machine_read_snapshot, machine_write_snapshot): new
	functions.

	* pet/petacia.h (acia1_read_snapshot_module,
	acia1_write_snapshot_module): new prototypes

	* pet/petvia.h (via_read_snapshot_module,
	via_write_snapshot_module): new prototypes

	* pia-tmpl.c, pet/petpia.h, pet/petpia1.def, pet/petpia2,def: new file

	* pet/pia.c, pet/pia.h: removed files

	* tpi-tmpl.c (mytpi_restore_int): new function to restore interrupt
	when snapshot is read.
	(mytpi_read_snapshot_module, mytpi_write_snapshot_module): remove
	dump/restore of irq_previous

1998-09-22  Ettore Perazzoli  <ettore@comm2000.it>

	* c64/c64mem.c (initialize_memory): At $D6xx, use `read_sid()' and
	`store_sid()' instead of `read_d6()' and `store_d6()'.
	(store_bank_io): Likewise.
	(store_d6): Removed.
	(read_d6): Removed.

	* c64/c64.c (machine_write_snapshot): Call
	`tpi_write_snapshot_module()' and `acia1_write_snapshot_module()'
	inconditionally, without checking for the `IEEE488' and `AciaDE'
	resources.
	(machine_read_snapshot): Call `tpi_read_snapshot_module()' and
	`acia1_read_snapshot_module()' inconditionally.

1998-09-20  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* acia-tmpl.c (myacia_read_snapshot_module): fix module name
	handling for snapshot.

	* arch/unix/xaw/c610ui.c (Ram08, RamC, model_settings_submenu):
	Add menu entries to enable/disable RAM mapping in $f0800-
	and $fc000-
	(c610_ui_init): add snapshot commands

	* arch/unix/xaw/uicommands.c (load_snapshot_trap): add
	call to ui_update_menus() after loading snapshot, to update
	current configuration.

	* c610/c610.c (machine_write_snapshot, machine_read_snapshot):
	make it work.

	* c610/c610acia.h, c610/c610cia.h, c610/c610tpi.h, c610/crtc.h,
	c64/c64acia.h, c64/c64tpi.h:
	add prototypes for read/write snapshot functions

	* c610/c610mem.c (set_ramsize): trigger hardware reset when
	changing RAM size: this removes the magic number that the
	kernal detects, loads the new kernal (different RAM size)
	and thus initializes the machine correctly.
	(cart08_ram, cartC_ram, set_cart08_ram, set_cartC_ram,
	Ram08, RamC): new resources and appropriate functions
	for enabling/disabling RAM at $f0800- and $fc000-
	(store_io, read_io): removed $c*** checking, as this is now
	handled outside I/O
	(initialize_memory): use *_io only in $d***, and set $c*** in
	bank 15 according to cartC_ram.
	Set Bank 15 $0800-$0fff according to cart08_ram.
	(mem_bank_read, mem_bank_store): call read/store_io in $c*** only.
	(mem_read_snapshot_module, mem_write_snapshot_module):
	add CPU bank registers, configuration for cart08_ram and
	cartC_ram, and a hardware config byte (reserved)
	Also add missing RAM areas in bank 15.

	* c64/c64.c (machine_write_snapshot, machine_read_snapshot):
	Add writing of acia1 and tpi states if enabled. When restoring,
	enable/disable acia1/tpi features if the corresponding module
	is found or not.

	* c64/c64mem.c (acia_d6_enabled, set_acia_d6_enabled, AciaD6):
	outcomment acia2 ($D6**) related stuff.

	* cia-tmpl.c (mycia_read_snapshot_module, mycia_write_snapshot_module):
	remove explicit saving of IRQ line state. Instead use ICR bit 7
	when restoring.

	* crtc-tmpl.c (crtc_write_snapshot_module): renamed from
	vic_write_snapshot.

	* pet/petmem.c (mem_write_snapshot_module): fix bug in memsize
	computation.

	* tpi-tmpl.c (mytpi_read_snapshot_module, mytpi_write_snapshot_module):
	fix snapshot module name handling.

1998-09-21  Ettore Perazzoli  <ettore@comm2000.it>

	* drive/ciad.h: #include "snapshot.h"

1998-09-20  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.11.

	* crtc-tmpl.c (crtc_write_snapshot_module): New function.
	(crtc_read_snapshot_module): New function.

	* 6510core.c (DO_INTERRUPT): Reset immediately if a trap has
	triggered a reset.

	* vic20/vic20.c (machine_read_snapshot): Reset the machine when
	it fails.

	* c64/c64.c (machine_read_snapshot): Reset the machine when it
 	fails.

	* crtc-tmpl.c (RASTER_Y): New macro.
	(RASTER_CYCLE): New macro.

1998-09-18  Ettore Perazzoli  <ettore@comm2000.it>

	* via-tmpl.c (myvia_read_snapshot_module): Pass the correct module
	name to `snapshot_module_open()'.

	* vic20/vic20mem.c (mem_read_snapshot_module): Pass the correct
	module name to `snapshot_module_open()'.

	* arch/unix/xaw/vic20ui.c (vic20_ui_init): Add snapshot commands.

	* vic20/vic20via.h (via1_read_snapshot_module): New prototype.
	(via1_read_snapshot_module): New prototype.
	(via2_read_snapshot_module): New prototype.
	(via2_read_snapshot_module): New prototype.

	* c64/c64.c (machine_read_snapshot): Updated to the new behavior
	of `snapshot_open()'.
	(machine_write_snapshot): Do not use `perror()' in case
	`snapshot_create()' fails.
	(machine_read_snapshot): Do not use `perror()' in case
	`snapshot_open()' fails.

	* snapshot.c (snapshot_open): Argument `char *machine_name_return'
	replaced by `const char *machine_name'.  Compare the machine name
	in the snapshot header with `machine_name'; if different, return
	an error.

	* c64/vicii.c (vic_ii_read_snapshot_module): Correctly return with
	an error if the version number is not acceptable.

	* vic20/vic.c (vic_write_snapshot_module): New function.
	(vic_read_snapshot_module): New function.
	(RASTER_CYCLE): New #define.
	(RASTER_Y): New #define.

	* snapshot.c (snapshot_open): Use `zfopen()' instead of `fopen()'.
	(snapshot_close): If in read mode, use `zfclose()' instead of
 	`fclose()'.

	* c64/reu.c (reu_dma): Trigger an IRQ at the end of DMA if "end of
 	block" IRQs are enabled.  When doing a compare, generate an IRQ if
 	"verify error" IRQs are enabled and compared areas do not match.
	(read_reu): Reading register 0 removes any pending IRQs.

	* vmachine.h: `I_*' and `NUMOFINT' #defined constants changed into
 	an enum.  New interrupt `I_REU'.

	* c64/reu.c (reu_read_snapshot_module): Updated to match the new
	behavior of `snapshot_module_open()'.  Reset the REU before
	loading the stuff in.  Update the IRQ line according to bit 7 of
	register 0.

	* c64/c64mem.c (mem_write_snapshot_module): If REU is enabled,
 	write REU module too.
	(mem_read_snapshot_module): If a REU module is loaded
 	successfully, enable REU; otherwise, disable it.  Also update the
 	UI menus.

	* c64/reu.c: Snapshot module name changed to `REU1764'.

1998-09-18  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* acia-tmpl.c (myacia_read_snapshot_module):
	use set_int_noclk() instead of mycpu_set_int()

	* c610/c610cia.def [set_int_noclk]: undefine set_int_noclk() as it
 	reports to the TPI, not to the CPU

	* c610/c610tpi1.def [mycpu_restore_int]: define to set_int_noclk()

	* c610/c610tpi2.def [MYTPI]: define to TPI2
	[mycpu_restore_int]: define to nothing - no IRQs here

	* c64/c64tpi.def [mycpu_restore_int]: define to nothing - no IRQs
 	here

	* cia-tmpl.c (check_myciatodalarm): use I_MYCIAFL instead of
 	I_MYCIATOD
	(reset_mycia): unset interrupt line
	(mycia_read_snapshot_module, mycia_write_snapshot_module): remove
 	saving of TOD interrupt status.  unset interrupt line if not set
 	in snapshot.

	* tpi-tmpl.c (mytpi_read_snapshot_module,
 	mytpi_write_snapshot_module): change order of save. Move
 	irq_previous to the end - might be implementation specific.

	* via-tmpl.c (myvia_read_snapshot_module): use set_int_noclk()
	or via_restore_int (if defined) to restore the interrupt state.

	* vic20/vic20mem.c (mem_read_snapshot_module): set RAM config
	as saved in the snapshot.

	* vmachine.h [I_CIA1TOD, I_CIA2TOD]: removed.

1998-09-18  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/unix/xaw/uisettings.c (toggle_Drive8Enable): Removed.
	(toggle_Drive9Enable): Removed.
	(toggle_DriveEnable): New function.  Gray out "Enable drive..."
	entries if true emulation is disabled.

1998-09-17  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.11.

	* c610/c610mem.c: Use `basic.128' instead of `basic.b128' and
 	`basic.256' instead of `basic.b256'.
	(mem_load): Return -1 if BASIC ROM is not loaded.

	* acia-tmpl.c [!HAVE_RS232] (rs232_putc): Return -1.
	[!HAVE_RS232] (rs232_getc): Return -1.

	* arch/msdos/kbd.h: Raised `KBD_ROWS' value to 16.

	* c64/vicii.c (vic_ii_read_snapshot_module): If bit 7 in the video
	interrupt status register is set, trigger an IRQ.

	* cia-tmpl.c (mycia_read_snapshot_module): Restore interrupt
 	status.
	(mycia_write_snapshot_module): Dump interrupt status.

	* interrupt.c (set_irq_noclk): New function.
	(set_nmi_noclk): New function.
	(set_int_noclk): New function.
	(get_irq): New function.
	(get_nmi): New function.
	(get_int): New function.
	(interrupt_write_snapshot): Do not dump the IRQ/NMI line status
 	information anymore.
	(interrupt_read_snapshot): Do not restore the IRQ/NMI line status
 	information anymore.

	* op.h: Removed.

1998-09-17  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* c610/c610mem.c (cbm2_set_model): trigger power-up reset to make
 	kernal recognize new RAM size.

	* tpi-tmpl.c (mytpi_write_snapshot_module, mytpi_read_snapshot_module):
	fix parameter to snapshot_t* (from FILE*)

1998-09-16  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.9.

	* c610/c610acia1.c (rs232_open): Made non-static.
	(rs232_close): Likewise.
	(rs232_putc): Made non-static; return 0.
	(rs232_getc): Likewise.

	* pet/petacia1.c (rs232_open): Made non-static.
	(rs232_close): Likewise.
	(rs232_putc): Made non-static, and return 0.
	(rs232_getc): Likewise.

	* cia-tmpl.c (mycia_read_snapshot_module): Open module "MYCIA",
	not "CIA".

	* c610/c610.c (machine_write_snapshot, machine_read_snapshot):
 	Updated to use `snapshot_t' instead of `FILE'.

	* c64/c64.c (machine_write_snapshot, machine_read_snapshot):
 	Updated to use `snapshot_t' instead of `FILE'.

	* All snapshot module functions now take `snapshot_t *' as a
	parameter, instead of `FILE *'.  Changed files (functions) are:
	* vic20/vic20mem.c (mem_read_snapshot_module)
	* vic20/vic20mem.c (mem_write_snapshot_module)
	* cpu-tmpl.c (maincpu_write_snapshot_module)
	* cpu-tmpl.c (maincpu_read_snapshot_module)
	* c64/c64tpi.c (tpi_write_snapshot_module)
	* c64/c64tpi.c (tpi_read_snapshot_module)
	* c64/vicii.c (vic_ii_write_snapshot_module)
	* c64/vicii.c (vic_ii_read_snapshot_module)
	* maincpu.c (maincpu_write_snapshot_module)
	* maincpu.c (maincpu_read_snapshot_module)
	* via-tmpl.c (myvia_read_snapshot_module)
	* via-tmpl.c (myvia_write_snapshot_module)
	* cia-tmpl.c (mycia_write_snapshot_module)
	* cia-tmpl.c (mycia_read_snapshot_module)
	* c64/c64mem.c (mem_write_snapshot_module)
	* c64/c64mem.c (mem_read_snapshot_module)
	* acia-tmpl.c (myacia_write_snapshot_module)
	* acia-tmpl.c (myacia_read_snapshot_module)
	* pet/petmem.c (mem_read_snapshot_module)
	* pet/petmem.c (mem_write_snapshot_module)
	* c610/c610mem.c (mem_read_snapshot_module)
	* c610/c610mem.c (mem_write_snapshot_module)
	* c610/c610tpi1.c (tpi1_write_snapshot_module)
	* c610/c610tpi1.c (tpi1_read_snapshot_module)
	* c610/c610tpi2.c (tpi1_write_snapshot_module)
	* c610/c610tpi2.c (tpi1_read_snapshot_module)

	* snapshot.c: New typedef `snapshot_t'.
	(snapshot_module_open): Replaced `FILE *f' argument with
 	`snapshot_t *s'.
	(snapshot_module_create): Likewise.
	(snapshot_create): Return a `snapshot_t *' instead of a `FILE *'.
	(snapshot_open): Likewise.
	(snapshot_close): Take a `snapshot_t *' instead of a `FILE *' as a
	parameter.

	* sid/sid.c (sid_read_snapshot_module): Do not check signature.

	* c64/reu.c (reu_read_snapshot_module): New function.
	(reu_write_snapshot_module): New function.

	* c64/c64mem.c (mem_read_snapshot_module): Do not check signature.

	* cpu-tmpl.c (maincpu_read_snapshot_module): Do not check
 	signature.

	* cia-tmpl.c (mycia_read_snapshot_module): Do not check signature.

	* c64/vicii.c (vic_ii_read_snapshot_module): Do not check
 	signature.

	* snapshot.c (snapshot_module_open): Parameter `name_return'
	replaced by parameter `name', const.  Search for the module whose
	name matches `name'.  If the module is not found or another error
	happens, restore the the previous position and return NULL.

1998-09-16  Teemu Rantanen  <tvr@cs.hut.fi>

	* c64/sid.h: New prototypes sid_write_snapshot_module() and
	sid_read_snapshot_module().

	* c64/sid.c: Added #include "snapshot.h".

	* c64/sid.c (snap_module_name, sid_write_snapshot_module,
 	sid_read_snapshot_module): Implemented initial version of SID
 	snapshots.  Not fully accurate yet.

	* c64/c64.c (machine_read_snapshot, machine_write_snapshot):
	Added SID snapshot function calls.

1998-09-16  Ettore Perazzoli  <ettore@comm2000.it>

	* vic20/vic20rsuser.h: New file.
	(vic20_rsuser_init): Prototype.

1998-09-16  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* arch/unix/xaw/c610ui.c (set_KeyboardType, c610_keybd_submenu):
 	outcomented
	(model_settings_submenu): outcommented Keyboard type
 	(graph/business) entry.

	* pet/crtc.h (CRTC_WINDOW_TITLE): removed def that shadowed define
 	in crtc-tmpl.c resp. pet/crtc.c

	* c610/crtc.h (CRTC_WINDOW_TITLE): removed def that shadowed define
        in crtc-tmpl.c resp. pet/crtc.c

	* cia-tmpl.c (read_mycia): when reading CIA_CRA and CIA_CRB
	call update_mycia() to update bit 0 (stopped/running)

	* c64/c64cia1.def (UNDUMP_CIAPA): remove call to
 	vic_ii_trigger_light_pen

	* cia-tmpl.c : many debug prints.
	(mycia_write_snapshot_module): call update_tai() and
	update_tbi() before writing snapshot.
	(mycia_read_snapshot_module): before reading snapshot,
	stop TA and TB.
	Switch timer on accordign to code in store_mycia(CIA_CRA/CRB).

1998-09-16  Ettore Perazzoli  <ettore@comm2000.it>

	* zfile.c (zclose_all): If an element of the zfile list is not
	consistent, free it and skip it.

	* vic20/vic20.c [HAVE_RS232]: #include "vic20rsuser.h".

	* c64/c64.c [HAVE_RS232]: #include "c64rsuser.h".

	* Makefile.am (x610_LDADD): Do not add `-lm'.

	* arch/msdos/menudefs.c (monitor_callback): Do not use an extra
	trap to activate the monitor, as the registers have already been
	exported when reaching the main menu.

	* arch/msdos/vsync.c: Do not #include "sid.h" anymore.

	* c610/c610acia1.c (rs232_open): Made non-static.
	(rs232_close): Likewise.
	(rs232_putc): Made non-static; return 0.
	(rs232_getc): Likewise.

	* c610/c610.c: #include <unistd.h>.

	* arch/msdos/c610kbd.h, arch/msdos/c610kbd.c (c610_kbd_init): New
 	files, new function.

	* c610/c610.c [__MSDOS__]: #include "c610kbd.h".
	(machine_init) [__MSDOS__]: Call `c610_kbd_init()', not
 	`pet_kbd_init'.

	* arch/msdos/c610ui.h, arch/msdos/c610ui.c (c64_ui_init): New
	files, new function.

	* pet/petacia1.c (rs232_open): Made non-static.
	(rs232_close): Likewise.
	(rs232_putc): Made non-static, and return 0.
	(rs232_getc): Likewise.

	* vic20/vic20.c [__MSDOS__]: #include "vic20kbd.h".

	* c64/c64.c: #include <unistd.h>.

	* arch/msdos/ui.c (ui_toggle_drive_status): Removed.
	(ui_enable_drive_status): New function.
	(ui_display_drive_led): New parameter `drive_number'.
	(ui_display_drive_track): New parameter `drive_number'.

	* arch/msdos/ui.h: Typedef `ui_jam_action_t'.

	* arch/msdos/c64ui.c: Removed SID menu.  Use the one from
	`sidui.c'.
	* arch/msdos/c128ui.c: Likewise.

	* arch/msdos/sidui.h, arch/msdos/sidui.c: New files.

1998-09-15  Dag Lem  <resid@nimrod.no>

	* configure.in: Disable reSID configuration if no C++ compiler is
	found on the system.

1998-09-15  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* acia-tmpl.c (myacia_write_snapshot_module,
	myacia_read_snapshot_module): implemented snapshot code.

	* c128/c128cia1.def, c610/c610cia1.def, c610/c610tpi1.def,
 	c610/c610tpi2.def, c64/c64cia1.def, c64/c64cia2.def,
 	c64/c64tpi.def, drive/cia1571drive0.def, drive/cia1571drive1.def,
 	drive/cia1581drive0.def, drive/cia1581drive1.def,
 	drive/via1drive0.def, drive/via1drive1.def, drive/via2drive0.def,
 	drive/via2drive1.def, pet/petvia.def, vic20/vic20via1.def,
 	vic20/vic20via2.def
	[READ_PA, READ_PB, READ_PC, READ_PRA, READ_PRB, READ_CIAPA,
 	READ_CIAPB]: add data direction register masking (moved from
 	-tmpl.c files where appropriate)

	* c610/c610mem.c (mem_write_snapshot_module,
 	mem_read_snapshot_module): new functions, implemented snapshot
 	code

	* vic20/vic20mem.c (mem_write_snapshot_module,
 	mem_read_snapshot_module): new functions, implemented snapshot
 	code

	* cia-tmpl.c (read_mycia): remove DDRA/DDRB masking from read
 	functions, as not the output register but the pins are read on an
 	output pin.
	(mycia_write_snapshot_module): fix myciardi handling
	(mycia_read_snapshot_module): fix ioport handling (PA/PB typo!)
  	fix myciardi handling

	* pet/petmem.c (petmem_dump, petmem_undump,
 	mem_write_snapshot_module, mem_read_snapshot_module): renamed
 	petmem_* new snapshot format.

	* tpi-tmpl.c (read_mytpi): remove DDPA/PB/PC masking when reading
 	a port bit.

	* via-tmpl.c (read_myvia): remove DDRA/B masking when reading a
 	port bit.

1998-09-15  Ettore Perazzoli  <ettore@comm2000.it>

	* c64/reu.c (reu_dma): Set interrupt bit when DMA is completed,
	according to $DF09.

	* cia-tmpl.c (mycia_read_snapshot_module): Corrected `oldpa' ->
	`oldpb' typo.

	* fsdevice.c (fsdevice_reduce_filename_p00): Added cast to `int'
 	when using `isalpha()'.
	(open_fs): Added cast to `int' when using `isupper()' or
 	`tolower()'.
	(fsdevice_evaluate_name_p00): Added cast to `int' when using
 	`islower()' or `isalnum()'.

	* mon.c (mon_add_string_to_buffer): Removed bogus debugging
 	message.

1998-09-14  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.8.

	* vic20/vic20via1.def (INCLUDES): Removed spaces before
 	#preprocessing directives to make losing "not-so-ANSI" compilers
 	happy.
	* drive/via2drive0.def (INCLUDES): Likewise.
	* drive/via2drive1.def (INCLUDES): Likewise.
	* drive/via1drive0.def (INCLUDES): Likewise.
	* c64/c64cia2.def (INCLUDES): Likewise.

	* arch/unix/xaw/ui.c: New variable `enabled_drives'.
	(ui_enable_drive_status): Set `enabled_drives'.
	(ui_open_canvas_window): Call `enable_drive_status()'.
	(ui_init): Initialize `enabled_drives'.

1998-09-14  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* acia-tmpl.c (myacia_write_snapshot_module,
	myacia_read_snapshot_module): new snapshot functions, work in
	progress.

	* c64/c64cia2.def (UNDUMP_CIAPB): copied from STORE_CIAPB

	* pet/petmem.c (pet2_tape_traps, pet3_tape_traps, pet4_tape_traps):
	moved to the beginning of the file

        * arch/unix/xaw/c610ui.c (c610_memsize_submenu): add 1M memory
        size entry
        (model_defaults_submenu): add 620+ model (1M)
        (model_settings_submenu): add toggles for Ram1, Ram2, Ram4, Ram6

        * c610/c610cia1.def (cia1_set_ieee_dir): use oldpa
        [STORE_CIAPA]: comply with new I/O port handling
        [READ_CIAPA]: dito

        * c610/c610mem.c (set_ramsize): allow 512 and 1024k as well
        (cart1_ram, cart2_ram, cart4_ram, cart6_ram): new resources
        for setting bank15 at those places to RAM instead of ROM.
        (ram): now 1M in size for 16 possible banks of 64k
        [STORE_ZERO, STORE_RAM, READ_ZERO, READ_RAM]: defines to
        build banked memory access functions.
        (initialize_memory): check ramsize and set RAM memory functions
        as well as check cart*_ram and set RAM in bank 15
        (banknames, banknums): add more RAM banks for monitor access.
        (mem_bank_read, mem_bank_write): handle new banks

	* c610/c610mem.h [C610_RAM_SIZE]: change to 1M

	* c610/c610tpi.def [STORE_PA]: fix call to cia1_set_ieee_dir

	* crtc-tmpl.c, pet/crtc.def, c610/crtc.def [MY_WINDOW_TITLE]:
        new define for the window title.

	* Makefile.am (noinst_HEADERS): removed crtc.h

	* c610/Makefile.am (libc610_a_SOURCES): added crtc.h

	* c610/crtc.h: new file, copied from main crtc.h, but changed
	CRTC_CYCLES_PER_LINE to 130

	* crtc.h: removed file (moved to c610/crtc.h and pet/crtc.h)

	* pet/Makefile.am (libpet_a_SOURCES): added crtc.h

	* pet/crtc.h: new file (copied from main crtc.h)

	* pet/pets.c (check_info): fixed bogus assignement.

	* configure.in (strerror): added to AC_CHECK_FUNCS

	* arch/unix/xaw/uisettings.c: include utils.h, for maybe-prototype
	for strerror

	* utils.c (strerror): new function if HAVE_STRERROR is not defined

	* utils.h (strerror): new prototype if HAVE_STRERROR is not
	defined

	* C128/default.vkm, C64/default.vkm, C64/position.vkm,
 	vic20/default.vkm, vic20/position.vkm: Add entries for row=-3,
 	col=0 and 1, serving as Restore keys (allows two mappings)

	* acia-tmpl.c (myacia_set_irq): set/unset IRQ when changing the
	interrupt via the menu/resource

	* arch/unix/kbd.c (key_ctrl_restore1, key_ctrl_restore2): two new
	keysym mappings to allow dynamic change of Restore key mapping.
	(kbd_event_handler): Don't check for XK_Page_Up and XK_Prior, but
	for key_ctrl_restore[12] instead.
	(kbd_parse_keyword): clear restore mappings on !CLEAR in .vkm file.
	(kbd_parse_entry): set restore mappings on row=-3
	(kbd_dump_keymap): dump restore mappigns.

	* arch/unix/xaw/c610ui.c (c610_ui_init): remove call to
	ui_toggle_drive_status

	* arch/unix/xaw/petui.c (pet_ui_init): remove call to
	ui_toggle_drive_status

	* arch/unix/xaw/uisettings.c (acia1_irq_submenu): new submenu
	to change IRQ for ACIA

	* arch/unix/xaw/uisettings.h (acia1_irq_submenu): new prototype

	* c128/c128cpu.def (PAGE_ONE, PAGE_ZERO, LOAD, STORE, LOAD_ZERO,
	STORE_ZERO): defines taken from c128/c128mem.h

	* c128/c128mem.h: outcomment macros for 6510core.c
	(moved to c128cpu.def)

	* c610/c610acia1.def: removed bogus second copy of the file.

	* c64/c64mem.c (page_zero): removed

	* pet/petmem.c (page_zero): removed

	* vic20/vic20mem.c (page_zero): removed

	* convio: now a "#define" in a function() definition is not also
	read as convio-define

	* cpu-tmpl.c (STORE, LOAD, LOAD_ZERO, STORE_ZERO): define them
	only if not defined - they are defined for the C128.

1998-09-13  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.7.

	* drive/drive.c (drive_move_head): Do not display the drive track.
	(drive_enable): Force an update of the UI elements.

	* arch/unix/xaw/ui.c (ui_display_drive_led): New parameter
 	`drive_number'.
	(ui_display_drive_led): Do not realize unrealized widgets.
	(ui_display_drive_track): Do not realize unrealized widgets.

	* drive/drive.c (drive_update_ui_status): Update tracks and LEDs
 	for both drives.

	* arch/unix/xaw/ui.c: Added `drive_status' to `app_shells'; it
	replaces `drive_track_label' and `drive_led'.
	(ui_open_canvas_window): Create two drive track labels and two
	drive LEDs and initialize `drive_status'.
	(ui_toggle_drive_status): Removed.
	(ui_enable_drive_status): New function.
	(ui_display_drive_track): New parameter `drive_number'.

1998-09-13  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* drive/drivecpu-tmpl.c (mydrive_cpu_prevent_clk_overflow): Added
 	call to `mywd1770_prevent_clk_overflow()'.

	* drive/wd1770.c: #include "interrupt.h".
	(wd1770_command_restore): New function.
	((wd1770_command_seek): New function.
 	(wd1770_command_step): New function.
 	(wd1770_command_stepin): New function.
 	(wd1770_command_stepout): New function.
 	(wd1770_command_readsector): New function.
 	(wd1770_command_writesector): New function.
 	(wd1770_command_readaddress): New function.
 	(wd1770_command_forceint): New function.
 	(wd1770_command_readtrack, wd1770_command_writetrack): New
 	functions.
	(wd1770d0_prevent_clk_overflow, wd1770d1_prevent_clk_overflow):
 	New functions to prevent counter overflow.
	(store_wd1770, read_wd1770): Added WD1770 register structure.
	(wd1770_update_track_register, wd1770_motor_control): New
 	functions.

	* drive/wd1770.h: New struct `wd1770_t'.
	* c128/Makefile.am: Added `-I$(top_srcdir)/src/sid' to `INCLUDES'.
	* c64/Makefile.am: Changed likewise

	* c610/Makefile.am: Added `-I$(top_srcdir)/src/sid' to `INCLUDES'.
	Added `c610acia1.def' to `libc610_a_SOURCES'.

	* c610/c610acia1.def: Added missing file.
	* sid/sid.h: Added missing file

	* sid/Makefile.am: Added `sid.h' to `libsid_a_SOURCES'.

1998-09-13  Ettore Perazzoli  <ettore@comm2000.it>

	* c128/c128mem.c (mem_set_vbank): Really update the video bank.

1998-09-12  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.6.

	* arch/unix/vsync.c (set_timer_speed): Restored correct
	calculation of `timer_ticks'.

	* Makefile.am: Added `@RESID_LIBS@' to the X610 library list.

	* sid/resid.cc (resid_sound_machine_read): Added `int' cast to
 	shut down compiler.
	(resid_sound_machine_store): Likewise.
	(resid_sound_machine_calculate_samples): Likewise.

	* arch/unix/xaw/c64ui.c: Fixed `CheckSsColl' -> `CheckSbColl'
 	typo.

1998-09-11  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* Makefile.am (cpucore_sources): define for dependencies of
	6510core.c
	(maincpu_sources): added maincpu.def
	(EXTRA_DIST): added cpu-tmpl.c
	(BUILT_SOURCES): added maincpu.c
	(maincpu.c): added rule to build from maincpu.def and cpu-tmpl.c

	* c128/Makefile.am (libc128_a_SOURCES): added c128cpu.def
	(c128cpu.c): added rule to build from c128cpu.def and ../cpu-tmpl.c

	* c128/c128cpu.def: new file to make a cpu-tmpl.c a c128cpu.c

	* c610/Makefile.am (libc610_a_SOURCES): added c610cpu.def
	(c610cpu.c): added rule to build from c610cpu.def and ../cpu-tmpl.c

	* c610/c610cpu.def: new file to make a cpu-tmpl a c610cpu.c

	* cpu-tmpl.c: new file. maincpu template, derived from maincpu.c,
	c128cpu.c and c610cpu.c

	* maincpu.def: new file to make a maincpu.c out of cpu-tmpl.c

	* mem.h: removed MOS6509 and _MAINCPU_C conditional defines

	* arch/unix/xaw/c610ui.c (c610_memsize_submenu): add 1M memory
	size entry
	(model_defaults_submenu): add 620+ model (1M)
	(model_settings_submenu): add toggles for Ram1, Ram2, Ram4, Ram6

	* c610/c610cia1.def (cia1_set_ieee_dir): use oldpa
	[STORE_CIAPA]: comply with new I/O port handling
	[READ_CIAPA]: dito

	* c610/c610mem.c (set_ramsize): allow 512 and 1024k as well
	(cart1_ram, cart2_ram, cart4_ram, cart6_ram): new resources
	for setting bank15 at those places to RAM instead of ROM.
	(ram): now 1M in size for 16 possible banks of 64k
	[STORE_ZERO, STORE_RAM, READ_ZERO, READ_RAM]: defines to
	build banked memory access functions.
	(initialize_memory): check ramsize and set RAM memory functions
	as well as check cart*_ram and set RAM in bank 15
	(banknames, banknums): add more RAM banks for monitor access.
	(mem_bank_read, mem_bank_write): handle new banks

	* c610/c610mem.h [C610_RAM_SIZE]: change to 1M

	* c610/c610tpi.def [STORE_PA]: fix call to cia1_set_ieee_dir

	* crtc-tmpl.c, pet/crtc.def, c610/crtc.def [MY_WINDOW_TITLE]:
	new define for the window title.

	* c64/c64mem.c (page_zero): removed

	* pet/petmem.c (page_zero): removed

	* vic20/vic20mem.c (page_zero): removed

	* mem.h (page_zero, PAGE_ZERO): if MOS6509, then define PAGE_ZERO
	to page_zero, otherwise define PAGE_ZERO to ram
	[LOAD_ZERO]: use PAGE_ZERO instead of page_zero

1998-09-11  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.5.

	* pet/petmem.c (petmem_dump): Use the new `snapshot_module_*'
 	functions.
	(petmem_undump): Use the new `snapshot_module_*' functions.

	* pet/pet.c (pet_dump): Use the new `snapshot_module_*' functions.
	(pet_undump): Use the new `snapshot_module_*' functions.

	* interrupt.h: #include "snapshot.h".

	* via-tmpl.c (myvia_write_snapshot_module): Use the new
 	`snapshot_module_*' functions.
	(myvia_read_snapshot_module): Use the new `snapshot_module_*'
 	functions.

	* c64/c64mem.c (mem_write_snapshot_module): Use the new
 	`snapshot_module_*' functions.
	(mem_read_snapshot_module): Use the new `snapshot_module_*'
 	functions.

	* interrupt.c (interrupt_write_snapshot): Parameter `FILE *f'
 	replaced by parameter `snapshot_module_t *m'.  Use the new
 	`snapshot_module_*' functions.
	(interrupt_read_snapshot): Likewise.

	* maincpu.c (maincpu_write_snapshot_module): Use the new
 	`snapshot_module_*' functions.
	(maincpu_read_snapshot_module): Use the new `snapshot_module_*'
 	functions.

	* cia-tmpl.c (mycia_write_snapshot_module): Use the new
 	`snapshot_module_*' functions.
	(mycia_read_snapshot_module): Use the new `snapshot_module_*'
 	functions.

	* snapshot.c: New type `snapshot_module_t'.
	(snapshot_module_write_byte): New function.
	(snapshot_module_write_word): New function.
	(snapshot_module_write_dword): New function.
	(snapshot_module_write_padded_string): New function.
	(snapshot_module_write_byte_array): New function.
	(snapshot_module_read_byte): New function.
	(snapshot_module_read_word): New function.
	(snapshot_module_read_dword): New function.
	(snapshot_module_read_byte_array): New function.
	(snapshot_write_module_header): Removed.
	(snapshot_read_module_header): Removed.
	(snapshot_module_create): New function.
	(snapshot_module_open): New function.
	(snapshot_module_close): New function.

1998-09-11  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* drive/drive.c (drive_read_image_d64_d71): Handle D64 images
	attached to a 1571 like D71 images.

1998-09-11  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/unix/kbd.c (kbd_event_handler): `XK_Prior' works as Restore
 	too.

	* arch/msdos/menudefs.c (ui_create_main_menu): Added back "Change
 	working directory" command.

1998-09-10  Ettore Perazzoli  <ettore@comm2000.it>

	* c64/vicii.c (vic_ii_set_ram_base): Dispatch pending alarms and
	update memory pointers.

	* c128/c128cia1.def (UNDUMP_CIAPA, UNDUMP_CIAPB): #define to
 	empty.
	(STORE_CIAPB): Handle light pen as in `c64cia1.def'.
	(READ_CIAPB): Use `oldpa' as in `c64cia1.def'.
	(READ_CIAPA): Use `oldpa' and `oldpb' as in `c64cia1.def'.

1998-09-10  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* c64/c64rsuser.c (c64_rsuser_init): call rsuser with the number of
	cycles for the CPU.
	* vic20/vic20rsuser.c (vic20_rsuser_init): ditto.

	* rsuser.c (rsuser_init): change parameter from clk ratio to
	cycles per seconds for the CPU. Compute cycles per bit and per
	character accurately.

	* rsuser.h (rsuser_init): changed prototype

1998-09-09  Ettore Perazzoli  <ettore@comm2000.it>

	* c64/c64rsuser.h: New file.  Include `c64_rsuser_init()'
 	prototype.

	* rsuser.h: Removed prototypes of `c64_rsuser_init()' and
 	`vic20_rsuser_init()'.

1998-09-08  Tibor Biczo  <crown@mail.matav.hu>

	* Makefile.am: Removed -lm from x64_LDADD, x128_LDADD, xvic_LDADD,
        xpet_LDADD.  It's now set in LIBS in ../configure.in .

1998-09-09  Ettore Perazzoli  <ettore@comm2000.it>

	* c128/c128mem.c (store_mmu): Argh.  When calculating the VIC-II
 	RAM base, shift bits 7 & 6 in RCR by 10 positions, not 2!

1998-09-09  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* data/C128/default.vkm: move alternate keyboard joystick one col
 	to the right, to fit german keyboards

	* data/C64/default.vkm: ditto

	* data/PET/busi_uk.vkm: ditto

	* Makefile.am (printer_ldadd, rs232_printer_ldadd): change
	printer_ldadd to rs232_printer_ldadd, add check for HAVE_RS232
	and rsuser.o
	(rs232_source): new define for rsuser.[ch]

	* arch/unix/xaw/petui.c (pet_rs232_submenu): moved from uisettings.c
	here.

	* arch/unix/xaw/uisettings.c (rsuser_device_submenu,
	acia1_device_submenu, ser1_baud_submenu, ser2_baud_submenu,
	set_rs232_device_file, set_rs232_exec_file): exported (i.e.
	removed the "static" keyword. Now they are used in the petui.c and
	vic20ui.c files
	(pet_rs232_submenu): removed -> petui.c

	* arch/unix/xaw/uisettings.h (ser1_baud_submenu, ser2_baud_submenu,
	rsuser_device_submenu, acia1_device_submenu, set_rs232_device_file,
	set_rs232_exec_file): new prototypes

	* arch/unix/xaw/vic20ui.c: new toggle `RsUser'
	(vic20_rs232_submenu): new menu for VIC20 RS232 emulation settings
	(rs232_settings_menu): new menu to include in right button menu
	(vic20_ui_init): use rs232_settings_menu) for right button menu

	* c128/c128.c (machine_init): change rsuser_init to c64_rsuser_init

	* c128/c128cia1.def [STORE_SDR]: change userport_serial_write_sr
	to rsuser_tx_byte.

	* c64/Makefile.am (resid_acia_libadd): change rsuser.o to c64rsuser.o
	(EXTRA_libc64_a_SOURCES, EXTRA_libc64c128_a_SOURCES): remove
	rsuser.[ch], add c64rsuser.c

	* c64/c64.c (machine_init): change rsuser_init to c64rsuser_init

	* c64/c64cia1.def (STORE_SDR): change userport_serial_write_sr
        to rsuser_tx_byte.

	* c64/c64cia2.def (RESET): change userport_serial_write_ctrl to
	rsuser_write_ctrl, add call to rsuser_set_tx_bit.
	(STORE_CIAPB): change userport_serial_write_ctrl to
        rsuser_write_ctrl

	* c64/c64rsuser.c: new file for C64 specific userport RS232 init
	(c64_rsuser_init): new function

	* c64/rsuser.c, c64/rsuser.h: removed

	* rsuser.c: new file (moved from c64/rsuser.c)
	changed userport_serial_* to rsuser_*
	(rsuser_init): three new parameter: clk ratio (factor to 1MHz
	CPU clock), and functions to call for start bit trigger and
	if a full byte has been received

	* rsuser.h: new file (moved from c64/rsuser.h)

	* via-tmpl.c (store_myvia): for timer B, call mycpu_set_alarm_clk
	instead of mycpu_set_alarm.
	(int_myviat2): reset myviatbi to 0 when alarm disabled.
	(myvia_read_snapshot_module): for timer B, call mycpu_set_alarm_clk
        instead of mycpu_set_alarm

	* vic20/Makefile.am (rs232_libadd): new define for vic20rsuser.o

	* vic20/vic20.c: include rs232.h and rsuser.h if HAVE_RS232
	(machine_init_resources): call rs232_init_resources and
	rsuser_init_resources.
	(machine_init_cmdline_options): call rs232_init_cmdline_options and
	rsuser_init_cmdline_options
	(machine_reset): set maincpu_int_status.alarm_handler[A_RSUSER]
	to int_rsuser; call rs232_reset and rsuser_reset
	(vsync_hook): call rsuser_prevent_clk_overflow

	* vic20/vic20rsuser.c: new file for VIC20 specific RS232
	initialization

	* vic20/vic20via2.def: include rsuser.h
	(STORE_PRB): call rsuser_write_ctrl
	(STORE_PCR): call rsuser_set_tx_bit
	(RESET): call rsuser_write_ctrl and rsuser_set_tx_bit.
	(READ_PRB): call rsuser_read_ctrl

1998-09-08  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/msdos/ui.c (ui_jam_dialog): Return `UI_JAM_HARD_RESET'.

	* Version 0.15.0.4.

	* maincpu.c (maincpu_read_snapshot_module): Megakludge: Set
	`rmw_flag' to -1.

	* c64/vicii.c (vic_ii_read_snapshot_module): Call
 	`force_repaint()'.
	(vic_ii_read_snapshot_module): Handle `overscan_background_color'
	and `force_black_overscan_background_color'.

	* c128/c128cpu.c: Type of `last_opcode_info' changed to `DWORD'.

	* maincpu.c: Type of `last_opcode_info' changed to `DWORD'.
	(maincpu_write_snapshot_module): Dump `last_opcode_info'.
	(maincpu_read_snapshot_module): Undump `last_opcode_info'.

	* pet/pet.c (machine_write_snapshot): New function; it does
 	nothing for now.
	(machine_read_snapshot): Ditto.

	* vic20/vic20.c (machine_write_snapshot): New function; it does
	nothing for now.
	(machine_read_snapshot): Ditto.

	* c128/c128.c (machine_write_snapshot): New function; it does
	nothing for now.
	(machine_read_snapshot): Ditto.

	* c64/vicii.c (vic_ii_read_snapshot_module): Update `blank'.

	* cia-tmpl.c (mycia_read_snapshot_module): Make sure the port A/B
 	values have effect.

	* sounddrv/soundsun.c [__NetBSD__]: #include <sys/ioctl.h> and
 	<string.h> [reported by Ben <ben@cs.washington.edu> through the
 	online bugreport sytem].

	* c64/vicii.c (vic_ii_read_snapshot_module): Update color
 	variables.

	* cia-tmpl.c (mycia_read_snapshot_module): Do not change the IRQ
 	line.

	* c64/vicii.c (vic_ii_read_snapshot_module): Set `oldclk'.

	* maincpu.c (maincpu_read_snapshot_module): Write PC as a word.
	(maincpu_write_snapshot_module): Write PC as a word.

	* 6510core.c (IMPORT_REGISTERS): Use `JUMP' to change PC.

	* arch/unix/xaw/uicommands.c: Snapshot commands
 	`ui_snapshot_commands_menu'.

	* interrupt.h: Removed unused member
	`should_check_pending_interrupt' in `struct cpu_int_status'.

1998-09-08  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* arch/unix/xaw/uisettings.c (drive_settings_submenu): New menu
	entry `DriveTrueEmulation'.

	* autostart.c (set_true1541_mode, get_true1541_state): Changed
	resource `Drive8' to `DriveTrueEmulation'.

	* c128/Makefile.am: Added `.def' to `SUFFIXES'.  Added `c128iec.c',
	`c128cia1.def' and `c128cia1.c' to `libc128_a_SOURCES'. Added rule
	to create `c128cia1.c' from `c128cia1.def'.

	* c128/c128cia1.def: New file.

	* c128/c128iec.c: New file.

	* c64/Makefile.am: Removed `c64cia1.c', `c64cia1.def', `c64iec.c'
	and `c64iec.h' from `libc64c128_a_SOURCES'.

	* c64/c64cia2.def: Changed all references to `drive_enabled[]' to
	`drive[].enable'.
	* c64/c64iec.c: Changed likewise.
	* vic20/vic20iec.c: Changed likewise.
	* drive/drive.c: Changed likewise.

	* c64/c64iec.c (iec_fast_drive_write): Added stub
	`iec_fast_drive_write'.
	* vic20/vic20iec.c: Likewise.

	* cia1571drive0.def, cia1571drive1.def: Added #include
	"iecdrive.h".  (STORE_SDR): New function.

	* cia1581drive0.def, cia1581drive1.def (STORE_SDR): New function.

	* drive/drive.c: Moved `drive_enabled[]', `idling_method[]' and
	`drive_rom_idle_trap[]' to struct drive_t.
	Updated comments and error messages to new two drive support.
	(set_drive_true_emulation): New function to switch true drive
	emulation.  Just a stub yet.
	(drive_set_1571_side): Call `GCR_data_writeback' when the side is
	changed.

	* drive/drive.h: Added new members `enable', `idling_method' and
	`rom_idle_trap' to struct drive_t.

	* iecdrive.h: New prototypes `iec_fast_drive_write' and
	`iec_fast_cpu_write'.

1998-09-0  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* cia-tmpl.c (mycia_undump): instead of STORE_* use UNDUMP_* for
	the port values.

	* via-tmpl.c (myvia_undump): ditto

	* c64/c64cia1.def, c64/c64cia2.def, c64/c64tpi.def,
 	drive/cia1571drive0.def, drive/cia1571drive1.def,
 	drive/cia1581drive0.def, drive/cia1581drive1.def,
 	drive/via1drive0.def, drive/via1drive1.def, drive/via2drive0.def,
 	drive/via2drive1.def, pet/petvia.def, vic20/vic20via1.def,
 	vic20/vic20via2.def (UNDUMP_PRA, UNDUMP_PRB, UNDUMP_CIAPA,
 	UNDUMP_CIAPB): new definitions to be used when undumping an I/O
 	port.

1998-09-08  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* via-tmpl.c (oldpa, oldpb, READ_PRA, READ_PRB, STORE_PRA,
 	STORE_PRB): now both READ_* set the value "byte" to the value from
 	the outside, and in via-tmpl.c it is masked with the data
 	direction register and output register value.  Both STORE_* now
 	get as "byte" the value newly written to the pins, i.e. input pins
 	are set high already. They can now use oldpa and oldpb as the
 	values previously seen on the output pins.

	* cia-tmpl.c (oldpa, oldpb, READ_CIAPA, READ_CIAPB, STORE_CIAPA,
 	STORE_CIAPB): see via-tmpl.c

	* tpi-tmpl.c (oldpa, oldpb, oldpc): see via-tmpl.c

	* c64/c64cia1.def, c64/c64cia2.def, c64/c64tpi.def,
 	drive/cia1571drive0.def, drive/cia1571drive1.def,
 	drive/cia1581drive0.def, drive/cia1581drive1.def,
 	drive/via1drive0.def, drive/via1drive1.def, drive/via2drive0.def,
 	drive/via2drive1.def, pet/petvia.def, vic20/vic20via1.def,
 	vic20/vic20via2.def
	(STORE_PRA, STORE_PRB, STORE_CIAPA, STORE_CIAPB, READ_PRA,
 	READ_PRB, READ_CIAPA, READ_CIAPB): adapt to above change.

1998-09-07  Ettore Perazzoli  <ettore@comm2000.it>

	* maincpu.c (maincpu_write_snapshot_module): Dump interrupt
 	status.
	(maincpu_read_snapshot_module): Undump interrupt status.

	* interrupt.c (interrupt_read_snapshot): New function.
	(interrupt_write_snapshot): New function.

	* c64/c64.c (machine_read_snapshot): Read CIA modules.
	(machine_write_snapshot): Write CIA modules.

	* via-tmpl.c (myvia_undump): Renamed to
 	`myvia_read_snapshot_module()'.
	(myvia_dump): Renamed to `myvia_write_snapshot_module()'.

	* cia-tmpl.c (mycia_undump): Renamed to
 	`mycia_read_snapshot_module()'.
	(mycia_dump): Renamed to `mycia_write_snapshot_module()'.

	* Version 0.15.0.3.

	* arch/win32/Makefile.am (libarch_a_LIBADD): Add `resc64.o' to
	`libarch.a' using `libarch_a_LIBADD'.
	(resc64.o): Use `$<' and `$@' instead of hardcoded values.

	* Makefile.am: Removed `WIN32' conditionals.

	* utils.c (spawn) [WIN32]: Return -1.

1998-09-07  Tibor Biczo  <crown@mail.matav.hu>

	* Makefile.am: Added Win32 specific x64_LDADD variable.  Made
 	win32 specific .PHONY dependency settings.

	* arch/win32: New directory.

	* arch/Makefile.am: Added support for Win32 compile.

	* c64/cartridge.c: Removed the line including <sys/param.h>,
	vice.h already includes it, in the correct way.

	* vic20/cartridge.c: Same as above.

	* mon.c (readline): Removed static declaration. Linker couldn't
	find it.
	(add_history): Same here.

	* sound.c (sound_init): Added call to sound_init_dx_device, when
	compiling for Win32.

	* sound.h: Added prototype for sound_init_dx_device .

	* sounddrv/Makefile.am: Added sounddx.x into
 	EXTRA_libsounddrv_a_SOURCES.

	* sounddrv/sounddx.c: New file.

	* utils.c: Prevented including <sys/wait.h> while compiling for
 	Win32.
	(spawn): Emptied function when compiling for Win32.

1998-09-07  Ettore Perazzoli  <ettore@comm2000.it>

	* arch/win32/Makefile.am: New file.
	* arch/win32/c64.ico: New file.
	* arch/win32/c64kbd.c: New file.
	* arch/win32/c64ui.c: New file.
	* arch/win32/c64ui.h: New file.
	* arch/win32/dirent.c: New file.
	* arch/win32/dirent.h: New file.
	* arch/win32/joystick.c: New file.
	* arch/win32/joystick.h: New file.
	* arch/win32/kbd.c: New file.
	* arch/win32/kbd.h: New file.
	* arch/win32/lose32.h: New file.
	* arch/win32/print.c: New file.
	* arch/win32/resc64.h: New file.
	* arch/win32/resc64.r: New file.
	* arch/win32/ui.c: New file.
	* arch/win32/ui.h: New file.
	* arch/win32/uiattach.c: New file.
	* arch/win32/uiattach.h: New file.
	* arch/win32/video.c: New file.
	* arch/win32/video.h: New file.
	* arch/win32/vsync.c: New file.
	* arch/win32/vsync.h: New file.
	* arch/win32/winmain.c: New file.
	* arch/win32/winmain.h: New file.

1998-09-07  Andr Fachat  <fachat@physik.tu-chemnitz.de>

	* cia-tmpl.c (mycia_dump): replace "clk" with "myclk"
	(mycia_undump): ditto

	* pet/pet.c: include snapshot.h
	include rs232.h if necessary
	(pet_dump, pet_undump): new functions to dump the PET configuration.

	* pet/petmem.c: include snapshot.h
	(petmem_dump, petmem_undump): new functions to dump PET memory

	* pet/petmem.h (petmem_dump, petmem_undump): new prototypes

	* via-tmpl.c: include snapshot.h
	(myvia_dump, myvia_undump): new functions to dump the VIA state
	* cia-tmpl.c (mycia_dump): new function to dump a CIA snapshot
	(mycia_undump): new function to read in a snapshot

	* arch/unix/xaw/uisettings.c (RsUser): changed from TOGGLE to
	RADIO.
	(rs232_submenu): change 9600 baud userport entry to baud rate
	radio selection.

	* c128/c128.c (vsync_hook): call rsuser_prevent_clk_overflow
	* c64/c64.c (vsync_hook): ditto

	* c64/c64cia2.def (STORE_CIAPA): add call to rsuser_set_tx_bit()
	when writing to port A

	* c64/rsuser.c (char_clk_ticks): number of clk ticks per character
	(bit_clk_ticks): number of clk ticks per data bit
	(set_up_enabled): compute *_clk_ticks values after baud rate,
	assuming 1M CPU clock frequency
	(cmdline_options): remove "+rsuser", as "-rsuser" is a radio not
	a toggle anymore
	(rsuser_reset): clear clk_start* values
	(rsuser_setup): new function to setup the rs232 stuff
	(userport_serial_write_ctrl): don't care about DTR from the
	C64, as this stuff is buggy.
	(userport_serial_read_ctrl): call rsuser_get_rx_bit()
	(keepup_tx_buffer): new function; fill buf with bits from userport
	but not for 9600 baud
	(rsuser_set_tx_bit): new function, get a new output from the C64
	(rsuser_get_rx_bit): new function, reads a bit from the incoming
	rs232 data stream
	(userport_serial_write_sr): call check_tx_buffer to send the data
	(int_rsuser): handle clk_start_rx.
	(rsuser_prevent_clk_overflow): new function, handles clk overflow

	* c64/rsuser.h (rsuser_prevent_clk_overflow, rsuser_get_rx_bit,
	rsuser_set_tx_bit): new prototypes

1998-09-06  Ettore Perazzoli  <ettore@comm2000.it>

	* resid: Added reSID distribution.

	* c64/sid.c (read_sid) [HAVE_MOUSE]: When reading from $D419 or
	$D41A, use the values from `mouse_get_x()' and `mouse_get_y()'
	without any changes.

	* arch/msdos/mouse.h (mouse_get_x): Return the value shifted right
	by 1 and ANDed with 0x7e.
	(mouse_get_y): Return the value inverted, shifted right by 1 and
	ANDed with 0x7e.

	* arch/msdos/menudefs.c (attach_disk_callback): Allow attaching of
	`.g64' files.

1998-09-06  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* arch/unix/xaw/uicommands.c (attach_disk): Changed dir mask to
	show *.D71 and *.D81 as well.

	* c1541.c: Changed `sector_map' to `sector_map_1541' and
	`speed_map' to `speed_map_1541'.
	* drive/drive.c: Changed likewise.
	* vdrive.c: Changed likewise.

	* drive/drive.c (read_image_d64): Added support for importing D71
	disk images. Renamed to `drive_read_image_d64_d71'.
	(read_image_gcr): Renamed to `drive_read_image_gcr'.
	(drive_init, drive_set_disk_drive_type): Set disk side to `0'.
	(drive_attach_floppy): Allow attaching of 1571 disks
	(drive_set_half_track): Check for 1571 track limits.
	(drive_move_head): Changed likewise.
	(GCR_data_writeback): Added support for writing D71 disk images.
	(drive_set_1571_side): New function.

	* drive/drive.h: Added new member `side' to `drive_t'.  Changed
	constants from `MAX_TRACKS_1541' to `MAX_TRACKS_1571'.

	* drive/via1drive0.def (STORE_PRA): Call `drive_set_1571_side'
	whenever sides are changed.
	(READ_PRA): Added detection of track `1'.
	* drive/via1drive1.def: Changed likewise.

	* fs_cbm.h: Added `d71' and `d81' to `hdrinfo'.

	* vdrive.c (attach_floppy_image): Allow attaching D71 disk images.
	(get_std71_header): New function.
	(check_header): Check for D71 disk images.
	(read_disk_image_contents): Set flag `D64_Header' for any disk
 	image type without header.

	* vdrive.h: Define D71 and D81 constants.

	* arch/unix/xaw/uisettings.c (set_drive9_type_submenu): Fixed
 	typo.

	* c64/c64iec.c: #include "ciad.h".
	(iec_cpu_write): Added 1581 IEC bus handling.

	* drive/Makefile.am: Added `wd1770.c' and `wd1770.h' to
	`libdrive_a_SOURCES'.

	* drive/cia1581drive0.def (STORE_CIAPB): Fixed 1581 IEC bus
	handling.
	(READ_CIAPA): Return device number.
	* drive/cia1581drive1.def: Changed likewise.

	* drive/drivecpu-tmpl.c: #include "wd1770.h".
	(reset): Reset WD1770 too.
	(mydrive_mem_init): Added WD1770 memory banking.

	* drive/drivecpu0.def: Define mywd1770.
	* drive/drivecpu1.def: Define mywd1771.

	* drive/wd1770.c: New file to handle WD1770 disk controller.
	* drive/wd1770.h: New file.

1998-09-06  Ettore Perazzoli  <ettore@comm2000.it>

	* c128/c128cpu.c: Updated `maincpu_monitor_interface' to support
 	banking.

	* arch/msdos/menudefs.c (attach_disk_callback): Allow attaching of
	`.g64' images.

1998-09-06  Dag Lem  <resid@nimrod.no>

	* Makefile.am: Support for included reSID distribution.

1998-09-03  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.2.

	* c64/c64mem.c: `exrom' and `game' in `export' changed from `int'
	to `BYTE'.
	(mem_write_snapshot_module): New function.
	(mem_read_snapshot_module): New function.

	* maincpu.c (maincpu_write_snapshot_module): New function.
	(maincpu_read_snapshot_module): New function.

	* interrupt.c: New file.
	(prevent_clk_overflow): Moved here from `interrupt.h'.
	(cpu_int_status_init): Likewise.
	(cpu_int_status_write_snapshot_module): New function.
	(cpu_int_status_read_snapshot_module): New function.

	* interrupt.h: If functions must not be inlined, compile them into
	`interrupt.o' instead of `maincpu.o'; so check for `_INTERRUPT_C'
	instead of `_MAINCPU_C'.

	* c64/c64.c (machine_write_snapshot): New function.
	(machine_read_snapshot): New function.

	* c64/vicii.c: Type of `vic' changed to BYTE.
	(vic_ii_read_snapshot_module): New function.
	(vic_ii_write_snapshot_module): New function.

	* snapshot.c: New file.
	(snapshot_write_byte): New function.
	(snapshot_write_word): New function.
	(snapshot_write_dword): New function.
	(snapshot_write_padded_string): New function.
	(snapshot_write_byte_array): New function.
	(snapshot_read_byte): New function.
	(snapshot_read_word): New function.
	(snapshot_read_dword): New function.
	(snapshot_read_byte_array): New function.
	(snapshot_create): New function.
	(snapshot_open): New function.
	(snapshot_write_module_header): New function.
	(snapshot_read_module_header): New function.
	(snapshot_close): New function.

	* drive/drivecpu-tmpl.c (mydrive_store_ram): Handle all addresses
	up to $1FFF.

	* c64/c64cia1.def: #define `myclk' to `clk', not `maincpu_clk'.
	* c64/c64cia2.def: Likewise.

	* cia-tmpl.c (store_mycia, read_mycia, peek_mycia): Use `myclk'
	instead of `clk'.
	(int_myciata, int_myciata, int_myciatb, int_myciatod): Likewise.
	(mycia_set_flag, mycia_set_sdr): Likewise.
	(mycia_prevent_clk_overflow): Likewise.
	(mycia_dump): Likewise.

	* drive/Makefile.am (drivecpu0.c, drivecpu1.c): Take the template
	file from `$(drivedir)'.

1998-09-03  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* arch/unix/xaw/c64ui.c (attach_cartridge_image_submenu): Added
	new menu entry for Super Snapshot 4 cartridge.

	* c64/c64mem.c: New variables `ramconfig' and `romconfig'.
	(store_io2, read_io2, store_io1, read_io1): Added banking for SS4
	cartridge.  (initialize_memory): Initialize SS4 cart.
	(mem_attach_cartridge): Added support for SS4 cart.
	(cartridge_config_changed): Set `romh_bank' too.

	* c64/cartridge.c (cartridge_attach_image): Added SS4 cart
	support.  (cartridge_trigger_freeze): Likewise.

	* cartridge.h: New define `CARTRIDGE_SUPER_SNAPSHOT'.

1998-09-03  Andr Fachat  <a.fachat@physik.tu-chemnitz.de>

	* c128/c128mem.c (store_bank_io, read_bank_io, peek_bank_io): remove
	bogus "=" in switch.

	* c64/c64mem.c (store_bank_io, read_bank_io, peek_bank_io): remove
	bogus "=" in switch.
	(mem_bank_read): use only the right address bits for chargen_rom
	access.

	* maincpu.c (maincpu_monitor_interface): replace mem_read/mem_store
	with banked mem functions.

	* mon.c (mon_cmd_array): fix entry for "bank"
	(mon_bank): new function to be called when "bank" command is used
	(get_mem_val, set_mem_val): use current_bank from mon_interfaces[]
	for banked memory functions.

	* mon.h (monitor_interface): change read_func and store_func to
	the banked memory functions.
	[STATE_BNAME]: new state for the parser.
	(mon_bank): new prototype

	* mon_lex.l: new state BNAME, to be entered after "bank" command.
	In BNAME state parse an ASCII string and return BANKNAME.

	* mon_parse_y (machine_state_rules): fix CMD_BANK entry.
	(opt_bankname): add new parse rule

	* true1541/1541cpu.c (tru1541_monitor_interface): replace
	true1541_read/store with banked memory functions.
	(true1541_bank_read, true1541_bank_peek, true1541_bank_store):
	new functions. They ignore the bank parameter as here is no banking.

	* true1541/1541cpu.h (true1541_bank_read, true1541_bank_peek,
	true1541_bank_store): new prototypes.

	* acia-tmpl.c (rs232_open, rs232_close, rs232_putc, rs232_getc):
 	New dummy functions if `HAVE_RS232' is not #defined.

	* arch/msdos/petui.c (pet_model_items): Added entry for SuperPET
	(special_menu_items): Added SuperPET toggle.

	* arch/unix/xaw/petui.c (model_defaults_submenu): Added entry for
 	SuperPET
	(model_settings_submenu): New SuperPET I/O toggle.  Also calling
 	pet_rs232_submenu for ACIA settings.

	* arch/unix/xaw/uisettings.c (pet_rs232_submenu): New menu for
 	single-ACIA RS232 handling (PET, and later CBM610?)

	* pet/Makefile.am (libpet_a_SOURCES): Added petacia.h, petacia1.c
	and petacia1.def.
	(BUILT_SOURCES): Added petacia1.c.
	(petacia1.c): Added rule to build it from acia-tmpl.c.

	* pet/pet.c: #Include "petacia.h"
	(machine_init_resources): Call acia1_init_resources and
	rs232_init_resources.
	(machine_init_cmdline_options): Call acia1_init_cmdline_resources
	and rs232_init_cmdline_resources.
	(machine_reset): Call superpet_reset to reset SuperPET I/O latches.

	* pet/petacia.h: New file.  Prototypes for SuperPET acia.

	* pet/petacia1.def: New file.  Definitions for SuperPET ACIA.

	* pet/petmem.c: #Include petacia.h
	(spet_ramen, spet_bank, spet_ctrlwp, spet_diag, spet_ramwp) new
	flags to save the state of the SuperPET latches.
	(superpet_reset): reset latches
	(superpet_powerup): reset latches that are reset only after powerup
	(superper_diag): return state of the diag latch, that is connected
	to the userport DIAG pin
	(read_super_io, store_super_io): new functions to handle the latches
	(read_super_9, store_super_9): new functions to access 64k
	expansion RAM.
	(set_std_9tof): in $9*** set *_super_9() if it is superpet.
	Also in $EF** set *_super_io() if it is superpet
	(mem_powerup): call superpet_powerup

	* pet/petmem.h (superpet_reset, superpet_diag): new prototypes

	* pet/pets.c (pet_table): add field for machine being a SuperPET
	Add SuperPET entry.
	(pet_set_model): set SuperPET resource from model info.
	(check_info): if SuperPET, disable 8x96 memory expansion
	(set_superport_enables): new function to set resource
	(resources): add "SuperPET" resource
	(cmdline_options): add "-superpet" and "+superpet" options

	* pet/pets.h (PetInfo): add field for Superpet in struct definition.

	* pet/pia.c: include petmem.h
	(read_pia1): check superpet_diag for diagnostic pin

1998-09-02  Ettore Perazzoli  <ettore@comm2000.it>

	* Version 0.15.0.1.

1998-09-02  Andreas Boose  <boose@linux.rz.fh-hannover.de>

	* 6510core.c (LOCAL_SET_OVERFLOW): Call `_drive_set_byte_ready'
 	instead of `true1541_set_byte_ready'.
	(TRACE): Replaced `true1541_clk' with `drive0_clk'.
	(PHP): Call `_drive_byte_ready' instead of `true1541_byte_ready'.
	(BVC): Changed likewise.
	(BVS): Changed likewise.

	* Makefile.am: Changed library from `true1541_lib' to `drive_lib'.
	* arch/msdos/Makefile.am: Likewise.
	* arch/unix/xaw/Makefile.am: Likewise.
	* c128/Makefile.am: Likewise.
	* c64/Makefile.am: Likewise.
	* vic20/Makefile.am: Likewise.

	* arch/msdos/menudefs.c: Replaced #include "drive.h" with #include
	"vdrive.h" and #include "true1541.h" with #include "drive.h".
	* c128/c128.c: Changed likewise.

	* arch/msdos/vsync.c: Replaced #include "true1541.h" with #include
	"drive.h".
	* arch/unix/xaw/uisettings.c: Changed likewise.
	* c128/c128mem.c: Changed likewise.
	* c64/c64.c:  Changed likewise.
	* c64cia2.def: Changed likewise.
	* c64/c64iec.c: Changed likewise.
	* c64/c64mem.c: Changed likewise.
	* vic20/vic20.c: Changed likewise.
	* vic20/vic20iec.c: Changed likewise.
	* vic20/vic20via1.def: Changed likewise.
	* vic20/vic20via2.def: Changed likewise.

	* arch/unix/xaw/uicommands.c: Replaced #include "drive.h" with
	#include "vdrive.h".
	* attach.c: Changed likewise.
	* attach.h: Changed likewise.
	* autostart.c: Changed likewise.
	* c1541.c: Changed likewise.
	* c1541.h: Changed likewise.
	* fs_cbm.h: Changed likewise.
	* fsdevice.c: Changed likewise.
	* maincpu.c: Changed likewise.
	* mon.c: Changed likewise.
	* pet/pet.c: Changed likewise.
	* prdevice.c: Changed likewise.
	* serial.c: Changed likewise.
	* tape.c: Changed likewise.
	* tapeunit.c: Changed likewise.

	* arch/unix/xaw/c128ui.c (c128_ui_init): Changed menu entry from
	`ui_true1541_settings_menu' to `ui_drive_settings_menu'.
	* arch/unix/xaw/c64ui.c: Changed likewise.
	* arch/unix/xaw/vic20ui.c: Changed likewise.

	* arch/unix/xaw/uisettings.c: Changed all references of `true1541'
	to `drive'.
	* arch/unix/xaw/uisettings.h: Changed likewise.
	* c128/c128.c: Changed likewise.
	* c64/c64.c:Changed likewise.
	* c64/c64iec.c:Changed likewise.
	* vic20/vic20.c:Changed likewise.
	* vic20/vic20iec.c:Changed likewise.

	* c128/c128.c: Removed #include "1541cpu.h"
	* vic20/vic20.c: Likewise.

	* c64/c64.c (machine_init): Set hooks for drive #9.  Changed
	`true1541_monitor_interface' to `drive0_monitor_interface'.
	(vsync_hook): Call `drive_prevent_clk_overflow()' to prevent both
	drives from overflowing.

	* c64/c64cia2.def (READ_CIAPA): Remove call to
	`true1541_cpu_execute()'. Call `drive0_cpu_execute()' and
	`drive0_cpu_execute()' instead.  (READ_CIAICR): Changed likewise.

	* c64/c64iec.c (update_ports): Update IEC status for drive #9 too.
	(iec_cpu_write): Changed likewise.  (iec_cpu_read, iec_cpu_write,
	parallel_cable_cpu_read, parallel_cable_cpu_write): Removed call
	to `true1541_cpu_execute()'.  Call `drive0_cpu_execute()' and
	`drive0_cpu_execute()' instead.  (iec_cpu_write): Do not update
	`iec_info.drive[01].data if drive is disabled.

	* iecdrive.h: Added new members `drive2_bus', `drive2_port' and
	`drive2_data' to struct `iec_info_t'

	* interrupt.h: Replaced `true1541_clk' with `drive_clk[2]'.
	Replaced `true1541_int_status' with `drive0_int_status' and
	`drive1_int_status'.  Changed all defines from `true1541' to
	`drive0'. Added defines for `drive1'.

	* Renamed directory `true1541' to `drive'.

	* drive/Makefile.am: Changed all references of `true1541' to
	`drive'.  Updated `libdrive_a_SOURCES'.  Removed rules for
	`viad1.c' and `viad2.c'.  Added new rules for `via1drive0.c',
	`via2drive0.c', `via1drive1.c', `via2drive1.c', `drivecpu0.c' and
	`drivecpu1.c'.

	* drive/1541cpu.c: Renamed to `drivecpu-tmpl.c'. Changed all
	functions and variables including `true1541' to `mydrive'.
	Removed `true1541_clk'. Define `_drive_set_byte_ready' and
	`_drive_byte_ready'.

	* drive/1541cpu.h: Changed all references to `true1541' to
	`drive'.

	* drive/drivecpu0.def, drive/drivecpu1.def: New files for `drive0'
	and `drive1' specific defines.

	* drive/true1541.c: Renamed to `drive.c'.  Moved `led_status',
	`current_half_track', `*true1541_floppy', `byte_ready', `diskID1',
	`diskID2', `GCR_dirty_track', `GCR_write_value', `GCR_speed_zone',
	`GCR_track_size', `GCR_track_start_ptr', `GCR_current_track_size',
	`GCR_data', `GCR_head_offset', `read_write_mode', `GCR_read',
	`byte_ready_active', `byte_ready_active', `attach_clk',
	`detach_clk', `bits_moved', `accum', `finish_byte', `last_mode',
	`rotation_last_clk', `have_new_disk', `*rotation_table_ptr',
	`rotation_table', `old_led_status', `old_half_track' to struct
	`drive_t'.
	Changed all function and variable names including `true1541' to
	`drive0' and `drive1'.  New array `drive_t drive[2]'.
	Replaced `true1541_ram' with `drive0_ram' and `drive1_ram'.
	(drive_set_half_track): Made static.
	(drive_init): Initialize `drive_clk[0]' and `drive_clk[1]' and
	`drive[]' structure.  Set IEC lines of disabled drives to `1'.
	(drive_attach_floppy): Use `floppy->unit' to find out to which
	drive the disk should be attached to.
	(drive_detach_floppy): Changed likewise.
	(drive1_trap_handler): New function to handle traps of drive1.
	(drive_disable): Enable traps when no drive is enabled.  Set IEC
	lines of disabled drives to `1'.
	(drive_update_ui_status): Changed to handle drive #8. Currently
	the UI LED is used for both drives.

	* drive/true1541.h: Renamed to drive.h.  Changed function names
	including `true1541' to `drive'.  Added new defines for the VIAs
	of drive1. Define `NUM_BYTES_SECTOR_GCR', `NUM_MAX_BYTES_TRACK',
	`ROTATION_TABLE_SIZE' and `ACCUM_MAX' here.
	Added parameter `local_dnr' indicating the current drive to
	`drive_move_head', `drive_byte_ready', `drive_set_byte_ready',
	`drive_rotate_disk', `drive_read_disk_byte', `drive_write_gcr',
	`drive_update_zone_bits', `drive_prevent_clk_overflow',
	`drive_read_viad2_prb', `drive_update_viad2_pcr' and
	`drive_motor_control'.

	* drive/viad.h: Added new prototypes for VIAs of drive1.

	* drive/via1d0.def, drive/via2d1.def, drive/via1d1.def,
	drive/via2d1.def: New files for VIA1 and VIA2 specifiy defines of
	drive0 and drive1.

	* vic20/vic20iec.c: (iec_pa_write): Use `via1d0_set_atn' instead
	of `set_atn'.


See `ChangeLog.1' for earlier changes.
