trying to sync rc1

parent e63e410c
...@@ -603,6 +603,8 @@ STATIC_INLINE int ar3a (uaecptr addr, uae_u8 b, int writing) ...@@ -603,6 +603,8 @@ STATIC_INLINE int ar3a (uaecptr addr, uae_u8 b, int writing)
return 0; return 0;
} }
static void action_replay_chipwrite (void);
void REGPARAM2 chipmem_lput_actionreplay1 (uaecptr addr, uae_u32 l) void REGPARAM2 chipmem_lput_actionreplay1 (uaecptr addr, uae_u32 l)
{ {
uae_u32 *m; uae_u32 *m;
...@@ -619,7 +621,7 @@ void REGPARAM2 chipmem_wput_actionreplay1 (uaecptr addr, uae_u32 w) ...@@ -619,7 +621,7 @@ void REGPARAM2 chipmem_wput_actionreplay1 (uaecptr addr, uae_u32 w)
addr -= chipmem_start & chipmem_mask; addr -= chipmem_start & chipmem_mask;
addr &= chipmem_mask; addr &= chipmem_mask;
if (addr == 0x62 && !is_ar_pc_in_rom()) if (addr == 0x60 && !is_ar_pc_in_rom())
action_replay_chipwrite (); action_replay_chipwrite ();
m = (uae_u16 *)(chipmemory + addr); m = (uae_u16 *)(chipmemory + addr);
do_put_mem_word (m, w); do_put_mem_word (m, w);
......
...@@ -32,8 +32,10 @@ static void install_driver (int flags) ...@@ -32,8 +32,10 @@ static void install_driver (int flags)
device_func[DF_IOCTL] = NULL; device_func[DF_IOCTL] = NULL;
device_func[DF_SCSI] = &devicefunc_win32_aspi; device_func[DF_SCSI] = &devicefunc_win32_aspi;
if (devicefunc_cdimage.openbus (0)) { if (devicefunc_cdimage.openbus (flags)) {
device_func[DF_IOCTL] = &devicefunc_cdimage; device_func[DF_IOCTL] = &devicefunc_cdimage;
device_func[DF_SCSI] = NULL;
return;
} }
#ifdef WINDDK #ifdef WINDDK
if (!device_func[DF_IOCTL]) if (!device_func[DF_IOCTL])
...@@ -85,18 +87,24 @@ static void install_driver (int flags) ...@@ -85,18 +87,24 @@ static void install_driver (int flags)
int sys_command_open (int mode, int unitnum) int sys_command_open (int mode, int unitnum)
{ {
if (mode == DF_SCSI || !have_ioctl) if (mode == DF_SCSI || !have_ioctl) {
if (device_func[DF_SCSI] == NULL)
return 0;
return device_func[DF_SCSI]->opendev (unitnum); return device_func[DF_SCSI]->opendev (unitnum);
else } else {
return device_func[DF_IOCTL]->opendev (unitnum); return device_func[DF_IOCTL]->opendev (unitnum);
}
} }
void sys_command_close (int mode, int unitnum) void sys_command_close (int mode, int unitnum)
{ {
if (mode == DF_SCSI || !have_ioctl) if (mode == DF_SCSI || !have_ioctl) {
if (device_func[DF_SCSI] == NULL)
return;
device_func[DF_SCSI]->closedev (unitnum); device_func[DF_SCSI]->closedev (unitnum);
else } else {
device_func[DF_IOCTL]->closedev (unitnum); device_func[DF_IOCTL]->closedev (unitnum);
}
} }
void device_func_reset (void) void device_func_reset (void)
...@@ -114,9 +122,13 @@ int device_func_init (int flags) ...@@ -114,9 +122,13 @@ int device_func_init (int flags)
have_ioctl = 1; have_ioctl = 1;
else else
have_ioctl = 0; have_ioctl = 0;
support_scsi = device_func[DF_SCSI]->openbus (oflags) ? 1 : 0; if (flags & DEVICE_TYPE_ALLOWEMU)
oflags |= DEVICE_TYPE_ALLOWEMU;
if (device_func[DF_SCSI])
support_scsi = device_func[DF_SCSI]->openbus (oflags) ? 1 : 0;
oflags |= 1 << INQ_ROMD;
if (have_ioctl) if (have_ioctl)
support_ioctl = device_func[DF_IOCTL]->openbus (1 << INQ_ROMD) ? 1 : 0; support_ioctl = device_func[DF_IOCTL]->openbus (oflags) ? 1 : 0;
write_log ("support_scsi = %d support_ioctl = %d\n", support_scsi, support_ioctl); write_log ("support_scsi = %d support_ioctl = %d\n", support_scsi, support_ioctl);
return (support_scsi ? (1 << DF_SCSI) : 0) | (support_ioctl ? (1 << DF_IOCTL) : 0); return (support_scsi ? (1 << DF_SCSI) : 0) | (support_ioctl ? (1 << DF_IOCTL) : 0);
} }
...@@ -394,9 +406,9 @@ static void scsi_atapi_fixup_inquiry (struct amigascsi *as) ...@@ -394,9 +406,9 @@ static void scsi_atapi_fixup_inquiry (struct amigascsi *as)
int sys_command_scsi_direct_native(int unitnum, struct amigascsi *as) int sys_command_scsi_direct_native(int unitnum, struct amigascsi *as)
{ {
int ret = device_func[DF_SCSI]->exec_direct (unitnum, as); int ret = device_func[DF_SCSI]->exec_direct (unitnum, as);
if (!ret && device_func[DF_SCSI]->isatapi(unitnum)) if (!ret && device_func[DF_SCSI]->isatapi(unitnum))
scsi_atapi_fixup_inquiry (as); scsi_atapi_fixup_inquiry (as);
return ret; return ret;
} }
int sys_command_scsi_direct (int unitnum, uaecptr acmd) int sys_command_scsi_direct (int unitnum, uaecptr acmd)
......
...@@ -214,7 +214,7 @@ static const TCHAR *obsolete[] = { ...@@ -214,7 +214,7 @@ static const TCHAR *obsolete[] = {
"kickstart_key_file", "fast_copper", "sound_adjust", "kickstart_key_file", "fast_copper", "sound_adjust",
"serial_hardware_dtrdsr", "gfx_filter_upscale", "serial_hardware_dtrdsr", "gfx_filter_upscale",
"gfx_correct_aspect", "gfx_autoscale", "parallel_sampler", "parallel_ascii_emulation", "gfx_correct_aspect", "gfx_autoscale", "parallel_sampler", "parallel_ascii_emulation",
"avoid_vid", "avoid_dga", "avoid_vid", "avoid_dga", "z3chipmem_size",
NULL NULL
}; };
...@@ -292,9 +292,9 @@ const char *prefs_get_attr (const char *key) ...@@ -292,9 +292,9 @@ const char *prefs_get_attr (const char *key)
prefs_attr_t *attr = lookup_attr (key); prefs_attr_t *attr = lookup_attr (key);
if (attr) if (attr)
return attr->value; return attr->value;
else else
return 0; return 0;
} }
static void trimwsa (char *s) static void trimwsa (char *s)
...@@ -423,13 +423,13 @@ void cfgfile_target_dwrite_str (struct zfile *f, const TCHAR *option, const TCHA ...@@ -423,13 +423,13 @@ void cfgfile_target_dwrite_str (struct zfile *f, const TCHAR *option, const TCHA
void cfgfile_write (struct zfile *f, const TCHAR *option, const TCHAR *format,...) void cfgfile_write (struct zfile *f, const TCHAR *option, const TCHAR *format,...)
{ {
va_list parms; va_list parms;
TCHAR tmp[CONFIG_BLEN]; TCHAR tmp[CONFIG_BLEN];
va_start (parms, format); va_start (parms, format);
vsnprintf (tmp, CONFIG_BLEN, format, parms); vsnprintf (tmp, CONFIG_BLEN, format, parms);
cfg_dowrite (f, option, tmp, 0, 0); cfg_dowrite (f, option, tmp, 0, 0);
va_end (parms); va_end (parms);
} }
void cfgfile_dwrite (struct zfile *f, const TCHAR *option, const TCHAR *format,...) void cfgfile_dwrite (struct zfile *f, const TCHAR *option, const TCHAR *format,...)
{ {
...@@ -642,6 +642,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) ...@@ -642,6 +642,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
cfgfile_write (f, "floppy_speed", "%d", p->floppy_speed); cfgfile_write (f, "floppy_speed", "%d", p->floppy_speed);
#ifdef DRIVESOUND #ifdef DRIVESOUND
cfgfile_write (f, "floppy_volume", "%d", p->dfxclickvolume); cfgfile_write (f, "floppy_volume", "%d", p->dfxclickvolume);
cfgfile_dwrite (f, "floppy_channel_mask", "0x%x", p->dfxclickchannelmask);
#endif #endif
cfgfile_write_bool (f, "parallel_on_demand", p->parallel_demand); cfgfile_write_bool (f, "parallel_on_demand", p->parallel_demand);
cfgfile_write_bool (f, "serial_on_demand", p->serial_demand); cfgfile_write_bool (f, "serial_on_demand", p->serial_demand);
...@@ -882,11 +883,11 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) ...@@ -882,11 +883,11 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
cfgfile_write (f, "mbresmem_size", "%d", p->mbresmem_high_size / 0x100000); cfgfile_write (f, "mbresmem_size", "%d", p->mbresmem_high_size / 0x100000);
cfgfile_write (f, "z3mem_size", "%d", p->z3fastmem_size / 0x100000); cfgfile_write (f, "z3mem_size", "%d", p->z3fastmem_size / 0x100000);
cfgfile_write (f, "z3mem2_size", "%d", p->z3fastmem2_size / 0x100000); cfgfile_write (f, "z3mem2_size", "%d", p->z3fastmem2_size / 0x100000);
cfgfile_write (f, "z3chipmem_size", "%d", p->z3chipmem_size / 0x100000);
cfgfile_write (f, "z3mem_start", "0x%x", p->z3fastmem_start); cfgfile_write (f, "z3mem_start", "0x%x", p->z3fastmem_start);
cfgfile_write (f, "bogomem_size", "%d", p->bogomem_size / 0x40000); cfgfile_write (f, "bogomem_size", "%d", p->bogomem_size / 0x40000);
cfgfile_write (f, "gfxcard_size", "%d", p->gfxmem_size / 0x100000); cfgfile_write (f, "gfxcard_size", "%d", p->gfxmem_size / 0x100000);
cfgfile_write (f, "chipmem_size", "%d", p->chipmem_size == 0x20000 ? -1 : (p->chipmem_size == 0x40000 ? 0 : p->chipmem_size / 0x80000)); cfgfile_write (f, "chipmem_size", "%d", p->chipmem_size == 0x20000 ? -1 : (p->chipmem_size == 0x40000 ? 0 : p->chipmem_size / 0x80000));
cfgfile_dwrite (f, "megachipmem_size", "%d", p->z3chipmem_size / 0x100000);
if (p->m68k_speed > 0) if (p->m68k_speed > 0)
cfgfile_write (f, "finegrain_cpu_speed", "%d", p->m68k_speed); cfgfile_write (f, "finegrain_cpu_speed", "%d", p->m68k_speed);
...@@ -942,7 +943,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) ...@@ -942,7 +943,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
cfgfile_dwrite_bool (f, "warp", p->turbo_emulation); cfgfile_dwrite_bool (f, "warp", p->turbo_emulation);
#ifdef FILESYS #ifdef FILESYS
//write_filesys_config (currprefs.mountinfo, UNEXPANDED, prefs_get_attr ("hardfile_path"), f); //write_filesys_config (currprefs.mountinfo, UNEXPANDED, prefs_get_attr ("hardfile_path"), f);
if (p->filesys_no_uaefsdb) if (p->filesys_no_uaefsdb)
cfgfile_write_bool (f, "filesys_no_fsdb", p->filesys_no_uaefsdb); cfgfile_write_bool (f, "filesys_no_fsdb", p->filesys_no_uaefsdb);
#endif #endif
...@@ -957,10 +958,11 @@ int cfgfile_yesno2 (const TCHAR *option, const TCHAR *value, const TCHAR *name, ...@@ -957,10 +958,11 @@ int cfgfile_yesno2 (const TCHAR *option, const TCHAR *value, const TCHAR *name,
|| strcasecmp (value, "true") == 0 || strcasecmp (value, "t") == 0) || strcasecmp (value, "true") == 0 || strcasecmp (value, "t") == 0)
*location = 1; *location = 1;
else if (strcasecmp (value, "no") == 0 || strcasecmp (value, "n") == 0 else if (strcasecmp (value, "no") == 0 || strcasecmp (value, "n") == 0
|| strcasecmp (value, "false") == 0 || strcasecmp (value, "f") == 0) || strcasecmp (value, "false") == 0 || strcasecmp (value, "f") == 0
|| strcasecmp (value, "0") == 0)
*location = 0; *location = 0;
else { else {
write_log ("Option `%s' requires a value of either `yes' or `no'.\n", option); write_log ("Option `%s' requires a value of either `yes' or `no' (was '%s').\n", option, value);
return -1; return -1;
} }
return 1; return 1;
...@@ -1251,8 +1253,10 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) ...@@ -1251,8 +1253,10 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
} }
} }
if (cfgfile_path (option, value, "cdimage0", p->cdimagefile, sizeof p->cdimagefile / sizeof (TCHAR))) if (cfgfile_path (option, value, "cdimage0", p->cdimagefile, sizeof p->cdimagefile / sizeof (TCHAR))) {
p->cdimagefileuse = true;
return 1; return 1;
}
if (cfgfile_intval (option, value, "sound_frequency", &p->sound_freq, 1)) { if (cfgfile_intval (option, value, "sound_frequency", &p->sound_freq, 1)) {
/* backwards compatibility */ /* backwards compatibility */
...@@ -1314,7 +1318,8 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) ...@@ -1314,7 +1318,8 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
|| cfgfile_intval (option, value, "floppy2sound", &p->dfxclick[2], 1) || cfgfile_intval (option, value, "floppy2sound", &p->dfxclick[2], 1)
|| cfgfile_intval (option, value, "floppy3sound", &p->dfxclick[3], 1) || cfgfile_intval (option, value, "floppy3sound", &p->dfxclick[3], 1)
#endif #endif
|| cfgfile_intval (option, value, "floppy_volume", &p->dfxclickvolume, 1)) || cfgfile_intval (option, value, "floppy_channel_mask", &p->dfxclickchannelmask, 1)
|| cfgfile_intval (option, value, "floppy_volume", &p->dfxclickvolume, 1))
return 1; return 1;
if ( if (
...@@ -1921,32 +1926,33 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, TCHAR *option, TCHAR *va ...@@ -1921,32 +1926,33 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, TCHAR *option, TCHAR *va
return 1; return 1;
if (cfgfile_intval (option, value, "cpu060_revision", &p->cpu060_revision, 1) if (cfgfile_intval (option, value, "cpu060_revision", &p->cpu060_revision, 1)
|| cfgfile_intval (option, value, "fpu_revision", &p->fpu_revision, 1) || cfgfile_intval (option, value, "fpu_revision", &p->fpu_revision, 1)
|| cfgfile_intval (option, value, "cdtvramcard", &p->cs_cdtvcard, 1) || cfgfile_intval (option, value, "cdtvramcard", &p->cs_cdtvcard, 1)
|| cfgfile_intval (option, value, "fatgary", &p->cs_fatgaryrev, 1) || cfgfile_intval (option, value, "fatgary", &p->cs_fatgaryrev, 1)
|| cfgfile_intval (option, value, "ramsey", &p->cs_ramseyrev, 1) || cfgfile_intval (option, value, "ramsey", &p->cs_ramseyrev, 1)
|| cfgfile_intval (option, value, "chipset_refreshrate", &p->chipset_refreshrate, 1) || cfgfile_intval (option, value, "chipset_refreshrate", &p->chipset_refreshrate, 1)
|| cfgfile_intval (option, value, "fastmem_size", &p->fastmem_size, 0x100000) || cfgfile_intval (option, value, "fastmem_size", &p->fastmem_size, 0x100000)
|| cfgfile_intval (option, value, "a3000mem_size", &p->mbresmem_low_size, 0x100000) || cfgfile_intval (option, value, "a3000mem_size", &p->mbresmem_low_size, 0x100000)
|| cfgfile_intval (option, value, "mbresmem_size", &p->mbresmem_high_size, 0x100000) || cfgfile_intval (option, value, "mbresmem_size", &p->mbresmem_high_size, 0x100000)
|| cfgfile_intval (option, value, "z3mem_size", &p->z3fastmem_size, 0x100000) || cfgfile_intval (option, value, "z3mem_size", &p->z3fastmem_size, 0x100000)
|| cfgfile_intval (option, value, "z3mem2_size", &p->z3fastmem2_size, 0x100000) || cfgfile_intval (option, value, "z3mem2_size", &p->z3fastmem2_size, 0x100000)
|| cfgfile_intval (option, value, "z3mem_start", &p->z3fastmem_start, 1) || cfgfile_intval (option, value, "megachipmem_size", &p->z3chipmem_size, 0x100000)
|| cfgfile_intval (option, value, "bogomem_size", &p->bogomem_size, 0x40000) || cfgfile_intval (option, value, "z3mem_start", &p->z3fastmem_start, 1)
|| cfgfile_intval (option, value, "gfxcard_size", &p->gfxmem_size, 0x100000) || cfgfile_intval (option, value, "bogomem_size", &p->bogomem_size, 0x40000)
|| cfgfile_intval (option, value, "rtg_modes", &p->picasso96_modeflags, 1) || cfgfile_intval (option, value, "gfxcard_size", &p->gfxmem_size, 0x100000)
|| cfgfile_intval (option, value, "floppy_speed", &p->floppy_speed, 1) || cfgfile_intval (option, value, "rtg_modes", &p->picasso96_modeflags, 1)
|| cfgfile_intval (option, value, "floppy_write_length", &p->floppy_write_length, 1) || cfgfile_intval (option, value, "floppy_speed", &p->floppy_speed, 1)
|| cfgfile_intval (option, value, "nr_floppies", &p->nr_floppies, 1) || cfgfile_intval (option, value, "floppy_write_length", &p->floppy_write_length, 1)
|| cfgfile_intval (option, value, "floppy0type", &p->dfxtype[0], 1) || cfgfile_intval (option, value, "nr_floppies", &p->nr_floppies, 1)
|| cfgfile_intval (option, value, "floppy1type", &p->dfxtype[1], 1) || cfgfile_intval (option, value, "floppy0type", &p->dfxtype[0], 1)
|| cfgfile_intval (option, value, "floppy2type", &p->dfxtype[2], 1) || cfgfile_intval (option, value, "floppy1type", &p->dfxtype[1], 1)
|| cfgfile_intval (option, value, "floppy3type", &p->dfxtype[3], 1) || cfgfile_intval (option, value, "floppy2type", &p->dfxtype[2], 1)
|| cfgfile_intval (option, value, "maprom", &p->maprom, 1) || cfgfile_intval (option, value, "floppy3type", &p->dfxtype[3], 1)
|| cfgfile_intval (option, value, "parallel_autoflush", &p->parallel_autoflush_time, 1) || cfgfile_intval (option, value, "maprom", &p->maprom, 1)
|| cfgfile_intval (option, value, "uae_hide", &p->uae_hide, 1) || cfgfile_intval (option, value, "parallel_autoflush", &p->parallel_autoflush_time, 1)
|| cfgfile_intval (option, value, "cpu_frequency", &p->cpu_frequency, 1) || cfgfile_intval (option, value, "uae_hide", &p->uae_hide, 1)
|| cfgfile_intval (option, value, "catweasel", &p->catweasel, 1)) || cfgfile_intval (option, value, "cpu_frequency", &p->cpu_frequency, 1)
|| cfgfile_intval (option, value, "catweasel", &p->catweasel, 1))
return 1; return 1;
#ifdef JIT #ifdef JIT
...@@ -2522,7 +2528,7 @@ static int cfgfile_load_2 (struct uae_prefs *p, const TCHAR *filename, bool real ...@@ -2522,7 +2528,7 @@ static int cfgfile_load_2 (struct uae_prefs *p, const TCHAR *filename, bool real
write_log ("Opening cfgfile '%s': ", filename); write_log ("Opening cfgfile '%s': ", filename);
fh = zfile_fopen (filename, "r", ZFD_NORMAL); fh = zfile_fopen (filename, "r", ZFD_NORMAL);
#ifndef SINGLEFILE #ifndef SINGLEFILE
if (! fh) { if (! fh) {
write_log ("failed\n"); write_log ("failed\n");
return 0; return 0;
...@@ -2576,7 +2582,7 @@ static int cfgfile_load_2 (struct uae_prefs *p, const TCHAR *filename, bool real ...@@ -2576,7 +2582,7 @@ static int cfgfile_load_2 (struct uae_prefs *p, const TCHAR *filename, bool real
subst (prefs_get_attr("rom_path"), p->romextfile, sizeof p->romextfile); subst (prefs_get_attr("rom_path"), p->romextfile, sizeof p->romextfile);
subst (prefs_get_attr("rom_path"), p->keyfile, sizeof p->keyfile); subst (prefs_get_attr("rom_path"), p->keyfile, sizeof p->keyfile);
return 1; return 1;
} }
int cfgfile_load (struct uae_prefs *p, const TCHAR *filename, int *type, int ignorelink, int userconfig) int cfgfile_load (struct uae_prefs *p, const TCHAR *filename, int *type, int ignorelink, int userconfig)
...@@ -3605,6 +3611,13 @@ void default_prefs (struct uae_prefs *p, int type) ...@@ -3605,6 +3611,13 @@ void default_prefs (struct uae_prefs *p, int type)
strcpy (p->cartfile, ""); strcpy (p->cartfile, "");
#endif #endif
prefs_set_attr ("rom_path", strdup_path_expand (TARGET_ROM_PATH));
prefs_set_attr ("floppy_path", strdup_path_expand (TARGET_FLOPPY_PATH));
prefs_set_attr ("hardfile_path", strdup_path_expand (TARGET_HARDFILE_PATH));
#ifdef SAVESTATE
prefs_set_attr ("savestate_path", strdup_path_expand (TARGET_SAVESTATE_PATH));
#endif
_tcscpy (p->path_rom, "./"); _tcscpy (p->path_rom, "./");
_tcscpy (p->path_floppy, "./"); _tcscpy (p->path_floppy, "./");
_tcscpy (p->path_hardfile, "./"); _tcscpy (p->path_hardfile, "./");
......
This diff is collapsed.
...@@ -1291,7 +1291,7 @@ static void drive_motor (drive * drv, bool off) ...@@ -1291,7 +1291,7 @@ static void drive_motor (drive * drv, bool off)
#endif #endif
} }
static void read_floppy_data (struct zfile *diskfile, trackid *tid, int offset, void *dst, int len) static void read_floppy_data (struct zfile *diskfile, trackid *tid, int offset, uae_u8 *dst, int len)
{ {
if (len == 0) if (len == 0)
return; return;
...@@ -1300,7 +1300,7 @@ static void read_floppy_data (struct zfile *diskfile, trackid *tid, int offset, ...@@ -1300,7 +1300,7 @@ static void read_floppy_data (struct zfile *diskfile, trackid *tid, int offset,
} }
/* Megalomania does not like zero MFM words... */ /* Megalomania does not like zero MFM words... */
static void mfmcode (uae_u16 *mfm, unsigned int words) static void mfmcode (uae_u16 * mfm, unsigned int words)
{ {
uae_u32 lastword = 0; uae_u32 lastword = 0;
while (words--) { while (words--) {
......
...@@ -343,16 +343,28 @@ void driveclick_mix (uae_s16 *sndbuffer, int size, int channelmask) ...@@ -343,16 +343,28 @@ void driveclick_mix (uae_s16 *sndbuffer, int size, int channelmask)
uae_s16 s = clickbuffer[i]; uae_s16 s = clickbuffer[i];
if (channelmask & 1) if (channelmask & 1)
sndbuffer[0] = limit (((sndbuffer[0] + s) * 2) / 3); sndbuffer[0] = limit (((sndbuffer[0] + s) * 2) / 3);
else
sndbuffer[0] = sndbuffer[0] * 2 / 3;
if (channelmask & 2) if (channelmask & 2)
sndbuffer[1] = limit (((sndbuffer[1] + s) * 2) / 3); sndbuffer[1] = limit (((sndbuffer[1] + s) * 2) / 3);
else
sndbuffer[1] = sndbuffer[1] * 2 / 3;
if (channelmask & 4) if (channelmask & 4)
sndbuffer[2] = limit (((sndbuffer[2] + s) * 2) / 3); sndbuffer[2] = limit (((sndbuffer[2] + s) * 2) / 3);
else
sndbuffer[2] = sndbuffer[2] * 2 / 3;
if (channelmask & 8) if (channelmask & 8)
sndbuffer[3] = limit (((sndbuffer[3] + s) * 2) / 3); sndbuffer[3] = limit (((sndbuffer[3] + s) * 2) / 3);
else
sndbuffer[3] = sndbuffer[3] * 2 / 3;
if (channelmask & 16) if (channelmask & 16)
sndbuffer[4] = limit (((sndbuffer[4] + s) * 2) / 3); sndbuffer[4] = limit (((sndbuffer[4] + s) * 2) / 3);
else
sndbuffer[4] = sndbuffer[4] * 2 / 3;
if (channelmask & 32) if (channelmask & 32)
sndbuffer[5] = limit (((sndbuffer[5] + s) * 2) / 3); sndbuffer[5] = limit (((sndbuffer[5] + s) * 2) / 3);
else
sndbuffer[5] = sndbuffer[5] * 2 / 3;
sndbuffer += 6; sndbuffer += 6;
} }
break; break;
...@@ -361,12 +373,20 @@ void driveclick_mix (uae_s16 *sndbuffer, int size, int channelmask) ...@@ -361,12 +373,20 @@ void driveclick_mix (uae_s16 *sndbuffer, int size, int channelmask)
uae_s16 s = clickbuffer[i]; uae_s16 s = clickbuffer[i];
if (channelmask & 1) if (channelmask & 1)
sndbuffer[0] = limit (((sndbuffer[0] + s) * 2) / 3); sndbuffer[0] = limit (((sndbuffer[0] + s) * 2) / 3);
else
sndbuffer[0] = sndbuffer[0] * 2 / 3;
if (channelmask & 2) if (channelmask & 2)
sndbuffer[1] = limit (((sndbuffer[1] + s) * 2) / 3); sndbuffer[1] = limit (((sndbuffer[1] + s) * 2) / 3);
else
sndbuffer[1] = sndbuffer[1] * 2 / 3;
if (channelmask & 4) if (channelmask & 4)
sndbuffer[2] = limit (((sndbuffer[2] + s) * 2) / 3); sndbuffer[2] = limit (((sndbuffer[2] + s) * 2) / 3);
else
sndbuffer[2] = sndbuffer[2] * 2 / 3;
if (channelmask & 8) if (channelmask & 8)
sndbuffer[3] = limit (((sndbuffer[3] + s) * 2) / 3); sndbuffer[3] = limit (((sndbuffer[3] + s) * 2) / 3);
else
sndbuffer[3] = sndbuffer[3] * 2 / 3;
sndbuffer += 4; sndbuffer += 4;
} }
break; break;
...@@ -375,8 +395,12 @@ void driveclick_mix (uae_s16 *sndbuffer, int size, int channelmask) ...@@ -375,8 +395,12 @@ void driveclick_mix (uae_s16 *sndbuffer, int size, int channelmask)
uae_s16 s = clickbuffer[i]; uae_s16 s = clickbuffer[i];
if (channelmask & 1) if (channelmask & 1)
sndbuffer[0] = limit (((sndbuffer[0] + s) * 2) / 3); sndbuffer[0] = limit (((sndbuffer[0] + s) * 2) / 3);
else
sndbuffer[0] = sndbuffer[0] * 2 / 3;
if (channelmask & 2) if (channelmask & 2)
sndbuffer[1] = limit (((sndbuffer[1] + s) * 2) / 3); sndbuffer[1] = limit (((sndbuffer[1] + s) * 2) / 3);
else
sndbuffer[1] = sndbuffer[1] * 2 / 3;
sndbuffer += 2; sndbuffer += 2;
} }
break; break;
......
This diff is collapsed.
...@@ -250,9 +250,9 @@ FSIN_chip_done ...@@ -250,9 +250,9 @@ FSIN_chip_done
move.w #$FF80,d0 move.w #$FF80,d0
bsr.w getrtbase bsr.w getrtbase
jsr (a0) ; d1 = size, a1 = start address jsr (a0) ; d1 = size, a1 = start address
beq.s FSIN_fchip_done
move.l a1,a0 move.l a1,a0
move.l d1,d0 move.l d1,d0
beq.s FSIN_fchip_done
move.l d4,d1 move.l d4,d1
moveq #-5,d2 moveq #-5,d2
lea fchipname(pc),a1 lea fchipname(pc),a1
......
This diff is collapsed.
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
db(0x22); db(0x4e); db(0x20); db(0x08); db(0x30); db(0x7c); db(0xff); db(0xb8); db(0x22); db(0x4e); db(0x20); db(0x08); db(0x30); db(0x7c); db(0xff); db(0xb8);
db(0x4e); db(0xae); db(0xfe); db(0x5c); db(0x61); db(0x00); db(0x11); db(0xfe); db(0x4e); db(0xae); db(0xfe); db(0x5c); db(0x61); db(0x00); db(0x11); db(0xfe);
db(0x61); db(0x00); db(0x15); db(0xb0); db(0x4c); db(0xdf); db(0x7e); db(0xff); db(0x61); db(0x00); db(0x15); db(0xb0); db(0x4c); db(0xdf); db(0x7e); db(0xff);
db(0x4e); db(0x75); db(0x4e); db(0xae); db(0x08); db(0x00); db(0x00); db(0x02); db(0x4e); db(0x75); db(0x00); db(0x00); db(0x08); db(0x00); db(0x00); db(0x02);
db(0x67); db(0x06); db(0x4e); db(0xb9); db(0x00); db(0xf0); db(0x00); db(0x00); db(0x67); db(0x06); db(0x4e); db(0xb9); db(0x00); db(0xf0); db(0x00); db(0x00);
db(0x4e); db(0xf9); db(0x00); db(0xf0); db(0x00); db(0x00); db(0x28); db(0x40); db(0x4e); db(0xf9); db(0x00); db(0xf0); db(0x00); db(0x00); db(0x00); db(0x00);
db(0x48); db(0xe7); db(0xff); db(0xfe); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x48); db(0xe7); db(0xff); db(0xfe); db(0x2c); db(0x78); db(0x00); db(0x04);
db(0x30); db(0x3c); db(0xff); db(0xfc); db(0x61); db(0x00); db(0x0b); db(0xaa); db(0x30); db(0x3c); db(0xff); db(0xfc); db(0x61); db(0x00); db(0x0b); db(0xaa);
db(0x2a); db(0x50); db(0x43); db(0xfa); db(0x16); db(0xf3); db(0x70); db(0x24); db(0x2a); db(0x50); db(0x43); db(0xfa); db(0x16); db(0xf3); db(0x70); db(0x24);
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
db(0x00); db(0x20); db(0x00); db(0x00); db(0x90); db(0x88); db(0x65); db(0x08); db(0x00); db(0x20); db(0x00); db(0x00); db(0x90); db(0x88); db(0x65); db(0x08);
db(0x67); db(0x06); db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfd); db(0x96); db(0x67); db(0x06); db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfd); db(0x96);
db(0x30); db(0x3c); db(0xff); db(0x80); db(0x61); db(0x00); db(0x0a); db(0xea); db(0x30); db(0x3c); db(0xff); db(0x80); db(0x61); db(0x00); db(0x0a); db(0xea);
db(0x4e); db(0x90); db(0x67); db(0x10); db(0x20); db(0x49); db(0x20); db(0x01); db(0x4e); db(0x90); db(0x20); db(0x49); db(0x20); db(0x01); db(0x67); db(0x0c);
db(0x22); db(0x04); db(0x74); db(0xfb); db(0x43); db(0xfa); db(0x16); db(0x4f); db(0x22); db(0x04); db(0x74); db(0xfb); db(0x43); db(0xfa); db(0x16); db(0x4f);
db(0x4e); db(0xae); db(0xfd); db(0x96); db(0x41); db(0xfa); db(0x15); db(0xc6); db(0x4e); db(0xae); db(0xfd); db(0x96); db(0x41); db(0xfa); db(0x15); db(0xc6);
db(0x43); db(0xfa); db(0x00); db(0x54); db(0x70); db(0x0a); db(0x61); db(0x00); db(0x43); db(0xfa); db(0x00); db(0x54); db(0x70); db(0x0a); db(0x61); db(0x00);
......
...@@ -1358,18 +1358,14 @@ void handle_events (void) ...@@ -1358,18 +1358,14 @@ void handle_events (void)
keycode = rEvent.key.keysym.sym; keycode = rEvent.key.keysym.sym;
DEBUG_LOG ("Event: key %d %s\n", keycode, state ? "down" : "up"); DEBUG_LOG ("Event: key %d %s\n", keycode, state ? "down" : "up");
write_log ("Event: key %d %s -- ", keycode, state ? "down" : "up");
if ((ievent = match_hotkey_sequence (keycode, state))) { if ((ievent = match_hotkey_sequence (keycode, state))) {
write_log ("HOT %d\n", ievent);
DEBUG_LOG ("Hotkey event: %d\n", ievent); DEBUG_LOG ("Hotkey event: %d\n", ievent);
handle_hotkey_event (ievent, state); handle_hotkey_event (ievent, state);
} else { } else {
if (currprefs.map_raw_keys) { if (currprefs.map_raw_keys) {
write_log ("RAW\n");
inputdevice_translatekeycode (0, keycode, state); inputdevice_translatekeycode (0, keycode, state);
} else { } else {
write_log ("SYM\n");
inputdevice_do_keyboard (keysym2amiga (keycode), state); inputdevice_do_keyboard (keysym2amiga (keycode), state);
} }
} }
......
...@@ -288,7 +288,7 @@ void alloc_colors64k (int rw, int gw, int bw, int rs, int gs, int bs, int aw, in ...@@ -288,7 +288,7 @@ void alloc_colors64k (int rw, int gw, int bw, int rs, int gs, int bs, int aw, in
redc[2 * 256 + i] = xredcolors[255]; redc[2 * 256 + i] = xredcolors[255];
grec[2 * 256 + i] = xgreencolors[255]; grec[2 * 256 + i] = xgreencolors[255];
bluc[2 * 256 + i] = xbluecolors[255]; bluc[2 * 256 + i] = xbluecolors[255];
} }
#ifdef GFXFILTER #ifdef GFXFILTER
if (usedfilter && usedfilter->yuv) { if (usedfilter && usedfilter->yuv) {
/* create internal 5:6:5 color tables */ /* create internal 5:6:5 color tables */
......
...@@ -237,7 +237,7 @@ void floppyfileentry_set_currentdir (FloppyFileEntry *ffe, const gchar *pathname ...@@ -237,7 +237,7 @@ void floppyfileentry_set_currentdir (FloppyFileEntry *ffe, const gchar *pathname
int len = strlen (pathname); int len = strlen (pathname);
if (ffe_currentdir) if (ffe_currentdir)
g_free (ffe_currentdir); g_free (ffe_currentdir);
/* /*
* Make sure it has a trailing path separator so the file dialog * Make sure it has a trailing path separator so the file dialog
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#define DEVICE_TYPE_ANY 1 #define DEVICE_TYPE_ANY 1
#define DEVICE_TYPE_SCSI 2 #define DEVICE_TYPE_SCSI 2
#define DEVICE_TYPE_ALLOWEMU 0x100
#define DF_SCSI 0 #define DF_SCSI 0
#define DF_IOCTL 1 #define DF_IOCTL 1
......
...@@ -29,7 +29,7 @@ struct strlist { ...@@ -29,7 +29,7 @@ struct strlist {
#define MAX_INPUT_SETTINGS 4 #define MAX_INPUT_SETTINGS 4
#define GAMEPORT_INPUT_SETTINGS 3 // last slot is for gameport panel mappings #define GAMEPORT_INPUT_SETTINGS 3 // last slot is for gameport panel mappings
#define MAX_INPUT_SUB_EVENT 4 #define MAX_INPUT_SUB_EVENT 4
#define SPARE_SUB_EVENT 4 #define SPARE_SUB_EVENT 4
// this better be here than in sound.h -mustafa. // this better be here than in sound.h -mustafa.
#define FILTER_SOUND_OFF 0 #define FILTER_SOUND_OFF 0
...@@ -42,11 +42,11 @@ struct strlist { ...@@ -42,11 +42,11 @@ struct strlist {
struct uae_input_device { struct uae_input_device {
TCHAR *name; TCHAR *name;
TCHAR *configname; TCHAR *configname;
uae_s16 eventid[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT + 1]; uae_s16 eventid[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT + 1];
TCHAR *custom[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT + 1]; TCHAR *custom[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT + 1];
uae_u16 flags[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT + 1]; uae_u16 flags[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT + 1];
uae_s8 port[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT + 1]; uae_s8 port[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT + 1];
uae_s16 extra[MAX_INPUT_DEVICE_EVENTS]; uae_s16 extra[MAX_INPUT_DEVICE_EVENTS];
uae_s8 enabled; uae_s8 enabled;
}; };
...@@ -302,6 +302,7 @@ struct uae_prefs { ...@@ -302,6 +302,7 @@ struct uae_prefs {
TCHAR amaxromfile[MAX_DPATH]; TCHAR amaxromfile[MAX_DPATH];
TCHAR a2065name[MAX_DPATH]; TCHAR a2065name[MAX_DPATH];
TCHAR cdimagefile[MAX_DPATH]; TCHAR cdimagefile[MAX_DPATH];
bool cdimagefileuse;
TCHAR quitstatefile[MAX_DPATH]; TCHAR quitstatefile[MAX_DPATH];
#ifndef WIN32 #ifndef WIN32
char scsi_device[256]; char scsi_device[256];
...@@ -360,7 +361,7 @@ struct uae_prefs { ...@@ -360,7 +361,7 @@ struct uae_prefs {
int hide_cursor; /* Whether to hide host WM cursor or not */ int hide_cursor; /* Whether to hide host WM cursor or not */
/* Target specific options */ /* Target specific options */
#ifdef USE_X11_GFX #ifdef USE_X11_GFX
int x11_use_low_bandwidth; int x11_use_low_bandwidth;
int x11_use_mitshm; int x11_use_mitshm;
...@@ -460,8 +461,8 @@ extern int config_changed; ...@@ -460,8 +461,8 @@ extern int config_changed;
extern void config_check_vsync (void); extern void config_check_vsync (void);
/* Contains the filename of .uaerc */ /* Contains the filename of .uaerc */
extern TCHAR optionsfile[]; extern TCHAR optionsfile[];
extern void save_options (struct zfile *, struct uae_prefs *, int); extern void save_options (struct zfile *, struct uae_prefs *, int);
/* /*
extern void cfgfile_write (struct zfile *, const TCHAR *option, const TCHAR *format,...); extern void cfgfile_write (struct zfile *, const TCHAR *option, const TCHAR *format,...);
extern void cfgfile_dwrite (struct zfile *, const TCHAR *option, const TCHAR *format,...); extern void cfgfile_dwrite (struct zfile *, const TCHAR *option, const TCHAR *format,...);
...@@ -478,25 +479,25 @@ extern void cfgfile_dwrite_str (struct zfile *f, const TCHAR *option, const TCHA ...@@ -478,25 +479,25 @@ extern void cfgfile_dwrite_str (struct zfile *f, const TCHAR *option, const TCHA
extern void cfgfile_target_write_str (struct zfile *f, const TCHAR *option, const TCHAR *value); extern void cfgfile_target_write_str (struct zfile *f, const TCHAR *option, const TCHAR *value);
extern void cfgfile_target_dwrite_str (struct zfile *f, const TCHAR *option, const TCHAR *value); extern void cfgfile_target_dwrite_str (struct zfile *f, const TCHAR *option, const TCHAR *value);
*/ */
extern void cfgfile_backup (const TCHAR *path); extern void cfgfile_backup (const TCHAR *path);
extern struct uaedev_config_info *add_filesys_config (struct uae_prefs *p, int index, extern struct uaedev_config_info *add_filesys_config (struct uae_prefs *p, int index,
TCHAR *devname, TCHAR *volname, TCHAR *rootdir, bool readonly, TCHAR *devname, TCHAR *volname, TCHAR *rootdir, bool readonly,
int secspertrack, int surfaces, int reserved, int secspertrack, int surfaces, int reserved,
int blocksize, int bootpri, TCHAR *filesysdir, int hdc, int flags); int blocksize, int bootpri, TCHAR *filesysdir, int hdc, int flags);
extern void default_prefs (struct uae_prefs *, int); extern void default_prefs (struct uae_prefs *, int);
extern void discard_prefs (struct uae_prefs *, int); extern void discard_prefs (struct uae_prefs *, int);
int parse_cmdline_option (struct uae_prefs *, TCHAR, const TCHAR *); int parse_cmdline_option (struct uae_prefs *, TCHAR, const TCHAR *);
extern int cfgfile_yesno (const TCHAR *option, const TCHAR *value, const TCHAR *name, bool *location); extern int cfgfile_yesno (const TCHAR *option, const TCHAR *value, const TCHAR *name, bool *location);
extern int cfgfile_intval (const TCHAR *option, const TCHAR *value, const TCHAR *name, int *location, int scale); extern int cfgfile_intval (const TCHAR *option, const TCHAR *value, const TCHAR *name, int *location, int scale);
extern int cfgfile_strval (const TCHAR *option, const TCHAR *value, const TCHAR *name, int *location, const TCHAR *table[], int more); extern int cfgfile_strval (const TCHAR *option, const TCHAR *value, const TCHAR *name, int *location, const TCHAR *table[], int more);
extern int cfgfile_string (const TCHAR *option, const TCHAR *value, const TCHAR *name, TCHAR *location, int maxsz); extern int cfgfile_string (const TCHAR *option, const TCHAR *value, const TCHAR *name, TCHAR *location, int maxsz);
extern TCHAR *cfgfile_subst_path (const TCHAR *path, const TCHAR *subst, const TCHAR *file); extern TCHAR *cfgfile_subst_path (const TCHAR *path, const TCHAR *subst, const TCHAR *file);
extern TCHAR *target_expand_environment (const TCHAR *path); extern TCHAR *target_expand_environment (const TCHAR *path);
extern int target_parse_option (struct uae_prefs *, TCHAR *option, TCHAR *value); extern int target_parse_option (struct uae_prefs *, TCHAR *option, TCHAR *value);
/*extern void target_save_options (struct zfile*, struct uae_prefs *); /*extern void target_save_options (struct zfile*, struct uae_prefs *);
extern void target_default_options (struct uae_prefs *, int type); extern void target_default_options (struct uae_prefs *, int type);
extern void target_fixup_options (struct uae_prefs *); extern void target_fixup_options (struct uae_prefs *);
...@@ -510,13 +511,13 @@ extern int cfgfile_parse_option (struct uae_prefs *p, TCHAR *option, TCHAR *valu ...@@ -510,13 +511,13 @@ extern int cfgfile_parse_option (struct uae_prefs *p, TCHAR *option, TCHAR *valu
extern int cfgfile_get_description (const TCHAR *filename, TCHAR *description, TCHAR *hostlink, TCHAR *hardwarelink, int *type); extern int cfgfile_get_description (const TCHAR *filename, TCHAR *description, TCHAR *hostlink, TCHAR *hardwarelink, int *type);
extern void cfgfile_show_usage (void); extern void cfgfile_show_usage (void);
*/ */
extern uae_u32 cfgfile_uaelib(int mode, uae_u32 name, uae_u32 dst, uae_u32 maxlen); extern uae_u32 cfgfile_uaelib (int mode, uae_u32 name, uae_u32 dst, uae_u32 maxlen);
extern uae_u32 cfgfile_uaelib_modify (uae_u32 mode, uae_u32 parms, uae_u32 size, uae_u32 out, uae_u32 outsize); extern uae_u32 cfgfile_uaelib_modify (uae_u32 mode, uae_u32 parms, uae_u32 size, uae_u32 out, uae_u32 outsize);
extern uae_u32 cfgfile_modify (uae_u32 index, TCHAR *parms, uae_u32 size, TCHAR *out, uae_u32 outsize); extern uae_u32 cfgfile_modify (uae_u32 index, TCHAR *parms, uae_u32 size, TCHAR *out, uae_u32 outsize);
extern void cfgfile_addcfgparam (TCHAR *); extern void cfgfile_addcfgparam (TCHAR *);
extern int built_in_prefs (struct uae_prefs *p, int model, int config, int compa, int romcheck); extern int built_in_prefs (struct uae_prefs *p, int model, int config, int compa, int romcheck);
extern int built_in_chipset_prefs (struct uae_prefs *p); extern int built_in_chipset_prefs (struct uae_prefs *p);
extern int cmdlineparser (TCHAR *s, TCHAR *outp[], int max); extern int cmdlineparser (TCHAR *s, TCHAR *outp[], int max);
extern int cfgfile_configuration_change(int); extern int cfgfile_configuration_change(int);
extern void fixup_prefs_dimensions (struct uae_prefs *prefs); extern void fixup_prefs_dimensions (struct uae_prefs *prefs);
extern void fixup_prefs (struct uae_prefs *prefs); extern void fixup_prefs (struct uae_prefs *prefs);
......
...@@ -13,6 +13,7 @@ void scsidev_install (void); ...@@ -13,6 +13,7 @@ void scsidev_install (void);
void scsidev_reset (void); void scsidev_reset (void);
void scsidev_start_threads (void); void scsidev_start_threads (void);
int scsi_do_disk_change (int device_id, int insert); int scsi_do_disk_change (int device_id, int insert);
int scsi_do_disk_device_change (void);
extern int log_scsi; extern int log_scsi;
......
...@@ -4706,10 +4706,7 @@ void inputdevice_get_eventname (const struct inputevent *ie, TCHAR *out) ...@@ -4706,10 +4706,7 @@ void inputdevice_get_eventname (const struct inputevent *ie, TCHAR *out)
{ {
if (!out) if (!out)
return; return;
if (ie->allow_mask == AM_K) _tcscpy (out, ie->name);
_stprintf (out, "%s (0x%02X)", ie->name, ie->data);
else
_tcscpy (out, ie->name);
} }
int inputdevice_iterate (int devnum, int num, TCHAR *name, int *af) int inputdevice_iterate (int devnum, int num, TCHAR *name, int *af)
......
This diff is collapsed.
...@@ -4,7 +4,7 @@ running configure, to aid debugging if configure makes a mistake. ...@@ -4,7 +4,7 @@ running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was It was created by configure, which was
generated by GNU Autoconf 2.65. Invocation command line was generated by GNU Autoconf 2.65. Invocation command line was
$ ./configure --disable-option-checking --prefix=/usr/local --with-sdl --with-sdl-gl --with-sdl-gfx --with-sdl-sound --with-caps --with-gayle --enable-drvsnd --enable-amax --enable-cd32 --enable-scsi-device --disable-jit --cache-file=/dev/null --srcdir=. $ ./configure --disable-option-checking --prefix=/usr/local --with-sdl --with-sdl-gl --with-sdl-gfx --with-alsa --with-caps --with-gayle --enable-drvsnd --enable-amax --enable-cd32 --enable-scsi-device --cache-file=/dev/null --srcdir=.
## --------- ## ## --------- ##
## Platform. ## ## Platform. ##
...@@ -445,7 +445,7 @@ configure:4344: $? = 0 ...@@ -445,7 +445,7 @@ configure:4344: $? = 0
configure:4344: result: yes configure:4344: result: yes
configure:4350: checking for _doprnt configure:4350: checking for _doprnt
configure:4350: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5 configure:4350: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/ccLbz9UG.o: In function `main': /tmp/cc4HIdmv.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:67: undefined reference to `_doprnt' /home/gnostic/puaex/src/tools/conftest.c:67: undefined reference to `_doprnt'
collect2: ld returned 1 exit status collect2: ld returned 1 exit status
configure:4350: $? = 1 configure:4350: $? = 1
...@@ -533,7 +533,7 @@ configure:4364: $? = 0 ...@@ -533,7 +533,7 @@ configure:4364: $? = 0
configure:4364: result: yes configure:4364: result: yes
configure:4364: checking for strcmpi configure:4364: checking for strcmpi
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5 configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/cc9bDtRS.o: In function `main': /tmp/cc8gAlpK.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `strcmpi' /home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `strcmpi'
collect2: ld returned 1 exit status collect2: ld returned 1 exit status
configure:4364: $? = 1 configure:4364: $? = 1
...@@ -613,7 +613,7 @@ configure: failed program was: ...@@ -613,7 +613,7 @@ configure: failed program was:
configure:4364: result: no configure:4364: result: no
configure:4364: checking for stricmp configure:4364: checking for stricmp
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5 configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/ccXCfhuX.o: In function `main': /tmp/ccuLVxdI.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `stricmp' /home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `stricmp'
collect2: ld returned 1 exit status collect2: ld returned 1 exit status
configure:4364: $? = 1 configure:4364: $? = 1
......
...@@ -438,7 +438,7 @@ $config_links ...@@ -438,7 +438,7 @@ $config_links
Report bugs to the package provider." Report bugs to the package provider."
ac_cs_config="'--disable-option-checking' '--prefix=/usr/local' '--with-sdl' '--with-sdl-gl' '--with-sdl-gfx' '--with-sdl-sound' '--with-caps' '--with-gayle' '--enable-drvsnd' '--enable-amax' '--enable-cd32' '--enable-scsi-device' '--disable-jit' '--cache-file=/dev/null' '--srcdir=.'" ac_cs_config="'--disable-option-checking' '--prefix=/usr/local' '--with-sdl' '--with-sdl-gl' '--with-sdl-gfx' '--with-alsa' '--with-caps' '--with-gayle' '--enable-drvsnd' '--enable-amax' '--enable-cd32' '--enable-scsi-device' '--cache-file=/dev/null' '--srcdir=.'"
ac_cs_version="\ ac_cs_version="\
config.status config.status
configured by ./configure, generated by GNU Autoconf 2.65, configured by ./configure, generated by GNU Autoconf 2.65,
...@@ -522,7 +522,7 @@ if $ac_cs_silent; then ...@@ -522,7 +522,7 @@ if $ac_cs_silent; then
fi fi
if $ac_cs_recheck; then if $ac_cs_recheck; then
set X '/bin/bash' './configure' '--disable-option-checking' '--prefix=/usr/local' '--with-sdl' '--with-sdl-gl' '--with-sdl-gfx' '--with-sdl-sound' '--with-caps' '--with-gayle' '--enable-drvsnd' '--enable-amax' '--enable-cd32' '--enable-scsi-device' '--disable-jit' '--cache-file=/dev/null' '--srcdir=.' $ac_configure_extra_args --no-create --no-recursion set X '/bin/bash' './configure' '--disable-option-checking' '--prefix=/usr/local' '--with-sdl' '--with-sdl-gl' '--with-sdl-gfx' '--with-alsa' '--with-caps' '--with-gayle' '--enable-drvsnd' '--enable-amax' '--enable-cd32' '--enable-scsi-device' '--cache-file=/dev/null' '--srcdir=.' $ac_configure_extra_args --no-create --no-recursion
shift shift
$as_echo "running CONFIG_SHELL=/bin/bash $*" >&6 $as_echo "running CONFIG_SHELL=/bin/bash $*" >&6
CONFIG_SHELL='/bin/bash' CONFIG_SHELL='/bin/bash'
......
...@@ -41,14 +41,14 @@ static uae_u32 emulib_GetVersion (void) ...@@ -41,14 +41,14 @@ static uae_u32 emulib_GetVersion (void)
*/ */
static uae_u32 emulib_HardReset (void) static uae_u32 emulib_HardReset (void)
{ {
uae_reset(0); uae_reset(0);
return 0; return 0;
} }
static uae_u32 emulib_Reset (void) static uae_u32 emulib_Reset (void)
{ {
uae_reset(0); uae_reset(0);
return 0; return 0;
} }
/* /*
...@@ -56,11 +56,11 @@ static uae_u32 emulib_Reset (void) ...@@ -56,11 +56,11 @@ static uae_u32 emulib_Reset (void)
*/ */
static uae_u32 emulib_EnableSound (uae_u32 val) static uae_u32 emulib_EnableSound (uae_u32 val)
{ {
if (!sound_available || currprefs.produce_sound == 2) if (!sound_available || currprefs.produce_sound == 2)
return 0; return 0;
currprefs.produce_sound = val; currprefs.produce_sound = val;
return 1; return 1;
} }
/* /*
...@@ -70,7 +70,7 @@ static uae_u32 emulib_EnableJoystick (uae_u32 val) ...@@ -70,7 +70,7 @@ static uae_u32 emulib_EnableJoystick (uae_u32 val)
{ {
currprefs.jports[0].id = val & 255; currprefs.jports[0].id = val & 255;
currprefs.jports[1].id = (val >> 8) & 255; currprefs.jports[1].id = (val >> 8) & 255;
return 1; return 1;
} }
/* /*
...@@ -78,14 +78,14 @@ static uae_u32 emulib_EnableJoystick (uae_u32 val) ...@@ -78,14 +78,14 @@ static uae_u32 emulib_EnableJoystick (uae_u32 val)
*/ */
static uae_u32 emulib_SetFrameRate (uae_u32 val) static uae_u32 emulib_SetFrameRate (uae_u32 val)
{ {
if (val == 0) if (val == 0)
return 0; return 0;
else if (val > 20) else if (val > 20)
return 0; return 0;
else { else {
currprefs.gfx_framerate = val; currprefs.gfx_framerate = val;
return 1; return 1;
} }
} }
/* /*
...@@ -132,16 +132,16 @@ static uae_u32 emulib_ChangeLanguage (uae_u32 which) ...@@ -132,16 +132,16 @@ static uae_u32 emulib_ChangeLanguage (uae_u32 which)
*/ */
static uae_u32 REGPARAM2 emulib_ChgCMemSize (uae_u32 memsize) static uae_u32 REGPARAM2 emulib_ChgCMemSize (uae_u32 memsize)
{ {
if (memsize != 0x80000 && memsize != 0x100000 && if (memsize != 0x80000 && memsize != 0x100000 &&
memsize != 0x200000) { memsize != 0x200000) {
memsize = 0x200000; memsize = 0x200000;
write_log ("Unsupported chipmem size!\n"); write_log ("Unsupported chipmem size!\n");
} }
m68k_dreg (regs, 0) = 0; m68k_dreg (regs, 0) = 0;
changed_prefs.chipmem_size = memsize; changed_prefs.chipmem_size = memsize;
uae_reset(0); uae_reset(0);
return 1; return 1;
} }
/* /*
...@@ -150,16 +150,16 @@ static uae_u32 REGPARAM2 emulib_ChgCMemSize (uae_u32 memsize) ...@@ -150,16 +150,16 @@ static uae_u32 REGPARAM2 emulib_ChgCMemSize (uae_u32 memsize)
*/ */
static uae_u32 REGPARAM2 emulib_ChgSMemSize (uae_u32 memsize) static uae_u32 REGPARAM2 emulib_ChgSMemSize (uae_u32 memsize)
{ {
if (memsize != 0x80000 && memsize != 0x100000 && if (memsize != 0x80000 && memsize != 0x100000 &&
memsize != 0x180000 && memsize != 0x1C0000) { memsize != 0x180000 && memsize != 0x1C0000) {
memsize = 0; memsize = 0;
write_log ("Unsupported bogomem size!\n"); write_log ("Unsupported bogomem size!\n");
} }
m68k_dreg (regs, 0) = 0; m68k_dreg (regs, 0) = 0;
changed_prefs.bogomem_size = memsize; changed_prefs.bogomem_size = memsize;
uae_reset (0); uae_reset (0);
return 1; return 1;
} }
/* /*
...@@ -168,15 +168,15 @@ static uae_u32 REGPARAM2 emulib_ChgSMemSize (uae_u32 memsize) ...@@ -168,15 +168,15 @@ static uae_u32 REGPARAM2 emulib_ChgSMemSize (uae_u32 memsize)
*/ */
static uae_u32 REGPARAM2 emulib_ChgFMemSize (uae_u32 memsize) static uae_u32 REGPARAM2 emulib_ChgFMemSize (uae_u32 memsize)
{ {
if (memsize != 0x100000 && memsize != 0x200000 && if (memsize != 0x100000 && memsize != 0x200000 &&
memsize != 0x400000 && memsize != 0x800000) { memsize != 0x400000 && memsize != 0x800000) {
memsize = 0; memsize = 0;
write_log ("Unsupported fastmem size!\n"); write_log ("Unsupported fastmem size!\n");
} }
m68k_dreg (regs, 0) = 0; m68k_dreg (regs, 0) = 0;
changed_prefs.fastmem_size = memsize; changed_prefs.fastmem_size = memsize;
uae_reset (0); uae_reset (0);
return 0; return 0;
} }
/* /*
...@@ -184,21 +184,21 @@ static uae_u32 REGPARAM2 emulib_ChgFMemSize (uae_u32 memsize) ...@@ -184,21 +184,21 @@ static uae_u32 REGPARAM2 emulib_ChgFMemSize (uae_u32 memsize)
*/ */
static uae_u32 emulib_InsertDisk (uaecptr name, uae_u32 drive) static uae_u32 emulib_InsertDisk (uaecptr name, uae_u32 drive)
{ {
int i = 0; int i = 0;
char real_name[256]; char real_name[256];
if (drive > 3) if (drive > 3)
return 0; return 0;
while ((real_name[i] = get_byte (name + i)) != 0 && i++ != 254) while ((real_name[i] = get_byte (name + i)) != 0 && i++ != 254)
; ;
if (i == 255) if (i == 255)
return 0; /* ENAMETOOLONG */ return 0; /* ENAMETOOLONG */
strcpy (changed_prefs.df[drive], real_name); strcpy (changed_prefs.df[drive], real_name);
return 1; return 1;
} }
/* /*
...@@ -206,8 +206,8 @@ static uae_u32 emulib_InsertDisk (uaecptr name, uae_u32 drive) ...@@ -206,8 +206,8 @@ static uae_u32 emulib_InsertDisk (uaecptr name, uae_u32 drive)
*/ */
static uae_u32 emulib_ExitEmu (void) static uae_u32 emulib_ExitEmu (void)
{ {
uae_quit (); uae_quit ();
return 1; return 1;
} }
/* /*
...@@ -215,38 +215,38 @@ static uae_u32 emulib_ExitEmu (void) ...@@ -215,38 +215,38 @@ static uae_u32 emulib_ExitEmu (void)
*/ */
static uae_u32 emulib_GetUaeConfig (uaecptr place) static uae_u32 emulib_GetUaeConfig (uaecptr place)
{ {
int i, j; int i, j;
put_long (place, UAEVERSION); put_long (place, UAEVERSION);
put_long (place + 4, allocated_chipmem); put_long (place + 4, allocated_chipmem);
put_long (place + 8, allocated_bogomem); put_long (place + 8, allocated_bogomem);
put_long (place + 12, allocated_fastmem); put_long (place + 12, allocated_fastmem);
put_long (place + 16, currprefs.gfx_framerate); put_long (place + 16, currprefs.gfx_framerate);
put_long (place + 20, currprefs.produce_sound); put_long (place + 20, currprefs.produce_sound);
put_long (place + 24, currprefs.jports[0].id | (currprefs.jports[1].id << 8)); put_long (place + 24, currprefs.jports[0].id | (currprefs.jports[1].id << 8));
put_long (place + 28, currprefs.keyboard_lang); put_long (place + 28, currprefs.keyboard_lang);
if (disk_empty (0)) if (disk_empty (0))
put_byte (place + 32, 0); put_byte (place + 32, 0);
else else
put_byte (place + 32, 1); put_byte (place + 32, 1);
if (disk_empty (1)) if (disk_empty (1))
put_byte (place + 33, 0); put_byte (place + 33, 0);
else else
put_byte (place + 33, 1); put_byte (place + 33, 1);
if (disk_empty(2)) if (disk_empty(2))
put_byte (place + 34, 0); put_byte (place + 34, 0);
else else
put_byte (place + 34, 1); put_byte (place + 34, 1);
if (disk_empty(3)) if (disk_empty(3))
put_byte (place + 35, 0); put_byte (place + 35, 0);
else else
put_byte (place + 35, 1); put_byte (place + 35, 1);
for (j = 0; j < 4; j++) { for (j = 0; j < 4; j++) {
for (i = 0; i < 256; i++) for (i = 0; i < 256; i++)
put_byte (place + 36 + i + j * 256, currprefs.df[j][i]); put_byte (place + 36 + i + j * 256, currprefs.df[j][i]);
} }
return 1; return 1;
} }
/* /*
...@@ -256,7 +256,7 @@ static uae_u32 emulib_GetUaeConfig (uaecptr place) ...@@ -256,7 +256,7 @@ static uae_u32 emulib_GetUaeConfig (uaecptr place)
*/ */
static uae_u32 emulib_SetUaeConfig (uaecptr place) static uae_u32 emulib_SetUaeConfig (uaecptr place)
{ {
return 1; return 1;
} }
/* /*
...@@ -264,14 +264,14 @@ static uae_u32 emulib_SetUaeConfig (uaecptr place) ...@@ -264,14 +264,14 @@ static uae_u32 emulib_SetUaeConfig (uaecptr place)
*/ */
static uae_u32 emulib_GetDisk (uae_u32 drive, uaecptr name) static uae_u32 emulib_GetDisk (uae_u32 drive, uaecptr name)
{ {
int i; int i;
if (drive > 3) if (drive > 3)
return 0; return 0;
for (i = 0;i < 256; i++) { for (i = 0;i < 256; i++) {
put_byte (name + i, currprefs.df[drive][i]); put_byte (name + i, currprefs.df[drive][i]);
} }
return 1; return 1;
} }
/* /*
...@@ -280,16 +280,16 @@ static uae_u32 emulib_GetDisk (uae_u32 drive, uaecptr name) ...@@ -280,16 +280,16 @@ static uae_u32 emulib_GetDisk (uae_u32 drive, uaecptr name)
static uae_u32 emulib_Debug (void) static uae_u32 emulib_Debug (void)
{ {
#ifdef DEBUGGER #ifdef DEBUGGER
activate_debugger (); activate_debugger ();
return 1; return 1;
#else #else
return 0; return 0;
#endif #endif
} }
#define CREATE_NATIVE_FUNC_PTR uae_u32 (* native_func)( uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, \ #define CREATE_NATIVE_FUNC_PTR uae_u32 (* native_func) (uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, \
uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32) uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32)
#define SET_NATIVE_FUNC(x) native_func = (uae_u32 (*)(uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32))(x) #define SET_NATIVE_FUNC(x) native_func = (uae_u32 (*)(uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32))(x)
#define CALL_NATIVE_FUNC( d1,d2,d3,d4,d5,d6,d7,a1,a2,a3,a4,a5,a6 ) if(native_func) native_func( d1,d2,d3,d4,d5,d6,d7,a1,a2,a3,a4,a5,a6 ) #define CALL_NATIVE_FUNC( d1,d2,d3,d4,d5,d6,d7,a1,a2,a3,a4,a5,a6 ) if(native_func) native_func( d1,d2,d3,d4,d5,d6,d7,a1,a2,a3,a4,a5,a6 )
/* A0 - Contains a ptr to the native .obj data. This ptr is Amiga-based. */ /* A0 - Contains a ptr to the native .obj data. This ptr is Amiga-based. */
...@@ -297,39 +297,39 @@ static uae_u32 emulib_Debug (void) ...@@ -297,39 +297,39 @@ static uae_u32 emulib_Debug (void)
static uae_u32 REGPARAM2 emulib_ExecuteNativeCode (void) static uae_u32 REGPARAM2 emulib_ExecuteNativeCode (void)
{ {
#if 0 #if 0
uaecptr object_AAM = m68k_areg (regs, 0); uaecptr object_AAM = m68k_areg (regs, 0);
uae_u32 d1 = m68k_dreg (regs, 1); uae_u32 d1 = m68k_dreg (regs, 1);
uae_u32 d2 = m68k_dreg (regs, 2); uae_u32 d2 = m68k_dreg (regs, 2);
uae_u32 d3 = m68k_dreg (regs, 3); uae_u32 d3 = m68k_dreg (regs, 3);
uae_u32 d4 = m68k_dreg (regs, 4); uae_u32 d4 = m68k_dreg (regs, 4);
uae_u32 d5 = m68k_dreg (regs, 5); uae_u32 d5 = m68k_dreg (regs, 5);
uae_u32 d6 = m68k_dreg (regs, 6); uae_u32 d6 = m68k_dreg (regs, 6);
uae_u32 d7 = m68k_dreg (regs, 7); uae_u32 d7 = m68k_dreg (regs, 7);
uae_u32 a1 = m68k_areg (regs, 1); uae_u32 a1 = m68k_areg (regs, 1);
uae_u32 a2 = m68k_areg (regs, 2); uae_u32 a2 = m68k_areg (regs, 2);
uae_u32 a3 = m68k_areg (regs, 3); uae_u32 a3 = m68k_areg (regs, 3);
uae_u32 a4 = m68k_areg (regs, 4); uae_u32 a4 = m68k_areg (regs, 4);
uae_u32 a5 = m68k_areg (regs, 5); uae_u32 a5 = m68k_areg (regs, 5);
uae_u32 a6 = m68k_areg (regs, 6); uae_u32 a6 = m68k_areg (regs, 6);
uae_u8* object_UAM = NULL; uae_u8* object_UAM = NULL;
CREATE_NATIVE_FUNC_PTR; CREATE_NATIVE_FUNC_PTR;
if( get_mem_bank( object_AAM ).check( object_AAM, 1 ) ) if (get_mem_bank(object_AAM).check (object_AAM, 1))
object_UAM = get_mem_bank( object_AAM).xlateaddr( object_AAM ); object_UAM = get_mem_bank (object_AAM).xlateaddr (object_AAM);
if (object_UAM) { if (object_UAM) {
SET_NATIVE_FUNC( FindFunctionInObject( object_UAM ) ); SET_NATIVE_FUNC (FindFunctionInObject (object_UAM));
CALL_NATIVE_FUNC( d1, d2, d3, d4, d5, d6, d7, a1, a2, a3, a4, a5, a6); CALL_NATIVE_FUNC (d1, d2, d3, d4, d5, d6, d7, a1, a2, a3, a4, a5, a6);
} }
return 1; return 1;
#endif #endif
return 0; return 0;
} }
static uae_u32 emulib_Minimize (void) static uae_u32 emulib_Minimize (void)
{ {
return 0; // OSDEP_minimize_uae(); return 0; // OSDEP_minimize_uae();
} }
static int native_dos_op (uae_u32 mode, uae_u32 p1, uae_u32 p2, uae_u32 p3) static int native_dos_op (uae_u32 mode, uae_u32 p1, uae_u32 p2, uae_u32 p3)
...@@ -369,7 +369,7 @@ static uae_u32 REGPARAM2 uaelib_demux2 (TrapContext *context) ...@@ -369,7 +369,7 @@ static uae_u32 REGPARAM2 uaelib_demux2 (TrapContext *context)
// return picasso_demux (ARG0, context); // return picasso_demux (ARG0, context);
#endif #endif
switch (ARG0) switch (ARG0)
{ {
case 0: return emulib_GetVersion (); case 0: return emulib_GetVersion ();
case 1: return emulib_GetUaeConfig (ARG1); case 1: return emulib_GetUaeConfig (ARG1);
...@@ -414,8 +414,8 @@ static uae_u32 REGPARAM2 uaelib_demux2 (TrapContext *context) ...@@ -414,8 +414,8 @@ static uae_u32 REGPARAM2 uaelib_demux2 (TrapContext *context)
return d0; return d0;
} }
} }
return 0; return 0;
} }
int uaelib_debug; int uaelib_debug;
...@@ -458,6 +458,6 @@ void emulib_install (void) ...@@ -458,6 +458,6 @@ void emulib_install (void)
dw (get_word (rtarea_base + 38) + 12); dw (get_word (rtarea_base + 38) + 12);
#endif #endif
calltrap (deftrapres (uaelib_demux, 0, "uaelib_demux")); calltrap (deftrapres (uaelib_demux, 0, "uaelib_demux"));
dw (RTS); dw (RTS);
org (a); org (a);
} }
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment