From: Toni Wilen Date: Mon, 5 Jan 2015 14:56:53 +0000 (+0200) Subject: 3010b2 X-Git-Tag: 3100~139 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=278a3b603a3275f5e5be1fb7b97149816cc18bc2;p=francis%2Fwinuae.git 3010b2 --- diff --git a/amax.cpp b/amax.cpp index 0b156474..bec12a74 100644 --- a/amax.cpp +++ b/amax.cpp @@ -9,8 +9,8 @@ #include "memory.h" #include "newcpu.h" -static int data_scramble[8] = { 3, 2, 4, 5, 7, 6, 0, 1 }; -static int addr_scramble[16] = { 14, 12, 2, 10, 15, 13, 1, 0, 7, 6, 5, 4, 8, 9, 11, 3 }; +static const int data_scramble[8] = { 3, 2, 4, 5, 7, 6, 0, 1 }; +static const int addr_scramble[16] = { 14, 12, 2, 10, 15, 13, 1, 0, 7, 6, 5, 4, 8, 9, 11, 3 }; static int romptr; static uae_u8 *rom; @@ -18,6 +18,7 @@ static int amax_rom_size, rom_oddeven; static uae_u8 data; static uae_u8 bfd100, bfe001; static uae_u8 dselect; +static bool amax_is_active; #define AMAX_LOG 0 @@ -54,6 +55,7 @@ static void amax_check (void) if (romptr && AMAX_LOG > 0) write_log (_T("AMAX: counter reset PC=%08X\n"), M68K_GETPC); romptr = 0; + amax_is_active = false; } } @@ -102,24 +104,30 @@ void amax_bfe001_write (uae_u8 pra, uae_u8 dra) amax_check (); } -void amax_disk_select (uae_u8 v, uae_u8 ov) +void amax_disk_select (uae_u8 v, uae_u8 ov, int num) { bfd100 = v; - if (!(bfd100 & dselect) && (ov & dselect)) + dselect = 1 << (num + 3); + if (!(bfd100 & dselect) && (ov & dselect)) { + amax_is_active = true; load_byte (); + } amax_check (); } -uae_u8 amax_disk_status (void) +uae_u8 amax_disk_status (uae_u8 st) { - uae_u8 st = 0x3c; - if (!(data & 0x80)) st &= ~0x20; return st; } +bool amax_active(void) +{ + return amax_is_active; +} + void amax_reset (void) { romptr = 0; @@ -134,24 +142,27 @@ void amax_reset (void) void amax_init (void) { - struct zfile *z; + struct zfile *z = NULL; if (!currprefs.amaxromfile[0]) return; amax_reset (); - z = zfile_fopen (currprefs.amaxromfile, _T("rb"), ZFD_NORMAL); - if (!z) { + if (_tcscmp (currprefs.amaxromfile, _T(":NOROM"))) + z = zfile_fopen (currprefs.amaxromfile, _T("rb"), ZFD_NORMAL); + if (z) { + zfile_fseek (z, 0, SEEK_END); + amax_rom_size = zfile_ftell (z); + zfile_fseek (z, 0, SEEK_SET); + } else { write_log (_T("AMAX: failed to load rom '%s'\n"), currprefs.amaxromfile); - return; + amax_rom_size = 262144; + } + rom = xcalloc (uae_u8, amax_rom_size); + if (z) { + zfile_fread (rom, amax_rom_size, 1, z); + zfile_fclose (z); } - zfile_fseek (z, 0, SEEK_END); - amax_rom_size = zfile_ftell (z); - zfile_fseek (z, 0, SEEK_SET); - rom = xmalloc (uae_u8, amax_rom_size); - zfile_fread (rom, amax_rom_size, 1, z); - zfile_fclose (z); write_log (_T("AMAX: '%s' loaded, %d bytes\n"), currprefs.amaxromfile, amax_rom_size); - dselect = 0x20; } diff --git a/blkdev.cpp b/blkdev.cpp index d5d3315a..91263908 100644 --- a/blkdev.cpp +++ b/blkdev.cpp @@ -21,6 +21,7 @@ #include "zfile.h" #include "scsi.h" #include "statusline.h" +#include "fsdb.h" #ifdef RETROPLATFORM #include "rp.h" #endif @@ -407,12 +408,14 @@ fallback: static void cd_statusline_label(int unitnum) { - if (currprefs.cdslots[unitnum].name[0]) { + TCHAR *p = currprefs.cdslots[unitnum].name; + if (p[0]) { struct device_info di; + const TCHAR *fname = my_getfilepart(p); if (sys_command_info(unitnum, &di, 0) && di.volume_id[0]) - statusline_add_message(_T("CD%d: [%s] %s"), unitnum, di.volume_id, currprefs.cdslots[unitnum].name); + statusline_add_message(_T("CD%d: [%s] %s"), unitnum, di.volume_id, fname); else - statusline_add_message(_T("CD%d: %s"), unitnum, currprefs.cdslots[unitnum].name); + statusline_add_message(_T("CD%d: %s"), unitnum, fname); } } diff --git a/cdtv.cpp b/cdtv.cpp index bdd211ae..02ba686d 100644 --- a/cdtv.cpp +++ b/cdtv.cpp @@ -1696,7 +1696,7 @@ addrbank *cdtv_init (void) open_unit (); gui_flicker_led (LED_CD, 0, -1); if (currprefs.cs_cdtvscsi) { - init_scsi (&wd_cdtv); + init_wd_scsi (&wd_cdtv); } return &dmac_bank; } diff --git a/cfgfile.cpp b/cfgfile.cpp index 249d5974..5531ea05 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -1136,6 +1136,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) if (p->sound_volume_cd >= 0) cfgfile_write (f, _T("sound_volume_cd"), _T("%d"), p->sound_volume_cd); cfgfile_write_bool (f, _T("sound_auto"), p->sound_auto); + cfgfile_write_bool (f, _T("sound_cdaudio"), p->sound_cdaudio); cfgfile_write_bool (f, _T("sound_stereo_swap_paula"), p->sound_stereo_swap_paula); cfgfile_write_bool (f, _T("sound_stereo_swap_ahi"), p->sound_stereo_swap_ahi); cfgfile_dwrite (f, _T("sampler_frequency"), _T("%d"), p->sampler_freq); @@ -2171,6 +2172,7 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) || cfgfile_yesno (option, value, _T("floppy3wp"), &p->floppyslots[3].forcedwriteprotect) || cfgfile_yesno (option, value, _T("sampler_stereo"), &p->sampler_stereo) || cfgfile_yesno (option, value, _T("sound_auto"), &p->sound_auto) + || cfgfile_yesno (option, value, _T("sound_cdaudio"), &p->sound_cdaudio) || cfgfile_yesno (option, value, _T("sound_stereo_swap_paula"), &p->sound_stereo_swap_paula) || cfgfile_yesno (option, value, _T("sound_stereo_swap_ahi"), &p->sound_stereo_swap_ahi) || cfgfile_yesno (option, value, _T("avoid_cmov"), &p->avoid_cmov) @@ -5398,6 +5400,7 @@ void default_prefs (struct uae_prefs *p, int type) p->sound_filter = FILTER_SOUND_EMUL; p->sound_filter_type = 0; p->sound_auto = 1; + p->sound_cdaudio = false; p->sampler_stereo = false; p->sampler_buffer = 0; p->sampler_freq = 0; diff --git a/cia.cpp b/cia.cpp index 80332739..052d75cc 100644 --- a/cia.cpp +++ b/cia.cpp @@ -587,12 +587,17 @@ static void do_tod_hack (int dotod) return; } - if (currprefs.cs_ciaatod == 0) + if (currprefs.cs_ciaatod == 0) { rate = (int)(vblank_hz + 0.5); - else if (currprefs.cs_ciaatod == 1) + if (rate >= 59 && rate <= 61) + rate = 60; + if (rate >= 49 && rate <= 51) + rate = 50; + } else if (currprefs.cs_ciaatod == 1) { rate = 50; - else + } else { rate = 60; + } if (rate <= 0) return; if (rate != oldrate || ciaatod != tod_hack_tod_last) { diff --git a/disk.cpp b/disk.cpp index 2aef86d0..dca03a84 100644 --- a/disk.cpp +++ b/disk.cpp @@ -122,9 +122,10 @@ static unsigned long dsksync_cycles; int disk_hpos; static int disk_jitter; static int indexdecay; - static uae_u8 prev_data; static int prev_step; +static bool initial_disk_statusline; +static struct diskinfo disk_info_data = { 0 }; typedef enum { TRACK_AMIGADOS, TRACK_RAW, TRACK_RAW1, TRACK_PCDOS, TRACK_DISKSPARE, TRACK_NONE } image_tracktype; typedef struct { @@ -1048,15 +1049,28 @@ static bool isrecognizedext (const TCHAR *name) return false; } +static void update_disk_statusline(int num) +{ + drive *drv = &floppy[num]; + if (!drv->diskfile) + return; + TCHAR *fname = zfile_getname(drv->diskfile); + if (disk_info_data.diskname[0]) + statusline_add_message(_T("DF%d: [%s] %s"), num, disk_info_data.diskname, my_getfilepart(fname)); + else + statusline_add_message(_T("DF%d: %s"), num, my_getfilepart(fname)); +} + static int drive_insert (drive * drv, struct uae_prefs *p, int dnum, const TCHAR *fname, bool fake, bool forcedwriteprotect) { - struct diskinfo di = { 0 }; uae_u8 buffer[2 + 2 + 4 + 4]; trackid *tid; int num_tracks, size; int canauto; drive_image_free (drv); + if (!fake) + DISK_examine_image(p, dnum, &disk_info_data); DISK_validate_filename (p, fname, 1, &drv->wrprot, &drv->crc32, &drv->diskfile); drv->forcedwrprot = forcedwriteprotect; if (drv->forcedwrprot) @@ -1067,10 +1081,10 @@ static int drive_insert (drive * drv, struct uae_prefs *p, int dnum, const TCHAR drv->tracktiming[0] = 0; drv->useturbo = 0; drv->indexoffset = 0; - if (!fake) + if (!fake) { drv->dskeject = false; - - gui_disk_image_change (dnum, fname, drv->wrprot); + gui_disk_image_change (dnum, fname, drv->wrprot); + } if (!drv->motoroff) { drv->dskready_up_time = DSKREADY_UP_TIME * 312 + (uaerand() & 511); @@ -1334,11 +1348,8 @@ static int drive_insert (drive * drv, struct uae_prefs *p, int dnum, const TCHAR driveclick_insert (drv - floppy, 0); #endif update_drive_gui (drv - floppy, false); + update_disk_statusline(drv - floppy); } - if (di.diskname[0]) - statusline_add_message(_T("DF%d: [%s] %s"), drv - floppy, di.diskname, my_getfilepart(fname)); - else - statusline_add_message(_T("DF%d: %s"), drv - floppy, my_getfilepart(fname)); return 1; } @@ -3545,6 +3556,12 @@ void DISK_hsync (void) return; } DISK_update (maxhpos); + + // show insert disk in df0: when booting + if (initial_disk_statusline) { + initial_disk_statusline = false; + update_disk_statusline(0); + } } void DISK_update (int tohpos) @@ -3931,8 +3948,7 @@ void DSKPTL (uae_u16 v) void DISK_free (void) { - int dr; - for (dr = 0; dr < MAX_FLOPPY_DRIVES; dr++) { + for (int dr = 0; dr < MAX_FLOPPY_DRIVES; dr++) { drive *drv = &floppy[dr]; drive_image_free (drv); } @@ -3940,9 +3956,7 @@ void DISK_free (void) void DISK_init (void) { - int dr; - - for (dr = 0; dr < MAX_FLOPPY_DRIVES; dr++) { + for (int dr = MAX_FLOPPY_DRIVES - 1; dr >= 0; dr--) { drive *drv = &floppy[dr]; /* reset all drive types to 3.5 DD */ drive_settype_id (drv); @@ -3956,8 +3970,6 @@ void DISK_init (void) void DISK_reset (void) { - int i; - if (savestate_state) return; @@ -3965,8 +3977,11 @@ void DISK_reset (void) disk_hpos = 0; dskdmaen = 0; disabled = 0; - for (i = 0; i < MAX_FLOPPY_DRIVES; i++) - reset_drive (i); + memset(&disk_info_data, 0, sizeof disk_info_data); + for (int dr = MAX_FLOPPY_DRIVES - 1; dr >= 0; dr--) { + reset_drive (dr); + } + initial_disk_statusline = true; setamax (); } diff --git a/filesys.cpp b/filesys.cpp index 9d8e7c84..e998da40 100644 --- a/filesys.cpp +++ b/filesys.cpp @@ -4555,12 +4555,10 @@ static void inject_icons_to_directory(Unit *unit, a_inode *base) if (aino->dir) { vfso = &vfso_icon_drawer; } else { - struct mystat statbuf; - get_statinfo(unit, aino, &statbuf); - if (statbuf.mode & A_FIBF_EXECUTE) - vfso = &vfso_icon_tool; - else + if (aino->amigaos_mode & A_FIBF_EXECUTE) vfso = &vfso_icon_project; + else + vfso = &vfso_icon_tool; } lookup_child_aino_for_exnext(unit, base, tmp, &err, 0, vfso); } diff --git a/hardfile.cpp b/hardfile.cpp index ea4ecc0a..cb304e25 100644 --- a/hardfile.cpp +++ b/hardfile.cpp @@ -1196,6 +1196,27 @@ static int nodisk (struct hardfiledata *hfd) return 0; } +static void setdrivestring(const TCHAR *s, uae_u8 *d, int start, int length) +{ + int i = 0; + uae_char *ss = ua(s); + while (i < length && ss[i]) { + d[start + i] = ss[i]; + i++; + } + while (i > 0) { + uae_char c = d[start + i - 1]; + if (c != '_') + break; + i--; + } + while (i < length) { + d[start + i] = 32; + i++; + } + xfree (ss); +} + int scsi_hd_emulate (struct hardfiledata *hfd, struct hd_hardfiledata *hdhfd, uae_u8 *cmdbuf, int scsi_cmd_len, uae_u8 *scsi_data, int *data_len, uae_u8 *r, int *reply_len, uae_u8 *s, int *sense_len) { @@ -1203,8 +1224,7 @@ int scsi_hd_emulate (struct hardfiledata *hfd, struct hd_hardfiledata *hdhfd, ua int lr = 0, ls = 0; int scsi_len = -1; int status = 0; - int i, lun; - char *ss; + int lun; if (log_scsiemu) { write_log (_T("SCSIEMU HD %d: %02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X CMDLEN=%d DATA=%p\n"), hfd->unitnum, @@ -1286,39 +1306,9 @@ int scsi_hd_emulate (struct hardfiledata *hfd, struct hd_hardfiledata *hdhfd, ua r[2] = hdhfd->ansi_version; r[3] = hdhfd->ansi_version >= 2 ? 2 : 0; } - ss = ua (hfd->vendor_id); - i = 0; /* vendor id */ - while (i < 8 && ss[i]) { - r[8 + i] = ss[i]; - i++; - } - while (i < 8) { - r[8 + i] = 32; - i++; - } - xfree (ss); - ss = ua (hfd->product_id); - i = 0; /* product id */ - while (i < 16 && ss[i]) { - r[16 + i] = ss[i]; - i++; - } - while (i < 16) { - r[16 + i] = 32; - i++; - } - xfree (ss); - ss = ua (hfd->product_rev); - i = 0; /* product revision */ - while (i < 4 && ss[i]) { - r[32 + i] = ss[i]; - i++; - } - while (i < 4) { - r[32 + i] = 32; - i++; - } - xfree (ss); + setdrivestring(hfd->vendor_id, r, 8, 8); + setdrivestring(hfd->product_id, r, 16, 16); + setdrivestring(hfd->product_rev, r, 32, 4); } break; case 0x1a: /* MODE SENSE(6) */ @@ -1571,6 +1561,9 @@ miscompare: if (log_scsiemu && ls) { write_log (_T("-> SENSE STATUS: KEY=%d ASC=%02X ASCQ=%02X\n"), s[2], s[12], s[13]); + for (int i = 0; i < ls; i++) + write_log (_T("%02X."), s[i]); + write_log (_T("\n")); } if (cmdbuf[0] && log_scsiemu) @@ -1578,6 +1571,14 @@ miscompare: *data_len = scsi_len; *reply_len = lr; + if (lr > 0 && lr < 512) { + if (log_scsiemu) { + write_log (_T("REPLY: ")); + for (int i = 0; i < lr && i < 40; i++) + write_log (_T("%02X."), r[i]); + write_log (_T("\n")); + } + } *sense_len = ls; if (ls > 0) { memset (hfd->scsi_sense, 0, MAX_SCSI_SENSE); diff --git a/include/amax.h b/include/amax.h index 311c3634..eec6ea8c 100644 --- a/include/amax.h +++ b/include/amax.h @@ -1,7 +1,8 @@ void amax_diskwrite (uae_u16 w); void amax_bfe001_write (uae_u8 pra, uae_u8 dra); -uae_u8 amax_disk_status (void); -void amax_disk_select (uae_u8 v, uae_u8 ov); +uae_u8 amax_disk_status (uae_u8); +void amax_disk_select (uae_u8 v, uae_u8 ov, int); void amax_reset (void); void amax_init (void); +bool amax_active(void); diff --git a/include/blkdev.h b/include/blkdev.h index 9697d692..1e416afd 100644 --- a/include/blkdev.h +++ b/include/blkdev.h @@ -84,6 +84,8 @@ struct device_info { TCHAR revision[6]; const TCHAR *backend; struct cd_toc_head toc; + TCHAR system_id[33]; + TCHAR volume_id[33]; }; struct amigascsi diff --git a/include/options.h b/include/options.h index 5fd1ce5b..95c87a5b 100644 --- a/include/options.h +++ b/include/options.h @@ -334,6 +334,7 @@ struct uae_prefs { bool sound_stereo_swap_paula; bool sound_stereo_swap_ahi; bool sound_auto; + bool sound_cdaudio; int sampler_freq; int sampler_buffer; diff --git a/include/rommgr.h b/include/rommgr.h index 5551b369..284a7f4c 100644 --- a/include/rommgr.h +++ b/include/rommgr.h @@ -30,6 +30,7 @@ extern int decode_cloanto_rom_do (uae_u8 *mem, int size, int real_size); #define ROMTYPE_FASTLANE 0x00100004 #define ROMTYPE_OKTAGON 0x00100005 #define ROMTYPE_GVP 0x00100006 +#define ROMTYPE_AMAX 0x00100007 #define ROMTYPE_QUAD 0x01000000 #define ROMTYPE_EVEN 0x02000000 diff --git a/include/uae.h b/include/uae.h index fa974a03..bd84f9d5 100644 --- a/include/uae.h +++ b/include/uae.h @@ -64,6 +64,7 @@ struct bstring { }; extern TCHAR *colormodes[]; +extern int saveimageoriginalpath; extern void fetch_saveimagepath (TCHAR*, int, int); extern void fetch_configurationpath (TCHAR *out, int size); extern void fetch_luapath (TCHAR *out, int size); diff --git a/od-win32/direct3d.cpp b/od-win32/direct3d.cpp index 16807458..03f0af76 100644 --- a/od-win32/direct3d.cpp +++ b/od-win32/direct3d.cpp @@ -3220,12 +3220,12 @@ uae_u8 *D3D_locktexture (int *pitch, int *height, bool fullupdate) write_log (_T("%s: LockRect failed: %s\n"), D3DHEAD, D3D_ErrorString (hr)); return NULL; } + locked = 1; if (lock.pBits == NULL || lock.Pitch == 0) { write_log (_T("%s: LockRect returned NULL texture\n"), D3DHEAD); D3D_unlocktexture (); return NULL; } - locked = 1; fulllocked = fullupdate; *pitch = lock.Pitch; if (height) @@ -3422,10 +3422,12 @@ HDC D3D_getDC (HDC hdc) return hdc; write_log (_T("%s: GetDC() failed: %s\n"), D3DHEAD, D3D_ErrorString (hr)); } - if (hdc) - bb->ReleaseDC (hdc); - bb->Release (); - bb = NULL; + if (bb) { + if (hdc) + bb->ReleaseDC (hdc); + bb->Release (); + bb = NULL; + } return 0; } diff --git a/od-win32/resources/resource.h b/od-win32/resources/resource.h index 54586601..ffcb4804 100644 --- a/od-win32/resources/resource.h +++ b/od-win32/resources/resource.h @@ -1018,6 +1018,7 @@ #define IDC_FILTERKEEPASPECT 1709 #define IDC_CS_RTC 1710 #define IDC_FILTERKEEPAUTOSCALEASPECT 1710 +#define IDC_SOUND_CDPAULAMIX 1710 #define IDC_CS_CIAA_TOD1 1711 #define IDC_CS_CIAA_TOD2 1712 #define IDC_CS_EXT 1712 @@ -1150,6 +1151,7 @@ #define IDC_RTG_VBLANKRATE 1793 #define IDC_DF0WPTEXTQ 1793 #define IDC_WINDOWEDMODE 1793 +#define IDC_PATHS_SAVEIMAGEORIGINALPATH 1793 #define IDC_DF1WPTEXTQ 1794 #define IDC_RTG_Z2Z3 1794 #define IDC_RTG_BUFFERCNT 1795 diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index c28174b6..af0f6671 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -103,7 +103,7 @@ BEGIN EDITTEXT IDC_RTCFILE,12,191,361,12,ES_AUTOHSCROLL PUSHBUTTON "...",IDC_RTCCHOOSER,376,189,10,15 COMBOBOX IDC_SCSIROMSELECT,12,223,171,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - LTEXT "SCSI ROM file:",IDC_STATIC,12,207,170,15,SS_CENTERIMAGE + LTEXT "SCSI/Boot ROM file:",IDC_STATIC,12,207,170,15,SS_CENTERIMAGE COMBOBOX IDC_SCSIROMFILE,202,223,171,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "...",IDC_SCSIROMCHOOSER,376,221,10,15 LTEXT "Accelerator board ROM file:",IDC_STATIC,12,240,170,15,SS_CENTERIMAGE @@ -366,10 +366,10 @@ FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN COMBOBOX IDC_SOUNDCARDLIST,1,1,393,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP GROUPBOX "Sound Emulation",IDC_SOUNDSETTINGS,1,19,132,112 - CONTROL "Disabled",IDC_SOUND0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,46,108,10 - CONTROL "Disabled, but emulated",IDC_SOUND1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,64,107,10 - CONTROL "Enabled",IDC_SOUND2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,82,108,10 - CONTROL "Automatic switching",IDC_SOUND_AUTO,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,13,100,108,10 + CONTROL "Disabled",IDC_SOUND0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,35,108,10 + CONTROL "Disabled, but emulated",IDC_SOUND1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,53,107,10 + CONTROL "Enabled",IDC_SOUND2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,71,108,10 + CONTROL "Automatic switching",IDC_SOUND_AUTO,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,13,92,108,10 GROUPBOX "Master Volume",IDC_STATIC,139,19,255,69 RTEXT "Paula/AHI",IDC_STATIC,152,38,51,10,SS_CENTERIMAGE CONTROL "",IDC_SOUNDVOLUME,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,207,32,105,20 @@ -405,6 +405,7 @@ BEGIN CONTROL "WASAPI",IDC_SOUND_WASAPI,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,292,240,98,10 CONTROL "OpenAL",IDC_SOUND_OPENAL,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,292,253,98,10 CONTROL "PortAudio",IDC_SOUND_PORTAUDIO,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,292,266,98,10 + CONTROL "Include CD and FMV audio",IDC_SOUND_CDPAULAMIX,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,13,108,108,10 END IDD_LOADSAVE DIALOGEX 0, 0, 396, 318 @@ -949,7 +950,7 @@ BEGIN LTEXT "Videos:",IDC_PATHS_AVIOUTPUTL,3,120,260,8,SS_CENTERIMAGE EDITTEXT IDC_PATHS_AVIOUTPUT,3,131,377,15,ES_AUTOHSCROLL PUSHBUTTON "...",IDC_PATHS_AVIOUTPUTS,384,130,11,15 - LTEXT "Saveimages:",IDC_PATHS_SAVEIMAGEL,3,149,260,8,SS_CENTERIMAGE + LTEXT "Saveimages:",IDC_PATHS_SAVEIMAGEL,3,149,158,8,SS_CENTERIMAGE EDITTEXT IDC_PATHS_SAVEIMAGE,3,161,377,15,ES_AUTOHSCROLL PUSHBUTTON "...",IDC_PATHS_SAVEIMAGES,384,160,11,15 LTEXT "Rips:",IDC_PATHS_RIPSL,3,179,260,8,SS_CENTERIMAGE @@ -969,6 +970,8 @@ BEGIN GROUPBOX "Debug logging",IDC_STATIC,1,248,393,53 CONTROL "Log window",IDC_LOGENABLE2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,254,264,68,12 CONTROL "Portable mode",IDC_REGISTRYMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,303,231,82,11 + CONTROL "Use original image's path",IDC_PATHS_SAVEIMAGEORIGINALPATH, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,177,148,197,11 END IDD_QUICKSTART DIALOGEX 0, 0, 396, 262 diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index e4d7d99a..4087747e 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -196,6 +196,7 @@ TCHAR logpath[MAX_DPATH]; bool winuaelog_temporary_enable; int af_path_2005; int quickstart = 1, configurationcache = 1, relativepaths = 0; +int saveimageoriginalpath = 0; static TCHAR *inipath = NULL; @@ -4487,6 +4488,11 @@ static void WIN32_HandleRegistryStuff (void) regqueryint (NULL, _T("ConfigurationCache"), &configurationcache); else regsetint (NULL, _T("ConfigurationCache"), configurationcache); + if (regexists (NULL, _T("SaveImageOriginalPath"))) + regqueryint (NULL, _T("SaveImageOriginalPath"), &saveimageoriginalpath); + else + regsetint (NULL, _T("SaveImageOriginalPath"), saveimageoriginalpath); + if (regexists (NULL, _T("RelativePaths"))) regqueryint (NULL, _T("RelativePaths"), &relativepaths); else diff --git a/od-win32/win32.h b/od-win32/win32.h index bbeafb50..cece66a5 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -20,12 +20,12 @@ #define LANG_DLL_FULL_VERSION_MATCH 1 #if WINUAEPUBLICBETA -#define WINUAEBETA _T("1") +#define WINUAEBETA _T("2") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2015, 1, 1) +#define WINUAEDATE MAKEBD(2015, 1, 5) //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") @@ -93,7 +93,7 @@ extern int os_admin, os_64bit, os_vista, os_win7, cpu_number; extern OSVERSIONINFO osVersion; extern int paraport_mask; extern int gui_active; -extern int quickstart, configurationcache, relativepaths; +extern int quickstart, configurationcache, saveimageoriginalpath, relativepaths; extern HKEY hWinUAEKey; extern int screen_is_picasso; diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 863a6c71..55ab7a6c 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -183,17 +183,19 @@ static void addaspectratios (HWND hDlg, int id) static int scsiromselected; struct scsiromselect { + const TCHAR *device; TCHAR *name; int mask; }; static struct scsiromselect scsiromdata[] = { - { workprefs.a2091rom.roms[0].romfile, ROMTYPE_A2091 | ROMTYPE_NONE }, - { workprefs.gvprom.roms[0].romfile, ROMTYPE_GVP }, - { workprefs.a4091rom.roms[0].romfile, ROMTYPE_A4091 }, - { workprefs.fastlanerom.roms[0].romfile, ROMTYPE_FASTLANE }, - { workprefs.oktagonrom.roms[0].romfile, ROMTYPE_OKTAGON }, - { workprefs.acceleratorextromfile, ROMTYPE_CPUBOARDEXT }, + { _T("A590/A2091"), workprefs.a2091rom.roms[0].romfile, ROMTYPE_A2091 | ROMTYPE_NONE }, + { _T("GVP Series II"), workprefs.gvprom.roms[0].romfile, ROMTYPE_GVP | ROMTYPE_NONE }, + { _T("A4091"), workprefs.a4091rom.roms[0].romfile, ROMTYPE_A4091 }, + { _T("Fastlane"), workprefs.fastlanerom.roms[0].romfile, ROMTYPE_FASTLANE }, + { _T("Oktagon 2008"), workprefs.oktagonrom.roms[0].romfile, ROMTYPE_OKTAGON }, + { _T("Blizzard SCSI Kit IV"), workprefs.acceleratorextromfile, ROMTYPE_CPUBOARDEXT }, + { _T("AMAX"), workprefs.amaxromfile, ROMTYPE_AMAX | ROMTYPE_NONE }, { NULL, 0 } }; @@ -5233,6 +5235,7 @@ static void resetregistry (void) regdelete (NULL, _T("QuickStartCompatibility")); regdelete (NULL, _T("QuickStartHostConfig")); regdelete (NULL, _T("ConfigurationCache")); + regdelete (NULL, _T("SaveImageOriginalPath")); regdelete (NULL, _T("RelativePaths")); regdelete (NULL, _T("DirectDraw_Secondary")); regdelete (NULL, _T("ShownsupportedModes")); @@ -5323,6 +5326,7 @@ static INT_PTR CALLBACK PathsDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM setac (hDlg, IDC_PATHS_AVIOUTPUT); setac (hDlg, IDC_PATHS_RIP); CheckDlgButton(hDlg, IDC_PATHS_CONFIGCACHE, configurationcache); + CheckDlgButton(hDlg, IDC_PATHS_SAVEIMAGEORIGINALPATH, saveimageoriginalpath); CheckDlgButton(hDlg, IDC_PATHS_RELATIVE, relativepaths); CheckDlgButton(hDlg, IDC_REGISTRYMODE, getregmode() != 0); ew(hDlg, IDC_REGISTRYMODE, FALSE); @@ -5551,6 +5555,10 @@ static INT_PTR CALLBACK PathsDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM configurationcache = ischecked (hDlg, IDC_PATHS_CONFIGCACHE) ? 1 : 0; regsetint (NULL, _T("ConfigurationCache"), configurationcache); break; + case IDC_PATHS_SAVEIMAGEORIGINALPATH: + saveimageoriginalpath = ischecked (hDlg, IDC_PATHS_SAVEIMAGEORIGINALPATH) ? 1 : 0; + regsetint (NULL, _T("SaveImageOriginalPath"), saveimageoriginalpath); + break; case IDC_PATHS_RELATIVE: relativepaths = ischecked (hDlg, IDC_PATHS_RELATIVE) ? 1 : 0; regsetint (NULL, _T("RelativePaths"), relativepaths); @@ -8490,12 +8498,8 @@ static void init_kickstart (HWND hDlg) ew(hDlg, IDC_CPUBOARDROMFILE, workprefs.cpuboard_type != 0); SendDlgItemMessage(hDlg, IDC_SCSIROMSELECT, CB_RESETCONTENT, 0, 0); - SendDlgItemMessage(hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)_T("A590/A2091")); - SendDlgItemMessage(hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)_T("GVP Series II")); - SendDlgItemMessage(hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)_T("A4091")); - SendDlgItemMessage(hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)_T("Fastlane")); - SendDlgItemMessage(hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)_T("Oktagon 2008")); - SendDlgItemMessage(hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)_T("Blizzard SCSI Kit IV")); + for (int i = 0; scsiromdata[i].device; i++) + SendDlgItemMessage(hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)scsiromdata[i].device); int found = -1; for (int i = 0; scsiromdata[i].name; i++) { @@ -9786,6 +9790,7 @@ static void values_to_sounddlg (HWND hDlg) CheckRadioButton (hDlg, IDC_SOUND0, IDC_SOUND2, which_button); CheckDlgButton (hDlg, IDC_SOUND_AUTO, workprefs.sound_auto); + CheckDlgButton (hDlg, IDC_SOUND_CDPAULAMIX, workprefs.sound_cdaudio); if (workprefs.sound_maxbsiz < SOUND_BUFFER_MULTIPLIER) workprefs.sound_maxbsiz = SOUND_BUFFER_MULTIPLIER; @@ -9868,6 +9873,7 @@ static void values_from_sounddlg (HWND hDlg) : ischecked (hDlg, IDC_SOUND1) ? 1 : 3); workprefs.sound_auto = ischecked (hDlg, IDC_SOUND_AUTO); + workprefs.sound_cdaudio = ischecked (hDlg, IDC_SOUND_CDPAULAMIX); idx = SendDlgItemMessage (hDlg, IDC_SOUNDSTEREO, CB_GETCURSEL, 0, 0); if (idx != CB_ERR) @@ -11659,9 +11665,11 @@ static void addfloppytype (HWND hDlg, int n) state = TRUE; if (f_type >= 0) SendDlgItemMessage (hDlg, f_type, CB_SETCURSEL, nn, 0); - if (f_si >= 0) - ShowWindow (GetDlgItem(hDlg, f_si), !showcd && zfile_exists (DISK_get_saveimagepath (text)) ? SW_SHOW : SW_HIDE); - + if (f_si >= 0) { + TCHAR *path = DISK_get_saveimagepath(text, -2); + ShowWindow (GetDlgItem(hDlg, f_si), !showcd && zfile_exists (path) ? SW_SHOW : SW_HIDE); + xfree(path); + } if (f_text >= 0) ew (hDlg, f_text, state); if (f_eject >= 0) @@ -11802,12 +11810,13 @@ static void deletesaveimage (HWND hDlg, int num) TCHAR *p; if (iscd (num)) return; - p = DISK_get_saveimagepath (workprefs.floppyslots[num].df); + p = DISK_get_saveimagepath(workprefs.floppyslots[num].df, -2); if (zfile_exists (p)) { DeleteFile (p); DISK_reinsert (num); addfloppytype (hDlg, num); } + xfree(p); } static void diskselect (HWND hDlg, WPARAM wParam, struct uae_prefs *p, int drv, TCHAR *defaultpath) diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index fe8a664d..4fc163bb 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,22 +1,34 @@ -1 -> 0 (-) : 0,1FE,1FE,1FE,.. -1 -> 1 (D) : 0,1FE,0,1FE,0,.. -1 -> 2 (C) : 0,1FE,70,1FE,70,.. (C-) -1 -> 9 (AD) : 0,1FE,0,74,0,74,.. (DA) -1 -> B (ACD) : 0,1FE,70,0,74,70,0,74,70,0,74,.. (CDA) -1 -> C (AB) : 0,1FE,72,74,70,72,74,70,72,.. (CBA) -1 -> D (ABD) : 0,1FE,72,74,70,72,74,70,72,.. (CBA) -1 -> E (ABC) : 0,1FE,70,70,70,70,.. (C) -1 -> F (ABCD): 0,1FE,70,70,74,70,70,70,74,70,70,70,74,.. (CCCA) - -Things that may happen in 2015: +Beta 2: -- Minium Windows version will be Windows 7. -- CPU must be SSE 2 capable. -- DirectDraw support will be removed. -- and more +- Paula audio filter still filtered Toccata audio. Note that stereo separation is after Toccata audio + mixing. +- Added "ROM disabled" to GVP SCSI ROM selection. +- GVP SCSI ROM space word reads accessed invalid memory. +- Added Paths panel option to store "saveimages" in same directory as original image file, instead of always + saving in saveimages-directory, extension changed to .save_adf to prevent it being visible in directory + listings with normal disk image filter type active. +- 68030 MMU on the fly off->on switch crashed. (Not that on the fly MMU switching is really supported..) +- WD33C93 Select without ATN command didn't fully skip message out phase. (AMAX GVP SCSI driver) +- Reading WD33C93 SCSI message in with Transfer Info command is a special case, after it finishes, it does + not advance to next state automatically, it must wait for Negate ACK command. (AMAX GVP SCSI driver) +- AMAX rom "dongle" emulation improved floppy drives didn't work reliably. +- Added AMAX rom image selection to ROM panel SCSI select menu, renamed to SCSI/Boot ROMs. +- Added very simple next opcode word prefetch emulation to 68030 MMU mode, only done when MMU state changes. + Fixes programs that first switch on (or off) MMU which also unmaps memory where currently executing code + is located and then executes JMP (An). +- Added Toccata recording support, currently only internal hardware emulation is implemented (FIFO and interrupts), + returns only zero samples. +- Show also inserted data CD volume id (label) in status bar, strip path from file name. +- Show inserted floppy image filename and label (if OFS/FFS image) in status bar. +- CD image audio can be now mixed with Paula audio, just like Toccata output. CD audio can be finally recorded + with internal wave or avi recording support (Requested feature). FPS.Adj also adjusts CD audio speed (and pitch) + and CD audio sound sync (For example Liberation CD32 intro) is kept even if emulation slows down. + Enable option added to Sound panel (can be switched on the fly but mode only changes when CD audio thread restarts), + old method is still the default. Note: when enabled, Paula audio slider becomes master volume for CD audio. +- CD32 FMV also supports new audio mixing mode. FPS.Adj not supported yet. -- restore only single input target to default. +Beta 1: - Lowered disk motor startup delay, more closer match with real hardware (at least matches some random drive in my A500) @@ -7968,7 +7980,7 @@ Beta 3: - uae boot rom was always mounted (b2) - b2 interrupt fix update, only "pre-delay" vblank interrupt - A-Max rom-"dongle" emulation added (manual configuration file - editing currently needed, amaxromfile=) Yes, this is + editing currently needed, amax_rom_file=) Yes, this is very pointless feature. (A-Max technical info by Mark Knibbs) - C debugger command only worked in byte-mode - disk write without drives selected was emulated as a read without