#include "blitter.h"
#include "blit.h"
#include "savestate.h"
+#include "debug.h"
/* we must not change ce-mode while blitter is running.. */
static int blitter_cycle_exact;
/* "free" blitter in immediate mode if it has been "stuck" ~3 frames
* fixes some JIT game incompatibilities
*/
- write_log ("Blitter force-unstuck!\n");
+ debugtest (DEBUGTEST_BLITTER, "force-unstuck!\n");
}
blitter_stuck = 0;
if (blit_slowdown > 0 && !currprefs.immediate_blits) {
if (blitline) {
if (blt_info.hblitsize != 2)
- write_log ("weird hblitsize in linemode: %d vsize=%d PC%=%x\n",
- blt_info.hblitsize, blt_info.vblitsize, m68k_getpc (®s));
+ debugtest (DEBUGTEST_BLITTER, "weird hblitsize in linemode: %d vsize=%d\n",
+ blt_info.hblitsize, blt_info.vblitsize);
blit_diag = blit_cycle_diagram_line;
} else {
if (con & 2) {
blitfc = !!(bltcon1 & 0x4);
blitife = bltcon1 & 0x8;
if ((bltcon1 & 0x18) == 0x18) {
- /* Digital "Trash" demo does this; others too. Apparently, no
- * negative effects. */
- static int warn = 1;
- if (warn)
- write_log ("warning: weird fill mode (further messages suppressed) PC=%x\n",
- m68k_getpc (®s));
- warn = 0;
+ debugtest (DEBUGTEST_BLITTER, "weird fill mode\n");
blitife = 0;
}
}
- if (blitfill && !blitdesc) {
- static int warn = 1;
- if (warn)
- write_log ("warning: blitter fill without desc (further messages suppressed) PC=%x\n",
- m68k_getpc (®s));
- warn = 0;
- }
+ if (blitfill && !blitdesc)
+ debugtest (DEBUGTEST_BLITTER, "fill without desc\n");
blit_diag = blitfill ? blit_cycle_diagram_fill[blit_ch] : blit_cycle_diagram[blit_ch];
}
if ((bltcon1 & 0x80) && (currprefs.chipset_mask & CSMASK_ECS_AGNUS))
- write_log ("warning: ECS BLTCON1 DOFF-bit set\n");
+ debugtest (DEBUGTEST_BLITTER, "ECS BLTCON1 DOFF-bit set\n");
blit_dmacount = blit_dmacount2 = 0;
blit_nod = 1;
#ifndef BLITTER_DEBUG
warned = 1;
#endif
- if (m68k_getpc (®s) < 0xe0000 || m68k_getpc (®s) >= 0x10000000)
- write_log ("warning: Program does not wait for blitter %p vpos=%d tc=%d\n",
- m68k_getpc (®s), vpos, blit_cyclecounter);
+ debugtest (DEBUGTEST_BLITTER, "program does not wait for blitter vpos=%d tc=%d\n",
+ vpos, blit_cyclecounter);
}
if (blitter_cycle_exact) {
cfgfile_dwrite (f, "gfx_filter_gamma=%d\n", p->gfx_filter_gamma);
cfgfile_dwrite (f, "gfx_filter_blur=%d\n", p->gfx_filter_blur);
cfgfile_dwrite (f, "gfx_filter_noise=%d\n", p->gfx_filter_noise);
+ cfgfile_dwrite (f, "gfx_filter_upscale=%s\n", p->gfx_filter_upscale ? "true" : "false");
cfgfile_dwrite (f, "gfx_luminance=%d\n", p->gfx_luminance);
cfgfile_dwrite (f, "gfx_contrast=%d\n", p->gfx_contrast);
cfgfile_dwrite (f, "scsi_a4000t=%s\n", p->cs_mbdmac == 2 ? "true" : "false");
cfgfile_dwrite (f, "bogomem_fast=%s\n", p->cs_slowmemisfast ? "true" : "false");
cfgfile_dwrite (f, "resetwarning=%s\n", p->cs_resetwarning ? "true" : "false");
+ cfgfile_dwrite (f, "denise_noehb=%s\n", p->cs_denisenoehb ? "true" : "false");
+ cfgfile_dwrite (f, "agnus_bltbusybug=%s\n", p->cs_agnusbltbusybug ? "true" : "false");
cfgfile_write (f, "fastmem_size=%d\n", p->fastmem_size / 0x100000);
cfgfile_write (f, "a3000mem_size=%d\n", p->mbresmem_low_size / 0x100000);
|| cfgfile_intval (option, value, "gfx_filter_gamma", &p->gfx_filter_gamma, 1)
|| cfgfile_intval (option, value, "gfx_filter_blur", &p->gfx_filter_blur, 1)
|| cfgfile_intval (option, value, "gfx_filter_noise", &p->gfx_filter_noise, 1)
+ || cfgfile_yesno (option, value, "gfx_filter_upscale", &p->gfx_filter_upscale)
|| cfgfile_intval (option, value, "gfx_luminance", &p->gfx_luminance, 1)
|| cfgfile_intval (option, value, "gfx_contrast", &p->gfx_contrast, 1)
|| cfgfile_intval (option, value, "gfx_gamma", &p->gfx_gamma, 1)
|| cfgfile_yesno (option, value, "ksmirror_e0", &p->cs_ksmirror_e0)
|| cfgfile_yesno (option, value, "ksmirror_a8", &p->cs_ksmirror_a8)
|| cfgfile_yesno (option, value, "resetwarning", &p->cs_resetwarning)
+ || cfgfile_yesno (option, value, "denise_noehb", &p->cs_denisenoehb)
+ || cfgfile_yesno (option, value, "agnus_bltbusybug", &p->cs_agnusbltbusybug)
|| cfgfile_yesno (option, value, "kickshifter", &p->kickshifter)
|| cfgfile_yesno (option, value, "ntsc", &p->ntscmode)
set_68000_compa (p, compa);
p->dfxtype[1] = DRV_NONE;
p->cs_compatible = CP_A1000;
+ p->cs_slowmemisfast = 1;
built_in_chipset_prefs (p);
if (config > 0)
- p->chipset_mask |= CSMASK_NO_EHB;
+ p->cs_denisenoehb = 1;
if (config > 1)
p->chipmem_size = 0x40000;
return configure_rom (p, roms, romcheck);
if (!p->cs_compatible)
return 1;
- p->chipset_mask &= ~CSMASK_BUGS;
p->cs_a1000ram = 0;
p->cs_cd32c2p = p->cs_cd32cd = p->cs_cd32nvram = 0;
p->cs_cdtvcd = p->cs_cdtvram = 0;
p->cs_ciaatod = p->ntscmode ? 2 : 1;
p->cs_ksmirror_e0 = 0;
p->cs_rtc = 0;
- p->chipset_mask |= CSMASK_BLTBUSY_BUG;
+ p->cs_agnusbltbusybug = 1;
break;
case CP_A1200: // A1200
p->cs_ide = 1;
{
uae_u16 v;
decide_blitter (current_hpos ());
- v = dmacon | (bltstate == BLT_done || (bltstate != BLT_done && (currprefs.chipset_mask & CSMASK_BLTBUSY_BUG) && !blt_info.got_cycle) ? 0 : 0x4000)
+ v = dmacon | (bltstate == BLT_done || (bltstate != BLT_done && currprefs.cs_agnusbltbusybug && !blt_info.got_cycle) ? 0 : 0x4000)
| (blt_info.blitzero ? 0x2000 : 0);
return v;
}
events_schedule();
}
+static int irq_nmi;
+
+void NMI_delayed (void)
+{
+ irq_nmi = 1;
+}
+
int intlev (void)
{
uae_u16 imask = intreq & intena;
+ if (irq_nmi) {
+ irq_nmi = 0;
+ return 7;
+ }
if (!(imask && (intena & 0x4000)))
return -1;
if (imask & (0x4000 | 0x2000)) // 13 14
static int debug_linecounter;
#define MAX_LINECOUNTER 1000
-static int debug_out (const char *format,...)
+static int debug_out (const char *format, ...)
{
va_list parms;
char buffer[4000];
return 0;
}
+static int debugtest_modes[DEBUGTEST_MAX];
+static const char *debugtest_names[] = {
+ "Blitter", "Keyboard", "Floppy"
+};
+
+void debugtest (enum debugtest_item di, const char *format, ...)
+{
+ va_list parms;
+ char buffer[1000];
+
+ if (!debugtest_modes[di])
+ return;
+ va_start (parms, format);
+ _vsnprintf (buffer, 1000 - 1, format, parms);
+ va_end (parms);
+ write_log ("%s PC=%08X: %s\n", debugtest_names[di], M68K_GETPC, buffer);
+ if (debugtest_modes[di] == 2)
+ activate_debugger ();
+}
+
+static void debugtest_set (char **inptr)
+{
+ int i, val, val2;
+ ignore_ws (inptr);
+
+ val2 = 1;
+ if (!more_params (inptr)) {
+ for (i = 0; i < DEBUGTEST_MAX; i++)
+ debugtest_modes[i] = 0;
+ console_out ("all debugtests disabled\n");
+ return;
+ }
+ val = readint (inptr);
+ if (more_params (inptr)) {
+ val2 = readint (inptr);
+ if (val2 > 0)
+ val2 = 2;
+ }
+ if (val < 0) {
+ for (i = 0; i < DEBUGTEST_MAX; i++)
+ debugtest_modes[i] = val2;
+ console_out ("all debugtests enabled\n");
+ return;
+ }
+ if (val >= 0 && val < DEBUGTEST_MAX) {
+ if (debugtest_modes[val])
+ debugtest_modes[val] = 0;
+ else
+ debugtest_modes[val] = val2;
+ console_out ("debugtest '%s': %s. break = %s\n",
+ debugtest_names[val], debugtest_modes[val] ? "on" :"off", val2 == 2 ? "on" : "off");
+ }
+}
+
static void disk_debug(char **inptr)
{
char parm[10];
if (**inptr == 'd') {
(*inptr)++;
- ignore_ws(inptr);
- disk_debug_logging = readint(inptr);
+ ignore_ws (inptr);
+ disk_debug_logging = readint (inptr);
console_out ("disk logging level %d\n", disk_debug_logging);
return;
}
disk_debug_mode = 0;
disk_debug_track = -1;
- ignore_ws(inptr);
+ ignore_ws (inptr);
if (!next_string (inptr, parm, sizeof (parm), 1))
goto end;
for (i = 0; i < strlen(parm); i++) {
case 'd':
{
if (*inptr == 'i') {
- next_char(&inptr);
- disk_debug(&inptr);
- } else if(*inptr == 'j') {
+ next_char (&inptr);
+ disk_debug (&inptr);
+ } else if (*inptr == 'j') {
inptr++;
inputdevice_logging = 1 | 2;
- if (more_params(&inptr))
+ if (more_params (&inptr))
inputdevice_logging = readint(&inptr);
console_out("input logging level %d\n", inputdevice_logging);
- } else if(*inptr == 'm') {
- memory_map_dump_2(0);
+ } else if (*inptr == 'm') {
+ memory_map_dump_2 (0);
+ } else if (*inptr == 't') {
+ next_char (&inptr);
+ debugtest_set (&inptr);
} else {
uae_u32 daddr;
int count;
else if (currprefs.chipset_mask & CSMASK_ECS_DENISE)
bplehb = (dp_for_drawing->bplcon0 & 0xFC00) == 0x6000 && !(dp_for_drawing->bplcon2 & 0x200);
else
- bplehb = (dp_for_drawing->bplcon0 & 0xFC00) == 0x6000 && !(currprefs.chipset_mask & CSMASK_NO_EHB);
+ bplehb = (dp_for_drawing->bplcon0 & 0xFC00) == 0x6000 && !currprefs.cs_denisenoehb;
plf1pri = dp_for_drawing->bplcon2 & 7;
plf2pri = (dp_for_drawing->bplcon2 >> 3) & 7;
#define CSMASK_ECS_AGNUS 1
#define CSMASK_ECS_DENISE 2
#define CSMASK_AGA 4
-#define CSMASK_BUGS 0x300
-#define CSMASK_NO_EHB 0x100
-#define CSMASK_BLTBUSY_BUG 0x200
uae_u32 get_copper_address(int copno);
void debug_wputpeek(uaecptr addr, uae_u32 v);
void debug_lputpeek(uaecptr addr, uae_u32 v);
+enum debugtest_item { DEBUGTEST_BLITTER, DEBUGTEST_KEYBOARD, DEBUGTEST_FLOPPY, DEBUGTEST_MAX };
+void debugtest (enum debugtest_item, const char *, ...);
#else
extern void REGPARAM3 MakeFromSR (struct regstruct *regs) REGPARAM;
extern void REGPARAM3 Exception (int, struct regstruct *regs, uaecptr) REGPARAM;
extern void NMI (void);
+extern void NMI_delayed (void);
extern void doint (void);
extern void dump_counts (void);
extern int m68k_move2c (int, uae_u32 *);
int gfx_filter_filtermode;
int gfx_filter_noise, gfx_filter_blur;
int gfx_filter_saturation, gfx_filter_luminance, gfx_filter_contrast, gfx_filter_gamma;
+ int gfx_filter_upscale;
int immediate_blits;
unsigned int chipset_mask;
int cs_df0idhw;
int cs_slowmemisfast;
int cs_resetwarning;
+ int cs_denisenoehb;
+ int cs_agnusbltbusybug;
char df[4][MAX_DPATH];
char dfxlist[MAX_SPARE_DRIVES][MAX_DPATH];
disk_eject (3);
break;
case AKS_IRQ7:
- NMI ();
+ NMI_delayed ();
break;
case AKS_PAUSE:
pausemode (-1);
if (regs->spcflags & SPCFLAG_INT) {
int intr = intlev ();
unset_special (regs, SPCFLAG_INT | SPCFLAG_DOINT);
- if (intr != -1 && intr > regs->intmask)
+ if (intr != -1 && (intr > regs->intmask || intr == 7))
do_interrupt (intr, regs);
}
if (regs->spcflags & SPCFLAG_DOINT) {
#define IDC_FILTERVO 1619
#define IDC_AVIOUTPUT_8BIT 1620
#define IDC_INPREC_PLAY 1620
+#define IDC_FILTERENABLE2 1620
+#define IDC_FILTERUPSCALE 1620
#define IDC_AVIOUTPUT_24BIT 1621
#define IDC_AVIOUTPUT_WIDTH 1622
#define IDC_AVIOUTPUT_HEIGHT 1623
#define IDC_DBG_DREG 1742
#define IDC_CS_CIAOVERLAY 1742
#define IDC_DBG_AREG 1743
-#define IDC_CS_KSMIRROR_E1 1743
#define IDC_CS_RESETWARNING 1743
#define IDC_DBG_CCR 1744
+#define IDC_CS_NOEHB 1744
#define IDC_DBG_AMEM 1745
+#define IDC_CS_BLITTERBUG 1745
#define IDC_DBG_SP_VBR 1746
#define IDC_DBG_MMISC 1747
#define IDC_DBG_PC 1748
#define IDC_FILTERVO 1619
#define IDC_AVIOUTPUT_8BIT 1620
#define IDC_INPREC_PLAY 1620
+#define IDC_FILTERUPSCALE 1620
#define IDC_AVIOUTPUT_24BIT 1621
#define IDC_AVIOUTPUT_WIDTH 1622
#define IDC_AVIOUTPUT_HEIGHT 1623
#define IDC_DBG_AREG 1743
#define IDC_CS_RESETWARNING 1743
#define IDC_DBG_CCR 1744
+#define IDC_CS_NOEHB 1744
#define IDC_DBG_AMEM 1745
+#define IDC_CS_BLITTERBUG 1745
#define IDC_DBG_SP_VBR 1746
#define IDC_DBG_MMISC 1747
#define IDC_DBG_PC 1748
CONTROL "ROM Mirror (E0)",IDC_CS_KSMIRROR_E0,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,146,80,10
CONTROL "CIA ROM Overlay",IDC_CS_CIAOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,95,80,10
CONTROL "KB Reset Warning",IDC_CS_RESETWARNING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,159,80,10
+ CONTROL "No-EHB Denise",IDC_CS_NOEHB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,159,80,10
+ CONTROL "Blitter Busy Bug",IDC_CS_BLITTERBUG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,159,80,10
END
IDD_AVIOUTPUT DIALOGEX 0, 0, 288, 203
PUSHBUTTON "Delete",IDC_FILTERPRESETDELETE,236,200,47,14
COMBOBOX IDC_FILTERHZMULT,67,43,27,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_FILTERVZMULT,67,63,27,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
- CONTROL "Autoscale",IDC_FILTERAUTORES,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,26,168,63,10
+ CONTROL "Autoscale",IDC_FILTERAUTORES,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,9,168,63,10
COMBOBOX IDC_FILTERXTRA,105,130,138,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Full screen filter",IDC_FILTERUPSCALE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,153,87,10
END
IDD_HARDDRIVE DIALOGEX 0, 0, 380, 76
currprefs.sound_volume = changed_prefs.sound_volume = wParam;
set_volume (currprefs.sound_volume, 0);
return TRUE;
- case RPIPCHM_SCREENCAPTURE:
- screenshot (1, 1);
- return TRUE;
case RPIPCHM_MINIMIZE:
minimized = 1;
if (ShowWindow (hAmigaWnd, SW_MINIMIZE))
xfree (s);
return TRUE;
}
-
+ case RPIPCHM_SCREENCAPTURE:
+ {
+ extern int screenshotf (const char *spath, int mode, int doprepare);
+ int ok;
+ char *s = ua ((WCHAR*)pData);
+ ok = screenshotf (s, 1, 1);
+ xfree (s);
+ return ok ? TRUE : FALSE;
+ }
}
return FALSE;
/*
Captures the Amiga display (DirectDraw, D3D or OpenGL) surface and saves it to file as a 24bit bitmap.
*/
-void screenshot(int mode, int doprepare)
+int screenshotf (const char *spath, int mode, int doprepare)
{
static int recursive;
FILE *fp = NULL;
+ int allok = 0;
HBITMAP offscreen_bitmap = NULL; // bitmap that is converted to a DIB
HDC offscreen_dc = NULL; // offscreen DC that we can select offscreen bitmap into
if(recursive)
- return;
+ return 0;
recursive++;
char underline[] = "_";
int number = 0;
+ if (spath) {
+ fp = fopen (spath, "wb");
+ if (fp) {
+#if PNG_SCREENSHOTS > 0
+ if (screenshotmode)
+ allok = savepng (fp);
+ else
+#endif
+ allok = savebmp (fp);
+ fclose (fp);
+ fp = NULL;
+ goto oops;
+ }
+ }
fetch_path ("ScreenshotPath", path, sizeof (path));
CreateDirectory (path, NULL);
name[0] = 0;
if (!ok)
goto oops;
write_log ("Screenshot saved as \"%s\"\n", filename);
+ allok = 1;
break;
}
fclose (fp);
screenshot_free();
recursive--;
+
+ return allok;
}
+void screenshot (int mode, int doprepare)
+{
+ screenshotf (NULL, mode, doprepare);
+}
#define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
#define GETBDD(x) ((x) % 100)
-#define WINUAEBETA 7
+#define WINUAEBETA 8
#define WINUAEPUBLICBETA 1
-#define WINUAEDATE MAKEBD(2008, 1, 21)
+#define WINUAEDATE MAKEBD(2008, 1, 24)
#define WINUAEEXTRA ""
#define WINUAEREV ""
static int dst_width, dst_height, amiga_width, amiga_height, amiga_depth, dst_depth, scale;
uae_u8 *bufmem_ptr;
-int bufmem_width, bufmem_height;
static int tempsurf;
static uae_u8 *tempsurf2, *tempsurf3;
void S2X_render (void)
{
int aw = amiga_width, ah = amiga_height, v, pitch;
- uae_u8 *dptr, *sptr, *endsptr;
+ uae_u8 *dptr, *enddptr, *sptr, *endsptr;
int ok = 0, temp_needed = 0;
RECT sr, dr;
HRESULT ddrval;
LPDIRECTDRAWSURFACE7 dds;
DDSURFACEDESC2 desc;
+ int dst_width2 = dst_width;
+ int dst_height2 = dst_height;
+ int dst_width3 = dst_width;
+ int dst_height3 = dst_height;
+ int scale2 = scale;
+
+ if (currprefs.gfx_filter_upscale) {
+ dst_width2 = amiga_width;
+ dst_height2 = amiga_height;
+ dst_width3 = amiga_width * scale;
+ dst_height3 = amiga_height * scale;
+ scale2 = 1;
+ }
sptr = gfxvidinfo.bufmem;
- v = (dst_width - amiga_width) / 2;
+ v = (dst_width2 - amiga_width) / 2;
aw += v;
sptr -= v * (amiga_depth / 8);
- v = (dst_height - amiga_height) / 2;
+ v = (dst_height2 - amiga_height) / 2;
ah += v;
sptr -= v * gfxvidinfo.rowbytes;
endsptr = gfxvidinfo.bufmemend;
v = currprefs.gfx_filter ? currprefs.gfx_filter_horiz_offset : 0;
- v += (dst_width / scale - amiga_width) / 8;
+ v += (dst_width3 / scale - amiga_width) / 8;
sptr += (int)(-v * 4.0 / 10.0) * (amiga_depth / 8);
aw -= (int)(-v * 4.0 / 10);
v = currprefs.gfx_filter ? currprefs.gfx_filter_vert_offset : 0;
- v += (dst_height / scale - amiga_height) / 8;
+ v += (dst_height3 / scale - amiga_height) / 8;
sptr += (int)(-v * 4.0 / 10.0) * gfxvidinfo.rowbytes;
ah -= (int)(-v * 4.0 / 10);
if (currprefs.gfx_filter && (currprefs.gfx_filter_horiz_zoom || currprefs.gfx_filter_vert_zoom ||
currprefs.gfx_filter_horiz_zoom_mult != 1000 ||
- currprefs.gfx_filter_vert_zoom_mult != 1000)) {
- int wz = dst_width * currprefs.gfx_filter_horiz_zoom_mult / 1000;
- int hz = dst_height * currprefs.gfx_filter_vert_zoom_mult / 1000;
+ currprefs.gfx_filter_vert_zoom_mult != 1000 || currprefs.gfx_filter_upscale)) {
+
+ int wz = dst_width3 * currprefs.gfx_filter_horiz_zoom_mult / 1000;
+ int hz = dst_height3 * currprefs.gfx_filter_vert_zoom_mult / 1000;
+
wz += currprefs.gfx_filter_horiz_zoom / 4;
hz += currprefs.gfx_filter_vert_zoom / 4;
- sr.left = (dst_width - wz) / 2;
- sr.top = (dst_height - hz) / 2;
- sr.right = sr.left + wz;
- sr.bottom = sr.top + hz;
+
+ sr.left = (dst_width3 - wz) / 2;
+ sr.top = (dst_height3 - hz) / 2;
+ sr.right = sr.left + wz;
+ sr.bottom = sr.top + hz;
+
dr.left = dr.top = 0;
dr.right = dst_width;
dr.bottom = dst_height;
+
if (sr.left >= sr.right) {
sr.left = dst_width / 2 - 1;
sr.right = dst_width / 2 + 1;
sr.bottom = sr.top + dst_height;
}
+ if (currprefs.gfx_filter_upscale) {
+ dr.left = dr.top = 0;
+ dr.right = dst_width;
+ dr.bottom = dst_height;
+ }
+
if (tempsurf && sr.left != 0 || sr.top != 0 || sr.right != dst_width || sr.bottom != dst_height ||
- dr.top != 0 || dr.right != dst_width || dr.left != 0 || dr.bottom != dst_height) {
+ dr.top != 0 || dr.right != dst_width || dr.left != 0 || dr.bottom != dst_height || currprefs.gfx_filter_upscale) {
dds = DirectDrawState.temporary.surface;
temp_needed = 1;
}
}
bufmem_ptr = sptr;
- bufmem_width = aw;
- bufmem_height = ah;
if (temp_needed) {
desc.dwSize = sizeof (desc);
dptr = DirectDraw_GetSurfacePointer ();
pitch = DirectDraw_GetSurfacePitch ();
}
+ enddptr = dptr + pitch * dst_height;
if (!dptr) /* weird things can happen */
goto end;
sptr2 += w;
dptr += pitch;
}
+ while (i < dst_height && dptr < enddptr) {
+ memset (dptr, 0, dst_width * dst_depth / 8);
+ dptr += pitch;
+ }
}
} else if (usedfilter->type == UAE_FILTER_SUPEREAGLE) { /* 16/2X */
int w = DirectDraw_CurrentWidth ();
int h = DirectDraw_CurrentHeight ();
int b = DirectDraw_GetSurfaceBitCount ();
- write_log ("Desktop: W=%d H=%d B=%d\n", w, h, b);
+ write_log ("Desktop: W=%d H=%d B=%d. CXVS=%d CYVS=%d\n", w, h, b,
+ GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN));
DirectDraw_EnumDisplayModes (DDEDM_REFRESHRATES , modesCallback);
//dhack();
sortmodes ();
c |= currprefs.gfx_filter_scanlines != changed_prefs.gfx_filter_scanlines ? (1|8) : 0;
c |= currprefs.gfx_filter_scanlinelevel != changed_prefs.gfx_filter_scanlinelevel ? (1|8) : 0;
c |= currprefs.gfx_filter_scanlineratio != changed_prefs.gfx_filter_scanlineratio ? (1|8) : 0;
+ c |= currprefs.gfx_filter_upscale != changed_prefs.gfx_filter_upscale ? (1|8) : 0;
c |= currprefs.gfx_filter_luminance != changed_prefs.gfx_filter_luminance ? (1|8) : 0;
c |= currprefs.gfx_filter_contrast != changed_prefs.gfx_filter_contrast ? (1|8) : 0;
c |= currprefs.gfx_filter_saturation != changed_prefs.gfx_filter_saturation ? (1|8) : 0;
currprefs.gfx_filter_scanlines = changed_prefs.gfx_filter_scanlines;
currprefs.gfx_filter_scanlinelevel = changed_prefs.gfx_filter_scanlinelevel;
currprefs.gfx_filter_scanlineratio = changed_prefs.gfx_filter_scanlineratio;
+ currprefs.gfx_filter_upscale = changed_prefs.gfx_filter_upscale;
currprefs.gfx_filter_luminance = changed_prefs.gfx_filter_luminance;
currprefs.gfx_filter_contrast = changed_prefs.gfx_filter_contrast;
currprefs.gfx_filter_saturation = changed_prefs.gfx_filter_saturation;
fs_warning = IDS_UNSUPPORTEDSCREENMODE_1;
} else if (colortype == RGBFB_CLUT && DirectDraw_GetSurfaceBitCount() != 8) {
fs_warning = IDS_UNSUPPORTEDSCREENMODE_2;
- } else if (currentmode->current_width >= GetSystemMetrics(SM_CXVIRTUALSCREEN) ||
- currentmode->current_height >= GetSystemMetrics(SM_CYVIRTUALSCREEN)) {
+ } else if (currentmode->current_width > GetSystemMetrics(SM_CXVIRTUALSCREEN) ||
+ currentmode->current_height > GetSystemMetrics(SM_CYVIRTUALSCREEN)) {
if (!console_logging)
fs_warning = IDS_UNSUPPORTEDSCREENMODE_3;
#ifdef PICASSO96
}
CheckDlgButton (hDlg, IDC_CS_COMPATIBLE, workprefs.cs_compatible);
CheckDlgButton (hDlg, IDC_CS_RESETWARNING, workprefs.cs_resetwarning);
+ CheckDlgButton (hDlg, IDC_CS_NOEHB, workprefs.cs_denisenoehb);
+ CheckDlgButton (hDlg, IDC_CS_BLITTERBUG, workprefs.cs_agnusbltbusybug);
CheckDlgButton (hDlg, IDC_CS_KSMIRROR_E0, workprefs.cs_ksmirror_e0);
CheckDlgButton (hDlg, IDC_CS_KSMIRROR_A8, workprefs.cs_ksmirror_a8);
CheckDlgButton (hDlg, IDC_CS_CIAOVERLAY, workprefs.cs_ciaoverlay);
workprefs.cs_compatible = IsDlgButtonChecked (hDlg, IDC_CS_COMPATIBLE);
workprefs.cs_resetwarning = IsDlgButtonChecked (hDlg, IDC_CS_RESETWARNING);
+ workprefs.cs_denisenoehb = IsDlgButtonChecked (hDlg, IDC_CS_NOEHB);
+ workprefs.cs_agnusbltbusybug = IsDlgButtonChecked (hDlg, IDC_CS_BLITTERBUG);
workprefs.cs_ksmirror_e0 = IsDlgButtonChecked (hDlg, IDC_CS_KSMIRROR_E0);
workprefs.cs_ksmirror_a8 = IsDlgButtonChecked (hDlg, IDC_CS_KSMIRROR_A8);
workprefs.cs_ciaoverlay = IsDlgButtonChecked (hDlg, IDC_CS_CIAOVERLAY);
ew (hDlg, IDC_CS_CDTVRAM, e);
ew (hDlg, IDC_CS_CDTVRAMEXP, e);
ew (hDlg, IDC_CS_RESETWARNING, e);
+ ew (hDlg, IDC_CS_NOEHB, e);
+ ew (hDlg, IDC_CS_BLITTERBUG, e);
ew (hDlg, IDC_CS_KSMIRROR_E0, e);
ew (hDlg, IDC_CS_KSMIRROR_A8, e);
ew (hDlg, IDC_CS_CIAOVERLAY, e);
ew (hDlg, IDC_FILTERXTRA, vv2);
ew (hDlg, IDC_FILTERDEFAULT, v);
ew (hDlg, IDC_FILTERFILTER, vv);
+ ew (hDlg, IDC_FILTERUPSCALE, vv && !vv2);
ew (hDlg, IDC_FILTERAUTORES, vv && !vv2);
ew (hDlg, IDC_FILTERPRESETSAVE, filterpreset_builtin < 0);
&workprefs.gfx_xcenter, &workprefs.gfx_ycenter,
&workprefs.gfx_filter_luminance, &workprefs.gfx_filter_contrast, &workprefs.gfx_filter_saturation,
&workprefs.gfx_filter_gamma, &workprefs.gfx_filter_blur, &workprefs.gfx_filter_noise,
+ &workprefs.gfx_filter_upscale,
NULL
};
struct filterpreset {
char *name;
- int conf[22];
+ int conf[23];
};
static struct filterpreset filterpresets[] =
{
- { "PAL example", 8, 0, 0, 0, 1000, 1000, 0, 0, 50, 0, 0, 0, 1, 0, 0, 0, 10, 0, 0, 0, 300, 30 },
+ { "PAL example", 8, 0, 0, 0, 1000, 1000, 0, 0, 50, 0, 0, 0, 1, 0, 0, 0, 10, 0, 0, 0, 300, 30, 0 },
{ NULL }
};
currprefs.gfx_filter_horiz_offset = workprefs.gfx_filter_horiz_offset = 0;
currprefs.gfx_filter_vert_offset = workprefs.gfx_filter_vert_offset = 0;
values_to_hw3ddlg (hDlg);
+ updatedisplayarea ();
+ WIN32GFX_WindowMove ();
break;
case IDC_FILTERPRESETLOAD:
case IDC_FILTERPRESETSAVE:
case IDC_FILTERAUTORES:
workprefs.gfx_autoresolution = IsDlgButtonChecked (hDlg, IDC_FILTERAUTORES);
break;
+ case IDC_FILTERUPSCALE:
+ currprefs.gfx_filter_upscale = workprefs.gfx_filter_upscale = IsDlgButtonChecked (hDlg, IDC_FILTERUPSCALE);
+ updatedisplayarea ();
+ WIN32GFX_WindowMove ();
+ break;
default:
if (HIWORD (wParam) == CBN_SELCHANGE || HIWORD (wParam) == CBN_KILLFOCUS) {
switch (LOWORD (wParam))
1.4.6 will be the last Windows 98/ME compatible version. 1.5.0
will require Windows 2000 or newer.
+Beta 8:
+
+- input-panel NMI and END+SHIFT+Break NMI was unstable in
+ cycle-exact/more compatible modes
+- Denise without EHB added to advanced chipset (was already in
+ A1000 "ICS" Quickstart)
+- original Agnus BLTBUSY bug added to advanced chipset (also was
+ already in A1000 Quickstart)
+- accept same windowed mode resolution as windows desktop
+- added "full screen" option to filter panel. Amiga display area
+ fills whole screen when this option is enabled. Maybe useful when
+ using "full-window" mode. Note: "whole screen" = resolution selected
+ in full screen display select box, even in "full-window" mode.
+ "Internal" filter window size can't be adjusted yet.
+
Beta 7:
- debugger activating when address error happened (debug code..)