char *out;
if (!fullconfig && !_tcsncmp (tmpout, _T("input."), 6))
continue;
- write_log (_T("'%s'\n"), tmpout);
+ //write_log (_T("'%s'\n"), tmpout);
out = uutf8 (tmpout);
strcpy ((char*)p, out);
xfree (out);
// moving average algorithm
-#define MAVG_SIZE 128
+#define MAVG_MAX_SIZE 128
struct mavg_data
{
- int values[MAVG_SIZE];
+ int values[MAVG_MAX_SIZE];
int size;
int offset;
int mavg;
};
-static int mavg (struct mavg_data *md, int newval)
+static void mavg_clear (struct mavg_data *md)
{
- if (md->size < MAVG_SIZE) {
+ md->size = 0;
+ md->offset = 0;
+ md->mavg = 0;
+}
+
+static int mavg (struct mavg_data *md, int newval, int size)
+{
+ if (md->size < size) {
md->values[md->size++] = newval;
md->mavg += newval;
} else {
md->values[md->offset] = newval;
md->mavg += newval;
md->offset++;
- if (md->offset >= MAVG_SIZE)
- md->offset -= MAVG_SIZE;
+ if (md->offset >= size)
+ md->offset -= size;
}
return md->mavg / md->size;
}
+#define MAVG_VSYNC_SIZE 128
+
extern int log_vsync, debug_vsync_min_delay, debug_vsync_forced_delay;
static bool framewait (void)
{
is_syncline = 0;
static struct mavg_data ma_frameskipt;
- int frameskipt_avg = mavg (&ma_frameskipt, frameskiptime);
+ int frameskipt_avg = mavg (&ma_frameskipt, frameskiptime, MAVG_VSYNC_SIZE);
frameskiptime = 0;
if (!frame_shown)
show_screen ();
- int legacy_avg = mavg (&ma_legacy, t);
+ int legacy_avg = mavg (&ma_legacy, t, MAVG_VSYNC_SIZE);
if (t > legacy_avg)
legacy_avg = t;
t = legacy_avg;
if (adjust > vsynctimebase * 2 / 3)
adjust = vsynctimebase * 2 / 3;
- int adjust_avg = mavg (&ma_adjust, adjust);
+ int adjust_avg = mavg (&ma_adjust, adjust, MAVG_VSYNC_SIZE);
val += adjust_avg;
- int flipdelay_avg = mavg (&ma_skip, flipdelay);
+ int flipdelay_avg = mavg (&ma_skip, flipdelay, MAVG_VSYNC_SIZE);
if (flipdelay > flipdelay_avg)
flipdelay_avg = flipdelay;
if (currprefs.gfx_apmode[0].gfx_vflip == 0) {
vsyncwaittime = curr_time + vsynctimebase;
if (currprefs.gfx_apmode[0].gfx_vflip == 0) {
- flipdelay_avg = mavg (&ma_skip, flipdelay);
+ flipdelay_avg = mavg (&ma_skip, flipdelay, MAVG_VSYNC_SIZE);
if (flipdelay > flipdelay_avg)
flipdelay_avg = flipdelay;
} else {
return status != 0;
}
-
-static frame_time_t frametime2;
+#define FPSCOUNTER_MAVG_SIZE 10
+static struct mavg_data fps_mavg, idle_mavg;
void fpscounter_reset (void)
{
timeframes = 0;
- frametime2 = 0;
+ mavg_clear (&fps_mavg);
+ mavg_clear (&idle_mavg);
bogusframe = 2;
lastframetime = read_processor_time ();
idletime = 0;
}
+
static void fpscounter (bool frameok)
{
frame_time_t now, last;
- int mcnt = 10;
now = read_processor_time ();
last = now - lastframetime;
lastframetime = now;
- if (bogusframe)
+ if (bogusframe || (int)last < 0)
return;
+ mavg (&fps_mavg, last / 10, FPSCOUNTER_MAVG_SIZE);
+ mavg (&idle_mavg, idletime / 10, FPSCOUNTER_MAVG_SIZE);
+ idletime = 0;
+
frametime += last;
- frametime2 += last;
timeframes++;
- if ((timeframes % mcnt) == 0) {
- double idle = 1000 - (idletime == 0 ? 0.0 : (double)idletime * 1000.0 / (vsynctimebase * mcnt));
- int fps = frametime2 == 0 ? 0 : (syncbase * mcnt) / (frametime2 / 10);
+
+ if ((timeframes & 7) == 0) {
+ double idle = 1000 - (idle_mavg.mavg == 0 ? 0.0 : (double)idle_mavg.mavg * 1000.0 / vsynctimebase);
+ int fps = fps_mavg.mavg == 0 ? 0 : syncbase * 10 / fps_mavg.mavg;
if (fps > 9999)
fps = 9999;
if (idle < 0)
}
if (currprefs.turbo_emulation && idle < 100 * 10)
idle = 100 * 10;
- gui_fps (fps, (int)idle, frameok ? 0 : 1);
- frametime2 = 0;
- idletime = 0;
+ gui_data.fps = fps;
+ gui_data.idle = (int)idle;
+ gui_data.fps_color = frameok ? 0 : 1;
+ if ((timeframes & 15) == 0) {
+ gui_fps (fps, (int)idle, frameok ? 0 : 1);
+ }
}
}
int interlace_seen = 0;
#define AUTO_LORES_FRAMES 10
static int can_use_lores = 0, frame_res, frame_res_lace, last_max_ypos;
+static bool center_reset;
/* Lookup tables for dual playfields. The dblpf_*1 versions are for the case
that playfield 1 has the priority, dbplpf_*2 are used if playfield 2 has
plffirstline_total, plflastline_total,
first_planes_vpos, last_planes_vpos, minfirstline);
#endif
+ center_reset = true;
return 1;
}
/* Would the old value be good enough? If so, leave it as it is if we want to
* be clever. */
if (currprefs.gfx_xcenter == 2) {
- if (visible_left_border < prev_x_adjust && prev_x_adjust < min_diwstart && min_diwstart - visible_left_border <= 32)
+ if (center_reset || (visible_left_border < prev_x_adjust && prev_x_adjust < min_diwstart && min_diwstart - visible_left_border <= 32))
visible_left_border = prev_x_adjust;
}
} else if (gfxvidinfo.drawbuffer.extrawidth) {
/* Would the old value be good enough? If so, leave it as it is if we want to
* be clever. */
if (currprefs.gfx_ycenter == 2) {
- if (thisframe_y_adjust != prev_y_adjust
+ if (center_reset || (thisframe_y_adjust != prev_y_adjust
&& prev_y_adjust <= thisframe_first_drawn_line
- && prev_y_adjust + max_drawn_amiga_line > thisframe_last_drawn_line)
+ && prev_y_adjust + max_drawn_amiga_line > thisframe_last_drawn_line))
thisframe_y_adjust = prev_y_adjust;
}
}
gfxvidinfo.drawbuffer.xoffset = (DISPLAY_LEFT_SHIFT << RES_MAX) + (visible_left_border << (RES_MAX - currprefs.gfx_resolution));
gfxvidinfo.drawbuffer.yoffset = thisframe_y_adjust << VRES_MAX;
+ center_reset = false;
}
#define FRAMES_UNTIL_RES_SWITCH 1
clearbuffer (&gfxvidinfo.drawbuffer);
clearbuffer (&gfxvidinfo.tempbuffer);
+
+ center_reset = true;
}
void drawing_init (void)
case i_BSR:
// .b and .w confirmed
printf ("\tuae_s32 s;\n");
- genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, GF_AA|GF_NOREFILL);
+ if (curi->size == sz_long) {
+ if (next_cpu_level < 1)
+ next_cpu_level = 1;
+ }
+ if (curi->size == sz_long && cpu_level < 2) {
+ printf ("\tuae_u32 src = 0xffffffff;\n");
+ } else {
+ genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, GF_AA|GF_NOREFILL);
+ }
printf ("\ts = (uae_s32)src + 2;\n");
if (using_exception_3) {
printf ("\tif (src & 1) {\n");
- printf ("\t\texception3i (opcode, m68k_getpc () + s);\n");
+ printf ("\t\texception3 (opcode, m68k_getpc () + s, 0, 1, m68k_getpc () + s);\n");
printf ("\t\tgoto %s;\n", endlabelstr);
printf ("\t}\n");
need_endlabel = 1;
printf ("\t} else {\n");
genastore ("src", Dreg, "(extra >> 12) & 7", curi->size, "");
printf ("\t}\n");
- sync_m68k_pc ();
pop_braces (old_brace_level);
}
+ sync_m68k_pc ();
}
break;
case i_BKPT: /* only needed for hardware emulators */
float bri, con, gam, v;
uae_u32 vi;
- bri = ((float)(currprefs.gfx_luminance))
- * (128.0f / 1000.0f);
+ bri = ((float)(currprefs.gfx_luminance)) * (128.0f / 1000.0f);
con = ((float)(currprefs.gfx_contrast + 1000)) / 1000.0f;
gam = ((float)(1000 - currprefs.gfx_gamma)) / 1000.0f;
extern void exception3 (uae_u32 opcode, uaecptr addr);
extern void exception3i (uae_u32 opcode, uaecptr addr);
+extern void exception3 (uae_u32 opcode, uaecptr addr, int w, int i, uaecptr pc);
extern void exception2 (uaecptr addr);
extern void cpureset (void);
bool win32_automount_removabledrives;
int win32_midioutdev;
int win32_midiindev;
+ bool win32_midirouter;
int win32_uaescsimode;
int win32_soundcard;
int win32_samplersoundcard;
// 32 = vsync
int inputdevice_logging = 0;
-
+extern int tablet_log;
#define ID_FLAG_CANRELEASE 0x1000
#define ID_FLAG_TOGGLED 0x2000
if (!memcmp (tmp, p + MH_START, MH_END - MH_START))
return;
+
+ if (tablet_log & 1) {
+ static int obuttonbits, oinproximity;
+ if (inproximity != oinproximity || buttonbits != obuttonbits) {
+ obuttonbits = buttonbits;
+ oinproximity = inproximity;
+ write_log (_T("TABLET: B=%08x P=%d\n"), buttonbits, inproximity);
+ }
+ }
+ if (tablet_log & 2) {
+ write_log (_T("TABLET: X=%d Y=%d Z=%d AX=%d AY=%d AZ=%d\n"), x, y, z, ax, ay, az);
+ }
+
p[MH_E] = 0xc0 | 2;
p[MH_CNT]++;
}
{
int i;
+ //write_log (_T("inputdevice_acquire\n"));
+
for (i = 0; i < MAX_INPUT_DEVICES; i++)
idev[IDTYPE_JOYSTICK].unacquire (i);
for (i = 0; i < MAX_INPUT_DEVICES; i++)
{
int i;
+ //write_log (_T("inputdevice_unacquire\n"));
+
for (i = 0; i < MAX_INPUT_DEVICES; i++)
idev[IDTYPE_JOYSTICK].unacquire (i);
for (i = 0; i < MAX_INPUT_DEVICES; i++)
write_log (_T(" prefetch and cycle-exact"));
else
write_log (_T(" ~cycle-exact"));
- } else if (currprefs.cpu_compatible)
- write_log (_T(" prefetch"));
+ } else if (currprefs.cpu_compatible) {
+ if (currprefs.cpu_model <= 68020) {
+ write_log (_T(" prefetch"));
+ } else {
+ write_log (_T(" fake prefetch"));
+ }
+ if (currprefs.cpu_model == 68060) {
+ write_log (_T(" no unimplemented integer instructions"));
+ }
+ }
if (currprefs.address_space_24) {
regs.address_space_mask = 0x00ffffff;
write_log (_T(" 24-bit"));
static void mmu_op30_pmove (uaecptr pc, uae_u32 opcode, uae_u16 next, uaecptr extra)
{
+ int mode = (opcode >> 3) & 7;
int preg = (next >> 10) & 31;
int rw = (next >> 9) & 1;
int fd = (next >> 8) & 1;
uae_u32 otc = tc_030;
int siz;
+ // Dn, An, (An)+, -(An), abs and indirect
+ if (mode == 0 || mode == 1 || mode == 3 || mode == 4 || mode >= 6) {
+ op_illg (opcode);
+ return;
+ }
+
switch (preg)
{
case 0x10: // TC
static void mmu_op30_pflush (uaecptr pc, uae_u32 opcode, uae_u16 next, uaecptr extra)
{
+ int mode = (opcode >> 3) & 7;
+ int reg = opcode & 7;
+ int flushmode = (next >> 10) & 7;
+ int fc = next & 31;
+ int mask = (next >> 5) & 3;
+ TCHAR fname[100];
+
+ switch (flushmode)
+ {
+ case 6:
+ // Dn, An, (An)+, -(An), abs and indirect
+ if (mode == 0 || mode == 1 || mode == 3 || mode == 4 || mode >= 6) {
+ op_illg (opcode);
+ return;
+ }
+ _stprintf (fname, _T("FC=%x MASK=%x EA=%08x"), fc, mask, 0);
+ break;
+ case 4:
+ _stprintf (fname, _T("FC=%x MASK=%x"), fc, mask);
+ break;
+ case 1:
+ _tcscpy (fname, _T("ALL"));
+ break;
+ default:
+ op_illg (opcode);
+ return;
+ }
#if MMUOP_DEBUG > 0
- write_log (_T("PFLUSH PC=%08X\n"), pc);
+ write_log (_T("PFLUSH %s PC=%08X\n"), fname, pc);
#endif
}
void mmu_op30 (uaecptr pc, uae_u32 opcode, uae_u16 extra, uaecptr extraa)
{
- if (extra & 0x8000)
- mmu_op30_ptest (pc, opcode, extra, extraa);
- else if (extra & 0x2000)
- mmu_op30_pflush (pc, opcode, extra, extraa);
- else
+ int type = extra >> 13;
+
+ switch (type)
+ {
+ case 0:
+ case 2:
+ case 3:
mmu_op30_pmove (pc, opcode, extra, extraa);
+ break;
+ case 1:
+ mmu_op30_pflush (pc, opcode, extra, extraa);
+ break;
+ case 4:
+ mmu_op30_ptest (pc, opcode, extra, extraa);
+ break;
+ default:
+ op_illg (opcode);
+ break;
+ }
}
void mmu_op (uae_u32 opcode, uae_u32 extra)
#endif
+#ifdef CPUEMU_20
+// emulate simple prefetch
+static uae_u32 get_word_020_prefetchf (uae_u32 pc)
+{
+ 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 if (pc == regs.prefetch020addr + 2) {
+ uae_u32 v = regs.prefetch020[1];
+ regs.prefetch020[0] = regs.prefetch020[2];
+ regs.prefetch020[1] = x_get_word (pc + 4);
+ regs.prefetch020[2] = x_get_word (pc + 6);
+ regs.prefetch020addr += 4;
+ return v;
+ } else if (pc == regs.prefetch020addr + 4) {
+ uae_u32 v = regs.prefetch020[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);
+ regs.prefetch020addr += 6;
+ 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);
+ }
+}
+#endif
+
#ifdef JIT /* Completely different run_2 replacement */
void do_nothing (void)
start_pc = r->pc;
for (;;) {
/* Take note: This is the do-it-normal loop */
- uae_u16 opcode = get_iword (0);
+ uae_u16 opcode;
+
+ if (currprefs.cpu_compatible) {
+ opcode = get_word_020_prefetchf (m68k_getpc ());
+ } else {
+ opcode = get_iword (0);
+ }
special_mem = DISTRUST_CONSISTENT_MEM;
pc_hist[blocklen].location = (uae_u16*)r->pc_p;
#ifdef CPUEMU_20
-/* emulate simple prefetch */
+// only opcode fetch prefetch
+static void m68k_run_2pf (void)
+{
+ struct regstruct *r = ®s;
+
+ for (;;) {
+ uae_u16 opcode;
+
+ r->instruction_pc = m68k_getpc ();
+
+#if DEBUG_CD32CDTVIO
+ out_cd32io (m68k_getpc ());
+#endif
+
+ x_do_cycles (cpu_cycles);
+
+ opcode = get_word_020_prefetchf (r->instruction_pc);
+
+ count_instr (opcode);
+
+ cpu_cycles = (*cpufunctbl[opcode])(opcode);
+ cpu_cycles = adjust_cycles (cpu_cycles);
+ if (r->spcflags) {
+ if (do_specialties (cpu_cycles))
+ return;
+ }
+ }
+}
uae_u32 get_word_020_prefetch (int o)
{
}
}
+// full prefetch
static void m68k_run_2p (void)
{
struct regstruct *r = ®s;
#endif
(currprefs.cpu_model == 68040 || currprefs.cpu_model == 68060) && currprefs.mmu_model ? m68k_run_mmu040 :
currprefs.cpu_model >= 68020 && currprefs.cpu_cycle_exact ? m68k_run_2ce :
- currprefs.cpu_compatible ? m68k_run_2p : m68k_run_2;
+ currprefs.cpu_compatible ? (currprefs.cpu_model <= 68020 ? m68k_run_2p : m68k_run_2pf) : m68k_run_2;
}
protect_roms (true);
run_func ();
changed_prefs.address_space_24 = 0;
if (flags & CPUTYPE_EC)
changed_prefs.address_space_24 = 1;
- if (model > 68020)
- changed_prefs.cpu_compatible = 0;
currprefs.address_space_24 = changed_prefs.address_space_24;
currprefs.cpu_compatible = changed_prefs.cpu_compatible;
currprefs.cpu_cycle_exact = changed_prefs.cpu_cycle_exact;
#endif /* SAVESTATE */
-static void exception3f (uae_u32 opcode, uaecptr addr, int writeaccess, int instructionaccess)
+static void exception3f (uae_u32 opcode, uaecptr addr, int writeaccess, int instructionaccess, uae_u32 pc)
{
if (currprefs.cpu_model >= 68040)
addr &= ~1;
- if (currprefs.cpu_model <= 68010)
- last_addr_for_exception_3 = m68k_getpc () + 2;
- else
+ if (currprefs.cpu_model >= 68020) {
last_addr_for_exception_3 = regs.instruction_pc;
+ } else if (pc == 0xffffffff) {
+ last_addr_for_exception_3 = m68k_getpc () + 2;
+ } else {
+ last_addr_for_exception_3 = pc;
+ }
last_fault_for_exception_3 = addr;
last_op_for_exception_3 = opcode;
last_writeaccess_for_exception_3 = writeaccess;
void exception3 (uae_u32 opcode, uaecptr addr)
{
- exception3f (opcode, addr, 0, 0);
+ exception3f (opcode, addr, 0, 0, 0xffffffff);
}
-
void exception3i (uae_u32 opcode, uaecptr addr)
{
- exception3f (opcode, addr, 0, 1);
+ exception3f (opcode, addr, 0, 1, 0xffffffff);
+}
+void exception3 (uae_u32 opcode, uaecptr addr, int w, int i, uaecptr pc)
+{
+ exception3f (opcode, addr, w, i, pc);
}
void exception2 (uaecptr addr)
uae_u16 ins;
send_internalevent (INTERNALEVENT_CPURESET);
- if (currprefs.cpu_compatible || currprefs.cpu_cycle_exact) {
+ if ((currprefs.cpu_compatible || currprefs.cpu_cycle_exact) && currprefs.cpu_model <= 68020) {
custom_reset (0);
return;
}
// 2 = mouse
// 4 = joystick
int rawinput_log = 0;
+int tablet_log = 0;
#define _WIN32_WINNT 0x501 /* enable RAWINPUT support */
static TCHAR *tabletname;
static int tablet_x, tablet_y, tablet_z, tablet_pressure, tablet_buttons, tablet_proximity;
static int tablet_ax, tablet_ay, tablet_az, tablet_flags;
+static int tablet_div;
static void tablet_send (void)
{
if (!tablet_proximity) {
tablet_flags &= ~TPS_INVERT;
}
+ if (tablet_log & 4)
+ write_log (_T("TABLET: Proximity=%d\n"), inproxi);
tablet_send ();
}
void send_tablet (int x, int y, int z, int pres, uae_u32 buttons, int flags, int ax, int ay, int az, int rx, int ry, int rz, RECT *r)
{
- //write_log (_T("%d %d %d (%d,%d,%d), %08X %d\n"), x, y, pres, ax, ay, az, buttons, proxi);
+ if (tablet_log & 4)
+ write_log (_T("TABLET: B=%08X F=%08X X=%d Y=%d P=%d (%d,%d,%d)\n"), buttons, flags, x, y, pres, ax, ay, az);
if (axmax > 0)
ax = ax * 255 / axmax;
else
az = 0;
pres = pres * 255 / maxpres;
- tablet_x = x;
- tablet_y = ymax - y;
+ tablet_x = (x + tablet_div / 2) / tablet_div;
+ tablet_y = ymax - (y + tablet_div / 2) / tablet_div;
tablet_z = z;
tablet_pressure = pres;
tablet_buttons = buttons;
maxpres = pres.axMax;
xres = gettabletres (&tx);
yres = gettabletres (&ty);
+ tablet_div = 1;
+ while (xmax / tablet_div > 4095 || ymax / tablet_div > 4095) {
+ tablet_div *= 2;
+ }
+ xmax /= tablet_div;
+ ymax /= tablet_div;
+ xres /= tablet_div;
+ yres /= tablet_div;
+
+ if (tablet_div > 1)
+ write_log (_T("Divisor: %d (%d,%d)\n"), tablet_div, xmax, ymax);
tablet_proximity = -1;
tablet_x = -1;
inputdevice_tablet_info (xmax, ymax, zmax, axmax, aymax, azmax, xres, yres);
if (!sltexture)
return 0;
write_log (_T("%s: SL %d*%d texture allocated\n"), D3DHEAD, required_sl_texture_w, required_sl_texture_h);
- maskmult_x = 1.0;
- maskmult_y = 1.0;
+ maskmult_x = 1.0f;
+ maskmult_y = 1.0f;
return 1;
}
D3DLOCKED_RECT lock, slock;
D3DXIMAGE_INFO dinfo;
TCHAR tmp[MAX_DPATH];
+ int maskwidth, maskheight;
if (filename[0] == 0)
return 0;
}
masktexture_w = dinfo.Width;
masktexture_h = dinfo.Height;
- if (txdesc.Width == masktexture_w && txdesc.Height == masktexture_h && psEnabled) {
+ if (0 && txdesc.Width == masktexture_w && txdesc.Height == masktexture_h && psEnabled) {
// texture size == image size, no need to tile it (Wrap sampler does the rest)
- masktexture = tx;
- tx = NULL;
+ if (masktexture_w < window_w || masktexture_h < window_h) {
+ maskwidth = window_w;
+ maskheight = window_h;
+ } else {
+ masktexture = tx;
+ tx = NULL;
+ }
} else {
- masktexture = createtext (window_w, window_h, D3DFMT_X8R8G8B8);
+ maskwidth = window_w;
+ maskheight = window_h;
+ }
+ if (tx) {
+ masktexture = createtext (maskwidth, maskheight, D3DFMT_X8R8G8B8);
if (FAILED (hr)) {
write_log (_T("%s: mask texture creation failed: %s\n"), D3DHEAD, D3D_ErrorString (hr));
goto end;
return result;
}
+static void putmidibytes(uae_u8 *data, int len)
+{
+ if (!currprefs.win32_midirouter || !midi_ready)
+ return;
+ for (int i = 0; i < len; i++) {
+ BYTE b = data[i];
+ Midi_Parse(midi_output, &b);
+ }
+}
+
/*
* FUNCTION: MidiIn support and Callback function
*
TRACE((_T("add1byte buffer full %d %d (%02X)\n"), midi_inlast, midi_inptr, w));
return;
}
- midibuf[midi_inlast++] = (uae_u8)w;
+ midibuf[midi_inlast] = (uae_u8)w;
+ putmidibytes (&midibuf[midi_inlast], 1);
+ midi_inlast++;
}
static void add2byte(DWORD_PTR w) //put 2 Byte to Midibuffer
{
TRACE((_T("add2byte buffer full %d %d (%04X)\n"), midi_inlast, midi_inptr, w));
return;
}
- midibuf[midi_inlast++] = (uae_u8)w;
+ midibuf[midi_inlast+0] = (uae_u8)w;
w = w >> 8;
- midibuf[midi_inlast++] = (uae_u8)w;
+ midibuf[midi_inlast+1] = (uae_u8)w;
+ putmidibytes (&midibuf[midi_inlast], 2);
+ midi_inlast+=2;
}
static void add3byte(DWORD_PTR w) //put 3 Byte to Midibuffer
{
TRACE((_T("add3byte buffer full %d %d (%08X)\n"), midi_inlast, midi_inptr, w));
return;
}
- midibuf[midi_inlast++] = (uae_u8)w;
+ midibuf[midi_inlast+0] = (uae_u8)w;
w = w >> 8;
- midibuf[midi_inlast++] = (uae_u8)w;
+ midibuf[midi_inlast+1] = (uae_u8)w;
w = w >> 8;
- midibuf[midi_inlast++] = (uae_u8)w;
+ midibuf[midi_inlast+2] = (uae_u8)w;
+ putmidibytes (&midibuf[midi_inlast], 3);
+ midi_inlast+=3;
}
int ismidibyte(void)
goto end;
}
memcpy(&midibuf[midi_inlast], midiin->lpData, midiin->dwBytesRecorded);
+ putmidibytes(&midibuf[midi_inlast], midiin->dwBytesRecorded);
midi_inlast = midi_inlast + midiin->dwBytesRecorded;
}
#define IDC_SAMPLER_STEREO 1812
#define IDC_LISTDIALOG_LIST 1813
#define IDC_LOGPATH 1814
+#define IDC_MIDIROUTER 1815
#define ID__FLOPPYDRIVES 40004
#define ID_FLOPPYDRIVES_DF0 40005
#define ID_ST_CONFIGURATION 40010
PUSHBUTTON "Delete",IDC_DELETE,335,301,60,15\r
END\r
\r
-IDD_IOPORTS DIALOGEX 0, 0, 396, 275\r
+IDD_IOPORTS DIALOGEX 0, 0, 396, 295\r
STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
FONT 8, "MS Sans Serif", 0, 0, 0x1\r
BEGIN\r
COMBOBOX IDC_MIDIOUTLIST,58,204,145,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
RTEXT "In:",IDC_MIDI2,204,201,31,15,SS_CENTERIMAGE\r
COMBOBOX IDC_MIDIINLIST,239,203,145,134,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- GROUPBOX "Protection Dongle",IDC_STATIC,1,227,393,41,BS_LEFT\r
- GROUPBOX "MIDI",IDC_STATIC,1,191,393,34,BS_LEFT\r
- COMBOBOX IDC_DONGLELIST,58,245,232,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
+ GROUPBOX "Protection Dongle",IDC_STATIC,1,252,393,41,BS_LEFT\r
+ GROUPBOX "MIDI",IDC_STATIC,1,191,393,54,BS_LEFT\r
+ COMBOBOX IDC_DONGLELIST,58,270,232,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
+ CONTROL "Route MIDI In to MIDI Out",IDC_MIDIROUTER,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,41,227,170,12\r
END\r
\r
IDD_GAMEPORTS DIALOGEX 0, 0, 396, 288\r
STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
FONT 8, "MS Sans Serif", 0, 0, 0x0\r
BEGIN\r
- CONTROL "",IDC_RICHEDIT1,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,65,10,210,21\r
- CONTROL "",IDC_RICHEDIT2,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,43,41,260,20\r
+ CONTROL "",IDC_RICHEDIT1,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,65,10,210,35\r
+ CONTROL "",IDC_RICHEDIT2,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,43,59,260,20\r
PUSHBUTTON "Contributors",IDC_CONTRIBUTORS,132,100,80,15\r
CONTROL "",IDC_UAEHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,2,196,112,24\r
CONTROL "",IDC_PICASSOHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | NOT WS_VISIBLE | WS_DISABLED,211,131,112,24\r
PUSHBUTTON "...",IDC_PATHS_RIPS,383,189,11,15\r
PUSHBUTTON "Reset to defaults",IDC_PATHS_DEFAULT,2,212,92,14\r
PUSHBUTTON "Rescan ROMs",IDC_ROM_RESCAN,2,229,92,14\r
- PUSHBUTTON "Clear disk history",IDC_RESETDISKHISTORY,2,246,92,14\r
+ PUSHBUTTON "Clear disk history",IDC_RESETDISKHISTORY,99,229,92,14\r
COMBOBOX IDC_PATHS_DEFAULTTYPE,99,213,163,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- PUSHBUTTON "Clear registry",IDC_RESETREGISTRY,99,229,92,14\r
- CONTROL "Use relative paths",IDC_PATHS_RELATIVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,101,248,161,11\r
- EDITTEXT IDC_LOGPATH,3,289,336,13,ES_READONLY\r
- LTEXT "Log:",IDC_STATIC,5,273,67,10,SS_CENTERIMAGE\r
- PUSHBUTTON "Open [] Open selected file.",IDC_LOGOPEN,343,288,51,14\r
- COMBOBOX IDC_LOGSELECT,54,271,119,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- CONTROL "Enable full logging (temporary)",IDC_LOGENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,182,272,145,12\r
- PUSHBUTTON "Save All [] Save and open both logs and config file.",IDC_LOGSAVE,343,272,51,14\r
+ PUSHBUTTON "Clear registry",IDC_RESETREGISTRY,302,212,92,14\r
+ CONTROL "Use relative paths",IDC_PATHS_RELATIVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,199,231,189,11\r
+ EDITTEXT IDC_LOGPATH,7,281,324,13,ES_READONLY\r
+ PUSHBUTTON "Open [] Open selected file.",IDC_LOGOPEN,337,280,51,14\r
+ COMBOBOX IDC_LOGSELECT,7,263,169,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+ CONTROL "Enable full logging (temporary)",IDC_LOGENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,186,264,140,12\r
+ PUSHBUTTON "Save All [] Save and open both logs and config file.",IDC_LOGSAVE,337,264,51,14\r
+ GROUPBOX "Debug logging",IDC_STATIC,1,248,393,53\r
END\r
\r
IDD_QUICKSTART DIALOGEX 0, 0, 396, 262\r
\r
IDD_IOPORTS, DIALOG\r
BEGIN\r
+ BOTTOMMARGIN, 275\r
END\r
\r
IDD_GAMEPORTS, DIALOG\r
p->win32_uaescsimode = UAESCSI_CDEMU;
p->win32_midioutdev = -2;
p->win32_midiindev = 0;
+ p->win32_midirouter = false;
p->win32_automount_removable = 0;
p->win32_automount_drives = 0;
p->win32_automount_removabledrives = 0;
cfgfile_target_dwrite_str (f, _T("midiin_device_name"), _T("none"));
else
cfgfile_target_dwrite_str (f, _T("midiin_device_name"), midp->name);
+ cfgfile_target_dwrite_bool (f, _T("midirouter"), p->win32_midirouter);
cfgfile_target_dwrite_bool (f, _T("rtg_match_depth"), p->win32_rtgmatchdepth);
cfgfile_target_dwrite_bool (f, _T("rtg_scale_small"), p->win32_rtgscaleifsmall);
|| cfgfile_intval (option, value, _T("midi_device"), &p->win32_midioutdev, 1)
|| cfgfile_intval (option, value, _T("midiout_device"), &p->win32_midioutdev, 1)
|| cfgfile_intval (option, value, _T("midiin_device"), &p->win32_midiindev, 1)
+ || cfgfile_yesno (option, value, _T("midirouter"), &p->win32_midirouter)
|| cfgfile_intval (option, value, _T("samplersoundcard"), &p->win32_samplersoundcard, 1)
|| cfgfile_yesno (option, value, _T("notaskbarbutton"), &p->win32_notaskbarbutton)
|| cfgfile_yesno (option, value, _T("nonotificationicon"), &p->win32_nonotificationicon)
extern int inputdevice_logging;
extern int vsync_modechangetimeout;
extern int forcedframelatency;
+extern int tablet_log;
extern DWORD_PTR cpu_affinity, cpu_paffinity;
static DWORD_PTR original_affinity = -1;
debug_vsync_forced_delay = getval (np);
return 2;
}
+ if (!_tcscmp (arg, _T("tabletlog"))) {
+ tablet_log = getval (np);
+ return 2;
+ }
if (!_tcscmp (arg, _T("inputlog"))) {
rawinput_log = getval (np);
return 2;
#define LANG_DLL 1
//#define WINUAEBETA _T("")
-#define WINUAEBETA _T("17")
-#define WINUAEDATE MAKEBD(2012, 9, 10)
+#define WINUAEBETA _T("18")
+#define WINUAEDATE MAKEBD(2012, 9, 23)
#define WINUAEEXTRA _T("")
//#define WINUAEEXTRA _T("AmiKit Preview")
#define WINUAEREV _T("")
int ww = cw * scale;
int hh = ch * scale;
+
SetRect (sr, 0, 0, dst_width, dst_height);
SetRect (zr, 0, 0, 0, 0);
- dr->left = dr->top = 0;
- dr->right = dr->left + dst_width;
- dr->bottom = dr->top + dst_height;
+
+ dr->left = (temp_width - aws) /2;
+ dr->top = (temp_height - ahs) / 2;
+ dr->right = dr->left + dst_width * scale;
+ dr->bottom = dr->top + dst_height * scale;
+
OffsetRect (zr, cx * scale - (dst_width - ww) / 2, cy * scale - (dst_height - hh) / 2);
goto cont;
int screen_is_picasso = 0;
-extern int reopen (int);
+extern int reopen (int, bool);
#define VBLANKTH_KILL 0
#define VBLANKTH_CALIBRATE 1
c |= currprefs.gfx_filter_gamma != changed_prefs.gfx_filter_gamma ? (1|8) : 0;
//c |= currprefs.gfx_filter_ != changed_prefs.gfx_filter_ ? (1|8) : 0;
- c |= currprefs.gfx_luminance != changed_prefs.gfx_luminance ? (1|8) : 0;
- c |= currprefs.gfx_contrast != changed_prefs.gfx_contrast ? (1|8) : 0;
- c |= currprefs.gfx_gamma != changed_prefs.gfx_gamma ? (1|8) : 0;
+ c |= currprefs.gfx_luminance != changed_prefs.gfx_luminance ? (1 | 256) : 0;
+ c |= currprefs.gfx_contrast != changed_prefs.gfx_contrast ? (1 | 256) : 0;
+ c |= currprefs.gfx_gamma != changed_prefs.gfx_gamma ? (1 | 256) : 0;
c |= currprefs.gfx_resolution != changed_prefs.gfx_resolution ? (128) : 0;
c |= currprefs.gfx_vresolution != changed_prefs.gfx_vresolution ? (128) : 0;
currprefs.win32_rtgscaleaspectratio = changed_prefs.win32_rtgscaleaspectratio;
currprefs.win32_rtgvblankrate = changed_prefs.win32_rtgvblankrate;
- inputdevice_unacquire ();
+ bool unacquired = false;
if (c & 64) {
+ if (!unacquired) {
+ inputdevice_unacquire ();
+ unacquired = true;
+ }
DirectDraw_Fill (NULL, 0);
DirectDraw_BlitToPrimary (NULL);
}
+ if (c & 256) {
+ init_colors ();
+ drawing_init ();
+ }
if (c & 128) {
if (currprefs.gfx_autoresolution) {
c |= 2 | 8;
}
}
if ((c & 16) || ((c & 8) && keepfsmode)) {
- if (reopen (c & 2))
+ if (reopen (c & 2, unacquired == false)) {
c |= 2;
+ } else {
+ unacquired = true;
+ }
graphics_mode_changed = 1;
}
if ((c & 32) || ((c & 2) && !keepfsmode)) {
+ if (!unacquired) {
+ inputdevice_unacquire ();
+ unacquired = true;
+ }
close_windows ();
graphics_init ();
graphics_mode_changed = 1;
reset_sound ();
resume_sound ();
}
- inputdevice_acquire (TRUE);
+ if (unacquired)
+ inputdevice_acquire (TRUE);
return 1;
}
#endif
}
if (currprefs.win32_midiindev != changed_prefs.win32_midiindev ||
- currprefs.win32_midioutdev != changed_prefs.win32_midioutdev)
+ currprefs.win32_midioutdev != changed_prefs.win32_midioutdev ||
+ currprefs.win32_midirouter != changed_prefs.win32_midirouter)
{
currprefs.win32_midiindev = changed_prefs.win32_midiindev;
currprefs.win32_midioutdev = changed_prefs.win32_midioutdev;
+ currprefs.win32_midirouter = changed_prefs.win32_midirouter;
#ifdef SERIAL_PORT
if (midi_ready) {
Midi_Close ();
return p->gfx_apmode[idx].gfx_fullscreen == GFX_FULLSCREEN ? 1 : (p->gfx_apmode[idx].gfx_fullscreen == GFX_FULLWINDOW ? -1 : 0);
}
-static int reopen (int full)
+static int reopen (int full, bool unacquire)
{
int quick = 0;
int idx = screen_is_picasso ? 1 : 0;
if (!quick)
return 1;
+ if (unacquire) {
+ inputdevice_unacquire ();
+ }
+
open_windows (0);
if (isvsync () < 0)
static int gui_width, gui_height;
static bool gui_resize;
+static bool gui_resize_allowed;
// Internal panel max size: 396, 318
static int mm = 0;
SendDlgItemMessage (hDlg, IDC_RICHEDIT1, EM_GETCHARFORMAT, 0, (LPARAM) & CharFormat);
CharFormat.dwMask |= CFM_BOLD | CFM_SIZE | CFM_FACE;
CharFormat.dwEffects = CFE_BOLD;
- CharFormat.yHeight = 18 * 20; /* height in twips, where a twip is 1/20th of a point - for a pt.size of 18 */
+ CharFormat.yHeight = 24 * 20; /* height in twips, where a twip is 1/20th of a point */
- _tcscpy (CharFormat.szFaceName, _T("Times New Roman"));
+ _tcscpy (CharFormat.szFaceName, os_vista ? _T("Segoe UI") : _T("Tahoma"));
SendDlgItemMessage (hDlg, IDC_RICHEDIT1, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) & CharFormat);
SendDlgItemMessage (hDlg, IDC_RICHEDIT1, EM_SETBKGNDCOLOR, 0, GetSysColor (COLOR_3DFACE));
SetDlgItemText (hDlg, IDC_RICHEDIT2, VersionStr );
SendDlgItemMessage (hDlg, IDC_RICHEDIT2, EM_GETCHARFORMAT, 0, (LPARAM) & CharFormat);
CharFormat.dwMask |= CFM_SIZE | CFM_FACE;
- CharFormat.yHeight = 10 * 20;
- _tcscpy (CharFormat.szFaceName, _T("Times New Roman"));
+ CharFormat.yHeight = 12 * 20;
+ _tcscpy (CharFormat.szFaceName, os_vista ? _T("Segoe UI") : _T("Tahoma"));
SendDlgItemMessage (hDlg, IDC_RICHEDIT2, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) & CharFormat);
SendDlgItemMessage (hDlg, IDC_RICHEDIT2, EM_SETBKGNDCOLOR, 0, GetSysColor (COLOR_3DFACE));
for(i = 0; urls[i].id >= 0; i++)
- SetupRichText(hDlg, &urls[i]);
+ SetupRichText (hDlg, &urls[i]);
}
static INT_PTR CALLBACK AboutDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
static void set_da (HWND hDlg)
{
int *p = getp_da ();
+ if (!p)
+ return;
TCHAR buf[10];
SendDlgItemMessage (hDlg, IDC_DA_SLIDER, TBM_SETPOS, TRUE, (*p) / 10);
_stprintf(buf, _T("%.1f"), (double)((*p) / 10.0));
misc_kbled (hDlg, IDC_KBLED3, workprefs.keyboard_leds[2]);
CheckDlgButton (hDlg, IDC_KBLED_USB, workprefs.win32_kbledmode);
CheckDlgButton (hDlg, IDC_GUI_RESIZE, gui_resize);
+ ew (hDlg, IDC_GUI_RESIZE, gui_resize_allowed);
misc_scsi (hDlg);
misc_lang (hDlg);
ew (hDlg, IDC_CS_CACHE_TEXT, enable);
ew (hDlg, IDC_CACHE, enable);
ew (hDlg, IDC_JITENABLE, jitenable);
- ew (hDlg, IDC_COMPATIBLE, (!workprefs.cpu_cycle_exact && !workprefs.cachesize) || workprefs.cpu_model >= 68040);
+ ew (hDlg, IDC_COMPATIBLE, !workprefs.cpu_cycle_exact);
ew (hDlg, IDC_COMPATIBLE_FPU, workprefs.fpu_model > 0);
#if 0
ew (hDlg, IDC_CPU_MULTIPLIER, workprefs.cpu_cycle_exact);
}
ew (hDlg, IDC_MIDIINLIST, workprefs.win32_midioutdev < -1 ? FALSE : TRUE);
+ workprefs.win32_midirouter = ischecked (hDlg, IDC_MIDIROUTER);
+
item = SendDlgItemMessage (hDlg, IDC_SERIAL, CB_GETCURSEL, 0, 0L);
if (item != CB_ERR && item > 0) {
workprefs.use_serial = 1;
else
SendDlgItemMessage (hDlg, IDC_MIDIINLIST, CB_SETCURSEL, 0, 0);
ew (hDlg, IDC_MIDIINLIST, workprefs.win32_midioutdev < -1 ? FALSE : TRUE);
+ ew (hDlg, IDC_MIDIROUTER, workprefs.win32_midioutdev >= -1 && workprefs.win32_midiindev >= -1);
+ CheckDlgButton (hDlg, IDC_MIDIROUTER, workprefs.win32_midirouter);
CheckDlgButton (hDlg, IDC_UAESERIAL, workprefs.uaeserial);
CheckDlgButton (hDlg, IDC_SER_SHARED, workprefs.serial_demand);
if (isprinter ()) {
closeprinter ();
}
- } else if (wParam == IDC_UAESERIAL || wParam == IDC_SER_SHARED || wParam == IDC_SER_DIRECT || wParam == IDC_SER_CTSRTS || wParam == IDC_PRINTERAUTOFLUSH || wParam == IDC_SAMPLER_STEREO) {
+ } else if (wParam == IDC_UAESERIAL || wParam == IDC_SER_SHARED || wParam == IDC_SER_DIRECT || wParam == IDC_SER_CTSRTS || wParam == IDC_PRINTERAUTOFLUSH || wParam == IDC_SAMPLER_STEREO || wParam == IDC_MIDIROUTER) {
values_from_portsdlg (hDlg);
} else {
if (HIWORD (wParam) == CBN_SELCHANGE) {
{
if (full_property_sheet || isfullscreen () <= 0)
return false;
- if (currprefs.gfx_size_fs.width >= gui_width && currprefs.gfx_size.height >= gui_height)
+ if (isfullscreen () > 0 && currprefs.gfx_size_fs.width > gui_width && currprefs.gfx_size.height > gui_height)
return false;
struct MultiDisplay *mdc = getdisplay (&currprefs);
for (int i = 0; Displays[i].monitorid; i++) {
static void centerWindow (HWND hDlg)
{
RECT rc, rcDlg, rcOwner;
- HWND owner = GetParent(hDlg);
int x = 0, y = 0;
POINT pt1, pt2;
+ struct MultiDisplay *mdc = getdisplay (&currprefs);
+ HWND owner = GetParent (hDlg);
if (owner == NULL)
owner = GetDesktopWindow ();
if (isfullscreen () == 0) {
regqueryint (NULL, _T("GUIPosFSX"), &x);
regqueryint (NULL, _T("GUIPosFSY"), &y);
if (dodialogmousemove ()) {
- x = 0;
- y = 0;
+ x = mdc->rect.left;
+ y = mdc->rect.top;
}
}
SetForegroundWindow (hDlg);
pt2.x = x + 16;
pt2.y = y + GetSystemMetrics (SM_CYMENU) + GetSystemMetrics (SM_CYBORDER);
if (MonitorFromPoint (pt1, MONITOR_DEFAULTTONULL) == NULL && MonitorFromPoint (pt2, MONITOR_DEFAULTTONULL) == NULL) {
- x = 0;
- y = 0;
+ x = mdc->rect.left;
+ y = mdc->rect.top;
}
} else {
- x = 16;
- y = 16;
+ x = mdc->rect.left + 16;
+ y = mdc->rect.top + 16;
}
}
+ //write_log (_T("centerwindow %dx%d\n"), x, y);
dialog_x_offset = x;
dialog_y_offset = y;
SetWindowPos (hDlg, HWND_TOP, x, y, 0, 0, SWP_NOSIZE);
{
case WM_SIZING:
{
- if (!recursive) {
+ if (!recursive && gui_resize_allowed) {
RECT *r = (RECT*)lParam;
if (r->right - r->left < MIN_GUI_INTERNAL_WIDTH)
r->right = r->left + MIN_GUI_INTERNAL_WIDTH;
break;
}
case WM_ENTERSIZEMOVE:
- if (!recursive) {
+ if (!recursive && gui_resize_allowed) {
getguisize (hDlg, &oldwidth, &oldheight);
return FALSE;
}
break;
case WM_EXITSIZEMOVE:
- if (!recursive) {
+ if (!recursive && gui_resize_allowed) {
int w, h;
getguisize (hDlg, &w, &h);
if (w != oldwidth || h != oldheight) {
rc.bottom -= rc.top;
rc.left = 0;
rc.top = 0;
+
+ //write_log (_T("SW=%d SH=%d %dx%d\n"), sw, sh, rc.right, rc.bottom);
+
if (rc.right <= sw && rc.bottom <= sh)
return;
pt2.x = pt.x;
int v = 0;
setdefaultguisize ();
regqueryint (NULL, _T("GUIResize"), &v);
- gui_resize = v != 0;
+ gui_resize_allowed = gui_resize = v != 0;
if (full_property_sheet || isfullscreen () == 0) {
regqueryint (NULL, _T("GUISizeX"), &gui_width);
regqueryint (NULL, _T("GUISizeY"), &gui_height);
scaleresource_setdefaults ();
setdefaultguisize ();
fmultx = 0;
+ write_log (_T("GUI size reset\n"));
}
if (all_options || !configstore)
scaleresource_setmult (hwnd, -fmultx, -fmulty);
} else {
scaleresource_setmult (hwnd, gui_width, gui_height);
- write_log (_T("Requested GUI size = %dx%d\n"), gui_width, gui_height);
+ write_log (_T("Requested GUI size = %dx%d (%dx%d)\n"), gui_width, gui_height, workprefs.gfx_size.width, workprefs.gfx_size.height);
+ if (dodialogmousemove () && isfullscreen() > 0) {
+ if (gui_width >= workprefs.gfx_size.width || gui_height >= workprefs.gfx_size.height) {
+ write_log (_T("GUI larger than screen, resize disabled\n"));
+ gui_resize_allowed = false;
+ }
+ }
}
- tres = scaleresource (panelresource, hwnd, gui_resize);
+
+ tres = scaleresource (panelresource, hwnd, gui_resize_allowed);
dhwnd = CreateDialogIndirect (tres->inst, tres->resource, hwnd, DialogProc);
dialog_rect.top = dialog_rect.left = 0;
dialog_rect.right = tres->width;
regqueryfont (NULL, fontprefix, fontreg[0], fontname_gui, &fontsize_gui, &fontstyle_gui, &fontweight_gui);
regqueryfont (NULL, fontprefix, fontreg[1], fontname_list, &fontsize_list, &fontstyle_list, &fontweight_list);
+ //write_log (_T("GUI font %s:%d:%d:%d\n"), fontname_gui, fontsize_gui, fontstyle_gui, fontweight_gui);
+ //write_log (_T("List font %s:%d:%d:%d\n"), fontname_list, fontsize_list, fontstyle_list, fontweight_list);
+
openfont (true);
}
if (multy < 50)
multy = 50;
+ //write_log (_T("MX=%f MY=%f\n"), multx, multy);
}
void scaleresource_getmult (int *mx, int *my)
- restore only single input target to default.
+Beta 18:
+
+- FPS and CPU% react quicker now. Can Show previously hidden CPU usage spikes. NOTE: CPU% now showing "myserious" usage spikes does not mean emulation has become slower!
+- Automatically limit tablet mode X and Y coordinate range to prevent 16-bit signed overflows if tablet has large resolution. (not confirmed)
+- Always generate full size mask texture, workaround for mask pixel mapping errors in some scaling modes.
+- Only release pressed keys if window or screen gets reopened (prevents stuck keys), not when any graphics related config option changes.
+- Do not allow GUI resize if GUI is larger than fullscreen resolution because Windows may automatically resize it to fit on screen, making GUI completely unusable.
+- Always recalculate Display panel horiz/vert centering option internal values when configuration changes.
+- 68030+ CPU and more compatible checkbox checked: enable very basic prefetch emulation, only 68000-68020 have more complex prefetch emulation.
+- JIT + more compatible also enables basic prefetch. Only works if code is not yet translated. (Not much point but it was easy to do)
+- Added route all MIDI In data to MIDI Out configuration option.
+- Improved 68030 MMU instruction decoding. WHDLoad + MMU option enabled + 68030 CPU does not crash anymore. (No, there still is no 68030 MMU emulation, it is
+ only emulating 68EC030 without MMU circuitry which probably does not exist in real world + hack for A3000 1.4 ROM)
+- Few (rare) variants of MOVES didn't increase PC correctly.
+- BSR.L was emulated as 68020+ instruction on 68000/010. (BCC.L was correct)
+- For some reason 68000 BSR.B and BSR.W address exception stack frame PC field points to new odd PC, instead of address of BSR opcode.
+
Beta 17:
- Enabled windowed mode window maximize button.
1111 0011 01ss sSSS:202:?????:?????:10: FRESTORE s[!Dreg,Areg,Apdi,Immd]
% 68030 MMU (allowed addressing modes not checked!)
-1111 0000 00ss sSSS:342:?????:?????:11: MMUOP030 s[Aind,Ad16,Ad8r,absl,absw],#1
+1111 0000 00ss sSSS:342:?????:?????:11: MMUOP030 s[Dreg,Areg,Apdi,Aipi,Aind,Ad16,Ad8r,absl,absw],#1
% 68040/68060 instructions
1111 0100 pp00 1rrr:402:-----:-----:02: CINVL #p,Ar