for (i = 0; i < 256; i++)
for (j = 0; j < 64; j++)
- sound_table[j][i] = j * (uae_s8)i * (currprefs.stereo ? 2 : 1);
+ sound_table[j][i] = j * (uae_s8)i * (currprefs.sound_stereo ? 2 : 1);
}
void init_sound_table8 (void)
for (i = 0; i < 256; i++)
for (j = 0; j < 64; j++)
- sound_table[j][i] = (j * (uae_s8)i * (currprefs.stereo ? 2 : 1)) / 256;
+ sound_table[j][i] = (j * (uae_s8)i * (currprefs.sound_stereo ? 2 : 1)) / 256;
}
#define MULTIPLICATION_PROFITABLE
#endif
/* Always put the right word before the left word. */
-#define DELAY_BUFFER 32
-static uae_u32 right_word_saved[DELAY_BUFFER];
-static uae_u32 left_word_saved[DELAY_BUFFER];
+#define MAX_DELAY_BUFFER 1024
+static uae_u32 right_word_saved[MAX_DELAY_BUFFER];
+static uae_u32 left_word_saved[MAX_DELAY_BUFFER];
static int saved_ptr;
STATIC_INLINE void put_sound_word_right (uae_u32 w)
{
- if (currprefs.mixed_stereo) {
+ if (currprefs.sound_mixed_stereo) {
right_word_saved[saved_ptr] = w;
return;
}
STATIC_INLINE void put_sound_word_left (uae_u32 w)
{
- if (currprefs.mixed_stereo) {
+ if (currprefs.sound_mixed_stereo) {
uae_u32 rold, lold, rnew, lnew, tmp;
+ int mul1 = 32 - currprefs.sound_stereo_separation;
+ int mul2 = 32 + currprefs.sound_stereo_separation;
left_word_saved[saved_ptr] = w;
lnew = w - SOUND16_BASE_VAL;
rnew = right_word_saved[saved_ptr] - SOUND16_BASE_VAL;
- saved_ptr = (saved_ptr + 1) & (DELAY_BUFFER - 1);
+ if (currprefs.sound_mixed_stereo > 0)
+ saved_ptr = (saved_ptr + 1) & ((1 << (currprefs.sound_mixed_stereo - 1)) - 1);
+ else
+ saved_ptr = 0;
+
lold = left_word_saved[saved_ptr] - SOUND16_BASE_VAL;
- tmp = (rnew * 5 + lold * 3) >> 3;
+ tmp = (rnew * mul1 + lold * mul2) >> 6;
tmp += SOUND16_BASE_VAL;
PUT_SOUND_WORD_RIGHT (tmp);
rold = right_word_saved[saved_ptr] - SOUND16_BASE_VAL;
- w = (lnew * 5 + rold * 3) >> 3;
+ w = (lnew * mul1 + rold * mul2) >> 6;
}
PUT_SOUND_WORD_LEFT (w);
}
data0 += data3;
{
- uae_u32 data = SBASEVAL16(1) + data0;
+ uae_u32 data = SBASEVAL16(1) + data0;
FINISH_DATA (data, 16, 1);
put_sound_word_right (data);
}
data1 += data2;
{
- uae_u32 data = SBASEVAL16(1) + data1;
+ uae_u32 data = SBASEVAL16(1) + data1;
FINISH_DATA (data, 16, 1);
put_sound_word_left (data);
}
data1 += data2;
data0 += data3;
{
- uae_u32 data = SBASEVAL16 (1) + data0;
+ uae_u32 data = SBASEVAL16(1) + data0;
FINISH_DATA (data, 16, 1);
put_sound_word_right (data);
}
{
- uae_u32 data = SBASEVAL16 (1) + data1;
+ uae_u32 data = SBASEVAL16(1) + data1;
FINISH_DATA (data, 16, 1);
put_sound_word_left (data);
}
ratio = ((audio_channel[3].evtime % delta) << 8) / delta;
data0 += (data3 * (256 - ratio) + data3p * ratio) >> 8;
{
- uae_u32 data = SBASEVAL16 (1) + data0;
+ uae_u32 data = SBASEVAL16(1) + data0;
FINISH_DATA (data, 16, 1);
put_sound_word_right (data);
}
{
- uae_u32 data = SBASEVAL16 (1) + data1;
+ uae_u32 data = SBASEVAL16(1) + data1;
FINISH_DATA (data, 16, 1);
put_sound_word_left (data);
}
{
return (changed_prefs.produce_sound != currprefs.produce_sound
|| changed_prefs.win32_soundcard != currprefs.win32_soundcard
- || changed_prefs.stereo != currprefs.stereo
- || changed_prefs.mixed_stereo != currprefs.mixed_stereo
+ || changed_prefs.sound_stereo != currprefs.sound_stereo
+ || changed_prefs.sound_stereo_separation != currprefs.sound_stereo_separation
+ || changed_prefs.sound_mixed_stereo != currprefs.sound_mixed_stereo
|| changed_prefs.sound_maxbsiz != currprefs.sound_maxbsiz
|| changed_prefs.sound_freq != currprefs.sound_freq
|| changed_prefs.sound_adjust != currprefs.sound_adjust
currprefs.produce_sound = changed_prefs.produce_sound;
currprefs.win32_soundcard = changed_prefs.win32_soundcard;
- currprefs.stereo = changed_prefs.stereo;
- currprefs.mixed_stereo = changed_prefs.mixed_stereo;
+ currprefs.sound_stereo = changed_prefs.sound_stereo;
+ currprefs.sound_stereo_separation = changed_prefs.sound_stereo_separation;
+ currprefs.sound_mixed_stereo = changed_prefs.sound_mixed_stereo;
currprefs.sound_adjust = changed_prefs.sound_adjust;
currprefs.sound_interpol = changed_prefs.sound_interpol;
currprefs.sound_freq = changed_prefs.sound_freq;
static const char *soundmode2[] = { "none", "interrupts", "good", "best", 0 };
static const char *centermode1[] = { "none", "simple", "smart", 0 };
static const char *centermode2[] = { "false", "true", "smart", 0 };
-static const char *stereomode1[] = { "mono", "stereo", "mixed", 0 };
-static const char *stereomode2[] = { "m", "s", "x", 0 };
-static const char *stereomode3[] = { "1", "2", "3", 0 };
+static const char *stereomode[] = { "mono", "stereo", "mixed", 0 };
static const char *interpolmode[] = { "none", "rh", "crux", 0 };
static const char *collmode[] = { "none", "sprites", "playfields", "full", 0 };
static const char *compmode[] = { "direct", "indirect", "indirectKS", "afterPic", 0 };
cfgfile_write (f, "sound_output=%s\n", soundmode1[p->produce_sound]);
cfgfile_write (f, "sound_bits=%d\n", p->sound_bits);
- cfgfile_write (f, "sound_channels=%s\n", stereomode1[p->stereo + p->mixed_stereo]);
+ cfgfile_write (f, "sound_channels=%s\n", stereomode[p->sound_stereo]);
+ cfgfile_write (f, "sound_stereo_separation=%d\n", p->sound_stereo_separation);
+ cfgfile_write (f, "sound_stereo_mixing_delay=%d\n", p->sound_mixed_stereo);
+
cfgfile_write (f, "sound_max_buff=%d\n", p->sound_maxbsiz);
cfgfile_write (f, "sound_frequency=%d\n", p->sound_freq);
cfgfile_write (f, "sound_interpol=%s\n", interpolmode[p->sound_interpol]);
|| cfgfile_intval (option, value, "sound_frequency", &p->sound_freq, 1)
|| cfgfile_intval (option, value, "sound_adjust", &p->sound_adjust, 1)
|| cfgfile_intval (option, value, "sound_volume", &p->sound_volume, 1)
+ || cfgfile_intval (option, value, "sound_stereo_separation", &p->sound_stereo_separation, 1)
+ || cfgfile_intval (option, value, "sound_stereo_mixing", &p->sound_mixed_stereo, 1)
|| cfgfile_intval (option, value, "gfx_display", &p->gfx_display, 1)
|| cfgfile_intval (option, value, "gfx_framerate", &p->gfx_framerate, 1)
return 1;
}
- if (cfgfile_strval (option, value, "sound_channels", &p->stereo, stereomode1, 1)
- || cfgfile_strval (option, value, "sound_channels", &p->stereo, stereomode2, 1)
- || cfgfile_strval (option, value, "sound_channels", &p->stereo, stereomode3, 0))
- {
- p->mixed_stereo = 0;
- if (p->stereo == 2) {
- p->stereo = 1;
- p->mixed_stereo = 1;
+ if (cfgfile_strval (option, value, "sound_channels", &p->sound_stereo, stereomode, 1)) {
+ if (p->sound_stereo > 1) { /* "mixed stereo" compatibility hack */
+ p->sound_stereo = 1;
+ p->sound_mixed_stereo = 5;
+ p->sound_stereo_separation = 21;
}
return 1;
}
}
p->produce_sound = atoi (x0);
if (x1) {
- p->mixed_stereo = 0;
- if (*x1 == 'S')
- p->stereo = p->mixed_stereo = 1;
- else if (*x1 == 's')
- p->stereo = 1;
+ p->sound_stereo_separation = 32;
+ if (*x1 == 'S') {
+ p->sound_stereo = 1;
+ p->sound_stereo_separation = 20;
+ } else if (*x1 == 's')
+ p->sound_stereo = 1;
else
- p->stereo = 0;
+ p->sound_stereo = 0;
}
if (x2)
p->sound_bits = atoi (x2);
p->keyboard_lang = KBD_LANG_US;
p->produce_sound = 3;
- p->stereo = 1;
+ p->sound_stereo = 1;
+ p->sound_stereo_separation = 21;
+ p->sound_mixed_stereo = -1;
p->sound_bits = DEFAULT_SOUND_BITS;
p->sound_freq = DEFAULT_SOUND_FREQ;
p->sound_maxbsiz = DEFAULT_SOUND_MAXB;
p->tod_hack = 0;
p->maprom = 0;
p->sound_filter = 1;
- p->stereo = 1;
+ p->sound_stereo = 1;
+ p->sound_stereo_separation = 21;
+ p->sound_mixed_stereo = -1;
p->chipmem_size = 0x00080000;
p->bogomem_size = 0x00080000;
return 0;
roms[0] = 20;
roms[1] = 21;
- roms[2] = -1;
+ roms[2] = 22;
+ roms[3] = -1;
if (!configure_rom (p, roms, romcheck))
return 0;
p->bogomem_size = 0;
{
int roms[8];
- roms[0] = 17;
- roms[1] = 16;
- roms[2] = 31;
- roms[3] = 15;
- roms[4] = 14;
- roms[5] = 12;
- roms[6] = 11;
- roms[7] = -1;
+ roms[0] = 16;
+ roms[1] = 31;
+ roms[2] = 15;
+ roms[3] = 14;
+ roms[4] = 12;
+ roms[5] = 11;
+ roms[6] = -1;
p->bogomem_size = 0;
p->chipmem_size = 0x400000;
p->z3fastmem_size = 8 * 1024 * 1024;
static void mix (void)
{
- int total = ((uae_u8*)sndbufpt - (uae_u8*)sndbuffer) / (currprefs.stereo ? 4 : 2);
+ int total = ((uae_u8*)sndbufpt - (uae_u8*)sndbuffer) / (currprefs.sound_stereo ? 4 : 2);
if (currprefs.dfxclickvolume > 0) {
while (clickcnt < total) {
return;
mix();
clickcnt = 0;
- if (currprefs.stereo) {
+ if (currprefs.sound_stereo) {
for (i = 0; i < size / 2; i++) {
uae_s16 s = clickbuffer[i];
sndbuffer[0] = limit(((sndbuffer[0] + s) * 2) / 3);
int rdb_filesyssize;
char *filesysdir;
-
} UnitInfo;
struct uaedev_mount_info {
static void startup_update_unit (Unit *unit, UnitInfo *uinfo)
{
+ if (!unit)
+ return;
unit->ui.devname = uinfo->devname;
xfree (unit->ui.volname);
unit->ui.volname = my_strdup (uinfo->volname); /* might free later for rename */
return 0;
}
+static void init_filesys_diagentry (void)
+{
+ do_put_mem_long ((uae_u32 *)(filesysory + 0x2100), EXPANSION_explibname);
+ do_put_mem_long ((uae_u32 *)(filesysory + 0x2104), filesys_configdev);
+ do_put_mem_long ((uae_u32 *)(filesysory + 0x2108), EXPANSION_doslibname);
+ do_put_mem_long ((uae_u32 *)(filesysory + 0x210c), current_mountinfo->num_units);
+ native2amiga_startup();
+}
+
void filesys_start_threads (void)
{
UnitInfo *uip;
int i;
+ if (savestate_state == STATE_RESTORE)
+ init_filesys_diagentry ();
current_mountinfo = currprefs.mountinfo;
uip = current_mountinfo->ui;
for (i = 0; i < current_mountinfo->num_units; i++) {
TRACE (("filesystem: diagentry called\n"));
filesys_configdev = m68k_areg (regs, 3);
-
- do_put_mem_long ((uae_u32 *)(filesysory + 0x2100), EXPANSION_explibname);
- do_put_mem_long ((uae_u32 *)(filesysory + 0x2104), filesys_configdev);
- do_put_mem_long ((uae_u32 *)(filesysory + 0x2108), EXPANSION_doslibname);
- do_put_mem_long ((uae_u32 *)(filesysory + 0x210c), current_mountinfo->num_units);
+ init_filesys_diagentry ();
uae_sem_init (&singlethread_int_sem, 0, 1);
if (ROM_hardfile_resid != 0) {
* diag entry. */
resaddr = scsidev_startup(resaddr);
- native2amiga_startup();
/* scan for Residents and return pointer to array of them */
residents = resaddr;
save_u8 (ui->bootpri);
save_u8 (ui->readonly);
save_u32 (ui->startup);
+ save_u32 (filesys_configdev);
if (type == FILESYS_VIRTUAL)
dst = save_filesys_virtual (ui, dst);
*len = dst - dstbak;
}
ui = ¤t_mountinfo->ui[devno];
ui->startup = restore_u32 ();
+ filesys_configdev = restore_u32 ();
if (type == FILESYS_VIRTUAL)
src = restore_filesys_virtual (ui, src);
end:
{
uae_u64 got = 0;
uae_u8 buffer[FILESYS_MAX_BLOCKSIZE];
+ int i;
gui_hd_led (1);
hf_log2 ("cmd_read: %p %04.4x-%08.8x %08.8x\n", dataptr, (uae_u32)(offset >> 32), (uae_u32)offset, (uae_u32)len);
while (len > 0) {
- int i, got2;
+ int got2;
got2 = hdf_read (hfd, buffer, offset, hfd->blocksize);
if (got2 != hfd->blocksize)
break;
{
uae_u64 got = 0;
uae_u8 buffer[FILESYS_MAX_BLOCKSIZE];
+ int i;
gui_hd_led (1);
hf_log2 ("cmd_write: %p %04.4x-%08.8x %08.8x\n", dataptr, (uae_u32)(offset >> 32), (uae_u32)offset, (uae_u32)len);
+ if (offset + len >= hfd->size) {
+ write_log ("read access out of bounds %08.8X-%08.8X + %08.8X-%08.8X >= %08.8X-%08.8X\n",
+ (uae_u32)(offset >> 32),(uae_u32)offset,(uae_u32)(len >> 32),(uae_u32)len,
+ (uae_u32)((offset + len) >> 32),(uae_u32)(offset+len));
+ for (i = 0; i < len; i++)
+ put_byte (dataptr + i, 0);
+ }
while (len > 0) {
- int i, got2;
+ int got2;
for (i = 0; i < hfd->blocksize; i++)
buffer[i] = get_byte (dataptr + i);
got2 = hdf_write (hfd, buffer, offset, hfd->blocksize);
return 0; /* Simply ignore this one... */
}
+static void outofbounds (int cmd, uae_u64 offset, uae_u64 len, uae_u64 max)
+{
+ write_log ("cmd %d: out of bounds, %08.8X-%08.8X + %08.8X-%08.8X >= %08.8X-%08.8X\n", cmd,
+ (uae_u32)(offset >> 32),(uae_u32)offset,(uae_u32)(len >> 32),(uae_u32)len,
+ (uae_u32)(max >> 32),(uae_u32)max);
+}
+static void unaligned (int cmd, uae_u64 offset, uae_u64 len, int blocksize)
+{
+ write_log ("cmd %d: unaligned access, %08.8X-%08.8X, %08.8X-%08.8X, %08.8X\n", cmd,
+ (uae_u32)(offset >> 32),(uae_u32)offset,(uae_u32)(len >> 32),(uae_u32)len,
+ blocksize);
+}
+
static uae_u32 hardfile_do_io (struct hardfiledata *hfd, struct hardfileprivdata *hfpd, uaecptr request)
{
uae_u32 dataptr, offset, actual = 0, cmd;
switch (cmd)
{
case CMD_READ:
+#if 0
if (dataptr & 1)
goto bad_command;
+#endif
offset = get_long (request + 44);
- if (offset & bmask)
- goto bad_command;
len = get_long (request + 36); /* io_Length */
- if (len & bmask)
+ if ((offset & bmask) || (len & bmask)) {
+ unaligned (cmd, offset, len, hfd->blocksize);
goto bad_command;
- if (len + offset > hfd->size)
+ }
+ if (len + offset > hfd->size) {
+ outofbounds (cmd, offset, len, hfd->size);
goto bad_command;
+ }
actual = (uae_u32)cmd_read (hfd, dataptr, offset, len);
break;
case TD_READ64:
case NSCMD_TD_READ64:
+#if 0
if (dataptr & 1)
goto bad_command;
+#endif
offset64 = get_long (request + 44) | ((uae_u64)get_long (request + 32) << 32);
- if (offset64 & bmask)
- goto bad_command;
len = get_long (request + 36); /* io_Length */
- if (len & bmask)
+ if ((offset64 & bmask) || (len & bmask)) {
+ unaligned (cmd, offset64, len, hfd->blocksize);
goto bad_command;
- if (len + offset64 > hfd->size)
+ }
+ if (len + offset64 > hfd->size) {
+ outofbounds (cmd, offset64, len, hfd->size);
goto bad_command;
+ }
actual = (uae_u32)cmd_read (hfd, dataptr, offset64, len);
break;
if (hfd->readonly) {
error = 28; /* write protect */
} else {
+#if 0
if (dataptr & 1)
goto bad_command;
+#endif
offset = get_long (request + 44);
- if (offset & bmask)
- goto bad_command;
len = get_long (request + 36); /* io_Length */
- if (len & bmask)
+ if ((offset & bmask) || (len & bmask)) {
+ unaligned (cmd, offset, len, hfd->blocksize);
goto bad_command;
- if (len + offset > hfd->size)
+ }
+ if (len + offset > hfd->size) {
+ outofbounds (cmd, offset, len, hfd->size);
goto bad_command;
+ }
actual = (uae_u32)cmd_write (hfd, dataptr, offset, len);
}
break;
if (hfd->readonly) {
error = 28; /* write protect */
} else {
+#if 0
if (dataptr & 1)
goto bad_command;
+#endif
offset64 = get_long (request + 44) | ((uae_u64)get_long (request + 32) << 32);
- if (offset64 & bmask)
- goto bad_command;
len = get_long (request + 36); /* io_Length */
- if (len & bmask)
+ if ((offset64 & bmask) || (len & bmask)) {
+ unaligned (cmd, offset64, len, hfd->blocksize);
goto bad_command;
- if (len + offset64 > hfd->size)
+ }
+ if (len + offset64 > hfd->size) {
+ outofbounds (cmd, offset64, len, hfd->size);
goto bad_command;
+ }
put_long (request + 32, (uae_u32)cmd_write (hfd, dataptr, offset64, len));
}
break;
typedef enum {
NUMSG_NEEDEXT2, NUMSG_NOROMKEY, NUMSG_KSROMCRCERROR, NUMSG_KSROMREADERROR, NUMSG_NOEXTROM,
NUMSG_MODRIP_NOTFOUND, NUMSG_MODRIP_FINISHED, NUMSG_MODRIP_SAVE,
- NUMSG_KS68020, NUMSG_ROMNEED, NUMSG_NOZLIB, NUMSG_STATEHD,
+ NUMSG_KS68EC020, NUMSG_KS68020, NUMSG_ROMNEED, NUMSG_NOZLIB, NUMSG_STATEHD,
NUMSG_NOCAPS, NUMSG_OLDCAPS,
} notify_user_msg;
uae_u32 size;
int id;
int cpu;
+ int cloanto;
int type;
};
int test_drawing_speed;
int produce_sound;
- int stereo;
- int mixed_stereo;
+ int sound_stereo;
+ int sound_stereo_separation;
+ int sound_mixed_stereo;
int sound_bits;
int sound_freq;
int sound_maxbsiz;
int x11_use_dgamode;
int x11_hide_cursor;
int svga_no_linear;
+
int win32_middle_mouse;
int win32_logfile;
+ int win32_notaskbarbutton;
int win32_active_priority;
int win32_inactive_priority;
write_log ("Can't use a graphics card or Zorro III fastmem when using a 24 bit\n"
"address space - sorry.\n");
}
- if (currprefs.bogomem_size != 0 && currprefs.bogomem_size != 0x80000 && currprefs.bogomem_size != 0x100000 && currprefs.bogomem_size != 0x180000)
+ if (currprefs.bogomem_size != 0 && currprefs.bogomem_size != 0x80000 && currprefs.bogomem_size != 0x100000 && currprefs.bogomem_size != 0x180000 && currprefs.bogomem_size != 0x1c0000)
{
currprefs.bogomem_size = 0;
write_log ("Unsupported bogomem size!\n");
void do_start_program (void)
{
+ if (quit_program == -1)
+ return;
/* Do a reset on startup. Whether this is elegant is debatable. */
inputdevice_updateconfig (&currprefs);
quit_program = 2;
}
static struct romdata roms[] = {
- { "Cloanto Amiga Forever ROM key", 0, 0, 0x869ae1b1, 2069, 0, 68000, ROMTYPE_KEY },
-
- { "Kickstart v1.0 (A1000)(NTSC)", 0, 0, 0x299790ff, 262144, 1, 68000, ROMTYPE_KICK },
- { "Kickstart v1.1 (A1000)(NTSC)", 31, 34, 0xd060572a, 262144, 2, 68000, ROMTYPE_KICK },
- { "Kickstart v1.1 (A1000)(PAL)", 31, 34, 0xec86dae2, 262144, 3, 68000, ROMTYPE_KICK },
- { "Kickstart v1.2 (A1000)", 33, 166, 0x0ed783d0, 262144, 4, 68000, ROMTYPE_KICK },
- { "Kickstart v1.2 (A500,A1000,A2000)", 33, 180, 0xa6ce1636, 262144, 5, 68000, ROMTYPE_KICK },
- { "Kickstart v1.3 (A500,A1000,A2000)", 34, 5, 0xc4f0f55f, 262144, 6, 68000, ROMTYPE_KICK },
- { "Kickstart v1.3 (A3000)", 34, 5, 0xe0f37258, 262144, 32, 68000, ROMTYPE_KICK },
-
- { "Kickstart v2.04 (A500+)", 37, 175, 0xc3bdb240, 524288, 7, 68000, ROMTYPE_KICK },
- { "Kickstart v2.05 (A600)", 37, 299, 0x83028fb5, 524288, 8, 68000, ROMTYPE_KICK },
- { "Kickstart v2.05 (A600HD)", 37, 300, 0x64466c2a, 524288, 9, 68000, ROMTYPE_KICK },
- { "Kickstart v2.05 (A600HD)", 37, 350, 0x43b0df7b, 524288, 10, 68000, ROMTYPE_KICK },
-
- { "Kickstart v3.0 (A1200)", 39, 106, 0x6c9b07d2, 524288, 11, 68000, ROMTYPE_KICK },
- { "Kickstart v3.0 (A4000)", 39, 106, 0x9e6ac152, 524288, 12, 68020, ROMTYPE_KICK },
-// { "Kickstart v3.1", 40, 55, 0x14e93bcc, 524288, 13, 68020, ROMTYPE_KICK }, !! HACK
- { "Kickstart v3.1 (A500,A600,A2000)", 40, 63, 0xfc24ae0d, 524288, 14, 68000, ROMTYPE_KICK },
- { "Kickstart v3.1 (A1200)", 40, 68, 0x1483a091, 524288, 15, 68020, ROMTYPE_KICK },
- { "Kickstart v3.1 (A4000)(Cloanto)", 40, 68, 0x43b6dd22, 524288, 31, 68020, ROMTYPE_KICK },
- { "Kickstart v3.1 (A4000)", 40, 68, 0xd6bae334, 524288, 16, 68020, ROMTYPE_KICK },
- { "Kickstart v3.1 (A4000T)", 40, 70, 0x75932c3a, 524288, 17, 68020, ROMTYPE_KICK },
-
- { "CD32 Kickstart v3.1", 40, 60, 0x1e62d4a5, 524288, 18, 68020, ROMTYPE_KICKCD32 },
- { "CD32 Extended", 40, 60, 0x87746be2, 524288, 19, 68020, ROMTYPE_EXTCD32 },
-
- { "CDTV Extended v1.0", 0, 0, 0x42baa124, 262144, 20, 68000, ROMTYPE_EXTCDTV },
- { "CDTV Extended v2.3", 0, 0, 0x30b54232, 262144, 21, 68000, ROMTYPE_EXTCDTV },
-// { "CDTV Extended v2.7", 0, 0, 0xceae68d2, 262144, 22, 68000, ROMTYPE_EXTCDTV }, !! Non Confirmed
-
- { "A1000 Bootstrap", 0, 0, 0x62f11c04, 8192, 23, 68000, ROMTYPE_KICK },
- { "A1000 Bootstrap", 0, 0, 0x0b1ad2d0, 65536, 24, 68000, ROMTYPE_KICK },
-
- { "Action Replay Mk I v1.50", 0, 0, 0xd4ce0675, 65536, 25, 68000, ROMTYPE_AR },
- { "Action Replay Mk II v2.05", 0, 0, 0x1287301f , 131072, 26, 68000, ROMTYPE_AR },
- { "Action Replay Mk II v2.12", 0, 0, 0x804d0361 , 131072, 27, 68000, ROMTYPE_AR },
- { "Action Replay Mk II v2.14", 0, 0, 0x49650e4f, 131072, 28, 68000, ROMTYPE_AR },
- { "Action Replay Mk III v3.09", 0, 0, 0x0ed9b5aa, 262144, 29, 68000, ROMTYPE_AR },
- { "Action Replay Mk III v3.17", 0, 0, 0xc8a16406, 262144, 30, 68000, ROMTYPE_AR },
+ { "Cloanto Amiga Forever ROM key", 0, 0, 0x869ae1b1, 2069, 0, 0, 1, ROMTYPE_KEY },
+
+ { "Kickstart v1.0 (A1000)(NTSC)", 0, 0, 0x299790ff, 262144, 1, 0, 0, ROMTYPE_KICK },
+ { "Kickstart v1.1 (A1000)(NTSC)", 31, 34, 0xd060572a, 262144, 2, 0, 0, ROMTYPE_KICK },
+ { "Kickstart v1.1 (A1000)(PAL)", 31, 34, 0xec86dae2, 262144, 3, 0, 0, ROMTYPE_KICK },
+ { "Kickstart v1.2 (A1000)", 33, 166, 0x0ed783d0, 262144, 4, 0, 0, ROMTYPE_KICK },
+ { "Kickstart v1.2 (A500,A1000,A2000)", 33, 180, 0xa6ce1636, 262144, 5, 0, 0, ROMTYPE_KICK },
+ { "Kickstart v1.3 (A500,A1000,A2000)", 34, 5, 0xc4f0f55f, 262144, 6, 60, 0, ROMTYPE_KICK },
+ { "Kickstart v1.3 (A3000)", 34, 5, 0xe0f37258, 262144, 32, 0, 0, ROMTYPE_KICK },
+
+ { "Kickstart v2.04 (A500+)", 37, 175, 0xc3bdb240, 524288, 7, 0, 0, ROMTYPE_KICK },
+ { "Kickstart v2.05 (A600)", 37, 299, 0x83028fb5, 524288, 8, 0, 0, ROMTYPE_KICK },
+ { "Kickstart v2.05 (A600HD)", 37, 300, 0x64466c2a, 524288, 9, 0, 0, ROMTYPE_KICK },
+ { "Kickstart v2.05 (A600HD)", 37, 350, 0x43b0df7b, 524288, 10, 0, 0, ROMTYPE_KICK },
+
+ { "Kickstart v3.0 (A1200)", 39, 106, 0x6c9b07d2, 524288, 11, 0, 0, ROMTYPE_KICK },
+ { "Kickstart v3.0 (A4000)", 39, 106, 0x9e6ac152, 524288, 12, 2, 0, ROMTYPE_KICK },
+// { "Kickstart v3.1 (A4000)", 40, 70, 0x2b4566f1, 524288, 13, 2, 0, ROMTYPE_KICK },
+ { "Kickstart v3.1 (A500,A600,A2000)", 40, 63, 0xfc24ae0d, 524288, 14, 0, 0, ROMTYPE_KICK },
+ { "Kickstart v3.1 (A1200)", 40, 68, 0x1483a091, 524288, 15, 1, 0, ROMTYPE_KICK },
+ { "Kickstart v3.1 (A4000)(Cloanto)", 40, 68, 0x43b6dd22, 524288, 31, 2, 1, ROMTYPE_KICK },
+ { "Kickstart v3.1 (A4000)", 40, 68, 0xd6bae334, 524288, 16, 2, 0, ROMTYPE_KICK },
+// { "Kickstart v3.1 (A4000T)", 40, 70, 0x75932c3a, 524288, 17, 1, 0, ROMTYPE_KICK },
+
+ { "CD32 Kickstart v3.1", 40, 60, 0x1e62d4a5, 524288, 18, 1, 0, ROMTYPE_KICKCD32 },
+ { "CD32 Extended", 40, 60, 0x87746be2, 524288, 19, 1, 0, ROMTYPE_EXTCD32 },
+
+ { "CDTV Extended v1.00", 0, 0, 0x42baa124, 262144, 20, 0, 0, ROMTYPE_EXTCDTV },
+ { "CDTV Extended v2.30", 0, 0, 0x30b54232, 262144, 21, 0, 0, ROMTYPE_EXTCDTV },
+ { "CDTV Extended v2.07", 0, 0, 0xceae68d2, 262144, 22, 0, 0, ROMTYPE_EXTCDTV },
+
+ { "A1000 Bootstrap", 0, 0, 0x62f11c04, 8192, 23, 0, 0, ROMTYPE_KICK },
+ { "A1000 Bootstrap", 0, 0, 0x0b1ad2d0, 65536, 24, 0, 0, ROMTYPE_KICK },
+
+ { "Action Replay Mk I v1.50", 0, 0, 0xd4ce0675, 65536, 25, 0, 0, ROMTYPE_AR },
+ { "Action Replay Mk II v2.05", 0, 0, 0x1287301f , 131072, 26, 0, 0, ROMTYPE_AR },
+ { "Action Replay Mk II v2.12", 0, 0, 0x804d0361 , 131072, 27, 0, 0, ROMTYPE_AR },
+ { "Action Replay Mk II v2.14", 0, 0, 0x49650e4f, 131072, 28, 0, 0, ROMTYPE_AR },
+ { "Action Replay Mk III v3.09", 0, 0, 0x0ed9b5aa, 262144, 29, 0, 0, ROMTYPE_AR },
+ { "Action Replay Mk III v3.17", 0, 0, 0xc8a16406, 262144, 30, 0, 0, ROMTYPE_AR },
{ 0 }
};
#else
uae_restart (-1, NULL);
#endif
+ } else {
+ struct romdata *rd = getromdatabydata (kickmemory, kickmem_size);
+ if (rd) {
+ if (rd->cpu == 1 && currprefs.cpu_level < 2) {
+ notify_user (NUMSG_KS68EC020);
+ uae_restart (-1, NULL);
+ } else if (rd->cpu == 2 && (currprefs.cpu_level < 2 || currprefs.address_space_24)) {
+ notify_user (NUMSG_KS68020);
+ uae_restart (-1, NULL);
+ }
+ if (rd->cloanto)
+ cloanto_rom = 1;
+ }
}
}
- custom_start = 0xC0;
+ if (cloanto_rom)
+ currprefs.maprom = changed_prefs.maprom = 0;
+ custom_start = 0xC0;
map_banks (&custom_bank, custom_start, 0xE0 - custom_start, 0);
map_banks (&cia_bank, 0xA0, 32, 0);
map_banks (&clock_bank, 0xDC, 1, 0);
{
uaecptr pc = m68k_getpc ();
static int warned;
- static int cpu68020;
if (cloanto_rom && (opcode & 0xF100) == 0x7100) {
m68k_dreg (regs, (opcode >> 9) & 7) = (uae_s8)(opcode & 0xFF);
return 4;
}
- if (opcode == 0x4E7B && get_long (0x10) == 0 && in_rom (pc) && !cpu68020) {
- notify_user (NUMSG_KS68020);
- cpu68020 = 1;
+ if (opcode == 0x4E7B && in_rom (pc) && get_long (0x10) == 0) {
+ notify_user (NUMSG_KS68020);
+ uae_restart (-1, NULL);
}
#ifdef AUTOCONFIG
uae_u32 opcode = regs.ir;
#if 0
int pc = m68k_getpc();
+ if (pc == 0xdff002)
+ write_log("hip\n");
if (pc != pcs[0] && (pc < 0xd00000 || pc > 0x1000000)) {
memmove (pcs + 1, pcs, 998 * 4);
pcs[0] = pc;
// set the source format
wfxSrc.wFormatTag = WAVE_FORMAT_PCM;
- wfxSrc.nChannels = workprefs.stereo ? 2 : 1;
+ wfxSrc.nChannels = workprefs.sound_stereo ? 2 : 1;
wfxSrc.nSamplesPerSec = workprefs.sound_freq;
wfxSrc.nBlockAlign = wfxSrc.nChannels * (workprefs.sound_bits / 8);
wfxSrc.nAvgBytesPerSec = wfxSrc.nBlockAlign * wfxSrc.nSamplesPerSec;
wfxSrc.wBitsPerSample = workprefs.sound_bits;
wfxSrc.cbSize = 0;
-
+
if(!(pwfxDst = (LPWAVEFORMATEX) malloc(wfxMaxFmtSize)))
return NULL;
{
uae_u16 tw;
uae_u32 tl;
- int bits = 16, channels = currprefs.stereo ? 2 : 1;
+ int bits = 16, channels = currprefs.sound_stereo ? 2 : 1;
fseek (wavfile, 0, SEEK_SET);
fwrite ("RIFF", 1, 4, wavfile);
HRESULT hr = DI_OK;
if (lpdi) {
hr = IDirectInputDevice8_Acquire (lpdi);
- if (hr != DI_OK) {
+ if (hr != DI_OK && hr != 0x80070005) {
write_log ("acquire %s failed, %s\n", txt, DXError (hr));
}
}
#include "sysconfig.h"
#include "sysdeps.h"
+#include <shellapi.h>
+#include "resource.h"
+
#include "config.h"
#include "threaddep/thread.h"
#include "filesys.h"
#include "blkdev.h"
+#include "win32gui.h"
#define hfd_log write_log
write_log ("hd accepted (empty)\n");
return 1;
}
- gui_message ("WARNING: Non-empty or Amiga formatted\n"
- "harddrive detected and safety test was disabled\n\n"
- "Harddrives marked with 'HD_*_' are not empty\n");
+ gui_message_id (IDS_HARDDRIVESAFETYWARNING);
return 2;
}
#define IDS_ROMSCANEND 319
#define IDS_ROM_AVAILABLE 320
#define IDS_ROM_UNAVAILABLE 321
+#define IDS_HARDDRIVESAFETYWARNING 322
+#define IDS_NUMSG_KS68EC020 323
#define IDS_QS_MODELS 1000
#define IDS_QS_MODEL_A500 1001
#define IDS_QS_MODEL_A500P 1002
#define IDC_SCSIDEVICE2 1608
#define IDC_CLOCKSYNC 1608
#define IDC_NOUAEFSDB 1608
+#define IDC_NOTASKBARBUTTON 1608
#define IDC_AVIOUTPUT_FPS 1609
#define IDC_INPUTDEVICE 1609
#define IDC_MAPROM 1609
#define IDC_CONFIGTYPE 1655
#define IDC_SOUNDDRIVETXT 1656
#define IDC_PATHS_ROM 1656
+#define IDC_SOUNDSTEREOSEP 1656
#define IDC_SOUNDSTEREOTXT 1657
#define IDC_PATHS_CONFIG 1657
#define IDC_SOUNDINTERPOLATIONTXT 1658
#define IDC_DISK 1659
#define IDC_DISKLIST 1659
#define IDC_PATHS_SAVEIMAGE 1659
+#define IDC_SOUNDSTEREOSEPTXT 1659
#define IDC_PATHS_SAVESTATE 1660
+#define IDC_SOUNDSTEREOMIXTXT 1660
#define IDC_PATHS_ROMS 1661
+#define IDC_SOUNDSTEREOMIX 1661
#define IDC_PATHS_CONFIGS 1662
#define IDC_PATHS_SCREENSHOTS 1663
#define IDC_PATHS_SAVESTATES 1664
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_3D_CONTROLS 1
-#define _APS_NEXT_RESOURCE_VALUE 205
+#define _APS_NEXT_RESOURCE_VALUE 242
#define _APS_NEXT_COMMAND_VALUE 40021
#define _APS_NEXT_CONTROL_VALUE 1694
#define _APS_NEXT_SYMED_VALUE 101
RTEXT "Sound device:",IDC_SOUNDCARD,8,9,51,13,SS_CENTERIMAGE
COMBOBOX IDC_SOUNDCARDLIST,64,9,229,50,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
- GROUPBOX "Sound Emulation",IDC_SOUNDSETTINGS,7,30,120,68
+ GROUPBOX "Sound Emulation",IDC_SOUNDSETTINGS,5,30,120,68
CONTROL "Disabled",IDC_SOUND0,"Button",BS_AUTORADIOBUTTON |
- WS_GROUP | WS_TABSTOP,15,45,43,10
+ WS_GROUP | WS_TABSTOP,13,45,43,10
CONTROL "Disabled, but emulated",IDC_SOUND1,"Button",
- BS_AUTORADIOBUTTON | WS_TABSTOP,15,57,88,10
+ BS_AUTORADIOBUTTON | WS_TABSTOP,13,57,88,10
CONTROL "Enabled",IDC_SOUND2,"Button",BS_AUTORADIOBUTTON |
- WS_TABSTOP,15,69,42,10
+ WS_TABSTOP,13,69,42,10
CONTROL "Enabled, 100% accurate",IDC_SOUND3,"Button",
- BS_AUTORADIOBUTTON | WS_TABSTOP,15,81,93,10
- GROUPBOX "Settings",IDC_SOUNDINTERPOLATION2,133,30,160,68
- RTEXT "Frequency:",IDC_SOUNDFREQTXT,138,40,37,8,SS_CENTERIMAGE
- COMBOBOX IDC_SOUNDFREQ,140,49,67,75,CBS_DROPDOWN | WS_VSCROLL |
+ BS_AUTORADIOBUTTON | WS_TABSTOP,13,81,93,10
+ GROUPBOX "Settings",IDC_SOUNDINTERPOLATION2,6,101,290,60
+ RTEXT "Frequency:",IDC_SOUNDFREQTXT,34,110,37,8,SS_CENTERIMAGE
+ COMBOBOX IDC_SOUNDFREQ,36,119,67,75,CBS_DROPDOWN | WS_VSCROLL |
WS_TABSTOP
- RTEXT "Audio filter:",IDC_SOUNDFILTERTXT,140,65,36,8,
+ RTEXT "Audio filter:",IDC_SOUNDFILTERTXT,36,135,36,8,
SS_CENTERIMAGE
- COMBOBOX IDC_SOUNDFILTER,140,74,67,75,CBS_DROPDOWNLIST |
+ COMBOBOX IDC_SOUNDFILTER,36,144,67,75,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
- RTEXT "Stereo mode:",IDC_SOUNDSTEREOTXT,223,40,41,8,
+ RTEXT "Stereo mode:",IDC_SOUNDSTEREOTXT,116,110,43,8,
SS_CENTERIMAGE
- COMBOBOX IDC_SOUNDSTEREO,220,49,67,75,CBS_DROPDOWNLIST |
+ COMBOBOX IDC_SOUNDSTEREO,116,119,67,75,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
- RTEXT "Interpolation:",IDC_SOUNDINTERPOLATIONTXT,222,65,41,8,
+ RTEXT "Interpolation:",IDC_SOUNDINTERPOLATIONTXT,115,135,41,8,
SS_CENTERIMAGE
- COMBOBOX IDC_SOUNDINTERPOLATION,220,74,67,75,CBS_DROPDOWNLIST |
+ COMBOBOX IDC_SOUNDINTERPOLATION,116,144,67,75,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
- GROUPBOX "Disk Drive Sound Emulation",IDC_STATIC,8,100,285,46
- COMBOBOX IDC_SOUNDDRIVE,237,111,46,75,CBS_DROPDOWNLIST |
+ GROUPBOX "Disk Drive Sound Emulation",IDC_STATIC,6,164,290,46
+ COMBOBOX IDC_SOUNDDRIVE,237,174,46,75,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
- COMBOBOX IDC_SOUNDDRIVESELECT,18,129,265,75,CBS_DROPDOWNLIST |
+ COMBOBOX IDC_SOUNDDRIVESELECT,18,192,265,75,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
CONTROL "",IDC_SOUNDDRIVEVOLUME,"msctls_trackbar32",
- TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,14,108,107,19
- GROUPBOX "Sound buffer size",IDC_STATIC,8,180,164,31
+ TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,14,172,107,19
+ GROUPBOX "Sound buffer size",IDC_STATIC,132,67,164,31
CONTROL "Slider1",IDC_SOUNDBUFFERRAM,"msctls_trackbar32",
- TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,14,188,106,19
- GROUPBOX "Sound driver lag compensation",IDC_STATIC,7,212,286,31
+ TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,138,75,106,19
+ GROUPBOX "Sound driver lag compensation",IDC_STATIC,6,211,290,31
CONTROL "Slider1",IDC_SOUNDADJUST,"msctls_trackbar32",
TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,14,221,107,19
PUSHBUTTON "Calibrate",IDC_SOUNDCALIBRATE,183,223,40,14
- GROUPBOX "Volume",IDC_STATIC,8,147,164,31
+ GROUPBOX "Volume",IDC_STATIC,131,30,164,31
CONTROL "",IDC_SOUNDVOLUME,"msctls_trackbar32",TBS_AUTOTICKS |
- TBS_TOP | WS_TABSTOP,14,155,105,20
- EDITTEXT IDC_SOUNDBUFFERMEM,124,191,40,12,ES_CENTER | ES_READONLY
+ TBS_TOP | WS_TABSTOP,137,38,105,20
+ EDITTEXT IDC_SOUNDBUFFERMEM,248,78,40,12,ES_CENTER | ES_READONLY
EDITTEXT IDC_SOUNDADJUSTNUM,124,224,40,12,ES_CENTER | ES_READONLY
- EDITTEXT IDC_SOUNDVOLUME2,124,158,40,12,ES_CENTER | ES_READONLY
- EDITTEXT IDC_SOUNDDRIVEVOLUME2,124,111,40,12,ES_CENTER |
+ EDITTEXT IDC_SOUNDVOLUME2,247,41,40,12,ES_CENTER | ES_READONLY
+ EDITTEXT IDC_SOUNDDRIVEVOLUME2,124,178,40,12,ES_CENTER |
ES_READONLY
+ RTEXT "Stereo separation:",IDC_SOUNDSTEREOSEPTXT,196,110,58,8,
+ SS_CENTERIMAGE
+ COMBOBOX IDC_SOUNDSTEREOSEP,197,119,67,75,CBS_DROPDOWNLIST |
+ WS_VSCROLL | WS_TABSTOP
+ RTEXT "Stereo mixing delay:",IDC_SOUNDSTEREOMIXTXT,196,135,63,
+ 8,SS_CENTERIMAGE
+ COMBOBOX IDC_SOUNDSTEREOMIX,197,144,67,75,CBS_DROPDOWNLIST |
+ WS_VSCROLL | WS_TABSTOP
END
IDD_LOADSAVE DIALOGEX 0, 0, 302, 241
182,83,10,SS_CENTERIMAGE | WS_TABSTOP
COMBOBOX IDC_STATE_BUFFERSIZE,248,180,38,65,CBS_DROPDOWN |
WS_VSCROLL | WS_TABSTOP
+ CONTROL "Don't show Taskbar button",IDC_NOTASKBARBUTTON,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,29,80,117,10
END
IDD_HARDFILE DIALOGEX 0, 0, 299, 180
IDS_NUMSG_MODRIP_NOTFOUND "No modules or compressed data found."
IDS_NUMSG_MODRIP_FINISHED "Scan finished."
IDS_NUMSG_MODRIP_SAVE "Module/packer found\n%s\nDo you want to save it?"
- IDS_NUMSG_KS68020 "Your Kickstart requires a 68020 CPU. This message does not appear again."
+ IDS_NUMSG_KS68020 "Your Kickstart requires a 68020 CPU or later CPU."
IDS_NUMSG_ROMNEED "You need any of following ROM(s)\n\n%s"
IDS_NUMSG_NOZLIB "Zip and gzip support disabled because zlib1.dll is missing."
IDS_NUMSG_STATEHD "WARNING: State saves do not support harddrive emulation. This message does not appear again."
BEGIN
IDS_ROM_AVAILABLE "available"
IDS_ROM_UNAVAILABLE "unavailable"
+ IDS_HARDDRIVESAFETYWARNING
+ "WARNING: Non-empty or Amiga formatted\nharddrive detected and safety test was disabled\n\nHarddrives marked with 'HD_*_' are not empty"
+ IDS_NUMSG_KS68EC020 "Your Kickstart requires a 68EC020 or later CPU."
END
STRINGTABLE
{
int len = 1000;
int pos, lastpos, tpos, expected, diff;
- int mult = currprefs.stereo ? 4 : 2;
+ int mult = currprefs.sound_stereo ? 4 : 2;
double qv, pct;
if (!QueryPerformanceFrequency(&qpf)) {
size <<= 3;
} else {
size <<= 1;
- if (currprefs.stereo)
+ if (currprefs.sound_stereo)
size <<= 1;
}
snd_configsize = size;
}
wavfmt.wFormatTag = WAVE_FORMAT_PCM;
- wavfmt.nChannels = dsound_hardware_mixing ? 4 : (currprefs.stereo ? 2 : 1);
+ wavfmt.nChannels = dsound_hardware_mixing ? 4 : (currprefs.sound_stereo ? 2 : 1);
wavfmt.nSamplesPerSec = freq;
wavfmt.wBitsPerSample = 16;
wavfmt.nBlockAlign = 16 / 8 * wavfmt.nChannels;
if (dsound_hardware_mixing)
sample_handler = sample16ss_handler;
else
- sample_handler = currprefs.stereo ? sample16s_handler : sample16_handler;
+ sample_handler = currprefs.sound_stereo ? sample16s_handler : sample16_handler;
write_log ("DS driver '%s'/%d/%d bits/%d Hz/buffer %d/dist %d\n",
- sound_devices[currprefs.win32_soundcard], dsound_hardware_mixing ? 4 : (currprefs.stereo ? 2 : 1), 16, freq, max_sndbufsize, snd_configsize);
+ sound_devices[currprefs.win32_soundcard],
+ dsound_hardware_mixing ? 4 : (currprefs.sound_stereo ? 2 : 1),
+ 16, freq, max_sndbufsize, snd_configsize);
obtainedfreq = currprefs.sound_freq;
return 1;
static void filtercheck (uae_s16 *sndbuffer, int len)
{
- int ch = dsound_hardware_mixing ? 4 : (currprefs.stereo ? 2 : 1);
+ int ch = dsound_hardware_mixing ? 4 : (currprefs.sound_stereo ? 2 : 1);
int i;
static double cold[4];
double old0, old1, v;
hMainWnd = hwnd;
currprefs.sound_freq = p->sound_freq;
- currprefs.stereo = p->stereo;
+ currprefs.sound_stereo = p->sound_stereo;
if (open_sound ()) {
SetThreadPriority (GetCurrentThread(), THREAD_PRIORITY_HIGHEST);
pct = calibrate ();
#include <dbt.h>
#include <math.h>
#include <mmsystem.h>
+#include <shobjidl.h>
#include "sysdeps.h"
#include "options.h"
HINSTANCE hInst = NULL;
HMODULE hUIDLL = NULL;
HWND (WINAPI *pHtmlHelp)(HWND, LPCSTR, UINT, LPDWORD ) = NULL;
-HWND hAmigaWnd, hMainWnd;
+HWND hAmigaWnd, hMainWnd, hHiddenWnd;
RECT amigawin_rect;
static UINT TaskbarRestart;
static int TaskbarRestartOk;
return DefWindowProc (hWnd, message, wParam, lParam);
}
+static long FAR PASCAL HiddenWindowProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ return DefWindowProc (hWnd, message, wParam, lParam);
+}
+
void handle_events (void)
{
MSG msg;
int WIN32_RegisterClasses( void )
{
WNDCLASS wc;
- HDC hDC = GetDC( NULL );
+ HDC hDC = GetDC( NULL );
- if( GetDeviceCaps( hDC, NUMCOLORS ) != -1 )
+ if (GetDeviceCaps (hDC, NUMCOLORS) != -1)
g_dwBackgroundColor = RGB( 255, 0, 255 );
- ReleaseDC( NULL, hDC );
+ ReleaseDC (NULL, hDC);
wc.style = CS_BYTEALIGNCLIENT | CS_BYTEALIGNWINDOW | CS_DBLCLKS | CS_OWNDC;
wc.lpfnWndProc = AmigaWindowProc;
wc.hCursor = LoadCursor (NULL, IDC_ARROW);
wc.lpszMenuName = 0;
wc.lpszClassName = "AmigaPowah";
- wc.hbrBackground = CreateSolidBrush( g_dwBackgroundColor );
+ wc.hbrBackground = CreateSolidBrush (g_dwBackgroundColor);
if (!RegisterClass (&wc))
return 0;
wc.hInstance = 0;
wc.hIcon = LoadIcon (GetModuleHandle (NULL), MAKEINTRESOURCE( IDI_APPICON ) );
wc.hCursor = LoadCursor (NULL, IDC_ARROW);
- wc.hbrBackground = CreateSolidBrush( g_dwBackgroundColor );
+ wc.hbrBackground = CreateSolidBrush (g_dwBackgroundColor);
wc.lpszMenuName = 0;
wc.lpszClassName = "PCsuxRox";
if (!RegisterClass (&wc))
return 0;
+
+ wc.style = CS_BYTEALIGNCLIENT | CS_BYTEALIGNWINDOW | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;
+ wc.lpfnWndProc = HiddenWindowProc;
+ wc.cbClsExtra = 0;
+ wc.cbWndExtra = 0;
+ wc.hInstance = 0;
+ wc.hIcon = LoadIcon (GetModuleHandle (NULL), MAKEINTRESOURCE( IDI_APPICON ) );
+ wc.hCursor = LoadCursor (NULL, IDC_ARROW);
+ wc.hbrBackground = CreateSolidBrush (g_dwBackgroundColor);
+ wc.lpszMenuName = 0;
+ wc.lpszClassName = "Useless";
+ if (!RegisterClass (&wc))
+ return 0;
+
+ hHiddenWnd = CreateWindowEx (0,
+ "Useless", "You don't see me",
+ WS_POPUP,
+ 0, 0,
+ 1, 1,
+ NULL, NULL, 0, NULL);
+ if (!hHiddenWnd)
+ return 0;
+
return 1;
}
p->win32_active_priority = 0;
p->win32_inactive_priority = 2;
p->win32_iconified_priority = 3;
+ p->win32_notaskbarbutton = 0;
}
if (type == 1 || type == 0) {
p->win32_midioutdev = -2;
cfgfile_write (f, "win32.aspi=%s\n", p->win32_aspi ? "true" : "false" );
cfgfile_write (f, "win32.soundcard=%d\n", p->win32_soundcard );
cfgfile_write (f, "win32.cpu_idle=%d\n", p->cpu_idle);
+ cfgfile_write (f, "win32.notaskbarbutton=%s\n", p->win32_notaskbarbutton ? "true" : "false");
}
static int fetchpri (int pri, int defpri)
|| cfgfile_intval (option, value, "soundcard", &p->win32_soundcard, 1)
|| cfgfile_string (option, value, "serial_port", &p->sername[0], 256)
|| cfgfile_string (option, value, "parallel_port", &p->prtname[0], 256)
+ || cfgfile_yesno (option, value, "notaskbarbutton", &p->win32_notaskbarbutton)
|| cfgfile_intval (option, value, "cpu_idle", &p->cpu_idle, 1));
if (cfgfile_intval (option, value, "active_priority", &v, 1)) {
#define NORMAL_WINDOW_STYLE (WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU )
extern HMODULE hUIDLL;
-extern HWND hAmigaWnd, hMainWnd;
+extern HWND hAmigaWnd, hMainWnd, hHiddenWnd;
extern RECT amigawin_rect;
extern int in_sizemove;
extern int manual_painting_needed;
extern int manual_palette_refresh_needed;
extern int mouseactive, focus;
#define WINUAEBETA 1
-#define WINUAEBETASTR " Beta 8"
+#define WINUAEBETASTR " Beta 9"
extern void my_kbd_handler (int, int, int);
extern void clearallkeys(void);
extern int gui_active;
extern DWORD quickstart;
-/* For StatusBar when running in a Window */
-#define LED_NUM_PARTS 10
-#define LED_POWER_WIDTH 42
-#define LED_HD_WIDTH 24
-#define LED_CD_WIDTH 24
-#define LED_DRIVE_WIDTH 24
-#define LED_FPS_WIDTH 64
-#define LED_IDLE_WIDTH 64
-
extern HKEY hWinUAEKey;
extern int screen_is_picasso;
extern HINSTANCE hInst;
CW_USEDEFAULT, CW_USEDEFAULT,
1,//GetSystemMetrics (SM_CXSCREEN),
1,//GetSystemMetrics (SM_CYSCREEN),
- 0, NULL, 0, NULL);
+ hHiddenWnd, NULL, 0, NULL);
if( hAmigaWnd )
{
window_created = 1;
currprefs.gfx_afullscreen ^= 1;
}
+static void createstatuswindow (void)
+{
+ HDC hdc;
+ RECT rc;
+ HLOCAL hloc;
+ LPINT lpParts;
+ int drive_width, hd_width, cd_width, power_width, fps_width, idle_width;
+ int num_parts = 10;
+ double scaleX, scaleY;
+
+ hStatusWnd = CreateStatusWindow (WS_CHILD | WS_VISIBLE, "", hMainWnd, 1);
+ if (!hStatusWnd)
+ return;
+
+ hdc = GetDC (hStatusWnd);
+ scaleX = GetDeviceCaps (hdc, LOGPIXELSX) / 96.0;
+ scaleY = GetDeviceCaps (hdc, LOGPIXELSY) / 96.0;
+ ReleaseDC (hStatusWnd, hdc);
+ drive_width = 24 * scaleX;
+ hd_width = 24 * scaleX;
+ cd_width = 24 * scaleX;
+ power_width = 42 * scaleX;
+ fps_width = 64 * scaleX;
+ idle_width = 64 * scaleX;
+ GetClientRect (hMainWnd, &rc);
+ /* Allocate an array for holding the right edge coordinates. */
+ hloc = LocalAlloc (LHND, sizeof (int) * num_parts);
+ if (hloc) {
+ lpParts = LocalLock (hloc);
+ /* Calculate the right edge coordinate for each part, and copy the coords
+ * to the array. */
+ lpParts[0] = rc.right - (drive_width * 4) - power_width - idle_width - fps_width - cd_width - hd_width - 2;
+ lpParts[1] = lpParts[0] + idle_width;
+ lpParts[2] = lpParts[1] + fps_width;
+ lpParts[3] = lpParts[2] + power_width;
+ lpParts[4] = lpParts[3] + cd_width;
+ lpParts[5] = lpParts[4] + hd_width;
+ lpParts[6] = lpParts[5] + drive_width;
+ lpParts[7] = lpParts[6] + drive_width;
+ lpParts[8] = lpParts[7] + drive_width;
+ lpParts[9] = lpParts[8] + drive_width;
+
+ /* Create the parts */
+ SendMessage (hStatusWnd, SB_SETPARTS, (WPARAM) num_parts, (LPARAM) lpParts);
+ LocalUnlock (hloc);
+ LocalFree (hloc);
+ }
+}
+
static int create_windows (void)
{
int fs = currentmode->flags & (DM_W_FULLSCREEN | DM_DX_FULLSCREEN | DM_D3D_FULLSCREEN);
- if (!fs)
- {
+ DWORD exstyle = currprefs.win32_notaskbarbutton ? 0 : WS_EX_APPWINDOW;
+
+ if (!fs) {
RECT rc;
- LONG stored_x = 1, stored_y = GetSystemMetrics( SM_CYMENU ) + GetSystemMetrics( SM_CYBORDER );
+ LONG stored_x = 1, stored_y = GetSystemMetrics (SM_CYMENU) + GetSystemMetrics (SM_CYBORDER);
DWORD regkeytype;
- DWORD regkeysize = sizeof(LONG);
- HLOCAL hloc;
- LPINT lpParts;
+ DWORD regkeysize = sizeof (LONG);
int cx = GetSystemMetrics(SM_CXBORDER), cy = GetSystemMetrics(SM_CYBORDER);
int oldx, oldy;
+ int first = 2;
RegQueryValueEx( hWinUAEKey, "xPos", 0, ®keytype, (LPBYTE)&stored_x, ®keysize );
RegQueryValueEx( hWinUAEKey, "yPos", 0, ®keytype, (LPBYTE)&stored_y, ®keysize );
- if( stored_x < GetSystemMetrics (SM_XVIRTUALSCREEN) )
- stored_x = GetSystemMetrics (SM_XVIRTUALSCREEN);
- if( stored_y < GetSystemMetrics (SM_YVIRTUALSCREEN) + GetSystemMetrics( SM_CYMENU ) + cy)
- stored_y = GetSystemMetrics (SM_YVIRTUALSCREEN) + GetSystemMetrics( SM_CYMENU ) + cy;
+ while (first) {
+ first--;
+ if (stored_x < GetSystemMetrics (SM_XVIRTUALSCREEN))
+ stored_x = GetSystemMetrics (SM_XVIRTUALSCREEN);
+ if (stored_y < GetSystemMetrics (SM_YVIRTUALSCREEN) + GetSystemMetrics (SM_CYMENU) + cy)
+ stored_y = GetSystemMetrics (SM_YVIRTUALSCREEN) + GetSystemMetrics (SM_CYMENU) + cy;
- if( stored_x > GetSystemMetrics( SM_CXVIRTUALSCREEN ) )
- rc.left = 1;
- else
- rc.left = stored_x;
-
- if( stored_y > GetSystemMetrics( SM_CYVIRTUALSCREEN ) )
- rc.top = 1;
- else
- rc.top = stored_y;
+ if (stored_x > GetSystemMetrics (SM_CXVIRTUALSCREEN))
+ rc.left = 1;
+ else
+ rc.left = stored_x;
+
+ if (stored_y > GetSystemMetrics (SM_CYVIRTUALSCREEN))
+ rc.top = 1;
+ else
+ rc.top = stored_y;
+
+ rc.right = rc.left + 2 + currentmode->current_width + 2;
+ rc.bottom = rc.top + 2 + currentmode->current_height + 2 + GetSystemMetrics (SM_CYMENU);
+
+ oldx = rc.left;
+ oldy = rc.top;
+ AdjustWindowRect (&rc, NORMAL_WINDOW_STYLE, FALSE);
+ win_x_diff = rc.left - oldx;
+ win_y_diff = rc.top - oldy;
- rc.right = rc.left + 2 + currentmode->current_width + 2;
- rc.bottom = rc.top + 2 + currentmode->current_height + 2 + GetSystemMetrics (SM_CYMENU);
+ if (MonitorFromRect (&rc, MONITOR_DEFAULTTONULL) == NULL) {
+ write_log ("window coordinates are not visible on any monitor, reseting..\n");
+ stored_x = stored_y = 0;
+ continue;
+ }
+ break;
+ }
- oldx = rc.left;
- oldy = rc.top;
- AdjustWindowRect (&rc, NORMAL_WINDOW_STYLE, FALSE);
- win_x_diff = rc.left - oldx;
- win_y_diff = rc.top - oldy;
- hMainWnd = CreateWindowEx( picasso_on ? WS_EX_ACCEPTFILES : WS_EX_ACCEPTFILES | WS_EX_APPWINDOW,
+ hMainWnd = CreateWindowEx ((picasso_on ? WS_EX_ACCEPTFILES : WS_EX_ACCEPTFILES) | exstyle,
"PCsuxRox", "WinUAE",
NORMAL_WINDOW_STYLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
rc.left, rc.top,
rc.right - rc.left + 1, rc.bottom - rc.top + 1,
- NULL, NULL, 0, NULL);
+ hHiddenWnd, NULL, 0, NULL);
if (! hMainWnd) {
write_log ("main window creation failed\n");
return 0;
}
- hStatusWnd = CreateStatusWindow (WS_CHILD | WS_VISIBLE, "", hMainWnd, 1);
- if (hStatusWnd)
- {
- GetClientRect (hMainWnd, &rc);
- /* Allocate an array for holding the right edge coordinates. */
- hloc = LocalAlloc (LHND, sizeof (int) * LED_NUM_PARTS);
- if (hloc)
- {
- lpParts = LocalLock (hloc);
-
- /* Calculate the right edge coordinate for each part, and copy the coords
- * to the array. */
- lpParts[0] = rc.right - (LED_DRIVE_WIDTH * 4) - LED_POWER_WIDTH - LED_IDLE_WIDTH - LED_FPS_WIDTH - LED_CD_WIDTH - LED_HD_WIDTH - 2;
- lpParts[1] = lpParts[0] + LED_IDLE_WIDTH;
- lpParts[2] = lpParts[1] + LED_FPS_WIDTH;
- lpParts[3] = lpParts[2] + LED_POWER_WIDTH;
- lpParts[4] = lpParts[3] + LED_CD_WIDTH;
- lpParts[5] = lpParts[4] + LED_HD_WIDTH;
- lpParts[6] = lpParts[5] + LED_DRIVE_WIDTH;
- lpParts[7] = lpParts[6] + LED_DRIVE_WIDTH;
- lpParts[8] = lpParts[7] + LED_DRIVE_WIDTH;
- lpParts[9] = lpParts[8] + LED_DRIVE_WIDTH;
-
- /* Create the parts */
- SendMessage (hStatusWnd, SB_SETPARTS, (WPARAM) LED_NUM_PARTS, (LPARAM) lpParts);
-
- LocalUnlock (hloc);
- LocalFree (hloc);
- }
- }
+
+ createstatuswindow ();
+
}
else
hMainWnd = NULL;
- hAmigaWnd = CreateWindowEx (fs ? WS_EX_ACCEPTFILES | WS_EX_TOPMOST : WS_EX_ACCEPTFILES | WS_EX_APPWINDOW,
+ hAmigaWnd = CreateWindowEx (fs ? WS_EX_ACCEPTFILES | WS_EX_TOPMOST : WS_EX_ACCEPTFILES | exstyle,
"AmigaPowah", "WinUAE",
WS_CLIPCHILDREN | WS_CLIPSIBLINGS | (hMainWnd ? WS_VISIBLE | WS_CHILD : WS_VISIBLE | WS_POPUP),
hMainWnd ? 2 : CW_USEDEFAULT, hMainWnd ? 2 : CW_USEDEFAULT,
currentmode->current_width, currentmode->current_height,
- hMainWnd, NULL, 0, NULL);
+ hMainWnd ? hMainWnd : hHiddenWnd, NULL, 0, NULL);
if (! hAmigaWnd) {
write_log ("creation of amiga window failed\n");
systray (hMainWnd, FALSE);
if (hMainWnd != hAmigaWnd) {
ShowWindow (hMainWnd, SW_SHOWNORMAL);
- UpdateWindow( hMainWnd );
+ UpdateWindow (hMainWnd);
}
if (hAmigaWnd) {
UpdateWindow (hAmigaWnd);
if (!GetMonitorInfo (hm, &mi))
return;
- GetClientRect(hMainWnd, &dr);
+ GetClientRect (hMainWnd, &dr);
// adjust the dest-rect to avoid the status-bar
if( hStatusWnd )
{
- if( GetWindowRect( hStatusWnd, &statusr ) )
+ if (GetWindowRect (hStatusWnd, &statusr))
dr.bottom = dr.bottom - ( statusr.bottom - statusr.top );
}
if ((currentmode->flags & DM_DDRAW) && !(currentmode->flags & (DM_D3D | DM_SWSCALE))) {
int flags;
- if( !DirectDraw_SurfaceLock( lockable_surface ) )
+ if(!DirectDraw_SurfaceLock (lockable_surface))
goto oops;
flags = DirectDraw_GetPixelFormatFlags();
DirectDraw_SurfaceUnlock();
write_log( "%s mode (bits: %d, pixbytes: %d)\n", currentmode->flags & DM_DX_FULLSCREEN ? "Full screen" : "Window",
DirectDraw_GetSurfaceBitCount(), currentmode->current_depth >> 3 );
} else {
- char szMessage[ MAX_DPATH ];
- WIN32GUI_LoadUIString( IDS_UNSUPPORTEDPIXELFORMAT, szMessage, MAX_DPATH );
+ char szMessage[MAX_DPATH];
+ WIN32GUI_LoadUIString (IDS_UNSUPPORTEDPIXELFORMAT, szMessage, MAX_DPATH);
gui_message( szMessage);
goto oops;
}
#include <Shlobj.h>
#include <shlwapi.h>
#include <ddraw.h>
+#include <shobjidl.h>
#include "config.h"
#include "resource.h"
int gui_active;
extern HWND (WINAPI *pHtmlHelp)(HWND, LPCSTR, UINT, LPDWORD );
+
#undef HtmlHelp
#ifndef HH_DISPLAY_TOPIC
#define HH_DISPLAY_TOPIC 0
#define MIN_FAST_MEM 0
#define MAX_FAST_MEM 4
#define MIN_SLOW_MEM 0
-#define MAX_SLOW_MEM 3
+#define MAX_SLOW_MEM 4
#define MIN_Z3_MEM 0
#define MAX_Z3_MEM 10
#define MIN_P96_MEM 0
p2 = strchr (p1, '\n');
if (!p2) goto end;
*p2++= 0; strcat (p, p1); strcat (p, ": ");
- roms[0] = 20; roms[1] = 21; roms[2] = -1;
+ roms[0] = 20; roms[1] = 21; roms[2] = 22; roms[3] = -1;
if (listrom (roms)) {
roms[0] = 6; roms[1] = 32; roms[2] = -1;
if (listrom (roms))
int ret;
if (flipflop)
ShowWindow (hAmigaWnd, SW_MINIMIZE);
- ret = GetSettings (0, flipflop ? GetDesktopWindow () : hAmigaWnd);
+ ret = GetSettings (0, flipflop ? (currprefs.win32_notaskbarbutton ? hHiddenWnd : GetDesktopWindow()) : hAmigaWnd);
if (flipflop > 0)
ShowWindow (hAmigaWnd, SW_RESTORE);
if (!ret) {
/* 12*/ "512 MB",
/* 13*/ "1 GB",
/* 14*/ "1.5MB",
+/* 15*/ "1.8MB",
};
static unsigned long memsizes[] = {
/* 12*/ 0x20000000, //512 Meg The correct size is set in mman.c
/* 13*/ 0x40000000, //1GB
/* 14*/ 0x00180000, //1.5MB
+/* 15*/ 0x001C0000, //1.8MB
};
static int msi_chip[] = { 1, 2, 3, 4, 5, 6 };
-static int msi_bogo[] = { 0, 2, 3, 14, 4 };
+static int msi_bogo[] = { 0, 2, 3, 14, 15 };
static int msi_fast[] = { 0, 3, 4, 5, 6 };
static int msi_z3fast[] = { 0, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13 };
static int msi_gfx[] = { 0, 3, 4, 5, 6,7,8};
static void enable_for_quickstart (HWND hDlg)
{
int v = quickstart_ok && quickstart_ok_floppy ? TRUE : FALSE;
- EnableWindow (GetDlgItem (guiDlg, IDC_RESETAMIGA), v && !full_property_sheet ? TRUE : FALSE);
+ EnableWindow (GetDlgItem (guiDlg, IDC_RESETAMIGA), !full_property_sheet ? TRUE : FALSE);
}
static void load_quickstart (HWND hDlg, int romcheck)
case 0x00080000: mem_size = 1; break;
case 0x00100000: mem_size = 2; break;
case 0x00180000: mem_size = 3; break;
- case 0x00200000: mem_size = 4; break;
+ case 0x001C0000: mem_size = 4; break;
}
SendDlgItemMessage (hDlg, IDC_SLOWMEM, TBM_SETPOS, TRUE, mem_size);
SetDlgItemText (hDlg, IDC_SLOWRAM, memsize_names[msi_bogo[mem_size]]);
CheckDlgButton (hDlg, IDC_NOOVERLAY, workprefs.win32_no_overlay);
CheckDlgButton (hDlg, IDC_SHOWLEDS, workprefs.leds_on_screen);
CheckDlgButton (hDlg, IDC_SCSIDEVICE, workprefs.scsi);
+ CheckDlgButton (hDlg, IDC_NOTASKBARBUTTON, workprefs.win32_notaskbarbutton);
CheckDlgButton (hDlg, IDC_ASPI, workprefs.win32_aspi);
CheckDlgButton (hDlg, IDC_STATE_CAPTURE, workprefs.tod_hack);
workprefs.start_gui = IsDlgButtonChecked (hDlg, IDC_SHOWGUI);
break;
case IDC_CREATELOGFILE:
- workprefs.win32_logfile = IsDlgButtonChecked( hDlg, IDC_CREATELOGFILE );
+ workprefs.win32_logfile = IsDlgButtonChecked (hDlg, IDC_CREATELOGFILE);
enable_for_miscdlg( hDlg );
break;
case IDC_INACTIVE_PAUSE:
- workprefs.win32_inactive_pause = IsDlgButtonChecked( hDlg, IDC_INACTIVE_PAUSE );
+ workprefs.win32_inactive_pause = IsDlgButtonChecked (hDlg, IDC_INACTIVE_PAUSE);
break;
case IDC_INACTIVE_NOSOUND:
- workprefs.win32_inactive_nosound = IsDlgButtonChecked( hDlg, IDC_INACTIVE_NOSOUND );
+ workprefs.win32_inactive_nosound = IsDlgButtonChecked (hDlg, IDC_INACTIVE_NOSOUND);
break;
case IDC_MINIMIZED_PAUSE:
- workprefs.win32_iconified_pause = IsDlgButtonChecked( hDlg, IDC_MINIMIZED_PAUSE );
+ workprefs.win32_iconified_pause = IsDlgButtonChecked (hDlg, IDC_MINIMIZED_PAUSE);
break;
case IDC_MINIMIZED_NOSOUND:
- workprefs.win32_iconified_nosound = IsDlgButtonChecked( hDlg, IDC_MINIMIZED_NOSOUND );
+ workprefs.win32_iconified_nosound = IsDlgButtonChecked (hDlg, IDC_MINIMIZED_NOSOUND);
break;
case IDC_CTRLF11:
- workprefs.win32_ctrl_F11_is_quit = IsDlgButtonChecked( hDlg, IDC_CTRLF11 );
+ workprefs.win32_ctrl_F11_is_quit = IsDlgButtonChecked (hDlg, IDC_CTRLF11);
break;
case IDC_SCSIDEVICE:
- workprefs.scsi = IsDlgButtonChecked( hDlg, IDC_SCSIDEVICE );
+ workprefs.scsi = IsDlgButtonChecked (hDlg, IDC_SCSIDEVICE);
break;
case IDC_ASPI:
- workprefs.win32_aspi = IsDlgButtonChecked( hDlg, IDC_ASPI );
+ workprefs.win32_aspi = IsDlgButtonChecked (hDlg, IDC_ASPI);
+ break;
+ case IDC_NOTASKBARBUTTON:
+ workprefs.win32_notaskbarbutton = IsDlgButtonChecked (hDlg, IDC_NOTASKBARBUTTON);
break;
}
return TRUE;
enumerate_sound_devices (&numdevs);
if( numdevs == 0 )
- EnableWindow( GetDlgItem( hDlg, IDC_SOUNDCARDLIST ), FALSE );
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDCARDLIST), FALSE);
else
- EnableWindow( GetDlgItem( hDlg, IDC_SOUNDCARDLIST ), workprefs.produce_sound );
-
- EnableWindow( GetDlgItem( hDlg, IDC_FREQUENCY ), workprefs.produce_sound );
- EnableWindow( GetDlgItem( hDlg, IDC_SOUNDFREQ ), workprefs.produce_sound ? TRUE : FALSE );
- EnableWindow( GetDlgItem( hDlg, IDC_SOUNDSTEREO ), workprefs.produce_sound );
- EnableWindow( GetDlgItem( hDlg, IDC_SOUNDINTERPOLATION ), workprefs.produce_sound );
- EnableWindow( GetDlgItem( hDlg, IDC_SOUNDVOLUME ), workprefs.produce_sound );
- EnableWindow( GetDlgItem( hDlg, IDC_SOUNDVOLUME2 ), workprefs.produce_sound );
-
- EnableWindow( GetDlgItem( hDlg, IDC_SOUNDBUFFERMEM ), workprefs.produce_sound );
- EnableWindow( GetDlgItem( hDlg, IDC_SOUNDBUFFERRAM ), workprefs.produce_sound );
- EnableWindow( GetDlgItem( hDlg, IDC_SOUNDADJUST ), workprefs.produce_sound );
- EnableWindow( GetDlgItem( hDlg, IDC_SOUNDADJUSTNUM ), workprefs.produce_sound );
- EnableWindow( GetDlgItem( hDlg, IDC_SOUNDBUFFERTEXT ), workprefs.produce_sound );
-
- EnableWindow( GetDlgItem( hDlg, IDC_SOUNDDRIVE ), workprefs.produce_sound );
- EnableWindow( GetDlgItem( hDlg, IDC_SOUNDDRIVESELECT ), workprefs.produce_sound );
- EnableWindow( GetDlgItem( hDlg, IDC_SOUNDDRIVEVOLUME ), workprefs.produce_sound );
- EnableWindow( GetDlgItem( hDlg, IDC_SOUNDDRIVEVOLUME2 ), workprefs.produce_sound );
-
- EnableWindow( GetDlgItem( hDlg, IDC_AUDIOSYNC ), workprefs.produce_sound );
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDCARDLIST), workprefs.produce_sound);
+
+ EnableWindow (GetDlgItem (hDlg, IDC_FREQUENCY), workprefs.produce_sound);
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDFREQ), workprefs.produce_sound ? TRUE : FALSE);
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDSTEREO), workprefs.produce_sound);
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDINTERPOLATION), workprefs.produce_sound);
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDVOLUME), workprefs.produce_sound);
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDVOLUME2), workprefs.produce_sound);
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDSTEREOSEP), workprefs.sound_stereo && workprefs.produce_sound);
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDSTEREOMIX), workprefs.sound_stereo && workprefs.produce_sound);
+
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDBUFFERMEM), workprefs.produce_sound);
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDBUFFERRAM), workprefs.produce_sound);
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDADJUST), workprefs.produce_sound);
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDADJUSTNUM), workprefs.produce_sound);
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDBUFFERTEXT), workprefs.produce_sound);
+
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDDRIVE), workprefs.produce_sound);
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDDRIVESELECT), workprefs.produce_sound);
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDDRIVEVOLUME), workprefs.produce_sound);
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDDRIVEVOLUME2), workprefs.produce_sound);
+
+ EnableWindow (GetDlgItem (hDlg, IDC_AUDIOSYNC), workprefs.produce_sound);
- EnableWindow( GetDlgItem( hDlg, IDC_SOUNDFILTER ), workprefs.produce_sound );
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDFILTER), workprefs.produce_sound);
- EnableWindow( GetDlgItem( hDlg, IDC_SOUNDCALIBRATE ), workprefs.produce_sound && full_property_sheet);
+ EnableWindow (GetDlgItem (hDlg, IDC_SOUNDCALIBRATE), workprefs.produce_sound && full_property_sheet);
}
static int exact_log2 (int v)
int which_button;
int sound_freq = workprefs.sound_freq;
int produce_sound = workprefs.produce_sound;
- int stereo = workprefs.stereo;
+ int stereo = workprefs.sound_stereo;
char txt[100], *p;
int i, idx, selected;
SendDlgItemMessage(hDlg, IDC_SOUNDSTEREO, CB_RESETCONTENT, 0, 0);
WIN32GUI_LoadUIString (IDS_SOUND_MONO, txt, sizeof (txt));
SendDlgItemMessage(hDlg, IDC_SOUNDSTEREO, CB_ADDSTRING, 0, (LPARAM)txt);
- WIN32GUI_LoadUIString (IDS_SOUND_MIXED, txt, sizeof (txt));
- SendDlgItemMessage(hDlg, IDC_SOUNDSTEREO, CB_ADDSTRING, 0, (LPARAM)txt);
WIN32GUI_LoadUIString (IDS_SOUND_STEREO, txt, sizeof (txt));
SendDlgItemMessage(hDlg, IDC_SOUNDSTEREO, CB_ADDSTRING, 0, (LPARAM)txt);
- which_button = 0;
- if (workprefs.stereo) {
- if (workprefs.mixed_stereo)
- which_button = 1;
- else
- which_button = 2;
+ SendDlgItemMessage (hDlg, IDC_SOUNDSTEREO, CB_SETCURSEL, workprefs.sound_stereo ? 1 : 0, 0);
+
+ SendDlgItemMessage(hDlg, IDC_SOUNDSTEREOSEP, CB_RESETCONTENT, 0, 0);
+ for (i = 10; i >= 0; i--) {
+ sprintf (txt, "%d%%", i * 10);
+ SendDlgItemMessage(hDlg, IDC_SOUNDSTEREOSEP, CB_ADDSTRING, 0, (LPARAM)txt);
}
- SendDlgItemMessage (hDlg, IDC_SOUNDSTEREO, CB_SETCURSEL, which_button, 0);
+ SendDlgItemMessage (hDlg, IDC_SOUNDSTEREOSEP, CB_SETCURSEL, 10 - (workprefs.sound_stereo_separation / 3), 0);
+ SendDlgItemMessage(hDlg, IDC_SOUNDSTEREOMIX, CB_RESETCONTENT, 0, 0);
+ SendDlgItemMessage(hDlg, IDC_SOUNDSTEREOMIX, CB_ADDSTRING, 0, (LPARAM)"-");
+ for (i = 0; i < 10; i++) {
+ sprintf (txt, "%d", i + 1);
+ SendDlgItemMessage(hDlg, IDC_SOUNDSTEREOMIX, CB_ADDSTRING, 0, (LPARAM)txt);
+ }
+ SendDlgItemMessage (hDlg, IDC_SOUNDSTEREOMIX, CB_SETCURSEL, workprefs.sound_mixed_stereo > 0 ? workprefs.sound_mixed_stereo : 0, 0);
+
SendDlgItemMessage(hDlg, IDC_SOUNDINTERPOLATION, CB_RESETCONTENT, 0, 0);
WIN32GUI_LoadUIString (IDS_SOUND_INTERPOL_DISABLED, txt, sizeof (txt));
SendDlgItemMessage(hDlg, IDC_SOUNDINTERPOLATION, CB_ADDSTRING, 0, (LPARAM)txt);
: IsDlgButtonChecked (hDlg, IDC_SOUND1) ? 1
: IsDlgButtonChecked (hDlg, IDC_SOUND2) ? 2 : 3);
idx = SendDlgItemMessage (hDlg, IDC_SOUNDSTEREO, CB_GETCURSEL, 0, 0);
- workprefs.mixed_stereo = 0;
- workprefs.stereo = 0;
- if (idx > 0) {
- workprefs.stereo = 1;
- if (idx == 1)
- workprefs.mixed_stereo = 1;
+ workprefs.sound_stereo = idx == 1 ? 1 : 0;
+ workprefs.sound_stereo_separation = 0;
+ workprefs.sound_mixed_stereo = 0;
+ if (workprefs.sound_stereo > 0) {
+ idx = SendDlgItemMessage (hDlg, IDC_SOUNDSTEREOSEP, CB_GETCURSEL, 0, 0);
+ if (idx >= 0) {
+ if (idx < 10)
+ workprefs.sound_mixed_stereo = -1;
+ workprefs.sound_stereo_separation = (10 - idx) * 3;
+ }
+ idx = SendDlgItemMessage (hDlg, IDC_SOUNDSTEREOMIX, CB_GETCURSEL, 0, 0);
+ if (idx > 0)
+ workprefs.sound_mixed_stereo = idx;
}
+
workprefs.sound_interpol = SendDlgItemMessage (hDlg, IDC_SOUNDINTERPOLATION, CB_GETCURSEL, 0, 0);
workprefs.win32_soundcard = SendDlgItemMessage (hDlg, IDC_SOUNDCARDLIST, CB_GETCURSEL, 0, 0L);
workprefs.sound_filter = SendDlgItemMessage (hDlg, IDC_SOUNDFILTER, CB_GETCURSEL, 0, 0);
static BOOL CALLBACK DialogProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static int recursive = 0;
-
+
switch(msg)
{
case WM_INITDIALOG:
{
int ret;
- ret = GetSettings(1, GetDesktopWindow ());
+ ret = GetSettings(1, currprefs.win32_notaskbarbutton ? hHiddenWnd : GetDesktopWindow());
if (ret > 0) {
#ifdef AVIOUTPUT
AVIOutput_Begin ();
setmouseactive (focuso);
}
+void gui_message_id (int id)
+{
+ char msg[MAX_DPATH];
+ WIN32GUI_LoadUIString (id, msg, sizeof (msg));
+ gui_message (msg);
+}
+
void pre_gui_message (const char *format,...)
{
char msg[2048];
NUMSG_MODRIP_NOTFOUND,IDS_NUMSG_MODRIP_NOTFOUND,
NUMSG_MODRIP_FINISHED,IDS_NUMSG_MODRIP_FINISHED,
NUMSG_MODRIP_SAVE,IDS_NUMSG_MODRIP_SAVE,
+ NUMSG_KS68EC020,IDS_NUMSG_KS68EC020,
NUMSG_KS68020,IDS_NUMSG_KS68020,
NUMSG_ROMNEED,IDS_NUMSG_ROMNEED,
NUMSG_NOZLIB,IDS_NUMSG_NOZLIB,
extern int DiskSelection( HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs, char *);
void InitializeListView( HWND hDlg );
extern void pre_gui_message (const char*,...);
+extern void gui_message_id (int id);
int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int currentpage);
HKEY read_disk_history (void);
RelativePath="..\resources\folder.ico">
</File>
<File
- RelativePath="..\resources\H_arrow.cur">
+ RelativePath="..\resources\h_arrow.cur">
</File>
<File
RelativePath="..\resources\joystick.ico">
<File
RelativePath="..\resources\move_up.ico">
</File>
- <File
- RelativePath="..\resources\path.ico">
- </File>
<File
RelativePath="..\resources\paths.ico">
</File>