This commit is contained in:
Toni Wilen 2012-12-10 19:31:36 +02:00
parent 4046bc2bcb
commit 51a896224c
48 changed files with 2036 additions and 1994 deletions

View File

@ -39,7 +39,7 @@ struct zvolume *archive_directory_lha (struct zfile *zf)
zai.name = au (hdr.name);
zai.size = hdr.original_size;
zai.flags = hdr.attribute;
zai.t = hdr.unix_last_modified_stamp -= _timezone;
zai.tv.tv_sec = hdr.unix_last_modified_stamp -= _timezone;
if (hdr.name[strlen(hdr.name) + 1] != 0)
zai.comment = au (&hdr.name[strlen(hdr.name) + 1]);
if (method == LZHDIRS_METHOD_NUM) {

View File

@ -787,7 +787,7 @@ struct zvolume *archive_directory_lzx (struct zfile *in_file)
tm.tm_year = year - 1900;
tm.tm_mon = month;
tm.tm_mday = day;
zai.t = mktime(&tm);
zai.tv.tv_sec = mktime(&tm);
zai.size = unpack_size;
zn = zvolume_addfile_abs(zv, &zai);
zn->offset2 = merge_size;

View File

@ -970,15 +970,15 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
cfgfile_dwrite (f, _T("keyboard_leds"), _T("numlock:%s,capslock:%s,scrolllock:%s"),
kbleds[p->keyboard_leds[0]], kbleds[p->keyboard_leds[1]], kbleds[p->keyboard_leds[2]]);
if (p->chipset_mask & CSMASK_AGA)
cfgfile_dwrite (f, _T("chipset"),_T("aga"));
cfgfile_write (f, _T("chipset"),_T("aga"));
else if ((p->chipset_mask & CSMASK_ECS_AGNUS) && (p->chipset_mask & CSMASK_ECS_DENISE))
cfgfile_dwrite (f, _T("chipset"),_T("ecs"));
cfgfile_write (f, _T("chipset"),_T("ecs"));
else if (p->chipset_mask & CSMASK_ECS_AGNUS)
cfgfile_dwrite (f, _T("chipset"),_T("ecs_agnus"));
cfgfile_write (f, _T("chipset"),_T("ecs_agnus"));
else if (p->chipset_mask & CSMASK_ECS_DENISE)
cfgfile_dwrite (f, _T("chipset"),_T("ecs_denise"));
cfgfile_write (f, _T("chipset"),_T("ecs_denise"));
else
cfgfile_dwrite (f, _T("chipset"), _T("ocs"));
cfgfile_write (f, _T("chipset"), _T("ocs"));
if (p->chipset_refreshrate > 0)
cfgfile_write (f, _T("chipset_refreshrate"), _T("%f"), p->chipset_refreshrate);

View File

@ -3322,7 +3322,7 @@ static void find_ea (TCHAR **inptr)
int hits = 0;
addr = 0;
end = lastaddr();
end = lastaddr ();
ea = readhex (inptr);
if (more_params(inptr)) {
addr = readhex (inptr);

View File

@ -49,6 +49,7 @@ int disk_debug_track = -1;
#ifdef RETROPLATFORM
#include "rp.h"
#endif
#include "fsdb.h"
#undef CATWEASEL
@ -2313,17 +2314,17 @@ int disk_getwriteprotect (struct uae_prefs *p, const TCHAR *name)
static void diskfile_readonly (const TCHAR *name, bool readonly)
{
struct _stat64 st;
struct mystat st;
int mode, oldmode;
if (stat (name, &st))
if (my_stat (name, &st))
return;
oldmode = mode = st.st_mode;
oldmode = mode = st.mode;
mode &= ~FILEFLAG_WRITE;
if (!readonly)
mode |= FILEFLAG_WRITE;
if (mode != oldmode)
chmod (name, mode);
my_chmod (name, mode);
}
static void setdskchangetime (drive *drv, int dsktime)

View File

@ -222,6 +222,7 @@ static uae_u32 plf_sprite_mask;
static int sbasecol[2] = { 16, 16 };
static bool brdsprt, brdblank;
static int hposblank;
static bool specialmonitoron;
bool picasso_requested_on;
bool picasso_on;
@ -2764,7 +2765,6 @@ void finish_drawing_frame (void)
lightpen_update (vb);
if (currprefs.monitoremu && gfxvidinfo.tempbuffer.bufmem_allocated) {
static bool specialon;
if (emulate_specialmonitors (vb, &gfxvidinfo.tempbuffer)) {
vb = gfxvidinfo.outbuffer = &gfxvidinfo.tempbuffer;
if (vb->nativepositioning) {
@ -2776,16 +2776,16 @@ void finish_drawing_frame (void)
vb->outheight = gfxvidinfo.drawbuffer.outheight;
}
gfxvidinfo.drawbuffer.tempbufferinuse = true;
if (!specialon)
if (!specialmonitoron)
compute_framesync ();
specialon = true;
specialmonitoron = true;
do_flush_screen (vb, 0, vb->outheight);
didflush = true;
} else {
gfxvidinfo.drawbuffer.tempbufferinuse = false;
if (specialon)
if (specialmonitoron)
compute_framesync ();
specialon = false;
specialmonitoron = false;
}
}
@ -3071,6 +3071,7 @@ void reset_drawing (void)
clearbuffer (&gfxvidinfo.tempbuffer);
center_reset = true;
specialmonitoron = false;
}
void drawing_init (void)

View File

@ -194,24 +194,6 @@ FSIN_nomoresub:
bra.b FSIN_init_units
FSIN_units_ok:
tst.w d5
beq.s CDIN_done
moveq #0,d6
CDIN_init_units:
move.w $10c(a5),d0
btst d6,d0
beq.s CDIN_next
movem.l d6/a3,-(sp)
move.l a3,a0
bset #31,d6
bsr.w make_cd_dev
movem.l (sp)+,d6/a3
CDIN_next:
addq.w #1,d6
cmp.w #8,d6
bne.s CDIN_init_units
CDIN_done:
move.l 4.w,a6
move.l a3,a1
move.l #PP_TOTAL,d0
@ -473,7 +455,7 @@ setup_exter:
moveq.l #3,d0
jsr -168(a6) ; AddIntServer
bsr.w heartbeatvblank
bsr.w heartbeatvblank
move.w #$FF38,d0
moveq #4,d1
@ -541,11 +523,11 @@ r15 move.l (a2),d2 ; hunk size (header)
bset #1,d1
r2 bset #16,d1
lsl.l #2,d2
move.l d2,d0
bne.s r17
clr.l (a2)+ ; empty hunk
bra.s r18
r17 addq.l #8,d0 ; size + pointer to next hunk + hunk size
r17 addq.l #8,d2 ; size + pointer to next hunk + hunk size
move.l d2,d0
jsr AllocMem(a6)
tst.l d0
beq.w ree
@ -969,99 +951,6 @@ action_exall
tst.l (a0) ; eac_Entries == 0 -> get more
rts
; mount CD drives using built-in AROS CDFS + uaescsi.device
make_cd_dev: ; IN: A0 param_packet, D6: unit_no | 0x80000000 (=CD)
bsr.w fsres
move.l d0,PP_FSRES(a0) ; pointer to FileSystem.resource
move.l a0,-(sp)
move.w #$FFEC,d0 ; filesys base
bsr.w getrtbase
move.l (a0),a5
move.w #$FF28,d0 ; fill in unit-dependent info (filesys_dev_storeinfo)
bsr.w getrtbase
move.l a0,a1
move.l (sp)+,a0
clr.l PP_FSSIZE(a0) ; filesystem size
clr.l PP_FSPTR(a0) ; filesystem memory
jsr (a1)
tst.l d0
beq.w .fail
; allocate memory for loaded filesystem
move.l PP_FSSIZE(a0),d0
beq.s .nofs
bmi.s .nofs
move.l a0,-(sp)
moveq #1,d1
move.l 4.w,a6
jsr AllocMem(a6)
move.l (sp)+,a0
move.l d0,PP_FSPTR(a0)
beq.w .fail
.nofs
move.l a4,a6
move.l a0,-(sp)
jsr -144(a6) ; MakeDosNode()
move.l (sp)+,a0 ; parmpacket
move.l a0,a1
move.l d0,a3 ; devicenode
move.w #$FF20,d0 ; record in ui.startup (filesys_dev_remember)
bsr.w getrtbase
jsr (a0)
moveq #0,d0
move.l d0,8(a3) ; dn_Task
move.l d0,16(a3) ; dn_Handler
move.l d0,32(a3) ; dn_SegList
move.l PP_FSPTR(a1),d0
beq.s .nofs2
move.l d0,a0
bsr.w relocate
movem.l d0/a0-a1,-(sp)
move.l PP_FSSIZE(a1),d0
move.l PP_FSPTR(a1),a1
move.l 4.w,a6
jsr FreeMem(a6)
movem.l (sp)+,d0/a0-a1
bsr.w addfs
.nofs2
move.w #$FF18,d0 ; update dn_SegList if needed (filesys_dev_bootfilesys)
bsr.w getrtbase
jsr (a0)
move.b 79(a1),d3 ; bootpri
cmp.b #-128,d3
beq.s .cdnoboot
move.l 4.w,a6
moveq #20,d0
move.l #65536+1,d1
jsr AllocMem(a6)
move.l d0,a1 ; bootnode
move.w #$1000,d0
or.b d3,d0
move.w d0,8(a1)
move.l $104(a5),10(a1) ; filesys_configdev
move.l a3,16(a1) ; devicenode
lea.l 74(a4),a0 ; MountList
jsr -$0084(a6) ;Forbid
jsr -270(a6) ; Enqueue()
jsr -$008a(a6) ;Permit
bra.s .fail
.cdnoboot:
move.l a1,a2 ; bootnode
move.l a3,a0 ; parmpacket
moveq #0,d1
move.l d1,a1
moveq #1,d1 ; ADNF_STARTPROC (v36+)
moveq #-20,d0
move.l a4,a6 ; expansion base
jsr -150(a6) ; AddDosNode
.fail:
rts
; mount harddrives, virtual or hdf
make_dev: ; IN: A0 param_packet, D6: unit_no, D7: b0=autoboot,b1=onthefly,b2=v36+
@ -1157,7 +1046,7 @@ nordbfs2:
move.l d3,d0
move.b 79(a1),d3 ; bootpri
tst.l d0
bne.b MKDV_doboot
bne.b MKDV_doboot ; not directory harddrive?
MKDV_is_filesys:
move.l #6000,20(a3) ; dn_StackSize

View File

@ -80,8 +80,6 @@ int log_filesys = 0;
#define RTAREA_HEARTBEAT 0xFFFC
static void get_time (time_t t, long* days, long* mins, long* ticks);
static uae_sem_t test_sem;
int bootrom_header, bootrom_items;
@ -122,7 +120,7 @@ static void aino_test_init (a_inode *aino)
uaecptr filesys_initcode;
static uae_u32 fsdevname, fshandlername, filesys_configdev;
static uae_u32 cdfs_devname, cdfs_handlername, cdfs_control;
static uae_u32 cdfs_devname, cdfs_handlername;
static int filesys_in_interrupt;
static uae_u32 mountertask;
static int automountunit = -1;
@ -505,7 +503,7 @@ static int set_filesys_unit_1 (int nr,
}
}
iscd = USE_CDFS == 2 && nr >= cd_unit_offset && nr < cd_unit_offset + cd_unit_number;
iscd = nr >= cd_unit_offset && nr < cd_unit_offset + cd_unit_number;
for (i = 0; i < MAX_FILESYSTEM_UNITS; i++) {
if (nr == i || !mountinfo.ui[i].open || mountinfo.ui[i].rootdir == NULL || is_hardfile (i) == FILESYS_CD)
@ -707,8 +705,7 @@ static void initialize_mountinfo (void)
nr = nr_units ();
cd_unit_offset = nr;
cd_unit_number = 0;
#if USE_CDFS == 2
if (currprefs.scsi && currprefs.win32_automount_cddrives && USE_CDFS) {
if (currprefs.scsi && currprefs.win32_automount_cddrives) {
uae_u32 mask = scsi_get_cd_drive_mask ();
for (int i = 0; i < 32; i++) {
if (mask & (1 << i)) {
@ -721,7 +718,6 @@ static void initialize_mountinfo (void)
}
}
}
#endif
for (nr = 0; nr < currprefs.mountitems; nr++) {
struct uaedev_config_info *uci = &currprefs.mountconfig[nr];
@ -893,7 +889,6 @@ struct hardfiledata *get_hardfile_data (int nr)
#define DISK_TYPE_DOS 0x444f5300 /* DOS\0 */
#define DISK_TYPE_DOS_FFS 0x444f5301 /* DOS\1 */
#define CDFS_DOSTYPE 0x43440000 /* CDxx */
//#define CDFS_DOSTYPE (USE_CDFS == 2 ? 0x43444653 : 0x43445644)
typedef struct {
uae_u32 uniq;
@ -1107,6 +1102,50 @@ static TCHAR *bstr_cut (Unit *unit, uaecptr addr)
return &p[off];
}
/* convert time_t to/from AmigaDOS time */
static const uae_s64 msecs_per_day = 24 * 60 * 60 * 1000;
static const uae_s64 diff = ((8 * 365 + 2) * (24 * 60 * 60)) * (uae_u64)1000;
void timeval_to_amiga (struct mytimeval *tv, int *days, int *mins, int *ticks)
{
/* tv.tv_sec is secs since 1-1-1970 */
/* days since 1-1-1978 */
/* mins since midnight */
/* ticks past minute @ 50Hz */
uae_s64 t = tv->tv_sec * 1000 + tv->tv_usec / 1000;
t -= diff;
if (t < 0)
t = 0;
*days = t / msecs_per_day;
t -= *days * msecs_per_day;
*mins = t / (60 * 1000);
t -= *mins * (60 * 1000);
*ticks = t / (1000 / 50);
}
void amiga_to_timeval (struct mytimeval *tv, int days, int mins, int ticks)
{
uae_s64 t;
if (days < 0)
days = 0;
if (days > 9900 * 365)
days = 9900 * 365; // in future far enough?
if (mins < 0 || mins >= 24 * 60)
mins = 0;
if (ticks < 0 || ticks >= 60 * 50)
ticks = 0;
t = ticks * 20;
t += mins * (60 * 1000);
t += ((uae_u64)days) * msecs_per_day;
t += diff;
tv->tv_sec = t / 1000;
tv->tv_usec = (t % 1000) * 1000;
}
static Unit *units = 0;
static Unit*
@ -1239,7 +1278,7 @@ static void set_highcyl (UnitInfo *ui, uae_u32 blocks)
put_long (env + 10 * 4, blocks);
}
static void set_volume_name (Unit *unit, uae_u32 ctime)
static void set_volume_name (Unit *unit, struct mytimeval *tv)
{
int namelen;
int i;
@ -1251,9 +1290,9 @@ static void set_volume_name (Unit *unit, uae_u32 ctime)
for (i = 0; i < namelen; i++)
put_byte (unit->volume + 45 + i, s[i]);
put_byte (unit->volume + 45 + namelen, 0);
if (ctime) {
long days, mins, ticks;
get_time (ctime, &days, &mins, &ticks);
if (tv && (tv->tv_sec || tv->tv_usec)) {
int days, mins, ticks;
timeval_to_amiga (tv, &days, &mins, &ticks);
put_long (unit->volume + 16, days);
put_long (unit->volume + 20, mins);
put_long (unit->volume + 24, ticks);
@ -1464,7 +1503,7 @@ static uae_u32 filesys_media_change_reply (TrapContext *ctx, int mode)
} else if (u->mount_changed > 0) {
if (mode == 0) {
// insert
uae_u32 ctime = 0;
struct mytimeval ctime = { 0 };
bool emptydrive = false;
struct uaedev_config_info *uci = NULL;
@ -1488,7 +1527,8 @@ static uae_u32 filesys_media_change_reply (TrapContext *ctx, int mode)
u->ui.unknown_media = ii.unknown_media;
if (!ii.unknown_media) {
u->ui.volname = ui->volname = my_strdup (ii.volumename);
ctime = ii.creation;
ctime.tv_sec = ii.creation;
ctime.tv_usec = 0;
set_highcyl (ui, ii.blocks);
#ifdef RETROPLATFORM
rp_cd_image_change (ui->cddevno, ii.devname);
@ -1511,7 +1551,7 @@ static uae_u32 filesys_media_change_reply (TrapContext *ctx, int mode)
write_log (_T("FILESYS: inserted unreadable volume NR=%d RO=%d\n"), nr, u->mount_readonly);
} else {
write_log (_T("FILESYS: inserted volume NR=%d RO=%d '%s' ('%s')\n"), nr, u->mount_readonly, ui->volname, u->mount_rootdir);
set_volume_name (u, ctime);
set_volume_name (u, &ctime);
if (u->mount_flags >= 0)
ui->volflags = u->volflags = u->ui.volflags = u->mount_flags;
if (uci != NULL) {
@ -1687,19 +1727,6 @@ static int fsdb_cando (Unit *unit)
static void prepare_for_open (TCHAR *name)
{
#if 0
struct _stat64 statbuf;
int mode;
if (-1 == stat (name, &statbuf))
return;
mode = statbuf.st_mode;
mode |= S_IRUSR;
mode |= S_IWUSR;
mode |= S_IXUSR;
chmod (name, mode);
#endif
}
static void de_recycle_aino (Unit *unit, a_inode *aino)
@ -2466,7 +2493,7 @@ static Unit *startup_create_unit (UnitInfo *uinfo, int num)
}
static bool mount_cd (UnitInfo *uinfo, int nr, uae_u32 *ctime, uae_u64 *uniq)
static bool mount_cd (UnitInfo *uinfo, int nr, struct mytimeval *ctime, uae_u64 *uniq)
{
uinfo->cddevno = nr - cd_unit_offset;
if (!sys_command_open (uinfo->cddevno)) {
@ -2485,8 +2512,10 @@ static bool mount_cd (UnitInfo *uinfo, int nr, uae_u32 *ctime, uae_u64 *uniq)
uinfo->wasisempty = false;
if (!ii.unknown_media) {
uinfo->volname = my_strdup (ii.volumename);
if (ctime)
*ctime = ii.creation;
if (ctime) {
ctime->tv_sec = ii.creation;
ctime->tv_usec = 0;
}
set_highcyl (uinfo, ii.totalblocks);
#ifdef RETROPLATFORM
rp_cd_image_change (uinfo->cddevno, ii.devname);
@ -2496,9 +2525,6 @@ static bool mount_cd (UnitInfo *uinfo, int nr, uae_u32 *ctime, uae_u64 *uniq)
uinfo->unknown_media = ii.unknown_media;
}
uinfo->cd_open = true;
return true;
}
@ -2534,28 +2560,29 @@ static void filesys_start_thread (UnitInfo *ui, int nr)
static uae_u32 REGPARAM2 startup_handler (TrapContext *context)
{
/* Just got the startup packet. It's in A4. DosBase is in A2,
/* Just got the startup packet. It's in D3. DosBase is in A2,
* our allocated volume structure is in A3, A5 is a pointer to
* our port. */
uaecptr rootnode = get_long (m68k_areg (regs, 2) + 34);
uaecptr dos_info = get_long (rootnode + 24) << 2;
uaecptr pkt = m68k_dreg (regs, 3);
uaecptr arg1 = get_long (pkt + dp_Arg1);
uaecptr arg2 = get_long (pkt + dp_Arg2);
uaecptr arg3 = get_long (pkt + dp_Arg3);
uaecptr devnode;
int nr;
TCHAR *devname = bstr1 (get_long (pkt + dp_Arg1) << 2);
TCHAR *s;
Unit *unit;
UnitInfo *uinfo;
int late = 0;
int ed, ef;
uae_u64 uniq = 0;
uae_u32 cdays, ctime = 0;
uae_u32 cdays;
struct mytimeval ctime = { 0 };
/* find UnitInfo with correct device name */
s = _tcschr (devname, ':');
if (s)
*s = '\0';
// 1.3:
// dp_Arg1 contains crap (Should be name of device)
// dp_Arg2 = works as documented
// dp_Arg3 = NULL (!?). (Should be DeviceNode)
for (nr = 0; nr < MAX_FILESYSTEM_UNITS; nr++) {
/* Hardfile volume name? */
@ -2568,12 +2595,14 @@ static uae_u32 REGPARAM2 startup_handler (TrapContext *context)
}
if (nr == MAX_FILESYSTEM_UNITS) {
write_log (_T("Failed attempt to mount device '%s'\n"), devname);
write_log (_T("Attempt to mount unknown filesystem device\n"));
put_long (pkt + dp_Res1, DOS_FALSE);
put_long (pkt + dp_Res2, ERROR_DEVICE_NOT_MOUNTED);
return 0;
}
uinfo = mountinfo.ui + nr;
//devnode = arg3 << 2;
devnode = uinfo->devicenode;
cdays = 3800 + nr;
if (uinfo->unit_type == UNIT_CDFS) {
@ -2587,7 +2616,7 @@ static uae_u32 REGPARAM2 startup_handler (TrapContext *context)
ed = my_existsdir (uinfo->rootdir);
ef = my_existsfile (uinfo->rootdir);
if (!uinfo->wasisempty && !ef && !ed) {
write_log (_T("Failed attempt to mount device '%s'\n"), devname);
write_log (_T("Failed attempt to mount device '%s' (%s)\n"), uinfo->devname, uinfo->rootdir);
put_long (pkt + dp_Res1, DOS_FALSE);
put_long (pkt + dp_Res2, ERROR_DEVICE_NOT_MOUNTED);
return 0;
@ -2608,7 +2637,6 @@ static uae_u32 REGPARAM2 startup_handler (TrapContext *context)
unit->ui.volname, unit->volflags, uinfo->wasisempty, ed, ef, unit->ui.rootdir);
/* fill in our process in the device node */
devnode = get_long (pkt + dp_Arg3) << 2;
put_long (devnode + 8, unit->port);
unit->dosbase = m68k_areg (regs, 2);
@ -2637,7 +2665,7 @@ static uae_u32 REGPARAM2 startup_handler (TrapContext *context)
if (!uinfo->wasisempty && !uinfo->unknown_media) {
int isvirtual = unit->volflags & (MYVOLUMEINFO_ARCHIVE | MYVOLUMEINFO_CDFS);
/* Set volume if non-empty */
set_volume_name (unit, ctime);
set_volume_name (unit, &ctime);
if (!isvirtual)
fsdb_clean_dir (&unit->rootnode);
}
@ -2666,7 +2694,7 @@ static void
if (unit->volflags & MYVOLUMEINFO_ARCHIVE) {
ret = zfile_fs_usage_archive (unit->ui.rootdir, 0, &fsu);
fs = true;
media = filesys_isvolume (unit);
media = filesys_isvolume (unit) != 0;
} else if (unit->volflags & MYVOLUMEINFO_CDFS) {
struct isofs_info ii;
ret = isofs_mediainfo (unit->ui.cdfs_superblock, &ii) ? 0 : 1;
@ -2684,7 +2712,7 @@ static void
if (ret)
err = dos_errno ();
fs = true;
media = filesys_isvolume (unit);
media = filesys_isvolume (unit) != 0;
}
if (ret != 0) {
PUT_PCK_RES1 (packet, DOS_FALSE);
@ -3137,50 +3165,6 @@ static void
action_dup_lock_2 (unit, packet, k->aino->uniq);
}
/* convert time_t to/from AmigaDOS time */
static const int secs_per_day = 24 * 60 * 60;
static const int diff = (8 * 365 + 2) * (24 * 60 * 60);
static void
get_time (time_t t, long* days, long* mins, long* ticks)
{
/* time_t is secs since 1-1-1970 */
/* days since 1-1-1978 */
/* mins since midnight */
/* ticks past minute @ 50Hz */
t -= diff;
if (t < 0)
t = 0;
*days = t / secs_per_day;
t -= *days * secs_per_day;
*mins = t / 60;
t -= *mins * 60;
*ticks = t * 50;
}
static time_t
put_time (long days, long mins, long ticks)
{
time_t t;
if (days < 0)
days = 0;
if (days > 9900 * 365)
days = 9900 * 365; // in future far enough?
if (mins < 0 || mins >= 24 * 60)
mins = 0;
if (ticks < 0 || ticks >= 60 * 50)
ticks = 0;
t = ticks / 50;
t += mins * 60;
t += ((uae_u64)days) * secs_per_day;
t += diff;
return t;
}
static void free_exkey (Unit *unit, ExamineKey *ek)
{
if (--ek->aino->exnext_count == 0) {
@ -3273,8 +3257,8 @@ static void move_exkeys (Unit *unit, a_inode *from, a_inode *to)
static void
get_fileinfo (Unit *unit, dpacket packet, uaecptr info, a_inode *aino)
{
struct _stat64 statbuf;
long days, mins, ticks;
struct mystat statbuf;
int days, mins, ticks;
int i, n, entrytype, blocksize;
int fsdb_can = fsdb_cando (unit);
TCHAR *xs;
@ -3288,7 +3272,7 @@ static void
else if (unit->volflags & MYVOLUMEINFO_CDFS)
ok = isofs_stat (unit->ui.cdfs_superblock, aino->uniq_external, &statbuf);
else
stat (aino->nname, &statbuf);
my_stat (aino->nname, &statbuf);
if (!ok) {
PUT_PCK_RES1 (packet, DOS_FALSE);
@ -3324,14 +3308,14 @@ static void
xfree (x2);
put_long (info + 116, fsdb_can ? aino->amigaos_mode : fsdb_mode_supported (aino));
put_long (info + 124, statbuf.st_size > MAXFILESIZE32 ? MAXFILESIZE32 : (uae_u32)statbuf.st_size);
put_long (info + 124, statbuf.size > MAXFILESIZE32 ? MAXFILESIZE32 : (uae_u32)statbuf.size);
#ifdef HAVE_ST_BLOCKS
put_long (info + 128, statbuf.st_blocks);
#else
blocksize = (unit->volflags & MYVOLUMEINFO_CDFS) ? 2048 : 512;
put_long (info + 128, (statbuf.st_size + blocksize - 1) / blocksize);
put_long (info + 128, (statbuf.size + blocksize - 1) / blocksize);
#endif
get_time (statbuf.st_mtime, &days, &mins, &ticks);
timeval_to_amiga (&statbuf.mtime, &days, &mins, &ticks);
put_long (info + 132, days);
put_long (info + 136, mins);
put_long (info + 140, ticks);
@ -3589,8 +3573,8 @@ static int exalldo (uaecptr exalldata, uae_u32 exalldatasize, uae_u32 type, uaec
int entrytype;
TCHAR *xs = NULL, *commentx = NULL;
uae_u32 flags = 15;
long days, mins, ticks;
struct _stat64 statbuf;
int days, mins, ticks;
struct mystat statbuf;
int fsdb_can = fsdb_cando (unit);
uae_u16 uid = 0, gid = 0;
char *x = NULL, *comment = NULL;
@ -3602,7 +3586,7 @@ static int exalldo (uaecptr exalldata, uae_u32 exalldatasize, uae_u32 type, uaec
else if (unit->volflags & MYVOLUMEINFO_CDFS)
isofs_stat (unit->ui.cdfs_superblock, aino->uniq_external, &statbuf);
else
stat (aino->nname, &statbuf);
my_stat (aino->nname, &statbuf);
if (aino->parent == 0) {
entrytype = 2;
@ -3629,7 +3613,7 @@ static int exalldo (uaecptr exalldata, uae_u32 exalldatasize, uae_u32 type, uaec
size2 += 4;
}
if (type >= 5) {
get_time (statbuf.st_mtime, &days, &mins, &ticks);
timeval_to_amiga (&statbuf.mtime, &days, &mins, &ticks);
size2 += 12;
}
if (type >= 6) {
@ -3673,7 +3657,7 @@ static int exalldo (uaecptr exalldata, uae_u32 exalldatasize, uae_u32 type, uaec
if (type >= 2)
put_long (exp + 8, entrytype);
if (type >= 3)
put_long (exp + 12, statbuf.st_size > MAXFILESIZE32 ? MAXFILESIZE32 : statbuf.st_size);
put_long (exp + 12, statbuf.size > MAXFILESIZE32 ? MAXFILESIZE32 : statbuf.size);
if (type >= 4)
put_long (exp + 16, flags);
if (type >= 5) {
@ -4304,20 +4288,16 @@ static void
/* change file/dir's parent dir modification time */
static void updatedirtime (a_inode *a1, int now)
{
struct _stat64 statbuf;
struct utimbuf ut;
long days, mins, ticks;
struct mystat statbuf;
if (!a1->parent)
return;
if (!now) {
if (stat (a1->nname, &statbuf) == -1)
if (!my_stat (a1->nname, &statbuf))
return;
get_time (statbuf.st_mtime, &days, &mins, &ticks);
ut.actime = ut.modtime = put_time (days, mins, ticks);
utime (a1->parent->nname, &ut);
my_utime (a1->parent->nname, &statbuf.mtime);
} else {
utime (a1->parent->nname, NULL);
my_utime (a1->parent->nname, NULL);
}
}
@ -5038,7 +5018,7 @@ static void
uaecptr name = GET_PCK_ARG3 (packet) << 2;
uaecptr date = GET_PCK_ARG4 (packet);
a_inode *a;
struct utimbuf ut;
struct mytimeval tv;
int err;
TRACE((_T("ACTION_SET_DATE(0x%lx,\"%s\")\n"), lock, bstr (unit, name)));
@ -5049,10 +5029,10 @@ static void
return;
}
ut.actime = ut.modtime = put_time (get_long (date), get_long (date + 4),
get_long (date + 8));
amiga_to_timeval (&tv, get_long (date), get_long (date + 4), get_long (date + 8));
a = find_aino (unit, lock, bstr (unit, name), &err);
if (err == 0 && utime (a->nname, &ut) == -1)
write_log (_T("%llu.%u (%d,%d,%d) %s\n"), tv.tv_sec, tv.tv_usec, get_long (date), get_long (date + 4), get_long (date + 8), a->nname);
if (err == 0 && !my_utime (a->nname, &tv))
err = dos_errno ();
if (err != 0) {
PUT_PCK_RES1 (packet, DOS_FALSE);
@ -5746,12 +5726,7 @@ static void init_filesys_diagentry (void)
do_put_mem_long ((uae_u32 *)(filesysory + 0x2104), filesys_configdev);
do_put_mem_long ((uae_u32 *)(filesysory + 0x2108), EXPANSION_doslibname);
do_put_mem_word ((uae_u16 *)(filesysory + 0x210e), nr_units ());
if (currprefs.scsi && currprefs.win32_automount_cddrives && USE_CDFS == 1)
do_put_mem_word ((uae_u16 *)(filesysory + 0x210c), scsi_get_cd_drive_mask ());
else
do_put_mem_word ((uae_u16 *)(filesysory + 0x210c), 0);
if (USE_CDFS != 2)
cd_unit_offset = MAX_FILESYSTEM_UNITS;
do_put_mem_word ((uae_u16 *)(filesysory + 0x210c), 0);
native2amiga_startup ();
}
@ -5963,12 +5938,9 @@ static uae_u32 REGPARAM2 filesys_dev_bootfilesys (TrapContext *context)
int type;
if (iscd) {
#if USE_CDFS == 2
if (!get_long (devicenode + 16))
put_long (devicenode + 16, cdfs_handlername);
return 0;
#endif
type = FILESYS_CD;
} else {
type = is_hardfile (unit_no);
}
@ -6038,15 +6010,8 @@ static uae_u32 REGPARAM2 filesys_dev_remember (TrapContext *context)
uae_u8 *fs;
uip->devicenode = devicenode;
if (iscd && USE_CDFS == 1) {
fssize = cdfs_handler_len;
fs = cdfs_handler;
if (get_long (devicenode + 5 * 4) < 10000) // stack
put_long (devicenode + 5 * 4, 10000);
} else {
fssize = uip->rdb_filesyssize;
fs = uip->rdb_filesysstore;
}
fssize = uip->rdb_filesyssize;
fs = uip->rdb_filesysstore;
/* copy filesystem loaded from RDB */
if (get_long (parmpacket + PP_FSPTR)) {
@ -6054,13 +6019,11 @@ static uae_u32 REGPARAM2 filesys_dev_remember (TrapContext *context)
put_byte (get_long (parmpacket + PP_FSPTR) + i, fs[i]);
}
if (!iscd || USE_CDFS == 2) {
xfree (fs);
uip->rdb_filesysstore = 0;
uip->rdb_filesyssize = 0;
if (m68k_dreg (regs, 3) >= 0)
uip->startup = get_long (devicenode + 28);
}
xfree (fs);
uip->rdb_filesysstore = 0;
uip->rdb_filesyssize = 0;
if (m68k_dreg (regs, 3) >= 0)
uip->startup = get_long (devicenode + 28);
return devicenode;
}
@ -6593,7 +6556,7 @@ static void get_new_device (int type, uaecptr parmpacket, TCHAR **devname, uaecp
int un = unit_no;
for (;;) {
_stprintf (buffer, type == FILESYS_CD ? _T("CD%d") : _T("DH%d"), un++);
if (type == FILESYS_CD && USE_CDFS == 2)
if (type == FILESYS_CD)
*devname = my_strdup (buffer);
if (!device_isdup (expbase, buffer))
break;
@ -6633,14 +6596,10 @@ static uae_u32 REGPARAM2 filesys_dev_storeinfo (TrapContext *context)
return -2;
type = FILESYS_CD;
if (USE_CDFS == 2) {
get_new_device (type, parmpacket, &uip[unit_no].devname, &uip[unit_no].devname_amiga, cd_unit_no);
cdname_amiga = uip[unit_no].devname_amiga;
uip[unit_no].devno = unit_no;
type = FILESYS_VIRTUAL;
} else {
get_new_device (type, parmpacket, &cdname, &cdname_amiga, cd_unit_no);
}
get_new_device (type, parmpacket, &uip[unit_no].devname, &uip[unit_no].devname_amiga, cd_unit_no);
cdname_amiga = uip[unit_no].devname_amiga;
uip[unit_no].devno = unit_no;
type = FILESYS_VIRTUAL;
gui_flicker_led (LED_CD, cd_unit_no, -1);
write_log (_T("Mounting uaescsi.device %d: (%d)\n"), cd_unit_no, unit_no);
@ -6662,34 +6621,12 @@ static uae_u32 REGPARAM2 filesys_dev_storeinfo (TrapContext *context)
put_long (parmpacket + 60, 50); /* Number of buffers */
put_long (parmpacket + 64, 1); /* Buffer mem type */
put_long (parmpacket + 68, 0x7FFFFFFE); /* largest transfer */
put_long (parmpacket + 72, 0x7FFFFFFE); /* addrressMask (?) */
put_long (parmpacket + 72, 0xFFFFFFFE); /* dma mask */
put_long (parmpacket + 76, scsi_get_cd_drive_media_mask () & (1 << cd_unit_no) ? -127 : -128); /* bootPri */
put_long (parmpacket + 80, CDFS_DOSTYPE | (((cd_unit_no / 10) + '0') << 8) | ((cd_unit_no % 10) + '0'));
put_long (parmpacket + 84, 0); /* baud */
put_long (parmpacket + 88, cdfs_control);
put_long (parmpacket + 88, 0); /* control */
put_long (parmpacket + 92, 0); /* bootblocks */
#if USE_CDFS == 1
uaecptr fsres = get_long (parmpacket + PP_FSRES);
bool cdfs = false;
if (fsres) {
uaecptr fsnode = get_long (fsres + 18);
while (get_long (fsnode)) {
if (get_long (fsnode + 14) == CDFS_DOSTYPE) {
cdfs = true;
break;
}
fsnode = get_long (fsnode);
}
} else {
write_log (_T("CDFS: FileSystem.resource not found, this shouldn't happen!\n"));
cdfs = true;
}
if (!cdfs) {
put_long (parmpacket + PP_FSSIZE, cdfs_handler_len);
addfakefilesys (parmpacket, CDFS_DOSTYPE);
}
#endif
return type;
} else {
@ -6716,7 +6653,7 @@ static uae_u32 REGPARAM2 filesys_dev_storeinfo (TrapContext *context)
put_long (parmpacket + 60, 50); /* Number of buffers */
put_long (parmpacket + 64, 1); /* Buffer mem type */
put_long (parmpacket + 68, 0x7FFFFFFE); /* largest transfer */
put_long (parmpacket + 72, 0x7FFFFFFE); /* addMask (?) */
put_long (parmpacket + 72, 0xFFFFFFFE); /* dma mask */
put_long (parmpacket + 76, uip[unit_no].bootpri); /* bootPri */
put_long (parmpacket + 80, DISK_TYPE_DOS); /* DOS\0 */
if (type == FILESYS_VIRTUAL) {
@ -6843,13 +6780,8 @@ void filesys_install (void)
fsdevname = ds_ansi ("uae.device"); /* does not really exist */
fshandlername = ds_bstr_ansi ("uaefs");
#if USE_CDFS
cdfs_devname = ds_ansi ("uaescsi.device");
cdfs_handlername = ds_bstr_ansi ("uaecdfs");
#if USE_CDFS == 1
cdfs_control = ds_bstr_ansi ("ROCKRIDGE JOLIET MAYBELOWERCASE SCANINTERVAL=-1 DE=.1 RE=.2");
#endif
#endif
ROM_filesys_diagentry = here ();
calltrap (deftrap2 (filesys_diagentry, 0, _T("filesys_diagentry")));
dw(0x4ED0); /* JMP (a0) - jump to code that inits Residents */
@ -6918,16 +6850,8 @@ void filesys_install_code (void)
EXPANSION_bootcode = a + bootrom_header + bootrom_items * 4 - 4;
b = a + bootrom_header + 3 * 4 - 4;
filesys_initcode = a + dlg (b) + bootrom_header - 4;
#if USE_CDFS == 1
cdfs_handler = zfile_load_data (_T("cdfs.gz"), cdfs_rom, cdfs_rom_len, &cdfs_handler_len);
#endif
}
#if USE_CDFS == 1
#include "cdrom-handler.cpp"
#endif
#ifdef _WIN32
#include "od-win32/win32_filesys.cpp"
#endif

File diff suppressed because it is too large Load Diff

View File

@ -95,14 +95,16 @@ static void kill_fsdb (a_inode *dir)
xfree (n);
}
static void fsdb_fixup (FILE *f, TCHAR *buf, int size, a_inode *base)
static void fsdb_fixup (FILE *f, uae_u8 *buf, int size, a_inode *base)
{
TCHAR *nname;
int ret;
if (buf[0] == 0)
return;
nname = build_nname (base->nname, buf + 5 + 257);
TCHAR *fnname = au ((char*)buf + 5 + 257);
nname = build_nname (base->nname, fnname);
xfree (fnname);
ret = fsdb_exists (nname);
if (ret) {
xfree (nname);
@ -117,7 +119,7 @@ static void fsdb_fixup (FILE *f, TCHAR *buf, int size, a_inode *base)
/* Prune the db file the first time this directory is opened in a session. */
void fsdb_clean_dir (a_inode *dir)
{
TCHAR buf[1 + 4 + 257 + 257 + 81];
uae_u8 buf[1 + 4 + 257 + 257 + 81];
TCHAR *n;
FILE *f;
off_t pos1 = 0, pos2;
@ -145,7 +147,11 @@ void fsdb_clean_dir (a_inode *dir)
pos1 += sizeof buf;
}
fclose (f);
my_truncate (n, pos1);
if (pos1 == 0) {
kill_fsdb (dir);
} else {
my_truncate (n, pos1);
}
xfree (n);
}
@ -275,7 +281,7 @@ static void write_aino (FILE *f, a_inode *aino)
{
uae_u8 buf[1 + 4 + 257 + 257 + 81] = { 0 };
buf[0] = aino->needs_dbentry;
buf[0] = aino->needs_dbentry ? 1 : 0;
do_put_mem_long ((uae_u32 *)(buf + 1), aino->amigaos_mode);
ua_copy ((char*)buf + 5, 256, aino->aname);
buf[5 + 256] = '\0';

View File

@ -106,8 +106,6 @@ struct hd_hardfiledata {
#define MAX_FILESYSTEM_UNITS 30
#define USE_CDFS 2
struct uaedev_mount_info;
extern struct uaedev_mount_info options_mountinfo;

View File

@ -153,6 +153,10 @@ extern int my_existsfile (const TCHAR *name);
extern int my_existsdir (const TCHAR *name);
extern FILE *my_opentext (const TCHAR*);
extern bool my_stat (const TCHAR *name, struct mystat *ms);
extern bool my_utime (const TCHAR *name, struct mytimeval *tv);
extern bool my_chmod (const TCHAR *name, uae_u32 mode);
extern char *custom_fsdb_search_dir (const char *dirname, TCHAR *rel);
extern a_inode *custom_fsdb_lookup_aino_aname (a_inode *base, const TCHAR *aname);
extern a_inode *custom_fsdb_lookup_aino_nname (a_inode *base, const TCHAR *nname);

View File

@ -20,7 +20,7 @@ bool isofs_mediainfo(void *sb, struct isofs_info*);
struct cd_opendir_s *isofs_opendir(void *sb, uae_u64 uniq);
void isofs_closedir(struct cd_opendir_s*);
bool isofs_readdir(struct cd_opendir_s*, TCHAR*, uae_u64 *uniq);
bool isofs_stat(void *sb, uae_u64, struct _stat64*);
bool isofs_stat(void *sb, uae_u64, struct mystat*);
void isofss_fill_file_attrs(void *sb, uae_u64, int*, int*, TCHAR**, uae_u64);
bool isofs_exists(void *sb, uae_u64, const TCHAR*, uae_u64*);
void isofs_dispose_inode(void *sb, uae_u64);

View File

@ -9,7 +9,7 @@
#define UAEMAJOR 2
#define UAEMINOR 5
#define UAESUBREV 0
#define UAESUBREV 1
typedef enum { KBD_LANG_US, KBD_LANG_DK, KBD_LANG_DE, KBD_LANG_SE, KBD_LANG_FR, KBD_LANG_IT, KBD_LANG_ES } KbdLang;

View File

@ -352,27 +352,6 @@ struct direct
#define S_IRUSR FILEFLAG_READ
#define S_IXUSR FILEFLAG_EXECUTE
/* These are prototypes for functions from the Win32 posixemu file */
extern void get_time (time_t t, long* days, long* mins, long* ticks);
extern time_t put_time (long days, long mins, long ticks);
/* #define DONT_HAVE_POSIX - don't need all of Mathias' posixemu_functions, just a subset (below) */
#define chmod(a,b) posixemu_chmod ((a), (b))
extern int posixemu_chmod (const TCHAR *, int);
#define stat(a,b) posixemu_stat ((a), (b))
extern int posixemu_stat (const TCHAR *, struct _stat64 *);
#define mkdir(x,y) mkdir(x)
#define truncate posixemu_truncate
extern int posixemu_truncate (const TCHAR *, long int);
#define utime posixemu_utime
extern int posixemu_utime (const TCHAR *, struct utimbuf *);
#define opendir posixemu_opendir
extern DIR * posixemu_opendir (const TCHAR *);
#define readdir posixemu_readdir
extern struct dirent* posixemu_readdir (DIR *);
#define closedir posixemu_closedir
extern void posixemu_closedir (DIR *);
#endif
#endif /* _WIN32 */

View File

@ -49,7 +49,7 @@ struct znode {
struct zfile *f;
TCHAR *comment;
int flags;
time_t mtime;
struct mytimeval mtime;
/* decompressor specific */
unsigned int offset;
unsigned int offset2;
@ -81,7 +81,7 @@ struct zarchive_info
uae_s64 size;
int flags;
TCHAR *comment;
time_t t;
struct mytimeval tv;
};
#define ArchiveFormat7Zip '7z '

View File

@ -116,7 +116,7 @@ extern struct zvolume *zfile_fopen_archive (const TCHAR *filename, int flags);
extern struct zvolume *zfile_fopen_archive_root (const TCHAR *filename, int flags);
extern void zfile_fclose_archive (struct zvolume *zv);
extern int zfile_fs_usage_archive (const TCHAR *path, const TCHAR *disk, struct fs_usage *fsp);
extern int zfile_stat_archive (const TCHAR *path, struct _stat64 *statbuf);
extern int zfile_stat_archive (const TCHAR *path, struct mystat *statbuf);
extern struct zdirectory *zfile_opendir_archive (const TCHAR *path);
extern struct zdirectory *zfile_opendir_archive (const TCHAR *path, int flags);
extern void zfile_closedir_archive (struct zdirectory *);
@ -131,3 +131,18 @@ extern void zfile_close_archive (struct zfile *d);
extern struct zfile *zfile_open_archive (const TCHAR *path, int flags);
extern int zfile_exists_archive (const TCHAR *path, const TCHAR *rel);
extern bool zfile_needwrite (struct zfile*);
struct mytimeval
{
uae_s64 tv_sec;
uae_s32 tv_usec;
};
struct mystat
{
uae_s64 size;
uae_u32 mode;
struct mytimeval mtime;
};
extern void timeval_to_amiga (struct mytimeval *tv, int* days, int* mins, int* ticks);
extern void amiga_to_timeval (struct mytimeval *tv, int days, int mins, int ticks);

View File

@ -1744,7 +1744,7 @@ static int getvelocity (int num, int subnum, int pct)
return v;
}
#define MOUSEXY_MAX 1024
#define MOUSEXY_MAX 16384
static void mouseupdate (int pct, bool vsync)
{
@ -2866,6 +2866,13 @@ static int handle_input_event (int nr, int state, int max, int autofire, bool ca
if (nr <= 0 || nr == INPUTEVENT_SPC_CUSTOM_EVENT)
return 0;
#ifdef _WIN32
// ignore norrmal GUI event if forced gui key is in use
if (currprefs.win32_guikey >= 0 && nr == INPUTEVENT_SPC_ENTERGUI)
return 0;
#endif
ie = &events[nr];
if (isqual (nr))
return 0; // qualifiers do nothing

View File

@ -24,6 +24,7 @@
#include "events.h"
#include "uae.h"
#include "disk.h"
#include "fsdb.h"
#if INPUTRECORD_DEBUG > 0
#include "memory.h"
@ -516,16 +517,16 @@ void inprec_close (bool clear)
static void setwriteprotect (const TCHAR *fname, bool readonly)
{
struct _stat64 st;
struct mystat st;
int mode, oldmode;
if (stat (fname, &st))
if (my_stat (fname, &st))
return;
oldmode = mode = st.st_mode;
oldmode = mode = st.mode;
mode &= ~FILEFLAG_WRITE;
if (!readonly)
mode |= FILEFLAG_WRITE;
if (mode != oldmode)
chmod (fname, mode);
my_chmod (fname, mode);
}
void inprec_playdiskchange (void)

View File

@ -14,7 +14,7 @@
#include "options.h"
#include "blkdev.h"
#include "isofs_api.h"
#include "fsdb.h"
#include "zfile.h"
#include "isofs.h"
@ -2506,20 +2506,18 @@ void isofss_fill_file_attrs(void *sbp, uae_u64 parent, int *dir, int *flags, TCH
*comment = my_strdup(inode->i_comment);
}
bool isofs_stat(void *sbp, uae_u64 uniq, struct _stat64 *statbuf)
bool isofs_stat(void *sbp, uae_u64 uniq, struct mystat *statbuf)
{
struct super_block *sb = (struct super_block*)sbp;
struct inode *inode = find_inode(sb, uniq);
if (!inode)
return false;
statbuf->st_mode = FILEFLAG_READ;
statbuf->st_mtime = inode->i_mtime.tv_sec;
if (XS_ISDIR(inode->i_mode)) {
statbuf->st_mode |= FILEFLAG_DIR;
} else {
statbuf->st_size = inode->i_size;
statbuf->mtime.tv_sec = inode->i_mtime.tv_sec;
statbuf->mtime.tv_usec = 0;
if (!XS_ISDIR(inode->i_mode)) {
statbuf->size = inode->i_size;
}
return true;
}

View File

@ -263,11 +263,11 @@ void fixup_prefs (struct uae_prefs *p)
err = 1;
}
if ((p->rtgmem_size & (p->rtgmem_size - 1)) != 0
|| (p->rtgmem_size != 0 && (p->rtgmem_size < 0x100000 || p->rtgmem_size > max_z3fastmem / 2)))
|| (p->rtgmem_size != 0 && (p->rtgmem_size < 0x100000 || p->rtgmem_size > max_z3fastmem)))
{
write_log (_T("Unsupported graphics card memory size %x (%x)!\n"), p->rtgmem_size, max_z3fastmem / 2);
if (p->rtgmem_size > max_z3fastmem / 2)
p->rtgmem_size = max_z3fastmem / 2;
write_log (_T("Unsupported graphics card memory size %x (%x)!\n"), p->rtgmem_size, max_z3fastmem);
if (p->rtgmem_size > max_z3fastmem)
p->rtgmem_size = max_z3fastmem;
else
p->rtgmem_size = 0;
err = 1;

View File

@ -27,21 +27,25 @@
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='TestRelease|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@ -78,7 +78,7 @@ struct MultiDisplay {
struct PicassoResolution *DisplayModes;
RECT rect;
};
extern struct MultiDisplay Displays[MAX_DISPLAYS];
extern struct MultiDisplay Displays[MAX_DISPLAYS + 1];
typedef enum
{

View File

@ -4,8 +4,11 @@
#include "memory.h"
#include "fsdb.h"
#include "zfile.h"
#include "win32.h"
#include <windows.h>
#include <sys/timeb.h>
bool my_isfilehidden (const TCHAR *path)
{
@ -560,3 +563,157 @@ FILE *my_opentext (const TCHAR *name)
}
return _tfopen (name, _T("r"));
}
bool my_stat (const TCHAR *name, struct mystat *statbuf)
{
DWORD attr, ok;
FILETIME ft, lft;
HANDLE h;
BY_HANDLE_FILE_INFORMATION fi;
const TCHAR *namep;
TCHAR path[MAX_DPATH];
if (currprefs.win32_filesystem_mangle_reserved_names == false) {
_tcscpy (path, PATHPREFIX);
_tcscat (path, name);
namep = path;
} else {
namep = name;
}
// FILE_FLAG_BACKUP_SEMANTICS = can also "open" directories
h = CreateFile (namep, 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, NULL);
if (h == INVALID_HANDLE_VALUE) {
write_log (_T("Stat CreateFile(%s) failed: %d\n"), name, GetLastError ());
return false;
}
ok = GetFileInformationByHandle (h, &fi);
CloseHandle (h);
attr = 0;
ft.dwHighDateTime = ft.dwLowDateTime = 0;
if (ok) {
attr = fi.dwFileAttributes;
ft = fi.ftLastWriteTime;
statbuf->size = ((uae_u64)fi.nFileSizeHigh << 32) | fi.nFileSizeLow;
} else {
write_log (_T("GetFileInformationByHandle(%s) failed: %d\n"), namep, GetLastError ());
return false;
}
statbuf->mode = (attr & FILE_ATTRIBUTE_READONLY) ? FILEFLAG_READ : FILEFLAG_READ | FILEFLAG_WRITE;
if (attr & FILE_ATTRIBUTE_ARCHIVE)
statbuf->mode |= FILEFLAG_ARCHIVE;
if (attr & FILE_ATTRIBUTE_DIRECTORY)
statbuf->mode |= FILEFLAG_DIR;
FileTimeToLocalFileTime (&ft,&lft);
uae_u64 t = (*(__int64 *)&lft-((__int64)(369*365+89)*(__int64)(24*60*60)*(__int64)10000000));
statbuf->mtime.tv_sec = t / 10000000;
statbuf->mtime.tv_usec = (t / 10) % 1000000;
return true;
}
bool my_chmod (const TCHAR *name, uae_u32 mode)
{
DWORD attr = FILE_ATTRIBUTE_NORMAL;
if (!(mode & FILEFLAG_WRITE))
attr |= FILE_ATTRIBUTE_READONLY;
if (mode & FILEFLAG_ARCHIVE)
attr |= FILE_ATTRIBUTE_ARCHIVE;
if (SetFileAttributesSafe (name, attr))
return true;
return false;
}
static void tmToSystemTime (struct tm *tmtime, LPSYSTEMTIME systime)
{
if (tmtime == NULL) {
GetSystemTime (systime);
} else {
systime->wDay = tmtime->tm_mday;
systime->wDayOfWeek = tmtime->tm_wday;
systime->wMonth = tmtime->tm_mon + 1;
systime->wYear = tmtime->tm_year + 1900;
systime->wHour = tmtime->tm_hour;
systime->wMinute = tmtime->tm_min;
systime->wSecond = tmtime->tm_sec;
systime->wMilliseconds = 0;
}
}
static int setfiletime (const TCHAR *name, int days, int minute, int tick, int tolocal)
{
FILETIME LocalFileTime, FileTime;
HANDLE hFile;
const TCHAR *namep;
TCHAR path[MAX_DPATH];
if (currprefs.win32_filesystem_mangle_reserved_names == false) {
_tcscpy (path, PATHPREFIX);
_tcscat (path, name);
namep = path;
} else {
namep = name;
}
if ((hFile = CreateFile (namep, GENERIC_WRITE,FILE_SHARE_READ | FILE_SHARE_WRITE,NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, NULL)) == INVALID_HANDLE_VALUE)
return 0;
for (;;) {
ULARGE_INTEGER lft;
lft.QuadPart = (((uae_u64)(377*365+91+days)*(uae_u64)1440+(uae_u64)minute)*(uae_u64)(60*50)+(uae_u64)tick)*(uae_u64)200000;
LocalFileTime.dwHighDateTime = lft.HighPart;
LocalFileTime.dwLowDateTime = lft.LowPart;
if (tolocal) {
if (!LocalFileTimeToFileTime (&LocalFileTime, &FileTime))
FileTime = LocalFileTime;
} else {
FileTime = LocalFileTime;
}
if (!SetFileTime (hFile, &FileTime, &FileTime, &FileTime)) {
if (days > 47846) { // > 2108-12-31 (fat limit)
days = 47846;
continue;
}
if (days < 730) { // < 1980-01-01 (fat limit)
days = 730;
continue;
}
}
break;
}
CloseHandle (hFile);
return 1;
}
bool my_utime (const TCHAR *name, struct mytimeval *tv)
{
int result = -1, tolocal;
int days, mins, ticks;
struct mytimeval tv2;
if (!tv) {
struct timeb time;
ftime (&time);
tv2.tv_sec = time.time;
tv2.tv_usec = time.millitm * 1000;
tolocal = 0;
} else {
tv2.tv_sec = tv->tv_sec;
tv2.tv_usec = tv->tv_usec;
tolocal = 1;
}
timeval_to_amiga (&tv2, &days, &mins, &ticks);
if (setfiletime (name, days, mins, ticks, tolocal))
return true;
return false;
}

View File

@ -27,21 +27,25 @@
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='TestRelease|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@ -27,22 +27,26 @@
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='TestRelease|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<UseOfAtl>false</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@ -27,21 +27,25 @@
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='TestRelease|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@ -25,15 +25,18 @@
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@ -388,7 +388,6 @@ void my_kbd_handler (int keyboard, int scancode, int newstate)
{
int code = 0;
int scancode_new;
int defaultguikey;
bool amode = currprefs.input_keyboard_type == 0;
bool special = false;
static int swapperdrive = 0;
@ -414,13 +413,23 @@ void my_kbd_handler (int keyboard, int scancode, int newstate)
if (!specialpressed () && inputdevice_iskeymapped (keyboard, scancode))
scancode = 0;
defaultguikey = amode ? DIK_F12 : DIK_NUMLOCK;
// GUI must be always available
if (scancode_new == defaultguikey && currprefs.win32_guikey < 0)
scancode = scancode_new;
if (scancode_new == currprefs.win32_guikey && scancode_new != defaultguikey)
scancode = scancode_new;
if (newstate) {
int defaultguikey = amode ? DIK_F12 : DIK_NUMLOCK;
if (currprefs.win32_guikey >= 0) {
if (scancode_new == defaultguikey && currprefs.win32_guikey != scancode_new) {
scancode = 0;
if (specialpressed () && ctrlpressed() && shiftpressed() && altpressed ())
inputdevice_add_inputcode (AKS_ENTERGUI, 1);
} else if (scancode_new == currprefs.win32_guikey ) {
inputdevice_add_inputcode (AKS_ENTERGUI, 1);
scancode = 0;
}
} else if (!specialpressed () && !ctrlpressed() && !shiftpressed() && !altpressed () && scancode_new == defaultguikey) {
inputdevice_add_inputcode (AKS_ENTERGUI, 1);
scancode = 0;
}
}
//write_log (_T("keyboard = %d scancode = 0x%02x state = %d\n"), keyboard, scancode, newstate );
if (newstate && code == 0 && amode) {

View File

@ -72,25 +72,6 @@ void gettimeofday (struct timeval *tv, void *blah)
#endif
}
/* convert time_t to/from AmigaDOS time */
#define secs_per_day (24 * 60 * 60)
#define diff ((8 * 365 + 2) * secs_per_day)
static void get_time (time_t t, long *days, long *mins, long *ticks)
{
/* time_t is secs since 1-1-1970 */
/* days since 1-1-1978 */
/* mins since midnight */
/* ticks past minute @ 50Hz */
t -= diff;
*days = t / secs_per_day;
t -= *days * secs_per_day;
*mins = t / 60;
t -= *mins * 60;
*ticks = t * 50;
}
#if 0
static DWORD getattr (const TCHAR *name, LPFILETIME lpft, uae_s64 *size)
{
@ -112,151 +93,6 @@ static DWORD getattr (const TCHAR *name, LPFILETIME lpft, uae_s64 *size)
}
#endif
int posixemu_stat (const TCHAR *name, struct _stat64 *statbuf)
{
DWORD attr, ok;
FILETIME ft, lft;
HANDLE h;
BY_HANDLE_FILE_INFORMATION fi;
const TCHAR *namep;
TCHAR path[MAX_DPATH];
if (currprefs.win32_filesystem_mangle_reserved_names == false) {
_tcscpy (path, PATHPREFIX);
_tcscat (path, name);
namep = path;
} else {
namep = name;
}
// FILE_FLAG_BACKUP_SEMANTICS = can also "open" directories
h = CreateFile (namep, 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, NULL);
if (h == INVALID_HANDLE_VALUE) {
write_log (_T("Stat CreateFile(%s) failed: %d\n"), name, GetLastError ());
return -1;
}
ok = GetFileInformationByHandle (h, &fi);
CloseHandle (h);
attr = 0;
ft.dwHighDateTime = ft.dwLowDateTime = 0;
if (ok) {
attr = fi.dwFileAttributes;
ft = fi.ftLastWriteTime;
statbuf->st_size = ((uae_u64)fi.nFileSizeHigh << 32) | fi.nFileSizeLow;
} else {
write_log (_T("GetFileInformationByHandle(%s) failed: %d\n"), namep, GetLastError ());
return -1;
}
statbuf->st_mode = (attr & FILE_ATTRIBUTE_READONLY) ? FILEFLAG_READ : FILEFLAG_READ | FILEFLAG_WRITE;
if (attr & FILE_ATTRIBUTE_ARCHIVE)
statbuf->st_mode |= FILEFLAG_ARCHIVE;
if (attr & FILE_ATTRIBUTE_DIRECTORY)
statbuf->st_mode |= FILEFLAG_DIR;
FileTimeToLocalFileTime (&ft,&lft);
statbuf->st_mtime = (long)((*(__int64 *)&lft-((__int64)(369*365+89)*(__int64)(24*60*60)*(__int64)10000000))/(__int64)10000000);
return 0;
}
int posixemu_chmod (const TCHAR *name, int mode)
{
DWORD attr = FILE_ATTRIBUTE_NORMAL;
if (!(mode & FILEFLAG_WRITE))
attr |= FILE_ATTRIBUTE_READONLY;
if (mode & FILEFLAG_ARCHIVE)
attr |= FILE_ATTRIBUTE_ARCHIVE;
if (SetFileAttributesSafe (name,attr))
return 1;
return -1;
}
static void tmToSystemTime (struct tm *tmtime, LPSYSTEMTIME systime)
{
if (tmtime == NULL) {
GetSystemTime (systime);
} else {
systime->wDay = tmtime->tm_mday;
systime->wDayOfWeek = tmtime->tm_wday;
systime->wMonth = tmtime->tm_mon + 1;
systime->wYear = tmtime->tm_year + 1900;
systime->wHour = tmtime->tm_hour;
systime->wMinute = tmtime->tm_min;
systime->wSecond = tmtime->tm_sec;
systime->wMilliseconds = 0;
}
}
static int setfiletime (const TCHAR *name, unsigned int days, int minute, int tick, int tolocal)
{
FILETIME LocalFileTime, FileTime;
HANDLE hFile;
const TCHAR *namep;
TCHAR path[MAX_DPATH];
if (currprefs.win32_filesystem_mangle_reserved_names == false) {
_tcscpy (path, PATHPREFIX);
_tcscat (path, name);
namep = path;
} else {
namep = name;
}
if ((hFile = CreateFile (namep, GENERIC_WRITE,FILE_SHARE_READ | FILE_SHARE_WRITE,NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, NULL)) == INVALID_HANDLE_VALUE)
return 0;
for (;;) {
ULARGE_INTEGER lft;
lft.QuadPart = (((uae_u64)(377*365+91+days)*(uae_u64)1440+(uae_u64)minute)*(uae_u64)(60*50)+(uae_u64)tick)*(uae_u64)200000;
LocalFileTime.dwHighDateTime = lft.HighPart;
LocalFileTime.dwLowDateTime = lft.LowPart;
if (tolocal) {
if (!LocalFileTimeToFileTime (&LocalFileTime, &FileTime))
FileTime = LocalFileTime;
} else {
FileTime = LocalFileTime;
}
if (!SetFileTime (hFile, &FileTime, &FileTime, &FileTime)) {
if (days > 47846) { // > 2108-12-31 (fat limit)
days = 47846;
continue;
}
if (days < 730) { // < 1980-01-01 (fat limit)
days = 730;
continue;
}
}
break;
}
CloseHandle (hFile);
return 1;
}
int posixemu_utime (const TCHAR *name, struct utimbuf *ttime)
{
int result = -1, tolocal;
long days, mins, ticks;
time_t actime;
if (!ttime) {
actime = time (NULL);
tolocal = 0;
} else {
tolocal = 1;
actime = ttime->actime;
}
get_time (actime, &days, &mins, &ticks);
if (setfiletime (name, days, mins, ticks, tolocal))
result = 0;
return result;
}
void uae_sem_init (uae_sem_t * event, int manual_reset, int initial_state)
{
if(*event) {

View File

@ -28,19 +28,23 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@ -7,7 +7,7 @@
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@ -1111,8 +1111,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,5,0,0
PRODUCTVERSION 2,5,0,0
FILEVERSION 2,5,1,0
PRODUCTVERSION 2,5,1,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -1128,12 +1128,12 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "WinUAE"
VALUE "FileVersion", "2.5.0.0"
VALUE "FileVersion", "2.5.1.0"
VALUE "InternalName", "WinUAE"
VALUE "LegalCopyright", "© 1996-2012 under the GNU Public License (GPL)"
VALUE "OriginalFilename", "WinUAE.exe"
VALUE "ProductName", "WinUAE"
VALUE "ProductVersion", "2.5.0.0"
VALUE "ProductVersion", "2.5.1.0"
END
END
BLOCK "VarFileInfo"

File diff suppressed because it is too large Load Diff

View File

@ -118,6 +118,12 @@ rm -rf ipch
rm -rf x64
cd ..
cd winuae_msvc11
rm -rf debug
rm -rf release
rm -rf fullrelease
cd ..
cd singlefilehelper
rm -rf debug
rm -rf release
@ -163,7 +169,7 @@ zip -9 -r winuaesrc *
copy winuaesrc.zip d:\amiga\winuaepackets\winuaesrc%1.zip
move winuaesrc.zip d:\amiga
cd c:\projects\winuae\src\od-win32
zip -9 winuaedebug%1 winuae_msvc\release\winuae.pdb winuae_msvc\fullrelease\winuae.pdb winuae_msvc10\release\winuae.pdb winuae_msvc10\fullrelease\winuae.pdb
zip -9 winuaedebug%1 winuae_msvc11\release\winuae.pdb winuae_msvc11\fullrelease\winuae.pdb
move winuaedebug%1.zip d:\amiga\winuaepackets\debug\
copy winuae_msvc10\fullrelease\winuae.pdb d:\amiga\dump
copy winuae_msvc11\fullrelease\winuae.pdb d:\amiga\dump
copy d:\amiga\winuae.exe d:\amiga\dump

View File

@ -20,10 +20,12 @@
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@ -28,23 +28,27 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@ -461,6 +461,8 @@ void resumepaused (int priority)
//write_log (_T("resume %d (%d)\n"), priority, pause_emulation);
if (pause_emulation > priority)
return;
if (!pause_emulation)
return;
resumesoundpaused ();
blkdev_exitgui ();
if (pausemouseactive)
@ -596,6 +598,17 @@ void updatemouseclip (void)
}
}
void updatewinrect (void)
{
GetWindowRect (hAmigaWnd, &amigawin_rect);
if (isfullscreen () == 0) {
changed_prefs.gfx_size_win.x = amigawin_rect.left;
changed_prefs.gfx_size_win.y = amigawin_rect.top;
currprefs.gfx_size_win.x = changed_prefs.gfx_size_win.x;
currprefs.gfx_size_win.y = changed_prefs.gfx_size_win.y;
}
}
static void setmouseactive2 (int active, bool allowpause)
{
//write_log (_T("setmouseactive %d->%d\n"), mouseactive, active);
@ -666,7 +679,8 @@ static void setmouseactive2 (int active, bool allowpause)
if (!showcursor) {
ShowCursor (FALSE);
SetCapture (hAmigaWnd);
GetWindowRect (hAmigaWnd, &amigawin_rect);
updatewinrect ();
showcursor = 1;
updatemouseclip ();
}
showcursor = 1;
@ -675,7 +689,7 @@ static void setmouseactive2 (int active, bool allowpause)
inputdevice_acquire (TRUE);
setpriority (&priorities[currprefs.win32_active_capture_priority]);
if (currprefs.win32_active_nocapture_pause) {
resumepaused (1);
resumepaused (2);
} else if (currprefs.win32_active_nocapture_nosound && sound_closed < 0) {
resumesoundpaused ();
}
@ -685,7 +699,7 @@ static void setmouseactive2 (int active, bool allowpause)
}
if (!active && allowpause) {
if (currprefs.win32_active_nocapture_pause) {
setpaused (1);
setpaused (2);
} else if (currprefs.win32_active_nocapture_nosound) {
setsoundpaused ();
sound_closed = -1;
@ -727,7 +741,10 @@ static void winuae_active (HWND hWnd, int minimized)
if (sound_closed < 0) {
resumesoundpaused ();
} else {
if (currprefs.win32_iconified_pause && !currprefs.win32_inactive_pause)
if (currprefs.win32_active_nocapture_pause) {
if (mouseactive)
resumepaused (2);
} else if (currprefs.win32_iconified_pause && !currprefs.win32_inactive_pause)
resumepaused (1);
else if (currprefs.win32_inactive_pause)
resumepaused (2);
@ -948,7 +965,7 @@ void setmouseactivexy (int x, int y, int dir)
}
}
int isfocus (void)
static int isfocus2 (void)
{
if (isfullscreen () > 0)
return 1;
@ -958,6 +975,11 @@ int isfocus (void)
return -1;
return 0;
}
int isfocus (void)
{
int v = isfocus2 ();
return v;
}
static void handleXbutton (WPARAM wParam, int updown)
{
@ -1179,12 +1201,8 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
WINDOWPOS *wp = (WINDOWPOS*)lParam;
if (isfullscreen () <= 0) {
if (!IsIconic (hWnd) && hWnd == hAmigaWnd) {
GetWindowRect (hWnd, &amigawin_rect);
if (isfullscreen () == 0) {
changed_prefs.gfx_size_win.x = amigawin_rect.left;
changed_prefs.gfx_size_win.y = amigawin_rect.top;
config_changed = 1;
}
updatewinrect ();
config_changed = 1;
updatemouseclip ();
}
notice_screen_contents_lost ();
@ -1614,6 +1632,11 @@ static LRESULT CALLBACK MainWindowProc (HWND hWnd, UINT message, WPARAM wParam,
WIN32GFX_DisplayChangeRequested ();
break;
#endif
case WM_DWMCOMPOSITIONCHANGED:
case WM_THEMECHANGED:
WIN32GFX_DisplayChangeRequested ();
return 0;
case WM_GETMINMAXINFO:
{
LPMINMAXINFO lpmmi;
@ -2180,6 +2203,7 @@ HMODULE language_load (WORD language)
#if LANG_DLL > 0
TCHAR dllbuf[MAX_DPATH];
TCHAR *dllname;
bool nosubrev = true;
if (language <= 0) {
/* new user-specific Windows ME/2K/XP method to get UI language */
@ -2214,7 +2238,7 @@ HMODULE language_load (WORD language)
if (vsFileInfo &&
HIWORD(vsFileInfo->dwProductVersionMS) == UAEMAJOR
&& LOWORD(vsFileInfo->dwProductVersionMS) == UAEMINOR
&& (HIWORD(vsFileInfo->dwProductVersionLS) == UAESUBREV)) {
&& (nosubrev || (HIWORD(vsFileInfo->dwProductVersionLS) == UAESUBREV))) {
success = TRUE;
write_log (_T("Translation DLL '%s' loaded and enabled\n"), dllbuf);
} else {
@ -3254,7 +3278,7 @@ int target_parse_option (struct uae_prefs *p, const TCHAR *option, const TCHAR *
int v1, v2;
TCHAR *s;
p->gfx_filter_aspect = -1;
p->win32_rtgscaleaspectratio = -1;
v1 = _tstol (tmpbuf);
s = _tcschr (tmpbuf, ':');
if (s) {

View File

@ -15,12 +15,12 @@
#define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
#define GETBDD(x) ((x) % 100)
#define WINUAEPUBLICBETA 0
#define WINUAEPUBLICBETA 1
#define LANG_DLL 1
#define WINUAEBETA _T("")
//#define WINUAEBETA _T("28")
#define WINUAEDATE MAKEBD(2012, 12, 2)
//#define WINUAEBETA _T("")
#define WINUAEBETA _T("1")
#define WINUAEDATE MAKEBD(2012, 12, 10)
#define WINUAEEXTRA _T("")
//#define WINUAEEXTRA _T("AmiKit Preview")
#define WINUAEREV _T("")
@ -64,6 +64,7 @@ extern void setmouseactive (int active);
extern void minimizewindow (void);
extern uae_u32 OSDEP_minimize_uae (void);
extern void updatemouseclip (void);
extern void updatewinrect (void);
extern void resumepaused (int priority);
extern void setpaused (int priority);

View File

@ -164,13 +164,6 @@ void filesys_addexternals (void)
}
devname[0] = 0;
for (;;) {
#if USE_CDFS == 0
if (drivetype == DRIVE_CDROM && currprefs.win32_automount_cddrives) {
_stprintf (devname, _T("WinCD_%c"), drive);
rw = 0;
break;
}
#endif
if (!inserted) {
nok = TRUE;
break;

View File

@ -89,7 +89,7 @@ struct winuae_currentmode {
int vsync;
};
struct MultiDisplay Displays[MAX_DISPLAYS];
struct MultiDisplay Displays[MAX_DISPLAYS + 1];
static struct winuae_currentmode currentmodestruct;
static int screen_is_initialized;
@ -727,7 +727,7 @@ static void getd3dmonitornames (void)
d3d->Release ();
}
void enumeratedisplays (void)
static bool enumeratedisplays2 (bool selectall)
{
struct MultiDisplay *md = Displays;
int adapterindex = 0;
@ -736,10 +736,12 @@ void enumeratedisplays (void)
while (EnumDisplayDevices (NULL, adapterindex, &add, 0)) {
adapterindex++;
if (!(add.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP))
continue;
if (add.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER)
continue;
if (!selectall) {
if (!(add.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP))
continue;
if (add.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER)
continue;
}
if (md - Displays >= MAX_DISPLAYS)
break;
@ -750,10 +752,12 @@ void enumeratedisplays (void)
monitorindex++;
if (md - Displays >= MAX_DISPLAYS)
break;
if (!(mdd.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP))
continue;
if (mdd.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER)
continue;
if (!selectall) {
if (!(mdd.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP))
continue;
if (mdd.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER)
continue;
}
md->adaptername = my_strdup_trim (add.DeviceString);
md->adapterid = my_strdup (add.DeviceName);
md->adapterkey = my_strdup (add.DeviceID);
@ -764,7 +768,7 @@ void enumeratedisplays (void)
md++;
}
if (md - Displays >= MAX_DISPLAYS)
return;
return true;
if (monitorindex == 0) {
md->adaptername = my_strdup_trim (add.DeviceString);
md->adapterid = my_strdup (add.DeviceName);
@ -772,11 +776,26 @@ void enumeratedisplays (void)
md->monitorname = my_strdup_trim (add.DeviceString);
md->monitorid = my_strdup (add.DeviceKey);
md->primary = true;
md++;
}
}
if (md == Displays)
return false;
EnumDisplayMonitors (NULL, NULL, monitorEnumProc, NULL);
md = Displays;
while (md->monitorname) {
if (!md->fullname)
md->fullname = my_strdup (md->adapterid);
md++;
}
getd3dmonitornames ();
//sortmonitors ();
return true;
}
void enumeratedisplays (void)
{
if (!enumeratedisplays2 (false))
enumeratedisplays2(true);
}
void sortdisplays (void)
@ -1564,13 +1583,55 @@ static int open_windows (int full)
return ret;
}
static void reopen_gfx (void)
{
open_windows (0);
if (isvsync () < 0)
vblank_calibrate (0, false);
if (isfullscreen () <= 0)
DirectDraw_FillPrimary ();
}
static int getstatuswindowheight (void)
{
int def = GetSystemMetrics (SM_CYMENU) + 3;
WINDOWINFO wi;
HWND h = CreateWindowEx (
0, STATUSCLASSNAME, (LPCTSTR) NULL, SBARS_TOOLTIPS | WS_CHILD | WS_VISIBLE,
0, 0, 0, 0, hHiddenWnd, (HMENU) 1, hInst, NULL);
if (!h)
return def;
wi.cbSize = sizeof wi;
if (!GetWindowInfo (h, &wi))
return def;
DestroyWindow (h);
return wi.rcWindow.bottom - wi.rcWindow.top;
}
void WIN32GFX_DisplayChangeRequested (void)
{
display_change_requested = 1;
}
int check_prefs_changed_gfx (void)
{
int c = 0;
if (!config_changed)
if (!config_changed && !display_change_requested)
return 0;
if (currprefs.win32_statusbar != changed_prefs.win32_statusbar) {
if ((currprefs.win32_statusbar == 0 && changed_prefs.win32_statusbar > 0)) {
c |= 32;
} else if ((currprefs.win32_statusbar > 0 && changed_prefs.win32_statusbar == 0)) {
c |= 32;
} else {
c |= 512;
}
}
c |= currprefs.gfx_size_fs.width != changed_prefs.gfx_size_fs.width ? 16 : 0;
c |= currprefs.gfx_size_fs.height != changed_prefs.gfx_size_fs.height ? 16 : 0;
c |= ((currprefs.gfx_size_win.width + 7) & ~7) != ((changed_prefs.gfx_size_win.width + 7) & ~7) ? 16 : 0;
@ -1641,13 +1702,13 @@ int check_prefs_changed_gfx (void)
c |= currprefs.win32_nonotificationicon != changed_prefs.win32_nonotificationicon ? 32 : 0;
c |= currprefs.win32_borderless != changed_prefs.win32_borderless ? 32 : 0;
c |= currprefs.win32_blankmonitors != changed_prefs.win32_blankmonitors ? 32 : 0;
c |= currprefs.win32_statusbar != changed_prefs.win32_statusbar ? 32 : 0;
c |= currprefs.win32_rtgmatchdepth != changed_prefs.win32_rtgmatchdepth ? 2 : 0;
c |= currprefs.win32_rtgscaleifsmall != changed_prefs.win32_rtgscaleifsmall ? (2 | 8 | 64) : 0;
c |= currprefs.win32_rtgallowscaling != changed_prefs.win32_rtgallowscaling ? (2 | 8 | 64) : 0;
c |= currprefs.win32_rtgscaleaspectratio != changed_prefs.win32_rtgscaleaspectratio ? (8 | 64) : 0;
c |= currprefs.win32_rtgvblankrate != changed_prefs.win32_rtgvblankrate ? 8 : 0;
if (display_change_requested || c)
{
int keepfsmode =
@ -1748,6 +1809,10 @@ int check_prefs_changed_gfx (void)
S2X_reset ();
}
}
if (c & 512) {
reopen_gfx ();
graphics_mode_changed = 1;
}
if ((c & 16) || ((c & 8) && keepfsmode)) {
if (reopen (c & 2, unacquired == false)) {
c |= 2;
@ -2085,13 +2150,7 @@ static int reopen (int full, bool unacquire)
inputdevice_unacquire ();
}
open_windows (0);
if (isvsync () < 0)
vblank_calibrate (0, false);
if (isfullscreen () <= 0)
DirectDraw_FillPrimary ();
reopen_gfx ();
return 0;
}
@ -3454,11 +3513,13 @@ static int create_windows_2 (void)
DWORD flags = 0;
int borderless = currprefs.win32_borderless;
DWORD style = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
int sbheight = currprefs.win32_statusbar == 0 ? 0 : GetSystemMetrics (SM_CYMENU) + 3;
int cyborder = GetSystemMetrics (SM_CYFRAME);
int gap = 0;
int x, y, w, h;
struct MultiDisplay *md = getdisplay (&currprefs);
int sbheight;
sbheight = currprefs.win32_statusbar ? getstatuswindowheight () : 0;
if (hAmigaWnd) {
RECT r;
@ -3516,8 +3577,6 @@ static int create_windows_2 (void)
}
SetWindowPos (hAmigaWnd, HWND_TOP, x, y, w, h,
SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSENDCHANGING | SWP_NOZORDER);
if (hStatusWnd)
createstatuswindow ();
in_sizemove--;
} else {
w = nw;
@ -3525,7 +3584,8 @@ static int create_windows_2 (void)
x = nx;
y = ny;
}
GetWindowRect (hAmigaWnd, &amigawin_rect);
createstatuswindow ();
updatewinrect ();
GetWindowRect (hMainWnd, &mainwin_rect);
if (d3dfs || dxfs)
SetCursorPos (x + w / 2, y + h / 2);
@ -3668,7 +3728,7 @@ static int create_windows_2 (void)
hMainWnd = hAmigaWnd;
}
GetWindowRect (hAmigaWnd, &amigawin_rect);
updatewinrect ();
GetWindowRect (hMainWnd, &mainwin_rect);
if (dxfs || d3dfs)
SetCursorPos (x + w / 2, y + h / 2);

View File

@ -15346,6 +15346,10 @@ static INT_PTR CALLBACK DialogProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
}
break;
}
case WM_DWMCOMPOSITIONCHANGED:
case WM_THEMECHANGED:
gui_size_changed = 1;
return 0;
}
handlerawinput (hDlg, msg, wParam, lParam);
return FALSE;

View File

@ -161,22 +161,25 @@ static void modifytemplatefont (DLGTEMPLATEEX *d, DLGTEMPLATEEX_END *d2)
static void modifyitem (DLGTEMPLATEEX *d, DLGTEMPLATEEX_END *d2, DLGITEMTEMPLATEEX *dt, int id)
{
bool noyscale = false;
int wc = 0;
if (dt->windowClass[0] != 0xffff && (!_tcsicmp (dt->windowClass, WC_LISTVIEWW) || !_tcsicmp (dt->windowClass, WC_TREEVIEWW)))
listviews[listviewcnt++] = dt->id;
if (dt->windowClass[0] == 0xffff)
wc = dt->windowClass[1];
if (multy >= 89 && multy <= 111) {
int wc = 0;
if (dt->windowClass[0] == 0xffff)
wc = dt->windowClass[1];
if (wc == 0x0080 && dt->cy <= 20) // button
if (wc == 0x0080 && dt->cy <= 20) { // button
noyscale = true;
if (wc == 0x0085) // checkbox
}
if (wc == 0x0085) {// combo box
noyscale = true;
if (wc == 0x0081 && dt->cy <= 20) // edit box
}
if (wc == 0x0081 && dt->cy <= 20) { // edit box
noyscale = true;
}
}
if (!noyscale)
@ -185,6 +188,7 @@ static void modifyitem (DLGTEMPLATEEX *d, DLGTEMPLATEEX_END *d2, DLGITEMTEMPLATE
dt->cx = mmx (dt->cx);
dt->y = mmy (dt->y);
dt->x = mmx (dt->x);
}
static INT_PTR CALLBACK DummyProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)

View File

@ -113,7 +113,6 @@ Global
{38FAC3FB-A2B7-453F-8A6A-73B97201BB04}.Release|Win32.ActiveCfg = Release|Win32
{38FAC3FB-A2B7-453F-8A6A-73B97201BB04}.Release|x64.ActiveCfg = Release|Win32
{6181E50C-5F32-42DC-BEF6-827AA8A5429D}.Debug|Win32.ActiveCfg = Debug|Win32
{6181E50C-5F32-42DC-BEF6-827AA8A5429D}.Debug|Win32.Build.0 = Debug|Win32
{6181E50C-5F32-42DC-BEF6-827AA8A5429D}.Debug|x64.ActiveCfg = Debug|Win32
{6181E50C-5F32-42DC-BEF6-827AA8A5429D}.FullRelease|Win32.ActiveCfg = Release|Win32
{6181E50C-5F32-42DC-BEF6-827AA8A5429D}.FullRelease|x64.ActiveCfg = Release|Win32

View File

@ -37,13 +37,13 @@
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset>v110_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset>v110_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
@ -127,6 +127,15 @@
<IncludePath Condition="'$(Configuration)|$(Platform)'=='FullRelease|Win32'">C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;C:\dev\include;$(IncludePath)</IncludePath>
<ReferencePath Condition="'$(Configuration)|$(Platform)'=='FullRelease|Win32'">$(ReferencePath)</ReferencePath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='FullRelease|Win32'">C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x86;C:\dev\lib;$(LibraryPath)</LibraryPath>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</EmbedManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='FullRelease|Win32'">true</EmbedManifest>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\dev\include;C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;$(IncludePath)</IncludePath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\dev\lib\x64;C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x64;$(LibraryPath)</LibraryPath>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;C:\dev\include;$(IncludePath)</IncludePath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x64;C:\dev\lib\x64;$(LibraryPath)</LibraryPath>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='FullRelease|x64'">C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;C:\dev\include;$(IncludePath)</IncludePath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='FullRelease|x64'">C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x64;C:\dev\lib\x64;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
@ -189,9 +198,11 @@
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\</AdditionalLibraryDirectories>
<IgnoreAllDefaultLibraries>
</IgnoreAllDefaultLibraries>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<Manifest>
<AdditionalManifestFiles>..\resources\winuae.exe.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
<AdditionalManifestFiles>../resources/winuae.exe.manifest</AdditionalManifestFiles>
<EnableDPIAwareness>true</EnableDPIAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -209,9 +220,9 @@
<PreprocessorDefinitions>WINVER=0x0500;_DEBUG;WIN32_IE=0x0700;WIN32;WIN64;_CRT_SECURE_NO_WARNINGS;D3D_DEBUG_INFO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Sync</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<PrecompiledHeaderOutputFile>$(Platform)\$(Configuration)\winuae_msvc.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(Platform)\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>$(Platform)\$(Configuration)\</ObjectFileName>
@ -223,6 +234,7 @@
<CompileAs>Default</CompileAs>
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<EnablePREfast>false</EnablePREfast>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -232,7 +244,7 @@
<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;libpng15.lib;lglcd.lib;wtsapi32.lib;wntab32x.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;avrt.lib;hid.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<IgnoreSpecificDefaultLibraries>LIBCMT;%(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;avrt.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(Platform)\$(Configuration)\winuae.pdb</ProgramDatabaseFile>
@ -249,7 +261,8 @@
</IgnoreAllDefaultLibraries>
</Link>
<Manifest>
<AdditionalManifestFiles>..\resources\winuae64.exe.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
<AdditionalManifestFiles>..\resources\winuae64.exe.manifest</AdditionalManifestFiles>
<EnableDPIAwareness>true</EnableDPIAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -319,12 +332,15 @@
<FixedBaseAddress>false</FixedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<MinimumRequiredVersion>
</MinimumRequiredVersion>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
<ImageHasSafeExceptionHandlers>
</ImageHasSafeExceptionHandlers>
</Link>
<Manifest>
<AdditionalManifestFiles>..\resources\winuae.exe.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
<AdditionalManifestFiles>../resources/winuae.exe.manifest</AdditionalManifestFiles>
<EnableDPIAwareness>true</EnableDPIAwareness>
<OutputManifestFile>$(IntDir)$(TargetName)$(TargetExt).embed.manifest</OutputManifestFile>
<AdditionalOptions>/validate_manifest %(AdditionalOptions)</AdditionalOptions>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -347,7 +363,7 @@
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
@ -377,7 +393,7 @@
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<IgnoreSpecificDefaultLibraries>LIBCMT;%(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;avrt.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(Platform)\$(Configuration)\winuae.pdb</ProgramDatabaseFile>
@ -394,7 +410,8 @@
<TargetMachine>MachineX64</TargetMachine>
</Link>
<Manifest>
<AdditionalManifestFiles>..\resources\winuae64.exe.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
<AdditionalManifestFiles>..\resources\winuae64.exe.manifest</AdditionalManifestFiles>
<EnableDPIAwareness>true</EnableDPIAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='FullRelease|Win32'">
@ -468,7 +485,8 @@
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<Manifest>
<AdditionalManifestFiles>..\resources\winuae9.exe.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
<AdditionalManifestFiles>../resources/winuae.exe.manifest</AdditionalManifestFiles>
<EnableDPIAwareness>true</EnableDPIAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='FullRelease|x64'">
@ -491,7 +509,7 @@
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
@ -522,7 +540,7 @@
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<IgnoreSpecificDefaultLibraries>LIBCMT;%(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;avrt.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(Platform)\$(Configuration)\winuae.pdb</ProgramDatabaseFile>
@ -539,6 +557,7 @@
</Link>
<Manifest>
<AdditionalManifestFiles>..\resources\winuae64.exe.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
<EnableDPIAwareness>true</EnableDPIAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
@ -735,7 +754,6 @@
<None Include="..\resources\drive_spin.wav" />
<None Include="..\resources\drive_spinnd.wav" />
<None Include="..\resources\drive_startup.wav" />
<None Include="..\resources\resource" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\resources\winuae.rc">
@ -785,6 +803,9 @@
<FileType>Document</FileType>
</Library>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\resources\resource.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@ -608,7 +608,6 @@
<None Include="..\resources\drive_spin.wav" />
<None Include="..\resources\drive_spinnd.wav" />
<None Include="..\resources\drive_startup.wav" />
<None Include="..\resources\resource" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\resources\winuae.rc">
@ -623,4 +622,7 @@
<Library Include="..\hq4x16.obj" />
<Library Include="..\hq4x32.obj" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\resources\resource.h" />
</ItemGroup>
</Project>

View File

@ -1,6 +1,30 @@
- restore only single input target to default.
This is usual quick 2.5.0 bug fix version. Estimated release date: before Christmas.
I try not to do any GUI changes this time, 2.5.0 translation DLLs should still work with 2.5.1.
- Internal mouse counter under/overflow fixed, while moving mouse far enough, mouse jumped in opposite direction. (old bug)
- Directory filesystem file modification date resolution support is now 1 microsecond (was 1 second). AmigaDOS file
time 1/50s "tick" resolution is now fully supported (if NTFS, FAT only has 2 second resolution)
- 1G RTG RAM was detected as "too large". (early 250 beta)
- ClipCursor() was not always called, it was possible for hidden Windows mouse to move outside of WinUAE window in some situations. (250b24)
- RTG aspect ratio still affected filter panel aspect ratio setting. (b26 update was not complete)
- _UAEFSDB.___ meta data files (stores illegal names, protection flags and comments if non-stream capable filesystem like FAT)
haven't worked correctly for a long time.
- _UAEFSDB.___ wasn't always deleted when it become empty.
- Unminimizing unpaused emulation when "pause when mouse is uncaptured" was enabled.
- If win32.guikey config entry is set, normal GUI key (F12) events won't open the GUI anymore.
- Always reset special monitor active flag (A2024/Graffiti) when display mode changes, fixes A2024 mode position when window
needs to reopen but resolution didn't change.
- Improved windowed mode bottom statusbar height calculation, fixes two pixel gap in Windows Vista classic mode.
- Fixed Amiga-side illegal memory access when booting directory harddrive(s) under KS 1.3.
- Reset GUI/emulation display when Windows desktop state changes (Theme change etc..)
- Removed remains of unused AROS CDFS support code.
- Compiled using MSVC 2012 with update 1 installed.
2.5.0
Beta 28 RC4:
- uaescsi.device SCSI sense data is now returned correctly (For example MakeCD shows error messages that make sense now)

View File

@ -1670,7 +1670,7 @@ static struct zfile *zfile_fopen_2 (const TCHAR *name, const TCHAR *mode, int ma
}
l->zfdmask = mask;
} else {
struct _stat64 st;
struct mystat st;
l = zfile_create (NULL);
l->mode = my_strdup (mode);
l->name = my_strdup (name);
@ -1685,8 +1685,8 @@ static struct zfile *zfile_fopen_2 (const TCHAR *name, const TCHAR *mode, int ma
zfile_fclose (l);
return 0;
}
if (stat (l->name, &st) != -1)
l->size = st.st_size;
if (my_stat (l->name, &st))
l->size = st.size;
l->f = f;
}
return l;
@ -2751,7 +2751,8 @@ static void zfile_fopen_archive_recurse2 (struct zvolume *zv, struct znode *zn,
zvnew = zvolume_alloc_empty (zv, tmp);
zvnew->parentz = zn;
zai.name = tmp;
zai.t = zn->mtime;
zai.tv.tv_sec = zn->mtime.tv_sec;
zai.tv.tv_usec = zn->mtime.tv_usec;
zai.comment = zv->volumename;
if (zn->flags < 0)
zai.flags = zn->flags;
@ -2935,7 +2936,8 @@ struct znode *znode_adddir (struct znode *parent, const TCHAR *name, struct zarc
if (zn)
return zn;
zn = znode_alloc_child (parent, name);
zn->mtime = zai->t;
zn->mtime.tv_sec = zai->tv.tv_sec;
zn->mtime.tv_usec = zai->tv.tv_usec;
zn->type = ZNODE_DIR;
if (zai->comment)
zn->comment = my_strdup (zai->comment);
@ -2993,7 +2995,8 @@ struct znode *zvolume_addfile_abs (struct zvolume *zv, struct zarchive_info *zai
zn = znode_alloc_child (zn2, p2);
zn->size = zai->size;
zn->type = ZNODE_FILE;
zn->mtime = zai->t;
zn->mtime.tv_sec = zai->tv.tv_sec;
zn->mtime.tv_usec = zai->tv.tv_usec;
if (zai->comment)
zn->comment = my_strdup (zai->comment);
zn->flags = zai->flags;
@ -3015,19 +3018,20 @@ struct zvolume *zfile_fopen_directory (const TCHAR *dirname)
zv = zvolume_alloc_nofile (dirname, ArchiveFormatDIR, NULL, NULL);
while (my_readdir (dir, fname)) {
TCHAR fullname[MAX_DPATH];
struct _stat64 statbuf;
struct mystat statbuf;
struct zarchive_info zai = { 0 };
if (!_tcscmp (fname, _T(".")) || !_tcscmp (fname, _T("..")))
continue;
_tcscpy (fullname, dirname);
_tcscat (fullname, FSDB_DIR_SEPARATOR_S);
_tcscat (fullname, fname);
if (stat (fullname, &statbuf) == -1)
if (!my_stat (fullname, &statbuf))
continue;
zai.name = fname;
zai.size = statbuf.st_size;
zai.t = statbuf.st_mtime;
if (statbuf.st_mode & FILEFLAG_DIR) {
zai.size = statbuf.size;
zai.tv.tv_sec = statbuf.mtime.tv_sec;
zai.tv.tv_usec = statbuf.mtime.tv_usec;
if (statbuf.mode & FILEFLAG_DIR) {
zvolume_adddir_abs (zv, &zai);
} else {
struct znode *zn;
@ -3316,7 +3320,7 @@ int zfile_fs_usage_archive (const TCHAR *path, const TCHAR *disk, struct fs_usag
return 0;
}
int zfile_stat_archive (const TCHAR *path, struct _stat64 *s)
int zfile_stat_archive (const TCHAR *path, struct mystat *s)
{
struct zvolume *zv = get_zvolume (path);
struct znode *zn = get_znode (zv, path, TRUE);
@ -3324,9 +3328,9 @@ int zfile_stat_archive (const TCHAR *path, struct _stat64 *s)
memset (s, 0, sizeof (struct _stat64));
if (!zn)
return 0;
s->st_mode = zn->type == ZNODE_FILE ? 0 : FILEFLAG_DIR;
s->st_size = zn->size;
s->st_mtime = zn->mtime;
s->size = zn->size;
s->mtime.tv_sec = zn->mtime.tv_sec;
s->mtime.tv_usec = zn->mtime.tv_usec;
return 1;
}

View File

@ -308,10 +308,10 @@ struct zvolume *archive_directory_tar (struct zfile *z)
memset (&zai, 0, sizeof zai);
zai.name = au (name);
zai.size = size;
zai.t = _strtoui64 ((char*)block + 136, NULL, 8);
zai.t += _timezone;
zai.tv.tv_sec = _strtoui64 ((char*)block + 136, NULL, 8);
zai.tv.tv_sec += _timezone;
if (_daylight)
zai.t -= 1 * 60 * 60;
zai.tv.tv_sec -= 1 * 60 * 60;
if (zai.name[_tcslen (zai.name) - 1] == '/') {
zn = zvolume_adddir_abs (zv, &zai);
} else {
@ -379,7 +379,7 @@ struct zvolume *archive_directory_zip (struct zfile *z)
t = fromdostime (dd);
memset (&zai, 0, sizeof zai);
zai.name = filename_inzip;
zai.t = t;
zai.tv.tv_sec = t;
zai.flags = -1;
c = filename_inzip[_tcslen (filename_inzip) - 1];
if (c != '/' && c != '\\') {
@ -599,14 +599,13 @@ struct zvolume *archive_directory_7z (struct zfile *z)
zai.name = name;
zai.flags = f->AttribDefined ? f->Attrib : -1;
zai.size = f->Size;
zai.t = 0;
if (f->MTimeDefined) {
uae_u64 t = (((uae_u64)f->MTime.High) << 32) | f->MTime.Low;
if (t >= EPOCH_DIFF) {
zai.t = (t - EPOCH_DIFF) / RATE_DIFF;
zai.t -= _timezone;
zai.tv.tv_sec = (t - EPOCH_DIFF) / RATE_DIFF;
zai.tv.tv_sec -= _timezone;
if (_daylight)
zai.t += 1 * 60 * 60;
zai.tv.tv_sec += 1 * 60 * 60;
}
}
if (!f->IsDir) {
@ -757,7 +756,7 @@ struct zvolume *archive_directory_rar (struct zfile *z)
zai.name = rc->HeaderData.FileNameW;
zai.size = rc->HeaderData.UnpSize;
zai.flags = -1;
zai.t = fromdostime (rc->HeaderData.FileTime);
zai.tv.tv_sec = fromdostime (rc->HeaderData.FileTime);
zn = zvolume_addfile_abs (zv, &zai);
zn->offset = cnt++;
pRARProcessFile (rc->hArcData, RAR_SKIP, NULL, NULL);
@ -1042,7 +1041,6 @@ struct zvolume *archive_directory_plain (struct zfile *z)
zai.flags = -1;
zfile_fseek(z, 0, SEEK_END);
zai.size = zfile_ftell (z);
zai.t =
zfile_fseek(z, 0, SEEK_SET);
zfile_fread(id, sizeof id, 1, z);
zfile_fseek(z, 0, SEEK_SET);
@ -1236,7 +1234,7 @@ static void recurseadf (struct znode *zn, int root, TCHAR *name)
size = 0;
zai.size = size;
zai.flags = gl (adf, bs - 48 * 4);
zai.t = put_time (gl (adf, bs - 23 * 4), gl (adf, bs - 22 * 4),gl (adf, bs - 21 * 4));
amiga_to_timeval (&zai.tv, gl (adf, bs - 23 * 4), gl (adf, bs - 22 * 4),gl (adf, bs - 21 * 4));
if (secondary == -3) {
struct znode *znnew = zvolume_addfile_abs (zv, &zai);
znnew->offset = block;
@ -1304,9 +1302,9 @@ static void recursesfs (struct znode *zn, int root, TCHAR *name, int sfs2)
_tcscat (name2, fname);
zai.name = name2;
if (sfs2)
zai.t = glx (p + 22) - diff2;
zai.tv.tv_sec = glx (p + 22) - diff2;
else
zai.t = glx (p + 20) - diff;
zai.tv.tv_sec = glx (p + 20) - diff;
if (p[sfs2 ? 26 : 24] & 0x80) { // dir
struct znode *znnew = zvolume_adddir_abs (zv, &zai);
int newblock = glx (p + 16);
@ -1961,7 +1959,7 @@ static void fatdirectory (struct zfile *z, struct zvolume *zv, TCHAR *name, int
_tcscat (name2, fname);
zai.name = name2;
zai.t = fat_time_fat2unix (buf[0x16] | (buf[0x17] << 8), buf[0x18] | (buf[0x19] << 8), 1);
zai.tv.tv_sec = fat_time_fat2unix (buf[0x16] | (buf[0x17] << 8), buf[0x18] | (buf[0x19] << 8), 1);
if (attr & (16 | 8)) {
int nextblock, cluster;
nextblock = dataregion + (startcluster - 2) * sectorspercluster;