if (!savestate_state && bltstate != BLT_done && blitline) {
blitline = 0;
bltstate = BLT_done;
+ blit_interrupt = 1;
write_log (L"BLITTER: register modification during linedraw!\n");
}
return NULL;
dstbak = dst = xmalloc (uae_u8, 4 + 256 + 4 + 4);
save_u32 (4);
- save_string (currprefs.cdslots[num].name);
+ save_path (currprefs.cdslots[num].name, SAVESTATE_PATH_CD);
save_u32 (currprefs.cdslots[num].type);
save_u32 (0);
*len = dst - dstbak;
if (num >= MAX_TOTAL_SCSI_DEVICES)
return NULL;
flags = restore_u32 ();
- s = restore_string ();
+ s = restore_path (SAVESTATE_PATH_CD);
int type = restore_u32 ();
restore_u32 ();
if (flags & 4) {
}
}
- _stprintf (tmp, L"%s.rom_path", TARGET_NAME);
- cfgfile_write_str (f, tmp, p->path_rom);
- _stprintf (tmp, L"%s.floppy_path", TARGET_NAME);
- cfgfile_write_str (f, tmp, p->path_floppy);
- _stprintf (tmp, L"%s.hardfile_path", TARGET_NAME);
- cfgfile_write_str (f, tmp, p->path_hardfile);
+ for (i = 0; i < MAX_PATHS; i++) {
+ if (p->path_rom.path[i][0]) {
+ _stprintf (tmp, L"%s.rom_path", TARGET_NAME);
+ cfgfile_write_str (f, tmp, p->path_rom.path[i]);
+ }
+ }
+ for (i = 0; i < MAX_PATHS; i++) {
+ if (p->path_floppy.path[i][0]) {
+ _stprintf (tmp, L"%s.floppy_path", TARGET_NAME);
+ cfgfile_write_str (f, tmp, p->path_floppy.path[i]);
+ }
+ }
+ for (i = 0; i < MAX_PATHS; i++) {
+ if (p->path_hardfile.path[i][0]) {
+ _stprintf (tmp, L"%s.hardfile_path", TARGET_NAME);
+ cfgfile_write_str (f, tmp, p->path_hardfile.path[i]);
+ }
+ }
+ for (i = 0; i < MAX_PATHS; i++) {
+ if (p->path_cd.path[i][0]) {
+ _stprintf (tmp, L"%s.cd_path", TARGET_NAME);
+ cfgfile_write_str (f, tmp, p->path_cd.path[i]);
+ }
+ }
cfg_write (L"; host-specific", f);
cfgfile_write_str (f, L"use_gui", guimode1[p->start_gui]);
cfgfile_write_bool (f, L"use_debugger", p->start_debugger);
- cfgfile_write_rom (f, p->path_rom, p->romfile, L"kickstart_rom_file");
- cfgfile_write_rom (f, p->path_rom, p->romextfile, L"kickstart_ext_rom_file");
+ cfgfile_write_rom (f, p->path_rom.path[0], p->romfile, L"kickstart_rom_file");
+ cfgfile_write_rom (f, p->path_rom.path[0], p->romextfile, L"kickstart_ext_rom_file");
if (p->romextfile2addr) {
cfgfile_write (f, L"kickstart_ext_rom_file2_address", L"%x", p->romextfile2addr);
- cfgfile_write_rom (f, p->path_rom, p->romextfile2, L"kickstart_ext_rom_file2");
+ cfgfile_write_rom (f, p->path_rom.path[0], p->romextfile2, L"kickstart_ext_rom_file2");
}
if (p->romident[0])
cfgfile_dwrite_str (f, L"kickstart_rom", p->romident);
if (p->romextident[0])
cfgfile_write_str (f, L"kickstart_ext_rom=", p->romextident);
- str = cfgfile_subst_path (p->path_rom, UNEXPANDED, p->flashfile);
+ str = cfgfile_subst_path (p->path_rom.path[0], UNEXPANDED, p->flashfile);
cfgfile_write_str (f, L"flash_file", str);
xfree (str);
- str = cfgfile_subst_path (p->path_rom, UNEXPANDED, p->cartfile);
+ str = cfgfile_subst_path (p->path_rom.path[0], UNEXPANDED, p->cartfile);
cfgfile_write_str (f, L"cart_file", str);
xfree (str);
if (p->cartident[0])
cfgfile_write_str (f, L"cart", p->cartident);
if (p->amaxromfile[0]) {
- str = cfgfile_subst_path (p->path_rom, UNEXPANDED, p->amaxromfile);
+ str = cfgfile_subst_path (p->path_rom.path[0], UNEXPANDED, p->amaxromfile);
cfgfile_write_str (f, L"amax_rom_file", str);
xfree (str);
}
p->nr_floppies = 4;
for (i = 0; i < 4; i++) {
- str = cfgfile_subst_path (p->path_floppy, UNEXPANDED, p->floppyslots[i].df);
+ str = cfgfile_subst_path (p->path_floppy.path[0], UNEXPANDED, p->floppyslots[i].df);
_stprintf (tmp, L"floppy%d", i);
cfgfile_write_str (f, tmp, str);
xfree (str);
cfgfile_dwrite_bool (f, L"warp", p->turbo_emulation);
#ifdef FILESYS
- write_filesys_config (p, UNEXPANDED, p->path_hardfile, f);
+ write_filesys_config (p, UNEXPANDED, p->path_hardfile.path[0], f);
if (p->filesys_no_uaefsdb)
cfgfile_write_bool (f, L"filesys_no_fsdb", p->filesys_no_uaefsdb);
#endif
return 1;
}
+int cfgfile_multipath (const TCHAR *option, const TCHAR *value, const TCHAR *name, struct multipath *mp)
+{
+ TCHAR tmploc[MAX_DPATH];
+ if (!cfgfile_string (option, value, name, tmploc, 256))
+ return 0;
+ for (int i = 0; i < MAX_PATHS; i++) {
+ if (mp->path[i][0] == 0 || (i == 0 && (!_tcscmp (mp->path[i], L".\\") || !_tcscmp (mp->path[i], L"./")))) {
+ TCHAR *s = target_expand_environment (tmploc);
+ _tcsncpy (mp->path[i], s, 256 - 1);
+ mp->path[i][256 - 1] = 0;
+ xfree (s);
+ return 1;
+ }
+ }
+ return 1;
+}
+
int cfgfile_rom (const TCHAR *option, const TCHAR *value, const TCHAR *name, TCHAR *location, int maxsz)
{
TCHAR id[MAX_DPATH];
*tmpp = '\0';
if (_tcscmp (section, TARGET_NAME) == 0) {
/* We special case the various path options here. */
- if (cfgfile_path (option, value, L"rom_path", p->path_rom, sizeof p->path_rom / sizeof (TCHAR))
- || cfgfile_path (option, value, L"floppy_path", p->path_floppy, sizeof p->path_floppy / sizeof (TCHAR))
- || cfgfile_path (option, value, L"hardfile_path", p->path_hardfile, sizeof p->path_hardfile / sizeof (TCHAR)))
+ if (cfgfile_multipath (option, value, L"rom_path", &p->path_rom)
+ || cfgfile_multipath (option, value, L"floppy_path", &p->path_floppy)
+ || cfgfile_multipath (option, value, L"cd_path", &p->path_floppy)
+ || cfgfile_multipath (option, value, L"hardfile_path", &p->path_hardfile))
return 1;
return target_parse_option (p, option, value);
}
root = value;
aname = 0;
}
- str = cfgfile_subst_path (UNEXPANDED, p->path_hardfile, root);
+ str = cfgfile_subst_path (UNEXPANDED, p->path_hardfile.path[0], root);
#ifdef FILESYS
add_filesys_config (p, -1, NULL, aname, str, ro, secs, heads, reserved, bs, 0, NULL, 0, 0);
#endif
root += 2;
*root = ':';
}
- str = cfgfile_subst_path (UNEXPANDED, p->path_hardfile, root);
+ str = cfgfile_subst_path (UNEXPANDED, p->path_hardfile.path[0], root);
}
#ifdef FILESYS
add_filesys_config (p, -1, dname, aname, str, ro, secs, heads, reserved, bs, bp, fs, hdcv, 0);
}
for (i = 0; i < 4; i++)
- subst (p->path_floppy, p->floppyslots[i].df, sizeof p->floppyslots[i].df / sizeof (TCHAR));
- subst (p->path_rom, p->romfile, sizeof p->romfile / sizeof (TCHAR));
- subst (p->path_rom, p->romextfile, sizeof p->romextfile / sizeof (TCHAR));
- subst (p->path_rom, p->romextfile2, sizeof p->romextfile2 / sizeof (TCHAR));
+ subst (p->path_floppy.path[0], p->floppyslots[i].df, sizeof p->floppyslots[i].df / sizeof (TCHAR));
+ subst (p->path_rom.path[0], p->romfile, sizeof p->romfile / sizeof (TCHAR));
+ subst (p->path_rom.path[0], p->romextfile, sizeof p->romextfile / sizeof (TCHAR));
+ subst (p->path_rom.path[0], p->romextfile2, sizeof p->romextfile2 / sizeof (TCHAR));
return 1;
}
_tcscpy (p->flashfile, L"");
_tcscpy (p->cartfile, L"");
- _tcscpy (p->path_rom, L"./");
- _tcscpy (p->path_floppy, L"./");
- _tcscpy (p->path_hardfile, L"./");
+ _tcscpy (p->path_rom.path[0], L"./");
+ _tcscpy (p->path_floppy.path[0], L"./");
+ _tcscpy (p->path_hardfile.path[0], L"./");
p->prtname[0] = 0;
p->sername[0] = 0;
static void RethinkICRA (void)
{
if (ciaaimask & ciaaicr) {
+ //write_log (L"A");
ciaaicr |= 0x80;
send_interrupt (3, 2 * CYCLE_UNIT + CYCLE_UNIT / 2);
}
static void RethinkICRB (void)
{
if (ciabimask & ciabicr) {
+ //write_log (L"B");
ciabicr |= 0x80;
send_interrupt (13, 2 * CYCLE_UNIT + CYCLE_UNIT / 2);
}
static void dmal_func2 (uae_u32 v)
{
- for (int i = 0; i < 6 + 8; i += 2) {
+ while (dmal) {
if (dmal & 3)
dmal_emu (dmal_hpos + ((dmal & 2) ? 1 : 0));
dmal_hpos += 2;
static void events_dmal (int hp)
{
- int i;
if (!dmal)
return;
if (currprefs.cpu_cycle_exact) {
- for (i = 0; i < 6 + 8; i += 2) {
+ while (dmal) {
if (dmal & 3)
break;
hp += 2;
if (dosbase) {
uaecptr rootnode = get_long (dosbase + 34);
uaecptr dosinfo = get_long (rootnode + 24) << 2;
+ console_out_f (L"ROOTNODE: %08x DOSINFO: %08x\n", rootnode, dosinfo);
uaecptr doslist = get_long (dosinfo + 4) << 2;
while (doslist) {
int type = get_long (doslist + 4);
bool writ = dskdmaen == 3 && drv->state && !((selected | disabled) & (1 << num));
if (drv->state == gui_data.drive_motor[num]
- && drv->cyl == gui_data.drive_track[num]
- && side == gui_data.drive_side
+ && drv->cyl == gui_data.drive_track[num]
+ && side == gui_data.drive_side
&& drv->crc32 == gui_data.crc32[num]
- && writ == gui_data.drive_writing[num]
- && !_tcscmp (gui_data.df[num], currprefs.floppyslots[num].df))
+ && writ == gui_data.drive_writing[num]
+ && !_tcscmp (gui_data.df[num], currprefs.floppyslots[num].df))
return;
_tcscpy (gui_data.df[num], currprefs.floppyslots[num].df);
gui_data.crc32[num] = drv->crc32;
int mfmpos = restore_u32 ();
drv->dskchange_time = 0;
restore_u32 ();
- s = restore_string ();
+ s = restore_path (SAVESTATE_PATH_FLOPPY);
_tcscpy (old, currprefs.floppyslots[num].df);
_tcsncpy (changed_prefs.floppyslots[num].df, s, 255);
xfree (s);
save_u8 (drv->drive_id_scnt); /* id mode position */
save_u32 (drv->mfmpos); /* disk position */
save_u32 (getadfcrc (drv)); /* CRC of disk image */
- save_string (usepath ? currprefs.floppyslots[num].df : L"");/* image name */
+ save_path (usepath ? currprefs.floppyslots[num].df : L"", SAVESTATE_PATH_FLOPPY);/* image name */
save_u16 (drv->dskready_up_time);
save_u16 (drv->dskready_down_time);
*len = dst - dstbak;
{
int ret;
- if (nr_units() >= MAX_FILESYSTEM_UNITS)
+ if (nr_units () >= MAX_FILESYSTEM_UNITS)
return -1;
ret = set_filesys_unit_1 (-1, devname, volname, rootdir, readonly,
struct hardfiledata *hfd = &ui->hf;
TCHAR *s;
- hfd->virtsize = restore_u64();
- hfd->offset = restore_u64();
- hfd->nrcyls = restore_u32();
- hfd->secspertrack = restore_u32();
- hfd->surfaces = restore_u32();
- hfd->reservedblocks = restore_u32();
- hfd->blocksize = restore_u32();
- hfd->readonly = restore_u32();
- hfd->flags = restore_u32();
- hfd->cylinders = restore_u32();
- hfd->sectors = restore_u32();
- hfd->heads = restore_u32();
- s = restore_string();
+ hfd->virtsize = restore_u64 ();
+ hfd->offset = restore_u64 ();
+ hfd->nrcyls = restore_u32 ();
+ hfd->secspertrack = restore_u32 ();
+ hfd->surfaces = restore_u32 ();
+ hfd->reservedblocks = restore_u32 ();
+ hfd->blocksize = restore_u32 ();
+ hfd->readonly = restore_u32 ();
+ hfd->flags = restore_u32 ();
+ hfd->cylinders = restore_u32 ();
+ hfd->sectors = restore_u32 ();
+ hfd->heads = restore_u32 ();
+ s = restore_string ();
_tcscpy (hfd->vendor_id, s);
- xfree(s);
- s = restore_string();
+ xfree (s);
+ s = restore_string ();
_tcscpy (hfd->product_id, s);
- xfree(s);
- s = restore_string();
+ xfree (s);
+ s = restore_string ();
_tcscpy (hfd->product_rev, s);
- xfree(s);
- s = restore_string();
+ xfree (s);
+ s = restore_string ();
_tcscpy (hfd->device_name, s);
- xfree(s);
+ xfree (s);
return src;
}
save_u32 (2); /* version */
save_u32 (ui->devno);
save_u16 (type);
- save_string (ui->rootdir);
+ if (type == FILESYS_VIRTUAL)
+ save_path (ui->rootdir, SAVESTATE_PATH_VDIR);
+ else if (type == FILESYS_HARDFILE || type == FILESYS_HARDFILE_RDB)
+ save_path (ui->rootdir, SAVESTATE_PATH_HDF);
+ else if (type == FILESYS_HARDDRIVE)
+ save_path (ui->rootdir, SAVESTATE_PATH_HD);
+ else
+ save_path (ui->rootdir, SAVESTATE_PATH);
save_string (ui->devname);
save_string (ui->volname);
- save_string (ui->filesysdir);
+ save_path (ui->filesysdir, SAVESTATE_PATH);
save_u8 (ui->bootpri);
save_u8 (ui->readonly);
save_u32 (ui->startup);
TCHAR *devname = 0, *volname = 0, *rootdir = 0, *filesysdir = 0;
int bootpri;
bool readonly;
+ uae_u32 startup;
if (restore_u32 () != 2)
return src;
devno = restore_u32 ();
type = restore_u16 ();
- rootdir = restore_string ();
+ if (type == FILESYS_VIRTUAL)
+ rootdir = restore_path (SAVESTATE_PATH_VDIR);
+ else if (type == FILESYS_HARDFILE || type == FILESYS_HARDFILE_RDB)
+ rootdir = restore_path (SAVESTATE_PATH_HDF);
+ else if (type == FILESYS_HARDDRIVE)
+ rootdir = restore_path (SAVESTATE_PATH_HD);
+ else
+ rootdir = restore_path (SAVESTATE_PATH);
devname = restore_string ();
volname = restore_string ();
- filesysdir = restore_string ();
+ filesysdir = restore_path (SAVESTATE_PATH);
bootpri = restore_u8 ();
readonly = restore_u8 () != 0;
- ui = &mountinfo.ui[devno];
- ui->startup = restore_u32 ();
+ startup = restore_u32 ();
filesys_configdev = restore_u32 ();
+ ui = &mountinfo.ui[devno];
if (type == FILESYS_HARDFILE || type == FILESYS_HARDFILE_RDB) {
src = restore_filesys_hardfile (ui, src);
xfree (volname);
write_log (L"filesys '%s' failed to restore\n", rootdir);
goto end;
}
+ ui->devno = devno;
+ ui->startup = startup;
if (type == FILESYS_VIRTUAL)
src = restore_filesys_virtual (ui, src, devno);
write_log (L"'%s' restored\n", rootdir);
extern int minfirstline, vblank_endline, numscrlines;
extern int vblank_hz, fake_vblank_hz, vblank_skip, doublescan;
extern frame_time_t syncbase;
-#define NUMSCRLINES (maxvpos + 1 - minfirstline + 1)
#define DMA_AUD0 0x0001
#define DMA_AUD1 0x0002
extern long int version;
+#define MAX_PATHS 8
+
+struct multipath {
+ TCHAR path[MAX_PATHS][256];
+};
+
struct strlist {
struct strlist *next;
TCHAR *option, *value;
TCHAR inprecfile[MAX_DPATH];
bool inprec_autoplay;
- TCHAR path_floppy[256];
- TCHAR path_hardfile[256];
- TCHAR path_rom[256];
+ struct multipath path_floppy;
+ struct multipath path_hardfile;
+ struct multipath path_rom;
+ struct multipath path_cd;
int m68k_speed;
int cpu_model;
extern void save_string_func (uae_u8 **, const TCHAR*);
extern TCHAR *restore_string_func (uae_u8 **);
+#define SAVESTATE_PATH 0
+#define SAVESTATE_PATH_FLOPPY 1
+#define SAVESTATE_PATH_VDIR 2
+#define SAVESTATE_PATH_HDF 3
+#define SAVESTATE_PATH_HD 4
+#define SAVESTATE_PATH_CD 5
+
+extern void save_path_func (uae_u8 **, const TCHAR*, int type);
+extern TCHAR *restore_path_func (uae_u8 **, int type);
+
#define save_u64(x) save_u64_func (&dst, (x))
#define save_u32(x) save_u32_func (&dst, (x))
#define save_u16(x) save_u16_func (&dst, (x))
#define save_string(x) save_string_func (&dst, (x))
#define restore_string() restore_string_func (&src)
+#define save_path(x, p) save_path_func (&dst, (x), p)
+#define restore_path(p) restore_path_func (&src, p)
+
+
/* save, restore and initialize routines for Amiga's subsystems */
extern uae_u8 *restore_cpu (uae_u8 *);
for (i = 0; i < 2; i++) {
- v = getvelocity (i, 0, pct);
- mxd += v;
- mouse_x[i] += v;
-
- v = getvelocity (i, 1, pct);
- myd += v;
- mouse_y[i] += v;
-
- v = getvelocity (i, 2, pct);
- if (v > 0)
- record_key (0x7a << 1);
- else if (v < 0)
- record_key (0x7b << 1);
- if (!mouse_deltanoreset[i][2])
- mouse_delta[i][2] = 0;
-
- if (mouse_frame_x[i] - mouse_x[i] > max)
- mouse_x[i] = mouse_frame_x[i] - max;
- if (mouse_frame_x[i] - mouse_x[i] < -max)
- mouse_x[i] = mouse_frame_x[i] + max;
-
- if (mouse_frame_y[i] - mouse_y[i] > max)
- mouse_y[i] = mouse_frame_y[i] - max;
- if (mouse_frame_y[i] - mouse_y[i] < -max)
- mouse_y[i] = mouse_frame_y[i] + max;
+ if (mouse_port[i]) {
+
+ v = getvelocity (i, 0, pct);
+ mxd += v;
+ mouse_x[i] += v;
+
+ v = getvelocity (i, 1, pct);
+ myd += v;
+ mouse_y[i] += v;
+
+ v = getvelocity (i, 2, pct);
+ if (v > 0)
+ record_key (0x7a << 1);
+ else if (v < 0)
+ record_key (0x7b << 1);
+ if (!mouse_deltanoreset[i][2])
+ mouse_delta[i][2] = 0;
+
+ if (mouse_frame_x[i] - mouse_x[i] > max)
+ mouse_x[i] = mouse_frame_x[i] - max;
+ if (mouse_frame_x[i] - mouse_x[i] < -max)
+ mouse_x[i] = mouse_frame_x[i] + max;
+
+ if (mouse_frame_y[i] - mouse_y[i] > max)
+ mouse_y[i] = mouse_frame_y[i] - max;
+ if (mouse_frame_y[i] - mouse_y[i] < -max)
+ mouse_y[i] = mouse_frame_y[i] + max;
+ }
if (!vsync) {
mouse_frame_x[i] = mouse_x[i];
}
-static uae_u16 getjoystate (int joy)
+static void joymousecounter (int joy)
{
int left = 1, right = 1, top = 1, bot = 1;
- uae_u16 v;
+ int b9, b8, b1, b0;
+ int cntx, cnty, ocntx, ocnty;
if (joydir[joy] & DIR_LEFT)
left = 0;
top = 0;
if (joydir[joy] & DIR_DOWN)
bot = 0;
+
+ b0 = (bot ^ right) ? 1 : 0;
+ b1 = (right ^ 1) ? 2 : 0;
+ b8 = (top ^ left) ? 1 : 0;
+ b9 = (left ^ 1) ? 2 : 0;
+
+ cntx = b0 | b1;
+ cnty = b8 | b9;
+ ocntx = mouse_x[joy] & 3;
+ ocnty = mouse_y[joy] & 3;
+
+ if (cntx == 3 && ocntx == 0)
+ mouse_x[joy] -= 4;
+ else if (cntx == 0 && ocntx == 3)
+ mouse_x[joy] += 4;
+ mouse_x[joy] = (mouse_x[joy] & 0xfc) | cntx;
+
+ if (cnty == 3 && ocnty == 0)
+ mouse_y[joy] -= 4;
+ else if (cnty == 0 && ocnty == 3)
+ mouse_y[joy] += 4;
+ mouse_y[joy] = (mouse_y[joy] & 0xfc) | cnty;
+}
+
+static uae_u16 getjoystate (int joy)
+{
+ uae_u16 v;
+
v = (uae_u8)mouse_x[joy] | (mouse_y[joy] << 8);
- if (!left || !right || !top || !bot || !mouse_port[joy]) {
- int b9, b8, b1, b0;
- mouse_x[joy] &= ~3;
- mouse_y[joy] &= ~3;
- b0 = bot ^ right;
- b1 = right ^ 1;
- b8 = top ^ left;
- b9 = left ^ 1;
- v &= ~0x0303;
- v |= (b0 << 0) | (b1 << 1) | (b8 << 8) | (b9 << 9);
- }
#ifdef DONGLE_DEBUG
if (notinrom ())
write_log (L"JOY%dDAT %04X %s\n", joy, v, debuginfo (0));
if (code == 0)
goto end;
- if (needcputrace (code) && can_cpu_tracer () == true && is_cpu_tracer () == false && !input_play && !input_record) {
+ if (needcputrace (code) && can_cpu_tracer () == true && is_cpu_tracer () == false && !input_play && !input_record && !debugging) {
if (set_cpu_tracer (true)) {
tracer_enable = 1;
return; // wait for next frame
joydir[joy] |= DIR_UP;
if (bot)
joydir[joy] |= DIR_DOWN;
+ if (joy == 0 || joy == 1)
+ joymousecounter (joy);
+
gui_gameport_axis_change (joy, DIR_LEFT_BIT, left, 0);
gui_gameport_axis_change (joy, DIR_RIGHT_BIT, right, 0);
gui_gameport_axis_change (joy, DIR_UP_BIT, top, 0);
while (regs.spcflags & SPCFLAG_STOP) {
if (cpu_tracer > 0) {
cputrace.stopped = regs.stopped;
+ cputrace.intmask = regs.intmask;
+ cputrace.sr = regs.sr;
cputrace.state = 1;
cputrace.pc = m68k_getpc ();
cputrace.memoryoffset = 0;
currprefs.m68k_speed = changed_prefs.m68k_speed = 0;
if (flags & 4)
currprefs.m68k_speed = changed_prefs.m68k_speed = -1;
+ if (flags & 16)
+ currprefs.m68k_speed = changed_prefs.m68k_speed = (flags >> 24) * CYCLE_UNIT;
currprefs.cpu060_revision = changed_prefs.cpu060_revision = restore_u8 ();
currprefs.fpu_revision = changed_prefs.fpu_revision = restore_u8 ();
flags |= currprefs.cpu_compatible ? 2 : 0;
flags |= currprefs.m68k_speed < 0 ? 4 : 0;
flags |= currprefs.cachesize > 0 ? 8 : 0;
+ flags |= currprefs.m68k_speed > 0 ? 16 : 0;
+ if (currprefs.m68k_speed > 0)
+ flags |= (currprefs.m68k_speed / CYCLE_UNIT) << 24;
save_u32 (flags);
save_u32 (currprefs.cpu_frequency);
save_u32 (currprefs.cpu_clock_multiplier);
VALUE "FileDescription", "WinUAE"\r
VALUE "FileVersion", "2.3.1.0"\r
VALUE "InternalName", "WinUAE"\r
- VALUE "LegalCopyright", "© 1996-2010 under the GNU Public License (GPL)"\r
+ VALUE "LegalCopyright", "© 1996-2011 under the GNU Public License (GPL)"\r
VALUE "OriginalFilename", "WinUAE.exe"\r
VALUE "ProductName", "WinUAE"\r
VALUE "ProductVersion", "2.3.1.0"\r
static int serial_period_hsyncs, serial_period_hsync_counter;
static int ninebit;
int serdev;
-int seriallog = 0;
+int seriallog = 0, log_sercon = 0;
int serial_enet;
void serial_open (void);
serial_period_hsyncs = (((serper & 0x7fff) + 1) * 10) / maxhpos;
if (serial_period_hsyncs <= 0)
serial_period_hsyncs = 1;
+
#if SERIALLOGGING > 0
serial_period_hsyncs = 1;
seriallog = 1;
#endif
+ if (log_sercon) {
+ serial_period_hsyncs = 1;
+ seriallog = 1;
+ }
+
serial_period_hsync_counter = 0;
write_log (L"SERIAL: period=%d, baud=%d, hsyncs=%d, bits=%d, PC=%x\n", w, baud, serial_period_hsyncs, ninebit ? 9 : 8, M68K_GETPC);
SystemInfo.wProcessorArchitecture, SystemInfo.wProcessorLevel, SystemInfo.wProcessorRevision,
SystemInfo.dwNumberOfProcessors);
write_log (L"\n(c) 1995-2001 Bernd Schmidt - Core UAE concept and implementation."
- L"\n(c) 1998-2010 Toni Wilen - Win32 port, core code updates."
+ L"\n(c) 1998-2011 Toni Wilen - Win32 port, core code updates."
L"\n(c) 1996-2001 Brian King - Win32 port, Picasso96 RTG, and GUI."
L"\n(c) 1996-1999 Mathias Ortmann - Win32 port and bsdsocket support."
L"\n(c) 2000-2001 Bernd Meyer - JIT engine."
extern void test (void);
extern int screenshotmode, postscript_print_debugging, sound_debug, log_uaeserial, clipboard_debug;
extern int force_direct_catweasel, sound_mode_skip, maxmem;
-extern int pngprint;
+extern int pngprint, log_sercon;
extern DWORD_PTR cpu_affinity, cpu_paffinity;
static DWORD_PTR original_affinity = -1;
log_net = 1;
return 1;
}
+ if (!_tcscmp (arg, L"serlog")) {
+ log_sercon = 1;
+ return 1;
+ }
if (!_tcscmp (arg, L"a2065log")) {
log_a2065 = 1;
return 1;
#define WINUAEPUBLICBETA 1
#define LANG_DLL 1
-#define WINUAEBETA L"8"
-#define WINUAEDATE MAKEBD(2010, 12, 18)
+#define WINUAEBETA L"9"
+#define WINUAEDATE MAKEBD(2011, 1, 4)
#define WINUAEEXTRA L""
#define WINUAEREV L""
break;
}
if (cnt == 0)
- scan_roms_3 (fkey, paths, workprefs.path_rom);
+ scan_roms_3 (fkey, paths, workprefs.path_rom.path[0]);
for (i = 0; i < MAX_ROM_PATHS; i++)
xfree (paths[i]);
static void deletesaveimage (HWND hDlg, int num)
{
TCHAR *p;
- if (!iscd (num))
+ if (iscd (num))
return;
p = DISK_get_saveimagepath (workprefs.floppyslots[num].df);
if (zfile_exists (p)) {
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng.lib;lglcd.lib;wtsapi32.lib;wntab32x.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng.lib;lglcd.lib;wtsapi32.lib;wntab32x.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;avrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_42.dll;openal32.dll;wintab32.dll;portaudio_x64.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_42.dll;openal32.dll;wintab32.dll;portaudio_x64.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;avrt.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(Platform)\$(Configuration)\winuae.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng.lib;lglcd.lib;wtsapi32.lib;wntab32x.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng.lib;lglcd.lib;wtsapi32.lib;wntab32x.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;avrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_43.dll;openal32.dll;wintab32.dll;portaudio_x64.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_43.dll;openal32.dll;wintab32.dll;portaudio_x64.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;avrt.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(Platform)\$(Configuration)\winuae.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng.lib;lglcd.lib;wtsapi32.lib;wntab32x.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng.lib;lglcd.lib;wtsapi32.lib;wntab32x.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;avrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_43.dll;openal32.dll;wintab32.dll;portaudio_x64.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_43.dll;openal32.dll;wintab32.dll;portaudio_x64.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;avrt.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(Platform)\$(Configuration)\winuae.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
+Beta 9:
+
+- emulate mouse counter behavior 100% when joystick is connected (increase/decrease counter by 4 when
+ two lowest bits change from 0 to 3 or vice versa) Most likely no program cares.. Mouse cursor
+ movement is now exactly same as on real Amigas when moving joystick in mouse port..
+- "Delete Saveimage" button didn't work, broke when CD image GUI was added
+- save CPU/chipset ratio to statefile
+- attempt to load disk image and harddisk paths in statefiles from current dir, current adf/hardfile paths
+ and directory where statefile was loaded if original path or file is missing
+- harddrive statesaves didn't save correctly if more than 1 harddrive was configured
+- b3 "stop linedraw if blitter register modified while active" hack didn't always clear blitter active bit
+- stopped CPU in CE mode was saved incorrectly to statefile (introduced in some earlier beta)
+
Beta 8:
- mixed mode CD first audio track didn't always play (uaescsi.device only)
break;
case 2:
if (p) {
- _tcscpy (tmp, p->path_rom);
+ _tcscpy (tmp, p->path_rom.path[0]);
_tcscat (tmp, L"rom.key");
}
break;
*dstp = dst;
xfree (s2);
}
+void save_path_func (uae_u8 **dstp, const TCHAR *from, int type)
+{
+ save_string_func (dstp, from);
+}
uae_u32 restore_u32_func (uae_u8 **dstp)
{
xfree (to);
return s;
}
+TCHAR *restore_path_func (uae_u8 **dstp, int type)
+{
+ TCHAR *newpath;
+ TCHAR *s = restore_string_func (dstp);
+ TCHAR *out = NULL;
+ TCHAR tmp[MAX_DPATH], tmp2[MAX_DPATH];
+
+ if (s[0] == 0)
+ return s;
+ if (zfile_exists (s))
+ return s;
+ if (type == SAVESTATE_PATH_HD)
+ return s;
+ getfilepart (tmp, sizeof tmp / sizeof (TCHAR), s);
+ if (zfile_exists (tmp)) {
+ xfree (s);
+ return my_strdup (tmp);
+ }
+ for (int i = 0; i < MAX_PATHS; i++) {
+ newpath = NULL;
+ if (type == SAVESTATE_PATH_FLOPPY)
+ newpath = currprefs.path_floppy.path[i];
+ else if (type == SAVESTATE_PATH_VDIR || type == SAVESTATE_PATH_HDF)
+ newpath = currprefs.path_hardfile.path[i];
+ else if (type == SAVESTATE_PATH_CD)
+ newpath = currprefs.path_cd.path[i];
+ if (newpath == NULL || newpath[0] == 0)
+ break;
+ _tcscpy (tmp2, newpath);
+ _tcscat (tmp2, tmp);
+ fullpath (tmp2, sizeof tmp2 / sizeof (TCHAR));
+ if (zfile_exists (tmp2)) {
+ xfree (s);
+ return my_strdup (tmp2);
+ }
+ }
+ getpathpart(tmp2, sizeof tmp2 / sizeof (TCHAR), savestate_fname);
+ _tcscat (tmp2, tmp);
+ if (zfile_exists (tmp2)) {
+ xfree (s);
+ return my_strdup (tmp2);
+ }
+ return s;
+}
/* read and write IFF-style hunks */