char *tmp1, *tmp2;
int utf8;
+ if (value == NULL)
+ return;
utf8 = 0;
tmp1 = ua (value);
tmp2 = uutf8 (value);
cfgfile_dwrite_bool (f, _T("native_code"), p->native_code);
cfgfile_write (f, _T("gfx_display"), _T("%d"), p->gfx_apmode[APMODE_NATIVE].gfx_display);
- cfgfile_dwrite_str (f, _T("gfx_display_name"), p->gfx_apmode[APMODE_NATIVE].gfx_display_name);
- if (p->gfx_apmode[APMODE_NATIVE].gfx_display != p->gfx_apmode[APMODE_RTG].gfx_display || p->gfx_apmode[APMODE_RTG].gfx_display_name[0]) {
+ cfgfile_write_str (f, _T("gfx_display_name"), target_get_display_name (p->gfx_apmode[APMODE_NATIVE].gfx_display));
+ if (p->gfx_apmode[APMODE_NATIVE].gfx_display != p->gfx_apmode[APMODE_RTG].gfx_display) {
cfgfile_write (f, _T("gfx_display_rtg"), _T("%d"), p->gfx_apmode[APMODE_RTG].gfx_display);
- cfgfile_dwrite_str (f, _T("gfx_display_name_rtg"), p->gfx_apmode[APMODE_RTG].gfx_display_name);
+ cfgfile_write_str (f, _T("gfx_display_name_rtg"), target_get_display_name (p->gfx_apmode[APMODE_RTG].gfx_display));
}
cfgfile_write (f, _T("gfx_framerate"), _T("%d"), p->gfx_framerate);
cfgfile_write (f, _T("gfx_width"), _T("%d"), p->gfx_size_win.width); /* compatibility with old versions */
if (cfgfile_intval (option, value, _T("gfx_display_rtg"), &p->gfx_apmode[APMODE_RTG].gfx_display, 1)) {
return 1;
}
- if (cfgfile_string (option, value, _T("gfx_display_name"), p->gfx_apmode[APMODE_NATIVE].gfx_display_name, sizeof p->gfx_apmode[APMODE_NATIVE].gfx_display_name / sizeof (TCHAR))) {
- _tcscpy (p->gfx_apmode[APMODE_RTG].gfx_display_name, p->gfx_apmode[APMODE_NATIVE].gfx_display_name);
+ if (_tcscmp (option, _T("gfx_display_name")) == 0) {
+ TCHAR tmp[MAX_DPATH];
+ if (cfgfile_string (option, value, _T("gfx_display_name"), tmp, sizeof tmp / sizeof (TCHAR))) {
+ int num = target_get_display (tmp);
+ if (num >= 0)
+ p->gfx_apmode[APMODE_RTG].gfx_display = p->gfx_apmode[APMODE_NATIVE].gfx_display = num;
+ }
return 1;
}
- if (cfgfile_string (option, value, _T("gfx_display_name_rtg"), p->gfx_apmode[APMODE_RTG].gfx_display_name, sizeof p->gfx_apmode[APMODE_RTG].gfx_display_name / sizeof (TCHAR))) {
+ if (_tcscmp (option, _T("gfx_display_name_rtg")) == 0) {
+ TCHAR tmp[MAX_DPATH];
+ if (cfgfile_string (option, value, _T("gfx_display_name_rtg"), tmp, sizeof tmp / sizeof (TCHAR))) {
+ int num = target_get_display (tmp);
+ if (num >= 0)
+ p->gfx_apmode[APMODE_RTG].gfx_display = num;
+ }
return 1;
}
p->custom_memory_sizes[num] = size;
}
+static int cfgfile_parse_newfilesys (struct uae_prefs *p, int nr, bool hdf, TCHAR *value)
+{
+ int secs, heads, reserved, bs, bp, hdcv;
+ bool ro;
+ TCHAR *dname = NULL, *aname = _T(""), *root = NULL, *fs = NULL, *hdc;
+ TCHAR *tmpp = _tcschr (value, ',');
+ TCHAR *str = NULL;
+
+ config_newfilesystem = 1;
+ if (tmpp == 0)
+ goto invalid_fs;
+
+ *tmpp++ = '\0';
+ if (strcasecmp (value, _T("ro")) == 0)
+ ro = true;
+ else if (strcasecmp (value, _T("rw")) == 0)
+ ro = false;
+ else
+ goto invalid_fs;
+ secs = 0; heads = 0; reserved = 0; bs = 0; bp = 0;
+ fs = 0; hdc = 0; hdcv = 0;
+
+ value = tmpp;
+ if (!hdf) {
+ tmpp = _tcschr (value, ':');
+ if (tmpp == 0)
+ goto empty_fs;
+ *tmpp++ = 0;
+ dname = value;
+ aname = tmpp;
+ tmpp = _tcschr (tmpp, ':');
+ if (tmpp == 0)
+ goto empty_fs;
+ *tmpp++ = 0;
+ root = tmpp;
+ tmpp = _tcschr (tmpp, ',');
+ if (tmpp == 0)
+ goto empty_fs;
+ *tmpp++ = 0;
+ if (! getintval (&tmpp, &bp, 0))
+ goto empty_fs;
+ } else {
+ tmpp = _tcschr (value, ':');
+ if (tmpp == 0)
+ goto invalid_fs;
+ *tmpp++ = '\0';
+ dname = value;
+ root = tmpp;
+ tmpp = _tcschr (tmpp, ',');
+ if (tmpp == 0)
+ goto invalid_fs;
+ *tmpp++ = 0;
+ aname = 0;
+ if (! getintval (&tmpp, &secs, ',')
+ || ! getintval (&tmpp, &heads, ',')
+ || ! getintval (&tmpp, &reserved, ',')
+ || ! getintval (&tmpp, &bs, ','))
+ goto invalid_fs;
+ if (getintval2 (&tmpp, &bp, ',')) {
+ fs = tmpp;
+ tmpp = _tcschr (tmpp, ',');
+ if (tmpp != 0) {
+ *tmpp++ = 0;
+ hdc = tmpp;
+ if(_tcslen (hdc) >= 4 && !_tcsncmp (hdc, _T("ide"), 3)) {
+ hdcv = hdc[3] - '0' + HD_CONTROLLER_IDE0;
+ if (hdcv < HD_CONTROLLER_IDE0 || hdcv > HD_CONTROLLER_IDE3)
+ hdcv = 0;
+ }
+ if(_tcslen (hdc) >= 5 && !_tcsncmp (hdc, _T("scsi"), 4)) {
+ hdcv = hdc[4] - '0' + HD_CONTROLLER_SCSI0;
+ if (hdcv < HD_CONTROLLER_SCSI0 || hdcv > HD_CONTROLLER_SCSI6)
+ hdcv = 0;
+ }
+ if (_tcslen (hdc) >= 6 && !_tcsncmp (hdc, _T("scsram"), 6))
+ hdcv = HD_CONTROLLER_PCMCIA_SRAM;
+ if (_tcslen (hdc) >= 5 && !_tcsncmp (hdc, _T("scide"), 6))
+ hdcv = HD_CONTROLLER_PCMCIA_IDE;
+ }
+ }
+ }
+empty_fs:
+ if (root) {
+ if (_tcslen (root) > 3 && root[0] == 'H' && root[1] == 'D' && root[2] == '_') {
+ root += 2;
+ *root = ':';
+ }
+ str = cfgfile_subst_path_load (UNEXPANDED, &p->path_hardfile, root, false);
+ }
+#ifdef FILESYS
+ add_filesys_config (p, nr, dname, aname, str, ro, secs, heads, reserved, bs, bp, fs, hdcv, 0);
+#endif
+ xfree (str);
+ return 1;
+
+invalid_fs:
+ write_log (_T("Invalid filesystem/hardfile specification.\n"));
+ return 1;
+}
+
+static int cfgfile_parse_filesys (struct uae_prefs *p, const TCHAR *option, TCHAR *value)
+{
+ int i;
+
+ for (i = 0; i < MAX_FILESYSTEM_UNITS; i++) {
+ TCHAR tmp[100];
+ _stprintf (tmp, _T("uaehf%d"), i);
+ if (_tcscmp (option, tmp) == 0) {
+ for (;;) {
+ bool hdf = false;
+ TCHAR *tmpp = _tcschr (value, ',');
+ if (tmpp == NULL)
+ return 1;
+ *tmpp++ = 0;
+ if (strcasecmp (value, _T("hdf")) == 0) {
+ hdf = true;
+ } else if (strcasecmp (value, _T("dir")) != 0) {
+ return 1;
+ }
+#if 0 // not yet
+ return cfgfile_parse_newfilesys (p, i, hdf, tmpp);
+#else
+ return 1;
+#endif
+ }
+ return 1;
+ }
+ }
+
+ if (_tcscmp (option, _T("filesystem")) == 0
+ || _tcscmp (option, _T("hardfile")) == 0)
+ {
+ int secs, heads, reserved, bs;
+ bool ro;
+ TCHAR *aname, *root;
+ TCHAR *tmpp = _tcschr (value, ',');
+ TCHAR *str;
+
+ if (config_newfilesystem)
+ return 1;
+
+ if (tmpp == 0)
+ goto invalid_fs;
+
+ *tmpp++ = '\0';
+ if (_tcscmp (value, _T("1")) == 0 || strcasecmp (value, _T("ro")) == 0
+ || strcasecmp (value, _T("readonly")) == 0
+ || strcasecmp (value, _T("read-only")) == 0)
+ ro = true;
+ else if (_tcscmp (value, _T("0")) == 0 || strcasecmp (value, _T("rw")) == 0
+ || strcasecmp (value, _T("readwrite")) == 0
+ || strcasecmp (value, _T("read-write")) == 0)
+ ro = false;
+ else
+ goto invalid_fs;
+ secs = 0; heads = 0; reserved = 0; bs = 0;
+
+ value = tmpp;
+ if (_tcscmp (option, _T("filesystem")) == 0) {
+ tmpp = _tcschr (value, ':');
+ if (tmpp == 0)
+ goto invalid_fs;
+ *tmpp++ = '\0';
+ aname = value;
+ root = tmpp;
+ } else {
+ if (! getintval (&value, &secs, ',')
+ || ! getintval (&value, &heads, ',')
+ || ! getintval (&value, &reserved, ',')
+ || ! getintval (&value, &bs, ','))
+ goto invalid_fs;
+ root = value;
+ aname = 0;
+ }
+ str = cfgfile_subst_path_load (UNEXPANDED, &p->path_hardfile, root, true);
+#ifdef FILESYS
+ add_filesys_config (p, -1, NULL, aname, str, ro, secs, heads, reserved, bs, 0, NULL, 0, 0);
+#endif
+ free (str);
+ return 1;
+invalid_fs:
+ write_log (_T("Invalid filesystem/hardfile specification.\n"));
+ return 1;
+
+ }
+
+ if (_tcscmp (option, _T("filesystem2")) == 0)
+ return cfgfile_parse_newfilesys (p, -1, false, value);
+ if (_tcscmp (option, _T("hardfile2")) == 0)
+ return cfgfile_parse_newfilesys (p, -1, true, value);
+
+ return 0;
+}
+
static int cfgfile_parse_hardware (struct uae_prefs *p, const TCHAR *option, TCHAR *value)
{
int tmpval, dummyint, i;
return 1;
}
- for (i = 0; i < MAX_FILESYSTEM_UNITS; i++) {
- TCHAR tmp[100];
- _stprintf (tmp, _T("uaehf%d"), i);
- if (_tcscmp (option, tmp) == 0)
- return 1;
- }
-
- if (_tcscmp (option, _T("filesystem")) == 0
- || _tcscmp (option, _T("hardfile")) == 0)
- {
- int secs, heads, reserved, bs;
- bool ro;
- TCHAR *aname, *root;
- TCHAR *tmpp = _tcschr (value, ',');
- TCHAR *str;
-
- if (config_newfilesystem)
- return 1;
-
- if (tmpp == 0)
- goto invalid_fs;
-
- *tmpp++ = '\0';
- if (_tcscmp (value, _T("1")) == 0 || strcasecmp (value, _T("ro")) == 0
- || strcasecmp (value, _T("readonly")) == 0
- || strcasecmp (value, _T("read-only")) == 0)
- ro = true;
- else if (_tcscmp (value, _T("0")) == 0 || strcasecmp (value, _T("rw")) == 0
- || strcasecmp (value, _T("readwrite")) == 0
- || strcasecmp (value, _T("read-write")) == 0)
- ro = false;
- else
- goto invalid_fs;
- secs = 0; heads = 0; reserved = 0; bs = 0;
-
- value = tmpp;
- if (_tcscmp (option, _T("filesystem")) == 0) {
- tmpp = _tcschr (value, ':');
- if (tmpp == 0)
- goto invalid_fs;
- *tmpp++ = '\0';
- aname = value;
- root = tmpp;
- } else {
- if (! getintval (&value, &secs, ',')
- || ! getintval (&value, &heads, ',')
- || ! getintval (&value, &reserved, ',')
- || ! getintval (&value, &bs, ','))
- goto invalid_fs;
- root = value;
- aname = 0;
- }
- str = cfgfile_subst_path_load (UNEXPANDED, &p->path_hardfile, root, true);
-#ifdef FILESYS
- add_filesys_config (p, -1, NULL, aname, str, ro, secs, heads, reserved, bs, 0, NULL, 0, 0);
-#endif
- free (str);
- return 1;
-
- }
-
- if (_tcscmp (option, _T("filesystem2")) == 0
- || _tcscmp (option, _T("hardfile2")) == 0)
- {
- int secs, heads, reserved, bs, bp, hdcv;
- bool ro;
- TCHAR *dname = NULL, *aname = _T(""), *root = NULL, *fs = NULL, *hdc;
- TCHAR *tmpp = _tcschr (value, ',');
- TCHAR *str = NULL;
-
- config_newfilesystem = 1;
- if (tmpp == 0)
- goto invalid_fs;
-
- *tmpp++ = '\0';
- if (strcasecmp (value, _T("ro")) == 0)
- ro = true;
- else if (strcasecmp (value, _T("rw")) == 0)
- ro = false;
- else
- goto invalid_fs;
- secs = 0; heads = 0; reserved = 0; bs = 0; bp = 0;
- fs = 0; hdc = 0; hdcv = 0;
-
- value = tmpp;
- if (_tcscmp (option, _T("filesystem2")) == 0) {
- tmpp = _tcschr (value, ':');
- if (tmpp == 0)
- goto empty_fs;
- *tmpp++ = 0;
- dname = value;
- aname = tmpp;
- tmpp = _tcschr (tmpp, ':');
- if (tmpp == 0)
- goto empty_fs;
- *tmpp++ = 0;
- root = tmpp;
- tmpp = _tcschr (tmpp, ',');
- if (tmpp == 0)
- goto empty_fs;
- *tmpp++ = 0;
- if (! getintval (&tmpp, &bp, 0))
- goto empty_fs;
- } else {
- tmpp = _tcschr (value, ':');
- if (tmpp == 0)
- goto invalid_fs;
- *tmpp++ = '\0';
- dname = value;
- root = tmpp;
- tmpp = _tcschr (tmpp, ',');
- if (tmpp == 0)
- goto invalid_fs;
- *tmpp++ = 0;
- aname = 0;
- if (! getintval (&tmpp, &secs, ',')
- || ! getintval (&tmpp, &heads, ',')
- || ! getintval (&tmpp, &reserved, ',')
- || ! getintval (&tmpp, &bs, ','))
- goto invalid_fs;
- if (getintval2 (&tmpp, &bp, ',')) {
- fs = tmpp;
- tmpp = _tcschr (tmpp, ',');
- if (tmpp != 0) {
- *tmpp++ = 0;
- hdc = tmpp;
- if(_tcslen (hdc) >= 4 && !_tcsncmp (hdc, _T("ide"), 3)) {
- hdcv = hdc[3] - '0' + HD_CONTROLLER_IDE0;
- if (hdcv < HD_CONTROLLER_IDE0 || hdcv > HD_CONTROLLER_IDE3)
- hdcv = 0;
- }
- if(_tcslen (hdc) >= 5 && !_tcsncmp (hdc, _T("scsi"), 4)) {
- hdcv = hdc[4] - '0' + HD_CONTROLLER_SCSI0;
- if (hdcv < HD_CONTROLLER_SCSI0 || hdcv > HD_CONTROLLER_SCSI6)
- hdcv = 0;
- }
- if (_tcslen (hdc) >= 6 && !_tcsncmp (hdc, _T("scsram"), 6))
- hdcv = HD_CONTROLLER_PCMCIA_SRAM;
- if (_tcslen (hdc) >= 5 && !_tcsncmp (hdc, _T("scide"), 6))
- hdcv = HD_CONTROLLER_PCMCIA_IDE;
- }
- }
- }
-empty_fs:
- if (root) {
- if (_tcslen (root) > 3 && root[0] == 'H' && root[1] == 'D' && root[2] == '_') {
- root += 2;
- *root = ':';
- }
- str = cfgfile_subst_path_load (UNEXPANDED, &p->path_hardfile, root, false);
- }
-#ifdef FILESYS
- add_filesys_config (p, -1, dname, aname, str, ro, secs, heads, reserved, bs, bp, fs, hdcv, 0);
-#endif
- xfree (str);
- return 1;
-
-invalid_fs:
- write_log (_T("Invalid filesystem/hardfile specification.\n"));
+ if (cfgfile_parse_filesys (p, option, value))
return 1;
- }
return 0;
}
if (cfgfile_parse_host (p, option, value))
return 1;
}
- if (type > 0)
+ if (type > 0 && (type & (CONFIG_TYPE_HARDWARE | CONFIG_TYPE_HOST)) != (CONFIG_TYPE_HARDWARE | CONFIG_TYPE_HOST))
return 1;
return 0;
}
int hsyncendpos, hsyncstartpos;
static int maxvpos_total = 511;
int minfirstline = VBLANK_ENDLINE_PAL;
-int equ_vblank_endline = EQU_ENDLINE_PAL;
+static int equ_vblank_endline = EQU_ENDLINE_PAL;
+static bool equ_vblank_toggle = true;
double vblank_hz = VBLANK_HZ_PAL, fake_vblank_hz, vblank_hz_stored;
static int vblank_hz_mult, vblank_hz_state;
static struct chipset_refresh *stored_chipset_refresh;
remember_ctable ();
}
+STATIC_INLINE int get_equ_vblank_endline (void)
+{
+ return equ_vblank_endline + (equ_vblank_toggle ? (lof_current ? 1 : 0) : 0);
+}
+
/* Called to determine the state of the horizontal display window state
* machine at the current position. It might have changed since we last
* checked. */
*/
int hdiw = hpos >= maxhpos ? maxhpos * 2 + 1 : hpos * 2 + 2;
- if (!(currprefs.chipset_mask & CSMASK_ECS_DENISE) && vpos <= equ_vblank_endline) {
+ if (!(currprefs.chipset_mask & CSMASK_ECS_DENISE) && vpos <= get_equ_vblank_endline ()) {
hdiw = diw_hcounter;
hdiw &= 511;
}
ddf_change = vpos;
}
-static void BPLCON0_Denise (int hpos, uae_u16 v);
+static void BPLCON0_Denise (int hpos, uae_u16 v, bool);
// writing to BPLCON0 adds 4 cycle delay before Agnus bitplane DMA sequence changes
// (Note that Denise sees the change after 1 cycle)
switch (bpldmasetupphase)
{
case 0:
- BPLCON0_Denise (hpos, bplcon0);
+ BPLCON0_Denise (hpos, bplcon0, false);
bpldmasetupphase++;
bpldmasetuphpos += BPLCON_AGNUS_DELAY - BPLCON_DENISE_DELAY;
break;
hposa = hpos + BPLCON_AGNUS_DELAY;
ddf_change = vpos;
if (hposa < 0x14) {
- BPLCON0_Denise (hpos, bplcon0);
+ BPLCON0_Denise (hpos, bplcon0, false);
setup_fmodes (hpos);
return;
}
next_color_change += (HBLANK_OFFSET + 1) / 2;
diw_hcounter += maxhpos * 2;
- if (!(currprefs.chipset_mask & CSMASK_ECS_DENISE) && vpos == equ_vblank_endline - 1)
+ if (!(currprefs.chipset_mask & CSMASK_ECS_DENISE) && vpos == get_equ_vblank_endline () - 1)
diw_hcounter++;
- if ((currprefs.chipset_mask & CSMASK_ECS_DENISE) || vpos > equ_vblank_endline || (currprefs.cs_dipagnus && vpos == 0)) {
+ if ((currprefs.chipset_mask & CSMASK_ECS_DENISE) || vpos > get_equ_vblank_endline () || (currprefs.cs_dipagnus && vpos == 0)) {
diw_hcounter = maxhpos * 2;
last_hdiw = 2 - 1;
}
bplcon1_hpos = -1;
if (bpldmasetuphpos >= 0) {
// this can happen in "too fast" modes
- BPLCON0_Denise (0, bplcon0);
+ BPLCON0_Denise (0, bplcon0, true);
setup_fmodes (0);
}
bpldmasetuphpos = -1;
vblank_hz, vblank_hz * maxvpos_nom,
maxhpos, maxvpos, lof_store ? 1 : 0,
cr ? cr->index : -1,
- cr != NULL && cr->label != NULL ? cr->label : _T("<unknown>")
+ cr != NULL && cr->label != NULL ? cr->label : _T("<?>")
);
config_changed = 1;
vblank_hz = VBLANK_HZ_PAL;
sprite_vblank_endline = VBLANK_SPRITE_PAL;
equ_vblank_endline = EQU_ENDLINE_PAL;
+ equ_vblank_toggle = true;
} else {
maxvpos = MAXVPOS_NTSC;
maxhpos = MAXHPOS_NTSC;
vblank_hz = VBLANK_HZ_NTSC;
sprite_vblank_endline = VBLANK_SPRITE_NTSC;
equ_vblank_endline = EQU_ENDLINE_NTSC;
+ equ_vblank_toggle = false;
}
maxvpos_nom = maxvpos;
if (vpos_count > 0) {
dmacon &= 0x1FFF;
changed = dmacon ^ oldcon;
-
+#if 0
+ if (changed)
+ write_log (L"%04x -> %04x %08x\n", oldcon, dmacon, m68k_getpc ());
+#endif
oldcop = (oldcon & DMA_COPPER) && (oldcon & DMA_MASTER);
newcop = (dmacon & DMA_COPPER) && (dmacon & DMA_MASTER);
//write_log (_T("%d:%d:BPL%dPTL %08X COP=%08x\n"), hpos, vpos, num, bplpt[num], cop_state.ip);
}
-static void BPLCON0_Denise (int hpos, uae_u16 v)
+static void BPLCON0_Denise (int hpos, uae_u16 v, bool immediate)
{
if (! (currprefs.chipset_mask & CSMASK_ECS_DENISE))
v &= ~0x00F1;
if (isehb (bplcon0d, bplcon2))
v |= 0x80;
- record_register_change (hpos, 0x100, (bplcon0d & ~(0x800 | 0x400 | 0x80)) | (v & (0x0800 | 0x400 | 0x80)));
+ if (immediate) {
+ record_register_change (hpos, 0x100, v);
+ } else {
+ record_register_change (hpos, 0x100, (bplcon0d & ~(0x800 | 0x400 | 0x80)) | (v & (0x0800 | 0x400 | 0x80)));
+ }
bplcon0d = v & ~0x80;
bpldmainitdelay (hpos);
if (thisline_decision.plfleft < 0)
- BPLCON0_Denise (hpos, v);
+ BPLCON0_Denise (hpos, v, true);
}
STATIC_INLINE void BPLCON1 (int hpos, uae_u16 v)
frame_time_t start;
int vs = isvsync_chipset ();
+ is_syncline = 0;
+
if (vs > 0) {
curr_time = read_processor_time ();
vsyncwaittime = vsyncmaxtime = curr_time + vsynctimebase;
- vsynctimeperline = vsynctimebase / maxvpos_nom;
+ vsynctimeperline = vsynctimebase / (maxvpos_nom + 1);
render_screen ();
show_screen ();
frame_shown = true;
if (vs == -2 || vs == -3) {
// fastest possible
- int max;
+ int max, adjust;
+
+ adjust = 0;
curr_time = read_processor_time ();
- vsync_busywait_end ();
+ start = vsync_busywait_end ();
+ if ((int)curr_time - (int)vsyncwaittime < 0)
+ curr_time = start;
+
vsync_busywait_do (NULL, (bplcon0 & 4) != 0 && !lof_changed && !lof_changing, lof_store != 0);
vsync_busywait_start ();
+ max = vsynctimebase * (1000 + currprefs.m68k_speed_throttle) / 1000;
+ if ((int)curr_time - (int)vsyncwaittime > 0 && (int)curr_time - (int)vsyncwaittime < vsynctimebase / 2)
+ adjust = curr_time - vsyncwaittime;
+ max -= adjust;
+
vsyncmintime = curr_time;
vsyncwaittime = curr_time + vsynctimebase;
- max = vsynctimebase * (1000 + currprefs.m68k_speed_throttle) / 1000;
- max -= frameskiptime + maxvpos_nom / 10;
- frameskiptime = 0;
- if (max < 0) {
- max = 0;
- vsynctimeperline = 1;
- } else {
- vsynctimeperline = max / maxvpos_nom;
- }
- vsyncmaxtime = max + curr_time;
+
+ vsynctimeperline = max / (maxvpos_nom + 1);
+ vsyncmaxtime = curr_time + max;
} else {
vsyncmintime = curr_time;
vsyncwaittime = curr_time + vsynctimebase;
vsyncmaxtime = curr_time + vsynctimebase;
- vsynctimeperline = vsynctimebase / maxvpos_nom;
+ vsynctimeperline = vsynctimebase / (maxvpos_nom + 1);
if (!show) {
show_screen ();
if (extraframewait)
}
int max;
- if ((int)curr_time - (int)vsyncwaittime > 0 && (int)curr_time - (int)vsyncwaittime < vsynctimebase / 2) {
- int adjust = curr_time - vsyncwaittime;
- max = vsynctimebase * (1000 + currprefs.m68k_speed_throttle) / 1000 - adjust;
- vsyncwaittime = curr_time + vsynctimebase - adjust;
- } else {
- max = vsynctimebase * (1000 + currprefs.m68k_speed_throttle) / 1000;
- vsyncwaittime = curr_time + vsynctimebase;
- }
+ int adjust = 0;
+ if ((int)curr_time - (int)vsyncwaittime > 0 && (int)curr_time - (int)vsyncwaittime < vsynctimebase / 2)
+ adjust = curr_time - vsyncwaittime;
+ max = vsynctimebase * (1000 + currprefs.m68k_speed_throttle) / 1000 - adjust;
+ vsyncwaittime = curr_time + vsynctimebase - adjust;
vsyncmintime = curr_time;
- vsynctimeperline /= maxvpos_nom;
- max -= frameskiptime + maxvpos_nom / 10;
+#if 0
+ max -= frameskiptime;
+#endif
frameskiptime = 0;
if (max < 0) {
max = 0;
vsynctimeperline = 1;
} else {
- vsynctimeperline = max / maxvpos_nom;
+ vsynctimeperline = max / (maxvpos_nom + 1);
}
- vsyncmaxtime = max + curr_time;
+ vsyncmaxtime = curr_time + max;
} else {
curr_time = read_processor_time ();
vsyncmintime = curr_time;
vsyncmaxtime = vsyncwaittime = curr_time + vsynctimebase;
- vsynctimeperline = vsynctimebase / maxvpos_nom;
+ vsynctimeperline = vsynctimebase / (maxvpos_nom + 1);
if (didrender)
show_screen ();
frame_shown = true;
hardware_line_completed (next_lineno);
if (doflickerfix () && interlace_seen > 0)
hsync_scandoubler ();
+ notice_resolution_seen (GET_RES_AGNUS (bplcon0), interlace_seen > 0);
}
#ifdef A2065
vsyncmintime += vsynctimeperline;
is_syncline = 0;
if (!vblank_found_chipset) {
- if ((int)vsyncmaxtime - (int)vsyncmintime >= 0) {
+ if ((int)vsyncmaxtime - (int)vsyncmintime > 0 && (int)vsyncwaittime - (int)vsyncmintime > 0) {
frame_time_t rpt = read_processor_time ();
/* Extra time left? Do some extra CPU emulation */
- if ((int)vsyncmintime - (int)rpt >= vsynctimeperline) {
+ if ((int)vsyncmintime - (int)rpt > 0) {
is_syncline = -1;
}
}
pos += 16;
pos %= drv->tracklen;
}
+ drv->mfmpos = pos;
INTREQ (0x8000 | 0x1000);
done = 1;
pos += 16;
pos %= drv->tracklen;
}
+ drv->mfmpos = pos;
drive_write_data (drv);
done = 1;
}
void get_custom_topedge (int *x, int *y)
{
if (isnativevidbuf ()) {
- *x = visible_left_border;
+ *x = visible_left_border + (DISPLAY_LEFT_SHIFT << currprefs.gfx_resolution);
*y = minfirstline << currprefs.gfx_vresolution;
} else {
*x = 0;
ecsshres = bplres == RES_SUPERHIRES && (currprefs.chipset_mask & CSMASK_ECS_DENISE) && !(currprefs.chipset_mask & CSMASK_AGA);
#endif
- if (bplres > frame_res)
- frame_res = bplres;
- if (bplres > 0)
- can_use_lores = 0;
- frame_res_lace = (dp_for_drawing->bplcon0 & 4) != 0;
-
plf1pri = dp_for_drawing->bplcon2 & 7;
plf2pri = (dp_for_drawing->bplcon2 >> 3) & 7;
plf_sprite_mask = 0xFFFF0000 << (4 * plf2pri);
changed_prefs.gfx_vresolution = nl;
write_log (_T("RES -> %d LINE -> %d\n"), nr, nl);
config_changed = 1;
+ //activate_debugger ();
}
if (src->width > 0 && src->height > 0) {
if (memcmp (dst, src, sizeof *dst)) {
gfxvidinfo.drawbuffer.unlockscr = dummy_unlock;
}
+void notice_resolution_seen (int res, bool lace)
+{
+ if (res > frame_res)
+ frame_res = res;
+ if (res > 0)
+ can_use_lores = 0;
+ if (!frame_res_lace && lace)
+ frame_res_lace = lace;
+}
+
bool notice_interlace_seen (bool lace)
{
bool changed = false;
static uae_u32 ide_read_reg (int ide_reg)
{
uae_u8 v = 0;
+ bool isdrive = ide->hdhfd.size != 0;
switch (ide_reg)
{
v = ide->regs->ide_error;
break;
case IDE_NSECTOR:
- if (ide->regs->ide_devcon & 0x80)
- v = ide->regs->ide_nsector2;
- else
- v = ide->regs->ide_nsector;
+ if (isdrive) {
+ if (ide->regs->ide_devcon & 0x80)
+ v = ide->regs->ide_nsector2;
+ else
+ v = ide->regs->ide_nsector;
+ }
break;
case IDE_SECTOR:
- if (ide->regs->ide_devcon & 0x80)
- v = ide->regs->ide_sector2;
- else
- v = ide->regs->ide_sector;
- check_maxtransfer (2);
+ if (isdrive) {
+ if (ide->regs->ide_devcon & 0x80)
+ v = ide->regs->ide_sector2;
+ else
+ v = ide->regs->ide_sector;
+ check_maxtransfer (2);
+ }
break;
case IDE_LCYL:
- if (ide->regs->ide_devcon & 0x80)
- v = ide->regs->ide_lcyl2;
- else
- v = ide->regs->ide_lcyl;
+ if (isdrive) {
+ if (ide->regs->ide_devcon & 0x80)
+ v = ide->regs->ide_lcyl2;
+ else
+ v = ide->regs->ide_lcyl;
+ }
break;
case IDE_HCYL:
- if (ide->regs->ide_devcon & 0x80)
- v = ide->regs->ide_hcyl2;
- else
- v = ide->regs->ide_hcyl;
+ if (isdrive) {
+ if (ide->regs->ide_devcon & 0x80)
+ v = ide->regs->ide_hcyl2;
+ else
+ v = ide->regs->ide_hcyl;
+ }
break;
case IDE_SELECT:
v = ide->regs->ide_select;
case IDE_STATUS:
ide->irq = 0; /* fall through */
case IDE_DEVCON: /* ALTSTATUS when reading */
- if (ide->hdhfd.size == 0) {
+ if (!isdrive) {
v = 0;
if (ide->regs->ide_error)
v |= IDE_STATUS_ERR;
}
break;
}
- if (IDE_LOG > 2 && ide_reg > 0)
- write_log (_T("IDE%d register %d->%02X\n"), ide->num, ide_reg, (uae_u32)v & 0xff);
+ if (IDE_LOG > 2 && ide_reg > 0 && (1 || ide->num > 0))
+ write_log (_T("IDE%d GET register %d->%02X\n"), ide->num, ide_reg, (uae_u32)v & 0xff);
return v;
}
static void ide_write_reg (int ide_reg, uae_u32 val)
{
ide->regs->ide_devcon &= ~0x80; /* clear HOB */
- if (IDE_LOG > 2 && ide_reg > 0)
- write_log (_T("IDE%d register %d=%02X\n"), ide->num, ide_reg, (uae_u32)val & 0xff);
+ if (IDE_LOG > 2 && ide_reg > 0 && (1 || ide->num > 0))
+ write_log (_T("IDE%d PUT register %d=%02X\n"), ide->num, ide_reg, (uae_u32)val & 0xff);
switch (ide_reg)
{
case IDE_DRVADDR:
#define VBLANK_SPRITE_NTSC 20
#define VBLANK_HZ_PAL 50
#define VBLANK_HZ_NTSC 60
-#define EQU_ENDLINE_PAL 9
+#define EQU_ENDLINE_PAL 8
#define EQU_ENDLINE_NTSC 10
extern int maxhpos, maxhpos_short;
extern void reset_drawing (void);
extern void drawing_init (void);
extern bool notice_interlace_seen (bool);
+extern void notice_resolution_seen (int, bool);
extern void frame_drawn (void);
extern void redraw_frame (void);
extern int get_custom_limits (int *pw, int *ph, int *pdx, int *pdy);
void setmousestate (int mouse, int axis, int data, int isabs);
extern int getmousestate (int mouse);
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);
extern int inputdevice_translatekeycode (int keyboard, int scancode, int state);
{
int gfx_fullscreen;
int gfx_display;
- TCHAR gfx_display_name[256];
int gfx_vsync;
// 0 = immediate flip
// -1 = wait for flip, before frame ends
extern void target_fixup_options (struct uae_prefs *);
extern int target_cfgfile_load (struct uae_prefs *, const TCHAR *filename, int type, int isdefault);
extern void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type);
+extern int target_get_display (const TCHAR*);
+extern const TCHAR *target_get_display_name (int);
extern int cfgfile_load (struct uae_prefs *p, const TCHAR *filename, int *type, int ignorelink, int userconfig);
extern int cfgfile_save (struct uae_prefs *p, const TCHAR *filename, int);
}
}
-void inputdevice_updateconfig (struct uae_prefs *prefs)
+
+void inputdevice_updateconfig_internal (struct uae_prefs *prefs)
{
int i;
copyjport (&changed_prefs, &currprefs, 2);
copyjport (&changed_prefs, &currprefs, 3);
-#ifdef RETROPLATFORM
- rp_input_change (0);
- rp_input_change (1);
- rp_input_change (2);
- rp_input_change (3);
- for (i = 0; i < MAX_JPORTS; i++)
- rp_update_gameport (i, -1, 0);
-#endif
-
resetinput ();
joysticks = prefs->joystick_settings[prefs->input_selected_setting];
disableifempty (prefs);
scanevents (prefs);
+}
+void inputdevice_updateconfig (struct uae_prefs *prefs)
+{
+ inputdevice_updateconfig_internal (prefs);
+
config_changed = 1;
+
+#ifdef RETROPLATFORM
+ rp_input_change (0);
+ rp_input_change (1);
+ rp_input_change (2);
+ rp_input_change (3);
+ for (int i = 0; i < MAX_JPORTS; i++)
+ rp_update_gameport (i, -1, 0);
+#endif
}
/* called when devices get inserted or removed
{ USB_VENDOR_ID_ALPS, USB_DEVICE_ID_IBM_GAMEPAD },
{ USB_VENDOR_ID_CHIC, USB_DEVICE_ID_CHIC_GAMEPAD },
{ USB_VENDOR_ID_DWAV, USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER },
- { USB_VENDOR_ID_MOJO, USB_DEVICE_ID_RETRO_ADAPTER },
+// { USB_VENDOR_ID_MOJO, USB_DEVICE_ID_RETRO_ADAPTER },
{ USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_DRIVING },
{ USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FLYING },
{ USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING },
did->axissort[axiscnt] = hidtable[ht].priority * 2 + l;
did->axismappings[axiscnt] = acnt;
memcpy (&did->hidvcaps[axiscnt], &vcaps[i], sizeof HIDP_VALUE_CAPS);
- fixhidvcaps (&rdi->hid, &did->hidvcaps[axiscnt]);
did->axistype[axiscnt] = l + 1;
axiscnt++;
}
createmask2texture (currprefs.gfx_filteroverlay);
- if (!createtexture (tout_w, tout_h, window_w, window_h))
- return 0;
createledtexture ();
hr = D3DXCreateSprite (d3ddev, &sprite);
if (!createamigatexture (tin_w, tin_h))
return false;
+ if (!createtexture (tout_w, tout_h, window_w, window_h))
+ return false;
return true;
}
if (!isd3d () || !texture)
return NULL;
+ if (locked) {
+ write_log (_T("%s: texture already locked!\n"), D3DHEAD);
+ return NULL;
+ }
+
lock.pBits = NULL;
lock.Pitch = 0;
hr = texture->LockRect (0, &lock, NULL, fullupdate ? D3DLOCK_DISCARD : D3DLOCK_NO_DIRTY_UPDATE);
DirectDraw_get_GUIDs ();
guid = NULL;
- if (isfullscreen () > 0) {
+ if (isfullscreen ()) {
MultiDisplay *md = getdisplay (&currprefs);
int disp = md - Displays;
if (disp < 0)
}
hfd->handle = xcalloc (struct hardfilehandle, 1);
hfd->handle->h = INVALID_HANDLE_VALUE;
- hfd_log (_T("hfd open: '%s'\n"), name);
+ hfd_log (_T("hfd attempting to open: '%s'\n"), name);
if (name[0] == ':') {
hdf_init_target ();
i = isharddrive (name);
_tcscpy (p, KEYBOARDCUSTOM);
p += _tcslen (p);
kb = inputdevice_get_device_total (IDTYPE_JOYSTICK) + inputdevice_get_device_total (IDTYPE_MOUSE);
+ int kbnum = 0;
for (int i = 0; customeventorder[i]; i++) {
int evtnum = events[i];
- for (int j = 0; j < inputdevicefunc_keyboard.get_widget_num (kb); j++) {
+ for (int j = 0; j < inputdevicefunc_keyboard.get_widget_num (kbnum); j++) {
int flags, port;
- if (inputdevice_get_mapping (kb, j, &flags, &port, NULL, NULL, 0) == evtnum) {
+ if (inputdevice_get_mapping (kb + kbnum, j, &flags, &port, NULL, NULL, 0) == evtnum) {
if (port == inputmap_port + 1) {
uae_u32 kc = 0;
- inputdevicefunc_keyboard.get_widget_type (kb, j, NULL, &kc);
+ inputdevicefunc_keyboard.get_widget_type (kbnum, j, NULL, &kc);
if (!first)
*p++ = ' ';
first = false;
kb = inputdevice_get_device_total (IDTYPE_JOYSTICK) + inputdevice_get_device_total (IDTYPE_MOUSE);
- inputdevice_updateconfig (&changed_prefs);
+ inputdevice_updateconfig_internal (&changed_prefs);
inputdevice_compa_prepare_custom (&changed_prefs, inputmap_port, JSEM_MODE_JOYSTICK);
- inputdevice_updateconfig (&changed_prefs);
+ inputdevice_updateconfig_internal (&changed_prefs);
max = inputdevice_get_compatibility_input (&changed_prefs, inputmap_port, &mode, &events, &axistable);
- write_log (L"custom='%s' max=%d port=%d\n", custom, max, inputmap_port);
+ write_log (_T("custom='%s' max=%d port=%d kb=%d kbnum=%d\n"), custom, max, inputmap_port, kb, inputdevice_get_device_total (IDTYPE_KEYBOARD));
if (!max)
return FALSE;
while (p && p[0]) {
int idx = -1, kc = -1;
- int wdnum = -1;
const TCHAR *p2 = _tcschr (p, '=');
if (!p2)
break;
break;
evtnum = events[idx];
- write_log (L"evt=%d kc=%d\n", evtnum, kc);
+ write_log (_T("kb=%d evt=%d kc=%d\n"), kb, evtnum, kc);
for (int j = 0; j < inputdevice_get_device_total (IDTYPE_KEYBOARD); j++) {
- for (int i = 0; i < inputdevicefunc_keyboard.get_widget_num (kb + j); i++) {
+ int wdnum = -1;
+ for (int i = 0; i < inputdevicefunc_keyboard.get_widget_num (j); i++) {
uae_u32 kc2 = 0;
- inputdevicefunc_keyboard.get_widget_type (kb + j, i, NULL, &kc2);
+ inputdevicefunc_keyboard.get_widget_type (j, i, NULL, &kc2);
if (kc == kc2) {
wdnum = i;
break;
}
}
if (wdnum >= 0) {
+ write_log (_T("kb=%d (%s) wdnum=%d\n"), j, inputdevicefunc_keyboard.get_friendlyname (j), wdnum);
inputdevice_set_gameports_mapping (&changed_prefs, kb + j, wdnum, evtnum, inputmap_port);
inputdevice_set_gameports_mapping (&currprefs, kb + j, wdnum, evtnum, inputmap_port);
+ } else {
+ write_log (_T("kb=%d (%): keycode %x not found!\n"), j, inputdevicefunc_keyboard.get_friendlyname (j), kc);
}
}
}
- inputdevice_updateconfig (&changed_prefs);
+ inputdevice_updateconfig_internal (&changed_prefs);
inputdevice_updateconfig (&currprefs);
return TRUE;
}
minimized = 0;
if (display) {
p->gfx_apmode[APMODE_NATIVE].gfx_display = display;
- p->gfx_apmode[APMODE_NATIVE].gfx_display_name[0] = 0;
p->gfx_apmode[APMODE_RTG].gfx_display = display;
- p->gfx_apmode[APMODE_RTG].gfx_display_name[0] = 0;
if (sm->dwScreenMode & RP_SCREENMODE_FULLWINDOW)
fs = 2;
else
#define LANG_DLL 1
//#define WINUAEBETA _T("")
-#define WINUAEBETA _T("Beta 6")
-#define WINUAEDATE MAKEBD(2012, 4, 13)
+#define WINUAEBETA _T("Beta 7")
+#define WINUAEDATE MAKEBD(2012, 4, 18)
#define WINUAEEXTRA _T("")
//#define WINUAEEXTRA _T("AmiKit Preview")
#define WINUAEREV _T("")
} else {
dowait = false;
}
- if (dowait && currprefs.m68k_speed >= 0)
+ if (dowait && (currprefs.m68k_speed >= 0 || currprefs.m68k_speed_throttle < 0))
sleep_millis_main (1);
}
int display = index < 0 ? p->gfx_apmode[screen_is_picasso ? APMODE_RTG : APMODE_NATIVE].gfx_display - 1 : index;
max = 0;
- while (Displays[max].monitorname) {
- if (index < 0) {
- struct MultiDisplay *md = &Displays[max];
- if (screen_is_picasso) {
- if (p->gfx_apmode[APMODE_RTG].gfx_display_name[0] && !_tcscmp (md->adaptername, p->gfx_apmode[APMODE_RTG].gfx_display_name))
- return md;
- } else {
- if (p->gfx_apmode[APMODE_NATIVE].gfx_display_name[0] && !_tcscmp (md->adaptername, p->gfx_apmode[APMODE_NATIVE].gfx_display_name))
- return md;
- }
- }
+ while (Displays[max].monitorname)
max++;
- }
if (max == 0) {
gui_message (_T("no display adapters! Exiting"));
exit (0);
*ah = amigawin_rect.bottom - *ay;
}
+int target_get_display (const TCHAR *name)
+{
+ for (int i = 0; Displays[i].monitorname; i++) {
+ struct MultiDisplay *md = &Displays[i];
+ if (!_tcscmp (md->adapterid, name))
+ return i + 1;
+ if (!_tcscmp (md->adaptername, name))
+ return i + 1;
+ if (!_tcscmp (md->monitorname, name))
+ return i + 1;
+ }
+ return -1;
+}
+const TCHAR *target_get_display_name (int num)
+{
+ if (num <= 0)
+ return NULL;
+ struct MultiDisplay *md = getdisplay2 (NULL, num - 1);
+ if (!md)
+ return NULL;
+ return md->monitorname;
+}
+
void centerdstrect (RECT *dr)
{
if(!(currentmode->flags & (DM_DX_FULLSCREEN | DM_D3D_FULLSCREEN | DM_W_FULLSCREEN)))
}
}
+#if 0
+static void sortmonitors (void)
+{
+ for (int i = 0; Displays[i].monitorid; i++) {
+ for (int j = i + 1; Displays[j].monitorid; j++) {
+ int comp = (Displays[j].primary ? 1 : 0) - (Displays[i].primary ? 1 : 0);
+ if (!comp)
+ comp = _tcsicmp (Displays[i].adapterid, Displays[j].adapterid);
+ if (comp > 0) {
+ struct MultiDisplay md;
+ memcpy (&md, &Displays[i], sizeof MultiDisplay);
+ memcpy (&Displays[i], &Displays[j], sizeof MultiDisplay);
+ memcpy (&Displays[j], &md, sizeof MultiDisplay);
+ }
+ }
+ }
+}
+#endif
+
static void modesList (struct MultiDisplay *md)
{
int i, j;
}
}
EnumDisplayMonitors (NULL, NULL, monitorEnumProc, NULL);
+ //sortmonitors ();
}
void sortdisplays (void)
c |= currprefs.gfx_scandoubler != changed_prefs.gfx_scandoubler ? (2 | 8) : 0;
c |= currprefs.gfx_apmode[APMODE_NATIVE].gfx_display != changed_prefs.gfx_apmode[APMODE_NATIVE].gfx_display ? (2|4|8) : 0;
c |= currprefs.gfx_apmode[APMODE_RTG].gfx_display != changed_prefs.gfx_apmode[APMODE_RTG].gfx_display ? (2|4|8) : 0;
- c |= _tcscmp (currprefs.gfx_apmode[APMODE_NATIVE].gfx_display_name, changed_prefs.gfx_apmode[APMODE_NATIVE].gfx_display_name) ? (2|4|8) : 0;
- c |= _tcscmp (currprefs.gfx_apmode[APMODE_RTG].gfx_display_name, changed_prefs.gfx_apmode[APMODE_RTG].gfx_display_name) ? (2|4|8) : 0;
c |= currprefs.gfx_blackerthanblack != changed_prefs.gfx_blackerthanblack ? (2 | 8) : 0;
c |= currprefs.gfx_apmode[0].gfx_backbuffers != changed_prefs.gfx_apmode[0].gfx_backbuffers ? (2 | 8) : 0;
c |= currprefs.gfx_apmode[0].gfx_interlaced != changed_prefs.gfx_apmode[0].gfx_interlaced ? (2 | 8) : 0;
currprefs.gfx_scandoubler = changed_prefs.gfx_scandoubler;
currprefs.gfx_apmode[APMODE_NATIVE].gfx_display = changed_prefs.gfx_apmode[APMODE_NATIVE].gfx_display;
currprefs.gfx_apmode[APMODE_RTG].gfx_display = changed_prefs.gfx_apmode[APMODE_RTG].gfx_display;
- _tcscpy (currprefs.gfx_apmode[APMODE_NATIVE].gfx_display_name, changed_prefs.gfx_apmode[APMODE_NATIVE].gfx_display_name);
- _tcscpy (currprefs.gfx_apmode[APMODE_RTG].gfx_display_name, changed_prefs.gfx_apmode[APMODE_RTG].gfx_display_name);
currprefs.gfx_blackerthanblack = changed_prefs.gfx_blackerthanblack;
currprefs.gfx_apmode[0].gfx_backbuffers = changed_prefs.gfx_apmode[0].gfx_backbuffers;
currprefs.gfx_apmode[0].gfx_interlaced = changed_prefs.gfx_apmode[0].gfx_interlaced;
if (index >= 0) {
currprefs.gfx_apmode[screen_is_picasso ? APMODE_RTG : APMODE_NATIVE].gfx_display =
changed_prefs.gfx_apmode[screen_is_picasso ? APMODE_RTG : APMODE_NATIVE].gfx_display = index;
- currprefs.gfx_apmode[screen_is_picasso ? APMODE_RTG : APMODE_NATIVE].gfx_display_name[0] =
- changed_prefs.gfx_apmode[screen_is_picasso ? APMODE_RTG : APMODE_NATIVE].gfx_display_name[0] = 0;
write_log (L"Can't find mode %dx%d ->\n", currentmode->native_width, currentmode->native_height);
write_log (L"Monitor switched to '%s'\n", md->adaptername);
}
{
return vblankthread_mode == VBLANKTH_ACTIVE || vblankthread_mode == VBLANKTH_ACTIVE_WAIT;
}
-
+#if 0
static void vsync_notvblank (void)
{
for (;;) {
vsync_sleep (true);
}
}
-
+#endif
frame_time_t vsync_busywait_end (void)
{
if (!dooddevenskip) {
- vsync_notvblank ();
while (!vblank_found && vblankthread_mode == VBLANKTH_ACTIVE) {
- vsync_sleep (currprefs.m68k_speed < 0);
+ vsync_sleep (currprefs.m68k_speed < 0 && currprefs.m68k_speed_throttle == 0);
}
}
changevblankthreadmode_fast (VBLANKTH_ACTIVE_WAIT);
void vsync_busywait_start (void)
{
+ int vp = 0;
+ struct apmode *ap = picasso_on ? &currprefs.gfx_apmode[1] : &currprefs.gfx_apmode[0];
#if 0
struct apmode *ap = picasso_on ? &currprefs.gfx_apmode[1] : &currprefs.gfx_apmode[0];
if (!dooddevenskip) {
vblankbasefull = (syncbase / tsum2);
vblankbasewait1 = (syncbase / tsum2) * 75 / 100;
- vblankbasewait2 = (syncbase / tsum2) * 70 / 100;
+ vblankbasewait2 = (syncbase / tsum2) * 55 / 100;
vblankbasewait3 = (syncbase / tsum2) * 90 / 100;
vblankbaselace = lace;
write_log (_T("VSync %s: %.6fHz/%.1f=%.6fHz. MinV=%d MaxV=%d%s Units=%d\n"),
static void input_find (HWND hDlg, int mode, int set);
static int rawmode;
-static int inputmap_remap_counter;
+static int inputmap_remap_counter, inputmap_view_offset;
static void CALLBACK timerfunc (HWND hDlg, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
{
if (wtype < 0) {
if (!state)
return;
+ HWND h = GetDlgItem (hDlg, IDC_INPUTMAPLIST);
+ // F11
if (inputmap == 1) {
int mode, *events, *axistable;
- HWND h = GetDlgItem (hDlg, IDC_INPUTMAPLIST);
inputmap_remap_counter++;
ListView_EnsureVisible (h, inputmap_remap_counter, FALSE);
ListView_SetItemState (h, -1, 0, LVIS_SELECTED | LVIS_FOCUSED);
int max = inputdevice_get_compatibility_input (&workprefs, inputmap_port, &mode, &events, &axistable);
if (inputmap_remap_counter >= max)
inputmap_remap_counter = -1;
+ } else if (inputmap == 2) {
+ int itemcnt = ListView_GetItemCount (h);
+ if (inputmap_view_offset >= itemcnt - 1 || inputmap_view_offset < 0) {
+ inputmap_view_offset = 0;
+ } else {
+ inputmap_view_offset += ListView_GetCountPerPage (h);
+ if (inputmap_view_offset >= itemcnt)
+ inputmap_view_offset = itemcnt - 1;
+ }
+ ListView_EnsureVisible (h, inputmap_view_offset, FALSE);
}
return;
}
ListView_SetItemState (h, -1, 0, LVIS_SELECTED | LVIS_FOCUSED);
ListView_SetItemState (h, inputmap_index, LVIS_SELECTED , LVIS_SELECTED);
ListView_SetItemState (h, inputmap_index, LVIS_FOCUSED, LVIS_FOCUSED);
+ inputmap_view_offset = inputmap_index;
found = true;
}
}
inputmap_port_remap = -1;
inputmap_port = port;
inputmap_remap_counter = -1;
+ inputmap_view_offset = 0;
updatePanel (INPUTMAP_ID);
}
- restore only single input target to default.
- hdd from command line
+Beta 7:
+
+- DirectDraw full-window mode on non-primary monitor was blank.
+- Adjusted (again) fastest possible CPU mode extra CPU time scheduling, trying to find balance between better
+ timing syncronization and not causing unnecessary slowdowns on some systems..
+- OCS Denise bug emulation update, PAL STREQU counts are 8 (short field) or 9 (long field) lines, not static 9 lines.
+ (Probably no program cares)
+- F11 in gameports/input test mode shows next page (if list is longer than visible area).
+- Manual display positioning X coordinate offset fixed (Filter panel or gfx_center_horizontal_position)
+ Origin should be hardware position 0 (same as sprites), not first possible visible position.
+- Fastest possible low latency vsync should work better again (b2), plus some other adjustments done, CPU throttling
+ supported.
+- Autoresolution worked badly in some situations.
+- Removed USB_DEVICE_ID_RETRO_ADAPTER from USB "quirks" list, apparently it is working correctly according
+ to firmware sources. (Perhaps older version was wrong, not exactly sure why it was included in Linux HID quirks list)
+- Save also selected monitor name (gfx_display_name) to config file because order of displays can change when removing
+ or adding monitors or replacing display cards.
+
Beta 6:
- Most CDFS RockRidge file comments were truncated. (Very stupid bug)