From: Toni Wilen Date: Fri, 30 Jul 2010 13:21:24 +0000 (+0300) Subject: 2300b8 X-Git-Tag: 2300~16 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=bd01e5ba2da9267bb6b80c071c88a54239d0b889;p=francis%2Fwinuae.git 2300b8 --- diff --git a/akiko.cpp b/akiko.cpp index f9390033..06a292ff 100644 --- a/akiko.cpp +++ b/akiko.cpp @@ -29,8 +29,8 @@ #include "newcpu.h" #define AKIKO_DEBUG_NVRAM 0 -#define AKIKO_DEBUG_IO 1 -#define AKIKO_DEBUG_IO_CMD 1 +#define AKIKO_DEBUG_IO 0 +#define AKIKO_DEBUG_IO_CMD 0 // 43 48 49 4E 4F 4E 20 20 4F 2D 36 35 38 2D 32 20 32 34 #define FIRMWAREVERSION "CHINON O-658-2 24" @@ -670,8 +670,12 @@ static int sys_cddev_open (void) /* close device */ static void sys_cddev_close (void) { - cdaudiostop_do (); - sys_command_close (unitnum); + if (unitnum >= 0) { + cdaudiostop_do (); + sys_command_close (unitnum); + } + unitnum = -1; + } static int command_lengths[] = { 1,2,1,1,12,2,1,1,4,1,-1,-1,-1,-1,-1,-1 }; @@ -1587,9 +1591,7 @@ addrbank akiko_bank = { static void akiko_cdrom_free (void) { - if (unitnum >= 0) - sys_cddev_close (); - unitnum = -1; + sys_cddev_close (); xfree (sector_buffer_1); xfree (sector_buffer_2); xfree (sector_buffer_info_1); @@ -1614,9 +1616,9 @@ void akiko_reset (void) cdcomtxinx = 0; cdcomrxinx = 0; cdcomtxcmp = 0; + lastmediastate = 0; } cdrom_led = 0; - lastmediastate = 0; cdrom_receive_started = 0; cd_initialized = 0; @@ -1771,12 +1773,15 @@ uae_u8 *restore_akiko (uae_u8 *src) akiko_read_offset = restore_u8 (); akiko_write_offset = restore_u8 (); - cdrom_playing = cdrom_paused = 0; + cdrom_playing = cdrom_paused = cdrom_disk = 0; v = restore_u32 (); if (v & 1) cdrom_playing = 1; if (v & 2) cdrom_paused = 1; + if (v & 4) + cdrom_disk = 1; + lastmediastate = cdrom_disk; last_play_pos = msf2lsn (restore_u32 ()); last_play_end = msf2lsn (restore_u32 ()); diff --git a/blkdev.cpp b/blkdev.cpp index de163497..7a06304e 100644 --- a/blkdev.cpp +++ b/blkdev.cpp @@ -24,7 +24,7 @@ static int scsiemu[MAX_TOTAL_SCSI_DEVICES]; static struct device_functions *device_func[MAX_TOTAL_SCSI_DEVICES]; static int openlist[MAX_TOTAL_SCSI_DEVICES]; -static int waspaused[MAX_TOTAL_SCSI_DEVICES]; +static int waspaused[MAX_TOTAL_SCSI_DEVICES], wasslow[MAX_TOTAL_SCSI_DEVICES]; /* convert minutes, seconds and frames -> logical sector number */ int msf2lsn (int msf) @@ -219,13 +219,13 @@ void blkdev_fix_prefs (struct uae_prefs *p) } -static int sys_command_open_internal (int unitnum, const TCHAR *ident) +static int sys_command_open_internal (int unitnum, const TCHAR *ident, cd_standard_unit csu) { int ret = 0; if (openlist[unitnum]) write_log (L"BUG unit %d open: opencnt=%d!\n", unitnum, openlist[unitnum]); if (device_func[unitnum]) { - ret = device_func[unitnum]->opendev (unitnum, ident); + ret = device_func[unitnum]->opendev (unitnum, ident, csu != CD_STANDARD_UNIT_DEFAULT); if (ret) openlist[unitnum]++; } @@ -237,9 +237,9 @@ int get_standard_cd_unit (enum cd_standard_unit csu) int unitnum = 0; if (currprefs.cdslots[unitnum].name[0] || currprefs.cdslots[unitnum].inuse) { device_func_init (SCSI_UNIT_IOCTL); - if (!sys_command_open_internal (unitnum, currprefs.cdslots[unitnum].name)) { + if (!sys_command_open_internal (unitnum, currprefs.cdslots[unitnum].name, csu)) { device_func_init (SCSI_UNIT_IMAGE); - if (!sys_command_open_internal (unitnum, currprefs.cdslots[unitnum].name)) + if (!sys_command_open_internal (unitnum, currprefs.cdslots[unitnum].name, csu)) goto fallback; } return unitnum; @@ -251,7 +251,7 @@ int get_standard_cd_unit (enum cd_standard_unit csu) _stprintf (vol, L"%c:\\", drive); int drivetype = GetDriveType (vol); if (drivetype == DRIVE_CDROM) { - if (sys_command_open_internal (unitnum, vol)) { + if (sys_command_open_internal (unitnum, vol, csu)) { struct device_info di; write_log (L"Scanning drive %s: ", vol); if (sys_command_info (unitnum, &di, 0)) { @@ -294,12 +294,12 @@ int get_standard_cd_unit (enum cd_standard_unit csu) if (isaudio) { TCHAR vol[100]; _stprintf (vol, L"%c:\\", isaudio); - if (sys_command_open_internal (unitnum, vol)) + if (sys_command_open_internal (unitnum, vol, csu)) return unitnum; } fallback: device_func_init (SCSI_UNIT_IMAGE); - if (!sys_command_open_internal (unitnum, L"")) { + if (!sys_command_open_internal (unitnum, L"", csu)) { write_log (L"image mounter failed to open as empty!?\n"); return -1; } @@ -318,7 +318,7 @@ int sys_command_isopen (int unitnum) int sys_command_open (int unitnum) { waspaused[unitnum] = 0; - return sys_command_open_internal (unitnum, currprefs.cdslots[unitnum].name[0] ? currprefs.cdslots[unitnum].name : NULL); + return sys_command_open_internal (unitnum, currprefs.cdslots[unitnum].name[0] ? currprefs.cdslots[unitnum].name : NULL, CD_STANDARD_UNIT_DEFAULT); } @@ -405,6 +405,7 @@ static void check_changes (int unitnum) struct device_info di; device_func[unitnum]->info (unitnum, &di, 0); wasopen[unitnum] = di.open; + wasslow[unitnum] = di.slow_unit; if (wasopen[unitnum]) { device_func[unitnum]->closedev (unitnum); if (currprefs.scsi) { @@ -430,7 +431,7 @@ static void check_changes (int unitnum) write_log (L"CD: delayed insert '%s'\n", currprefs.cdslots[unitnum].name[0] ? currprefs.cdslots[unitnum].name : L""); device_func_init (0); if (wasopen[unitnum]) { - if (!device_func[unitnum]->opendev (unitnum, currprefs.cdslots[unitnum].name)) { + if (!device_func[unitnum]->opendev (unitnum, currprefs.cdslots[unitnum].name, wasslow[unitnum])) { write_log (L"-> device open failed\n"); } } diff --git a/blkdev_cdimage.cpp b/blkdev_cdimage.cpp index 50c2a9c6..6cf75342 100644 --- a/blkdev_cdimage.cpp +++ b/blkdev_cdimage.cpp @@ -75,6 +75,7 @@ struct cdunit { int cd_last_pos; int cdda_start, cdda_end; play_subchannel_callback cdda_subfunc; + bool slowunit; int imagechange; TCHAR newfile[MAX_DPATH]; @@ -454,7 +455,7 @@ static void *cdda_play_func (void *v) while (cdimage_unpack_active == 0) Sleep (10); } - firstloops = 150; + firstloops = cdu->slowunit ? 150 : 30; while (cdu->cdda_paused && cdu->cdda_play > 0) { Sleep (10); firstloops = -1; @@ -1564,6 +1565,7 @@ static struct device_info *info_device (int unitnum, struct device_info *di, int if (!cdu->enabled) return NULL; di->open = cdu->open; + di->slow_unit = cdu->slowunit; di->removable = 1; di->bus = unitnum; di->target = 0; @@ -1612,7 +1614,7 @@ static void unload_image (struct cdunit *cdu) } -static int open_device (int unitnum, const TCHAR *ident) +static int open_device (int unitnum, const TCHAR *ident, int flags) { struct cdunit *cdu = &cdunits[unitnum]; @@ -1624,6 +1626,7 @@ static int open_device (int unitnum, const TCHAR *ident) cdu->enabled = true; cdu->cdda_volume[0] = 0x7fff; cdu->cdda_volume[1] = 0x7fff; + cdu->slowunit = (flags & 1) != 0; blkdev_cd_change (unitnum, currprefs.cdslots[unitnum].name); if (cdimage_unpack_thread == 0) { init_comm_pipe (&unpack_pipe, 10, 1); diff --git a/debug.cpp b/debug.cpp index 6365e3d1..7e67ff08 100644 --- a/debug.cpp +++ b/debug.cpp @@ -3128,11 +3128,11 @@ static void debug_1 (void) case 'f': if (inptr[0] == 'a') { - next_char(&inptr); + next_char (&inptr); find_ea (&inptr); } else if (inptr[0] == 'p') { inptr++; - if (process_breakpoint(&inptr)) + if (process_breakpoint (&inptr)) return; } else { if (instruction_breakpoint (&inptr)) diff --git a/filesys.cpp b/filesys.cpp index f8765cc9..0b32bd9d 100644 --- a/filesys.cpp +++ b/filesys.cpp @@ -1991,7 +1991,7 @@ static a_inode *get_aino (Unit *unit, a_inode *base, const TCHAR *rel, int *err) } -static uae_u32 notifyhash (TCHAR *s) +static uae_u32 notifyhash (const TCHAR *s) { uae_u32 hash = 0; while (*s) diff --git a/include/blkdev.h b/include/blkdev.h index eee0b771..4b315acb 100644 --- a/include/blkdev.h +++ b/include/blkdev.h @@ -80,6 +80,7 @@ struct device_info { TCHAR productid[18]; TCHAR revision[6]; TCHAR *backend; + int slow_unit; struct cd_toc_head toc; }; @@ -101,7 +102,7 @@ struct amigascsi typedef int (*check_bus_func)(int flags); typedef int (*open_bus_func)(int flags); typedef void (*close_bus_func)(void); -typedef int (*open_device_func)(int, const TCHAR*); +typedef int (*open_device_func)(int, const TCHAR*, int); typedef void (*close_device_func)(int); typedef struct device_info* (*info_device_func)(int, struct device_info*, int); typedef uae_u8* (*execscsicmd_out_func)(int, uae_u8*, int); @@ -192,7 +193,7 @@ extern void blkdev_fix_prefs (struct uae_prefs *p); extern int isaudiotrack (struct cd_toc_head*, int block); extern int isdatatrack (struct cd_toc_head*, int block); -enum cd_standard_unit { CD_STANDARD_UNIT_AUDIO, CD_STANDARD_UNIT_CDTV, CD_STANDARD_UNIT_CD32 }; +enum cd_standard_unit { CD_STANDARD_UNIT_DEFAULT, CD_STANDARD_UNIT_AUDIO, CD_STANDARD_UNIT_CDTV, CD_STANDARD_UNIT_CD32 }; extern int get_standard_cd_unit (enum cd_standard_unit csu); extern void close_standard_cd_unit (int); diff --git a/inputdevice.cpp b/inputdevice.cpp index 4b0a4bca..5e1e0e00 100644 --- a/inputdevice.cpp +++ b/inputdevice.cpp @@ -2104,7 +2104,7 @@ static void cap_check (void) int isbutton = getbuttonstate (joy, i == 0 ? JOYBUTTON_3 : JOYBUTTON_2); if (cd32_pad_enabled[joy]) { - if (i != 0) // 3rd button? + if (i == 0) // 3rd button? continue; if (cd32padmode (p5dir, p5dat)) continue; @@ -2274,7 +2274,7 @@ static uae_u16 handle_joystick_potgor (uae_u16 potgor) potgor |= p5dat; - if (!cd32_pad_enabled[i]) { + if (!cd32_pad_enabled[i] || !cd32padmode (p5dir, p5dat)) { potgor &= ~p9dat; if (pot_cap[i][1] > 100) potgor |= p9dat; diff --git a/newcpu.cpp b/newcpu.cpp index 73d733cc..bc703f3f 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -2221,9 +2221,16 @@ void m68k_reset (int hardreset) #ifdef SAVESTATE if (savestate_state == STATE_RESTORE || savestate_state == STATE_REWIND) { m68k_setpc (regs.pc); - /* MakeFromSR () must not swap stack pointer */ - regs.s = (regs.sr >> 13) & 1; - MakeFromSR (); + SET_XFLG ((regs.sr >> 4) & 1); + SET_NFLG ((regs.sr >> 3) & 1); + SET_ZFLG ((regs.sr >> 2) & 1); + SET_VFLG ((regs.sr >> 1) & 1); + SET_CFLG (regs.sr & 1); + regs.t1 = (regs.sr >> 15) & 1; + regs.t0 = (regs.sr >> 14) & 1; + regs.s = (regs.sr >> 13) & 1; + regs.m = (regs.sr >> 12) & 1; + regs.intmask = (regs.sr >> 8) & 7; /* set stack pointer */ if (regs.s) m68k_areg (regs, 7) = regs.isp; @@ -3434,7 +3441,7 @@ void m68k_disasm_2 (TCHAR *buf, int bufsize, uaecptr addr, uaecptr *nextpc, int m68kpc_offset = addr - m68k_getpc (); if (buf) - memset (buf, 0, bufsize); + memset (buf, 0, bufsize * sizeof (TCHAR)); if (!table68k) return; while (cnt-- > 0) { @@ -3862,6 +3869,7 @@ void restore_cpu_finish (void) doint (); if (regs.stopped) set_special (SPCFLAG_STOP); + //activate_debugger (); } uae_u8 *restore_cpu_extra (uae_u8 *src) @@ -3923,24 +3931,24 @@ uae_u8 *save_cpu (int *len, uae_u8 *dstptr) save_u32 (model); /* MODEL */ save_u32 (0x80000000 | (currprefs.address_space_24 ? 1 : 0)); /* FLAGS */ for (i = 0;i < 15; i++) - save_u32 (regs.regs[i]); /* D0-D7 A0-A6 */ + save_u32 (regs.regs[i]); /* D0-D7 A0-A6 */ save_u32 (m68k_getpc ()); /* PC */ save_u16 (regs.irc); /* prefetch */ save_u16 (regs.ir); /* instruction prefetch */ MakeSR (); save_u32 (!regs.s ? regs.regs[15] : regs.usp); /* USP */ save_u32 (regs.s ? regs.regs[15] : regs.isp); /* ISP */ - save_u16 (regs.sr); /* SR/CCR */ + save_u16 (regs.sr); /* SR/CCR */ save_u32 (regs.stopped ? CPUMODE_HALT : 0); /* flags */ if (model >= 68010) { - save_u32 (regs.dfc); /* DFC */ - save_u32 (regs.sfc); /* SFC */ - save_u32 (regs.vbr); /* VBR */ + save_u32 (regs.dfc); /* DFC */ + save_u32 (regs.sfc); /* SFC */ + save_u32 (regs.vbr); /* VBR */ } if (model >= 68020) { - save_u32 (regs.caar); /* CAAR */ - save_u32 (regs.cacr); /* CACR */ - save_u32 (regs.msp); /* MSP */ + save_u32 (regs.caar); /* CAAR */ + save_u32 (regs.cacr); /* CACR */ + save_u32 (regs.msp); /* MSP */ } if (model >= 68030) { save_u64 (crp_030); /* CRP */ @@ -3948,20 +3956,20 @@ uae_u8 *save_cpu (int *len, uae_u8 *dstptr) save_u32 (tt0_030); /* TT0/AC0 */ save_u32 (tt1_030); /* TT1/AC1 */ save_u32 (tc_030); /* TCR */ - save_u16 (mmusr_030); /* MMUSR/ACUSR */ + save_u16 (mmusr_030); /* MMUSR/ACUSR */ } if (model >= 68040) { - save_u32 (regs.itt0); /* ITT0 */ - save_u32 (regs.itt1); /* ITT1 */ - save_u32 (regs.dtt0); /* DTT0 */ - save_u32 (regs.dtt1); /* DTT1 */ - save_u32 (regs.tcr); /* TCR */ - save_u32 (regs.urp); /* URP */ - save_u32 (regs.srp); /* SRP */ + save_u32 (regs.itt0); /* ITT0 */ + save_u32 (regs.itt1); /* ITT1 */ + save_u32 (regs.dtt0); /* DTT0 */ + save_u32 (regs.dtt1); /* DTT1 */ + save_u32 (regs.tcr); /* TCR */ + save_u32 (regs.urp); /* URP */ + save_u32 (regs.srp); /* SRP */ } if (model >= 68060) { - save_u32 (regs.buscr); /* BUSCR */ - save_u32 (regs.pcr); /* PCR */ + save_u32 (regs.buscr); /* BUSCR */ + save_u32 (regs.pcr); /* PCR */ } khz = -1; if (currprefs.m68k_speed == 0) { diff --git a/od-win32/blkdev_win32_aspi.cpp b/od-win32/blkdev_win32_aspi.cpp index 17da4f2d..ac1d4b34 100644 --- a/od-win32/blkdev_win32_aspi.cpp +++ b/od-win32/blkdev_win32_aspi.cpp @@ -876,7 +876,7 @@ static int mediacheck_full (int unitnum, struct device_info *di) return 1; } -static int open_scsi_device (int unitnum, const TCHAR *ident) +static int open_scsi_device (int unitnum, const TCHAR *ident, int flags) { if (unitnum >= unitcnt) return 0; diff --git a/od-win32/blkdev_win32_ioctl.cpp b/od-win32/blkdev_win32_ioctl.cpp index 316e4a76..1f3bf6e7 100644 --- a/od-win32/blkdev_win32_ioctl.cpp +++ b/od-win32/blkdev_win32_ioctl.cpp @@ -64,6 +64,7 @@ struct dev_info_ioctl { uae_sem_t sub_sem, sub_sem2; bool open; bool usesptiread; + bool slowunit; }; static struct dev_info_ioctl ciw32[MAX_TOTAL_SCSI_DEVICES]; @@ -507,7 +508,7 @@ static void *cdda_play (void *v) if (oldplay != ciw->cdda_play) { cdda_pos = ciw->cdda_start; oldplay = ciw->cdda_play; - firstloops = 25; + firstloops = ciw->slowunit ? 25 : 5; write_log (L"IOCTL%s CDDA: playing from %d to %d\n", ciw->usesptiread ? L"(SPTI)" : L"", ciw->cdda_start, ciw->cdda_end); ciw->subcodevalid = false; @@ -1122,6 +1123,7 @@ static void update_device_info (int unitnum) di->type = ciw->type == DRIVE_CDROM ? INQ_ROMD : INQ_DASD; di->unitnum = unitnum + 1; _tcscpy (di->label, ciw->drvlettername); + di->slow_unit = ciw->slowunit; di->backend = L"IOCTL"; } @@ -1209,7 +1211,7 @@ static void sys_cddev_close (struct dev_info_ioctl *ciw, int unitnum) write_log (L"IOCTL: device '%s' closed\n", ciw->devname, unitnum); } -static int open_device (int unitnum, const TCHAR *ident) +static int open_device (int unitnum, const TCHAR *ident, int flags) { struct dev_info_ioctl *ciw = NULL; if (ident && ident[0]) { @@ -1235,12 +1237,14 @@ static int open_device (int unitnum, const TCHAR *ident) if (ciw->drvletter == 0) return 0; unittable[unitnum] = unitnum + 1; + ciw->slowunit = (flags & 1) != 0; if (sys_cddev_open (ciw, unitnum) == 0) return 1; unittable[unitnum] = 0; blkdev_cd_change (unitnum, ciw->drvlettername); return 0; } + static void close_device (int unitnum) { struct dev_info_ioctl *ciw = unitcheck (unitnum); diff --git a/od-win32/blkdev_win32_spti.cpp b/od-win32/blkdev_win32_spti.cpp index 201e1d80..ec1e35c7 100644 --- a/od-win32/blkdev_win32_spti.cpp +++ b/od-win32/blkdev_win32_spti.cpp @@ -534,7 +534,8 @@ static int open_scsi_device2 (struct dev_info_spti *di, int unitnum) xfree (dev); return 0; } -int open_scsi_device (int unitnum, const TCHAR *ident) + +int open_scsi_device (int unitnum, const TCHAR *ident, int flags) { struct dev_info_spti *di = NULL; if (ident && ident[0]) { diff --git a/od-win32/clipboard_win32.cpp b/od-win32/clipboard_win32.cpp index d43a247e..7ff7a03f 100644 --- a/od-win32/clipboard_win32.cpp +++ b/od-win32/clipboard_win32.cpp @@ -58,7 +58,7 @@ static void to_amiga_start (void) { if (!initialized) return; - if (!clipboard_data) + if (!clipboard_data || get_long (clipboard_data) != 0) return; if (clipboard_debug) { debugwrite (L"clipboard_p2a", to_amiga, to_amiga_size); @@ -138,7 +138,7 @@ static TCHAR *amigatopc (const char *txt) } -static void to_iff_text (TCHAR *pctxt) +static void to_iff_text (const TCHAR *pctxt) { uae_u8 b[] = { 'F','O','R','M',0,0,0,0,'F','T','X','T','C','H','R','S',0,0,0,0 }; uae_u32 size; @@ -234,7 +234,7 @@ static void to_iff_ilbm (HBITMAP hbmp) 'C','A','M','G',0,0,0, 4, 0,0,0,0, }; - if (!GetObject(hbmp, sizeof bmp, &bmp)) + if (!GetObject (hbmp, sizeof bmp, &bmp)) return; w = bmp.bmWidth; h = bmp.bmHeight; @@ -398,7 +398,7 @@ static void to_iff_ilbm (HBITMAP hbmp) xfree (bmp.bmBits); } -static uae_u8 *iff_decomp (uae_u8 *addr, int w, int h, int planes) +static uae_u8 *iff_decomp (const uae_u8 *addr, int w, int h, int planes) { int y, i, w2; uae_u8 *dst; diff --git a/od-win32/win32.h b/od-win32/win32.h index 54d011ad..1fc9b9fd 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -18,8 +18,8 @@ #define WINUAEPUBLICBETA 1 #define LANG_DLL 1 -#define WINUAEBETA L"7" -#define WINUAEDATE MAKEBD(2010, 7, 28) +#define WINUAEBETA L"8" +#define WINUAEDATE MAKEBD(2010, 7, 30) #define WINUAEEXTRA L"" #define WINUAEREV L"" diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index e866f74e..26603c21 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -1151,8 +1151,7 @@ static void update_gfxparams (void) #ifdef PICASSO96 } #endif - currentmode->current_depth = currprefs.color_mode == 1 ? 15 - : currprefs.color_mode == 2 ? 16 : 32; + currentmode->current_depth = currprefs.color_mode < 5 ? 16 : 32; if (screen_is_picasso && currprefs.win32_rtgmatchdepth && isfullscreen () > 0) { int pbits = picasso96_state.BytesPerPixel * 8; if (pbits <= 8) { diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index a6bdc30c..e1c3f08b 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -1365,7 +1365,8 @@ static bool scan_rom_hook (const TCHAR *name, int line) static int scan_rom_2 (struct zfile *f, void *vrsd) { struct romscandata *rsd = (struct romscandata*)vrsd; - TCHAR *path = zfile_getname(f); + const TCHAR *path = zfile_getname(f); + const TCHAR *romkey = L"rom.key"; struct romdata *rd; scan_rom_hook (NULL, 0); @@ -1380,6 +1381,8 @@ static int scan_rom_2 (struct zfile *f, void *vrsd) if (rd->type & ROMTYPE_KEY) addkeyfile (path); rsd->got = 1; + } else if (_tcslen (path) > _tcslen (romkey) && !_tcsicmp (path + _tcslen (path) - _tcslen (romkey), romkey)) { + addkeyfile (path); } return 0; } @@ -3888,21 +3891,21 @@ static INT_PTR CALLBACK InfoSettingsProc (HWND hDlg, UINT msg, WPARAM wParam, LP return FALSE; } -static HTREEITEM AddConfigNode (HWND hDlg, struct ConfigStruct *config, TCHAR *name, TCHAR *desc, TCHAR *path, int isdir, int expand, HTREEITEM parent) +static HTREEITEM AddConfigNode (HWND hDlg, struct ConfigStruct *config, const TCHAR *name, const TCHAR *desc, const TCHAR *path, int isdir, int expand, HTREEITEM parent) { TVINSERTSTRUCT is; HWND TVhDlg; TCHAR s[MAX_DPATH] = L""; - TCHAR file_name[MAX_DPATH], file_path[MAX_DPATH]; + TCHAR file_name[MAX_DPATH] = L"", file_path[MAX_DPATH] = L""; GetDlgItemText (hDlg, IDC_EDITNAME, file_name, MAX_DPATH); GetDlgItemText (hDlg, IDC_EDITPATH, file_path, MAX_DPATH); - TVhDlg = GetDlgItem(hDlg, IDC_CONFIGTREE); + TVhDlg = GetDlgItem (hDlg, IDC_CONFIGTREE); memset (&is, 0, sizeof (is)); is.hInsertAfter = isdir < 0 ? TVI_ROOT : TVI_SORT; is.hParent = parent; is.itemex.mask = TVIF_TEXT | TVIF_STATE | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM; - if (!_tcscmp (file_name, name) && !_tcscmp (file_path, path)) { + if (name && path && !_tcscmp (file_name, name) && !_tcscmp (file_path, path)) { is.itemex.state |= TVIS_SELECTED; is.itemex.stateMask |= TVIS_SELECTED; } @@ -5487,9 +5490,6 @@ static void init_display_mode (HWND hDlg) switch (d2) { case 15: - workprefs.color_mode = 1; - d = 2; - break; case 16: workprefs.color_mode = 2; d = 2; diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 273483f9..e4ad02f4 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,4 +1,14 @@ +Beta 8: + +- GUI configuration panel crash fix (b7) +- do not emulate slow CDA startup in uaescsi.device mode +- blue button was still broken in CD32 pad 2-button mode +- removed obsolete 15-bit fullscreen mode support code +- statefile restore failed if rarely used 68020 M status register bit was set +- added protection against starting new transparent clipboard conversion + if previous hasn't fully finished yet + Beta 7: - reverted b5 audio hack, it breaks other programs and also it does not seem to diff --git a/od-win32/writelog.cpp b/od-win32/writelog.cpp index e65ac284..597892c0 100644 --- a/od-win32/writelog.cpp +++ b/od-win32/writelog.cpp @@ -489,7 +489,7 @@ TCHAR* buf_out (TCHAR *buffer, int *bufsize, const TCHAR *format, ...) if (buffer == NULL) return 0; - count = _vsntprintf (buffer, (*bufsize) - 1, format, parms); + count = _vsntprintf (buffer, (*bufsize) / sizeof (TCHAR) - 1, format, parms); va_end (parms); *bufsize -= _tcslen (buffer); return buffer + _tcslen (buffer); diff --git a/rommgr.cpp b/rommgr.cpp index d8452c54..f25f5c43 100644 --- a/rommgr.cpp +++ b/rommgr.cpp @@ -106,8 +106,8 @@ static struct romdata roms[] = { 0x869ae1b1, 0x801bbab3,0x2e3d3738,0x6dd1636d,0x4f1d6fa7,0xe21d5874 }, { L"Cloanto Amiga Forever 2006 ROM key", 0, 0, 0, 0, 0, 750, 48, 0, 1, ROMTYPE_KEY, 0, 0, NULL, 0xb01c4b56, 0xbba8e5cd,0x118b8d92,0xafed5693,0x5eeb9770,0x2a662d8f }, -// { L"Cloanto Amiga Forever 2010 ROM key", 0, 0, 0, 0, 0, 1544, 73, 0, 1, ROMTYPE_KEY, 0, 0, NULL, -// 0x8c4dd05c, 0x05034f62,0x0b5bb7b2,0x86954ea9,0x164fdb90,0xfb2897a4 }, + { L"Cloanto Amiga Forever 2010 ROM key", 0, 0, 0, 0, 0, 1544, 73, 0, 1, ROMTYPE_KEY, 0, 0, NULL, + 0x8c4dd05c, 0x05034f62,0x0b5bb7b2,0x86954ea9,0x164fdb90,0xfb2897a4 }, { L"KS ROM v1.0 (A1000)(NTSC)", 1, 0, 1, 0, L"A1000\0", 262144, 1, 0, 0, ROMTYPE_KICK, 0, 0, NULL, 0x299790ff, 0x00C15406,0xBEB4B8AB,0x1A16AA66,0xC05860E1,0xA7C1AD79 },