}
/* one toc entry / frame */
- if (cdrom_toc_counter >= 0 && !cdrom_command_active) {
+ if (cdrom_toc_counter >= 0 && !cdrom_command_active && framesync) {
if (cdrom_start_return_data (-1)) {
cdrom_start_return_data (cdrom_return_toc_entry ());
}
cfgfile_write_str (f, _T("gfx_center_vertical"), centermode1[p->gfx_ycenter]);
cfgfile_write_str (f, _T("gfx_colour_mode"), colormode1[p->color_mode]);
cfgfile_write_bool (f, _T("gfx_blacker_than_black"), p->gfx_blackerthanblack);
+ cfgfile_dwrite_bool (f, _T("gfx_black_frame_insertion"), p->lightboost_strobo);
cfgfile_write_str (f, _T("gfx_api"), filterapi[p->gfx_api]);
cfgfile_dwrite (f, _T("gfx_horizontal_tweak"), _T("%d"), p->gfx_extrawidth);
|| cfgfile_yesno (option, value, _T("log_illegal_mem"), &p->illegal_mem)
|| cfgfile_yesno (option, value, _T("filesys_no_fsdb"), &p->filesys_no_uaefsdb)
|| cfgfile_yesno (option, value, _T("gfx_blacker_than_black"), &p->gfx_blackerthanblack)
+ || cfgfile_yesno (option, value, _T("gfx_black_frame_insertion"), &p->lightboost_strobo)
|| cfgfile_yesno (option, value, _T("gfx_flickerfixer"), &p->gfx_scandoubler)
|| cfgfile_yesno (option, value, _T("magic_mouse"), &p->input_magic_mouse)
|| cfgfile_yesno (option, value, _T("warp"), &p->turbo_emulation)
write_log (_T(" HSSTOP=%04X HBSTRT=%04X HBSTOP=%04X\n"), hsstop, hbstrt, hbstop);
write_log (_T(" VSSTOP=%04X VBSTRT=%04X VBSTOP=%04X\n"), vsstop, vbstrt, vbstop);
write_log (_T(" HSSTRT=%04X VSSTRT=%04X HCENTER=%04X\n"), hsstrt, vsstrt, hcenter);
+ write_log (_T(" HSYNCSTART=%04X HSYNCEND=%04X\n"), hsyncstartpos, hsyncendpos);
}
int current_maxvpos (void)
diwfirstword = coord_diw_to_window_x (hstrt);
diwlastword = coord_diw_to_window_x (hstop);
+
if (diwfirstword >= diwlastword) {
diwfirstword = min_diwlastword;
diwlastword = max_diwlastword;
_T(" s \"<string>\"/<values> [<addr>] [<length>]\n")
_T(" Search for string/bytes.\n")
_T(" T or Tt Show exec tasks and their PCs.\n")
- _T(" Td,Tl,Tr Show devices, libraries or resources.\n")
+ _T(" Td,Tl,Tr,Ts,Ti,TO Show devices, libraries, resources, residents, interrupts, doslist.\n")
_T(" b Step to previous state capture position.\n")
_T(" M<a/b/s> <val> Enable or disable audio channels, bitplanes or sprites.\n")
_T(" sp <addr> [<addr2][<size>] Dump sprite information.\n")
{
uaecptr execbase = get_long_debug (4);
uaecptr list = 0, node;
+ TCHAR c = _totupper (t);
- if (_totupper (t) == 'O') { // doslist
+ if (c == 'O') { // doslist
uaecptr dosbase = get_base ("dos.library");
if (dosbase) {
uaecptr rootnode = get_long_debug (dosbase + 34);
console_out_f (_T("can't find dos.library\n"));
}
return;
- } else if (_totupper (t) == 'I') { // interrupts
+ } else if (c == 'I') { // interrupts
static const int it[] = { 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0 };
static const int it2[] = { 1, 1, 1, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 7 };
list = execbase + 84;
list += 12;
}
return;
+ } else if (c == 'S') { // residents
+ list = get_long (execbase + 300);
+ while (list) {
+ uaecptr resident = get_long_debug (list);
+ if (!resident)
+ break;
+ if (resident & 0x80000000) {
+ write_log (_T("-> %08X\n"), resident & ~0x7fffffff);
+ list = resident & ~0x7fffffff;
+ continue;
+ }
+ uae_u8 *addr;
+ addr = get_real_address (get_long_debug (resident + 14));
+ TCHAR *name1 = addr ? au ((char*)addr) : au("<null>");
+ my_trim (name1);
+ addr = get_real_address (get_long_debug (resident + 18));
+ TCHAR *name2 = addr ? au ((char*)addr) : au("<null>");
+ my_trim (name2);
+ console_out_f (_T("%08X %08X: %02X %3d %02X %+3.3d '%s' ('%s')\n"),
+ list, resident,
+ get_byte_debug (resident + 10), get_byte_debug (resident + 11),
+ get_byte_debug (resident + 12), (uae_s8)get_byte_debug (resident + 13),
+ name1, name2);
+ xfree (name2);
+ xfree (name1);
+ list += 4;
+ }
+ return;
}
- switch (_totupper (t))
+ switch (c)
{
case 'R':
list = execbase + 336;
playfield_start = linetoscr_diw_start;
playfield_end = linetoscr_diw_end;
+ if (beamcon0 & 0x80) {
+ if (playfield_start < coord_hw_to_window_x (hsyncendpos * 2 + DIW_DDF_OFFSET))
+ playfield_start = coord_hw_to_window_x (hsyncendpos * 2 + DIW_DDF_OFFSET);
+ if (playfield_end > coord_hw_to_window_x (hsyncstartpos * 2 + DIW_DDF_OFFSET))
+ playfield_end = coord_hw_to_window_x (hsyncstartpos * 2 + DIW_DDF_OFFSET);
+ }
+
unpainted = visible_left_border < playfield_start ? 0 : visible_left_border - playfield_start;
ham_src_pixel = MAX_PIXELS_PER_LINE + res_shift_from_window (playfield_start - native_ddf_left);
unpainted = res_shift_from_window (unpainted);
}
min = coord_hw_to_window_x (min >> sprite_buffer_res) + (DIW_DDF_OFFSET << lores_shift);
max = coord_hw_to_window_x (max >> sprite_buffer_res) + (DIW_DDF_OFFSET << lores_shift);
+ if (beamcon0 & 0x80) {
+ if (min < coord_hw_to_window_x (hsyncendpos * 2 + DIW_DDF_OFFSET))
+ min = coord_hw_to_window_x (hsyncendpos * 2 + DIW_DDF_OFFSET);
+ if (min > coord_hw_to_window_x (hsyncstartpos * 2 + DIW_DDF_OFFSET))
+ min = coord_hw_to_window_x (hsyncstartpos * 2 + DIW_DDF_OFFSET);
+ }
if (min < playfield_start)
playfield_start = min;
if (playfield_start < visible_left_border)
}
_tcscpy (ci->rootdir, rootdir);
_tcscpy (ci->devname, devname);
- _tcscpy (ci->volname, volname);
+ _tcscpy (ci->volname, volname ? volname : _T(""));
_tcscpy (ci->filesys, filesysdir);
if (set_filesys_unit (devno, ci) < 0) {
if (ide->hdhfd.size) {
ide->hdhfd.secspertrack = ide->regs.ide_nsector == 0 ? 256 : ide->regs.ide_nsector;
ide->hdhfd.heads = (ide->regs.ide_select & 15) + 1;
- ide->hdhfd.cyls = (ide->hdhfd.size / ide->blocksize) / (ide->hdhfd.secspertrack * ide->hdhfd.heads);
+ if (ide->hdhfd.hfd.ci.pcyls)
+ ide->hdhfd.cyls = ide->hdhfd.hfd.ci.pcyls;
+ else
+ ide->hdhfd.cyls = (ide->hdhfd.size / ide->blocksize) / (ide->hdhfd.secspertrack * ide->hdhfd.heads);
if (ide->hdhfd.heads * ide->hdhfd.cyls * ide->hdhfd.secspertrack > 16515072 || ide->lba48) {
- ide->hdhfd.cyls = ide->hdhfd.cyls_def;
+ if (ide->hdhfd.hfd.ci.pcyls)
+ ide->hdhfd.cyls = ide->hdhfd.hfd.ci.pcyls;
+ else
+ ide->hdhfd.cyls = ide->hdhfd.cyls_def;
ide->hdhfd.heads = ide->hdhfd.heads_def;
ide->hdhfd.secspertrack = ide->hdhfd.secspertrack_def;
}
printf ("\tCLEAR_CZNV ();\n");
printf ("\tif (src == 0) {\n");
if (cpu_level > 0) {
- /* 68020 sets V when dividing by zero. Z is also set.
- * 68000 clears both
- */
+ /* 68000 Set Z. Clear N, V, C.
+ * 68020 Set V, Z. Clear C and N. Keep X.
+ * 68060 Clear C, everything else is kept.
+ */
printf("\t\tSET_VFLG (1);\n");
printf("\t\tSET_ZFLG (1);\n");
}
extern int maxhpos, maxhpos_short;
extern int maxvpos, maxvpos_nom;
-extern int hsyncstartpos;
+extern int hsyncstartpos, hsyncendpos;
extern int minfirstline, vblank_endline, numscrlines;
extern double vblank_hz, fake_vblank_hz;
extern int vblank_skip, doublescan;
{
if (!(currprefs.chipset_mask & CSMASK_ECS_DENISE))
con0 &= ~0x40; // SUPERHIRES
- return ((con0) & 0x8000) ? RES_HIRES : ((con0) & 0x40) ? RES_SUPERHIRES : RES_LORES;
+ return ((con0) & 0x40) ? RES_SUPERHIRES : ((con0) & 0x8000) ? RES_HIRES : RES_LORES;
}
STATIC_INLINE int GET_RES_AGNUS (uae_u16 con0)
{
if (!(currprefs.chipset_mask & CSMASK_ECS_AGNUS))
con0 &= ~0x40; // SUPERHIRES
- return ((con0) & 0x8000) ? RES_HIRES : ((con0) & 0x40) ? RES_SUPERHIRES : RES_LORES;
+ return ((con0) & 0x40) ? RES_SUPERHIRES : ((con0) & 0x8000) ? RES_HIRES : RES_LORES;
}
/* get sprite width from FMODE */
#define GET_SPRITEWIDTH(FMODE) ((((FMODE) >> 2) & 3) == 3 ? 64 : (((FMODE) >> 2) & 3) == 0 ? 16 : 32)
#define ID_AXIS_OFFSET 32
#define ID_AXIS_TOTAL 32
+#define MAX_COMPA_INPUTLIST 30
+
extern int inputdevice_iterate (int devnum, int num, TCHAR *name, int *af);
extern bool inputdevice_set_gameports_mapping (struct uae_prefs *prefs, int devnum, int num, int evtnum, uae_u64 flags, int port);
extern int inputdevice_set_mapping (int devnum, int num, const TCHAR *name, TCHAR *custom, uae_u64 flags, int port, int sub);
extern int inputdevice_iskeymapped (int keyboard, int scancode);
extern int inputdevice_synccapslock (int, int*);
extern void inputdevice_testrecord (int type, int num, int wtype, int wnum, int state, int max);
-extern int inputdevice_get_compatibility_input (struct uae_prefs*, int, int*, int**, int**);
+extern int inputdevice_get_compatibility_input (struct uae_prefs*, int index, int *typelist, int *inputlist, const int **at);
extern struct inputevent *inputdevice_get_eventinfo (int evt);
extern bool inputdevice_get_eventname (const struct inputevent *ie, TCHAR *out);
extern void inputdevice_compa_prepare_custom (struct uae_prefs *prefs, int index, int mode, bool removeold);
extern void inputdevice_compa_clear (struct uae_prefs *prefs, int index);
-extern int intputdevice_compa_get_eventtype (int evt, int **axistable);
+extern int intputdevice_compa_get_eventtype (int evt, const int **axistable);
extern void inputdevice_sparecopy (struct uae_input_device *uid, int num, int sub);
extern uae_u16 potgo_value;
int gfx_api;
int color_mode;
int gfx_extrawidth;
+ bool lightboost_strobo;
int gfx_filter;
TCHAR gfx_filtershader[2 * MAX_FILTERSHADERS][MAX_DPATH];
}
}
-static int axistable[] = {
+static const int axistable[] = {
INPUTEVENT_MOUSE1_HORIZ, INPUTEVENT_MOUSE1_LEFT, INPUTEVENT_MOUSE1_RIGHT,
INPUTEVENT_MOUSE1_VERT, INPUTEVENT_MOUSE1_UP, INPUTEVENT_MOUSE1_DOWN,
INPUTEVENT_MOUSE2_HORIZ, INPUTEVENT_MOUSE2_LEFT, INPUTEVENT_MOUSE2_RIGHT,
-1
};
-int intputdevice_compa_get_eventtype (int evt, int **axistablep)
+int intputdevice_compa_get_eventtype (int evt, const int **axistablep)
{
for (int i = 0; axistable[i] >= 0; i += 3) {
*axistablep = &axistable[i];
}
}
-int inputdevice_get_compatibility_input (struct uae_prefs *prefs, int index, int *typelist, int **inputlist, int **at)
+int inputdevice_get_compatibility_input (struct uae_prefs *prefs, int index, int *typelist, int *inputlist, const int **at)
{
if (index >= MAX_JPORTS || joymodes[index] < 0)
return -1;
- *typelist = joymodes[index];
- *inputlist = joyinputs[index];
- *at = axistable;
+ if (typelist != NULL)
+ *typelist = joymodes[index];
+ if (at != NULL)
+ *at = axistable;
+ if (inputlist == NULL)
+ return -1;
+
//write_log (_T("%d %p %p\n"), *typelist, *inputlist, *at);
- int cnt = 0;
- for (int i = 0; joyinputs[index] && joyinputs[index][i] >= 0; i++, cnt++);
+ int cnt;
+ for (cnt = 0; joyinputs[index] && joyinputs[index][cnt] >= 0; cnt++) {
+ inputlist[cnt] = joyinputs[index][cnt];
+ }
+ inputlist[cnt] = -1;
+
+ // find custom events (custom event = event that is mapped to same port but not included in joyinputs[]
+ int devnum = 0;
+ while (inputdevice_get_device_status (devnum) >= 0) {
+ for (int j = 0; j < inputdevice_get_widget_num (devnum); j++) {
+ for (int sub = 0; sub < MAX_INPUT_SUB_EVENT; sub++) {
+ int port, k;
+ uae_u64 flags;
+ int evtnum2 = inputdevice_get_mapping (devnum, j, &flags, &port, NULL, NULL, sub);
+ if (port - 1 != index)
+ continue;
+ for (k = 0; axistable[k] >= 0; k++) {
+ if (evtnum2 == axistable[k])
+ break;
+ }
+ if (axistable[k] < 0) {
+ for (k = 0; inputlist[k] >= 0; k++) {
+ if (evtnum2 == inputlist[k])
+ break;
+ }
+ if (inputlist[k] < 0) {
+ inputlist[k] = evtnum2;
+ inputlist[k + 1] = -1;
+ cnt++;
+ }
+ }
+ }
+ }
+ devnum++;
+ }
+#if 0
+ for (int i = 0; inputlist[i] >= 0; i++) {
+ struct inputevent *evt = inputdevice_get_eventinfo (inputlist[i]);
+ write_log (_T("%d: %d %d %s\n"), i, index, inputlist[i], evt->name);
+ }
+#endif
//write_log (_T("%d\n"), cnt);
return cnt;
}
static void remove_compa_config (struct uae_prefs *prefs, int index)
{
- int typelist, *inputlist, *atp;
+ int typelist;
+ const int *atp;
+ int inputlist[MAX_COMPA_INPUTLIST];
- if (inputdevice_get_compatibility_input (prefs, index, &typelist, &inputlist, &atp) <= 0)
+ if (inputdevice_get_compatibility_input (prefs, index, &typelist, inputlist, &atp) <= 0)
return;
for (int i = 0; inputlist[i] >= 0; i++) {
int evtnum = inputlist[i];
struct inputevent *inputdevice_get_eventinfo (int evt)
{
+ if (evt > 0 && !events[evt].name)
+ return NULL;
return &events[evt];
}
ap->gfx_vflip = 1;
if (!i && ap->gfx_backbuffers == 2)
ap->gfx_vflip = 1;
- if (ap->gfx_vflip)
- ap->gfx_strobo = true;
+ if (ap->gfx_vflip) {
+ ap->gfx_strobo = prefs->lightboost_strobo;
+ }
} else {
// legacy vsync: always wait for flip
ap->gfx_vflip = -1;
if (prefs->gfx_api && ap->gfx_backbuffers < 1)
ap->gfx_backbuffers = 1;
if (ap->gfx_vflip)
- ap->gfx_strobo = true;
+ ap->gfx_strobo = prefs->lightboost_strobo;;
}
} else {
// no vsync: wait if triple bufferirng
bool gayleorfatgary;
need_hardreset = false;
+ rom_write_enabled = true;
/* Use changed_prefs, as m68k_reset is called later. */
if (last_address_space_24 != changed_prefs.address_space_24)
need_hardreset = true;
memcpy (currprefs.romfile, changed_prefs.romfile, sizeof currprefs.romfile);
memcpy (currprefs.romextfile, changed_prefs.romextfile, sizeof currprefs.romextfile);
need_hardreset = true;
- rom_write_enabled = true;
mapped_free (extendedkickmemory);
extendedkickmemory = 0;
extendedkickmem_size = 0;
#define MOVEC_DEBUG 0
#define MMUOP_DEBUG 2
#define DEBUG_CD32CDTVIO 0
-#define EXCEPTION3_DEBUG 1
+#define EXCEPTION3_DEBUGGER 0
#define CPUTRACE_DEBUG 0
#include "sysconfig.h"
last_writeaccess_for_exception_3 = writeaccess;
last_instructionaccess_for_exception_3 = instructionaccess;
Exception (3);
-#if EXCEPTION3_DEBUG
+#if EXCEPTION3_DEBUGGER
activate_debugger();
#endif
}
PCHAR rawdata;
if (rawinput_log & 4) {
uae_u8 *r = hid->bRawData;
- write_log (_T("%d %d %02x%02x%02x%02x%02x%02x%02x\n"), hid->dwCount, hid->dwSizeHid,
- r[0], r[1], r[2], r[3], r[4], r[5], r[6]);
+ write_log (_T("%d %d "), hid->dwCount, hid->dwSizeHid);
+ for (int i = 0; i < hid->dwSizeHid; i++)
+ write_log (_T("%02X"), r[i]);
+ write_log (_T("\n"));
}
for (num = 0; num < num_joystick; num++) {
did = &di_joystick[num];
#define IDC_INPUTMAP_TEST 1822
#define IDC_INPUTMAP_DELETEALL 1823
#define IDC_INPUTMAP_EXIT 1824
+#define IDC_INPUTMAPADD 1825
#define ID__FLOPPYDRIVES 40004
#define ID_FLOPPYDRIVES_DF0 40005
#define ID_ST_CONFIGURATION 40010
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 388
#define _APS_NEXT_COMMAND_VALUE 40050
-#define _APS_NEXT_CONTROL_VALUE 1820
+#define _APS_NEXT_CONTROL_VALUE 1826
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
CONTROL "Always center",IDC_RTG_CENTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,93,212,10
END
-IDD_INPUTMAP DIALOGEX 0, 0, 420, 318
+IDD_INPUTMAP DIALOGEX 0, 0, 421, 341
STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Input Remap"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
DEFPUSHBUTTON "OK",IDOK,147,51,58,14,NOT WS_VISIBLE
- CONTROL "",IDC_INPUTMAPLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,1,1,418,248
- EDITTEXT IDC_INPUTMAPOUT,1,253,418,14,ES_AUTOHSCROLL | ES_READONLY | WS_DISABLED
- EDITTEXT IDC_INPUTMAPOUTM,1,269,418,29,ES_MULTILINE | ES_READONLY | WS_DISABLED
- PUSHBUTTON "Remap",IDC_INPUTMAP_CAPTURE,72,300,66,14
- PUSHBUTTON "Add special",IDC_INPUTMAP_CUSTOM,142,300,66,14
- PUSHBUTTON "Delete",IDC_INPUTMAP_DELETE,212,300,66,14
- PUSHBUTTON "Delete all",IDC_INPUTMAP_DELETEALL,282,300,66,14
- PUSHBUTTON "Test",IDC_INPUTMAP_TEST,2,300,66,14
- PUSHBUTTON "Exit",IDC_INPUTMAP_EXIT,351,300,66,14
+ CONTROL "",IDC_INPUTMAPLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,1,1,418,257
+ EDITTEXT IDC_INPUTMAPOUT,1,261,418,14,ES_AUTOHSCROLL | ES_READONLY | WS_DISABLED
+ EDITTEXT IDC_INPUTMAPOUTM,1,277,418,29,ES_MULTILINE | ES_READONLY | WS_DISABLED
+ PUSHBUTTON "Remap",IDC_INPUTMAP_CAPTURE,86,324,80,14
+ PUSHBUTTON "Add",IDC_INPUTMAP_CUSTOM,351,308,66,14
+ PUSHBUTTON "Delete",IDC_INPUTMAP_DELETE,170,324,80,14
+ PUSHBUTTON "Delete all",IDC_INPUTMAP_DELETEALL,254,324,80,14
+ PUSHBUTTON "Test",IDC_INPUTMAP_TEST,2,324,80,14
+ PUSHBUTTON "Exit",IDC_INPUTMAP_EXIT,338,324,80,14
+ COMBOBOX IDC_INPUTMAPADD,2,309,345,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
END
IDD_INFOBOX DIALOGEX 0, 0, 420, 68
IDD_INPUTMAP, DIALOG
BEGIN
+ RIGHTMARGIN, 420
END
IDD_INFOBOX, DIALOG
int kb;
bool first = true;
TCHAR *p = out;
- int mode, *events, *axistable;
+ int mode;
+ const int *axistable;
+ int events[MAX_COMPA_INPUTLIST];
int max;
const TCHAR **eventorder;
- max = inputdevice_get_compatibility_input (&currprefs, inputmap_port, &mode, &events, &axistable);
+ max = inputdevice_get_compatibility_input (&currprefs, inputmap_port, &mode, events, &axistable);
if (max <= 0)
return false;
int port_insert_custom (int inputmap_port, int devicetype, DWORD flags, const TCHAR *custom)
{
const TCHAR *p = custom;
- int mode, *events, *axistable;
+ int mode;
+ const int *axistable;
+ int events[MAX_COMPA_INPUTLIST];
int max, evtnum;
int kb;
const TCHAR **eventorder;
- max = inputdevice_get_compatibility_input (&changed_prefs, inputmap_port, &mode, &events, &axistable);
+ max = inputdevice_get_compatibility_input (&changed_prefs, inputmap_port, &mode, events, &axistable);
eventorder = getcustomeventorder (&devicetype);
if (!eventorder)
inputdevice_copyconfig (&currprefs, &changed_prefs);
inputdevice_compa_prepare_custom (&changed_prefs, inputmap_port, devicetype, true);
inputdevice_updateconfig (NULL, &changed_prefs);
- max = inputdevice_get_compatibility_input (&changed_prefs, inputmap_port, &mode, &events, &axistable);
+ max = inputdevice_get_compatibility_input (&changed_prefs, inputmap_port, &mode, events, &axistable);
write_log (_T("custom='%s' max=%d port=%d dt=%d kb=%d kbnum=%d\n"), custom, max, inputmap_port, devicetype, kb, inputdevice_get_device_total (IDTYPE_KEYBOARD));
if (max <= 0)
return FALSE;
#define LANG_DLL 1
#if WINUAEPUBLICBETA
-#define WINUAEBETA _T("10")
+#define WINUAEBETA _T("11")
#else
#define WINUAEBETA _T("")
#endif
-#define WINUAEDATE MAKEBD(2013, 3, 9)
+#define WINUAEDATE MAKEBD(2013, 3, 16)
#define WINUAEEXTRA _T("")
//#define WINUAEEXTRA _T("AmiKit Preview")
#define WINUAEREV _T("")
#endif
c |= currprefs.gfx_autoresolution != changed_prefs.gfx_autoresolution ? (2|8|16) : 0;
c |= currprefs.gfx_api != changed_prefs.gfx_api ? (1|8|32) : 0;
+ c |= currprefs.lightboost_strobo != changed_prefs.lightboost_strobo ? (2|16) : 0;
for (int i = 0; i < 2 * MAX_FILTERSHADERS; i++) {
c |= _tcscmp (currprefs.gfx_filtershader[i], changed_prefs.gfx_filtershader[i]) ? (2|8) : 0;
currprefs.gfx_autoresolution = changed_prefs.gfx_autoresolution;
currprefs.color_mode = changed_prefs.color_mode;
currprefs.gfx_api = changed_prefs.gfx_api;
+ currprefs.lightboost_strobo = changed_prefs.lightboost_strobo;
if (changed_prefs.gfx_apmode[0].gfx_fullscreen == GFX_FULLSCREEN) {
if (currprefs.gfx_api != changed_prefs.gfx_api)
}
static int inputmap_port = -1, inputmap_port_remap = -1;
-static int inputmap_groupindex[32];
+static int inputmap_groupindex[MAX_COMPA_INPUTLIST + 1];
static int inputmap_handle (HWND list, int currentdevnum, int currentwidgetnum, int *inputmap_portp, int *inputmap_indexp, int state, int *inputmap_itemindexp, int deleteindex)
{
int cntitem, cntgroup, portnum;
- int mode, *events, *axistable;
+ int mode;
+ const int *axistable;
bool found2 = false;
for (portnum = 0; portnum < 4; portnum++) {
portnum = inputmap_port;
cntitem = 1;
cntgroup = 1;
- if (inputdevice_get_compatibility_input (&workprefs, portnum, &mode, &events, &axistable) > 0) {
+ int events[MAX_COMPA_INPUTLIST];
+ if (inputdevice_get_compatibility_input (&workprefs, portnum, &mode, events, &axistable) > 0) {
int evtnum;
for (int i = 0; (evtnum = events[i]) >= 0; i++) {
struct inputevent *evt = inputdevice_get_eventinfo (evtnum);
- LV_ITEM lvstruct;
+ LV_ITEM lvstruct = { 0 };
int devnum;
int status;
TCHAR name[256];
- int *atp = axistable;
+ const int *atp = axistable;
int atpidx;
int item;
bool found = false;
uae_u64 flags;
if (list) {
- LVGROUP group;
+ LVGROUP group = { 0 };
group.cbSize = sizeof (LVGROUP);
group.mask = LVGF_HEADER | LVGF_GROUPID;
group.pszHeader = (TCHAR*)evt->name;
lvstruct.lParam = 0;
lvstruct.iSubItem = 0;
lvstruct.iGroupId = cntgroup;
- if (inputmap_itemindexp)
+ if (inputmap_itemindexp) {
inputmap_itemindexp[cntgroup - 1] = -1;
- inputmap_itemindexp[cntgroup + 1 - 1] = -1;
+ inputmap_itemindexp[cntgroup - 1 + 1] = -1;
+ }
}
atpidx = 0;
for (int j = 0; j < inputdevice_get_widget_num (devnum); j++) {
for (int sub = 0; sub < MAX_INPUT_SUB_EVENT; sub++) {
int port;
- if (inputdevice_get_mapping (devnum, j, &flags, &port, NULL, NULL, sub) == evtnum) {
- if (!port)
+ int evtnum2 = inputdevice_get_mapping (devnum, j, &flags, &port, NULL, NULL, sub);
+ if (evtnum2 == evtnum) {
+ if (port - 1 != portnum)
continue;
if (cntitem - 1 == deleteindex) {
inputdevice_set_mapping (devnum, j, NULL, NULL, 0, 0, sub);
deleteindex = -1;
continue;
}
- inputdevice_get_widget_type (devnum, j, name);
if (list) {
+ inputdevice_get_widget_type (devnum, j, name);
TCHAR target[MAX_DPATH];
_tcscpy (target, name);
_tcscat (target, _T(", "));
{ 0, 0, _T("Start mouse uncaptured"), &workprefs.win32_start_uncaptured },
{ 0, 0, _T("Start minimized"), &workprefs.win32_start_minimized },
{ 0, 1, _T("Minimize when focus is lost"), &workprefs.win32_minimize_inactive },
-
+ { 0, 1, _T("100/120Hz VSync black frame insertion"), &workprefs.lightboost_strobo },
{ 0, NULL }
};
if (lv_type != LV_MISC1)
flags |= LVS_EX_ONECLICKACTIVATE | LVS_EX_UNDERLINEHOT | LVS_EX_FULLROWSELECT;
ListView_SetExtendedListViewStyleEx (list, flags , flags);
+ ListView_RemoveAllGroups (list);
ListView_DeleteAllItems (list);
cachedlist = list;
{
TCHAR custom1[MAX_DPATH];
uae_u64 flags;
+ int port;
custom1[0] = 0;
inputdevice_get_mapping (input_selected_device, input_selected_widget,
- &flags, NULL, NULL, custom1, input_selected_sub_num);
+ &flags, &port, NULL, custom1, input_selected_sub_num);
if (_tcslen (custom1) > 0 || newcustom) {
if (askinputcustom (hDlg, custom1, sizeof custom1 / sizeof (TCHAR), IDS_SB_CUSTOMEVENT)) {
if (custom1[0])
inputdevice_set_mapping (input_selected_device, input_selected_widget,
- NULL, custom1, flags, -1, input_selected_sub_num);
+ NULL, custom1, flags, port, input_selected_sub_num);
}
}
}
static void input_find (HWND hDlg, HWND mainDlg, int mode, int set, bool oneshot);
static int rawmode;
static int inputmap_remap_counter, inputmap_view_offset;
+static int inputmap_remap_event;
static int inputmap_mode_cnt;
static bool inputmap_oneshot;
return;
if (pages[INPUTMAP_ID]) {
- inputmap = inputmap_remap_counter >= 0 ? 1 : 2;
+ inputmap = inputmap_remap_counter >= 0 ? 1 : (inputmap_remap_counter == -1 ? 2 : 3);
setfocus (hDlg, IDC_INPUTMAPLIST);
myDlg = hDlg;
} else {
input_selected_widget = wtype;
int type = inputdevice_get_widget_type (input_selected_device, input_selected_widget, NULL);
- if (inputmap == 1) { // ports panel / remap
+ if (inputmap == 3) { // ports panel / add custom
+ int mode;
+ const int *axistable;
+ int events[MAX_COMPA_INPUTLIST];
+
+ int max = inputdevice_get_compatibility_input (&workprefs, inputmap_port, &mode, events, &axistable);
+ if (max < MAX_COMPA_INPUTLIST - 1) {
+ if (inputmap_remap_event > 0)
+ inputdevice_set_gameports_mapping (&workprefs, input_selected_device, input_selected_widget, inputmap_remap_event, 0, inputmap_port);
+ }
+ inputmap_remap_event = 0;
+ InitializeListView (myDlg);
+ input_find (hDlg, myDlg, 0, FALSE, false);
+ return;
+
+ } else if (inputmap == 1) { // ports panel / remap
static int skipbuttonaxis;
static int prevtype2, prevtype, prevwidget, prevevtnum, prevaxisevent, prevaxisstate;
int widgets[10], widgetstate[10];
int wcnt, found, axisevent, axisstate;
HWND h = GetDlgItem (hDlg, IDC_INPUTMAPLIST);
- int mode, *events, *axistable, *axistable2;
+ int mode;
+ const int *axistable, *axistable2;
+ int events[MAX_COMPA_INPUTLIST];
- int max = inputdevice_get_compatibility_input (&workprefs, inputmap_port, &mode, &events, &axistable);
+ int max = inputdevice_get_compatibility_input (&workprefs, inputmap_port, &mode, events, &axistable);
int evtnum = events[inputmap_remap_counter];
int type2 = intputdevice_compa_get_eventtype (evtnum, &axistable2);
IDC_INPUTCOPY, 0, 0, IDC_INPUTCOPYFROM, 0, 0, IDC_INPUTSWAP, 0, 0,
IDC_INPUTDEADZONE, 0, 0, IDC_INPUTSPEEDD, 0, 0, IDC_INPUTAUTOFIRERATE, 0, 0, IDC_INPUTSPEEDA, 0, 0,
IDC_PANELTREE, 1, 0, IDC_RESETAMIGA, 1, 0, IDC_QUITEMU, 1, 0, IDC_RESTARTEMU, 1, 0, IDOK, 1, 0, IDCANCEL, 1, 0, IDHELP, 1, 0,
+ -1
+};
+static int rawdisable2[] = {
IDC_INPUTMAP_DELETE, 0, 0, IDC_INPUTMAP_CAPTURE, 0, 0, IDC_INPUTMAP_CUSTOM, 0, 0,
IDC_INPUTMAP_TEST, 0, 0, IDC_INPUTMAP_DELETEALL, 0, 0, IDC_INPUTMAP_EXIT, 0, 0,
-1
static void inputmap_disable (HWND hDlg, bool disable)
{
- for (int i = 0; rawdisable[i] >= 0; i += 3) {
- HWND w = GetDlgItem (rawdisable[i + 1] ? guiDlg : hDlg, rawdisable[i]);
+ int *p = pages[INPUTMAP_ID] ? rawdisable2 : rawdisable;
+ for (int i = 0; p[i] >= 0; i += 3) {
+ HWND w = GetDlgItem (p[i + 1] ? guiDlg : hDlg, p[i]);
if (w) {
if (disable) {
- rawdisable[i + 2] = IsWindowEnabled (w);
+ p[i + 2] = IsWindowEnabled (w);
EnableWindow (w, FALSE);
} else {
- EnableWindow (w, rawdisable[i + 2]);
+ EnableWindow (w, p[i + 2]);
}
}
}
static int recursive;
static int inputmap_selected;
HWND h = GetDlgItem (hDlg, IDC_INPUTMAPLIST);
+ TCHAR tmp[256];
+ int i;
switch (msg)
{
return TRUE;
case WM_INITDIALOG:
{
+ const int *axislist;
inputmap_port_remap = -1;
inputmap_remap_counter = -1;
inputmap_view_offset = 0;
pages[INPUTMAP_ID] = hDlg;
+
+ inputdevice_get_compatibility_input (&workprefs, inputmap_port, NULL, NULL, &axislist);
+ SendDlgItemMessage (hDlg, IDC_INPUTMAPADD, CB_RESETCONTENT, 0, 0L);
+ SendDlgItemMessage (hDlg, IDC_INPUTMAPADD, CB_ADDSTRING, 0, (LPARAM)szNone.c_str());
+ i = 1;
+ for (;;) {
+ int j;
+ struct inputevent *ie = inputdevice_get_eventinfo (i);
+ if (!ie)
+ break;
+ for (j = 0; axislist[j] >= 0; j++) {
+ if (axislist[j] == i)
+ break;
+ }
+ if (axislist[j] < 0 && _tcslen (ie->name) > 0)
+ SendDlgItemMessage (hDlg, IDC_INPUTMAPADD, CB_ADDSTRING, 0, (LPARAM)ie->name);
+ i++;
+ }
+
inputdevice_updateconfig (NULL, &workprefs);
InitializeListView (hDlg);
if (workprefs.jports[inputmap_port].id != JPORT_CUSTOM) {
case IDC_INPUTMAP_EXIT:
pages[INPUTMAP_ID] = NULL;
DestroyWindow (hDlg);
- //EndDialog (hDlg, 0);
break;
case IDC_INPUTMAP_TEST:
inputmap_port_remap = -1;
input_find (hDlg, hDlg, 1, true, false);
break;
case IDC_INPUTMAP_CUSTOM:
+ if (workprefs.jports[inputmap_port].id == JPORT_CUSTOM) {
+ tmp[0] = 0;
+ SendDlgItemMessage (hDlg, IDC_INPUTMAPADD, WM_GETTEXT, (WPARAM)sizeof tmp / sizeof (TCHAR), (LPARAM)tmp);
+ i = 1;
+ for (;;) {
+ struct inputevent *ie = inputdevice_get_eventinfo (i);
+ if (!ie)
+ break;
+ if (_tcslen (ie->name) > 0 && !_tcsicmp (tmp, ie->name)) {
+ inputmap_remap_counter = -2;
+ inputmap_remap_event = i;
+ inputmap_port_remap = inputmap_port;
+ input_find (hDlg, hDlg, 1, true, false);
+ break;
+ }
+ i++;
+ }
+ }
break;
case IDC_INPUTMAP_DELETE:
if (workprefs.jports[inputmap_port].id == JPORT_CUSTOM) {
return;
MSG msg;
for (;;) {
- DWORD ret = GetMessage (&msg, dlg, 0, 0);
+ DWORD ret = GetMessage (&msg, NULL, 0, 0);
if (ret == -1 || ret == 0)
break;
if (rawmode) {
- restore only single input target to default.
+Beta 11:
+
+- Blank left and right border if programmed mode and part of original borders would be outside of programmed hsync start and end period.
+- Address error exception always started debugger, forgotten debug option disabled.
+- Added Ts debugger command, list all exec residents.
+- Restoring state file with harddrives crashed in some situations. (broke with previous filesystem updates)
+- CD32 TOC entries were transmitted too quickly due to missing check, correct speed would have been one entry per CD frame (75/sec),
+ not one entry per scanline. CD command buffer overflowed and driver detected CD as broken if CD had enough tracks.
+ Old bug, was mostly invisible until 2.5.0 Universe TOC fix. (Super Street Fighter II Turbo and others CDs with lots of tracks)
+- IDE emulation ignored optional forced physical cylinder number setting in config file.
+- Both hires and superhires bits in BPLCON0 set: superhires mode active.
+- 100Hz+ black frame insertion is now optional, setting in Misc panel. (Still D3D/low latency vsync only)
+- GamePorts panel test/remap improved
+ - Implemented custom event add option. Select event from select box and click "Add", then press any button/key/etc to map it.
+ - Added event will be automatically removed if it does not have any mapped events (Works differently than normal events)
+ - Loading config file that has GamePorts panel custom added events using older version is not supported.
+
Beta 10:
- SCSI CD MODE SENSE emulation fixes.