if (cdcomrxinx == cdcomrxcmp)
return;
- #if AKIKO_DEBUG_IO_CMD
- write_log (_T("OUT IDX=0x%02X-0x%02X LEN=%d,%08x:"), cdcomrxinx, cdcomrxcmp, cdrom_receive_length, cmd_buf);
- #endif
+#if AKIKO_DEBUG_IO
+ write_log (_T("OUT IDX=0x%02X-0x%02X LEN=%d,%08x:"), cdcomrxinx, cdcomrxcmp, cdrom_receive_length, cmd_buf);
+#endif
if (cdrom_receive_offset < 0) {
checksum = 0xff;
for (i = 0; i < cdrom_receive_length; i++) {
checksum -= cdrom_result_buffer[i];
- #if AKIKO_DEBUG_IO_CMD
+#if AKIKO_DEBUG_IO
write_log (_T("%02X "), cdrom_result_buffer[i]);
- #endif
+#endif
}
-#if AKIKO_DEBUG_IO_CMD
+#if AKIKO_DEBUG_IO
write_log (_T("(%02X)\n"), checksum);
#endif
cdrom_result_buffer[cdrom_receive_length++] = checksum;
cdrom_receive_offset = 0;
} else {
-#if AKIKO_DEBUG_IO_CMD
+#if AKIKO_DEBUG_IO
write_log (_T("\n"));
#endif
}
}
if (cdcomrxinx == cdcomrxcmp) {
set_status (CDINTERRUPT_RXDMADONE);
-#if AKIKO_DEBUG_IO_CMD
+#if AKIKO_DEBUG_IO
write_log (_T("RXDMADONE %d/%d\n"), cdrom_receive_offset, cdrom_receive_length);
#endif
}
}
}
+static bool invstate (void)
+{
+ return bltstate != BLT_done && bltstate != BLT_init;
+}
+
static void blit_bltset (int con)
{
int i;
blitfill = !!(bltcon1 & 0x18);
// disable line draw if bltcon0 is written while it is active
- if (!savestate_state && bltstate != BLT_done && blitline) {
+ if (!savestate_state && bltstate != BLT_done && bltstate != BLT_init && blitline) {
blitline = 0;
bltstate = BLT_done;
blit_interrupt = 1;
// non-extra cycle to extra cycle: does not freeze but cycle diagram goes weird,
// extra free cycle changes to another D write..
// (Absolute Inebriation vector cube inside semi-filled vector object requires freezing blitter.)
- if (!savestate_state && bltstate != BLT_done) {
+ if (!savestate_state && invstate ()) {
static int freezes = 10;
int isen = blit_diag >= &blit_cycle_diagram_fill[0][0] && blit_diag <= &blit_cycle_diagram_fill[15][0];
int iseo = olddiag >= &blit_cycle_diagram_fill[0][0] && olddiag <= &blit_cycle_diagram_fill[15][0];
// on the fly switching from CH=1 to CH=D -> blitter stops writing (Rampage/TEK)
// currently just switch to no-channels mode, better than crashing the demo..
- if (!savestate_state && bltstate != BLT_done) {
+ if (!savestate_state && invstate ()) {
static uae_u8 changetable[32 * 32];
int o = original_ch + (original_fill ? 16 : 0);
int n = blit_ch + (blitfill ? 16 : 0);
return false;
}
+static void blitter_start_init (void)
+{
+ blt_info.blitzero = 1;
+ preva = 0;
+ prevb = 0;
+ blit_frozen = 0;
+
+ blit_bltset (1 | 2);
+ blit_modset ();
+ ddat1use = ddat2use = 0;
+ blit_interrupt = 0;
+
+ if (blitline) {
+ blinea = blt_info.bltadat;
+ blineb = (blt_info.bltbdat >> blt_info.blitbshift) | (blt_info.bltbdat << (16 - blt_info.blitbshift));
+ blitonedot = 0;
+ blitlinepixel = 0;
+ blitsing = bltcon1 & 0x2;
+ }
+}
+
static void do_blitter2 (int hpos, int copper)
{
int cycles;
bltstate = BLT_done;
blitter_cycle_exact = currprefs.blitter_cycle_exact;
- blt_info.blitzero = 1;
- preva = 0;
- prevb = 0;
blt_info.got_cycle = 0;
- blit_frozen = 0;
-
+ last_blitter_hpos = hpos + 1;
blit_firstline_cycles = blit_first_cycle = get_cycles ();
blit_misscyclecounter = 0;
blit_last_cycle = 0;
blit_maxcyclecounter = 0;
- last_blitter_hpos = hpos + 1;
blit_cyclecounter = 0;
blit_totalcyclecounter = 0;
- blit_bltset (1 | 2);
- blit_modset ();
- ddat1use = ddat2use = 0;
- blit_interrupt = 0;
+ blitter_start_init ();
if (blitline) {
- blinea = blt_info.bltadat;
- blineb = (blt_info.bltbdat >> blt_info.blitbshift) | (blt_info.bltbdat << (16 - blt_info.blitbshift));
- blitonedot = 0;
- blitlinepixel = 0;
- blitsing = bltcon1 & 0x2;
cycles = blt_info.vblitsize;
} else {
- blit_firstline_cycles = blit_first_cycle + (blit_diag[0] * blt_info.hblitsize + cpu_cycles) * CYCLE_UNIT;
cycles = blt_info.vblitsize * blt_info.hblitsize;
+ blit_firstline_cycles = blit_first_cycle + (blit_diag[0] * blt_info.hblitsize + cpu_cycles) * CYCLE_UNIT;
}
if (cleanstart) {
return;
}
- blt_info.got_cycle = 1;
+ if (dmaen (DMA_BLITTER)) {
+ blt_info.got_cycle = 1;
+ }
blit_waitcyclecounter = 0;
if (currprefs.immediate_blits) {
{
if (bltstate != BLT_init)
return;
+ blitter_start_init ();
bltstate = BLT_work;
if (currprefs.immediate_blits) {
blitter_doit ();
unset_special (SPCFLAG_COPPER);
}
}
+
+#if 0
+ int oldb = (oldcon & DMA_BLITTER) && (oldcon & DMA_MASTER);
+ int newb = (dmacon & DMA_BLITTER) && (dmacon & DMA_MASTER);
+ int oldbn = (oldcon & DMA_BLITPRI);
+ int newbn = (dmacon & DMA_BLITPRI);
+#endif
+
if ((dmacon & DMA_BLITPRI) > (oldcon & DMA_BLITPRI) && bltstate != BLT_done)
set_special (SPCFLAG_BLTNASTY);
if ((int)start - (int)vsync_time >= 0 && (int)start - (int)vsync_time < vsynctimebase)
t += (int)start - (int)vsync_time;
- if (!frame_shown)
+ if (!frame_shown) {
show_screen (1);
+ if (currprefs.gfx_apmode[0].gfx_strobo)
+ show_screen (2);
+ }
int legacy_avg = mavg (&ma_legacy, t, MAVG_VSYNC_SIZE);
if (t > legacy_avg)
} else if (regno >= 0) {
if (regno == 0 && (value & COLOR_CHANGE_BRDBLANK)) {
colors_for_drawing.borderblank = (value & 1) != 0;
- colors_for_drawing.bordersprite = (value & 2) != 0;
+ colors_for_drawing.bordersprite = (value & 3) == 2;
} else {
color_reg_set (&colors_for_drawing, regno, value);
colors_for_drawing.acolors[regno] = getxcolor (value);
struct zfile *zf;
int ver = -1, rev = -1;
uae_u32 dostype;
+ bool autofs = false;
// we already have custom filesystem loaded for earlier hardfile?
if (!ci->forceload) {
put_long (parmpacket + PP_FSSIZE, 0);
put_long (parmpacket + PP_FSPTR, seg);
put_long (parmpacket + PP_ADDTOFSRES, 0);
- write_log (_T("HDF: faked RDB filesystem '%s' reused\n"), uip->filesysdir);
+ write_log (_T("RDB: faked RDB filesystem '%s' reused\n"), uip->filesysdir);
return FILESYS_HARDFILE;
}
}
while (i > 0 && tmp[i - 1] != '/' && tmp[i - 1] != '\\')
i--;
_tcscpy (tmp + i, _T("FastFileSystem"));
+ autofs = true;
}
if (tmp[0] == 0) {
write_log (_T("RDB: no filesystem for dostype 0x%08X (%s)\n"), dostype, dostypes (dostype));
return FILESYS_HARDFILE;
}
+ uae_u32 fsres, fsnode;
+ int oldversion = -1;
+ int oldrevision = -1;
+ fsres = get_long (parmpacket + PP_FSRES);
+ fsnode = get_long (fsres + 18);
+ while (get_long (fsnode)) {
+ uae_u32 fsdostype = get_long (fsnode + 14);
+ if (fsdostype == dostype) {
+ oldversion = get_word (fsnode + 18);
+ oldrevision = get_word (fsnode + 20);
+ write_log (_T("RDB: %08X (%s) in FileSystem.resource version %d.%d\n"), dostype, dostypes (dostype), oldversion, oldrevision);
+ break;
+ }
+ fsnode = get_long (fsnode);
+ }
+ // if automatically found FastFileSystem, do not replace matching FileSystem.resource FS
+ if (autofs && oldversion >= 0) {
+ zfile_fclose (zf);
+ addfakefilesys (parmpacket, dostype, ver, rev, ci);
+ write_log (_T("RDB: not replacing FileSystem.resource\n"));
+ return FILESYS_HARDFILE;
+ }
+
zfile_fseek (zf, 0, SEEK_END);
size = zfile_ftell (zf);
if (size > 0) {
zfile_fclose (zf);
uip->rdb_filesyssize = size;
- uae_u32 fsres, fsnode;
- int oldversion = -1;
- int oldrevision = -1;
- fsres = get_long (parmpacket + PP_FSRES);
- fsnode = get_long (fsres + 18);
- while (get_long (fsnode)) {
- uae_u32 fsdostype = get_long (fsnode + 14);
- if (fsdostype == dostype) {
- oldversion = get_word (fsnode + 18);
- oldrevision = get_word (fsnode + 20);
- write_log (_T("HDF: %08X (%s) in FileSystem.resource version %d.%d\n"), dostype, dostypes (dostype), oldversion, oldrevision);
- break;
- }
- fsnode = get_long (fsnode);
- }
// DOS\0 is not in fs.resource
if (dostype == 0x444f5300 && oldversion < 0)
oldversion = 0;
put_long (parmpacket + PP_FSSIZE, uip->rdb_filesyssize);
put_long (parmpacket + PP_ADDTOFSRES, oldversion < 0 ? -1 : 0);
addfakefilesys (parmpacket, dostype, ver, rev, ci);
- write_log (_T("HDF: faked RDB filesystem %08X (%s %d.%d) loaded. ADD2FS=%d\n"), dostype, dostypes (dostype), ver, rev, oldversion < 0 ? 1 : 0);
+ write_log (_T("RDB: faked RDB filesystem %08X (%s %d.%d) loaded. ADD2FS=%d\n"), dostype, dostypes (dostype), ver, rev, oldversion < 0 ? 1 : 0);
return FILESYS_HARDFILE;
}
}
} else if (currprefs.cpu_frequency) {
cpucycleunit = CYCLE_UNIT * baseclock / currprefs.cpu_frequency;
+ } else if (currprefs.cpu_cycle_exact && currprefs.cpu_clock_multiplier == 0) {
+ if (currprefs.cpu_model >= 68030) {
+ cpucycleunit = CYCLE_UNIT / 8;
+ } else if (currprefs.cpu_model == 68020) {
+ cpucycleunit = CYCLE_UNIT / 4;
+ } else {
+ cpucycleunit = CYCLE_UNIT / 2;
+ }
}
if (cpucycleunit < 1)
cpucycleunit = 1;
}
/* 68000 Z=1. NVC=0
- * 68020 Signed: Z=1 NVC=0. Unsigned: V=1 N<dst, Z=!N.
- * 68060 C=0.
+ * 68020 and 68030: Signed: Z=1 NVC=0. Unsigned: V=1, N<dst, Z=!N, C=0.
+ * 68040/68060 C=0.
*/
void divbyzero_special (bool issigned, uae_s32 dst)
{
Name : RetroPlatformGuestIPC.h
Project : RetroPlatform Player
Client : Cloanto Italia srl
- Legal : Copyright 2007, 2008 Cloanto Italia srl - All rights reserved. This
- : file is made available under the terms of the GNU General Public
- : License version 2 as published by the Free Software Foundation.
+ Support : http://www.retroplatform.com
+ Legal : Copyright 2007-2012 Cloanto Italia srl - All rights reserved. This
+ : file is made available under the terms of the Mozilla Public License
+ : version 2.0 as published by Mozilla Corporation.
Authors : os
Created : 2007-08-24 15:29:26
- Updated : 2008-06-10 13:42:00
- Comment : RP Player interprocess communication include file (guest side)
+ Updated : 2012-11-29 13:47:00
+ Comment : RetroPlatform Player interprocess communication include file (guest side)
*****************************************************************************/
#ifndef __CLOANTO_RETROPLATFORMGUESTIPC_H__
Project : RetroPlatform Player
Client : Cloanto Italia srl
Support : http://www.retroplatform.com
- Legal : Copyright 2007-2012 Cloanto Italia srl - All rights reserved. This
+ Legal : Copyright 2007-2013 Cloanto Italia srl - All rights reserved. This
: file is made available under the terms of the Mozilla Public License
: version 2.0 as published by Mozilla Corporation.
Authors : os, mcb
Created : 2007-08-27 13:55:49
- Updated : 2012-04-23 12:41:00
+ Updated : 2013-03-20 17:15:00
Comment : RetroPlatform Player interprocess communication include file
*****************************************************************************/
#include <windows.h>
-#define RETROPLATFORM_API_VER "3.3"
+#define RETROPLATFORM_API_VER "3.4"
#define RETROPLATFORM_API_VER_MAJOR 3
-#define RETROPLATFORM_API_VER_MINOR 3
+#define RETROPLATFORM_API_VER_MINOR 4
#define RPIPC_HostWndClass "RetroPlatformHost%s"
#define RPIPC_GuestWndClass "RetroPlatformGuest%d"
#define RP_IPC_TO_GUEST_CLOSE (WM_APP + 200)
#define RP_IPC_TO_GUEST_SCREENMODE (WM_APP + 202)
-#define RP_IPC_TO_GUEST_SCREENCAPTURE (WM_APP + 203)
#define RP_IPC_TO_GUEST_PAUSE (WM_APP + 204)
#define RP_IPC_TO_GUEST_RESET (WM_APP + 206)
#define RP_IPC_TO_GUEST_TURBO (WM_APP + 207)
#define RP_IPC_TO_GUEST_QUERYSCREENMODE (WM_APP + 217)
#define RP_IPC_TO_GUEST_GUESTAPIVERSION (WM_APP + 218) // introduced in RetroPlatform API 3.0
#define RP_IPC_TO_GUEST_DEVICECONTENT (WM_APP + 219) // extended in RetroPlatform API 3.0
+#define RP_IPC_TO_GUEST_SCREENCAPTURE (WM_APP + 220) // extended in RetroPlatform API 3.4
// ****************************************************************************
// Message Data Structures and Defines
// Guest Features
#define RP_FEATURE_POWERLED 0x00000001 // a power LED is emulated
-#define RP_FEATURE_SCREEN1X 0x00000002 // 1x mode is available
+#define RP_FEATURE_SCREEN1X 0x00000002 // 1x mode is available (1 Amiga hires interlaced/RTG pixel = 1 host pixel)
#define RP_FEATURE_SCREEN2X 0x00000004 // 2x mode is available
#define RP_FEATURE_SCREEN3X 0x00000008 // 3x mode is available
#define RP_FEATURE_SCREEN4X 0x00000010 // 4x mode is available
#define RP_FEATURE_FULLSCREEN 0x00000020 // fullscreen display is available
-#define RP_FEATURE_SCREENCAPTURE 0x00000040 // screen capture functionality is available (see RP_IPC_TO_GUEST_SCREENCAPTURE message)
+#define RP_FEATURE_RESERVED 0x00000040 // unused - reserved for future use (to not cause side effects during screen capture changes in 201303 beta)
#define RP_FEATURE_PAUSE 0x00000080 // pause functionality is available (see RP_IPC_TO_GUEST_PAUSE message)
#define RP_FEATURE_TURBO_CPU 0x00000100 // turbo CPU functionality is available (see RP_IPC_TO_GUEST_TURBO message)
#define RP_FEATURE_VOLUME 0x00000200 // volume adjustment is possible (see RP_IPC_TO_GUEST_VOLUME message)
#define RP_FEATURE_TURBO_TAPE 0x01000000 // turbo tape functionality is available (see RP_IPC_TO_GUEST_TURBO message)
#define RP_FEATURE_MEMORY_BASIC 0x02000000 // Memory I/O basic features: Read, Write
#define RP_FEATURE_MEMORY_ADVANCED 0x04000000 // Memory I/O advanced features: Watch, Find, Alert, Freeze, Lock, Unlock, Off (must set both flags if full set is supported!)
+#define RP_FEATURE_SCREENCAPTURE 0x08000000 // new screen capture functionality is available (see RP_IPC_TO_GUEST_SCREENCAPTURE message)
typedef struct RPScreenMode
{
#define RP_DEVICEACTIVITY_READ RP_DEVICEACTIVITY_GREEN // device activity is a read operation
#define RP_DEVICEACTIVITY_WRITE RP_DEVICEACTIVITY_RED // device activity is a write operation
+
+// RPScreenCapture (used by RP_IPC_TO_GUEST_SCREENCAPTURE to request one bitmap or two simultaneous bitmaps)
+
+typedef struct RPScreenCapture
+{
+ DWORD dwFlags; // currently set to 0
+ WCHAR szScreenRaw[260]; // "\0" or full path and name (Unicode) of the BMP file to save - unfiltered, unscaled, unclipped bitmap (i.e. close to guest representation)
+ WCHAR szScreenFiltered[260]; // "\0" or full path and name (Unicode) of the BMP file to save - filtered (e.g. scanline effects), scaled (e.g. line-doubled and 2X-multiplied), clipped (overscan cropped) bitmap (i.e. as displayed in host environment)
+} RPSCREENCAPTURE;
+
+// Return codes for RP_IPC_TO_GUEST_SCREENCAPTURE
+#define RP_SCREENCAPTURE_ERROR 0x00000000 // non-error is always >= 1 (because of "MODE" flags)
+
+#define RP_GUESTSCREENFLAGS_MODE_DIGITAL 0x00000001 // "RTG" on Amiga, might be referred to as VGA or other digital (non-TV) mode on other systems
+#define RP_GUESTSCREENFLAGS_MODE_NTSC 0x00000002
+#define RP_GUESTSCREENFLAGS_MODE_PAL 0x00000003
+#define RP_GUESTSCREENFLAGS_MODEMASK 0x00000003
+#define RP_GUESTSCREENFLAGS_MODE(m) ((m) & RP_GUESTSCREENFLAGS_MODEMASK) // returns RP_GUESTSCREENFLAGS_MODE_DIGITAL, RP_GUESTSCREENFLAGS_MODE_NTSC or RP_GUESTSCREENFLAGS_MODE_PAL
+
+#define RP_GUESTSCREENFLAGS_VERTICAL_NONINTERLACED 0x00000000 // default also for RP_GUESTSCREENFLAGS_MODE_DIGITAL modes
+#define RP_GUESTSCREENFLAGS_VERTICAL_INTERLACED 0x00000004
+#define RP_GUESTSCREENFLAGS_VERTICALMASK 0x00000004
+#define RP_GUESTSCREENFLAGS_VERTICAL(m) ((m) & RP_GUESTSCREENFLAGS_VERTICALMASK) // returns RP_GUESTSCREENFLAGS_VERTICAL_NONINTERLACED o RP_GUESTSCREENFLAGS_VERTICAL_INTERLACED
+
+#define RP_GUESTSCREENFLAGS_HORIZONTAL_LORES 0x00000008
+#define RP_GUESTSCREENFLAGS_HORIZONTAL_HIRES 0x00000000 // default also for RP_GUESTSCREENFLAGS_MODE_DIGITAL modes
+#define RP_GUESTSCREENFLAGS_HORIZONTAL_SUPERHIRES 0x00000018
+#define RP_GUESTSCREENFLAGS_HORIZONTALMASK 0x00000018
+#define RP_GUESTSCREENFLAGS_HORIZONTAL(m) ((m) & RP_GUESTSCREENFLAGS_HORIZONTALMASK) // returns RP_GUESTSCREENFLAGS_HORIZONTAL_LORES, RP_GUESTSCREENFLAGS_HORIZONTAL_HIRES or RP_GUESTSCREENFLAGS_HORIZONTAL_SUPERHIRES
+
+
// RP_IPC_TO_HOST_HOSTVERSION
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
Client : Cloanto Italia srl
Support : http://www.retroplatform.com
Legal : CONFIDENTIAL TRADE SECRET PROPERTY OF CLOANTO ITALIA SRL
- : Copyright © Cloanto Italia srl 2007-2011.
+ : Copyright © Cloanto Italia srl 2007-2013.
: All rights reserved, except where licensed,
: assigned or transferred by contract.
Authors : os, mcb
Created : 2007-08-23 10:08:25
- Updated : 2011-07-28 11:26:00
+ Updated : 2013-03-16 07:20:00
Comment : Reference for RetroPlatformIPC.h (RP Player interprocess communication include file)
*****************************************************************************/
****************************************************************************
Message:
- RPIPCGM_REGISTER
+ RP_IPC_TO_HOST_REGISTER
Description:
this is a private message and is automatically sent
by the RPInitializeGuest() function
to register the caller as a RetroPlatform guest
-Message:
- RPIPCGM_FEATURES
-Description:
- the guest uses this sequence of messages to tell the host
- about the features it supports;
- at startup time, the guest sends initialization messages
+Notes about startup:
+>>>
+ At startup time, the guest sends initialization messages
+ (terminated by RP_IPC_TO_HOST_SCREENMODE)
so that the host can adapt the GUI based on the reported features;
these messages include:
- RPIPCGM_FEATURES (describes guest features),
- RPIPCGM_INPUTDEVICE (enumerates available input devices)
- RPIPCGM_POWERLED (turns on the power LED in the GUI),
- RPIPCGM_DEVICES (one for each device category: tells the number of emulated devices),
- RPIPCGM_DEVICECONTENT (one for each device with an image file or peripheral attached),
- RPIPCGM_DEVICEREADWRITE (one for each device with an image file or peripheral attached - optional for non-floppy/non-hard disk which are always read-only),
- RPIPCGM_TURBO (tells if some of the turbo modes are activated from the start),
- RPIPCGM_VOLUME (reports about starting volume level),
- RPIPCGM_SCREENMODE (communicates the screen mode, the clipping coordinates and the guest window handle);
+ RP_IPC_TO_HOST_FEATURES (describes guest features),
+ RP_IPC_TO_HOST_INPUTDEVICE (enumerates available input devices)
+ RP_IPC_TO_HOST_POWERLED (turns on the power LED in the GUI),
+ RP_IPC_TO_HOST_DEVICES (one for each device category: tells the number of emulated devices),
+ RP_IPC_TO_HOST_DEVICECONTENT (one for each device with an image file or peripheral attached),
+ RP_IPC_TO_HOST_DEVICEREADWRITE (one for each device with an image file or peripheral attached - optional for non-floppy/non-hard disk which are always read-only),
+ RP_IPC_TO_HOST_TURBO (tells if some of the turbo modes are activated from the start),
+ RP_IPC_TO_HOST_VOLUME (reports about starting volume level),
+ RP_IPC_TO_HOST_SCREENMODE (communicates the screen mode, the clipping coordinates and the guest window handle);
note that at startup time the guest should create a borderless and hidden window
- and send its handle using a RPIPCGM_SCREENMODE message, which must be the last
+ and send its handle using a RP_IPC_TO_HOST_SCREENMODE message, which must be the last
of the initialization messages, since it displays the guest window
and the host "frame window" (the part of the player user interface
with command and status icons which can be used to drag the guest window, etc.);
in some circumstances the host may decide not to display the guest window
- when receiving the RPIPCGM_SCREENMODE message (e.g. in Express mode
+ when receiving the RP_IPC_TO_HOST_SCREENMODE message (e.g. in Express mode
the guest may be immediately paused and an intro banner may be displayed;
when the intro banner is dismissed the guest is resumed from pause mode
- and its window is displayed)
+ and its window is displayed);
+<<<
+
+Message:
+ RP_IPC_TO_HOST_FEATURES
+Description:
+ the guest uses this sequence of messages to tell the host
+ about the features it supports;
+
+ at startup time, the guest sends RP_IPC_TO_HOST_FEATURES to describe
+ the guest features, so that the host can adapt the UI based on the
+ reported features; in this context, RP_IPC_TO_HOST_FEATURES is sent
+ together with the other initialization messages;
+
+ at runtime RP_IPC_TO_HOST_FEATURES may be sent with a fresh set of
+ attributes (e.g. because a new screen mode can be scaled in different ways, etc.)
+
Data sent:
WPARAM = RP_FEATURE_* flags
Response:
Message:
- RPIPCGM_INPUTDEVICE
+ RP_IPC_TO_HOST_INPUTDEVICE
Description:
- the guest sends one or more RPIPCGM_INPUTDEVICE messages
- after sending the RPIPCGM_FEATURES messages, but before
- sending the final RPIPCGM_SCREENMODE message, which also
- indicates that no more RPIPCGM_INPUTDEVICE messages will follow.
+ the guest sends one or more consecutive RP_IPC_TO_HOST_INPUTDEVICE messages,
+ terminated by an RP_HOSTINPUT_END type device. This input device enumeration
+ must be done at startup (immediately after sending the RP_IPC_TO_HOST_FEATURES
+ messages and before the RP_IPC_TO_HOST_SCREENMODE message) and
+ should be done whenever a device is added or removed. The first message
+ of a series resets the list of input devices, which starts fresh from that first
+ input device, followed by more devices until the RP_HOSTINPUT_END dummy device.
The messages enumerate the input-type devices (RP_DEVICECATEGORY_INPUTPORT
category) found on the host.
Data sent:
Message:
- RPIPCGM_CLOSED
+ RP_IPC_TO_HOST_CLOSED
Description:
this message is sent to the host when the guest is terminating;
the RPPostMessage() function (instead of RPSendMessage()) should be used
to send this message, since the host may wait for the guest process to terminate
- when RPIPCGM_CLOSED is received
+ when RP_IPC_TO_HOST_CLOSED is received
Data sent:
none
Response:
Message:
- RPIPCGM_ACTIVATED
+ RP_IPC_TO_HOST_ACTIVATED
Description:
the guest sends this message to the host
when its window is being activated
Message:
- RPIPCGM_DEACTIVATED
+ RP_IPC_TO_HOST_DEACTIVATED
Description:
the guest sends this message to the host
when its window is being deactivated
Message:
- RPIPCGM_ENABLED
+ RP_IPC_TO_HOST_ENABLED
Description:
the guest sends this message to the host when its window is being enabled
(e.g. a WM_ENABLE message has been received with wParam set to TRUE);
Message:
- RPIPCGM_DISABLED
+ RP_IPC_TO_HOST_DISABLED
Description:
the guest sends this message to the host when its window is being disabled
(e.g. a WM_ENABLE message has been received with wParam set to FALSE);
Message:
- RPIPCGM_SCREENMODE
+ RP_IPC_TO_HOST_SCREENMODE
Description:
- the guest sends a RPIPCGM_SCREENMODE message to notify the host
+ the guest sends a RP_IPC_TO_HOST_SCREENMODE message to notify the host
about a change in its "screen mode"
(1x/2x/3x/4x, full screen, clipping coordinates, etc.),
or to keep the host updated about the guest window handle
(just before destroying its window, the guest sends this message
with the hGuestWindow field of the RPSCREENMODE structure set to NULL);
screen mode changes requested by the host
- (see the RPIPCHM_SCREENMODE message) must not be notified,
+ (see the RP_IPC_TO_GUEST_SCREENMODE message) must not be notified,
unless this is an asynchronous screen mode change
(i.e. the guest returned the INVALID_HANDLE_VALUE
- response to a RPIPCHM_SCREENMODE host request);
- at startup time, the guest must create
+ response to a RP_IPC_TO_GUEST_SCREENMODE host request).
+
+ At startup time, the guest must create
a borderless and hidden window and send its handle
using this message; the host will then take care
- of preparing, positioning and showing the guest window
+ of preparing, positioning and showing the guest window.
+ RP_IPC_TO_HOST_SCREENMODE marks the end of the guest
+ initialization steps.
+
Data sent:
pData = a RPSCREENMODE structure
Response:
Message:
- RPIPCGM_POWERLED
+ RP_IPC_TO_HOST_POWERLED
Description:
sent to the host to change the power LED state
Data sent:
- WPARAM = power LED intensity (min/off 0, max 100)
+ WPARAM = power LED intensity (off 0, min 1, max decimal 100)
+ in a dual-brightness LED system values 1-49 (decimal) indicate the
+ "dimmed" status (Amiga "low-pass filter off")
Response:
none
Message:
- RPIPCGM_DEVICES
+ RP_IPC_TO_HOST_DEVICES
Description:
this message is used to notify the host about a change
in the number of emulated devices (floppy drives, hard disks, etc.)
Message:
- RPIPCGM_DEVICEACTIVITY
+ RP_IPC_TO_HOST_DEVICEACTIVITY
Description:
this message can be used to turn on or off the activity indicator
of a specified device (a single LED on the original hardware)
Message:
- RPIPCGM_MOUSECAPTURE
+ RP_IPC_TO_HOST_MOUSECAPTURE
Description:
the guest sends this message when the mouse is captured/released
(the mouse is "captured" when its movements are restricted to the guest window area
and the system cursor is not visible);
mouse capture changes requested by the host
- (see the RPIPCHM_MOUSECAPTURE message) must not be notified;
- for consistency across different guests, a guest which sends RPIPCGM_MOUSECAPTURE
+ (see the RP_IPC_TO_GUEST_MOUSECAPTURE message) must not be notified;
+ for consistency across different guests, a guest which sends RP_IPC_TO_HOST_MOUSECAPTURE
messages should also implement a keyboard-actuated escape functionality
(the preferred key for this purpose is included in the parameters sent from the
host at startup time - see RPLaunchGuest() in RetroPlatformPlugin.h);
Message:
- RPIPCGM_HOSTAPIVERSION
+ RP_IPC_TO_HOST_HOSTAPIVERSION
Description:
- the guest can send a RPIPCGM_HOSTAPIVERSION to query the host
+ the guest can send a RP_IPC_TO_HOST_HOSTAPIVERSION to query the host
about the RetroPlatform API version it implements;
since the guest plugin already asks for a minimum version of the API
on the host side, this message can be used to check the host API version
Message:
- RPIPCGM_HOSTVERSION
+ RP_IPC_TO_HOST_HOSTVERSION
Description:
- the guest can send a RPIPCGM_HOSTVERSION
+ the guest can send a RP_IPC_TO_HOST_HOSTVERSION
to query the host about its version
Data sent:
none
Message:
- RPIPCGM_PAUSE
+ RP_IPC_TO_HOST_PAUSE
Description:
the guest sends this message to the host
when it enters or exits pause mode;
pause mode changes requested by the host
- (see the RPIPCHM_PAUSE message) must not be notified,
- unless the guest returned the value 2 as RPIPCHM_PAUSE response;
+ (see the RP_IPC_TO_GUEST_PAUSE message) must not be notified,
+ unless the guest returned the value 2 as RP_IPC_TO_GUEST_PAUSE response;
note: when paused, the guest should release the mouse (if captured);
during pause mode, the mouse should never be captured
Data sent:
Message:
- RPIPCGM_DEVICECONTENT
+ RP_IPC_TO_HOST_DEVICECONTENT
Description:
- the guest sends a RPIPCGM_DEVICECONTENT message
+ the guest sends a RP_IPC_TO_HOST_DEVICECONTENT message
to notify the host that an image file (e.g. a floppy disk image)
or a peripheral (e.g. a joystick)
- has been loaded into (or ejected from) an emulated device;
+ has been loaded/inserted into (or ejected from) an emulated device;
this notification does not need to (must not) be sent when the event
- has been requested by the host (see the RPIPCHM_DEVICECONTENT message).
+ has been requested by the host (see the RP_IPC_TO_GUEST_DEVICECONTENT message).
If the host requested an unavailable device (e.g. tablet), the guest
- should send an LRESULT 0 (error) in reply to the RPIPCHM_DEVICECONTENT
- message, followed by an RPIPCGM_DEVICECONTENT message
+ should send an LRESULT 0 (error) in reply to the RP_IPC_TO_GUEST_DEVICECONTENT
+ message, followed by an RP_IPC_TO_HOST_DEVICECONTENT message
indicating the actual content (empty, previous device, similar device, etc.)
+ Configuration details (e.g. keyboard-joystick layout) should be preserved, so
+ that the appropriate data can be sent to the host (e.g. Content set to
+ "KeyboardCustom Left=0x4B Right=0x4D Up=0x48 Down=0x50 Fire=0x52"), which in
+ turn may need to display it in the user interface.
Data sent:
pData = a RPDEVICECONTENT structure (see RetroPlatformIPC.h);
the szContent field of the structure
Message:
- RPIPCGM_DEVICEREADWRITE
+ RP_IPC_TO_HOST_DEVICEREADWRITE
Description:
- the guest sends a RPIPCGM_DEVICEREADWRITE message
+ the guest sends a RP_IPC_TO_HOST_DEVICEREADWRITE message
to notify the host about an initial status or a change in
the read/write protection status;
this notification is optional if the event
- was requested by the host (see the RPIPCHM_DEVICEREADWRITE message);
+ was requested by the host (see the RP_IPC_TO_GUEST_DEVICEREADWRITE message);
used for device categories RP_DEVICECATEGORY_FLOPPY, RP_DEVICECATEGORY_HD,
RP_DEVICECATEGORY_TAPE, RP_DEVICECATEGORY_CARTRIDGE
Data sent:
Message:
- RPIPCGM_TURBO
+ RP_IPC_TO_HOST_TURBO
Description:
- the guest sends a RPIPCGM_TURBO message
- to notify the host about activation of "turbo" (maximum speed) mode
+ the guest sends a RP_IPC_TO_HOST_TURBO message
+ to notify the host about activation (e.g. from startup) of "turbo" (maximum speed) mode
of some of its functionalities (e.g. floppy, CPU);
turbo mode activations/deactivations requested by the host
- (see the RPIPCHM_TURBO message) must not be notified;
+ (see the RP_IPC_TO_GUEST_TURBO message) must not be notified;
Data sent:
WPARAM = mask of functionalities affected (RP_TURBO_* flags)
LPARAM = bits corresponding to those set in WPARAM
Message:
- RPIPCGM_PING
+ RP_IPC_TO_HOST_PING
Description:
this is a no-operation message and can be sent
to check if the host is responsive and functional
Message:
- RPIPCGM_VOLUME
+ RP_IPC_TO_HOST_VOLUME
Description:
- the guest uses the RPIPCGM_VOLUME message
+ the guest uses the RP_IPC_TO_HOST_VOLUME message
to notify the host about a change of its audio level;
audio level changes requested by the host
- (see the RPIPCHM_VOLUME message) must not be notified
+ (see the RP_IPC_TO_GUEST_VOLUME message) must not be notified
Data sent:
WPARAM = volume level (min/off 0, max 100)
Response:
Message:
- RPIPCGM_ESCAPED
+ RP_IPC_TO_HOST_ESCAPED
Description:
this message is sent to notify the host
that the escape key has been held down
Message:
- RPIPCGM_PARENT
+ RP_IPC_TO_HOST_PARENT
Description:
the guest sends this message to the host to get the handle
of the parent for its window; the guest window must be created
Message:
- RPIPCGM_DEVICESEEK
+ RP_IPC_TO_HOST_DEVICESEEK
Description:
this message can be used to notify the host about a seek operation
of a specified device (e.g. the head of a disk drive changes position;
Message:
- RPIPCGM_CLOSE
+ RP_IPC_TO_HOST_CLOSE
Description:
when the user presses ALT+F4 in the guest window
the guest should intercept such an event
send this notification message to the host
and not close its window (i.e. not call the DefWindowProc() of its window);
the host will then open its Close Options dialog
- and will send a RPIPCHM_CLOSE command to the guest
+ and will send a RP_IPC_TO_GUEST_CLOSE command to the guest
if the user confirms the close request
Data sent:
none
****************************************************************************
Message:
- RPIPCHM_CLOSE
+ RP_IPC_TO_GUEST_CLOSE
Description:
sent from the host when the emulation must be terminated
(e.g. the user has hit the close button in the host window);
Message:
- RPIPCHM_SCREENMODE
+ RP_IPC_TO_GUEST_SCREENMODE
Description:
this message is sent to ask the guest to activate a specified screen mode
and clipping coordinates;
LRESULT = handle of the (new) guest window
or NULL (the screen mode couldn't be changed)
or INVALID_HANDLE_VALUE (the screen mode will be changed asynchronously
- and the host will soon get a RPIPCGM_SCREENMODE notification)
+ and the host will soon get a RP_IPC_TO_HOST_SCREENMODE notification)
Message:
- RPIPCHM_SCREENCAPTURE
+ RP_IPC_TO_GUEST_SCREENCAPTURE
Description:
- with this message the host asks the guest to save its screen
- to the specified file in BMP format
+ with this message the host asks the guest to save its screen bitmap(s)
+ (raw and/or filtered version) to the specified file(s), in BMP format.
Data sent:
- pData = (Unicode) full path and name of the file to save
- (note: the file may exist and can be overwritten)
+ pData = a RPSCREENCAPTURE structure with one or two full path(s) and name(s)
+ (Unicode) of the file(s) to save. Note: existing files can be
+ overwritten.
Response:
- LRESULT = 1 if the guest successfully saved its screen to the file or 0 otherwise
+ LRESULT = RP_GUESTSCREENFLAGS_ if the guest successfully saved the
+ bitmap(s) to the file(s) or RP_SCREENCAPTURE_ERROR otherwise
Message:
- RPIPCHM_PAUSE
+ RP_IPC_TO_GUEST_PAUSE
Description:
- the RPIPCHM_PAUSE message sets the guest into pause mode
+ the RP_IPC_TO_GUEST_PAUSE message sets the guest into pause mode
or resumes the guest from pause mode;
note: when paused, the guest should release the mouse (if captured);
during pause mode, the mouse should never be captured
Response:
LRESULT = 0 (error), 1 (command successfully executed)
or 2 (the command will be asynchronously executed
- and a RPIPCGM_PAUSE will be later sent from the guest
+ and a RP_IPC_TO_HOST_PAUSE will be later sent from the guest
to confirm execution)
Message:
- RPIPCHM_DEVICECONTENT
+ RP_IPC_TO_GUEST_DEVICECONTENT
Description:
- the host sends a RPIPCHM_DEVICECONTENT message
+ the host sends a RP_IPC_TO_GUEST_DEVICECONTENT message
to load an image file or a peripheral into an emulated device
(e.g. an ADF floppy file into a floppy drive,
or a physical or keyboard-emulated joystick into an input port)
Message:
- RPIPCHM_DEVICEREADWRITE
+ RP_IPC_TO_GUEST_DEVICEREADWRITE
Description:
- the host sends a RPIPCHM_DEVICEREADWRITE message
+ the host sends a RP_IPC_TO_GUEST_DEVICEREADWRITE message
to set the read/write protection status
Data sent:
WPARAM = device category (RP_DEVICE_* value) and device number
Message:
- RPIPCHM_RESET
+ RP_IPC_TO_GUEST_RESET
Description:
the host sends this message to reset the guest
Data sent:
Message:
- RPIPCHM_TURBO
+ RP_IPC_TO_GUEST_TURBO
Description:
the host sends this message to activate or deactivate
the turbo mode of selected guest functionalities
Message:
- RPIPCHM_PING
+ RP_IPC_TO_GUEST_PING
Description:
this is a no-operation message and can be sent
to check if the guest is responsive and functional
Message:
- RPIPCHM_VOLUME
+ RP_IPC_TO_GUEST_VOLUME
Description:
- the host uses the RPIPCHM_VOLUME message to set
+ the host uses the RP_IPC_TO_GUEST_VOLUME message to set
the audio level of the guest
Data sent:
WPARAM = volume level (min 0, max 100)
Message:
- RPIPCHM_ESCAPEKEY
+ RP_IPC_TO_GUEST_ESCAPEKEY
Description:
- the host uses the RPIPCHM_ESCAPEKEY message
+ the host uses the RP_IPC_TO_GUEST_ESCAPEKEY message
to change the escape key information
Data sent:
WPARAM = DirectInput DIK_* identifier of the escape key
Message:
- RPIPCHM_EVENT
+ RP_IPC_TO_GUEST_EVENT
Description:
- the host uses the RPIPCHM_EVENT message
- to simulate keyboard, mouse, joystick (press/release)
+ the host uses the RP_IPC_TO_GUEST_EVENT message
+ to simulate keyboard, mouse, joystick, tape button press/release
and other guest-specific events
Data sent:
- pData = (Unicode) event string (guest-specific)
+ pData = (Unicode) event string (guest-specific); for keyboard events ("KEY_"... string)
+ the event string is followed by a space and a "1"/"0" character (pressed/released).
Response:
LRESULT = 1 if the guest successfully simulated the specified event or 0 otherwise
Message:
- RPIPCHM_GUESTAPIVERSION
+ RP_IPC_TO_GUEST_GUESTAPIVERSION
Description:
- the host can send a RPIPCHM_GUESTAPIVERSION to query the guest
+ the host can send a RP_IPC_TO_GUEST_GUESTAPIVERSION to query the guest
about the RetroPlatform API version it implements;
this message can be used to check the guest API version
and enable optional functionality
Message:
- RPIPCHM_MOUSECAPTURE
+ RP_IPC_TO_GUEST_MOUSECAPTURE
Description:
the host uses this message to ask the guest
to capture or release the mouse (and activate/deactivate the magic mouse functionality)
Message:
- RPIPCHM_SAVESTATE
+ RP_IPC_TO_GUEST_SAVESTATE
Description:
with this message the host asks the guest to save
the emulation status to the specified file
Message:
- RPIPCHM_LOADSTATE
+ RP_IPC_TO_GUEST_LOADSTATE
Description:
with this message the host asks the guest to load
the emulation status from the specified file
Message:
- RPIPCHM_FLUSH
+ RP_IPC_TO_GUEST_FLUSH
Description:
- the host sends the RPIPCHM_FLUSH command to ask the guest
+ the host sends the RP_IPC_TO_GUEST_FLUSH command to ask the guest
to flush any change applied to the emulated media
and update the corresponding image files
Data sent:
Message:
- RPIPCHM_QUERYSCREENMODE
+ RP_IPC_TO_GUEST_QUERYSCREENMODE
Description:
this message is used to ask the guest to send
- a RPIPCGM_SCREENMODE notification as soon as possible
+ a RP_IPC_TO_HOST_SCREENMODE notification as soon as possible
with updated screen mode and clipping information
Data sent:
none
int buttoncnt = 0;
for (i = 0; i < size && buttoncnt < MAX_MAPPINGS; i++) {
int first, last;
+ if (bcaps[i].UsagePage >= 0xff00)
+ continue;
if (bcaps[i].IsRange) {
first = bcaps[i].Range.UsageMin;
last = bcaps[i].Range.UsageMax;
dumphidvaluecaps (vcaps, size);
int axiscnt = 0;
for (i = 0; i < size && axiscnt < MAX_MAPPINGS; i++) {
- int first, last;
+ int first, last;
if (vcaps[i].IsRange) {
first = vcaps[i].Range.UsageMin;
last = vcaps[i].Range.UsageMax;
if (HidP_GetUsagesEx (HidP_Input, 0, did->usagelist, &usagelength, did->hidpreparseddata, rawdata, hid->dwSizeHid) == HIDP_STATUS_SUCCESS) {
int k;
for (k = 0; k < usagelength; k++) {
+ if (did->usagelist[k].UsagePage >= 0xff00)
+ continue; // ignore vendor specific
for (j = 0; j < did->maxusagelistlength; j++) {
if (did->usagelist[k].UsagePage == did->prevusagelist[j].UsagePage &&
did->usagelist[k].Usage == did->prevusagelist[j].Usage)
}
}
for (j = 0; j < did->maxusagelistlength; j++) {
+ if (did->prevusagelist[j].UsagePage >= 0xff00)
+ continue; // ignore vendor specific
if (did->prevusagelist[j].Usage) {
if (rawinput_log & 4)
write_log (_T("%d/%d OFF\n"), did->prevusagelist[j].UsagePage, did->prevusagelist[j].Usage);
if (d3dCaps.PresentationIntervals & D3DPRESENT_INTERVAL_TWO)
dpp.PresentationInterval = D3DPRESENT_INTERVAL_TWO;
} else {
- vsync2 = -1;
+ vsync2 = -2;
}
} else if (hzmult > 0) {
vsync2 = 1;
D3D_showframe2 (false);
} else {
D3D_showframe2 (true);
- if (vsync2 < 0 && !currprefs.turbo_emulation) {
+ if (vsync2 == -1 && !currprefs.turbo_emulation) {
D3D_showframe2 (true);
}
}
if (dxdata.backbuffers == 2) {
DirectDraw_Blit (dxdata.flipping[1], dxdata.flipping[0]);
if (vsync) {
- if (currprefs.turbo_emulation || dxdata.vblank_skip == 0) {
- ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
- } else if (dxdata.vblank_skip > 0) {
- dxdata.vblank_skip_cnt ^= 1;
- if (dxdata.vblank_skip_cnt == 0)
- return;
- ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
- } else if (flipinterval_supported && !novsync) {
- ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags | DDFLIP_INTERVAL2);
+ if (ap->gfx_strobo) {
+ if (currprefs.turbo_emulation) {
+ ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
+ } else {
+ ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
+ DirectDraw_FillSurface (dxdata.flipping[0], NULL, 0);
+ ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
+ }
} else {
- ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
- DirectDraw_Blit (dxdata.flipping[1], dxdata.primary);
- ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
+ if (currprefs.turbo_emulation || dxdata.vblank_skip == 0) {
+ ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
+ } else if (dxdata.vblank_skip > 0) {
+ dxdata.vblank_skip_cnt ^= 1;
+ if (dxdata.vblank_skip_cnt == 0)
+ return;
+ ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
+ } else if (flipinterval_supported && !novsync) {
+ ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags | DDFLIP_INTERVAL2);
+ } else {
+ ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
+ DirectDraw_Blit (dxdata.flipping[1], dxdata.primary);
+ ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
+ }
}
} else {
ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
}
} else if(dxdata.backbuffers == 1) {
if (vsync) {
- if (currprefs.turbo_emulation || dxdata.vblank_skip == 0) {
- ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
- } else if (dxdata.vblank_skip > 0) {
- dxdata.vblank_skip_cnt ^= 1;
- if (dxdata.vblank_skip_cnt == 0)
- return;
- ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
- } else if (flipinterval_supported && !novsync) {
- ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags | DDFLIP_INTERVAL2);
+ if (ap->gfx_strobo) {
+ if (currprefs.turbo_emulation) {
+ ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
+ } else {
+ ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
+ DirectDraw_FillSurface (dxdata.flipping[0], NULL, 0);
+ ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
+ }
} else {
- ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
- DirectDraw_Blit (dxdata.flipping[0], dxdata.primary);
- ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
- DirectDraw_Blit (dxdata.flipping[0], dxdata.primary);
+ if (currprefs.turbo_emulation || dxdata.vblank_skip == 0) {
+ ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
+ } else if (dxdata.vblank_skip > 0) {
+ dxdata.vblank_skip_cnt ^= 1;
+ if (dxdata.vblank_skip_cnt == 0)
+ return;
+ ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
+ } else if (flipinterval_supported && !novsync) {
+ ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags | DDFLIP_INTERVAL2);
+ } else {
+ ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
+ DirectDraw_Blit (dxdata.flipping[0], dxdata.primary);
+ ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
+ DirectDraw_Blit (dxdata.flipping[0], dxdata.primary);
+ }
}
} else {
ddrval = IDirectDrawSurface7_Flip (dxdata.primary, NULL, flags);
}
case RP_IPC_TO_GUEST_SCREENCAPTURE:
{
- extern int screenshotf (const TCHAR *spath, int mode, int doprepare);
+ extern int screenshotf (const TCHAR *spath, int mode, int doprepare, int imagemode);
extern int screenshotmode;
- int ok;
- int ossm = screenshotmode;
- TCHAR *s = (TCHAR*)pData;
- screenshotmode = 0;
- ok = screenshotf (s, 1, 1);
- screenshotmode = ossm;
- return ok ? TRUE : FALSE;
+ struct RPScreenCapture *rpsc = (struct RPScreenCapture*)pData;
+ if (rpsc->szScreenFiltered[0] || rpsc->szScreenRaw[0]) {
+ int ossm = screenshotmode;
+ DWORD ret = 0;
+ int ok = 0;
+ screenshotmode = 0;
+ write_log (_T("'%s' '%s'\n"), rpsc->szScreenFiltered, rpsc->szScreenRaw);
+ if (rpsc->szScreenFiltered[0])
+ ok = screenshotf (rpsc->szScreenFiltered, 1, 1, 0);
+ if (rpsc->szScreenRaw[0])
+ ok |= screenshotf (rpsc->szScreenRaw, 1, 1, 1);
+ screenshotmode = ossm;
+ if (!ok)
+ return RP_SCREENCAPTURE_ERROR;
+ if (WIN32GFX_IsPicassoScreen ()) {
+ ret |= RP_GUESTSCREENFLAGS_MODE_DIGITAL;
+ } else {
+ ret |= currprefs.gfx_resolution == RES_LORES ? RP_GUESTSCREENFLAGS_HORIZONTAL_LORES : ((currprefs.gfx_resolution == RES_SUPERHIRES) ? RP_GUESTSCREENFLAGS_HORIZONTAL_SUPERHIRES : 0);
+ ret |= currprefs.ntscmode ? RP_GUESTSCREENFLAGS_MODE_NTSC : RP_GUESTSCREENFLAGS_MODE_PAL;
+ ret |= interlace_seen ? RP_GUESTSCREENFLAGS_VERTICAL_INTERLACED : 0;
+ }
+ return ret;
+ }
+ return RP_SCREENCAPTURE_ERROR;
}
case RP_IPC_TO_GUEST_SAVESTATE:
{
}
case RP_IPC_TO_GUEST_GUESTAPIVERSION:
{
- return MAKELONG(3, 0);
+ return MAKELONG(3, 4);
}
}
return FALSE;
static int rgb_rb, rgb_gb, rgb_bb, rgb_rs, rgb_gs, rgb_bs;
-int screenshot_prepare (void)
+int screenshot_prepare (int imagemode)
{
int width, height;
HGDIOBJ hgdiobj;
screenshot_free ();
regqueryint (NULL, _T("Screenshot_Original"), &screenshot_originalsize);
+ if (imagemode < 0)
+ imagemode = screenshot_originalsize;
- if (screenshot_originalsize) {
+ if (imagemode) {
int spitch, dpitch, x, y;
uae_u8 *src, *dst, *mem;
uae_u8 *palette = NULL;
return 0;
}
+int screenshot_prepare (void)
+{
+ return screenshot_prepare (-1);
+}
+
void Screenshot_RGBinfo (int rb, int gb, int bb, int rs, int gs, int bs)
{
if (!bi)
/*
Captures the Amiga display (DirectDraw, D3D or OpenGL) surface and saves it to file as a 24bit bitmap.
*/
-int screenshotf (const TCHAR *spath, int mode, int doprepare)
+int screenshotf (const TCHAR *spath, int mode, int doprepare, int imagemode)
{
static int recursive;
FILE *fp = NULL;
recursive++;
- if (!screenshot_prepared || doprepare) {
- if (!screenshot_prepare ())
+ if (!screenshot_prepared || doprepare) {
+ if (!screenshot_prepare (imagemode))
goto oops;
}
void screenshot (int mode, int doprepare)
{
- screenshotf (NULL, mode, doprepare);
+ screenshotf (NULL, mode, doprepare, -1);
}
#define LANG_DLL 1
#if WINUAEPUBLICBETA
-#define WINUAEBETA _T("12")
+#define WINUAEBETA _T("13")
#else
#define WINUAEBETA _T("")
#endif
-#define WINUAEDATE MAKEBD(2013, 3, 17)
+#define WINUAEDATE MAKEBD(2013, 3, 23)
#define WINUAEEXTRA _T("")
//#define WINUAEEXTRA _T("AmiKit Preview")
#define WINUAEREV _T("")
int isdllversion (const TCHAR *name, int version, int revision, int subver, int subrev);
extern int screenshot_prepare (void);
+extern int screenshot_prepare (int);
extern void screenshot_free (void);
struct winuae_lang
void show_screen (int mode)
{
EnterCriticalSection (&screen_cs);
+ if (mode == 2) {
+ if (currentmode->flags & DM_D3D) {
+ D3D_showframe_special (1);
+ }
+ LeaveCriticalSection (&screen_cs);
+ return;
+ }
if (!render_ok) {
LeaveCriticalSection (&screen_cs);
return;
}
if (currentmode->flags & DM_D3D) {
D3D_showframe ();
+
#ifdef GFXFILTER
} else if (currentmode->flags & DM_SWSCALE) {
if (!dx_islost () && !picasso_on)
add_filesys_config (&workprefs, -1, ¤t_fsvdlg.ci);
}
} else {
- uci_set_defaults (¤t_hfdlg.ci, false);
- current_hfdlg.forcedcylinders = 0;
+ default_hfdlg (¤t_hfdlg, false);
+ _tcscpy (current_hfdlg.ci.rootdir, file);
updatehdfinfo (NULL, true, true);
add_filesys_config (&workprefs, -1, ¤t_hfdlg.ci);
}
- restore only single input target to default.
+Beta 13:
+
+- Ignore vendor specific USB usage pages also in received USB HID packets, fixes for example Logitech Precision gamepad ghost button events.
+- Fixed border sprite bug introduced in b12, border sprites should stay hidden if border blanking is also enabled.
+- Black frame insertion is now supported in legacy vsync D3D 100Hz+ modes. DirectDraw modes may also work.
+- 68020+ cycle-exact CPU speed changed after entering and exiting GUI in some situations.
+- Partition hardfile dragndrop didn't work.
+- Automatically loaded ROM path FastFileSystem file always replaced FileSystem.resource FFS when mounting FFS partition hardfiles (b1).
+- Blitter DMA disabled, writing to BLTSIZE, writing to other blitter register(s) and finally enabling blitter DMA appears
+ to start the blitter normally. (Pink Panther graphics corruption, probably worked accidentally in some old versions)
+
Beta 12:
- AGA border sprite feature emulation is now also cycle-exact. Similar update to borderblank was done in 2.5.0. For example