Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Input Recording/Playback Functionality #2412

Merged
merged 29 commits into from
Apr 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
68ddfa6
recording: gitignore modifications and new keybindings
xTVaser Jul 3, 2018
1a8ad9c
travis:recording: added Recording sources to CMake scripts
xTVaser Jul 3, 2018
c0b4c67
recording: visual studio project changes
xTVaser Jul 3, 2018
276052a
GSdx: implemented saving a snapshot to a dialog provided file path
xTVaser Jul 3, 2018
d97af0d
recording: all modifications to pcsx2/ source
xTVaser Jul 3, 2018
f23773c
recording: added new log sources
xTVaser Jul 3, 2018
1fd9dcd
recording: implementation for new keybindings
xTVaser Jul 3, 2018
c662c27
gui:recording: All main window modifications and additions
xTVaser Jul 3, 2018
28b3816
gui:recording: new mainmenu event listeners
xTVaser Jul 3, 2018
5c9e126
recording:gui: movie editor window and virtual pads
xTVaser Jul 3, 2018
bff7c75
recording: main recording functions and input gathering
xTVaser Jul 3, 2018
22f477a
recording:gui: dialog for creating a new recording
xTVaser Jul 3, 2018
011fcf8
recording: implementation for recording file GUI panel
xTVaser Jul 3, 2018
4a3d2cd
recording: recording file implementation
xTVaser Jul 3, 2018
914e4e3
travis: include recording header files in travis build properly
xTVaser Jul 16, 2018
550d503
recording: removed C++ reserved pattern usages, removed japanese comm…
xTVaser Jul 16, 2018
6cd3eea
gui:recording: force ascii for filepath of recording, remove legacy c…
xTVaser Jul 16, 2018
7f51d7a
recording:gui: was not correctly removing recording top level menu ba…
xTVaser Jul 16, 2018
62c8df8
recording:gui: Overhaul VirtualPad GUIs
xTVaser Nov 16, 2018
afa4a4d
recording:gui: Temporarily remove Movie Editor GUI, add back at a lat…
xTVaser Nov 16, 2018
0f06393
recording: Use wxFopen instead of f_open
xTVaser Nov 20, 2018
36861d3
recording: Significant refactor on VirtualPad implementation
xTVaser Nov 22, 2018
61d5754
recording: Use conventional savestate functions, save save-state in a…
xTVaser Nov 22, 2018
3cc4e22
recording: Added some more useful logs and cleaned up some TODOs
xTVaser Nov 23, 2018
41824f5
gui:recording: Revert addition of Screenshot As, will contribute as s…
xTVaser Nov 23, 2018
7b8a0bd
recording: Append copyright headers
xTVaser Nov 23, 2018
d971e7d
recording: various formatting and review corrections
xTVaser Nov 30, 2018
2f16e52
recording: freeze recording information to savestate regardless
xTVaser Jan 27, 2019
6a41ac8
recording: Opt-into keybindings, revert potential overrides if disabled
xTVaser Mar 6, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,20 @@ Thumbs.db

Debug.txt
install_log.txt
padLog.txt

Debug
Release
Devel

oprofile_data/

# Recording Specific Ignores (pcsx2-rr)
*.p2s
*.p2m2
*.p2m2_backup
*.p2m2_SaveState.p2s

# Visual Studio upgrades
/Backup*
/UpgradeLog*.htm
Expand Down
29 changes: 29 additions & 0 deletions bin/PCSX2_keys.ini.default
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,32 @@ GSwindow_OffsetYplus = Alt-Ctrl-DOWN
GSwindow_OffsetXminus = Alt-Ctrl-LEFT
GSwindow_OffsetXplus = Alt-Ctrl-RIGHT
GSwindow_OffsetReset = Alt-Ctrl-KP_DIVIDE

# Recording Bindings
# Note - These are disabled if 'System > Enable Recording Tools' is disabled
FrameAdvance = SPACE
TogglePause = Shift-P
InputRecordingModeToggle = Shift-R

# Save State Management
# Note - These are disabled if 'System > Enable Recording Tools' is disabled
States_SaveSlot0 = Shift-KP_0
States_SaveSlot1 = Shift-KP_1
States_SaveSlot2 = Shift-KP_2
States_SaveSlot3 = Shift-KP_3
States_SaveSlot4 = Shift-KP_4
States_SaveSlot5 = Shift-KP_5
States_SaveSlot6 = Shift-KP_6
States_SaveSlot7 = Shift-KP_7
States_SaveSlot8 = Shift-KP_8
States_SaveSlot9 = Shift-KP_9
States_LoadSlot0 = KP_0
States_LoadSlot1 = KP_1
States_LoadSlot2 = KP_2
States_LoadSlot3 = KP_3
States_LoadSlot4 = KP_4
States_LoadSlot5 = KP_5
States_LoadSlot6 = KP_6
States_LoadSlot7 = KP_7
States_LoadSlot8 = KP_8
States_LoadSlot9 = KP_9
24 changes: 24 additions & 0 deletions pcsx2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,28 @@ set(pcsx2RDebugHeaders
RDebug/deci2_netmp.h
RDebug/deci2_ttyp.h)

# Recording sources
set(pcsx2RecordingSources
Recording/InputRecording.cpp
Recording/InputRecordingFile.cpp
Recording/NewRecordingFrame.cpp
Recording/PadData.cpp
Recording/RecordingControls.cpp
Recording/RecordingInputManager.cpp
Recording/VirtualPad.cpp
)

# Recording headers
set(pcsx2RecordingHeaders
Recording/InputRecording.h
Recording/InputRecordingFile.h
Recording/NewRecordingFrame.h
Recording/PadData.h
Recording/RecordingControls.h
Recording/RecordingInputManager.h
Recording/VirtualPad.h
)

# System sources
set(pcsx2SystemSources
System/SysCoreThread.cpp
Expand Down Expand Up @@ -619,6 +641,8 @@ set(Common
${pcsx2IPUHeaders}
${pcsx2ps2Sources}
${pcsx2ps2Headers}
${pcsx2RecordingSources}
${pcsx2RecordingHeaders}
${pcsx2SystemSources}
${pcsx2SystemHeaders}
${pcsx2UtilitiesSources}
Expand Down
3 changes: 3 additions & 0 deletions pcsx2/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,9 @@ struct Pcsx2Config
EnablePatches :1, // enables patch detection and application
EnableCheats :1, // enables cheat detection and application
EnableWideScreenPatches :1,
#ifndef DISABLE_RECORDING
EnableRecordingTools :1,
#endif
// when enabled uses BOOT2 injection, skipping sony bios splashes
UseBOOT2Injection :1,
BackupSavestate :1,
Expand Down
13 changes: 13 additions & 0 deletions pcsx2/Counters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <time.h>
#include <cmath>

#include "App.h"
#include "Common.h"
#include "R3000A.h"
#include "Counters.h"
Expand All @@ -31,6 +32,10 @@

#include "Sio.h"

#ifndef DISABLE_RECORDING
# include "Recording/RecordingControls.h"
#endif

using namespace Threading;

extern u8 psxhblankgate;
Expand Down Expand Up @@ -566,6 +571,14 @@ __fi void rcntUpdate_vSync()
}
else // VSYNC end / VRENDER begin
{

#ifndef DISABLE_RECORDING
if (g_Conf->EmuOptions.EnableRecordingTools)
{
g_RecordingControls.HandleFrameAdvanceAndStop();
}
#endif

VSyncStart(vsyncCounter.sCycle);


Expand Down
10 changes: 10 additions & 0 deletions pcsx2/DebugTools/Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,11 @@ struct SysConsoleLogPack
ConsoleLogFromVM<Color_Yellow> iopConsole;
ConsoleLogFromVM<Color_Cyan> deci2;

#ifndef DISABLE_RECORDING
ConsoleLogFromVM<Color_StrongMagenta> recordingConsole;
ConsoleLogFromVM<Color_Red> controlInfo;
#endif

SysConsoleLogPack();
};

Expand Down Expand Up @@ -394,3 +399,8 @@ extern void __Log( const char* fmt, ... );
#define eeDeci2Log SysConsole.deci2.IsActive() && SysConsole.deci2.Write
#define iopConLog SysConsole.iopConsole.IsActive() && SysConsole.iopConsole.Write
#define sysConLog SysConsole.sysoutConsole.IsActive() && SysConsole.sysoutConsole.Write

#ifndef DISABLE_RECORDING
# define recordingConLog SysConsole.recordingConsole.IsActive() && SysConsole.recordingConsole.Write
# define controlLog SysConsole.controlInfo.IsActive() && SysConsole.controlInfo.Write
#endif
3 changes: 3 additions & 0 deletions pcsx2/Pcsx2Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,9 @@ void Pcsx2Config::LoadSave( IniInterface& ini )
IniBitBool( EnablePatches );
IniBitBool( EnableCheats );
IniBitBool( EnableWideScreenPatches );
#ifndef DISABLE_RECORDING
IniBitBool( EnableRecordingTools );
#endif
IniBitBool( ConsoleToStdio );
IniBitBool( HostFs );

Expand Down
Loading