#include "disk.h"
#include "blkdev.h"
#include "statusline.h"
+#include "debug.h"
static int config_newfilesystem;
static struct strlist *temp_lines;
static const TCHAR *maxvert[] = { L"nointerlace", L"interlace", 0 };
static const TCHAR *abspointers[] = { L"none", L"mousehack", L"tablet", 0 };
static const TCHAR *magiccursors[] = { L"both", L"native", L"host", 0 };
-static const TCHAR *autoscale[] = { L"none", L"auto", L"standard", L"max", L"scale", L"resize", L"center", 0 };
+static const TCHAR *autoscale[] = { L"none", L"auto", L"standard", L"max", L"scale", L"resize", L"center", L"manual", 0 };
static const TCHAR *joyportmodes[] = { L"", L"mouse", L"djoy", L"gamepad", L"ajoy", L"cdtvjoy", L"cd32joy", L"lightpen", 0 };
static const TCHAR *joyaf[] = { L"none", L"normal", L"toggle", 0 };
static const TCHAR *epsonprinter[] = { L"none", L"ascii", L"epson_matrix_9pin", L"epson_matrix_24pin", L"epson_matrix_48pin", 0 };
cfgfile_write_bool (f, L"use_debugger", p->start_debugger);
cfgfile_write_rom (f, p->path_rom, p->romfile, L"kickstart_rom_file");
cfgfile_write_rom (f, p->path_rom, p->romextfile, L"kickstart_ext_rom_file");
+ if (p->romextfile2addr) {
+ cfgfile_write (f, L"kickstart_ext_rom_file2_address", L"%x", p->romextfile2addr);
+ cfgfile_write_rom (f, p->path_rom, p->romextfile2, L"kickstart_ext_rom_file2");
+ }
if (p->romident[0])
cfgfile_dwrite_str (f, L"kickstart_rom", p->romident);
if (p->romextident[0])
}
return 1;
}
+
int cfgfile_intval (const TCHAR *option, const TCHAR *value, const TCHAR *name, int *location, int scale)
{
unsigned int v = 0;
return r;
}
-
-
int cfgfile_strval (const TCHAR *option, const TCHAR *value, const TCHAR *name, int *location, const TCHAR *table[], int more)
{
int val;
xfree (romtxt);
}
-static struct uaedev_config_info *getuci(struct uae_prefs *p)
+static struct uaedev_config_info *getuci (struct uae_prefs *p)
{
if (p->mountitems < MOUNT_CONFIG_SIZE)
return &p->mountconfig[p->mountitems++];
|| cfgfile_intval (option, value, L"parallel_autoflush", &p->parallel_autoflush_time, 1)
|| cfgfile_intval (option, value, L"uae_hide", &p->uae_hide, 1)
|| cfgfile_intval (option, value, L"cpu_frequency", &p->cpu_frequency, 1)
+ || cfgfile_intval (option, value, L"kickstart_ext_rom_file2addr", &p->romextfile2addr, 1)
|| cfgfile_intval (option, value, L"catweasel", &p->catweasel, 1))
return 1;
if (cfgfile_path (option, value, L"kickstart_rom_file", p->romfile, sizeof p->romfile / sizeof (TCHAR))
|| cfgfile_path (option, value, L"kickstart_ext_rom_file", p->romextfile, sizeof p->romextfile / sizeof (TCHAR))
+ || cfgfile_path (option, value, L"kickstart_ext_rom_file2", p->romextfile2, sizeof p->romextfile2 / sizeof (TCHAR))
|| cfgfile_rom (option, value, L"kickstart_rom_file_id", p->romfile, sizeof p->romfile / sizeof (TCHAR))
|| cfgfile_rom (option, value, L"kickstart_ext_rom_file_id", p->romextfile, sizeof p->romextfile / sizeof (TCHAR))
|| cfgfile_path (option, value, L"amax_rom_file", p->amaxromfile, sizeof p->amaxromfile / sizeof (TCHAR))
subst (p->path_floppy, p->floppyslots[i].df, sizeof p->floppyslots[i].df / sizeof (TCHAR));
subst (p->path_rom, p->romfile, sizeof p->romfile / sizeof (TCHAR));
subst (p->path_rom, p->romextfile, sizeof p->romextfile / sizeof (TCHAR));
+ subst (p->path_rom, p->romextfile2, sizeof p->romextfile2 / sizeof (TCHAR));
return 1;
}
j++;
}
if (doout) {
- outp[cnt++] = my_strdup (tmp1);
- outp[cnt] = 0;
+ if (_tcslen (tmp1) > 0) {
+ outp[cnt++] = my_strdup (tmp1);
+ outp[cnt] = 0;
+ }
tmp1[0] = 0;
doout = 0;
j = 0;
for (i = 0; i < argv; i++) {
if (i + 2 <= argv) {
- if (!inputdevice_uaelib (argc[i], argc[i + 1])) {
+ if (!_tcsicmp (argc[i], L"dbg")) {
+ debug_parser (argc[i + 1], out, outsize);
+ } else if (!inputdevice_uaelib (argc[i], argc[i + 1])) {
if (!cfgfile_parse_option (&changed_prefs, argc[i], argc[i + 1], 0)) {
err = 5;
break;
configure_rom (p, roms, 0);
_tcscpy (p->romextfile, L"");
+ _tcscpy (p->romextfile2, L"");
+ p->romextfile2addr = 0;
_tcscpy (p->flashfile, L"");
_tcscpy (p->cartfile, L"");
#ifdef JIT
special_mem |= S_READ;
#endif
- //write_log("R: %x (%x), PC=%08x\n", addr, addr >> 2, M68K_GETPC);
+// write_log(L"R: %x (%x), PC=%08x\n", addr, (addr & 0xff) >> 2, M68K_GETPC);
#ifdef CDTV
if (currprefs.cs_cdtvram && addr >= 0xdc8000)
return cdtv_battram_read (addr);
#ifdef JIT
special_mem |= S_WRITE;
#endif
- //write_log("W: %x: %x, PC=%08x\n", addr, value & 0xff, M68K_GETPC);
+// write_log(L"W: %x (%x): %x, PC=%08x\n", addr, (addr & 0xff) >> 2, value & 0xff, M68K_GETPC);
#ifdef CDTV
if (currprefs.cs_cdtvram && addr >= 0xdc8000) {
cdtv_battram_write (addr, value);
mwn = &mwnodes[i];
if (mwn->size == 0)
continue;
- buf = buf_out (buf, &bufsize, L"%d: %08X - %08X (%d) %c%c%c",
+ buf = buf_out (buf, &bufsize, L"%2d: %08X - %08X (%d) %c%c%c",
i, mwn->addr, mwn->addr + (mwn->size - 1), mwn->size,
(mwn->rwi & 1) ? 'R' : ' ', (mwn->rwi & 2) ? 'W' : ' ', (mwn->rwi & 4) ? 'I' : ' ');
if (mwn->frozen)
{
int num;
struct memwatch_node *mwn;
- TCHAR nc;
+ TCHAR nc, *cp;
if (!memwatch_enabled) {
initialize_memwatch (0);
console_out (L"Memwatch breakpoints enabled\n");
}
+ cp = *c;
ignore_ws (c);
if (!more_params (c)) {
memwatch_dump (-1);
}
return;
}
- num = nc - '0';
+ *c = cp;
+ num = readint (c);
if (num < 0 || num >= MEMWATCH_TOTAL)
return;
mwn = &mwnodes[num];
m68k_disasm (stdout, addr, NULL, 1);
hits++;
if (hits > 100) {
- write_log (L"Too many hits. End addr = %08X\n", addr);
+ console_out_f (L"Too many hits. End addr = %08X\n", addr);
break;
}
}
}
}
-static void debug_1 (void)
-{
- TCHAR input[MAX_LINEWIDTH];
- uaecptr nxdis, nxmem, addr;
+static uaecptr nxdis, nxmem;
- m68k_dumpstate (stdout, &nextpc);
- nxdis = nextpc; nxmem = 0;
- debugger_active = 1;
+static BOOL debug_line (TCHAR *input)
+{
+ TCHAR cmd, *inptr;
+ uaecptr addr;
- for (;;) {
- TCHAR cmd, *inptr;
- int v;
+ inptr = input;
+ cmd = next_char (&inptr);
- if (!debugger_active)
- return;
- update_debug_info ();
- console_out (L">");
- console_flush ();
- debug_linecounter = 0;
- v = console_get (input, MAX_LINEWIDTH);
- if (v < 0)
- return;
- if (v == 0)
- continue;
-
- inptr = input;
- cmd = next_char (&inptr);
- switch (cmd)
- {
+ switch (cmd)
+ {
case 'c': dumpcia (); dumpdisk (); dumpcustom (); break;
case 'i':
{
debug_illegal_mask = debug_illegal ? 0 : -1;
debug_illegal_mask &= ~((uae_u64)255 << 24); // mask interrupts
}
- write_log (L"Exception breakpoint mask: %0I64X\n", debug_illegal_mask);
+ console_out_f (L"Exception breakpoint mask: %0I64X\n", debug_illegal_mask);
debug_illegal = debug_illegal_mask ? 1 : 0;
} else {
addr = 0xffffffff;
}
set_special (SPCFLAG_BRK);
exception_debugging = 1;
- return;
+ return true;
case 'z':
skipaddr_start = nextpc;
skipaddr_doskip = 1;
do_skip = 1;
exception_debugging = 1;
- return;
+ return true;
case 'f':
if (inptr[0] == 'a') {
} else if (inptr[0] == 'p') {
inptr++;
if (process_breakpoint (&inptr))
- return;
+ return true;
} else {
if (instruction_breakpoint (&inptr))
- return;
+ return true;
}
break;
case 'q':
uae_quit();
deactivate_debugger();
- return;
+ return true;
case 'g':
if (more_params (&inptr)) {
fill_prefetch ();
}
deactivate_debugger();
- return;
+ return true;
case 'x':
if (_totupper(inptr[0]) == 'X') {
} else {
deactivate_debugger();
close_console();
- return;
+ return true;
}
break;
if (copper_debugger (&inptr)) {
debugger_active = 0;
debugging = 0;
- return;
+ return true;
}
break;
}
break;
case 'b':
if (staterecorder (&inptr))
- return;
+ return true;
break;
case 'U':
if (currprefs.cpu_model && more_params (&inptr)) {
else
debug_help ();
break;
- }
+ }
+ return false;
+}
+
+static void debug_1 (void)
+{
+ TCHAR input[MAX_LINEWIDTH];
+
+ m68k_dumpstate (stdout, &nextpc);
+ nxdis = nextpc; nxmem = 0;
+ debugger_active = 1;
+
+ for (;;) {
+ int v;
+
+ if (!debugger_active)
+ return;
+ update_debug_info ();
+ console_out (L">");
+ console_flush ();
+ debug_linecounter = 0;
+ v = console_get (input, MAX_LINEWIDTH);
+ if (v < 0)
+ return;
+ if (v == 0)
+ continue;
+ if (debug_line (input))
+ return;
}
}
set_special (SPCFLAG_BRK);
return 1;
}
+
+void debug_parser (const TCHAR *cmd, TCHAR *out, uae_u32 outsize)
+{
+ TCHAR empty[2] = { 0 };
+ TCHAR *input = my_strdup (cmd);
+ if (out == NULL || outsize == 0)
+ setconsolemode (empty, 1);
+ else
+ setconsolemode (out, outsize);
+ debug_line (input);
+ setconsolemode (NULL, 0);
+ xfree (input);
+}
static int gclow, gcloh, gclox, gcloy;
+void get_custom_topedge (int *x, int *y)
+{
+ *x = visible_left_border;
+ *y = minfirstline << currprefs.gfx_vresolution;
+}
+
static void reset_custom_limits (void)
{
gclow = gcloh = gclox = gcloy = 0;
if (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 ((beamcon0 & 0x80) && max_diwstop > 0) {
+ } else if ((beamcon0 & 0x80) && max_diwstop > 0 && !currprefs.gfx_filter_autoscale) {
int w = gfxvidinfo.width;
if (max_diwstop - min_diwstart < w)
visible_left_border = (max_diwstop - min_diwstart - w) / 2 + min_diwstart;
visible_left_border = max_diwlastword - gfxvidinfo.width;
}
- if (currprefs.gfx_xcenter_pos >= 0 && !currprefs.gfx_filter_autoscale) {
- int val = currprefs.gfx_xcenter_pos >> RES_MAX;
-#if 0
- if (currprefs.gfx_xcenter_size > 0) {
- int diff = ((gfxvidinfo.width << (RES_MAX - currprefs.gfx_resolution)) - currprefs.gfx_xcenter_size) / 1;
- write_log (L"%d %d\n", currprefs.gfx_xcenter_size, gfxvidinfo.width);
- val -= diff >> RES_MAX;
- }
-#endif
- if (val < 56)
- val = 56;
- visible_left_border = val + (DIW_DDF_OFFSET << currprefs.gfx_resolution) - (DISPLAY_LEFT_SHIFT * 2 - (DISPLAY_LEFT_SHIFT << currprefs.gfx_resolution));
- }
-
if (visible_left_border > max_diwlastword - 32)
visible_left_border = max_diwlastword - 32;
if (visible_left_border < 0)
visible_left_border = 0;
visible_left_border &= ~((xshift (1, lores_shift)) - 1);
+ //write_log (L"%d %d %d %d %d\n", max_diwlastword, gfxvidinfo.width, lores_shift, currprefs.gfx_resolution, visible_left_border);
+
+
linetoscr_x_adjust_bytes = visible_left_border * gfxvidinfo.pixbytes;
visible_right_border = visible_left_border + gfxvidinfo.width;
thisframe_y_adjust = prev_y_adjust;
}
}
- if (currprefs.gfx_ycenter_pos >= 0 && !currprefs.gfx_filter_autoscale) {
- thisframe_y_adjust = currprefs.gfx_ycenter_pos >> 1;
-#if 0
- if (currprefs.gfx_ycenter_size > 0) {
- int diff = (currprefs.gfx_ycenter_size - (gfxvidinfo.height << (linedbl ? 0 : 1))) / 2;
- thisframe_y_adjust += diff >> 1;
- }
-#endif
- if (thisframe_y_adjust + max_drawn_amiga_line > 2 * maxvpos_nom)
- thisframe_y_adjust = 2 * maxvpos_nom - max_drawn_amiga_line;
- if (thisframe_y_adjust < 0)
- thisframe_y_adjust = 0;
- } else {
+
/* Make sure the value makes sense */
- if (thisframe_y_adjust + max_drawn_amiga_line > maxvpos_nom)
- thisframe_y_adjust = maxvpos_nom - max_drawn_amiga_line;
- if (thisframe_y_adjust < minfirstline)
- thisframe_y_adjust = minfirstline;
- }
+ if (thisframe_y_adjust + max_drawn_amiga_line > maxvpos_nom)
+ thisframe_y_adjust = maxvpos_nom - max_drawn_amiga_line;
+ if (thisframe_y_adjust < minfirstline)
+ thisframe_y_adjust = minfirstline;
+
thisframe_y_adjust_real = thisframe_y_adjust << linedbl;
tmp = (maxvpos_nom - thisframe_y_adjust) << linedbl;
if (tmp != max_ypos_thisframe) {
/* 00 / 02 */
/* er_Type */
-#define Z2_MEM_8MB 0x00 /* Size of Memory Block */
-#define Z2_MEM_4MB 0x07
-#define Z2_MEM_2MB 0x06
-#define Z2_MEM_1MB 0x05
+#define Z2_MEM_8MB 0x00 /* Size of Memory Block */
+#define Z2_MEM_4MB 0x07
+#define Z2_MEM_2MB 0x06
+#define Z2_MEM_1MB 0x05
#define Z2_MEM_512KB 0x04
#define Z2_MEM_256KB 0x03
#define Z2_MEM_128KB 0x02
-#define Z2_MEM_64KB 0x01
+#define Z2_MEM_64KB 0x01
/* extended definitions */
-#define Z2_MEM_16MB 0x00
-#define Z2_MEM_32MB 0x01
-#define Z2_MEM_64MB 0x02
+#define Z2_MEM_16MB 0x00
+#define Z2_MEM_32MB 0x01
+#define Z2_MEM_64MB 0x02
#define Z2_MEM_128MB 0x03
#define Z2_MEM_256MB 0x04
#define Z2_MEM_512MB 0x05
-#define Z2_MEM_1GB 0x06
+#define Z2_MEM_1GB 0x06
#define chainedconfig 0x08 /* Next config is part of the same card */
#define rom_card 0x10 /* ROM vector is valid */
/* ********************************************************** */
/* 08 - 0A */
/* er_Flags */
-#define Z3_MEM_64KB 0x02
+#define Z3_MEM_64KB 0x02
#define Z3_MEM_128KB 0x03
#define Z3_MEM_256KB 0x04
#define Z3_MEM_512KB 0x05
-#define Z3_MEM_1MB 0x06 /* Zorro III card subsize */
-#define Z3_MEM_2MB 0x07
-#define Z3_MEM_4MB 0x08
-#define Z3_MEM_6MB 0x09
-#define Z3_MEM_8MB 0x0a
-#define Z3_MEM_10MB 0x0b
-#define Z3_MEM_12MB 0x0c
-#define Z3_MEM_14MB 0x0d
-#define Z3_MEM_16MB 0x00
-#define Z3_MEM_AUTO 0x01
+#define Z3_MEM_1MB 0x06 /* Zorro III card subsize */
+#define Z3_MEM_2MB 0x07
+#define Z3_MEM_4MB 0x08
+#define Z3_MEM_6MB 0x09
+#define Z3_MEM_8MB 0x0a
+#define Z3_MEM_10MB 0x0b
+#define Z3_MEM_12MB 0x0c
+#define Z3_MEM_14MB 0x0d
+#define Z3_MEM_16MB 0x00
+#define Z3_MEM_AUTO 0x01
#define Z3_MEM_defunct1 0x0e
#define Z3_MEM_defunct2 0x0f
// Z3 P96 RAM
p2 = p96ram_start >> 16;
}
- if (value != p2) {
- put_word (regs.regs[11] + 0x20, p2);
- put_word (regs.regs[11] + 0x28, p2);
- }
+ put_word (regs.regs[11] + 0x20, p2);
+ put_word (regs.regs[11] + 0x28, p2);
// -Bernd Roesch
expamem_hi = p2;
(*card_map[ecard]) ();
ecard++;
- if (value != p2)
+ if (p1 != p2)
write_log (L" Card %d remapped %04x0000 -> %04x0000\n", ecard, p1, p2);
write_log (L" Card %d (Zorro%s) done.\n", ecard, expamem_type () == 0xc0 ? L"II" : L"III");
if (ecard < cardno)
PUT_PCK_RES1 (packet, DOS_FALSE);
PUT_PCK_RES2 (packet, ERROR_NO_MORE_ENTRIES);
}
-extern void activate_debugger(void);
+
static void do_find (Unit *unit, dpacket packet, int mode, int create, int fallback)
{
uaecptr fh = GET_PCK_ARG1 (packet) << 2;
TRACE((L"fh=%x lock=%x name=%x\n", fh, lock, name));
DUMPLOCK(unit, lock);
- if (!_tcsicmp(bstr(unit,name), L"Nù"))
- activate_debugger();
-
aino = find_aino (unit, lock, bstr (unit, name), &err);
if (aino == 0 || (err != 0 && err != ERROR_OBJECT_NOT_AROUND)) {
#define MAKE_FPSR(r) (regs).fp_result=(r)
+static __inline__ void native_set_fpucw (uae_u32 m68k_cw)
+{
+#ifdef _WIN32
+ // RN, RZ, RM, RP
+ static unsigned int fp87_round[4] = { _RC_NEAR, _RC_CHOP, _RC_DOWN, _RC_UP };
+ // X, S, D, U
+ static unsigned int fp87_prec[4] = { _PC_64 , _PC_24 , _PC_53, 0 };
+ _control87(fp87_round[(m68k_cw >> 4) & 3] | fp87_prec[(m68k_cw >> 6) & 3], _MCW_RC | _MCW_PC);
+#else
static uae_u16 x87_cw_tab[] = {
0x137f, 0x1f7f, 0x177f, 0x1b7f, /* Extended */
0x107f, 0x1c7f, 0x147f, 0x187f, /* Single */
0x127f, 0x1e7f, 0x167f, 0x1a7f, /* Double */
0x137f, 0x1f7f, 0x177f, 0x1b7f /* undefined */
};
-/* Nearest, toZero, Down, Up */
-static __inline__ void native_set_fpucw (uae_u32 m68k_cw)
-{
#if USE_X86_FPUCW
uae_u16 x87_cw = x87_cw_tab[(m68k_cw >> 4) & 0xf];
__asm__ ("fldcw %0" : : "m" (*&x87_cw));
#endif
#endif
+#endif
}
#if defined(uae_s64) /* Close enough for government work? */
extern int instruction_breakpoint (TCHAR **c);
extern int debug_bankchange (int);
extern void log_dma_record (void);
+extern void debug_parser (const TCHAR *cmd, TCHAR *out, uae_u32 outsize);
-#define BREAKPOINT_TOTAL 8
+#define BREAKPOINT_TOTAL 20
struct breakpoint_node {
uaecptr addr;
int enabled;
};
extern struct breakpoint_node bpnodes[BREAKPOINT_TOTAL];
-#define MEMWATCH_TOTAL 8
+#define MEMWATCH_TOTAL 20
struct memwatch_node {
uaecptr addr;
int size;
extern void frame_drawn (void);
extern void redraw_frame (void);
extern int get_custom_limits (int *pw, int *ph, int *pdx, int *pdy);
+extern void get_custom_topedge (int *x, int *y);
extern void putpixel (uae_u8 *buf, int bpp, int x, xcolnr c8, int opaq);
/* Finally, stuff that shouldn't really be shared. */
extern int jsem_ismouse (int port, const struct uae_prefs *p);
extern int jsem_iskbdjoy (int port, const struct uae_prefs *p);
-extern int inputdevice_uaelib (TCHAR *, TCHAR *);
+extern int inputdevice_uaelib (const TCHAR *, const TCHAR *);
extern int inputdevice_testread (int*, int*, int*);
extern int inputdevice_istest (void);
#define AUTOSCALE_NORMAL 4
#define AUTOSCALE_RESIZE 5
#define AUTOSCALE_CENTER 6
+#define AUTOSCALE_MANUAL 7 // use gfx_xcenter_pos and gfx_ycenter_pos
struct uae_prefs {
TCHAR romfile[MAX_DPATH];
TCHAR romident[256];
TCHAR romextfile[MAX_DPATH];
+ uae_u32 romextfile2addr;
+ TCHAR romextfile2[MAX_DPATH];
TCHAR romextident[256];
TCHAR flashfile[MAX_DPATH];
TCHAR cartfile[MAX_DPATH];
extern void write_dlog (const TCHAR *, ...);
extern void flush_log (void);
+extern TCHAR *setconsolemode (TCHAR *buffer, int maxlen);
extern void close_console (void);
extern void reopen_console (void);
extern void console_out (const TCHAR *);
return 0;
}
-int inputdevice_uaelib (TCHAR *s, TCHAR *parm)
+int inputdevice_uaelib (const TCHAR *s, const TCHAR *parm)
{
int i;
*/
#define INPUTRECORD_DEBUG 1
-#define ENABLE_DEBUGGER 0
+#define ENABLE_DEBUGGER 1
#define HEADERSIZE 12
static void D3D_render2 (void)
{
- int fpuv;
-
- fpux_save (&fpuv);
D3D_render22 ();
- fpux_restore (&fpuv);
}
void D3D_setcursor (int x, int y, int visible)
size = 0x10000000;
if (currprefs.z3fastmem_size || currprefs.z3fastmem2_size || currprefs.z3chipmem_size) {
z3size = currprefs.z3fastmem_size + currprefs.z3fastmem2_size + currprefs.z3chipmem_size + (currprefs.z3fastmem_start - 0x10000000);
- if (currprefs.gfxmem_size)
- rtgbarrier = 16 * 1024 * 1024;
+ if (currprefs.gfxmem_size) {
+ rtgbarrier = 16 * 1024 * 1024 - ((currprefs.z3fastmem_size + currprefs.z3fastmem2_size) & 0x00ffffff);
+ }
if (currprefs.z3chipmem_size && (currprefs.z3fastmem_size || currprefs.z3fastmem2_size))
z3chipbarrier = 16 * 1024 * 1024;
} else {
#include "filesys.h"
#include "win32.h"
+#include <Avrt.h>
+
+extern HANDLE AVTask;
+
/* Our Win32 implementation of this function */
void gettimeofday (struct timeval *tv, void *blah)
{
}
}
+#ifndef _CONSOLE
+
typedef unsigned (__stdcall *BEGINTHREADEX_FUNCPTR)(void *);
struct thparms
if (hThread) {
if (name) {
//write_log (L"Thread '%s' started (%d)\n", name, hThread);
- SetThreadPriority (hThread, THREAD_PRIORITY_HIGHEST);
+ if (!AVTask) {
+ SetThreadPriority (hThread, THREAD_PRIORITY_HIGHEST);
+ } else {
+ AvSetMmThreadPriority(AVTask, AVRT_PRIORITY_HIGH);
+ }
}
} else {
result = 0;
int uae_start_thread_fast (void *(*f)(void *), void *arg, uae_thread_id *tid)
{
int v = uae_start_thread (NULL, f, arg, tid);
- if (*tid)
- SetThreadPriority (*tid, THREAD_PRIORITY_HIGHEST);
+ if (*tid) {
+ if (!AVTask) {
+ SetThreadPriority (*tid, THREAD_PRIORITY_HIGHEST);
+ } else {
+ AvSetMmThreadPriority(AVTask, AVRT_PRIORITY_HIGH);
+ }
+ }
return v;
}
pri2 = -1;
SetThreadPriority (th, pri2);
#endif
- if (!SetThreadPriority (GetCurrentThread(), THREAD_PRIORITY_HIGHEST))
- SetThreadPriority (GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL);
-
+ if (!AVTask) {
+ if (!SetThreadPriority (GetCurrentThread(), THREAD_PRIORITY_HIGHEST))
+ SetThreadPriority (GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL);
+ } else {
+ AvSetMmThreadPriority(AVTask, AVRT_PRIORITY_HIGH);
+ }
}
+#endif
#define IDS_AUTOSCALE_TV 367
#define IDS_JOYMODE_GAMEPAD 368
#define IDS_AUTOSCALE_DEFAULT 369
+#define IDS_AUTOSCALE_MANUEL 370
+#define IDS_AUTOSCALE_MANUAL 370
#define IDS_QS_MODELS 1000
#define IDS_QS_MODEL_A500 1001
#define IDS_QS_MODEL_A500P 1002
#define IDC_AVIOUTPUT_FILE 1611
#define IDC_INPUTLIST 1611
#define IDC_CATWEASEL 1611
-#define IDC_CLOCKSYNC2 1611
#define IDC_CLIPBOARDSHARE 1611
#define IDC_INPUTAMIGA 1612
#define IDC_BORDERLESS 1612
BEGIN\r
IDS_JOYMODE_GAMEPAD "Gamepad"\r
IDS_AUTOSCALE_DEFAULT "Default"\r
+ IDS_AUTOSCALE_MANUAL "Manual"\r
END\r
\r
#endif // English resources\r
totalhdbl, hres, totalvdbl, vres, full,
p->gfx_xcenter_pos, p->gfx_ycenter_pos,
p->gfx_size_win.width, p->gfx_size_win.height);
- sm->lClipLeft = p->gfx_xcenter_pos <= 0 ? -1 : p->gfx_xcenter_pos;
- sm->lClipTop = p->gfx_ycenter_pos <= 0 ? -1 : p->gfx_ycenter_pos;
+ sm->lClipLeft = p->gfx_xcenter_pos < 0 ? -1 : p->gfx_xcenter_pos;
+ sm->lClipTop = p->gfx_ycenter_pos < 0 ? -1 : p->gfx_ycenter_pos;
if (full) {
sm->lClipWidth = LORES_WIDTH << RES_MAX;
sm->lClipHeight = LORES_HEIGHT << 1;
static int shift (int val, int shift)
{
- if (shift >= 0)
+ if (shift > 0)
val >>= shift;
- else
+ else if (shift < 0)
val <<= -shift;
return val;
}
if (log_rp)
write_log (L"SET_RPSM: %08X %dx%d %dx%d hres=%d vres=%d disp=%d fs=%d\n",
- sm->dwScreenMode, sm->lClipLeft, sm->lClipTop, sm->lClipWidth, sm->lClipHeight,
- hdbl, vdbl, display, fs);
+ sm->dwScreenMode, sm->lClipLeft, sm->lClipTop, sm->lClipWidth, sm->lClipHeight,
+ hdbl, vdbl, display, fs);
if (!WIN32GFX_IsPicassoScreen ()) {
//p->gfx_filter = rp_filter_default;
p->gfx_filter_horiz_zoom_mult = 1000;
p->gfx_filter_vert_zoom_mult = 1000;
- //p->gfx_filter_autoscale = 0;
if (log_rp)
write_log (L"WW=%d WH=%d FW=%d FH=%d\n",
p->gfx_size_win.width, p->gfx_size_win.height,
if (fs) {
if (smm == RP_SCREENMODE_XX) {
p->gfx_filter = rp_filter;
- p->gfx_filter_autoscale = AUTOSCALE_STATIC_NOMINAL;
} else {
int mult;
int prevmult = 1;
p->gfx_filter_vert_zoom_mult = 1000 / mult;
}
}
- } else {
- if (hdbl != hres || vdbl != vres) {
- p->gfx_filter = rp_filter;
- p->gfx_filter_horiz_zoom_mult = shift (1000, hdbl - hres);
- p->gfx_filter_vert_zoom_mult = shift (1000, vdbl - vres);
- }
}
}
p->gfx_xcenter_size = sm->lClipWidth;
p->gfx_ycenter_size = sm->lClipHeight;
+ if (p->gfx_xcenter_pos >= 0 || p->gfx_ycenter_pos >= 0)
+ p->gfx_filter_autoscale = AUTOSCALE_MANUAL;
+ else
+ p->gfx_filter_autoscale = AUTOSCALE_STATIC_NOMINAL;
+
+ p->gfx_filter_scanlines = 0;
p->gfx_scanlines = 0;
if (sm->dwScreenMode & RP_SCREENMODE_SCANLINES) {
- if (p->gfx_vresolution > VRES_NONDOUBLE) {
- p->gfx_scanlines = 1;
- p->gfx_filter_scanlines = 0;
- }
+ p->gfx_scanlines = 1;
+ p->gfx_filter_scanlines = 8;
+ p->gfx_filter_scanlinelevel = 8;
+ p->gfx_filter_scanlineratio = (1 << 4) | 1;
}
updatewinfsmode (p);
#include "sysconfig.h"
-
+#define USETHREADCHARACTERICS 0
#define _WIN32_WINNT 0x700 /* XButtons + MOUSEHWHEEL=XP, Jump List=Win7 */
#include <windows.h>
static void *tablet;
HCURSOR normalcursor;
static HWND hwndNextViewer;
-static HANDLE AVTask;
+HANDLE AVTask;
TCHAR VersionStr[256];
TCHAR BetaStr[64];
void setpriority (struct threadpriorities *pri)
{
int err;
- DWORD opri = GetPriorityClass (GetCurrentProcess ());
+ if (!AVTask) {
+ DWORD opri = GetPriorityClass (GetCurrentProcess ());
- if (opri != IDLE_PRIORITY_CLASS && opri != NORMAL_PRIORITY_CLASS && opri != BELOW_NORMAL_PRIORITY_CLASS && opri != ABOVE_NORMAL_PRIORITY_CLASS)
- return;
- err = SetPriorityClass (GetCurrentProcess (), pri->classvalue);
- if (!err)
- write_log (L"priority set failed, %08X\n", GetLastError ());
+ if (opri != IDLE_PRIORITY_CLASS && opri != NORMAL_PRIORITY_CLASS && opri != BELOW_NORMAL_PRIORITY_CLASS && opri != ABOVE_NORMAL_PRIORITY_CLASS)
+ return;
+ err = SetPriorityClass (GetCurrentProcess (), pri->classvalue);
+ if (!err)
+ write_log (L"priority set failed, %08X\n", GetLastError ());
+ }
}
static void setcursorshape (void)
#endif
clipboard_active (hAmigaWnd, 1);
SetThreadExecutionState (ES_CONTINUOUS | ES_DISPLAY_REQUIRED);
-#if 0
+#if USETHREADCHARACTERICS
if (os_vista && AVTask == NULL) {
DWORD taskIndex = 0;
- AVTask = AvSetMmThreadCharacteristics (TEXT("Games"), &taskIndex);
+ if (!(AVTask = AvSetMmThreadCharacteristics (TEXT("Pro Audio"), &taskIndex)))
+ write_log (L"AvSetMmThreadCharacteristics failed: %d\n", GetLastError ());
}
#endif
}
int wasfocus = focus;
write_log (L"winuae_inactive(%d)\n", minimized);
-#if 0
+#if USETHREADCHARACTERICS
if (AVTask)
AvRevertMmThreadCharacteristics (AVTask);
AVTask = NULL;
#ifndef _WIN64
if (v)
_controlfp (*v, _MCW_IC | _MCW_RC | _MCW_PC);
- else
+#else
_controlfp (fpucontrol, _MCW_IC | _MCW_RC | _MCW_PC);
#endif
}
#define WINUAEPUBLICBETA 1
#define LANG_DLL 1
-#define WINUAEBETA L"6"
-#define WINUAEDATE MAKEBD(2010, 11, 22)
+#define WINUAEBETA L"7"
+#define WINUAEDATE MAKEBD(2010, 12, 6)
#define WINUAEEXTRA L""
#define WINUAEREV L""
ahs2 = vblscale (ah) * scale;
aws = aw * scale;
ahs = ah * scale;
-
+ //write_log (L"%d %d %d\n", dst_width, temp_width, aws);
extraw = -aws * (filter_horiz_zoom - currprefs.gfx_filteroverlay_overscan * 10) / 2000;
extrah = -ahs * (filter_vert_zoom - currprefs.gfx_filteroverlay_overscan * 10) / 2000;
SetRect (sr, 0, 0, dst_width, dst_height);
SetRect (zr, 0, 0, 0, 0);
- dr->left = (temp_width - aws) /2;
- dr->top = (temp_height - ahs) / 2;
- if (currprefs.gfx_xcenter_pos < 0)
- dr->left -= (dst_width - aws) / 2;
- if (currprefs.gfx_ycenter_pos < 0)
- dr->top -= (dst_height - ahs) / 2;
- dr->right = dr->left + dst_width;
- dr->bottom = dr->top + dst_height;
+ dr->left = (temp_width - aws) / 2;
+ dr->top = (temp_height - ahs) / 2;
filteroffsetx = 0;
filteroffsety = 0;
float xmult = filter_horiz_zoom_mult;
float ymult = filter_vert_zoom_mult;
+ dr->left -= (dst_width - aws) / 2;
+ dr->top -= (dst_height - ahs) / 2;
+ dr->right = dr->left + dst_width;
+ dr->bottom = dr->top + dst_height;
+
srcratio = 4.0 / 3.0;
if (currprefs.gfx_filter_aspect > 0) {
dstratio = (currprefs.gfx_filter_aspect >> 8) * 1.0 / (currprefs.gfx_filter_aspect & 0xff);
cy = 0;
cv = 1;
if (scalemode == AUTOSCALE_STATIC_NOMINAL) {
- cw -= 80;
- ch -= 50;
- cx = 56;
- cy = 20;
+ cw -= 40 << currprefs.gfx_resolution;
+ ch -= 25 << currprefs.gfx_vresolution;
+ cx = 28 << currprefs.gfx_resolution;
+ cy = 10 << currprefs.gfx_vresolution;
}
+ } else if (scalemode == AUTOSCALE_MANUAL) {
+ int v;
+
+ changed_prefs.gfx_filter_horiz_offset = currprefs.gfx_filter_horiz_offset = 0;
+ changed_prefs.gfx_filter_vert_offset = currprefs.gfx_filter_vert_offset = 0;
+ filter_horiz_offset = 0;
+ filter_vert_offset = 0;
+
+ get_custom_topedge(&cx, &cy);
+ //write_log (L"%dx%d %dx%d\n", cx, cy, currprefs.gfx_resolution, currprefs.gfx_vresolution);
+
+ v = currprefs.gfx_xcenter_pos;
+ if (v >= 0)
+ cx = (v >> (RES_MAX - currprefs.gfx_resolution + 1)) - cx;
+
+ v = currprefs.gfx_ycenter_pos;
+ if (v >= 0)
+ cy = (v >> (VRES_MAX - currprefs.gfx_vresolution)) - cy;
+
+ v = currprefs.gfx_xcenter_size;
+ if (v <= 0)
+ cw = 752 * 2;
+ else
+ cw = v;
+ cw >>= (RES_MAX - currprefs.gfx_resolution);
+
+ v = currprefs.gfx_ycenter_size;
+ if (v <= 0)
+ ch = 572;
+ else
+ ch = v;
+ ch >>= (VRES_MAX - currprefs.gfx_vresolution);
+
+ //write_log (L"%dx%d %dx%d %dx%d\n", currprefs.gfx_xcenter_pos, currprefs.gfx_ycenter_pos, cx, cy, cw, ch);
+
+ cv = 1;
+
} else {
+
cv = get_custom_limits (&cw, &ch, &cx, &cy);
+
}
if (cv) {
void S2X_init (int dw, int dh, int aw, int ah, int ad, int dd)
{
int flags = 0;
- int res_shift;
dst_width2 = dw;
dst_height2 = dh;
changed_prefs.gfx_filter = usedfilter->type;
}
}
-
+#if 0
+ int res_shift;
res_shift = RES_MAX - currprefs.gfx_resolution;
if (currprefs.gfx_xcenter_size > 0 && (currprefs.gfx_xcenter_size >> res_shift) < aw)
aw = currprefs.gfx_xcenter_size >> res_shift;
res_shift = VRES_MAX - currprefs.gfx_vresolution;
if (currprefs.gfx_ycenter_size > 0 && (currprefs.gfx_ycenter_size >> res_shift) < ah)
ah = currprefs.gfx_ycenter_size >> res_shift;
-
+#endif
dst_width = dw;
dst_height = dh;
dst_depth = dd;
SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)txt);
WIN32GUI_LoadUIString (IDS_AUTOSCALE_CENTER, txt, sizeof (txt) / sizeof (TCHAR));
SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)txt);
+ WIN32GUI_LoadUIString (IDS_AUTOSCALE_MANUAL, txt, sizeof (txt) / sizeof (TCHAR));
+ SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)txt);
SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_SETCURSEL, workprefs.gfx_filter_autoscale, 0);
SendDlgItemMessage (hDlg, IDC_FILTERHZ, TBM_SETRANGE, TRUE, MAKELONG (-999, +999));
SendDlgItemMessage (hDlg, IDC_FILTERPRESETS, CB_SETCURSEL, filterpreset_selected, 0);
regclosetree (fkey);
}
+ int ho, vo;
+ if (workprefs.gfx_filter_autoscale == AUTOSCALE_MANUAL) {
+ ho = workprefs.gfx_xcenter_pos;
+ vo = workprefs.gfx_ycenter_pos;
+ } else {
+ ho = workprefs.gfx_filter_horiz_offset;
+ vo = workprefs.gfx_filter_vert_offset;
+ }
SendDlgItemMessage (hDlg, IDC_FILTERHZ, TBM_SETPOS, TRUE, workprefs.gfx_filter_horiz_zoom);
SendDlgItemMessage (hDlg, IDC_FILTERVZ, TBM_SETPOS, TRUE, workprefs.gfx_filter_vert_zoom);
- SendDlgItemMessage (hDlg, IDC_FILTERHO, TBM_SETPOS, TRUE, workprefs.gfx_filter_horiz_offset);
- SendDlgItemMessage (hDlg, IDC_FILTERVO, TBM_SETPOS, TRUE, workprefs.gfx_filter_vert_offset);
+ SendDlgItemMessage (hDlg, IDC_FILTERHO, TBM_SETPOS, TRUE, ho);
+ SendDlgItemMessage (hDlg, IDC_FILTERVO, TBM_SETPOS, TRUE, vo);
SetDlgItemInt (hDlg, IDC_FILTERHZV, workprefs.gfx_filter_horiz_zoom, TRUE);
SetDlgItemInt (hDlg, IDC_FILTERVZV, workprefs.gfx_filter_vert_zoom, TRUE);
- SetDlgItemInt (hDlg, IDC_FILTERHOV, workprefs.gfx_filter_horiz_offset, TRUE);
- SetDlgItemInt (hDlg, IDC_FILTERVOV, workprefs.gfx_filter_vert_offset, TRUE);
+ SetDlgItemInt (hDlg, IDC_FILTERHOV, ho, TRUE);
+ SetDlgItemInt (hDlg, IDC_FILTERVOV, vo, TRUE);
}
static void values_from_hw3ddlg (HWND hDlg)
SendDlgItemMessage (hDlg, IDC_FILTERHZ, TBM_SETPOS, TRUE, workprefs.gfx_filter_horiz_zoom);
}
} else {
- currprefs.gfx_filter_horiz_offset = workprefs.gfx_filter_horiz_offset = (int)SendMessage (GetDlgItem (hDlg, IDC_FILTERHO), TBM_GETPOS, 0, 0);
- currprefs.gfx_filter_vert_offset = workprefs.gfx_filter_vert_offset = (int)SendMessage (GetDlgItem (hDlg, IDC_FILTERVO), TBM_GETPOS, 0, 0);
+ if (currprefs.gfx_filter_autoscale == AUTOSCALE_MANUAL) {
+ currprefs.gfx_xcenter_pos = workprefs.gfx_xcenter_pos = (int)SendMessage (GetDlgItem (hDlg, IDC_FILTERHO), TBM_GETPOS, 0, 0);
+ currprefs.gfx_ycenter_pos = workprefs.gfx_ycenter_pos = (int)SendMessage (GetDlgItem (hDlg, IDC_FILTERVO), TBM_GETPOS, 0, 0);
+ SetDlgItemInt (hDlg, IDC_FILTERHOV, workprefs.gfx_xcenter_pos, TRUE);
+ SetDlgItemInt (hDlg, IDC_FILTERVOV, workprefs.gfx_ycenter_pos, TRUE);
+ } else {
+ currprefs.gfx_filter_horiz_offset = workprefs.gfx_filter_horiz_offset = (int)SendMessage (GetDlgItem (hDlg, IDC_FILTERHO), TBM_GETPOS, 0, 0);
+ currprefs.gfx_filter_vert_offset = workprefs.gfx_filter_vert_offset = (int)SendMessage (GetDlgItem (hDlg, IDC_FILTERVO), TBM_GETPOS, 0, 0);
+ SetDlgItemInt (hDlg, IDC_FILTERHOV, workprefs.gfx_filter_horiz_offset, TRUE);
+ SetDlgItemInt (hDlg, IDC_FILTERVOV, workprefs.gfx_filter_vert_offset, TRUE);
+ }
}
if (filter_selected) {
int *pw = filter_selected->varw;
}
SetDlgItemInt (hDlg, IDC_FILTERHZV, workprefs.gfx_filter_horiz_zoom, TRUE);
SetDlgItemInt (hDlg, IDC_FILTERVZV, workprefs.gfx_filter_vert_zoom, TRUE);
- SetDlgItemInt (hDlg, IDC_FILTERHOV, workprefs.gfx_filter_horiz_offset, TRUE);
- SetDlgItemInt (hDlg, IDC_FILTERVOV, workprefs.gfx_filter_vert_offset, TRUE);
init_colors ();
notice_new_xcolors ();
reset_drawing ();
</ResourceCompile>
<Link>
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9d.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;libpng.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;wintab32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;enet.lib;prowizard.lib;lzmalib.lib;libFLAC_static.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9d.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;libpng.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;wintab32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;enet.lib;prowizard.lib;lzmalib.lib;libFLAC_static.lib;Avrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;libpng.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;wintab32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;enet.lib;lzmalib.lib;prowizard.lib;libFLAC_static.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;libpng.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;wintab32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;enet.lib;lzmalib.lib;prowizard.lib;libFLAC_static.lib;Avrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\</AdditionalLibraryDirectories>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;libpng.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;wintab32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;avrt.lib;enet.lib;prowizard.lib;lzmalib.lib;libFLAC_static.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;libpng.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;wintab32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;avrt.lib;enet.lib;prowizard.lib;lzmalib.lib;libFLAC_static.lib;Avrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\</AdditionalLibraryDirectories>
+Beta 7:
+
+- RTG board start address was not 16M aligned if Z3 fast board smaller than 16M was enabled (no functional difference)
+- D3D mode was still modifying host FPU rounding modes
+- increased number of available breakpoints and memwatch points
+- debugger commands can be sent via uae-configuration (or custom input event)
+ uae-configuration dbg "debugger command" (remember quotes if debugger command has spaces)
+- Fullscreen Max/TV filter settings only worked if display panel resolution matched emulated resolution
+- added "Manual" filter option (originally used by AF, now added to GUI, positioning using absolute shres/laced coordinates) Ignore it.
+
+Beta 6:
+
+- "old" RTG interface added, used by AROS KS ROM replacement RTG driver
+
Beta 5:
- check clipboard sharing disabled state earlier, before any resource allocations
}
}
+static TCHAR *console_buffer;
+static int console_buffer_size;
+
+TCHAR *setconsolemode (TCHAR *buffer, int maxlen)
+{
+ TCHAR *ret = NULL;
+ if (buffer) {
+ console_buffer = buffer;
+ console_buffer_size = maxlen;
+ } else {
+ ret = console_buffer;
+ console_buffer = NULL;
+ }
+ return ret;
+}
+
+static void console_put (const TCHAR *buffer)
+{
+ if (console_buffer) {
+ if (_tcslen (console_buffer) + _tcslen (buffer) < console_buffer_size)
+ _tcscat (console_buffer, buffer);
+ } else {
+ openconsole ();
+ writeconsole (buffer);
+ }
+}
+
void console_out_f (const TCHAR *format,...)
{
va_list parms;
va_start (parms, format);
_vsntprintf (buffer, WRITE_LOG_BUF_SIZE - 1, format, parms);
va_end (parms);
- openconsole ();
- writeconsole (buffer);
+ console_put (buffer);
}
void console_out (const TCHAR *txt)
{
- openconsole ();
- writeconsole (txt);
+ console_put (txt);
}
TCHAR console_getch (void)