int bytespersector;
int bus, target, lun;
int id;
- char *label;
+ char label[MAX_DPATH];
};
struct device_scsi_info {
!define PRODUCT_NAME "WinUAE"
-!define PRODUCT_VERSION "1.5.1"
+!define PRODUCT_VERSION "1.5.2"
!define PRODUCT_PUBLISHER "Arabuusimiehet"
!define PRODUCT_WEB_SITE "http://www.winuae.net/"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\winuae.exe"
mediacheck_full (unitnum, di);
di->id = unitnum + 1;
di->removable = sif->removable;
- di->label = my_strdup (sif->label);
+ strcpy (di->label, sif->label);
if (log_scsi) {
write_log ("MI=%d TP=%d WP=%d CY=%d BK=%d '%s'\n",
di->media_inserted, di->type, di->write_protected, di->cylinders, di->bytespersector, di->label);
di->write_protected = ciw32[unitnum].type == DRIVE_CDROM ? 1 : 0;
di->type = ciw32[unitnum].type == DRIVE_CDROM ? INQ_ROMD : INQ_DASD;
di->id = ciw32[unitnum].drvletter;
- di->label = xmalloc(16);
sprintf (di->label, "Drive %c:", ciw32[unitnum].drvletter);
return di;
}
di->write_protected = (p[3] & 0x80) ? 1 : 0;
}
}
+// write_log ("mediacheck_full(%d,%d,%d,%d,%d)\n",
+// di->bytespersector, di->sectorspertrack, di->trackspercylinder, di->cylinders, di->write_protected);
return 1;
}
return 0;
for (i = 0; i < total_devices; i++) {
di = &dev_info[i];
- if (!strcmp(drvpath, di->drvpath))
+ if (!strcmp (drvpath, di->drvpath))
return 0;
}
write_log ("SPTI: unit %d '%s' added\n", total_devices, drvpath);
di = &dev_info[total_devices];
- di->drvpath = my_strdup(drvpath);
+ di->drvpath = my_strdup (drvpath);
di->type = 0;
di->bus = bus;
di->path = pathid;
total_devices++;
if (open_scsi_device (cnt)) {
for (i = 0; i < cnt; i++) {
- if (!memcmp(di->inquirydata, dev_info[i].inquirydata, INQUIRY_SIZE) && di->scanmode != dev_info[i].scanmode) {
+ if (!memcmp (di->inquirydata, dev_info[i].inquirydata, INQUIRY_SIZE) && di->scanmode != dev_info[i].scanmode) {
write_log ("duplicate device, skipped..\n");
break;
}
}
if (i == cnt) {
freeit = 0;
- close_scsi_device(cnt);
+ close_scsi_device (cnt);
}
}
if (freeit) {
- free_scsi_device(cnt);
+ free_scsi_device (cnt);
total_devices--;
}
return 1;
if (unitnum >= MAX_TOTAL_DEVICES || dev_info[unitnum].handle == INVALID_HANDLE_VALUE)
return 0;
dispti = &dev_info[unitnum];
- di->label = my_strdup(dispti->name);
+ strcpy (di->label, dispti->name);
di->bus = 0;
di->target = unitnum;
di->lun = 0;
if (inimode)
write_log ("WARNING: Unsupported '%s' enabled\n", inipath);
}
+
+int getregmode (void)
+{
+ return inimode;
+}
\ No newline at end of file
char *inipath;
} UAEREG;
+extern int getregmode (void);
extern int reginitializeinit (const char *path);
extern void regstatus (void);
x += (amigawin_rect.right - amigawin_rect.left) / 2;
y += (amigawin_rect.bottom - amigawin_rect.top) / 2;
}
- disablecapture ();
- SetCursorPos (x, y);
- if (dir)
- recapture = 1;
+ if (mouseactive) {
+ disablecapture ();
+ SetCursorPos (x, y);
+ if (dir)
+ recapture = 1;
+ }
}
static void handleXbutton (WPARAM wParam, int updown)
case WM_MOUSEWHEEL:
if (dinput_winmouse () >= 0) {
int val = ((short)HIWORD (wParam));
- write_log ("dinput_winmouse=%d dinput_wheelbuttonstart=%d wheel=%d\n", dinput_winmouse(), dinput_wheelbuttonstart(), val);
+ //write_log ("dinput_winmouse=%d dinput_wheelbuttonstart=%d wheel=%d\n", dinput_winmouse(), dinput_wheelbuttonstart(), val);
setmousestate (dinput_winmouse (), 2, val, 0);
if (val < 0)
setmousebuttonstate (dinput_winmouse (), dinput_wheelbuttonstart () + 0, -1);
set_path (name, NULL);
}
+static void romlist_add2 (char *path, struct romdata *rd)
+{
+ if (getregmode ()) {
+ int ok = 0;
+ char tmp[MAX_DPATH];
+ if (path[0] == '/' || path[0] == '\\')
+ ok = 1;
+ if (strlen (path) > 1 && path[1] == ':')
+ ok = 1;
+ if (!ok) {
+ strcpy (tmp, start_path_exe);
+ strcat (tmp, path);
+ romlist_add (tmp, rd);
+ return;
+ }
+ }
+ romlist_add (path, rd);
+}
+
extern int scan_roms (int);
void read_rom_list (void)
{
s = strchr (s2, '\"');
if (s)
*s = 0;
- romlist_add (s2, rd);
+ romlist_add2 (s2, rd);
xfree (s2);
} else {
- romlist_add (tmp2, rd);
+ romlist_add2 (tmp2, rd);
}
}
}
#define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
#define GETBDD(x) ((x) % 100)
-#define WINUAEBETA 4
-#define WINUAEPUBLICBETA 1
-#define WINUAEDATE MAKEBD(2008, 8, 30)
+#define WINUAEPUBLICBETA 0
+
+#define WINUAEBETA 0
+#define WINUAEDATE MAKEBD(2008, 9, 5)
#define WINUAEEXTRA ""
#define WINUAEREV ""
int drive_width, hd_width, cd_width, power_width, fps_width, idle_width, snd_width;
int num_parts = 11;
double scaleX, scaleY;
+ WINDOWINFO wi;
+ int extra;
if (hStatusWnd) {
ShowWindow (hStatusWnd, SW_HIDE);
0, 0, 0, 0, hMainWnd, (HMENU) 1, hInst, NULL);
if (!hStatusWnd)
return;
+ wi.cbSize = sizeof wi;
+ GetWindowInfo (hMainWnd, &wi);
+ extra = wi.rcClient.top - wi.rcWindow.top;
hdc = GetDC (hStatusWnd);
scaleX = GetDeviceCaps (hdc, LOGPIXELSX) / 96.0;
lpParts = LocalLock (hloc);
/* Calculate the right edge coordinate for each part, and copy the coords
* to the array. */
- lpParts[0] = rc.right - (drive_width * 4) - power_width - idle_width - fps_width - cd_width - hd_width - snd_width - 16;
+ lpParts[0] = rc.right - (drive_width * 4) - power_width - idle_width - fps_width - cd_width - hd_width - snd_width - extra;
lpParts[1] = lpParts[0] + snd_width;
lpParts[2] = lpParts[1] + idle_width;
lpParts[3] = lpParts[2] + fps_width;
return scan_single_rom_2 (z);
}
+static void abspathtorelative (char *name)
+{
+ if (!strnicmp (start_path_exe, name, strlen (start_path_exe)))
+ memmove (name, name + strlen (start_path_exe), strlen (name) - strlen (start_path_exe) + 1);
+}
+
static int addrom (UAEREG *fkey, struct romdata *rd, char *name)
{
char tmp1[MAX_DPATH], tmp2[MAX_DPATH];
getromname (rd, tmp2);
if (name) {
strcat (tmp2, " / \"");
+ if (getregmode ())
+ abspathtorelative (name);
strcat (tmp2, name);
strcat (tmp2, "\"");
}
#define LV_DISK 4
static int listview_num_columns;
-static int listview_column_width[HARDDISK_COLUMNS];
void InitializeListView (HWND hDlg)
{
int width = 0;
int items = 0, result = 0, i, j, entry = 0, temp = 0;
char tmp[10], tmp2[MAX_DPATH];
+ int listview_column_width[HARDDISK_COLUMNS];
if (hDlg == pages[HARDDISK_ID]) {
listview_num_columns = HARDDISK_COLUMNS;
int i, x;
UINT flag = LVIS_SELECTED | LVIS_FOCUSED;
- ListView_GetItemPosition(list, entry, &ppt);
+ ListView_GetItemPosition (list, entry, &ppt);
x = ppt.x;
ListView_SetItemState (list, entry, flag, flag);
for (i = 0; i < listview_num_columns && column; i++) {
- if (x < point.x && x + listview_column_width[i] > point.x) {
+ int cw = ListView_GetColumnWidth (list, i);
+ if (x < point.x && x + cw > point.x) {
*column = i;
break;
}
- x += listview_column_width[i];
+ x += cw;
}
return entry;
}
+Final
+
+- uaescsi.device only updated CMD_GETGEOMETRY parameters when emulation
+ was started (and also broke CMD_READ if there was no CD in drive)
+- "Magic mouse" tried to uncapture mouse when it was already uncaptured
+- save relative rom paths in ini-mode
+
Beta 4: (final beta)
- check openal32.dll version before using
drivers are released, if ever. Do not ask stupid questions.)
- fixed D3D 8876086C error if display number in configuration file was
bigger than current number of displays
+- display mode switching mouse cursor handling tweaks
Beta 3:
uae_sem_wait (&change_sem);
for (i = 0; i < MAX_TOTAL_DEVICES; i++) {
- if (devst[i].di.id == device_id) {
- devst[i].changenum++;
+ struct devstruct *dev = &devst[i];
+ if (dev->di.id == device_id) {
+ if (dev->aunit >= 0) {
+ struct priv_devstruct *pdev = &pdevst[dev->aunit];
+ devinfo (pdev->mode, dev->unitnum, &dev->di);
+ }
+ dev->changenum++;
j = 0;
while (j < MAX_ASYNC_REQUESTS) {
- if (devst[i].d_request_type[j] == ASYNC_REQUEST_CHANGEINT) {
- uae_Cause (devst[i].d_request_data[j]);
+ if (dev->d_request_type[j] == ASYNC_REQUEST_CHANGEINT) {
+ uae_Cause (dev->d_request_data[j]);
}
j++;
}
static int command_cd_read (int mode, struct devstruct *dev, uaecptr data, uae_u64 offset, uae_u32 length, uae_u32 *io_actual)
{
uae_u8 *temp;
- uae_u32 len, sector;
+ uae_u32 len, sector, startoffset;
- uae_u32 startoffset = offset % dev->di.bytespersector;
+ *io_actual = 0;
+ if (dev->di.bytespersector == 0)
+ dev->di.bytespersector = 2048;
+ startoffset = offset % dev->di.bytespersector;
offset -= startoffset;
sector = offset / dev->di.bytespersector;
- *io_actual = 0;
while (length > 0) {
temp = sys_command_cd_read (mode, dev->unitnum, sector);
if (!temp)
switch (command)
{
case CMD_READ:
- if ((io_offset & bmask) || bmask == 0 || io_data == 0)
- goto bad_command;
- if ((io_length & bmask) || io_length == 0)
- goto bad_len;
- if (dev->drivetype == INQ_ROMD)
+ //write_log ("CMD_READ %08x %d %d %08x\n", io_data, io_offset, io_length, bmask);
+ if (dev->drivetype == INQ_ROMD) {
io_error = command_cd_read (pdev->mode, dev, io_data, io_offset, io_length, &io_actual);
- else
+ } else {
+ if ((io_offset & bmask) || bmask == 0 || io_data == 0)
+ goto bad_command;
+ if ((io_length & bmask) || io_length == 0)
+ goto bad_len;
io_error = command_read (pdev->mode, dev, io_data, io_offset, io_length, &io_actual);
+ }
break;
case TD_READ64:
case NSCMD_TD_READ64:
}
write_log ("%s:%d = '%s'\n", UAEDEV_SCSI, dev->aunit, dev->di.label);
}
- xfree(dev->di.label);
- dev->di.label = NULL;
+ dev->di.label[0] = 0;
}
}