From: Toni Wilen Date: Mon, 18 Jun 2012 16:47:32 +0000 (+0300) Subject: 2420b5 X-Git-Tag: 2500~26 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=0fc077cbc734250bbc1a83f80f1d100d32795267;p=francis%2Fwinuae.git 2420b5 --- diff --git a/blkdev.cpp b/blkdev.cpp index 2f89581b..dd70b0ca 100644 --- a/blkdev.cpp +++ b/blkdev.cpp @@ -114,7 +114,6 @@ static int cdscsidevicetype[MAX_TOTAL_SCSI_DEVICES]; #include "od-win32/win32.h" -extern struct device_functions devicefunc_win32_aspi; extern struct device_functions devicefunc_win32_spti; extern struct device_functions devicefunc_win32_ioctl; @@ -128,7 +127,6 @@ static struct device_functions *devicetable[] = { #ifdef _WIN32 &devicefunc_win32_ioctl, &devicefunc_win32_spti, - &devicefunc_win32_aspi, #endif NULL }; @@ -165,9 +163,6 @@ static void install_driver (int flags) device_func[i] = devicetable[SCSI_UNIT_SPTI]; } break; - case SCSI_UNIT_ASPI: - device_func[i] = devicetable[SCSI_UNIT_ASPI]; - break; } } } @@ -205,15 +200,6 @@ void blkdev_fix_prefs (struct uae_prefs *p) p->cdslots[i].inuse = true; } - // blkdev_win32_aspi.cpp does not support multi units - if (currprefs.win32_uaescsimode >= UAESCSI_ASPI_FIRST) { - for (int i = 0; i < MAX_TOTAL_SCSI_DEVICES; i++) { - if (cdscsidevicetype[i] != SCSI_UNIT_DISABLED) - cdscsidevicetype[i] = SCSI_UNIT_ASPI; - } - return; - } - for (int i = 0; i < MAX_TOTAL_SCSI_DEVICES; i++) { if (cdscsidevicetype[i] != SCSI_UNIT_DEFAULT) continue; @@ -230,8 +216,6 @@ void blkdev_fix_prefs (struct uae_prefs *p) } else if (currprefs.scsi) { if (currprefs.win32_uaescsimode == UAESCSI_CDEMU) cdscsidevicetype[i] = SCSI_UNIT_IOCTL; - else if (currprefs.win32_uaescsimode >= UAESCSI_ASPI_FIRST) - cdscsidevicetype[i] = SCSI_UNIT_ASPI; else cdscsidevicetype[i] = SCSI_UNIT_SPTI; } else { diff --git a/cfgfile.cpp b/cfgfile.cpp index 57cb6556..1a986f98 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -4436,18 +4436,30 @@ static void buildin_default_prefs (struct uae_prefs *p) static void set_68020_compa (struct uae_prefs *p, int compa, int cd32) { - if (compa == 0) { + switch (compa) + { + case 0: p->blitter_cycle_exact = 1; p->m68k_speed = 0; if (p->cpu_model == 68020 && p->cachesize == 0) { p->cpu_cycle_exact = 1; p->cpu_clock_multiplier = 4 << 8; } - } - if (compa > 1) { + break; + case 1: + p->cpu_compatible = true; + p->m68k_speed = 0; + break; + case 2: + p->cpu_compatible = 0; + p->m68k_speed = -1; + p->address_space_24 = 0; + break; + case 3: p->cpu_compatible = 0; p->address_space_24 = 0; p->cachesize = 8192; + break; } } diff --git a/cia.cpp b/cia.cpp index 01fc3fee..3e774e9c 100644 --- a/cia.cpp +++ b/cia.cpp @@ -569,6 +569,7 @@ static void resetwarning_check (void) write_log (_T("KB: reset warning forced reset. Phase=%d\n"), resetwarning_phase); resetwarning_phase = -1; kblostsynccnt = 0; + send_internalevent (INTERNALEVENT_KBRESET); uae_reset (0); } } @@ -591,6 +592,7 @@ static void resetwarning_check (void) write_log (_T("KB: reset warning end by software. reset.\n")); resetwarning_phase = -1; kblostsynccnt = 0; + send_internalevent (INTERNALEVENT_KBRESET); uae_reset (0); } } diff --git a/custom.cpp b/custom.cpp index 6fe80877..606474c4 100644 --- a/custom.cpp +++ b/custom.cpp @@ -5994,7 +5994,7 @@ static void hsync_handler_pre (bool onvsync) hardware_line_completed (next_lineno); if (doflickerfix () && interlace_seen > 0) hsync_scandoubler (); - notice_resolution_seen (GET_RES_AGNUS (bplcon0), interlace_seen > 0); + notice_resolution_seen (GET_RES_AGNUS (bplcon0), interlace_seen != 0); } #ifdef A2065 @@ -6227,14 +6227,16 @@ static void hsync_handler_post (bool onvsync) } } } else { - if (!vsync_isdone () && !currprefs.turbo_emulation && (vpos + 1 < maxvpos + lof_store && (vpos == maxvpos_nom * 1 / 3 || vpos == maxvpos_nom * 2 / 3))) { - frame_time_t rpt = read_processor_time (); + if (vpos + 1 < maxvpos + lof_store && (vpos == maxvpos_nom * 1 / 3 || vpos == maxvpos_nom * 2 / 3)) { vsyncmintime += vsynctimeperline; - // sleep if more than 2ms "free" time - while (!vsync_isdone () && (int)vsyncmintime - (int)(rpt + vsynctimebase / 10) > 0 && (int)vsyncmintime - (int)rpt < vsynctimebase) { - sleep_millis_main (1); - rpt = read_processor_time (); - //write_log (_T("*")); + if (!vsync_isdone () && !currprefs.turbo_emulation) { + frame_time_t rpt = read_processor_time (); + // sleep if more than 2ms "free" time + while (!vsync_isdone () && (int)vsyncmintime - (int)(rpt + vsynctimebase / 10) > 0 && (int)vsyncmintime - (int)rpt < vsynctimebase) { + sleep_millis_main (1); + rpt = read_processor_time (); + //write_log (_T("*")); + } } } } diff --git a/debug.cpp b/debug.cpp index 65d14b08..e1e42d7d 100644 --- a/debug.cpp +++ b/debug.cpp @@ -3716,7 +3716,7 @@ void debug (void) int bp = 0; pc = munge24 (m68k_getpc ()); - opcode = (currprefs.cpu_compatible || currprefs.cpu_cycle_exact) ? regs.ir : get_word (pc); + opcode = currprefs.cpu_model < 68020 && (currprefs.cpu_compatible || currprefs.cpu_cycle_exact) ? regs.ir : get_word (pc); for (i = 0; i < BREAKPOINT_TOTAL; i++) { if (!bpnodes[i].enabled) diff --git a/gencpu.cpp b/gencpu.cpp index a16eae3f..709a93b3 100644 --- a/gencpu.cpp +++ b/gencpu.cpp @@ -32,7 +32,7 @@ static FILE *headerfile; static FILE *stblfile; static int using_prefetch, using_indirect, using_mmu; -static int using_ce020; +static int using_prefetch_020, using_ce020; static int using_exception_3; static int using_ce; static int using_tracer; @@ -1007,7 +1007,7 @@ static void genmovemel (uae_u16 opcode) } count_read += table68k[opcode].size == sz_long ? 2 : 1; printf ("\tuae_u16 mask = %s;\n", gen_nextiword (0)); - printf ("\tunsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff;\n"); + printf ("\tuae_u32 dmask = mask & 0xff, amask = (mask >> 8) & 0xff;\n"); genamode (table68k[opcode].dmode, "dstreg", table68k[opcode].size, "src", 2, 1, 0); start_brace (); printf ("\twhile (dmask) { m68k_dreg (regs, movem_index1[dmask]) = %s; srca += %d; dmask = movem_next[dmask]; }\n", @@ -1027,7 +1027,7 @@ static void genmovemel_ce (uae_u16 opcode) { int size = table68k[opcode].size == sz_long ? 4 : 2; printf ("\tuae_u16 mask = %s;\n", gen_nextiword (0)); - printf ("\tunsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff;\n"); + printf ("\tuae_u32 dmask = mask & 0xff, amask = (mask >> 8) & 0xff;\n"); printf ("\tuae_u32 v;\n"); genamode (table68k[opcode].dmode, "dstreg", table68k[opcode].size, "src", 2, 1, GF_AA); if (table68k[opcode].dmode == Ad8r || table68k[opcode].dmode == PC8r) @@ -1461,7 +1461,7 @@ static void gen_opcode (unsigned long int opcode) if (using_indirect) { // tracer - if (!using_ce020) { + if (!using_ce020 && !using_prefetch_020) { prefetch_word = "get_word_ce000_prefetch"; srcli = "x_get_ilong"; srcwi = "x_get_iword"; @@ -1478,8 +1478,8 @@ static void gen_opcode (unsigned long int opcode) * get_word_ce020_prefetch() */ disp020 = "x_get_disp_ea_ce020"; - prefetch_long = "get_long_ce020_prefetch"; prefetch_word = "get_word_ce020_prefetch"; + prefetch_long = "get_long_ce020_prefetch"; srcli = "x_get_ilong"; srcwi = "x_get_iword"; srcbi = "x_get_ibyte"; @@ -1492,6 +1492,20 @@ static void gen_opcode (unsigned long int opcode) do_cycles = "do_cycles_ce020"; nextw = "next_iword_020ce"; nextl = "next_ilong_020ce"; + } else if (using_prefetch_020) { + prefetch_word = "get_word_020_prefetch"; + prefetch_long = "get_long_020_prefetch"; + srcli = "x_get_ilong"; + srcwi = "x_get_iword"; + srcbi = "x_get_ibyte"; + srcl = "x_get_long"; + dstl = "x_put_long"; + srcw = "x_get_word"; + dstw = "x_put_word"; + srcb = "x_get_byte"; + dstb = "x_put_byte"; + nextw = "next_iword_020"; + nextl = "next_ilong_020"; } } else if (using_ce020) { @@ -3702,7 +3716,7 @@ static void generate_one_opcode (int rp, char *extra) printf ("/* %s */\n", outopcode (opcode)); if (i68000) printf("#ifndef CPUEMU_68000_ONLY\n"); - printf ("%s REGPARAM2 CPUFUNC(op_%04lx_%d%s)(uae_u32 opcode)\n{\n", (using_ce || using_ce020) ? "void" : "unsigned long", opcode, postfix, extra); + printf ("%s REGPARAM2 CPUFUNC(op_%04lx_%d%s)(uae_u32 opcode)\n{\n", (using_ce || using_ce020) ? "void" : "uae_u32", opcode, postfix, extra); switch (table68k[opcode].stype) { case 0: smsk = 7; break; @@ -3853,7 +3867,7 @@ static void generate_cpu (int id, int mode) } postfix = id; - if (id == 0 || id == 11 || id == 12 || id == 20 || id == 21 || id == 31) { + if (id == 0 || id == 11 || id == 12 || id == 20 || id == 21 || id == 22 || id == 31) { if (generate_stbl) fprintf (stblfile, "#ifdef CPUEMU_%d%s\n", postfix, extraup); postfix2 = postfix; @@ -3864,6 +3878,7 @@ static void generate_cpu (int id, int mode) using_mmu = 0; using_prefetch = 0; + using_prefetch_020 = 0; using_ce = 0; using_ce020 = 0; using_mmu = 0; @@ -3876,16 +3891,22 @@ static void generate_cpu (int id, int mode) using_ce = 1; for (rp = 0; rp < nr_cpuop_funcs; rp++) opcode_next_clev[rp] = 0; - } else if (id == 20) { // 68020 cycle-exact + } else if (id == 20) { // 68020 prefetch + cpu_level = 2; + using_prefetch_020 = 2; + read_counts (); + for (rp = 0; rp < nr_cpuop_funcs; rp++) + opcode_next_clev[rp] = cpu_level; + } else if (id == 21) { // 68020 cycle-exact cpu_level = 2; using_ce020 = 1; read_counts (); for (rp = 0; rp < nr_cpuop_funcs; rp++) opcode_next_clev[rp] = cpu_level; - } else if (id == 21 || id == 22 || id == 23) { // 68030+ "cycle-exact" - cpu_level = 3 + (23 - id); + } else if (id == 22 || id == 23 || id == 24) { // 68030+ "cycle-exact" + cpu_level = 3 + (24 - id); using_ce020 = 2; - if (id == 21) { + if (id == 22) { read_counts (); for (rp = 0; rp < nr_cpuop_funcs; rp++) opcode_next_clev[rp] = cpu_level; @@ -3900,7 +3921,7 @@ static void generate_cpu (int id, int mode) } else { cpu_level = 5 - id; // "generic" } - using_indirect = using_ce || using_ce020; + using_indirect = using_ce || using_ce020 || using_prefetch_020; if (generate_stbl) { if ((id > 0 && id < 10) || (id >= 20)) @@ -3945,7 +3966,7 @@ int main (int argc, char **argv) using_ce = 0; for (i = 0; i < 32; i++) { - if ((i >= 6 && i < 11) || (i > 12 && i < 20) || (i > 23 && i < 31)) + if ((i >= 6 && i < 11) || (i > 12 && i < 20) || (i > 24 && i < 31)) continue; generate_stbl = 1; generate_cpu (i, 0); diff --git a/include/blkdev.h b/include/blkdev.h index 016d3d11..9c28cd6c 100644 --- a/include/blkdev.h +++ b/include/blkdev.h @@ -6,7 +6,6 @@ #define SCSI_UNIT_IMAGE 1 #define SCSI_UNIT_IOCTL 2 #define SCSI_UNIT_SPTI 3 -#define SCSI_UNIT_ASPI 4 //#define device_debug write_log #define device_debug diff --git a/include/cpu_prefetch.h b/include/cpu_prefetch.h index c35c035e..bd7c68fc 100644 --- a/include/cpu_prefetch.h +++ b/include/cpu_prefetch.h @@ -14,6 +14,32 @@ STATIC_INLINE uae_u32 get_long_prefetch (int o) #ifdef CPUEMU_20 +extern uae_u32 get_word_020_prefetch (int); + +STATIC_INLINE uae_u32 next_iword_020 (void) +{ + uae_u32 r = get_word_020_prefetch (0); + m68k_incpc (2); + return r; +} +STATIC_INLINE uae_u32 next_ilong_020 (void) +{ + uae_u32 r = next_iword_020 () << 16; + r |= next_iword_020 (); + return r; +} + +STATIC_INLINE uae_u32 get_long_020_prefetch (int o) +{ + uae_u32 r = get_word_020_prefetch (o) << 16; + r |= get_word_020_prefetch (o + 2); + return r; +} + +#endif + +#ifdef CPUEMU_21 + STATIC_INLINE void do_cycles_ce020 (int clocks) { x_do_cycles (clocks * cpucycleunit); @@ -271,6 +297,8 @@ STATIC_INLINE uae_u32 next_ilong_020ce (void) return r; } + + STATIC_INLINE void m68k_do_bsr_ce020 (uaecptr oldpc, uae_s32 offset) { m68k_areg (regs, 7) -= 4; @@ -286,7 +314,7 @@ STATIC_INLINE void m68k_do_rts_ce020 (void) #endif -#ifdef CPUEMU_21 +#ifdef CPUEMU_22 extern uae_u32 get_word_ce030_prefetch (int); extern void write_dcache030 (uaecptr, uae_u32, int); diff --git a/include/inputdevice.h b/include/inputdevice.h index 055855ec..8ffcfe7e 100644 --- a/include/inputdevice.h +++ b/include/inputdevice.h @@ -30,6 +30,8 @@ #define IDTYPE_JOYSTICK 0 #define IDTYPE_MOUSE 1 #define IDTYPE_KEYBOARD 2 +#define IDTYPE_INTERNALEVENT 3 +#define IDTYPE_MAX 4 struct inputdevice_functions { int (*init)(void); @@ -81,9 +83,7 @@ struct inputevent { #define ID_FLAG_GAMEPORTSCUSTOM_MASK (ID_FLAG_GAMEPORTSCUSTOM1 | ID_FLAG_GAMEPORTSCUSTOM2) #define ID_FLAG_AUTOFIRE_MASK (ID_FLAG_TOGGLE | ID_FLAG_INVERTTOGGLE | ID_FLAG_AUTOFIRE) -#define ID_FLAG_CANRELEASE 0x2000 -#define ID_FLAG_TOGGLED 0x4000 -#define ID_FLAG_CUSTOMEVENT_TOGGLED 0x8000 + #define ID_FLAG_QUALIFIER1 0x00010000 #define ID_FLAG_QUALIFIER2 0x00020000 #define ID_FLAG_QUALIFIER3 0x00040000 @@ -98,10 +98,6 @@ struct inputevent { #define ID_FLAG_QUALIFIER_ALT 0x08000000 #define ID_FLAG_QUALIFIER_MASK 0x0fff0000 -#define ID_FLAG_SAVE_MASK_CONFIG 0xff -#define ID_FLAG_SAVE_MASK_QUALIFIERS ID_FLAG_QUALIFIER_MASK -#define ID_FLAG_SAVE_MASK_FULL (ID_FLAG_SAVE_MASK_CONFIG | ID_FLAG_SAVE_MASK_QUALIFIERS) - #define IDEV_WIDGET_NONE 0 #define IDEV_WIDGET_BUTTON 1 #define IDEV_WIDGET_AXIS 2 @@ -195,6 +191,11 @@ extern void inputdevice_updateconfig (struct uae_prefs *prefs); extern void inputdevice_updateconfig_internal (struct uae_prefs *prefs); extern void inputdevice_devicechange (struct uae_prefs *prefs); +#define INTERNALEVENT_CPURESET 0 +#define INTERNALEVENT_KBRESET 1 + +extern void send_internalevent (int eventid); + extern int inputdevice_translatekeycode (int keyboard, int scancode, int state); extern void inputdevice_checkqualifierkeycode (int keyboard, int scancode, int state); extern void inputdevice_setkeytranslation (struct uae_input_device_kbr_default **trans, int **kbmaps); diff --git a/include/newcpu.h b/include/newcpu.h index b19deec7..25025a81 100644 --- a/include/newcpu.h +++ b/include/newcpu.h @@ -47,7 +47,7 @@ extern int fpp_movem_index2[256]; extern int fpp_movem_next[256]; #endif -typedef unsigned long REGPARAM3 cpuop_func (uae_u32) REGPARAM; +typedef uae_u32 REGPARAM3 cpuop_func (uae_u32) REGPARAM; typedef void REGPARAM3 cpuop_func_ce (uae_u32) REGPARAM; struct cputbl { @@ -56,7 +56,7 @@ struct cputbl { }; #ifdef JIT -typedef unsigned long REGPARAM3 compop_func (uae_u32) REGPARAM; +typedef uae_u32 REGPARAM3 compop_func (uae_u32) REGPARAM; struct comptbl { compop_func *handler; @@ -65,7 +65,7 @@ struct comptbl { }; #endif -extern unsigned long REGPARAM3 op_illg (uae_u32) REGPARAM; +extern uae_u32 REGPARAM3 op_illg (uae_u32) REGPARAM; typedef uae_u8 flagtype; @@ -418,25 +418,24 @@ extern void fill_prefetch (void); /* 68060 */ extern const struct cputbl op_smalltbl_0_ff[]; -extern const struct cputbl op_smalltbl_20_ff[]; // CE +extern const struct cputbl op_smalltbl_22_ff[]; // CE /* 68040 */ extern const struct cputbl op_smalltbl_1_ff[]; -extern const struct cputbl op_smalltbl_21_ff[]; // CE +extern const struct cputbl op_smalltbl_23_ff[]; // CE extern const struct cputbl op_smalltbl_31_ff[]; // MMU /* 68030 */ extern const struct cputbl op_smalltbl_2_ff[]; -extern const struct cputbl op_smalltbl_22_ff[]; // CE +extern const struct cputbl op_smalltbl_24_ff[]; // CE /* 68020 */ extern const struct cputbl op_smalltbl_3_ff[]; -extern const struct cputbl op_smalltbl_23_ff[]; // CE +extern const struct cputbl op_smalltbl_20_ff[]; // prefetch +extern const struct cputbl op_smalltbl_21_ff[]; // CE /* 68010 */ extern const struct cputbl op_smalltbl_4_ff[]; /* 68000 */ extern const struct cputbl op_smalltbl_5_ff[]; -/* 68000 slow but compatible. */ -extern const struct cputbl op_smalltbl_11_ff[]; -/* 68000 slow but compatible and cycle-exact. */ -extern const struct cputbl op_smalltbl_12_ff[]; +extern const struct cputbl op_smalltbl_11_ff[]; // prefetch +extern const struct cputbl op_smalltbl_12_ff[]; // CE extern cpuop_func *cpufunctbl[65536] ASM_SYM_FOR_FUNC ("cpufunctbl"); diff --git a/include/options.h b/include/options.h index 99caefa9..33926400 100644 --- a/include/options.h +++ b/include/options.h @@ -30,7 +30,7 @@ struct strlist { #define MAX_TOTAL_SCSI_DEVICES 8 /* maximum number native input devices supported (single type) */ -#define MAX_INPUT_DEVICES 8 +#define MAX_INPUT_DEVICES 16 /* maximum number of native input device's buttons and axles supported */ #define MAX_INPUT_DEVICE_EVENTS 256 /* 4 different customization settings */ @@ -41,6 +41,8 @@ struct strlist { #define MAX_INPUT_SUB_EVENT_ALL 9 #define SPARE_SUB_EVENT 8 +#define INTERNALEVENT_COUNT 1 + struct uae_input_device { TCHAR *name; TCHAR *configname; @@ -495,6 +497,7 @@ struct uae_prefs { struct uae_input_device joystick_settings[MAX_INPUT_SETTINGS][MAX_INPUT_DEVICES]; struct uae_input_device mouse_settings[MAX_INPUT_SETTINGS][MAX_INPUT_DEVICES]; struct uae_input_device keyboard_settings[MAX_INPUT_SETTINGS][MAX_INPUT_DEVICES]; + struct uae_input_device internalevent_settings[MAX_INPUT_SETTINGS][INTERNALEVENT_COUNT]; TCHAR input_config_name[GAMEPORT_INPUT_SETTINGS][256]; int dongle; int input_contact_bounce; diff --git a/include/scsidev.h b/include/scsidev.h index 282f95d8..fdbe4bd1 100644 --- a/include/scsidev.h +++ b/include/scsidev.h @@ -23,8 +23,5 @@ extern int log_scsi; #define UAESCSI_CDEMU 0 #define UAESCSI_SPTI 1 #define UAESCSI_SPTISCAN 2 -#define UAESCSI_ASPI_FIRST 3 -#define UAESCSI_ADAPTECASPI 3 -#define UAESCSI_NEROASPI 4 -#define UAESCSI_FROGASPI 5 +#define UAESCSI_LAST 2 #endif \ No newline at end of file diff --git a/inputdevice.cpp b/inputdevice.cpp index e7f5a3d5..0d515b3a 100644 --- a/inputdevice.cpp +++ b/inputdevice.cpp @@ -62,6 +62,16 @@ extern int bootrom_header, bootrom_items; int inputdevice_logging = 0; + +#define ID_FLAG_CANRELEASE 0x1000 +#define ID_FLAG_TOGGLED 0x2000 +#define ID_FLAG_CUSTOMEVENT_TOGGLED1 0x4000 +#define ID_FLAG_CUSTOMEVENT_TOGGLED2 0x8000 + +#define ID_FLAG_SAVE_MASK_CONFIG 0xff +#define ID_FLAG_SAVE_MASK_QUALIFIERS ID_FLAG_QUALIFIER_MASK +#define ID_FLAG_SAVE_MASK_FULL (ID_FLAG_SAVE_MASK_CONFIG | ID_FLAG_SAVE_MASK_QUALIFIERS) + #define IE_INVERT 0x80 #define IE_CDTV 0x100 @@ -134,7 +144,7 @@ static signed long bouncy_cycles; static int handle_input_event (int nr, int state, int max, int autofire, bool canstoprecord, bool playbackevent); -static struct inputdevice_functions idev[3]; +static struct inputdevice_functions idev[IDTYPE_MAX]; static int isdevice (struct uae_input_device *id) { @@ -164,6 +174,7 @@ int inputdevice_uaelib (const TCHAR *s, const TCHAR *parm) static struct uae_input_device *joysticks; static struct uae_input_device *mice; static struct uae_input_device *keyboards; +static struct uae_input_device *internalevents; static struct uae_input_device_kbr_default *keyboard_default, **keyboard_default_table; #define KBR_DEFAULT_MAP_FIRST 0 @@ -280,7 +291,7 @@ static void out_config (struct zfile *f, int id, int num, TCHAR *s1, TCHAR *s2) static bool write_config_head (struct zfile *f, int idnum, int devnum, TCHAR *name, struct uae_input_device *id, struct inputdevice_functions *idf) { - TCHAR tmp2[MAX_DPATH]; + TCHAR tmp2[CONFIG_BLEN]; if (idnum == GAMEPORT_INPUT_SETTINGS) { if (!isdevice (id)) @@ -371,7 +382,7 @@ static void kbrlabel (TCHAR *s) static void write_config2 (struct zfile *f, int idnum, int i, int offset, const TCHAR *extra, struct uae_input_device *id) { - TCHAR tmp2[200], tmp3[200], *p; + TCHAR tmp2[CONFIG_BLEN], tmp3[CONFIG_BLEN], *p; int evt, got, j, k; TCHAR *custom; const int *slotorder; @@ -429,7 +440,7 @@ static void write_config2 (struct zfile *f, int idnum, int i, int offset, const static void write_kbr_config (struct zfile *f, int idnum, int devnum, struct uae_input_device *kbr, struct inputdevice_functions *idf) { - TCHAR tmp1[200], tmp2[200], tmp3[200], tmp4[200], tmp5[200], *p; + TCHAR tmp1[CONFIG_BLEN], tmp2[CONFIG_BLEN], tmp3[CONFIG_BLEN], tmp4[CONFIG_BLEN], tmp5[CONFIG_BLEN], *p; int i, j, k, evt, skip; const int *slotorder; @@ -520,7 +531,7 @@ static void write_kbr_config (struct zfile *f, int idnum, int devnum, struct uae } } -static void write_config (struct zfile *f, int idnum, int devnum, TCHAR *name, struct uae_input_device *id, struct uae_input_device2 *id2, struct inputdevice_functions *idf) +static void write_config (struct zfile *f, int idnum, int devnum, TCHAR *name, struct uae_input_device *id, struct inputdevice_functions *idf) { TCHAR tmp1[MAX_DPATH]; int i; @@ -560,11 +571,12 @@ void write_inputdevice_config (struct uae_prefs *p, struct zfile *f) cfgfile_dwrite_str (f, tmp, p->input_config_name[id]); } for (i = 0; i < MAX_INPUT_DEVICES; i++) - write_config (f, id, i, _T("joystick"), &p->joystick_settings[id][i], &joysticks2[i], &idev[IDTYPE_JOYSTICK]); + write_config (f, id, i, _T("joystick"), &p->joystick_settings[id][i], &idev[IDTYPE_JOYSTICK]); for (i = 0; i < MAX_INPUT_DEVICES; i++) - write_config (f, id, i, _T("mouse"), &p->mouse_settings[id][i], &mice2[i], &idev[IDTYPE_MOUSE]); + write_config (f, id, i, _T("mouse"), &p->mouse_settings[id][i], &idev[IDTYPE_MOUSE]); for (i = 0; i < MAX_INPUT_DEVICES; i++) write_kbr_config (f, id, i, &p->keyboard_settings[id][i], &idev[IDTYPE_KEYBOARD]); + write_config (f, id, 0, _T("internal"), &p->internalevent_settings[id][0], &idev[IDTYPE_INTERNALEVENT]); } } @@ -607,7 +619,7 @@ static int getnum (const TCHAR **pp) static TCHAR *getstring (const TCHAR **pp) { int i; - static TCHAR str[1000]; + static TCHAR str[CONFIG_BLEN]; const TCHAR *p = *pp; if (*p == 0) @@ -868,6 +880,8 @@ void read_inputdevice_config (struct uae_prefs *pr, const TCHAR *option, TCHAR * p = option + 9; } else if (_tcsncmp (option, _T("keyboard."), 9) == 0) { p = option + 9; + } else if (_tcsncmp (option, _T("internal."), 9) == 0) { + p = option + 9; } else return; @@ -888,6 +902,11 @@ void read_inputdevice_config (struct uae_prefs *pr, const TCHAR *option, TCHAR * } else if (_tcsncmp (option, _T("keyboard."), 9) == 0) { id = &pr->keyboard_settings[idnum][devnum]; joystick = -1; + } else if (_tcsncmp (option, _T("internal."), 9) == 0) { + if (devnum > 0) + return; + id = &pr->internalevent_settings[idnum][devnum]; + joystick = 1; } if (!id) return; @@ -2182,7 +2201,7 @@ void inputdevice_read (void) } while (handle_msgpump ()); } -static int handle_custom_event (TCHAR *custom) +static int handle_custom_event (const TCHAR *custom) { TCHAR *p, *buf, *nextp; @@ -2204,6 +2223,7 @@ static int handle_custom_event (TCHAR *custom) while (*nextp == ' ') nextp++; } + //write_log (L"-> '%s'\n", p); cfgfile_parse_line (&changed_prefs, p, 0); p = nextp; } @@ -2438,6 +2458,7 @@ void inputdevice_do_keyboard (int code, int state) if (!r && currprefs.cs_resetwarning && resetwarning_do (1)) return; memset (keybuf, 0, sizeof (keybuf)); + send_internalevent (INTERNALEVENT_KBRESET); uae_reset (r); } if (record_key ((uae_u8)((key << 1) | (key >> 7)))) { @@ -3325,74 +3346,80 @@ static int getqualmask (struct uae_input_device *id, int num, bool *qualonly) } -static void process_custom_event (struct uae_input_device *id, int offset, int state, int qualmask, int autofire, int sub) +static bool process_custom_event (struct uae_input_device *id, int offset, int state, int qualmask, int autofire, int sub) { int idx, slotoffset, flags, custompos, qual; TCHAR *custom; - queue_input_event (-1, NULL, -1, 0, 0, 1); - if (!id) - return; + return false; slotoffset = sub / 4; flags = id->flags[offset][slotoffset]; qual = flags & ID_FLAG_QUALIFIER_MASK; - custompos = (flags & ID_FLAG_CUSTOMEVENT_TOGGLED) ? 1 : 0; + int af = flags & ID_FLAG_AUTOFIRE_MASK; - // check that slots 0 and 2 have same qualifiers, only allow toggle if both are same - if ((id->flags[offset][slotoffset + 2] & ID_FLAG_QUALIFIER_MASK) != qual) { - id->flags[offset][slotoffset] &= ~ID_FLAG_CUSTOMEVENT_TOGGLED; + // check that slots 0 and 2 have same qualifiers, only allow toggle if both are same and neither has autofire + if ((id->flags[offset][slotoffset + 2] & ID_FLAG_QUALIFIER_MASK) != qual || + (id->custom[offset][slotoffset] == NULL && id->custom[offset][slotoffset + 2] == NULL) || + (id->flags[offset][slotoffset + 2] & ID_FLAG_AUTOFIRE_MASK) || (af & ID_FLAG_AUTOFIRE_MASK)) { + id->flags[offset][slotoffset] &= ~(ID_FLAG_CUSTOMEVENT_TOGGLED1 | ID_FLAG_CUSTOMEVENT_TOGGLED2); if (checkqualifiers (id->eventid[offset][slotoffset + sub], id->flags[offset][slotoffset + sub], qualmask)) { custom = id->custom[offset][slotoffset + sub]; - if (custom) { + if (state && custom) { if (autofire) queue_input_event (-1, custom, 1, 1, currprefs.input_autofire_linecnt, 1); - if (state && custom) - handle_custom_event (custom); + handle_custom_event (custom); + return true; } - return; } + return false; } if (sub != 0) - return; + return false; slotoffset = 0; if (!checkqualifiers (id->eventid[offset][slotoffset], id->flags[offset][slotoffset], qualmask)) { slotoffset = 4; if (!checkqualifiers (id->eventid[offset][slotoffset], id->flags[offset][slotoffset], qualmask)) - return; + return false; } flags = id->flags[offset][slotoffset]; - custompos = (flags & ID_FLAG_CUSTOMEVENT_TOGGLED) ? 1 : 0; + custompos = (flags & ID_FLAG_CUSTOMEVENT_TOGGLED1) ? 1 : 0; + custompos |= (flags & ID_FLAG_CUSTOMEVENT_TOGGLED2) ? 2 : 0; - idx = -1; if (state < 0) { idx = 0; custompos = 0; } else { - idx = state > 0 ? 0 : 1; - if (custompos) - idx += 2; - if (state == 0) - custompos ^= 1; + if (state > 0) { + if (custompos & 1) + return false; // waiting for release + } else { + if (!(custompos & 1)) + return false; // waiting for press + } + idx = custompos; + custompos++; } - custom = id->custom[offset][idx + slotoffset]; - if (custom == NULL) { - if (idx >= 2) - custom = id->custom[offset][idx - 2 + slotoffset]; + queue_input_event (-1, NULL, -1, 0, 0, 1); + + if ((id->flags[offset][slotoffset + idx] & ID_FLAG_QUALIFIER_MASK) == qual) { + custom = id->custom[offset][slotoffset + idx]; + if (autofire) + queue_input_event (-1, custom, 1, 1, currprefs.input_autofire_linecnt, 1); + if (custom) + handle_custom_event (custom); } - if (autofire) - queue_input_event (-1, custom, 1, 1, currprefs.input_autofire_linecnt, 1); - if (state && custom) - handle_custom_event (custom); + id->flags[offset][slotoffset] &= ~(ID_FLAG_CUSTOMEVENT_TOGGLED1 | ID_FLAG_CUSTOMEVENT_TOGGLED2); + id->flags[offset][slotoffset] |= (custompos & 1) ? ID_FLAG_CUSTOMEVENT_TOGGLED1 : 0; + id->flags[offset][slotoffset] |= (custompos & 2) ? ID_FLAG_CUSTOMEVENT_TOGGLED2 : 0; - id->flags[offset][slotoffset] &= ~ID_FLAG_CUSTOMEVENT_TOGGLED; - id->flags[offset][slotoffset] |= custompos ? ID_FLAG_CUSTOMEVENT_TOGGLED : 0; + return true; } static void setbuttonstateall (struct uae_input_device *id, struct uae_input_device2 *id2, int button, int state) @@ -3400,7 +3427,7 @@ static void setbuttonstateall (struct uae_input_device *id, struct uae_input_dev static frame_time_t switchdevice_timeout; int i; uae_u32 mask = 1 << button; - uae_u32 omask = id2->buttonmask & mask; + uae_u32 omask = id2 ? id2->buttonmask & mask : 0; uae_u32 nmask = (state ? 1 : 0) << button; int qualmask; bool qualonly; @@ -3426,6 +3453,8 @@ static void setbuttonstateall (struct uae_input_device *id, struct uae_input_dev qualmask = getqualmask (id, ID_BUTTON_OFFSET + button, &qualonly); + bool didcustom = false; + for (i = 0; i < MAX_INPUT_SUB_EVENT; i++) { uae_u32 *flagsp = &id->flags[ID_BUTTON_OFFSET + button][sublevdir[state <= 0 ? 1 : 0][i]]; int evt = evt = id->eventid[ID_BUTTON_OFFSET + button][sublevdir[state <= 0 ? 1 : 0][i]]; @@ -3435,7 +3464,7 @@ static void setbuttonstateall (struct uae_input_device *id, struct uae_input_dev int inverttoggle = (flags & ID_FLAG_INVERTTOGGLE) ? 1 : 0; if (!state) { - process_custom_event (id, ID_BUTTON_OFFSET + button, state, qualmask, autofire, i); + didcustom |= process_custom_event (id, ID_BUTTON_OFFSET + button, state, qualmask, autofire, i); } setqualifiers (flags, state > 0); @@ -3447,7 +3476,7 @@ static void setbuttonstateall (struct uae_input_device *id, struct uae_input_dev continue; handle_input_event (evt, 1, 1, 0, true, false); queue_input_event (evt, NULL, 0, 1, 1, 0); /* send release event next frame */ - process_custom_event (id, ID_BUTTON_OFFSET + button, state, qualmask, 0, i); + didcustom |= process_custom_event (id, ID_BUTTON_OFFSET + button, state, qualmask, 0, i); } else if (inverttoggle) { /* pressed = firebutton, not pressed = autofire */ if (state) { @@ -3456,7 +3485,7 @@ static void setbuttonstateall (struct uae_input_device *id, struct uae_input_dev } else { handle_input_event (evt, 1, 1, autofire, true, false); } - process_custom_event (id, ID_BUTTON_OFFSET + button, state, qualmask, autofire, i); + didcustom |= process_custom_event (id, ID_BUTTON_OFFSET + button, state, qualmask, autofire, i); } else if (toggle) { if (!state) continue; @@ -3467,7 +3496,7 @@ static void setbuttonstateall (struct uae_input_device *id, struct uae_input_dev *flagsp ^= ID_FLAG_TOGGLED; int toggled = (*flagsp & ID_FLAG_TOGGLED) ? 1 : 0; handle_input_event (evt, toggled, 1, autofire, true, false); - process_custom_event (id, ID_BUTTON_OFFSET + button, toggled, qualmask, autofire, i); + didcustom |= process_custom_event (id, ID_BUTTON_OFFSET + button, toggled, qualmask, autofire, i); } else { if (!checkqualifiers (evt, flags, qualmask)) { if (!state && !(flags & ID_FLAG_CANRELEASE)) { @@ -3483,12 +3512,15 @@ static void setbuttonstateall (struct uae_input_device *id, struct uae_input_dev if ((omask ^ nmask) & mask) { handle_input_event (evt, state, 1, autofire, true, false); if (state) - process_custom_event (id, ID_BUTTON_OFFSET + button, state, qualmask, autofire, i); + didcustom |= process_custom_event (id, ID_BUTTON_OFFSET + button, state, qualmask, autofire, i); } } } - if ((omask ^ nmask) & mask) { + if (!didcustom) + queue_input_event (-1, NULL, -1, 0, 0, 1); + + if (id2 && ((omask ^ nmask) & mask)) { if (state) id2->buttonmask |= mask; else @@ -4622,6 +4654,7 @@ static void disableifempty (struct uae_prefs *prefs) disableifempty2 (&mice[l]); disableifempty2 (&keyboards[l]); } + prefs->internalevent_settings[0]->enabled = true; } static void matchdevices (struct inputdevice_functions *inf, struct uae_input_device *uid) @@ -4741,6 +4774,7 @@ bool inputdevice_set_gameports_mapping (struct uae_prefs *prefs, int devnum, int joysticks = prefs->joystick_settings[prefs->input_selected_setting]; mice = prefs->mouse_settings[prefs->input_selected_setting]; keyboards = prefs->keyboard_settings[prefs->input_selected_setting]; + if (prefs->input_selected_setting != GAMEPORT_INPUT_SETTINGS) { int xflags, xport; TCHAR xname[MAX_DPATH], xcustom[MAX_DPATH]; @@ -4800,6 +4834,7 @@ void inputdevice_updateconfig_internal (struct uae_prefs *prefs) joysticks = prefs->joystick_settings[prefs->input_selected_setting]; mice = prefs->mouse_settings[prefs->input_selected_setting]; keyboards = prefs->keyboard_settings[prefs->input_selected_setting]; + internalevents = prefs->internalevent_settings[prefs->input_selected_setting]; matchdevices_all (prefs); @@ -4809,14 +4844,19 @@ void inputdevice_updateconfig_internal (struct uae_prefs *prefs) joysticks = prefs->joystick_settings[GAMEPORT_INPUT_SETTINGS]; mice = prefs->mouse_settings[GAMEPORT_INPUT_SETTINGS]; keyboards = prefs->keyboard_settings[GAMEPORT_INPUT_SETTINGS]; + internalevents = prefs->internalevent_settings[GAMEPORT_INPUT_SETTINGS]; + for (i = 0; i < MAX_INPUT_SETTINGS; i++) { joysticks[i].enabled = 0; mice[i].enabled = 0; } + compatibility_copy (prefs, true); joysticks = prefs->joystick_settings[prefs->input_selected_setting]; mice = prefs->mouse_settings[prefs->input_selected_setting]; keyboards = prefs->keyboard_settings[prefs->input_selected_setting]; + internalevents = prefs->internalevent_settings[prefs->input_selected_setting]; + if (prefs->input_selected_setting != GAMEPORT_INPUT_SETTINGS) { compatibility_copy (prefs, false); } @@ -4964,12 +5004,13 @@ static int inputdevice_translatekeycode_2 (int keyboard, int scancode, int state struct uae_input_device *na = &keyboards[keyboard]; int j, k; int handled = 0; + bool didcustom = false; if (!keyboards || scancode < 0) return handled; - if (!state) - process_custom_event (NULL, 0, 0, 0, 0, 0); +// if (!state) +// process_custom_event (NULL, 0, 0, 0, 0, 0); j = 0; while (j < MAX_INPUT_DEVICE_EVENTS && na->extra[j] >= 0) { @@ -4992,7 +5033,7 @@ static int inputdevice_translatekeycode_2 (int keyboard, int scancode, int state continue; if (!state) { - process_custom_event (na, j, state, qualmask, autofire, k); + didcustom |= process_custom_event (na, j, state, qualmask, autofire, k); } // if evt == caps and scan == caps: sync with native caps led @@ -5018,7 +5059,7 @@ static int inputdevice_translatekeycode_2 (int keyboard, int scancode, int state } else { handled |= handle_input_event (evt, 1, 1, autofire, true, false); } - process_custom_event (na, j, state, qualmask, autofire, k); + didcustom |= process_custom_event (na, j, state, qualmask, autofire, k); } else if (toggle) { if (!state) continue; @@ -5028,7 +5069,7 @@ static int inputdevice_translatekeycode_2 (int keyboard, int scancode, int state toggled = (*flagsp & ID_FLAG_TOGGLED) ? 1 : 0; handled |= handle_input_event (evt, toggled, 1, autofire, true, false); if (k == 0) - process_custom_event (na, j, state, qualmask, autofire, k); + didcustom |= process_custom_event (na, j, state, qualmask, autofire, k); } else { if (!checkqualifiers (evt, flags, qualmask)) { if (!state && !(flags & ID_FLAG_CANRELEASE)) @@ -5041,9 +5082,11 @@ static int inputdevice_translatekeycode_2 (int keyboard, int scancode, int state else *flagsp &= ~ID_FLAG_CANRELEASE; handled |= handle_input_event (evt, state, 1, autofire, true, false); - process_custom_event (na, j, state, qualmask, autofire, k); + didcustom |= process_custom_event (na, j, state, qualmask, autofire, k); } } + if (!didcustom) + queue_input_event (-1, NULL, -1, 0, 0, 1); return handled; } j++; @@ -5092,6 +5135,76 @@ void inputdevice_checkqualifierkeycode (int keyboard, int scancode, int state) inputdevice_translatekeycode_2 (keyboard, scancode, state, true); } +static const TCHAR *internaleventlabels[] = { + _T("CPU reset"), + _T("Keyboard reset"), + NULL +}; +static int init_int (void) +{ + return 1; +} +static void close_int (void) +{ +} +static int acquire_int (int num, int flags) +{ + return 1; +} +static void unacquire_int (int num) +{ +} +static void read_int (void) +{ +} +static int get_int_num (void) +{ + return 1; +} +static TCHAR *get_int_friendlyname (int num) +{ + return _T("Internal events"); +} +static TCHAR *get_int_uniquename (int num) +{ + return _T("INTERNALEVENTS1"); +} +static int get_int_widget_num (int num) +{ + int i; + for (i = 0; internaleventlabels[i]; i++); + return i; +} +static int get_int_widget_type (int kb, int num, TCHAR *name, uae_u32 *code) +{ + if (code) + *code = num; + if (name) + _tcscpy (name, internaleventlabels[num]); + return IDEV_WIDGET_BUTTON; +} +static int get_int_widget_first (int kb, int type) +{ + return 0; +} +static int get_int_flags (int num) +{ + return 0; +} +static struct inputdevice_functions inputdevicefunc_internalevent = { + init_int, close_int, acquire_int, unacquire_int, read_int, + get_int_num, get_int_friendlyname, get_int_uniquename, + get_int_widget_num, get_int_widget_type, + get_int_widget_first, + get_int_flags +}; + +void send_internalevent (int eventid) +{ + setbuttonstateall (&internalevents[0], NULL, eventid, -1); +} + + void inputdevice_init (void) { idev[IDTYPE_JOYSTICK] = inputdevicefunc_joystick; @@ -5100,6 +5213,8 @@ void inputdevice_init (void) idev[IDTYPE_MOUSE].init (); idev[IDTYPE_KEYBOARD] = inputdevicefunc_keyboard; idev[IDTYPE_KEYBOARD].init (); + idev[IDTYPE_INTERNALEVENT] = inputdevicefunc_internalevent; + idev[IDTYPE_INTERNALEVENT].init (); } void inputdevice_close (void) @@ -5107,6 +5222,7 @@ void inputdevice_close (void) idev[IDTYPE_JOYSTICK].close (); idev[IDTYPE_MOUSE].close (); idev[IDTYPE_KEYBOARD].close (); + idev[IDTYPE_INTERNALEVENT].close (); inprec_close (true); } @@ -5119,6 +5235,8 @@ static struct uae_input_device *get_uid (const struct inputdevice_functions *id, uid = &mice[devnum]; } else if (id == &idev[IDTYPE_KEYBOARD]) { uid = &keyboards[devnum]; + } else if (id == &idev[IDTYPE_INTERNALEVENT]) { + uid = &internalevents[devnum]; } return uid; } @@ -5162,6 +5280,18 @@ static int get_event_data (const struct inputdevice_functions *id, int devnum, i return -1; } +static TCHAR *stripstrdup (const TCHAR *s) +{ + TCHAR *out = my_strdup (s); + if (!out) + return NULL; + for (int i = 0; out[i]; i++) { + if (out[i] < ' ') + out[i] = ' '; + } + return out; +} + static int put_event_data (const struct inputdevice_functions *id, int devnum, int num, int eventid, TCHAR *custom, int flags, int port, int sub) { struct uae_input_device *uid = get_uid (id, devnum); @@ -5175,7 +5305,7 @@ static int put_event_data (const struct inputdevice_functions *id, int devnum, i uid->flags[i][sub] = flags; uid->port[i][sub] = port; xfree (uid->custom[i][sub]); - uid->custom[i][sub] = custom && _tcslen (custom) > 0 ? my_strdup (custom) : NULL; + uid->custom[i][sub] = custom && _tcslen (custom) > 0 ? stripstrdup (custom) : NULL; ret = i; } else if (type == IDEV_WIDGET_AXIS) { i = num - id->get_widget_first (devnum, type) + ID_AXIS_OFFSET; @@ -5183,7 +5313,7 @@ static int put_event_data (const struct inputdevice_functions *id, int devnum, i uid->flags[i][sub] = flags; uid->port[i][sub] = port; xfree (uid->custom[i][sub]); - uid->custom[i][sub] = custom && _tcslen (custom) > 0 ? my_strdup (custom) : NULL; + uid->custom[i][sub] = custom && _tcslen (custom) > 0 ? stripstrdup (custom) : NULL; ret = i; } else if (type == IDEV_WIDGET_KEY) { i = num - id->get_widget_first (devnum, type); @@ -5191,7 +5321,7 @@ static int put_event_data (const struct inputdevice_functions *id, int devnum, i uid->flags[i][sub] = flags; uid->port[i][sub] = port; xfree (uid->custom[i][sub]); - uid->custom[i][sub] = custom && _tcslen (custom) > 0 ? my_strdup (custom) : NULL; + uid->custom[i][sub] = custom && _tcslen (custom) > 0 ? stripstrdup (custom) : NULL; ret = i; } if (ret < 0) @@ -5220,37 +5350,53 @@ static int is_event_used (const struct inputdevice_functions *id, int devnum, in // device based index from global device index int inputdevice_get_device_index (int devnum) { - if (devnum < idev[IDTYPE_JOYSTICK].get_num ()) + int jcnt = idev[IDTYPE_JOYSTICK].get_num (); + int mcnt = idev[IDTYPE_MOUSE].get_num (); + int kcnt = idev[IDTYPE_KEYBOARD].get_num (); + + if (devnum < jcnt) return devnum; - else if (devnum < idev[IDTYPE_JOYSTICK].get_num () + idev[IDTYPE_MOUSE].get_num ()) - return devnum - idev[IDTYPE_JOYSTICK].get_num (); - else if (devnum < idev[IDTYPE_JOYSTICK].get_num () + idev[IDTYPE_MOUSE].get_num () + idev[IDTYPE_KEYBOARD].get_num ()) - return devnum - idev[IDTYPE_JOYSTICK].get_num () - idev[IDTYPE_MOUSE].get_num (); - else - return -1; + else if (devnum < jcnt + mcnt) + return devnum - jcnt; + else if (devnum < jcnt + mcnt + kcnt) + return devnum - (jcnt + mcnt); + else if (devnum < jcnt + mcnt + kcnt + INTERNALEVENT_COUNT) + return devnum - (jcnt + mcnt + kcnt); + return -1; } static int getdevnum (int type, int devnum) { + int jcnt = idev[IDTYPE_JOYSTICK].get_num (); + int mcnt = idev[IDTYPE_MOUSE].get_num (); + int kcnt = idev[IDTYPE_KEYBOARD].get_num (); + if (type == IDTYPE_JOYSTICK) return devnum; - if (type == IDTYPE_MOUSE) - return idev[IDTYPE_JOYSTICK].get_num () + devnum; - if (type == IDTYPE_KEYBOARD) - return idev[IDTYPE_JOYSTICK].get_num () + idev[IDTYPE_MOUSE].get_num () + devnum; + else if (type == IDTYPE_MOUSE) + return jcnt + devnum; + else if (type == IDTYPE_KEYBOARD) + return jcnt + mcnt + devnum; + else if (type == IDTYPE_INTERNALEVENT) + return jcnt + mcnt + kcnt + devnum; return -1; } static int gettype (int devnum) { - if (devnum < idev[IDTYPE_JOYSTICK].get_num ()) + int jcnt = idev[IDTYPE_JOYSTICK].get_num (); + int mcnt = idev[IDTYPE_MOUSE].get_num (); + int kcnt = idev[IDTYPE_KEYBOARD].get_num (); + + if (devnum < jcnt) return IDTYPE_JOYSTICK; - else if (devnum < idev[IDTYPE_JOYSTICK].get_num () + idev[IDTYPE_MOUSE].get_num ()) + else if (devnum < jcnt + mcnt) return IDTYPE_MOUSE; - else if (devnum < idev[IDTYPE_JOYSTICK].get_num () + idev[IDTYPE_MOUSE].get_num () + idev[IDTYPE_KEYBOARD].get_num ()) + else if (devnum < jcnt + mcnt + kcnt) return IDTYPE_KEYBOARD; - else - return -1; + else if (devnum < jcnt + mcnt + kcnt + INTERNALEVENT_COUNT) + return IDTYPE_INTERNALEVENT; + return -1; } static struct inputdevice_functions *getidf (int devnum) diff --git a/jit/gencomp.cpp b/jit/gencomp.cpp index 0bb2b541..05df3999 100644 --- a/jit/gencomp.cpp +++ b/jit/gencomp.cpp @@ -3022,11 +3022,11 @@ generate_one_opcode (int rp, int noflags) if (noflags) { fprintf (stblfile, "{ op_%lx_%d_comp_nf, %ld, 0x%08x }, /* %s */\n", opcode, postfix, opcode, flags, name); fprintf (headerfile, "extern compop_func op_%lx_%d_comp_nf;\n", opcode, postfix); - printf ("unsigned long REGPARAM2 op_%lx_%d_comp_nf(uae_u32 opcode) /* %s */\n{\n", opcode, postfix, name); + printf ("uae_u32 REGPARAM2 op_%lx_%d_comp_nf(uae_u32 opcode) /* %s */\n{\n", opcode, postfix, name); } else { fprintf (stblfile, "{ op_%lx_%d_comp_ff, %ld, 0x%08x }, /* %s */\n", opcode, postfix, opcode, flags, name); fprintf (headerfile, "extern compop_func op_%lx_%d_comp_ff;\n", opcode, postfix); - printf ("unsigned long REGPARAM2 op_%lx_%d_comp_ff(uae_u32 opcode) /* %s */\n{\n", opcode, postfix, name); + printf ("uae_u32 REGPARAM2 op_%lx_%d_comp_ff(uae_u32 opcode) /* %s */\n{\n", opcode, postfix, name); } com_flush(); } diff --git a/newcpu.cpp b/newcpu.cpp index 3ffe333a..6e5d8d43 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -33,6 +33,7 @@ #include "gayle.h" #include "cia.h" #include "inputrecord.h" +#include "inputdevice.h" #ifdef JIT #include "jit/compemu.h" #include @@ -949,7 +950,7 @@ STATIC_INLINE void count_instr (unsigned int opcode) { } -static unsigned long REGPARAM2 op_illg_1 (uae_u32 opcode) +static uae_u32 REGPARAM2 op_illg_1 (uae_u32 opcode) { op_illg (opcode); return 4; @@ -970,7 +971,7 @@ static void build_cpufunctbl (void) lvl = 5; tbl = op_smalltbl_0_ff; if (currprefs.cpu_cycle_exact) - tbl = op_smalltbl_21_ff; + tbl = op_smalltbl_22_ff; if (currprefs.mmu_model) tbl = op_smalltbl_31_ff; break; @@ -978,7 +979,7 @@ static void build_cpufunctbl (void) lvl = 4; tbl = op_smalltbl_1_ff; if (currprefs.cpu_cycle_exact) - tbl = op_smalltbl_22_ff; + tbl = op_smalltbl_23_ff; if (currprefs.mmu_model) tbl = op_smalltbl_31_ff; break; @@ -986,13 +987,19 @@ static void build_cpufunctbl (void) lvl = 3; tbl = op_smalltbl_2_ff; if (currprefs.cpu_cycle_exact) - tbl = op_smalltbl_23_ff; + tbl = op_smalltbl_24_ff; break; case 68020: lvl = 2; tbl = op_smalltbl_3_ff; - if (currprefs.cpu_cycle_exact) +#ifdef CPUEMU_20 + if (currprefs.cpu_compatible) tbl = op_smalltbl_20_ff; +#endif +#ifdef CPUEMU_21 + if (currprefs.cpu_cycle_exact) + tbl = op_smalltbl_21_ff; +#endif break; case 68010: lvl = 1; @@ -3058,7 +3065,7 @@ void m68k_reset (int hardreset) fill_prefetch_quick (); } -unsigned long REGPARAM2 op_illg (uae_u32 opcode) +uae_u32 REGPARAM2 op_illg (uae_u32 opcode) { uaecptr pc = m68k_getpc (); static int warned; @@ -3890,6 +3897,8 @@ static void opcodedebug (uae_u32 pc, uae_u16 opcode, bool full) } } +#ifdef CPUEMU_31 + /* Aranym MMU 68040 */ static void m68k_run_mmu040 (void) { @@ -3986,6 +3995,8 @@ retry: } +#endif + /* "cycle exact" 68020/030 */ STATIC_INLINE void docodece020 (uae_u32 opcode) @@ -4102,19 +4113,38 @@ cont: } } +#ifdef CPUEMU_20 + /* emulate simple prefetch */ + +uae_u32 get_word_020_prefetch (int o) +{ + uae_u32 pc = m68k_getpc () + o; + + if (pc == regs.prefetch020addr) { + uae_u32 v = regs.prefetch020[0]; + regs.prefetch020[0] = regs.prefetch020[1]; + regs.prefetch020[1] = regs.prefetch020[2]; + regs.prefetch020[2] = x_get_word (pc + 6); + regs.prefetch020addr += 2; + return v; + } else { + regs.prefetch020addr = pc + 2; + regs.prefetch020[0] = x_get_word (pc + 2); + regs.prefetch020[1] = x_get_word (pc + 4); + regs.prefetch020[2] = x_get_word (pc + 6); + return x_get_word (pc); + } +} + static void m68k_run_2p (void) { - uae_u32 prefetch, prefetch_pc; struct regstruct *r = ®s; - prefetch_pc = m68k_getpc (); - prefetch = x_get_long (prefetch_pc); for (;;) { - uae_u32 pc = m68k_getpc (); uae_u16 opcode; - r->instruction_pc = pc; + r->instruction_pc = m68k_getpc (); #if DEBUG_CD32CDTVIO out_cd32io (m68k_getpc ()); @@ -4122,15 +4152,7 @@ static void m68k_run_2p (void) x_do_cycles (cpu_cycles); - if (pc == prefetch_pc) { - opcode = prefetch >> 16; - } else if (pc == prefetch_pc + 2) { - opcode = prefetch; - } else { - opcode = x_get_word (pc); - prefetch_pc = pc + 2; - prefetch = x_get_long (prefetch_pc); - } + opcode = get_word_020_prefetch (0); count_instr (opcode); @@ -4143,6 +4165,8 @@ static void m68k_run_2p (void) } } +#endif + //static int used[65536]; /* Same thing, but don't use prefetch to get opcode. */ @@ -5280,6 +5304,7 @@ void cpureset (void) uaecptr ksboot = 0xf80002 - 2; /* -2 = RESET hasn't increased PC yet */ uae_u16 ins; + send_internalevent (INTERNALEVENT_CPURESET); if (currprefs.cpu_compatible || currprefs.cpu_cycle_exact) { custom_reset (0); return; diff --git a/od-win32/dinput.cpp b/od-win32/dinput.cpp index ad5f25e1..6d418eac 100644 --- a/od-win32/dinput.cpp +++ b/od-win32/dinput.cpp @@ -1307,10 +1307,10 @@ static void dumphidvaluecaps (PHIDP_VALUE_CAPS vcaps, int size) write_log (L"ReportCount: %u\n", caps.ReportCount); write_log (L"UnitsExp: %u\n", caps.UnitsExp); write_log (L"Units: %u\n", caps.Units); - write_log (L"LogicalMin: %u\n", caps.LogicalMin); - write_log (L"LogicalMax: %u\n", caps.LogicalMax); - write_log (L"PhysicalMin: %u\n", caps.PhysicalMin); - write_log (L"PhysicalMax: %u\n", caps.PhysicalMax); + write_log (L"LogicalMin: %u (%d)\n", caps.LogicalMin, extractbits (caps.LogicalMin, caps.BitSize, caps.LogicalMin < 0)); + write_log (L"LogicalMax: %u (%d)\n", caps.LogicalMax, extractbits (caps.LogicalMax, caps.BitSize, caps.LogicalMin < 0)); + write_log (L"PhysicalMin: %u (%d)\n", caps.PhysicalMin, extractbits (caps.PhysicalMin, caps.BitSize, caps.PhysicalMin < 0)); + write_log (L"PhysicalMax: %u (%d)\n", caps.PhysicalMax, extractbits (caps.PhysicalMax, caps.BitSize, caps.PhysicalMax < 0)); if (caps.IsRange) { write_log (L"UsageMin: %u\n", caps.Range.UsageMin); write_log (L"UsageMax: %u\n", caps.Range.UsageMax); @@ -1385,6 +1385,11 @@ static void dumphidcaps (struct didata *did) write_log (_T("NumberFeatureDataIndices: %u\n"), caps.NumberFeatureDataIndices); } +static void dumphidend (void) +{ + write_log (_T("\n")); + } + static bool initialize_rawinput (void) { RAWINPUTDEVICELIST *ridl = 0; @@ -1712,6 +1717,7 @@ static bool initialize_rawinput (void) } } xfree (vcaps); + dumphidend (); } } if (ok) { diff --git a/od-win32/gencpu_msvc/gencpu_msvc.vcxproj b/od-win32/gencpu_msvc/gencpu_msvc.vcxproj index 49067870..6ab2c53c 100644 --- a/od-win32/gencpu_msvc/gencpu_msvc.vcxproj +++ b/od-win32/gencpu_msvc/gencpu_msvc.vcxproj @@ -108,7 +108,7 @@ /MACHINE:I386 %(AdditionalOptions) - gencpu.exe + debug\gencpu.exe true true .\Debug/gencpu.pdb @@ -119,9 +119,8 @@ generating gencpu files - cd ..\.. -od-win32\gencpu_msvc\gencpu.exe - + + diff --git a/od-win32/resources/resource b/od-win32/resources/resource index ba3ac167..b6369370 100644 --- a/od-win32/resources/resource +++ b/od-win32/resources/resource @@ -1077,6 +1077,7 @@ #define IDC_RTG_DISPLAYSELECT 1809 #define IDC_MISCLIST 1810 #define IDC_STATENAME 1811 +#define IDC_EDIT1 1812 #define ID__FLOPPYDRIVES 40004 #define ID_FLOPPYDRIVES_DF0 40005 #define ID_ST_CONFIGURATION 40010 @@ -1127,7 +1128,7 @@ #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 386 #define _APS_NEXT_COMMAND_VALUE 40050 -#define _APS_NEXT_CONTROL_VALUE 1812 +#define _APS_NEXT_CONTROL_VALUE 1813 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index 543781f7..90116fbf 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -934,14 +934,14 @@ BEGIN CTEXT "x",IDC_PROGRESSBAR_TEXT,23,5,187,10,SS_CENTERIMAGE | WS_TABSTOP END -IDD_STRINGBOX DIALOGEX 0, 0, 229, 58 +IDD_STRINGBOX DIALOGEX 0, 0, 229, 107 STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Enter text..." FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN - EDITTEXT IDC_STRINGBOXEDIT,7,17,214,14,ES_AUTOHSCROLL | ES_WANTRETURN - DEFPUSHBUTTON "OK",IDOK,48,39,50,14 - PUSHBUTTON "Cancel",IDCANCEL,151,39,50,14 + EDITTEXT IDC_STRINGBOXEDIT,7,8,214,65,ES_MULTILINE + DEFPUSHBUTTON "OK",IDOK,48,84,50,14 + PUSHBUTTON "Cancel",IDCANCEL,151,84,50,14 END IDD_DEBUGGER DIALOGEX 0, 0, 454, 368 @@ -1312,6 +1312,7 @@ BEGIN IDD_STRINGBOX, DIALOG BEGIN + BOTTOMMARGIN, 58 END IDD_EXPANSION, DIALOG diff --git a/od-win32/srcrelease.cmd b/od-win32/srcrelease.cmd index 86dd32e1..0e1931d2 100644 --- a/od-win32/srcrelease.cmd +++ b/od-win32/srcrelease.cmd @@ -33,8 +33,10 @@ del cpuemu_11.cpp del cpuemu_12.cpp del cpuemu_20.cpp del cpuemu_21.cpp +del cpuemu_22.cpp del cpuemu_31.cpp del linetoscr.cpp +del aros.rom.cpp cd jit del compemu.cpp diff --git a/od-win32/sysconfig.h b/od-win32/sysconfig.h index 100d053f..36328b7e 100644 --- a/od-win32/sysconfig.h +++ b/od-win32/sysconfig.h @@ -47,10 +47,11 @@ #define MMUEMU /* Aranym 68040 MMU */ #define FULLMMU /* Aranym 68040 MMU */ #define CPUEMU_0 /* generic 680x0 emulation */ -#define CPUEMU_11 /* 68000+prefetch emulation */ +#define CPUEMU_11 /* 68000 prefetch emulation */ #define CPUEMU_12 /* 68000 cycle-exact cpu&blitter */ -#define CPUEMU_20 /* 68020 "cycle-exact" + blitter */ -#define CPUEMU_21 /* 68030 (040/060) "cycle-exact" + blitter */ +#define CPUEMU_20 /* 68020 prefetch */ +#define CPUEMU_21 /* 68020 "cycle-exact" + blitter */ +#define CPUEMU_22 /* 68030 (040/060) "cycle-exact" + blitter */ #define CPUEMU_31 /* 68040 Aranym MMU */ #define ACTION_REPLAY /* Action Replay 1/2/3 support */ #define PICASSO96 /* Picasso96 display card emulation */ diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index de892f05..790b3afd 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -91,7 +91,7 @@ #include "cloanto/RetroPlatformIPC.h" #endif -extern int harddrive_dangerous, do_rdbdump, aspi_allow_all, no_rawinput; +extern int harddrive_dangerous, do_rdbdump, no_rawinput; extern int force_directsound; extern int log_a2065, a2065_promiscuous; extern int rawinput_enabled_hid, rawinput_log; @@ -1273,7 +1273,6 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam, { extern bool win32_spti_media_change (TCHAR driveletter, int insert); extern bool win32_ioctl_media_change (TCHAR driveletter, int insert); - extern bool win32_aspi_media_change (TCHAR driveletter, int insert); DEV_BROADCAST_HDR *pBHdr = (DEV_BROADCAST_HDR *)lParam; static int waitfornext; @@ -1312,7 +1311,6 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam, matched |= win32_spti_media_change (drive, inserted); matched |= win32_ioctl_media_change (drive, inserted); #endif - matched |= win32_aspi_media_change (drive, inserted); } if (type == DRIVE_REMOVABLE || type == DRIVE_CDROM || !inserted) { write_log (_T("WM_DEVICECHANGE '%s' type=%d inserted=%d\n"), drvname, type, inserted); @@ -2489,28 +2487,6 @@ uae_u8 *target_load_keyfile (struct uae_prefs *p, const TCHAR *path, int *sizep, return keybuf; } - -extern const TCHAR *get_aspi_path (int); - -static int get_aspi (int old) -{ - if (old == UAESCSI_NEROASPI && get_aspi_path (1)) - return old; - if (old == UAESCSI_FROGASPI && get_aspi_path (2)) - return old; - if (old == UAESCSI_ADAPTECASPI && get_aspi_path (0)) - return old; - if (get_aspi_path (1)) - return UAESCSI_NEROASPI; - else if (get_aspi_path (2)) - return UAESCSI_FROGASPI; - else if (get_aspi_path (0)) - return UAESCSI_ADAPTECASPI; - else - return UAESCSI_SPTI; -} - - /*** *static void parse_cmdline(cmdstart, argv, args, numargs, numchars) * @@ -2828,7 +2804,9 @@ void target_quit (void) void target_fixup_options (struct uae_prefs *p) { if (p->win32_automount_cddrives && !p->scsi) - p->scsi = 1; + p->scsi = UAESCSI_SPTI; + if (p->scsi > UAESCSI_LAST) + p->scsi = UAESCSI_SPTI; bool paused = false; bool nosound = false; if (!paused) { @@ -2922,7 +2900,7 @@ void target_default_options (struct uae_prefs *p, int type) } } -static const TCHAR *scsimode[] = { _T("SCSIEMU"), _T("SPTI"), _T("SPTI+SCSISCAN"), _T("AdaptecASPI"), _T("NeroASPI"), _T("FrogASPI"), NULL }; +static const TCHAR *scsimode[] = { _T("SCSIEMU"), _T("SPTI"), _T("SPTI+SCSISCAN"), NULL }; static const TCHAR *statusbarmode[] = { _T("none"), _T("normal"), _T("extended"), NULL }; static struct midiportinfo *getmidiport (struct midiportinfo **mi, int devid) @@ -4685,7 +4663,7 @@ static int parseargs (const TCHAR *argx, const TCHAR *np, const TCHAR *np2) return 1; } if (!_tcscmp (arg, _T("noaspifiltering"))) { - aspi_allow_all = 1; + //aspi_allow_all = 1; return 1; } #endif diff --git a/od-win32/win32.h b/od-win32/win32.h index b918c5f6..c3294bb6 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -19,8 +19,8 @@ #define LANG_DLL 1 //#define WINUAEBETA _T("") -#define WINUAEBETA _T("4") -#define WINUAEDATE MAKEBD(2012, 6, 3) +#define WINUAEBETA _T("5") +#define WINUAEDATE MAKEBD(2012, 6, 18) #define WINUAEEXTRA _T("") //#define WINUAEEXTRA _T("AmiKit Preview") #define WINUAEREV _T("") @@ -73,7 +73,6 @@ void init_colors (void); extern int pause_emulation; extern int sound_available; extern int framecnt; -extern TCHAR prtname[]; extern TCHAR VersionStr[256]; extern TCHAR BetaStr[64]; extern int os_winnt_admin, os_64bit, os_vista, os_winxp, os_win7, cpu_number; diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 68564eda..90312840 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -4911,7 +4911,7 @@ static struct amigamodels amodels[] = { { 4, IDS_QS_MODEL_A500P }, // "Amiga 500+" { 4, IDS_QS_MODEL_A600 }, // "Amiga 600" { 4, IDS_QS_MODEL_A1000 }, // "Amiga 1000" - { 3, IDS_QS_MODEL_A1200 }, // "Amiga 1200" + { 4, IDS_QS_MODEL_A1200 }, // "Amiga 1200" { 1, IDS_QS_MODEL_A3000 }, // "Amiga 3000" { 1, IDS_QS_MODEL_A4000 }, // "Amiga 4000" { 0, }, //{ 1, IDS_QS_MODEL_A4000T }, // "Amiga 4000T" @@ -7644,17 +7644,12 @@ static void misc_addpri (HWND hDlg, int v, int pri) } -extern const TCHAR *get_aspi_path (int); - static void misc_scsi (HWND hDlg) { SendDlgItemMessage (hDlg, IDC_SCSIMODE, CB_RESETCONTENT, 0, 0); SendDlgItemMessage (hDlg, IDC_SCSIMODE, CB_ADDSTRING, 0, (LPARAM)_T("SCSI Emulation *")); SendDlgItemMessage (hDlg, IDC_SCSIMODE, CB_ADDSTRING, 0, (LPARAM)_T("SPTI")); SendDlgItemMessage (hDlg, IDC_SCSIMODE, CB_ADDSTRING, 0, (LPARAM)_T("SPTI + SCSI SCAN")); - SendDlgItemMessage (hDlg, IDC_SCSIMODE, CB_ADDSTRING, 0, (LPARAM)((get_aspi_path (0)) ? _T("AdaptecASPI") : _T("(AdaptecASPI)"))); - SendDlgItemMessage (hDlg, IDC_SCSIMODE, CB_ADDSTRING, 0, (LPARAM)((get_aspi_path (1)) ? _T("NeroASPI") : _T("(NeroASPI)"))); - SendDlgItemMessage (hDlg, IDC_SCSIMODE, CB_ADDSTRING, 0, (LPARAM)((get_aspi_path (2)) ? _T("FrogASPI") : _T("(FrogASPI)"))); SendDlgItemMessage (hDlg, IDC_SCSIMODE, CB_SETCURSEL, workprefs.win32_uaescsimode, 0); } @@ -11690,9 +11685,13 @@ static void init_inputdlg (HWND hDlg) for (i = 0; i < inputdevice_get_device_total (IDTYPE_KEYBOARD); i++) { SendDlgItemMessage (hDlg, IDC_INPUTDEVICE, CB_ADDSTRING, 0, (LPARAM)inputdevice_get_device_name (IDTYPE_KEYBOARD, i)); } + for (i = 0; i < inputdevice_get_device_total (IDTYPE_INTERNALEVENT); i++) { + SendDlgItemMessage (hDlg, IDC_INPUTDEVICE, CB_ADDSTRING, 0, (LPARAM)inputdevice_get_device_name (IDTYPE_INTERNALEVENT, i)); + } input_total_devices = inputdevice_get_device_total (IDTYPE_JOYSTICK) + inputdevice_get_device_total (IDTYPE_MOUSE) + - inputdevice_get_device_total (IDTYPE_KEYBOARD); + inputdevice_get_device_total (IDTYPE_KEYBOARD) + + inputdevice_get_device_total (IDTYPE_INTERNALEVENT); if (input_selected_device >= input_total_devices) input_selected_device = 0; InitializeListView (hDlg); diff --git a/od-win32/winuae_msvc10/winuae_msvc.vcxproj b/od-win32/winuae_msvc10/winuae_msvc.vcxproj index 2ba9e3bd..051f33a0 100644 --- a/od-win32/winuae_msvc10/winuae_msvc.vcxproj +++ b/od-win32/winuae_msvc10/winuae_msvc.vcxproj @@ -117,6 +117,10 @@ C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;C:\dev\include;$(IncludePath) C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x86;C:\dev\lib;C:\dev\WinDDK\7600.16385.1\lib\win7\i386;$(LibraryPath) C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x86;C:\dev\lib;C:\dev\WinDDK\7600.16385.1\lib\win7\i386;$(LibraryPath) + C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;C:\dev\include;$(IncludePath) + C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;C:\dev\include;$(IncludePath) + $(ReferencePath) + C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x86;C:\dev\lib;$(LibraryPath) @@ -558,6 +562,7 @@ + @@ -567,7 +572,6 @@ - diff --git a/od-win32/winuae_msvc10/winuae_msvc.vcxproj.filters b/od-win32/winuae_msvc10/winuae_msvc.vcxproj.filters index 0f75a87b..3418b03e 100644 --- a/od-win32/winuae_msvc10/winuae_msvc.vcxproj.filters +++ b/od-win32/winuae_msvc10/winuae_msvc.vcxproj.filters @@ -52,9 +52,6 @@ win32 - - win32 - win32 @@ -508,6 +505,9 @@ common + + common + diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index f0a9b21c..7de837bd 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -3,6 +3,19 @@ - hdd from command line - no-buffer tearing updates +Beta 5: + +- More custom input event fixes. +- Replaced custom event single line string dialog with larger multiline dialog, increased allowed custom event string length. +- Autoresolution didn't detect interlaced mode in some situations. +- Added "Internal events" input device category. Currently it only contains two events: + "CPU reset" and "Keyboard reset". It can be used to customize what happens when emulated Amiga is reset. + For example: set CPU mode back to fastest possible, eject or insert disks, quit emulator, etc.. +- Added 68020 prefetch CPU core. Emulates instruction prefetch without cycle-exact. "More compatible" option + enables this mode (Previously it did nothing in 68020 mode) +- A1200/CD32 Quickstart compatibility slider changed: cycle-exact/prefetch/fastest possible without JIT/JIT +- ASPI support removed. + Beta 4: - Custom input event autofire wasn't always canceled when shortcut included qualifier(s).