return 0;
}
+static void action_replay_chipwrite (void);
+
void REGPARAM2 chipmem_lput_actionreplay1 (uaecptr addr, uae_u32 l)
{
uae_u32 *m;
addr -= chipmem_start & chipmem_mask;
addr &= chipmem_mask;
- if (addr == 0x62 && !is_ar_pc_in_rom())
+ if (addr == 0x60 && !is_ar_pc_in_rom())
action_replay_chipwrite ();
m = (uae_u16 *)(chipmemory + addr);
do_put_mem_word (m, w);
return 0;
}
-void action_replay_chipwrite (void)
+static void action_replay_chipwrite (void)
{
if (armodel == 2 || armodel == 3) {
action_replay_flag = ACTION_REPLAY_DORESET;
int audio_channel_mask = 15;
-STATIC_INLINE int isaudio(void)
+STATIC_INLINE bool isaudio (void)
{
- if (!currprefs.produce_sound)
- return 0;
- return 1;
+ return currprefs.produce_sound != 0;
}
-static int debugchannel (int ch)
+static bool debugchannel (int ch)
{
- if ((1 << ch) & DEBUG_CHANNEL_MASK)
- return 1;
- return 0;
+ return ((1 << ch) & DEBUG_CHANNEL_MASK) != 0;
+}
+
+STATIC_INLINE bool usehacks (void)
+{
+ return currprefs.cpu_model >= 68020 && !currprefs.cpu_cycle_exact;
}
#define SINC_QUEUE_MAX_AGE 2048
return INTREQR () & (0x80 << nr);
}
-static void setirq (int nr)
+static void setirq (int nr, int which)
{
#ifdef DEBUG_AUDIO
if (debugchannel (nr))
- write_log (L"SETIRQ %d %08X\n", nr, M68K_GETPC);
+ write_log (L"SETIRQ %d (%d) %08X\n", nr, which, M68K_GETPC);
#endif
INTREQ (0x8000 | (0x80 << nr));
}
cdp->state = 1;
cdp->wlen = cdp->len;
/* there are too many stupid sound routines that fail on "too" fast cpus.. */
- if (currprefs.cpu_model >= 68020 && !currprefs.cpu_cycle_exact)
+ if (usehacks ())
cdp->pt = cdp->lc;
#ifdef DEBUG_AUDIO
if (debugchannel (nr))
} else if (!cdp->dmaen && cdp->request_word < 0 && !isirq (nr)) {
cdp->evtime = 0;
cdp->state = 2;
- setirq (nr);
+ setirq (nr, 0);
audio_handler (nr);
return;
}
cdp->request_word = 2;
return;
}
- setirq (nr);
+ setirq (nr, 5);
if (!cdp->dmaen) {
cdp->state = 0;
cdp->request_word = 0;
/* Period attachment? */
if (audap) {
if (cdp->intreq2 && cdp->dmaen)
- setirq (nr);
+ setirq (nr, 2);
cdp->intreq2 = 0;
cdp->request_word = 1;
cdp->dat = cdp->dat2;
case 3:
if (currprefs.produce_sound == 0)
cdp->per = PERIOD_MAX;
+
state23 (cdp);
cdp->state = 2;
cdp->evtime = cdp->per;
if (napnav)
cdp->request_word = 1;
if (cdp->intreq2 && napnav)
- setirq (nr);
+ setirq (nr, 3);
} else {
- if (napnav)
- setirq (nr);
+ if (napnav) {
+ setirq (nr, 4);
+ }
}
cdp->intreq2 = 0;
clear_sound_buffers ();
}
set_audio ();
- audio_activate();
+ audio_activate ();
}
void set_audio (void)
write_log (L"AUD%dDAT: %04X STATE=%d IRQ=%d %08X\n", nr,
v, cdp->state, isirq(nr) ? 1 : 0, M68K_GETPC);
#endif
- audio_activate();
+ audio_activate ();
update_audio ();
cdp->dat2 = v;
if (cdp->request_word >= 2 && cdp->request_word_skip == 0)
cdp->request_word = -1;
cdp->request_word_skip = 0;
/* cpu >= 68020: another "too fast" memory/CPU hack */
- if (cdp->state == 0 || (currprefs.cpu_model >= 68020 && !currprefs.cpu_cycle_exact)) {
+ if (cdp->state == 0 || usehacks ()) {
cdp->state = 2;
cdp->wlen = cdp->len;
cdp->pt = cdp->lc;
- if (currprefs.cpu_model >= 68020 && !currprefs.cpu_cycle_exact)
- INTREQ (0x80 << nr);
+ if (usehacks ())
+ setirq (nr, -1);
audio_handler (nr);
schedule_audio ();
events_schedule ();
void AUDxLCH (int nr, uae_u16 v)
{
- audio_activate();
+ struct audio_channel_data *cdp = audio_channel + nr;
+ audio_activate ();
update_audio ();
- audio_channel[nr].lc = (audio_channel[nr].lc & 0xffff) | ((uae_u32)v << 16);
+ cdp->lc = (cdp->lc & 0xffff) | ((uae_u32)v << 16);
#ifdef DEBUG_AUDIO
if (debugchannel (nr))
write_log (L"AUD%dLCH: %04X %08X\n", nr, v, M68K_GETPC);
void AUDxLCL (int nr, uae_u16 v)
{
- audio_activate();
+ struct audio_channel_data *cdp = audio_channel + nr;
+ audio_activate ();
update_audio ();
- audio_channel[nr].lc = (audio_channel[nr].lc & ~0xffff) | (v & 0xFFFE);
+ cdp->lc = (cdp->lc & ~0xffff) | (v & 0xFFFE);
#ifdef DEBUG_AUDIO
if (debugchannel (nr))
write_log (L"AUD%dLCL: %04X %08X\n", nr, v, M68K_GETPC);
void AUDxPER (int nr, uae_u16 v)
{
+ struct audio_channel_data *cdp = audio_channel + nr;
unsigned long per = v * CYCLE_UNIT;
- audio_activate();
+ audio_activate ();
update_audio ();
if (per == 0)
per = PERIOD_MAX - 1;
+#if 0
+ // too fast CPU compatibility hack. KS sets AUDxPER == 8 or 1 when ending the sound, this does not
+ // always work correctly in JIT modes if sound is immediately restarted.
+ if (usehacks () && per < 10 * CYCLE_UNIT && !cdp->dmaen) {
+ zerostate (cdp);
+ }
+#endif
+
if (per < maxhpos * CYCLE_UNIT / 2 && currprefs.produce_sound < 3)
per = maxhpos * CYCLE_UNIT / 2;
else if (per < 4 * CYCLE_UNIT)
/* smaller values would cause extremely high cpu usage */
per = 4 * CYCLE_UNIT;
- if (audio_channel[nr].per == PERIOD_MAX - 1 && per != PERIOD_MAX - 1) {
- audio_channel[nr].evtime = CYCLE_UNIT;
- if (isaudio()) {
+ if (cdp->per == PERIOD_MAX - 1 && per != PERIOD_MAX - 1) {
+ cdp->evtime = CYCLE_UNIT;
+ if (isaudio ()) {
schedule_audio ();
events_schedule ();
}
}
- audio_channel[nr].per = per;
+ cdp->per = per;
#ifdef DEBUG_AUDIO
if (debugchannel (nr))
write_log (L"AUD%dPER: %d %08X\n", nr, v, M68K_GETPC);
void AUDxLEN (int nr, uae_u16 v)
{
- audio_activate();
+ struct audio_channel_data *cdp = audio_channel + nr;
+ audio_activate ();
update_audio ();
- audio_channel[nr].len = v;
+ cdp->len = v;
#ifdef DEBUG_AUDIO
if (debugchannel (nr))
write_log (L"AUD%dLEN: %d %08X\n", nr, v, M68K_GETPC);
void AUDxVOL (int nr, uae_u16 v)
{
+ struct audio_channel_data *cdp = audio_channel + nr;
int v2 = v & 64 ? 63 : v & 63;
- audio_activate();
+ audio_activate ();
update_audio ();
- audio_channel[nr].vol = v2;
+ cdp->vol = v2;
#ifdef DEBUG_AUDIO
if (debugchannel (nr))
write_log (L"AUD%dVOL: %d %08X\n", nr, v2, M68K_GETPC);
audio_channel[2].adk_mask = (((t >> 2) & 1) - 1);
audio_channel[3].adk_mask = (((t >> 3) & 1) - 1);
if ((prevcon & 0xff) != (adkcon & 0xff)) {
- audio_activate();
+ audio_activate ();
#ifdef DEBUG_AUDIO
write_log (L"ADKCON=%02x %08X\n", adkcon & 0xff, M68K_GETPC);
#endif
cfgfile_write (f, L"nr_floppies", L"%d", p->nr_floppies);
cfgfile_write (f, L"floppy_speed", L"%d", p->floppy_speed);
cfgfile_write (f, L"floppy_volume", L"%d", p->dfxclickvolume);
+ cfgfile_dwrite (f, L"floppy_channel_mask", L"0x%x", p->dfxclickchannelmask);
cfgfile_write_bool (f, L"parallel_on_demand", p->parallel_demand);
cfgfile_write_bool (f, L"serial_on_demand", p->serial_demand);
cfgfile_write_bool (f, L"serial_hardware_ctsrts", p->serial_hwctsrts);
|| cfgfile_intval (option, value, L"floppy1sound", &p->dfxclick[1], 1)
|| cfgfile_intval (option, value, L"floppy2sound", &p->dfxclick[2], 1)
|| cfgfile_intval (option, value, L"floppy3sound", &p->dfxclick[3], 1)
+ || cfgfile_intval (option, value, L"floppy_channel_mask", &p->dfxclickchannelmask, 1)
|| cfgfile_intval (option, value, L"floppy_volume", &p->dfxclickvolume, 1))
return 1;
fetch_configurationpath (dpath, sizeof (dpath) / sizeof (TCHAR));
_tcscat (dpath, L"configuration.backup");
+ bool hidden = my_isfilehidden (dpath);
my_unlink (dpath);
my_rename (path, dpath);
+ if (hidden)
+ my_setfilehidden (dpath, hidden);
}
int cfgfile_save (struct uae_prefs *p, const TCHAR *filename, int type)
p->floppy_random_bits_min = 1;
p->floppy_random_bits_max = 3;
p->dfxclickvolume = 33;
+ p->dfxclickchannelmask = 0xffff;
p->statecapturebuffersize = 20 * 1024 * 1024;
p->statecapturerate = 5 * 50;
}
cnt--;
if (config_changed) {
- if (config_changed == 1)
- write_log (L"* configuration check trigger\n");
+// if (config_changed == 1)
+// write_log (L"* configuration check trigger\n");
config_changed++;
if (config_changed > 10)
config_changed = 0;
static struct sprite_entry sprite_entries[2][MAX_SPR_PIXELS / 16];
static struct color_change color_changes[2][MAX_REG_CHANGE];
-struct decision line_decisions[2 * (MAXVPOS + 1) + 1];
-static struct draw_info line_drawinfo[2][2 * (MAXVPOS + 1) + 1];
-#define COLOR_TABLE_SIZE (MAXVPOS + 1) * 2
+struct decision line_decisions[2 * (MAXVPOS + 2) + 1];
+static struct draw_info line_drawinfo[2][2 * (MAXVPOS + 2) + 1];
+#define COLOR_TABLE_SIZE (MAXVPOS + 2) * 2
static struct color_entry color_tables[2][COLOR_TABLE_SIZE];
static int next_sprite_entry = 0;
dumpsync ();
hzc = 1;
}
+ if (maxvpos_nom >= MAXVPOS)
+ maxvpos_nom = MAXVPOS;
if (currprefs.gfx_scandoubler && doublescan == 0)
doublescan = -1;
if (doublescan != odbl || maxvpos != omaxvpos)
#define LINE_DONE_AS_PREVIOUS 8
#define LINE_REMEMBERED_AS_PREVIOUS 9
-static uae_u8 linestate[(MAXVPOS + 1) * 2 + 1];
+static uae_u8 linestate[(MAXVPOS + 2) * 2 + 1];
-uae_u8 line_data[(MAXVPOS + 1) * 2][MAX_PLANES * MAX_WORDS_PER_LINE * 2];
+uae_u8 line_data[(MAXVPOS + 2) * 2][MAX_PLANES * MAX_WORDS_PER_LINE * 2];
/* Centering variables. */
static int min_diwstart, max_diwstop;
switch (linestate[lineno])
{
case LINE_REMEMBERED_AS_PREVIOUS:
- if (!warned)
- write_log (L"Shouldn't get here... this is a bug.\n"), warned++;
+// if (!warned) // happens when program messes up with VPOSW
+// write_log (L"Shouldn't get here... this is a bug.\n"), warned++;
return;
case LINE_BLACK:
return v;
}
-void driveclick_mix (uae_s16 *sndbuffer, int size)
+void driveclick_mix (uae_s16 *sndbuffer, int size, int channelmask)
{
int i;
case 6:
for (i = 0; i < size / 6; i++) {
uae_s16 s = clickbuffer[i];
- sndbuffer[0] = limit (((sndbuffer[0] + s) * 2) / 3);
- sndbuffer[1] = limit (((sndbuffer[1] + s) * 2) / 3);
- sndbuffer[2] = limit (((sndbuffer[2] + s) * 2) / 3);
- sndbuffer[3] = limit (((sndbuffer[3] + s) * 2) / 3);
- sndbuffer[4] = limit (((sndbuffer[4] + s) * 2) / 3);
- sndbuffer[5] = limit (((sndbuffer[5] + s) * 2) / 3);
+ if (channelmask & 1)
+ sndbuffer[0] = limit (((sndbuffer[0] + s) * 2) / 3);
+ if (channelmask & 2)
+ sndbuffer[1] = limit (((sndbuffer[1] + s) * 2) / 3);
+ if (channelmask & 4)
+ sndbuffer[2] = limit (((sndbuffer[2] + s) * 2) / 3);
+ if (channelmask & 8)
+ sndbuffer[3] = limit (((sndbuffer[3] + s) * 2) / 3);
+ if (channelmask & 16)
+ sndbuffer[4] = limit (((sndbuffer[4] + s) * 2) / 3);
+ if (channelmask & 32)
+ sndbuffer[5] = limit (((sndbuffer[5] + s) * 2) / 3);
sndbuffer += 6;
}
break;
case 4:
for (i = 0; i < size / 4; i++) {
uae_s16 s = clickbuffer[i];
- sndbuffer[0] = limit (((sndbuffer[0] + s) * 2) / 3);
- sndbuffer[1] = limit (((sndbuffer[1] + s) * 2) / 3);
- sndbuffer[2] = limit (((sndbuffer[2] + s) * 2) / 3);
- sndbuffer[3] = limit (((sndbuffer[3] + s) * 2) / 3);
+ if (channelmask & 1)
+ sndbuffer[0] = limit (((sndbuffer[0] + s) * 2) / 3);
+ if (channelmask & 2)
+ sndbuffer[1] = limit (((sndbuffer[1] + s) * 2) / 3);
+ if (channelmask & 4)
+ sndbuffer[2] = limit (((sndbuffer[2] + s) * 2) / 3);
+ if (channelmask & 8)
+ sndbuffer[3] = limit (((sndbuffer[3] + s) * 2) / 3);
sndbuffer += 4;
}
break;
case 2:
for (i = 0; i < size / 2; i++) {
uae_s16 s = clickbuffer[i];
- sndbuffer[0] = limit (((sndbuffer[0] + s) * 2) / 3);
- sndbuffer[1] = limit (((sndbuffer[1] + s) * 2) / 3);
+ if (channelmask & 1)
+ sndbuffer[0] = limit (((sndbuffer[0] + s) * 2) / 3);
+ if (channelmask & 2)
+ sndbuffer[1] = limit (((sndbuffer[1] + s) * 2) / 3);
sndbuffer += 2;
}
break;
case 1:
for (i = 0; i < size; i++) {
- sndbuffer[0] = limit (((sndbuffer[0] + clickbuffer[i]) * 2) / 3);
+ if (channelmask & 1)
+ sndbuffer[0] = limit (((sndbuffer[0] + clickbuffer[i]) * 2) / 3);
sndbuffer++;
}
break;
xredcolor_s = rs;
xgreencolor_s = gs;
xbluecolor_s = bs;
- xredcolor_m = (1 << rw) - 1;
- xgreencolor_m = (1 << gw) - 1;
- xbluecolor_m = (1 << bw) - 1;
+ xredcolor_m = ((1 << rw) - 1) << xredcolor_s;
+ xgreencolor_m = ((1 << gw) - 1) << xgreencolor_s;
+ xbluecolor_m = ((1 << bw) - 1) << xbluecolor_s;
}
extern void action_replay_memory_reset (void);
extern void action_replay_init (int);
extern void action_replay_cleanup (void);
-extern void action_replay_chipwrite (void);
extern void action_replay_map_banks (void);
extern void REGPARAM3 chipmem_lput_actionreplay23 (uaecptr addr, uae_u32 l) REGPARAM;
extern void REGPARAM3 chipmem_wput_actionreplay23 (uaecptr addr, uae_u32 w) REGPARAM;
extern struct color_change color_changes[2][MAX_REG_CHANGE];
#endif
-extern struct color_entry color_tables[2][(MAXVPOS + 1) * 2];
+extern struct color_entry color_tables[2][(MAXVPOS + 2) * 2];
extern struct color_entry *curr_color_tables, *prev_color_tables;
extern struct sprite_entry *curr_sprite_entries, *prev_sprite_entries;
extern int next_sprite_entry;
-extern struct decision line_decisions[2 * (MAXVPOS + 1) + 1];
-extern struct draw_info line_drawinfo[2][2 * (MAXVPOS + 1) + 1];
+extern struct decision line_decisions[2 * (MAXVPOS + 2) + 1];
+extern struct draw_info line_drawinfo[2][2 * (MAXVPOS + 2) + 1];
-extern uae_u8 line_data[(MAXVPOS + 1) * 2][MAX_PLANES * MAX_WORDS_PER_LINE * 2];
+extern uae_u8 line_data[(MAXVPOS + 2) * 2][MAX_PLANES * MAX_WORDS_PER_LINE * 2];
/* Functions in drawing.c. */
extern int coord_native_to_amiga_y (int);
extern void driveclick_init (void);
extern void driveclick_free (void);
extern void driveclick_reset (void);
-extern void driveclick_mix (uae_s16*, int);
+extern void driveclick_mix (uae_s16*, int, int);
extern int driveclick_loadresource (struct drvsample*, int);
extern void driveclick_check_prefs (void);
extern uae_s16 *decodewav (uae_u8 *s, int *len);
extern int my_unlink (const TCHAR*);
extern int my_rename (const TCHAR*, const TCHAR*);
extern int my_setcurrentdir (const TCHAR *curdir, TCHAR *oldcur);
+bool my_isfilehidden (const TCHAR *path);
+void my_setfilehidden (const TCHAR *path, bool hidden);
extern struct my_openfile_s *my_open (const TCHAR*, int);
extern void my_close (struct my_openfile_s*);
int dfxclick[4];
TCHAR dfxclickexternal[4][256];
int dfxclickvolume;
+ int dfxclickchannelmask;
/* Target specific options */
extern int decode_cloanto_rom_do (uae_u8 *mem, int size, int real_size);
-#define ROMTYPE_KICK 0x000001
-#define ROMTYPE_KICKCD32 0x000002
-#define ROMTYPE_EXTCD32 0x000004
-#define ROMTYPE_EXTCDTV 0x000008
-#define ROMTYPE_A2091BOOT 0x000010
-#define ROMTYPE_A4091BOOT 0x000020
-#define ROMTYPE_AR 0x000040
-#define ROMTYPE_SUPERIV 0x000080
-#define ROMTYPE_KEY 0x000100
-#define ROMTYPE_ARCADIABIOS 0x000200
-#define ROMTYPE_ARCADIAGAME 0x000400
-#define ROMTYPE_HRTMON 0x000800
-#define ROMTYPE_NORDIC 0x001000
-#define ROMTYPE_XPOWER 0x002000
-#define ROMTYPE_CD32CART 0x004000
-#define ROMTYPE_SPECIALKICK 0x008000
-#define ROMTYPE_MASK 0x01ffff
-#define ROMTYPE_EVEN 0x020000
-#define ROMTYPE_ODD 0x040000
-#define ROMTYPE_8BIT 0x080000
-#define ROMTYPE_BYTESWAP 0x100000
-#define ROMTYPE_CD32 0x200000
-#define ROMTYPE_SCRAMBLED 0x400000
+#define ROMTYPE_KICK 0x000001
+#define ROMTYPE_KICKCD32 0x000002
+#define ROMTYPE_EXTCD32 0x000004
+#define ROMTYPE_EXTCDTV 0x000008
+#define ROMTYPE_A2091BOOT 0x000010
+#define ROMTYPE_A4091BOOT 0x000020
+#define ROMTYPE_AR 0x000040
+#define ROMTYPE_SUPERIV 0x000080
+#define ROMTYPE_KEY 0x000100
+#define ROMTYPE_ARCADIABIOS 0x000200
+#define ROMTYPE_ARCADIAGAME 0x000400
+#define ROMTYPE_HRTMON 0x000800
+#define ROMTYPE_NORDIC 0x001000
+#define ROMTYPE_XPOWER 0x002000
+#define ROMTYPE_CD32CART 0x004000
+#define ROMTYPE_SPECIALKICK 0x008000
+#define ROMTYPE_MASK 0x01ffff
+#define ROMTYPE_EVEN 0x020000
+#define ROMTYPE_ODD 0x040000
+#define ROMTYPE_8BIT 0x080000
+#define ROMTYPE_BYTESWAP 0x100000
+#define ROMTYPE_CD32 0x200000
+#define ROMTYPE_SCRAMBLED 0x400000
struct romheader {
TCHAR *name;
kbr->port[i][SPARE_SUB_EVENT] &&
keyboard_default[k].evt == kbr->eventid[i][SPARE_SUB_EVENT] && keyboard_default[k].flags == (kbr->flags[i][SPARE_SUB_EVENT] & ID_FLAG_SAVE_MASK);
- if (kbr->port[i][0] > 0 && !(kbr->flags[i][0] & ID_FLAG_GAMEPORTSCUSTOM) && (kbr->port[i][SPARE_SUB_EVENT] == 0 || isdefaultspare))
+ if (kbr->port[i][0] > 0 && !(kbr->flags[i][0] & ID_FLAG_GAMEPORTSCUSTOM) &&
+ (kbr->eventid[i][1] <= 0 && kbr->eventid[i][2] <= 0 && kbr->eventid[i][3] <= 0) &&
+ (kbr->port[i][SPARE_SUB_EVENT] == 0 || isdefaultspare))
skip = 1;
if (kbr->eventid[i][0] == 0 && (kbr->flags[i][0] & ID_FLAG_SAVE_MASK) == 0 && keyboard_default[k].scancode < 0)
skip = 1;
}
}
idf->get_widget_type (devnum, i, tmp5, NULL);
- p = tmp5 + _tcslen (tmp5) + 1;
- _stprintf (tmp3, L"%d%s%s", kbr->extra[i], p[0] ? L"." : L"", p[0] ? p : L"");
+ _stprintf (tmp3, L"%d%s%s", kbr->extra[i], tmp5[0] ? L"." : L"", tmp5[0] ? tmp5 : L"");
kbrlabel (tmp3);
_stprintf (tmp1, L"keyboard.%d.button.%s", devnum, tmp3);
_stprintf (tmp4, L"input.%d.%s", idnum + 1, tmp1);
{
if (!out)
return;
- if (ie->allow_mask == AM_K)
- _stprintf (out, L"%s (0x%02X)", ie->name, ie->data);
- else
- _tcscpy (out, ie->name);
+ _tcscpy (out, ie->name);
}
int inputdevice_iterate (int devnum, int num, TCHAR *name, int *af)
struct inputdevice_functions *idf;
int type = IDTYPE_MOUSE;
int idnum = JSEM_MICE;
- if (j == 0) {
+ if (j > 0) {
type = IDTYPE_JOYSTICK;
idnum = JSEM_JOYS;
}
break;
case 0:
{
- int start = JPORT_NONE, got = 0;
+ int start = JPORT_NONE, got = 0, max = 0;
TCHAR *pp = 0;
if (_tcsncmp (value, L"kbd", 3) == 0) {
start = JSEM_KBDLAYOUT;
pp = value + 3;
got = 1;
+ max = JSEM_LASTKBD;
} else if (_tcsncmp (value, L"joy", 3) == 0) {
start = JSEM_JOYS;
pp = value + 3;
got = 1;
+ max = idev[IDTYPE_JOYSTICK].get_num ();
} else if (_tcsncmp (value, L"mouse", 5) == 0) {
start = JSEM_MICE;
pp = value + 5;
got = 1;
+ max = idev[IDTYPE_MOUSE].get_num ();
} else if (_tcscmp (value, L"none") == 0) {
got = 2;
} else if (_tcscmp (value, L"custom") == 0) {
if (start == JSEM_KBDLAYOUT && v > 0)
v--;
if (v >= 0) {
+ if (v >= max)
+ v = 0;
start += v;
got = 2;
}
addr += 12;
for (;;) {
- uae_u8 chunk[4], csize;
+ int csize;
+ uae_u8 chunk[4];
uae_u8 *paddr, *ceaddr;
paddr = addr;
j++;
}
if (!tmp[0])
- _stprintf (tmp, L"Key %02X", k + 1);
+ _stprintf (tmp, L"KEY_%02X", k + 1);
did->buttonname[k] = my_strdup (tmp);
did->buttonmappings[k] = k + 1;
did->buttonsort[k] = k + 1;
static int get_kb_widget_type (int kb, int num, TCHAR *name, uae_u32 *code)
{
- if (name) {
- _stprintf (name, L"[%02X] %s", di_keyboard[kb].buttonmappings[num], di_keyboard[kb].buttonname[num]);
- name += _tcslen (name) + 1;
+ if (name)
_tcscpy (name, di_keyboard[kb].buttonname[num]);
- }
if (code)
*code = di_keyboard[kb].buttonmappings[num];
return IDEV_WIDGET_KEY;
led |= KBLED_NUMLOCK;
if (OutputBuffer.LedFlags & KEYBOARD_CAPS_LOCK_ON)
led |= KBLED_CAPSLOCK;
- if (OutputBuffer.LedFlags & KEYBOARD_SCROLL_LOCK_ON) led
- |= KBLED_SCROLLLOCK;
+ if (OutputBuffer.LedFlags & KEYBOARD_SCROLL_LOCK_ON)
+ led |= KBLED_SCROLLLOCK;
#endif
}
return led;
#include "win32.h"
#include <windows.h>
+bool my_isfilehidden (const TCHAR *path)
+{
+ DWORD attr = GetFileAttributes (path);
+ if (attr != INVALID_FILE_ATTRIBUTES && (attr & FILE_ATTRIBUTE_HIDDEN))
+ return true;
+ return false;
+}
+void my_setfilehidden (const TCHAR *path, bool hidden)
+{
+ DWORD attr = GetFileAttributes (path);
+ if (attr == INVALID_FILE_ATTRIBUTES)
+ return;
+ DWORD attro = attr;
+ attr &= ~FILE_ATTRIBUTE_HIDDEN;
+ if (hidden)
+ attr |= FILE_ATTRIBUTE_HIDDEN;
+ if (attro == attr)
+ return;
+ SetFileAttributes (path, attr);
+}
+
int my_setcurrentdir (const TCHAR *curdir, TCHAR *oldcur)
{
int ret = 0;
channelswap6 ((uae_s16*)paula_sndbuffer, sdp->sndbufsize / 2);
}
#ifdef DRIVESOUND
- driveclick_mix ((uae_s16*)paula_sndbuffer, sdp->sndbufsize / 2);
+ driveclick_mix ((uae_s16*)paula_sndbuffer, sdp->sndbufsize / 2, currprefs.dfxclickchannelmask);
#endif
#ifdef AVIOUTPUT
if (avioutput_enabled && avioutput_audio)
#define WINUAEPUBLICBETA 1
#define LANG_DLL 1
-#define WINUAEBETA L"8"
-#define WINUAEDATE MAKEBD(2010, 6, 11)
-#define WINUAEEXTRA L""
+#define WINUAEBETA L"10"
+#define WINUAEDATE MAKEBD(2010, 6, 15)
+#define WINUAEEXTRA L"RC1"
#define WINUAEREV L""
#define IHF_WINDOWHIDDEN 6
}
}
if (!found) {
- tempvsync = currprefs.gfx_avsync;
+ tempvsync = currprefs.gfx_avsync != 0;
changed_prefs.gfx_avsync = 0;
write_log (L"refresh rate changed to %d but no matching screenmode found, vsync disabled\n", hz);
} else {
if (zcache == NULL)
return;
fclose (zcache);
+ bool hidden = my_isfilehidden (cachepath);
+ my_setfilehidden (cachepath, false);
zcache = _tfopen (cachepath, L"w+, ccs=UTF-8");
if (zcache)
fclose (zcache);
+ my_setfilehidden (cachepath, hidden);
write_log (L"'%s' flushed\n", cachepath);
}
if (!configurationcache)
return;
getconfigcache (cachepath, path);
+ bool hidden = my_isfilehidden (cachepath);
+ my_setfilehidden (cachepath, false);
zcache = _tfopen (cachepath, L"w, ccs=UTF-8");
if (!zcache)
return;
writeconfigcacheentry (zcache, path2, cs);
}
fclose (zcache);
+ my_setfilehidden (cachepath, hidden);
write_log (L"'%s' created\n", cachepath);
}
if (list) {
LVGROUP group;
- group.cbSize = sizeof(LVGROUP);
+ group.cbSize = sizeof (LVGROUP);
group.mask = LVGF_HEADER | LVGF_GROUPID;
group.pszHeader = (TCHAR*)evt->name;
group.iGroupId = cntgroup;
int op = inputmap_port;
if (inputmap_handle (NULL, input_selected_device, input_selected_widget, &op, &inputmap_index, state)) {
if (op == inputmap_port) {
+ ListView_EnsureVisible (h, 1, FALSE);
ListView_EnsureVisible (h, inputmap_index, FALSE);
ListView_SetItemState (h, -1, 0, LVIS_SELECTED | LVIS_FOCUSED);
ListView_SetItemState (h, inputmap_index, LVIS_SELECTED , LVIS_SELECTED);
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_42.dll;openal32.dll;wintab32.dll;portaudio_x64.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_43.dll;openal32.dll;wintab32.dll;portaudio_x64.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(Platform)\$(Configuration)\winuae.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng.lib;lglcd.lib;wtsapi32.lib;wntab32x.lib;enet_x64.lib;prowizard.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng.lib;lglcd.lib;wtsapi32.lib;wntab32x.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<OutputFile>d:\amiga\winuae64.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_42.dll;openal32.dll;wintab32.dll;portaudio_x64.dll;freetype6.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;avrt.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_43.dll;openal32.dll;wintab32.dll;portaudio_x64.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(Platform)\$(Configuration)\winuae.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
+Beta 10: (RC1, official release before Midsummer)
+
+- some V(H)POSW modifications corrupted memory (AR3 for example)
+- AR3 3.09 odd/even pair rom image didn't load correctly
+- AR1 has never worked in cycle-exact mode
+- Amiga->Windows image clipboard sharing didn't work if any IFF
+ chunk (except body) size was more than 255 bytes
+- removed confusing and useless Input keyboard key numbers
+- GamePorts test mode list vertical centering improved
+- configuration file joyportX=kbdZ/joyZ/mouseZ (where Z is larger
+ than max available devices) was not checked
+- floppy sound channel mask added, configuration file only (floppy_channel_mask),
+ default is all channels. 1=left,2=right,4=center,8=sub,16=surleft,32=surright.
+- keyboard input configuration slots 2/3/4 not saved if slot 1 contained port
+ configuration and stored slot 1 was mapped to default keyboard key
+- configuration.backup and configuration.cache remembers hidden file attribute
+
+Beta 9:
+
+- "megachip" was added even if disabled (was fixed in b8 update)
+- fixed DX detection on XP (was fixed in b8 update)
+- removed "*" from DirectInput keyboard and mouse name strings
+- uaeunp/virtual archives: if input file was inside archive and it had multiple output
+ files (most raw disk image formats can have .ima, .adf and .ext.adf output files)
+ only first supported file was listed. Plain files worked correctly.
+- added "scanning ROMs" dialog
+- fixed old memory corruption bug if rom scan data has single rom from odd/even pair
+ (unpaired rom removal code was buggy)
+
Beta 8:
-- Z3Chip is not a Z3 board anymore, now also compatible with KS 1.x (32-bit addressing
- capable CPU required)
+- Z3Chip is not a Z3 board anymore, now also compatible with KS 1.x (don't forget that
+ 32-bit addressing capable CPU is required)
- rawkeyboard RIDEV_NOHOTKEYS flag was missing (Disables Windows keys etc..)
- GamePorts remap/test GUI updated
- GamePorts remap when in Configuration#x mode didn't update GamePorts input mappings
}
}
-struct romlist **getromlistbyident(int ver, int rev, int subver, int subrev, TCHAR *model, int all)
+struct romlist **getromlistbyident (int ver, int rev, int subver, int subrev, TCHAR *model, int all)
{
int i, j, ok, out, max;
struct romdata *rd;
}
if (get_crc32 (buf, size) == crc32) {
ok = 1;
- } else {
+ }
+ if (!ok && (rd->type & ROMTYPE_AR)) {
+ uae_u8 tmp[2];
+ tmp[0] = buf[0];
+ tmp[1] = buf[1];
+ buf[0] = buf[1] = 0;
+ if (get_crc32 (buf, size) == crc32)
+ ok = 1;
+ buf[0] = tmp[0];
+ buf[1] = tmp[1];
+ }
+ if (!ok) {
/* perhaps it is byteswapped without byteswap entry? */
byteswap (buf, size);
if (get_crc32 (buf, size) == crc32)