scsi_free (sd);
}
-int addscsi (int ch, TCHAR *path, int blocksize, int readonly,
- TCHAR *devname, int sectors, int surfaces, int reserved,
- int bootpri, TCHAR *filesys, int scsi_level)
+int addscsi (int ch, const TCHAR *path, int blocksize, int readonly,
+ const TCHAR *devname, int sectors, int surfaces, int reserved,
+ int bootpri, const TCHAR *filesys, int scsi_level)
{
struct hd_hardfiledata *hfd;
}
}
-int a3000_add_scsi_unit (int ch, TCHAR *path, int blocksize, int readonly,
- TCHAR *devname, int sectors, int surfaces, int reserved,
- int bootpri, TCHAR *filesys)
+int a3000_add_scsi_unit (int ch, const TCHAR *path, int blocksize, int readonly,
+ const TCHAR *devname, int sectors, int surfaces, int reserved,
+ int bootpri, const TCHAR *filesys)
{
return addscsi (ch, path, blocksize, readonly, devname, sectors, surfaces, reserved, bootpri, filesys, 2);
}
freenativescsi ();
}
-int a2091_add_scsi_unit (int ch, TCHAR *path, int blocksize, int readonly,
- TCHAR *devname, int sectors, int surfaces, int reserved,
- int bootpri, TCHAR *filesys)
+int a2091_add_scsi_unit (int ch, const TCHAR *path, int blocksize, int readonly,
+ const TCHAR *devname, int sectors, int surfaces, int reserved,
+ int bootpri, const TCHAR *filesys)
{
return addscsi (ch, path, blocksize, readonly, devname, sectors, surfaces, reserved, bootpri, filesys, 1);
}
if (unzlocal_getShort(fin,&number_entry_CD)!=UNZ_OK)
err=UNZ_ERRNO;
- if ((number_entry_CD!=us.gi.number_entry) ||
- (number_disk_with_CD!=0) ||
+// if ((number_entry_CD!=us.gi.number_entry) ||
+// (number_disk_with_CD!=0) ||
+// (number_disk!=0))
+// err=UNZ_BADZIPFILE;
+ if ((number_disk_with_CD!=0) ||
(number_disk!=0))
err=UNZ_BADZIPFILE;
err=UNZ_ERRNO;
else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method))
err=UNZ_BADZIPFILE;
-
+/*
if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) &&
- (s->cur_file_info.compression_method!=Z_DEFLATED))
- err=UNZ_BADZIPFILE;
-
+ (s->cur_file_info.compression_method!=Z_DEFLATED && s->cur_file_info.compression_method!=ZIP_BZIP2))
+ err=UNZ_BADZIPFILE;
+*/
if (unzlocal_getLong(s->file,&uData) != UNZ_OK) /* date/time */
err=UNZ_ERRNO;
pfile_in_zip_read_info->stream_initialised=0;
if ((s->cur_file_info.compression_method!=0) &&
- (s->cur_file_info.compression_method!=Z_DEFLATED))
+ (s->cur_file_info.compression_method!=Z_DEFLATED)) {
+ write_log (L"ZIP: unknown compression method %d\n", s->cur_file_info.compression_method);
err=UNZ_BADZIPFILE;
+ }
Store = s->cur_file_info.compression_method==0;
pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
#endif
+#define ZIP_BZIP2 12
+
#define UNZ_OK (0)
#define UNZ_END_OF_LIST_OF_FILE (-100)
#define UNZ_ERRNO (Z_ERRNO)
} else if (sectorsize == 2048 && t->size == 2352) {
// 2352 -> 2048
while (size-- > 0) {
- zfile_fseek (t->handle, t->offset + sector * t->size + 16, SEEK_SET);
+ uae_u8 b = 0;
+ zfile_fseek (t->handle, t->offset + sector * t->size + 15, SEEK_SET);
+ zfile_fread (&b, 1, 1, t->handle);
+ if (b == 2) // MODE2?
+ zfile_fseek (t->handle, t->offset + sector * t->size + 24, SEEK_SET);
zfile_fread (data, sectorsize, 1, t->handle);
sector++;
data += sectorsize;
return 0;
struct cdtoc *t = findtoc (cdu, §or);
- int offset;
if (!t || t->handle == NULL)
return NULL;
cdda_stop (cdu);
if (t->size == 2048) {
- int offset = 0;
- zfile_fseek (t->handle, t->offset + sector * t->size + offset, SEEK_SET);
+ zfile_fseek (t->handle, t->offset + sector * t->size, SEEK_SET);
zfile_fread (data, size, 2048, t->handle);
sector += size;
} else {
- offset = 16;
while (size-- > 0) {
- zfile_fseek (t->handle, t->offset + sector * t->size + offset, SEEK_SET);
- zfile_fread (data, size, 2048, t->handle);
+ if (t->size == 2352) {
+ uae_u8 b = 0;
+ zfile_fseek (t->handle, t->offset + sector * t->size + 15, SEEK_SET);
+ zfile_fread (&b, 1, 1, t->handle);
+ if (b == 2) // MODE2?
+ zfile_fseek (t->handle, t->offset + sector * t->size + 24, SEEK_SET);
+ } else {
+ zfile_fseek (t->handle, t->offset + sector * t->size + 16, SEEK_SET);
+ }
+ zfile_fread (data, 1, 2048, t->handle);
data += 2048;
sector++;
}
static int read_sectors (int start, int length)
{
-#ifdef CDTV_DEBUG
+#ifdef CDTV_DEBUG_CMD
write_log (L"READ DATA sector %d, %d sectors (blocksize=%d)\n", start, length, cdtv_sectorsize);
#endif
cdrom_sector = start;
play_start = start;
last_play_pos = start;
last_play_end = end;
-#ifdef CDTV_DEBUG
+#ifdef CDTV_DEBUG_CMD
write_log (L"PLAY CD AUDIO from %d-%d, %06X (%d) to %06X (%d)\n",
track_start, track_end, start, start, end, end);
#endif
play_start = start;
last_play_pos = start;
last_play_end = end;
-#ifdef CDTV_DEBUG
+#ifdef CDTV_DEBUG_CMD
write_log (L"PLAY CD AUDIO from %06X (%d) to %06X (%d)\n",
lsn2msf (start), start, lsn2msf (end), end);
#endif
if (!cdtv_sectorsize)
return;
cnt = dmac_wtc;
-#ifdef CDTV_DEBUG
+#ifdef CDTV_DEBUG_CMD
write_log (L"DMAC DMA: sector=%d, addr=%08X, words=%d (of %d)\n",
cdrom_offset / cdtv_sectorsize, dmac_acr, cnt, cdrom_length / 2);
#endif
uae_u8 buffer[2352];
if (!didread || readsector != (cdrom_offset / cdtv_sectorsize)) {
readsector = cdrom_offset / cdtv_sectorsize;
+ if (readsector > 3000)
+ write_log (L"");
if (cdtv_sectorsize != 2048)
didread = read_raw (readsector, buffer, cdtv_sectorsize);
else
play_start = start;
last_play_pos = start;
last_play_end = end;
-#ifdef CDTV_DEBUG
+#ifdef CDTV_DEBUG_CMD
write_log (L"PLAY CD AUDIO from %06X (%d) to %06X (%d)\n",
lsn2msf (start), start, lsn2msf (end), end);
#endif
if (dma_wait >= 0 && dma_wait < 1024 && dma_finished) {
if ((dmac_cntr & (CNTR_INTEN | CNTR_TCEN)) == (CNTR_INTEN | CNTR_TCEN)) {
dmac_istr |= ISTR_INT_P | ISTR_E_INT;
-#ifdef CDTV_DEBUG
+#ifdef CDTV_DEBUG_CMD
write_log (L"DMA finished\n");
#endif
}
subchannelcounter = 200;
}
}
+ if (!scor && !cd_playing) {
+ // frame interrupts happen all the time motor is running
+ scor = 1;
+ tp_check_interrupts ();
+ scor = 0;
+ subchannelcounter = 200;
+ }
}
if (cdtv_hsync < 200 && cdtv_hsync >= 0)
cd_led |= LED_CD_ACTIVE;
else
cd_led &= ~LED_CD_ACTIVE;
- if (cd_led && !cd_playing)
+ if ((cd_led & ~LED_CD_ACTIVE2) && !cd_playing)
gui_flicker_led (LED_CD, 0, cd_led);
subqcnt--;
#endif
}
-static void cdtv_reset (void)
+static void cdtv_reset_int (void)
{
write_log (L"CDTV: reset\n");
cdaudiostop ();
case 0x43:
dmac_cntr = b;
if (dmac_cntr & CNTR_PREST)
- cdtv_reset ();
+ cdtv_reset_int ();
break;
case 0x80:
dmac_wtc &= 0x00ffffff;
sys_command_info (unitnum, &di, 0);
write_log (L"using drive %s (unit %d, media %d)\n", di.label, unitnum, di.media_inserted);
}
+static void close_unit (void)
+{
+ if (unitnum >= 0)
+ sys_command_close (unitnum);
+ unitnum = -1;
+}
static void ew (int addr, uae_u32 value)
{
write_comm_pipe_u32 (&requests, 0xffff, 1);
while (thread_alive > 0)
sleep_millis (10);
+ uae_sem_destroy (&sub_sem);
}
thread_alive = 0;
- if (unitnum >= 0)
- sys_command_close (unitnum);
- unitnum = -1;
- uae_sem_destroy (&sub_sem);
+ close_unit ();
configured = 0;
}
+
#ifdef ROMHACK2
extern uae_u8 *extendedkickmemory, *cardmemory;
static void romhack (void)
void cdtv_init (void)
{
+ close_unit ();
if (!thread_alive) {
init_comm_pipe (&requests, 100, 1);
uae_start_thread (L"cdtv", dev_thread, NULL, NULL);
while (!thread_alive)
sleep_millis(10);
+ uae_sem_init (&sub_sem, 0, 1);
}
write_comm_pipe_u32 (&requests, 0x0104, 1);
ew (0x20, 0x00); /* ser.no. Byte 2 */
ew (0x24, 0x00); /* ser.no. Byte 3 */
- uae_sem_init (&sub_sem, 0, 1);
-
/* KS autoconfig handles the rest */
map_banks (&dmac_bank, 0xe80000 >> 16, 0x10000 >> 16, 0x10000);
if (!savestate_state) {
}
}
+ if (p->statefile[0])
+ cfgfile_write_str (f, L"statefile", p->statefile);
if (p->quitstatefile[0])
cfgfile_write_str (f, L"statefile_quit", p->quitstatefile);
cfgfile_dwrite (f, L"gfx_gamma", L"%d", p->gfx_gamma);
cfgfile_dwrite_str (f, L"gfx_filter_mask", p->gfx_filtermask);
if (p->gfx_filteroverlay[0]) {
- cfgfile_dwrite (f, L"gfx_filter_overlay", L"%s:%d%s,%d%s,%d%s,%d%s",
+ cfgfile_dwrite (f, L"gfx_filter_overlay", L"%s%s",
+ p->gfx_filteroverlay, _tcschr (p->gfx_filteroverlay, ',') ? L"," : L"");
+
+#if 0
+ cfgfile_dwrite (f, L"gfx_filter_overlay", L"%s,%d%s:%d%s:%d%s:%d%s:%d%%",
p->gfx_filteroverlay,
p->gfx_filteroverlay_pos.x >= -24000 ? p->gfx_filteroverlay_pos.x : -p->gfx_filteroverlay_pos.x - 30000,
p->gfx_filteroverlay_pos.x >= -24000 ? L"" : L"%",
p->gfx_filteroverlay_pos.y >= -24000 ? L"" : L"%",
p->gfx_filteroverlay_pos.width >= -24000 ? p->gfx_filteroverlay_pos.width : -p->gfx_filteroverlay_pos.width - 30000,
p->gfx_filteroverlay_pos.width >= -24000 ? L"" : L"%",
- p->gfx_filteroverlay_pos.height >= -24000 ? p->gfx_filteroverlay_pos.height : -p->gfx_filteroverlay_pos.height - 300000,
- p->gfx_filteroverlay_pos.height >= -24000 ? L"" : L"%"
+ p->gfx_filteroverlay_pos.height >= -24000 ? p->gfx_filteroverlay_pos.height : -p->gfx_filteroverlay_pos.height - 30000,
+ p->gfx_filteroverlay_pos.height >= -24000 ? L"" : L"%",
+ p->gfx_filteroverlay_overscan
);
+#endif
}
#endif
#ifdef GFXFILTER
if (_tcscmp (option, L"gfx_filter_overlay") == 0) {
- TCHAR *s = _tcschr (value, ':');
+ TCHAR *s = _tcschr (value, ',');
+ p->gfx_filteroverlay_overscan = 0;
p->gfx_filteroverlay_pos.x = 0;
p->gfx_filteroverlay_pos.y = 0;
p->gfx_filteroverlay_pos.width = 0;
p->gfx_filteroverlay_pos.height = 0;
+ if (s)
+ *s = 0;
while (s) {
*s++ = 0;
+ p->gfx_filteroverlay_overscan = _tstol (s);
+ s = _tcschr (s, ':');
+ if (!s)
+ break;
+#if 0
p->gfx_filteroverlay_pos.x = _tstol (s);
s = _tcschr (s, ',');
if (!s)
p->gfx_filteroverlay_pos.width = -30000 - p->gfx_filteroverlay_pos.width;
*s++ = 0;
p->gfx_filteroverlay_pos.height = _tstol (s);
+ s = _tcschr (s, ',');
+ if (!s)
+ break;
+ if (s[-1] == '%')
+ p->gfx_filteroverlay_pos.height = -30000 - p->gfx_filteroverlay_pos.height;
+ *s++ = 0;
+ p->gfx_filteroverlay_overscan = _tstol (s);
TCHAR *s2 = _tcschr (s, ',');
if (s2)
*s2 = 0;
- s = s + _tcslen (s);
- if (s[-1] == '%')
- p->gfx_filteroverlay_pos.height = -30000 - p->gfx_filteroverlay_pos.height;
+#endif
break;
}
_tcsncpy (p->gfx_filteroverlay, value, sizeof p->gfx_filteroverlay / sizeof (TCHAR) - 1);
return 1;
if (cfgfile_path (option, value, L"statefile", tmpbuf, sizeof tmpbuf / sizeof (TCHAR))) {
+ _tcscpy (p->statefile, tmpbuf);
_tcscpy (savestate_fname, tmpbuf);
if (zfile_exists (savestate_fname)) {
savestate_state = STATE_DORESTORE;
*p = 0;
}
}
- if (!ok)
- savestate_fname[0] = 0;
+ if (!ok) {
+ TCHAR tmp[MAX_DPATH];
+ fetch_statefilepath (tmp, sizeof tmp / sizeof (TCHAR));
+ _tcscat (tmp, savestate_fname);
+ if (zfile_exists (tmp)) {
+ _tcscpy (savestate_fname, tmp);
+ savestate_state = STATE_DORESTORE;
+ } else {
+ savestate_fname[0] = 0;
+ }
+ }
}
return 1;
}
p->gfx_filter_scanlineratio = (1 << 4) | 1;
p->gfx_filter_keep_aspect = 0;
p->gfx_filter_autoscale = 0;
+ p->gfx_filteroverlay_overscan = 0;
_tcscpy (p->floppyslots[0].df, L"df0.adf");
_tcscpy (p->floppyslots[1].df, L"df1.adf");
if ((beamcon0 & 0xA0) != (new_beamcon0 & 0xA0))
hzc = 1;
if (beamcon0 != new_beamcon0) {
- write_log (L"BEAMCON0 %04x -> %04x\n", beamcon0, new_beamcon0);
+ write_log (L"BEAMCON0 %04x -> %04x PC%=%08x\n", beamcon0, new_beamcon0, M68K_GETPC);
vpos_count = vpos_count_prev = 0;
}
beamcon0 = new_beamcon0;
{
if (diwstrt == v && ! diwhigh_written)
return;
+ decide_diw (hpos);
decide_line (hpos);
diwhigh_written = 0;
diwstrt = v;
{
if (diwstop == v && ! diwhigh_written)
return;
+ decide_diw (hpos);
decide_line (hpos);
diwhigh_written = 0;
diwstop = v;
console_out_f (L"COP1LC: %08lx, COP2LC: %08lx COPPTR: %08lx\n", (unsigned long)cop1lc, (unsigned long)cop2lc, cop_state.ip);
console_out_f (L"DIWSTRT: %04x DIWSTOP: %04x DDFSTRT: %04x DDFSTOP: %04x\n",
(unsigned int)diwstrt, (unsigned int)diwstop, (unsigned int)ddfstrt, (unsigned int)ddfstop);
- console_out_f (L"BPLCON 0: %04x 1: %04x 2: %04x 3: %04x 4: %04x LOF=%d/%d\n", bplcon0, bplcon1, bplcon2, bplcon3, bplcon4, lof_current, lof_store);
+ console_out_f (L"BPLCON 0: %04x 1: %04x 2: %04x 3: %04x 4: %04x LOF=%d/%d HDIW=%d VDIW=%d\n",
+ bplcon0, bplcon1, bplcon2, bplcon3, bplcon4,
+ lof_current, lof_store,
+ hdiwstate == DIW_waiting_start ? 0 : 1, diwstate == DIW_waiting_start ? 0 : 1);
if (timeframes) {
console_out_f (L"Average frame time: %.2f ms [frames: %d time: %d]\n",
(double)frametime / timeframes, timeframes, frametime);
return my_strdup (newname);
}
-static void dump_partinfo (uae_u8 *name, int num, uaecptr pp, int partblock)
+static void dump_partinfo (struct hardfiledata *hfd, const uae_u8 *name, int num, uaecptr pp, int partblock)
{
TCHAR *s = au ((char*)name);
uae_u32 dostype = get_long (pp + 80);
uae_u64 size;
+ int blocksize, surfaces, spb, spt, reserved;
+ int lowcyl, highcyl;
+ uae_u32 block;
+ uae_u8 buf[512];
size = ((uae_u64)get_long (pp + 20)) * 4 * get_long (pp + 28) * get_long (pp + 36) * (get_long (pp + 56) - get_long (pp + 52) + 1);
+ blocksize = get_long (pp + 20) * 4;
+ surfaces = get_long (pp + 28);
+ spb = get_long (pp + 32);
+ spt = get_long (pp + 36);
+ reserved = get_long (pp + 40);
+ lowcyl = get_long (pp + 52);
+ highcyl = get_long (pp + 56);
write_log (L"RDB: '%s' dostype=%08X. PartBlock=%d\n", s, dostype, partblock);
write_log (L"BlockSize: %d, Surfaces: %d, SectorsPerBlock %d\n",
- get_long (pp + 20) * 4, get_long (pp + 28), get_long (pp + 32));
+ blocksize, surfaces, spb);
write_log (L"SectorsPerTrack: %d, Reserved: %d, LowCyl %d, HighCyl %d, Size %dM\n",
- get_long (pp + 36), get_long (pp + 40), get_long (pp + 52), get_long (pp + 56), (uae_u32)(size >> 20));
-
+ get_long (pp + 36), get_long (pp + 40), lowcyl, highcyl, (uae_u32)(size >> 20));
write_log (L"Buffers: %d, BufMemType: %08x, MaxTransfer: %08x, BootPri: %d\n",
get_long (pp + 60), get_long (pp + 64), get_long (pp + 68), get_long (pp + 76));
+
+ block = lowcyl * surfaces * spt;
+ if (hdf_read (hfd, buf, (uae_u64)blocksize * block, sizeof buf)) {
+ write_log (L"First block %d dostype: %08X\n", block, (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | (buf[3] << 0));
+ } else {
+ write_log (L"First block %d read failed!\n", block);
+ }
xfree (s);
}
put_long (parmpacket + 12, 0); /* Device flags */
for (i = 0; i < PP_MAXSIZE; i++)
put_byte (parmpacket + 16 + i, buf[128 + i]);
- dump_partinfo (buf + 37, uip->devno, parmpacket, partblock);
+ dump_partinfo (hfd, buf + 37, uip->devno, parmpacket, partblock);
dostype = get_long (parmpacket + 80);
if (dostype == 0) {
static uae_u64 vhd_read (struct hardfiledata *hfd, void *v, uae_u64 offset, uae_u64 len)
{
- uae_u32 bamoffset;
- uae_u32 sectoroffset;
uae_u64 read;
uae_u8 *dataptr = (uae_u8*)v;
if (len & 511)
return read;
while (len > 0) {
- bamoffset = (offset / hfd->vhd_blocksize) * 4 + hfd->vhd_bamoffset;
- sectoroffset = gl (hfd->vhd_header + bamoffset);
+ uae_u32 bamoffset = (offset / hfd->vhd_blocksize) * 4 + hfd->vhd_bamoffset;
+ uae_u32 sectoroffset = gl (hfd->vhd_header + bamoffset);
if (sectoroffset == 0xffffffff) {
memset (dataptr, 0, 512);
read += 512;
} else {
int bitmapoffsetbits;
int bitmapoffsetbytes;
- int sectormapblock;
+ uae_u64 sectormapblock;
bitmapoffsetbits = (offset / 512) % (hfd->vhd_blocksize / 512);
bitmapoffsetbytes = bitmapoffsetbits / 8;
- sectormapblock = sectoroffset * 512 + (bitmapoffsetbytes & ~511);
+ sectormapblock = sectoroffset * (uae_u64)512 + (bitmapoffsetbytes & ~511);
if (hfd->vhd_sectormapblock != sectormapblock) {
// read sector bitmap
//write_log (L"BM %08x\n", sectormapblock);
// block allocated in bitmap?
if (hfd->vhd_sectormap[bitmapoffsetbytes & 511] & (1 << (7 - (bitmapoffsetbits & 7)))) {
// read data block
- int block = sectoroffset * 512 + hfd->vhd_bitmapsize + bitmapoffsetbits * 512;
+ uae_u64 block = sectoroffset * (uae_u64)512 + hfd->vhd_bitmapsize + bitmapoffsetbits * 512;
//write_log (L"DB %08x\n", block);
if (hdf_read_target (hfd, dataptr, block, 512) != 512) {
write_log (L"vhd_read: data read error\n");
static uae_u64 vhd_write (struct hardfiledata *hfd, void *v, uae_u64 offset, uae_u64 len)
{
- uae_u32 bamoffset;
- uae_u32 sectoroffset;
uae_u64 written;
uae_u8 *dataptr = (uae_u8*)v;
if (len & 511)
return written;
while (len > 0) {
- bamoffset = (offset / hfd->vhd_blocksize) * 4 + hfd->vhd_bamoffset;
- sectoroffset = gl (hfd->vhd_header + bamoffset);
+ uae_u32 bamoffset = (offset / hfd->vhd_blocksize) * 4 + hfd->vhd_bamoffset;
+ uae_u32 sectoroffset = gl (hfd->vhd_header + bamoffset);
if (sectoroffset == 0xffffffff) {
if (!vhd_write_enlarge (hfd, bamoffset))
return written;
} else {
int bitmapoffsetbits;
int bitmapoffsetbytes;
- int sectormapblock;
bitmapoffsetbits = (offset / 512) % (hfd->vhd_blocksize / 512);
bitmapoffsetbytes = bitmapoffsetbits / 8;
- sectormapblock = sectoroffset * 512 + (bitmapoffsetbytes & ~511);
+ uae_u64 sectormapblock = sectoroffset * (uae_u64)512 + (bitmapoffsetbytes & ~511);
if (hfd->vhd_sectormapblock != sectormapblock) {
// read sector bitmap
if (hdf_read_target (hfd, hfd->vhd_sectormap, sectormapblock, 512) != 512) {
hfd->vhd_sectormapblock = sectormapblock;
}
// write data
- if (hdf_write_target (hfd, dataptr, sectoroffset * 512 + hfd->vhd_bitmapsize + bitmapoffsetbits * 512, 512) != 512) {
+ if (hdf_write_target (hfd, dataptr, sectoroffset * (uae_u64)512 + hfd->vhd_bitmapsize + bitmapoffsetbits * 512, 512) != 512) {
write_log (L"vhd_write: data write error\n");
return written;
}
return cmd_writex (hfd, bank_data->xlateaddr (dataptr), offset, len);
}
-static int checkbounds(struct hardfiledata *hfd, uae_u64 offset, uae_u64 len)
+static int checkbounds (struct hardfiledata *hfd, uae_u64 offset, uae_u64 len)
{
- if (offset >= hfd->physsize)
+ if (offset >= hfd->virtsize)
return 0;
- if (offset + len > hfd->physsize)
+ if (offset + len > hfd->virtsize)
return 0;
return 1;
}
#define WD33C93 L"WD33C93"
#define SCSIID (scsis[wdregs[WD_DESTINATION_ID] & 7])
-extern int a2091_add_scsi_unit (int ch, TCHAR *path, int blocksize, int readonly,
- TCHAR *devname, int sectors, int surfaces, int reserved,
- int bootpri, TCHAR *filesys);
-extern int a3000_add_scsi_unit (int ch, TCHAR *path, int blocksize, int readonly,
- TCHAR *devname, int sectors, int surfaces, int reserved,
- int bootpri, TCHAR *filesys);
-
-extern int addscsi (int ch, TCHAR *path, int blocksize, int readonly,
- TCHAR *devname, int sectors, int surfaces, int reserved,
- int bootpri, TCHAR *filesys, int scsi_level);
+extern int a2091_add_scsi_unit (int ch, const TCHAR *path, int blocksize, int readonly,
+ const TCHAR *devname, int sectors, int surfaces, int reserved,
+ int bootpri, const TCHAR *filesys);
+extern int a3000_add_scsi_unit (int ch, const TCHAR *path, int blocksize, int readonly,
+ const TCHAR *devname, int sectors, int surfaces, int reserved,
+ int bootpri, const TCHAR *filesys);
+
+extern int addscsi (int ch, const TCHAR *path, int blocksize, int readonly,
+ const TCHAR *devname, int sectors, int surfaces, int reserved,
+ int bootpri, const TCHAR *filesys, int scsi_level);
#endif
TCHAR gfx_filtermask[MAX_DPATH];
TCHAR gfx_filteroverlay[MAX_DPATH];
struct wh gfx_filteroverlay_pos;
+ int gfx_filteroverlay_overscan;
int gfx_filter_scanlines;
int gfx_filter_scanlineratio;
int gfx_filter_scanlinelevel;
TCHAR a2065name[MAX_DPATH];
struct cdslot cdslots[MAX_TOTAL_SCSI_DEVICES];
TCHAR quitstatefile[MAX_DPATH];
+ TCHAR statefile[MAX_DPATH];
TCHAR path_floppy[256];
TCHAR path_hardfile[256];
extern void fetch_configurationpath (TCHAR *out, int size);
extern void fetch_screenshotpath (TCHAR *out, int size);
extern void fetch_ripperpath (TCHAR *out, int size);
+extern void fetch_statefilepath (TCHAR *out, int size);
extern void fetch_datapath (TCHAR *out, int size);
extern int uaerand (void);
//static uae_u32 pcs[1000];
-//#define DEBUG_CD32IO
-#ifdef DEBUG_CD32IO
+//#define DEBUG_CD32CDTVIO
+#ifdef DEBUG_CD32CDTVIO
static uae_u32 cd32nextpc, cd32request;
count_instr (opcode);
-#ifdef DEBUG_CD32IO
+#ifdef DEBUG_CD32CDTVIO
out_cd32io (m68k_getpc ());
#endif
ipl_fetch ();
for (;;) {
uae_u32 opcode = r->ir;
+#ifdef DEBUG_CD32CDTVIO
+ out_cd32io (m68k_getpc ());
+#endif
(*cpufunctbl[opcode])(opcode);
if (r->spcflags) {
if (do_specialties (0))
uae_u32 opcode;
uae_u32 pc = m68k_getpc ();
-#ifdef DEBUG_CD32IO
+#ifdef DEBUG_CD32CDTVIO
out_cd32io (m68k_getpc ());
#endif
if (!open_createfile (ciw, 0))
return 0;
- gui_flicker_led (LED_CD, unitnum, LED_CD_ACTIVE);
while (cnt-- > 0) {
seterrormode (ciw);
if (!DeviceIoControl (ciw->h, IOCTL_CDROM_READ_TOC, NULL, 0, toc, sizeof (CDROM_TOC), &len, NULL)) {
t->paddress = th->lastaddress;
t++;
- gui_flicker_led (LED_CD, unitnum, LED_CD_ACTIVE);
memcpy (tocout, th, sizeof (struct cd_toc_head));
return 1;
}
static IDirect3DDevice9 *d3ddev;
static IDirect3DDevice9Ex *d3ddevex;
static D3DSURFACE_DESC dsdbb;
-static LPDIRECT3DTEXTURE9 texture, sltexture, ledtexture, masktexture, mask2texture;
-static int masktexture_w, masktexture_h, mask2texture_w, mask2texture_h;
+static LPDIRECT3DTEXTURE9 texture, sltexture, ledtexture, masktexture, mask2texture, blanktexture;
+static int masktexture_w, masktexture_h;
+static float mask2texture_w, mask2texture_h, mask2texture_ww, mask2texture_wh;
+static float mask2texture_multx, mask2texture_multy, mask2texture_offsetw;
static LPDIRECT3DTEXTURE9 lpWorkTexture1, lpWorkTexture2, lpTempTexture;
LPDIRECT3DTEXTURE9 cursorsurfaced3d;
static LPDIRECT3DVOLUMETEXTURE9 lpHq2xLookupTexture;
static int locked, fulllocked;
static int cursor_offset_x, cursor_offset_y;
static float maskmult_x, maskmult_y;
+static RECT mask2rect;
static D3DXMATRIX m_matProj, m_matProj2;
static D3DXMATRIX m_matWorld, m_matWorld2;
sltexture->UnlockRect (0);
}
+static int findedge (D3DLOCKED_RECT *lock, int w, int h, int dx, int dy)
+{
+ int x = w / 2;
+ int y = h / 2;
+
+ if (dx != 0)
+ x = dx < 0 ? 0 : w - 1;
+ if (dy != 0)
+ y = dy < 0 ? 0 : h - 1;
+
+ for (;;) {
+ uae_u32 *p = (uae_u32*)((uae_u8*)lock->pBits + y * lock->Pitch + x * 4);
+ int alpha = (*p) >> 24;
+ if (alpha != 255)
+ break;
+ x -= dx;
+ y -= dy;
+ if (x <= 0 || y <= 0)
+ break;
+ if (x >= w - 1 || y >= h - 1)
+ break;
+ }
+ if (dx)
+ return x;
+ return y;
+}
+
static int createmask2texture (const TCHAR *filename)
{
struct zfile *zf;
if (filename[0] == 0 || WIN32GFX_IsPicassoScreen ())
return 0;
+
zf = NULL;
for (int i = 0; i < 2; i++) {
if (i == 0) {
} else {
_tcscpy (tmp, filename);
}
- zf = zfile_fopen (tmp, L"rb", ZFD_NORMAL);
- if (zf)
- break;
- TCHAR tmp2[MAX_DPATH];
- TCHAR *s = _tcsrchr (tmp, '.');
+ TCHAR tmp2[MAX_DPATH], tmp3[MAX_DPATH];
+ _tcscpy (tmp3, tmp);
+ TCHAR *s = _tcsrchr (tmp3, '.');
if (s) {
+ TCHAR *s2 = s;
+ while (s2 > tmp3) {
+ TCHAR v = *s2;
+ if (v == '_') {
+ s = s2;
+ break;
+ }
+ if (v == 'X' || v == 'x') {
+ s2--;
+ continue;
+ }
+ if (!_istdigit (v))
+ break;
+ s2--;
+ }
_tcscpy (tmp2, s);
_stprintf (s, L"_%dx%d%s", window_w, window_h, tmp2);
- zf = zfile_fopen (tmp, L"rb", ZFD_NORMAL);
+ zf = zfile_fopen (tmp3, L"rb", ZFD_NORMAL);
if (zf)
break;
+ float aspect = (float)window_w / window_h;
+ int ax = -1, ay = -1;
+ if (abs (aspect - 16.0 / 10.0) <= 0.1)
+ ax = 16, ay = 10;
+ if (abs (aspect - 16.0 / 9.0) <= 0.1)
+ ax = 16, ay = 9;
+ if (abs (aspect - 4.0 / 3.0) <= 0.1)
+ ax = 4, ay = 3;
+ if (ax > 0 && ay > 0) {
+ _stprintf (s, L"_%dx%d%s", ax, ay, tmp2);
+ zf = zfile_fopen (tmp3, L"rb", ZFD_NORMAL);
+ if (zf)
+ break;
+ }
}
+ zf = zfile_fopen (tmp, L"rb", ZFD_NORMAL);
+ if (zf)
+ break;
}
if (!zf) {
write_log (L"%s: couldn't open overlay '%s'\n", D3DHEAD, filename);
zfile_fread (buf, size, 1, zf);
zfile_fclose (zf);
hr = D3DXCreateTextureFromFileInMemoryEx (d3ddev, buf, size,
- D3DX_DEFAULT_NONPOW2, D3DX_DEFAULT_NONPOW2, D3DX_DEFAULT, D3DUSAGE_DYNAMIC, D3DFMT_A8R8G8B8,
+ D3DX_DEFAULT_NONPOW2, D3DX_DEFAULT_NONPOW2, 1, D3DUSAGE_DYNAMIC, D3DFMT_A8R8G8B8,
D3DPOOL_DEFAULT, D3DX_FILTER_NONE, D3DX_FILTER_NONE, 0, &dinfo, NULL, &tx);
xfree (buf);
if (FAILED (hr)) {
mask2texture_w = dinfo.Width;
mask2texture_h = dinfo.Height;
mask2texture = tx;
+ mask2rect.left = 0;
+ mask2rect.top = 0;
+ mask2rect.right = mask2texture_w;
+ mask2rect.bottom = mask2texture_h;
+
+ D3DLOCKED_RECT lock;
+ if (SUCCEEDED (hr = mask2texture->LockRect (0, &lock, NULL, 0))) {
+ mask2rect.left = findedge (&lock, mask2texture_w, mask2texture_h, -1, 0);
+ mask2rect.right = findedge (&lock, mask2texture_w, mask2texture_h, 1, 0);
+ mask2rect.top = findedge (&lock, mask2texture_w, mask2texture_h, 0, -1);
+ mask2rect.bottom = findedge (&lock, mask2texture_w, mask2texture_h, 0, 1);
+ mask2texture->UnlockRect (0);
+ }
+ if (mask2rect.left >= mask2texture_w / 2 || mask2rect.top >= mask2texture_h / 2 ||
+ mask2rect.right <= mask2texture_w / 2 || mask2rect.bottom <= mask2texture_h / 2) {
+ mask2rect.left = 0;
+ mask2rect.top = 0;
+ mask2rect.right = mask2texture_w;
+ mask2rect.bottom = mask2texture_h;
+ }
+ mask2texture_multx = (float)window_w / mask2texture_w;
+ mask2texture_multy = (float)window_h / mask2texture_h;
+ mask2texture_offsetw = 0;
+
+ if (isfullscreen () > 0) {
+ struct MultiDisplay *md = getdisplay (&currprefs);
+ float deskw = md->rect.right - md->rect.left;
+ float deskh = md->rect.bottom - md->rect.top;
+ //deskw = 800; deskh = 600;
+ float dstratio = deskw / deskh;
+ float srcratio = mask2texture_w / mask2texture_h;
+ mask2texture_multx *= srcratio / dstratio;
+ } else {
+ mask2texture_multx = mask2texture_multy;
+ }
+
+ mask2texture_wh = window_h;
+ mask2texture_ww = mask2texture_w * mask2texture_multx;
+
+ mask2texture_offsetw = (window_w - mask2texture_ww) / 2;
+
+ blanktexture = createtext (mask2texture_offsetw + 1, window_h, D3DFMT_X8R8G8B8);
+
+ write_log (L"%s: overlay '%s' %.0f*%.0f (%d*%d - %d*%d)\n",
+ D3DHEAD, tmp, mask2texture_w, mask2texture_h,
+ mask2rect.left, mask2rect.top, mask2rect.right, mask2rect.bottom);
+
return 1;
end:
if (tx)
zfile_fread (buf, size, 1, zf);
zfile_fclose (zf);
hr = D3DXCreateTextureFromFileInMemoryEx (d3ddev, buf, size,
- D3DX_DEFAULT_NONPOW2, D3DX_DEFAULT_NONPOW2, D3DX_DEFAULT, D3DUSAGE_DYNAMIC, D3DFMT_X8R8G8B8,
+ D3DX_DEFAULT_NONPOW2, D3DX_DEFAULT_NONPOW2, 1, D3DUSAGE_DYNAMIC, D3DFMT_X8R8G8B8,
D3DPOOL_DEFAULT, D3DX_FILTER_NONE, D3DX_FILTER_NONE, 0, &dinfo, NULL, &tx);
xfree (buf);
if (FAILED (hr)) {
//write_log (L"%dx%d %dx%d %dx%d\n", tin_w, tin_h, tin_w, tin_h, window_w, window_h);
+ float mw = mask2rect.right - mask2rect.left;
+ float mh = mask2rect.bottom - mask2rect.top;
+
getfilterrect2 (&dr, &sr, &zr, window_w, window_h, tin_w / mult, tin_h / mult, mult, tin_w, tin_h);
if (memcmp (&sr, &sr2, sizeof RECT) || memcmp (&dr, &dr2, sizeof RECT) || memcmp (&zr, &zr2, sizeof RECT)) {
dr2 = dr;
zr2 = zr;
}
- cursor_offset_x = -zr.left;
- cursor_offset_y = -zr.top;
dw = dr.right - dr.left;
dh = dr.bottom - dr.top;
w = sr.right - sr.left;
h = sr.bottom - sr.top;
-
MatrixOrthoOffCenterLH (&m_matProj, 0, w, 0, h, 0.0f, 1.0f);
- MatrixTranslation (&m_matView,
- -0.5f + dw * tin_w / window_w / 2 - zr.left - sr.left, // - (tin_w - 2 * zr.left - w),
- +0.5f + dh * tin_h / window_h / 2 - zr.top - (tin_h - 2 * zr.top - h) + sr.top, // <- ???
- 0);
+ float tx, ty;
+ float sw, sh;
- float sw = dw * tin_w / window_w;
- float sh = dh * tin_h / window_h;
- MatrixScaling (&m_matWorld, sw, sh, 1.0f);
+ if (mask2texture) {
-#if 0
+ float winw = mw * mask2texture_multx;
+ float winh = mh * mask2texture_multy;
+ dw *= winw / window_w;
+ dh *= winh / window_h;
+ tx = -0.5f + dw * tin_w / winw / 2;
+ ty = +0.5f + dh * tin_h / winh / 2;
- MatrixOrthoOffCenterLH (&m_matProj, 0, w, 0, h, 0.0f, 1.0f);
+ float xshift = -zr.left - sr.left;
+ float yshift = +zr.top + sr.top - (tin_h - h);
- float ww = dw * tin_w / window_w;
- float hh = dh * tin_h / window_h;
+ sw = dw * tin_w / window_w;
+ sh = dh * tin_h / window_h;
- MatrixTranslation (&m_matView,
- -0.5f + ww / 2 - zr.left - sr.left, // - (tin_w - 2 * zr.left - w),
- 0.5f + hh / 2- zr.top - (tin_h - 2 * zr.top - h) + sr.top, // <- ???
- 0);
+ tx += xshift;
+ ty += yshift;
- MatrixOrthoOffCenterLH (&m_matProj, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f);
- MatrixOrthoOffCenterLH (&m_matProj, 0, dw, 0, dh, 0.0f, 1.0f);
- float mx = w / ww;
- float my = h / hh;
+ } else {
- MatrixTranslation (&m_matView, 0.5f - 0.5f / window_w, 0.5f + 0.5f / window_h, 0.0f);
- MatrixTranslation (&m_matView,
- 0.5f + (dw / 2) - (zr.left - sr.left),
- 0.5f + (dh / 2) - (zr.top - (tin_h - 2 * zr.top - h) + sr.top) * 0, // <- ???
- 0);
+ tx = -0.5f + dw * tin_w / window_w / 2;
+ ty = +0.5f + dh * tin_h / window_h / 2;
+ tx += - zr.left - sr.left; // - (tin_w - 2 * zr.left - w),
+ ty += + zr.top + sr.top - (tin_h - h);
+
+ sw = dw * tin_w / window_w;
+ sh = dh * tin_h / window_h;
+ }
- MatrixScaling (&m_matWorld, ww / w * dw, hh / h * dh, 1.0f);
-#endif
+ MatrixTranslation (&m_matView, tx, ty, 1.0f);
+ MatrixScaling (&m_matWorld, sw, sh, 1.0f);
+
+ cursor_offset_x = -zr.left;
+ cursor_offset_y = -zr.top;
- //write_log (L"%.1fx%.1f %.1fx%.1f %.1fx%.1f\n", dw, dh, w, h, ww, hh);
+ //write_log (L"%.1fx%.1f %.1fx%.1f %.1fx%.1f\n", dw, dh, w, h, sw, sh);
- float ww = dw * tin_w / window_w;
- float hh = dh * tin_h / window_h;
+ // ratio between Amiga texture and overlay mask texture
+ float sw2 = dw * tin_w / window_w;
+ float sh2 = dh * tin_h / window_h;
- // ratio between Amiga texture and overlay texture
- maskmult.x = ww * maskmult_x / w;
- maskmult.y = hh * maskmult_y / h;
+ maskmult.x = sw2 * maskmult_x / w;
+ maskmult.y = sh2 * maskmult_y / h;
maskshift.x = 1.0f / maskmult_x;
maskshift.y = 1.0f / maskmult_y;
D3DXMATRIX tmp;
D3DXMatrixMultiply (&tmp, &m_matWorld, &m_matView);
D3DXMatrixMultiply (&postproj, &tmp, &m_matProj);
-
}
uae_u8 *getfilterbuffer3d (int *widthp, int *heightp, int *pitch, int *depth)
psEffect_SetMatrices (&m_matProj, &m_matView, &m_matWorld);
MatrixOrthoOffCenterLH (&m_matProj2, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f);
+
MatrixTranslation (&m_matView2, 0.5f - 0.5f / window_w, 0.5f + 0.5f / window_h, 0.0f);
D3DXMatrixIdentity (&m_matWorld2);
}
mask2texture->Release ();
mask2texture = NULL;
}
+ if (blanktexture) {
+ blanktexture->Release ();
+ blanktexture = NULL;
+ }
if (lpTempTexture) {
lpTempTexture->Release ();
lpTempTexture = NULL;
sprite->SetTransform (&t);
sprite->Draw (cursorsurfaced3d, NULL, NULL, &v, 0xffffffff);
MatrixScaling (&t, 1, 1, 0);
+ sprite->Flush ();
sprite->SetTransform (&t);
}
if (mask2texture) {
D3DXMATRIX t;
- float w = (float)window_w / mask2texture_w;
- float h = (float)window_h / mask2texture_h;
-
+ RECT r;
+ float srcw = mask2texture_w;
+ float srch = mask2texture_h;
+ float aspectsrc = srcw / srch;
+ float aspectdst = (float)window_w / window_h;
+ float w, h;
+
+ w = mask2texture_multx;
+ h = mask2texture_multy;
+#if 0
if (currprefs.gfx_filteroverlay_pos.width > 0)
- w = (float)currprefs.gfx_filteroverlay_pos.width / mask2texture_w;
+ w = (float)currprefs.gfx_filteroverlay_pos.width / srcw;
else if (currprefs.gfx_filteroverlay_pos.width == -1)
w = 1.0;
else if (currprefs.gfx_filteroverlay_pos.width <= -24000)
w = w * (-currprefs.gfx_filteroverlay_pos.width - 30000) / 100.0;
if (currprefs.gfx_filteroverlay_pos.height > 0)
- h = (float)currprefs.gfx_filteroverlay_pos.height / mask2texture_h;
+ h = (float)currprefs.gfx_filteroverlay_pos.height / srch;
else if (currprefs.gfx_filteroverlay_pos.height == -1)
h = 1;
else if (currprefs.gfx_filteroverlay_pos.height <= -24000)
h = h * (-currprefs.gfx_filteroverlay_pos.height - 30000) / 100.0;
-
+#endif
MatrixScaling (&t, w, h, 0);
v.x = 0;
v.x /= w;
v.y /= h;
+ v.x = v.y = 0;
v.z = 0;
+ v.x += mask2texture_offsetw / w;
+
+ r.left = 0;
+ r.top = 0;
+ r.right = mask2texture_w;
+ r.bottom = mask2texture_h;
+
sprite->SetTransform (&t);
- sprite->Draw (mask2texture, NULL, NULL, &v, 0xffffffff);
+ sprite->Draw (mask2texture, &r, NULL, &v, 0xffffffff);
+ sprite->Flush ();
MatrixScaling (&t, 1, 1, 0);
sprite->SetTransform (&t);
+
+ if (mask2texture_offsetw > 0) {
+ v.x = 0;
+ v.y = 0;
+ r.left = 0;
+ r.top = 0;
+ r.right = mask2texture_offsetw + 1;
+ r.bottom = window_h;
+ sprite->Draw (blanktexture, &r, NULL, &v, 0xffffffff);
+ if (window_w > mask2texture_offsetw + mask2texture_ww) {
+ v.x = mask2texture_offsetw + mask2texture_ww;
+ v.y = 0;
+ r.left = 0;
+ r.top = 0;
+ r.right = window_w - (mask2texture_offsetw + mask2texture_ww) + 1;
+ r.bottom = window_h;
+ sprite->Draw (blanktexture, &r, NULL, &v, 0xffffffff);
+ }
+ }
+
}
if (ledtexture && (((currprefs.leds_on_screen & STATUSLINE_RTG) && WIN32GFX_IsPicassoScreen ()) || ((currprefs.leds_on_screen & STATUSLINE_CHIPSET) && !WIN32GFX_IsPicassoScreen ()))) {
v.x = 0;
{
fetch_path (L"RipperPath", out, size);
}
+void fetch_statefilepath (TCHAR *out, int size)
+{
+ fetch_path (L"StatefilePath", out, size);
+}
void fetch_datapath (TCHAR *out, int size)
{
fetch_path (NULL, out, size);
_tcscat (out, L"..\\shared\\rom\\");
if (!_tcscmp (name, L"ConfigurationPath"))
_tcscat (out, L"Configurations\\");
+ if (!_tcscmp (name, L"StatefilePath"))
+ _tcscat (out, L"Savestates\\");
if (start_data >= 0)
regquerystr (NULL, name, out, &size);
if (GetFileAttributes (out) == INVALID_FILE_ATTRIBUTES)
#define WINUAEPUBLICBETA 1
#define LANG_DLL 1
-#define WINUAEBETA L"9"
-#define WINUAEDATE MAKEBD(2010, 8, 4)
+#define WINUAEBETA L"10"
+#define WINUAEDATE MAKEBD(2010, 8, 10)
#define WINUAEEXTRA L""
#define WINUAEREV L""
aws = aw * scale;
ahs = ah * scale;
- extraw = -aws * filter_horiz_zoom / 2000;
- extrah = -ahs * filter_vert_zoom / 2000;
+ extraw = -aws * (filter_horiz_zoom - currprefs.gfx_filteroverlay_overscan * 10) / 2000;
+ extrah = -ahs * (filter_vert_zoom - currprefs.gfx_filteroverlay_overscan * 10) / 2000;
SetRect (sr, 0, 0, dst_width, dst_height);
SetRect (zr, 0, 0, 0, 0);
OffsetRect (zr, cx * scale - (dst_width - ww) / 2, cy * scale - (dst_height - hh) / 2);
goto cont;
- } else if (currprefs.gfx_filter_autoscale == 2 && isfullscreen () == 0) {
+ } else if (currprefs.gfx_filter_autoscale == 2 && isfullscreen () == 0 && !currprefs.gfx_filteroverlay[0]) {
static int lastresize = 0;
static int lastdelay = 1;
static int ocw, och, ocx, ocy, lcw, lch, lcx, lcy;
filteroffsety += diff / 2;
}
+ v = filter_horiz_offset;
+ OffsetRect (zr, (int)(-v * aws / 1000.0), 0);
+ v = filter_vert_offset;
+ OffsetRect (zr, 0, (int)(-v * ahs / 1000.0));
+
diff = dr->right - dr->left;
filterxmult = diff * 1000 / (dst_width * scale);
diff = dr->bottom - dr->top;
SetDlgItemText (hDlg, IDC_DISKTEXT, workprefs.dfxlist[entry]);
}
-static void addswapperfile (HWND hDlg, int entry, TCHAR *newpath)
-{
- TCHAR path[MAX_DPATH];
- int lastentry = entry;
-
- path[0] = 0;
- if (newpath)
- _tcscpy (path, newpath);
- if (MultiDiskSelection (hDlg, -1, 0, &changed_prefs, path)) {
- TCHAR dpath[MAX_DPATH];
- loopmulti (path, NULL);
- while (loopmulti (path, dpath) && entry < MAX_SPARE_DRIVES) {
- _tcscpy (workprefs.dfxlist[entry], dpath);
- fullpath (workprefs.dfxlist[entry], MAX_DPATH);
- lastentry = entry;
- entry++;
- }
- InitializeListView (hDlg);
- swapperhili (hDlg, lastentry);
- }
-}
-
static void diskswapper_addfile2 (struct uae_prefs *prefs, const TCHAR *file)
{
int list = 0;
while (list < MAX_SPARE_DRIVES) {
if (!prefs->dfxlist[list][0]) {
_tcscpy (prefs->dfxlist[list], file);
+ fullpath (prefs->dfxlist[list], MAX_DPATH);
break;
}
list++;
}
}
+static void addswapperfile (HWND hDlg, int entry, TCHAR *newpath)
+{
+ TCHAR path[MAX_DPATH];
+ int lastentry = entry;
+
+ path[0] = 0;
+ if (newpath)
+ _tcscpy (path, newpath);
+ if (MultiDiskSelection (hDlg, -1, 0, &changed_prefs, path)) {
+ TCHAR dpath[MAX_DPATH];
+ loopmulti (path, NULL);
+ while (loopmulti (path, dpath) && entry < MAX_SPARE_DRIVES) {
+ diskswapper_addfile (&workprefs, path);
+ lastentry = entry;
+ entry++;
+ }
+ InitializeListView (hDlg);
+ swapperhili (hDlg, lastentry);
+ }
+}
+
static INT_PTR CALLBACK SwapperDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static int recursive = 0;
{
int v = workprefs.gfx_filter ? TRUE : FALSE;
int vv = FALSE, vv2 = FALSE, vv3 = FALSE;
- int as = workprefs.gfx_filter_autoscale == 1 || workprefs.gfx_filter_autoscale == 2;
+ int as = workprefs.gfx_filter_autoscale == 2;
struct uae_filter *uf;
int i, isfilter;
+Beta 10:
+
+- archive dragndrop worked too well, it unpacked everything, including adf filesystem etc..
+- do not expand zipped filename when dragdropping if zip only contains single file
+- insert floppy image dialog in disk swapper also "extracts" images inside selected archive
+- MODE1 "raw" 2352 data tracks didn't work in CDTV and image mounter + uaescsi.device non-direct scsi mode
+- MODE2 FORM1 data tracks didn't work in uaescsi.device SCSI emulation mode
+- CDTV mode didn't close CD handle when reseting
+- CDTV frame interrupts in non audio CD play mode stopped working (broke when CD+G was implemented)
+- overlay height configuration file setting was written incorrectly if it had non-zero value
+- statefile configuration entry is not lost when configuration is load and saved again
+- scan zip directory even if compression method is unknown
+- hardfile scsi emulation block validation checked against physical size, not virtual size:
+ direct-scsi filesystem installed on dynamic hardfile didn't work very well..
+- dynamic hdf corrupted data if hdf's physical file size grew over 4G
+- bezel overlay support improved, aspect ratio correction, visible area autodetection,
+ (image positioning is not yet pixel perfect)
+- pointless bezel configuration file size parameters (temporarily?) removed, bezel overlay
+ configuration needs to be reset (it had stupid design fault)
+- DIWSTRT/DIWSTOP writes didn't check if hdiw state should have changed since last hsync
+ (has always been broken but it wasn't really needed until Denise "bug" update in 2.0)
+ fixes Friday at Eight / Polka Brothers
+
+Beta 9:
+
- when attempting to play CD32 data track: return normal "playing" status and "play ended
with error" flag in next status packet (Mission Impossible 2025 CD32)
- return error status when CD32 qcode command packet is received and currently played CD
1x = normal, 2x = internal texture is twice the size of display etc.. Big texture
support required, makes some shader filters look more smoother when combined with
bilinear filtering (for example hq2x)
-- crash when entering or exiting GUI when ASPI SCSI mode enabled (b6)
+- crash when entering or exiting GUI when ASPI SCSI mode is enabled (b6)
- cd32 pad shift register should stay in reset state in 2-button mode (F17 Challenge CD32)
- added cd insert/eject to systray menu
- added configuration file delayed cd insert, add "delay" to end of path ("cdimage0=<path>,delay"),
- fixed cue+mp3 size detection if mp3 frames included checksum data
- only accept 8 or 32-bit Windows clipboard image input (instead of crashing..)
- diskswapper and floppy/quickstart archive dragndrop: add all disk images inside the
- archive (I don't know why this was done ages ago..)
+ archive (I don't know why this was not done ages ago..)
Beta 8: