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>

	* arch/unix/joystick.c: Added a new joystick driver.  Not enabled
	yet.

	* mon.c, mon.h, mon_lex.l, mon_parse.h, mon_parse.y: Some
	undocumented changes (for now).

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.
