fsdb_dir_writeback (aino->parent);
*aip = aino->sibling;
+
+ if (unit->volflags & MYVOLUMEINFO_ARCHIVE) {
+ ;
+ } else if (unit->volflags & MYVOLUMEINFO_CDFS) {
+ isofs_dispose_inode (unit->ui.cdfs_superblock, aino->uniq_external);
+ }
+
xfree (aino->aname);
xfree (aino->comment);
xfree (aino->nname);
return 1;
} else if (u->volflags & MYVOLUMEINFO_CDFS) {
int isdir, flags;
- isofss_fill_file_attrs (u->ui.cdfs_superblock, base->uniq_external, &isdir, &flags, c->uniq_external);
+ TCHAR *comment;
+ isofss_fill_file_attrs (u->ui.cdfs_superblock, base->uniq_external, &isdir, &flags, &comment, c->uniq_external);
c->dir = isdir;
c->amigaos_mode = 0;
if (flags >= 0)
c->amigaos_mode = flags;
+ c->comment = comment;
return 1;
} else {
return fsdb_fill_file_attrs (base, c);
if (unit->volflags & MYVOLUMEINFO_ARCHIVE)
zfile_stat_archive (aino->nname, &statbuf);
else if (unit->volflags & MYVOLUMEINFO_CDFS)
- ;
+ isofs_stat (unit->cdfs_superblock, aino->uniq_external, &statbuf);
else
stat (aino->nname, &statbuf);
write_log (L"First block %d read failed!\n", block);
}
xfree (s);
+
+ if ((uae_u64)highcyl * spt * surfaces * blocksize > hfd->virtsize) {
+ write_log (L"RDB: WARNING: end of partition > size of disk! (%I64u > %I64u)\n",
+ (uae_u64)highcyl * spt * surfaces * blocksize, hfd->virtsize);
+ }
+
+
}
static void dump_rdb (UnitInfo *uip, struct hardfiledata *hfd, uae_u8 *bufrdb, uae_u8 *buf, int readblocksize)
write_log (L"RDSK dump end\n");
}
+ if ((uae_u64)hfd->cylinders * hfd->sectors * hfd->heads * blocksize > hfd->virtsize) {
+ write_log (L"RDB: WARNING: RDSK header disk size > disk size! (%I64u > %I64u)\n",
+ (uae_u64)hfd->cylinders * hfd->sectors * hfd->heads, hfd->virtsize);
+ }
+
for (i = 0; i <= partnum; i++) {
if (i == 0)
partblock = rl (bufrdb + 28);
goto error;
}
- if ((uae_u64)hfd->cylinders * hfd->sectors * hfd->heads * blocksize > hfd->virtsize)
- write_log (L"RDB: WARNING: end of partition > size of disk!\n");
-
err = 2;
/* load custom filesystems if needed */
put_long (parmpacket + 64, 0); /* Buffer mem type */
put_long (parmpacket + 68, 0x7FFFFFFF); /* largest transfer */
put_long (parmpacket + 72, ~1); /* addMask (?) */
- put_long (parmpacket + 76, scsi_get_cd_drive_media_mask () & (1 << cd_unit_no) ? -80 : -128); /* bootPri */
+ put_long (parmpacket + 76, scsi_get_cd_drive_media_mask () & (1 << cd_unit_no) ? -127 : -128); /* bootPri */
put_long (parmpacket + 80, CDFS_DOSTYPE);
put_long (parmpacket + 84, 0); /* baud */
put_long (parmpacket + 88, cdfs_control >> 2); /* Control. BSTR! */
+++ /dev/null
-/* Let's see whether hiding this away somewhere where the compiler can't
-see it will cure it of its silly urge to mis-optimize the comparison */
-extern long int diff32(frame_time_t x, frame_time_t y);
-extern int pissoff_value;
-
-STATIC_INLINE void events_schedule (void)
-{
- int i;
-
- unsigned long int mintime = ~0L;
- for (i = 0; i < ev_max; i++) {
- if (eventtab[i].active) {
- unsigned long int eventtime = eventtab[i].evtime - currcycle;
-#ifdef EVENT_DEBUG
- if (eventtime == 0) {
- write_log ("event %d bug\n",i);
- }
-#endif
- if (eventtime < mintime)
- mintime = eventtime;
- }
- }
- nextevent = currcycle + mintime;
-}
-
-extern signed long pissoff;
-
-STATIC_INLINE void cycles_do_special (void)
-{
-#ifdef JIT
- if (currprefs.cachesize) {
- if (pissoff >= 0)
- pissoff = -1;
- } else
-#endif
- {
- pissoff = 0;
- }
-}
-
-STATIC_INLINE void do_extra_cycles (unsigned long cycles_to_add)
-{
- pissoff -= cycles_to_add;
-}
-
-STATIC_INLINE unsigned long int get_cycles (void)
-{
- return currcycle;
-}
-
-STATIC_INLINE void set_cycles (unsigned long int x)
-{
- currcycle = x;
- eventtab[ev_hsync].oldcycles = x;
-#ifdef EVT_DEBUG
- if (currcycle & (CYCLE_UNIT - 1))
- write_log (L"%x\n", currcycle);
-#endif
-}
-
-extern volatile bool vblank_found_chipset;
-extern volatile bool vblank_found_rtg;
-
-STATIC_INLINE void do_cycles_slow (unsigned long cycles_to_add)
-{
- if (vblank_found_chipset && pissoff > 0)
- cycles_do_special ();
-
- if ((pissoff -= cycles_to_add) >= 0)
- return;
-
- cycles_to_add = -pissoff;
- pissoff = 0;
-
- if (is_lastline && eventtab[ev_hsync].evtime - currcycle <= cycles_to_add) {
- int rpt = read_processor_time ();
- int v = rpt - vsyncmintime;
- if (v > (int)syncbase || v < -((int)syncbase))
- vsyncmintime = rpt;
- if (v < 0 && !vblank_found_chipset && !currprefs.turbo_emulation) {
- pissoff = pissoff_value * CYCLE_UNIT;
- return;
- }
- }
- while ((nextevent - currcycle) <= cycles_to_add) {
- int i;
- cycles_to_add -= (nextevent - currcycle);
- currcycle = nextevent;
-
- for (i = 0; i < ev_max; i++) {
- if (eventtab[i].active && eventtab[i].evtime == currcycle) {
- (*eventtab[i].handler)();
- }
- }
- events_schedule ();
- }
- currcycle += cycles_to_add;
-#ifdef EVT_DEBUG
- if (currcycle & (CYCLE_UNIT - 1))
- write_log (L"%x\n", currcycle);
-#endif
-}
-
-#define do_cycles do_cycles_slow
-#define countdown pissoff
void isofs_closedir(struct cd_opendir_s*);
bool isofs_readdir(struct cd_opendir_s*, TCHAR*, uae_u64 *uniq);
void isofs_stat(void *sb, uae_u64, struct _stat64*);
-void isofss_fill_file_attrs(void *sb, uae_u64, int*, int*, uae_u64);
+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);
struct cd_openfile_s *isofs_openfile(void*,uae_u64, int);
void isofs_closefile(struct cd_openfile_s*);
bool linked;
int usecnt;
int lockcnt;
+ bool i_isaflags;
+ uae_u8 i_aflags;
+ TCHAR *i_comment;
};
struct super_block
return;
inode->i_sb->inode_cnt--;
xfree(inode->name);
+ xfree(inode->i_comment);
xfree(inode);
}
static void iput(struct inode *inode)
{
struct super_block *sb = inode->i_sb;
- struct inode *in;
if (!inode || inode->linked)
return;
#if 0
+ struct inode *in;
while (inode->i_sb->inode_cnt > MAX_CACHE_INODE_COUNT) {
/* not very fast but better than nothing.. */
struct inode *minin = NULL, *mininprev = NULL;
sb->inode_cnt++;
}
-static struct inode *find_inode(struct super_block *sb, uae_u32 uniq)
+static struct inode *find_inode(struct super_block *sb, uae_u64 uniq)
{
struct inode *inode = sb->inodes;
+ /* Need hash tables... Later... */
while (inode) {
if (inode->i_ino == uniq) {
inode->usecnt++;
goto out; /* Something got screwed up here */
switch (sig) {
- case SIG('A', 'S'):
- write_log (L"Amiga rockridge extension not yet implemented!\n");
- break;
case SIG('R', 'R'):
if ((rr->u.RR.flags[0] & RR_NM) == 0)
goto out;
goto out; /* Something got screwed up here */
switch (sig) {
-#ifndef CONFIG_ZISOFS /* No flag for SF or ZF */
- case SIG('R', 'R'):
- if ((rr->u.RR.flags[0] &
- (RR_PX | RR_TF | RR_SL | RR_CL)) == 0)
- goto out;
+ case SIG('A', 'S'):
+ {
+ char *p = &rr->u.AS.data[0];
+ if (rr->u.AS.flags & 1) { // PROTECTION
+ inode->i_isaflags = true;
+ inode->i_aflags = p[3];
+ p += 4;
+ }
+ if (rr->u.AS.flags & 2) { // COMMENT
+ const int maxcomment = 80;
+ if (!inode->i_comment)
+ inode->i_comment = xcalloc (TCHAR, maxcomment + 1);
+ int l = p[0];
+ char t = p[l];
+ p[l] = 0;
+ au_copy (inode->i_comment + _tcslen (inode->i_comment), maxcomment + 1 - l, p + 1);
+ p[l] = t;
+ }
break;
-#endif
+ }
case SIG('S', 'P'):
if (check_sp(rr, inode))
goto out;
return do_isofs_readdir(od->inode, &od->f, od->tmp1, (struct iso_directory_record*)od->tmp2, name, uniq) != 0;
}
-void isofss_fill_file_attrs(void *sbp, uae_u64 parent, int *dir, int *flags, uae_u64 uniq)
+void isofss_fill_file_attrs(void *sbp, uae_u64 parent, int *dir, int *flags, TCHAR **comment, uae_u64 uniq)
{
struct super_block *sb = (struct super_block*)sbp;
struct inode *inode = find_inode(sb, uniq);
if (!inode)
return;
+ *comment = NULL;
*dir = XS_ISDIR(inode->i_mode) ? 1 : 0;
- *flags = 0;
+ if (inode->i_isaflags)
+ *flags = inode->i_aflags;
+ else
+ *flags = 0;
+ if (inode->i_comment)
+ *comment = my_strdup(inode->i_comment);
}
void isofs_stat(void *sbp, uae_u64 uniq, struct _stat64 *statbuf)
return false;
}
+void isofs_dispose_inode(void *sbp, uae_u64 uniq)
+{
+ struct super_block *sb = (struct super_block*)sbp;
+ struct inode *inode;
+ struct inode *old = NULL, *prev = NULL;
+
+ inode = sb->inodes;
+ while (inode) {
+ if (inode->i_ino == uniq) {
+ old = inode;
+ break;
+ }
+ prev = inode;
+ inode = inode->next;
+ }
+ if (!old)
+ return;
+
+ if (prev)
+ prev->next = old->next;
+ else
+ sb->inodes = old->next;
+ free_inode(old);
+}
+
struct cd_openfile_s
{
struct super_block *sb;
1,1,2,1,0,0,0,0,0,0,0,0,0,0,0,0
};
-#define DBGOUT_MIDI_BYTE(x) TRACE(( "MIDI: 0x%02x\n", (x) ))
+#define DBGOUT_MIDI_BYTE(x) TRACE((L"MIDI: 0x%02x\n", (x) ))
/*
* FUNCTION: Midi_Parse
switch(data)
{
case MIDI_CLOCK:
- TRACE(( "MIDI: MIDI_CLOCK\n" ));
+ TRACE((L"MIDI: MIDI_CLOCK\n" ));
break;
case MIDI_START:
- TRACE(( "MIDI: MIDI_START\n" ));
+ TRACE((L"MIDI: MIDI_START\n" ));
break;
case MIDI_CONTINUE:
- TRACE(( "MIDI: MIDI_CONTINUE\n" ));
+ TRACE((L"MIDI: MIDI_CONTINUE\n" ));
break;
case MIDI_STOP:
- TRACE(( "MIDI: MIDI_STOP\n" ));
+ TRACE((L"MIDI: MIDI_STOP\n" ));
break;
default:
break;
static void add1byte(DWORD_PTR w) //put 1 Byte to Midibuffer
{
if(midi_inlast >= BUFFLEN - 10) {
- TRACE(("add1byte buffer full %d %d (%02X)\n", midi_inlast, midi_inptr, w));
+ TRACE((L"add1byte buffer full %d %d (%02X)\n", midi_inlast, midi_inptr, w));
return;
}
midibuf[midi_inlast++] = (uae_u8)w;
static void add2byte(DWORD_PTR w) //put 2 Byte to Midibuffer
{
if(midi_inlast >= BUFFLEN - 10) {
- TRACE(("add2byte buffer full %d %d (%04X)\n", midi_inlast, midi_inptr, w));
+ TRACE((L"add2byte buffer full %d %d (%04X)\n", midi_inlast, midi_inptr, w));
return;
}
midibuf[midi_inlast++] = (uae_u8)w;
static void add3byte(DWORD_PTR w) //put 3 Byte to Midibuffer
{
if(midi_inlast >= BUFFLEN - 10) {
- TRACE(("add3byte buffer full %d %d (%08X)\n", midi_inlast, midi_inptr, w));
+ TRACE((L"add3byte buffer full %d %d (%08X)\n", midi_inlast, midi_inptr, w));
return;
}
midibuf[midi_inlast++] = (uae_u8)w;
gui_message(szMessage);
overflow = 0;
}
- TRACE(("getmidibyte(%02X)\n", midibuf[midi_inptr]));
+ TRACE((L"getmidibyte(%02X)\n", midibuf[midi_inptr]));
if (midibuf[midi_inptr] >= 0xf0) { // only check for free buffers if status sysex
for (i = 0;i < MIDI_INBUFFERS;i++) {
if (midiin[i].dwFlags == (MHDR_DONE|MHDR_PREPARED)) {
{
EnterCriticalSection (&cs_proc);
if(wMsg == MIM_ERROR) {
- TRACE(("MIDI Data Lost\n"));
+ TRACE((L"MIDI Data Lost\n"));
}
if(wMsg == MIM_LONGDATA) {
LPMIDIHDR midiin = (LPMIDIHDR)dwParam1;
- TRACE(("MIM_LONGDATA bytes=%d ts=%u\n", midiin->dwBytesRecorded, dwParam2));
+ TRACE((L"MIM_LONGDATA bytes=%d ts=%u\n", midiin->dwBytesRecorded, dwParam2));
if (exitin == 1)
goto end; //for safeness midi want close
if ((midi_inlast + midiin->dwBytesRecorded) >= (BUFFLEN-6)) {
overflow = 1;
- TRACE(("MIDI overflow1\n"));
+ TRACE((L"MIDI overflow1\n"));
//for safeness if buffer too full (should not occur)
goto end;
}
if (midiin->dwBufferLength == midiin->dwBytesRecorded) {
//for safeness if buffer too full (should not occur)
overflow = 1;
- TRACE(("MIDI overflow2\n"));
+ TRACE((L"MIDI overflow2\n"));
goto end;
}
memcpy(&midibuf[midi_inlast], midiin->lpData, midiin->dwBytesRecorded);
if(wMsg == MM_MIM_DATA || wMsg == MM_MIM_MOREDATA) {
BYTE state = (BYTE)dwParam1;
- TRACE(("%s %08X\n", wMsg == MM_MIM_DATA ? "MM_MIM_DATA" : "MM_MIM_MOREDATA", dwParam1));
+ TRACE((L"%s %08X\n", wMsg == MM_MIM_DATA ? "MM_MIM_DATA" : "MM_MIM_MOREDATA", dwParam1));
if(state == 254)
goto end;
if(state < 0xf0)
CONTROL "Disable UAEFSDB-support",IDC_NOUAEFSDB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,154,119,10\r
CONTROL "Don't use Windows Recycle Bin",IDC_NORECYCLEBIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,166,121,10\r
CONTROL "Include network drives..",IDC_MAPDRIVES_NET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,178,101,10\r
- CONTROL "CDFS automount CD/DVD drives.",IDC_MAPDRIVES_CD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,190,160,10\r
+ CONTROL "CDFS automount CD/DVD drives",IDC_MAPDRIVES_CD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,190,160,10\r
CONTROL "Automount removable drives",IDC_MAPDRIVES_AUTO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,178,115,10\r
CONTROL "Include removable drives..",IDC_MAPDRIVES_REMOVABLE,\r
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,166,100,10\r
#include "od-win32/parser.h"
-#define SERIALLOGGING 1
+#define SERIALLOGGING 0
#define SERIALDEBUG 0 /* 0, 1, 2 3 */
#define SERIALHSDEBUG 0
#define MODEMTEST 0 /* 0 or 1 */
#define LANG_DLL 1
//#define WINUAEBETA L""
-#define WINUAEBETA L"Beta 23"
-#define WINUAEDATE MAKEBD(2012, 3, 21)
+#define WINUAEBETA L"Beta 24 (RC2)"
+#define WINUAEDATE MAKEBD(2012, 3, 22)
#define WINUAEEXTRA L"RC1"
//#define WINUAEEXTRA L"AmiKit Preview"
#define WINUAEREV L""
+Beta 24: (RC2)
+
+- CDFS Amiga Rock Ridge 'AS' extension support added. (comments and protection flags)
+- Free CDFS inodes if they are not needed anymore, previously only freed when media was changed,
+ better performance and less (host) memory used when CD has 10000+ files or directories.
+- More logical "RDB: WARNING: end of partition > size of disk" message. Check RDSK header size and partition(s)
+ size separately.
+- CDFS boot priority changed to -127 (lowest possible).
+
Beta 23:
- CPU Idle change improved, b22 caused major slowdowns on some systems.