31 Commits
Author SHA1 Message Date
NovaSquirrelandSour 325c78fcbd GB: Link cable support with two local consoles (#77)
* GB: Link cable support with two local consoles

* GB: Fix crash when color blending is enabled

* GB: Fix formatting

* GB: Link UI fixes, control fixes, audio fixes

Copied from Sour's branch. Also a separate change to use separate savefiles.

* GB: Try to avoid crashes from buffer overflows

* GB: Separate savefiles with linked multiplayer

* GB: Add support for faster link speed

* GB: Move enum to correct file

* GB: Refactor, move serial transfer to function

* -Fixed secondary console sometimes running far ahead of the main console when frame counters did not match (e.g because one console had their LCD disabled longer, etc.) This would cause buffer overflows in the audio buffer.
-Fixed screen tearing when both consoles are not perfectly in sync (because of the LCD being disabled for a different amount of time, etc.)
-Fixed main console not calling PlayQueuedAudio properly mid-frame
-Reuse VS Dualsystem code to merge audio/video when possible/simple and moved that to AvMergeUtilities

Some visual glitches can appear on the secondary screen (for GB) while rewinding, but this can't really be fixed.

* Fixed warning (unused local variable)

* Prevent loading single-console save states when in dual-console modes

* Disable debugger for VS DualSystem's subconsole. Fixes issues when debugging VS DualSystem games

* Code cleanup

* Rework solution to disable debugger on second console to improve performance
Added InternalRunFrame for nes & gb to avoid checking for the presence of the second console after each cpu instruction

* Don't enable the linked GB option by default

* Removed unused function

* Netplay: Force game to reload after updating emulation settings when connecting to the server (or when the host changes game)
This ensures that e.g the GB link cable setting is applied and that the game loads correctly, regardless of the client's link cable settings (otherwise the game could load without the link mode enabled, etc.)

---------

Co-authored-by: Sour <[email protected]>
2026-05-15 02:35:27 -07:00
SourMesen e9f48e23e8 Netplay: Fixed game crashing when connecting to server (#113)
The server would send a save state taken inside the PpuFrameDone event when a config change was detected, which is not safe. PpuFrameDone runs in the middle of CPU instructions, which could easily cause game crashes or desyncs.
2026-05-14 15:54:57 -07:00
SourMesen e391fd8f9a Code: Add auto-formatting rules for C++ (clang-format) and enforce in CI via "clang-format" and "dotnet format" (#78)
* Code: Add auto-formatting rules for C++ projects (clang-format) and enforce code style via "clang-format" and "dotnet format"

* fix ui format warnings
2026-04-30 06:03:55 -07:00
Sour f3b75dbeee Netplay: Fixed a couple of crashes and the "select controller" menu
-A client disconnecting could cause the server to crash
-A server stopping, then starting again, could cause the client to crash when reconnecting to the server after getting disconnected by the server stopped
-The select controller menu was not getting updated and was always empty
2024-08-07 18:31:20 +09:00
Sour 9751895751 Debugger: Allow saving/loading save states without forcing the emulator to run until the next vertical blank 2022-12-27 16:29:16 +09:00
Sour c4b6312c0a Refactoring - Added missing folder names in includes 2022-09-08 22:04:18 -04:00
Sour 7108bdde36 Refactoring - Moved some leftover files out of the root folder 2022-09-08 21:48:49 -04:00
Sour 152abf690b Rename stdafx.h to pch.h 2022-09-08 21:29:52 -04:00
Sour d7a8de8208 Removed unnecessary stdafx.h files 2022-09-08 21:15:56 -04:00
Sour ac16a14297 Fixed crash on power off when input controllers were displayed in the HUD + refactor GetControlManager to improve thread safety 2022-08-25 22:22:16 -04:00
Sour 998bf9b52b Added History Viewer 2022-08-07 19:03:35 -04:00
Sour c6e527cded Debugger: Lua - getScreenBuffer/setScreenBuffer, getInput/setInput implementations + other fixes/refactoring 2022-07-30 15:39:07 -04:00
Sour 165c86963e Netplay: Fixed various issues/crashes/freezes, allow selecting a controller on a hub adapter, etc. 2022-07-29 00:42:51 -04:00
Sour aaf240c070 Movies: Save/load settings and cheats, fixed bugs/crashes, fixed todos 2022-07-26 23:36:38 -04:00
Sour 077e8db3d7 Fixed some minor TODOs 2022-07-26 00:29:02 -04:00
Sour 4d9c4f76a9 Save states: Fixed crashes when loading invalid states, fixed load/save state menus not working properly, fixed crash when loading PCE states 2022-07-20 14:28:19 -04:00
Sour b456170551 Save states: Serializer rework/rewrite 2022-07-20 00:40:32 -04:00
Sour cfaf7b15f2 Fixed some general TODOs, added more error handling in the UI 2022-07-14 22:11:25 -04:00
Sour 1c055bb4af Save States: Load/save emulation settings for netplay/rewind states, fixes some TODOs, fixes some NES issues when loading a state taken in a different region 2022-03-31 14:36:15 -04:00
Sour a31eb671ac Input: Support for barcode readers and tape recorders (NES) 2022-03-15 22:39:30 -04:00
Sour 1f222fd300 NES/SNES: Allow more flexibility when configuring inputs (2x multitap, etc.) 2022-03-11 23:51:42 -05:00
Sour 11e16ced2d Fixed missing variable initialization, and a few bugs found via code analysis 2022-01-24 20:14:34 -05:00
Sour 3615ef0eb1 Core: Enabled warning level 4, fixed/disabled warnings 2022-01-23 12:36:35 -05:00
Sour 0d78c064f3 Core: Reduce shared_ptr usage, refactor netplay code to remove static instances 2022-01-21 21:25:33 -05:00
Sour e280064ad2 Fixed some netplay issues/todos 2021-05-24 13:43:21 -04:00
Sour 47fef0018d Netplay connect/start server UI 2021-05-24 12:24:23 -04:00
Sour c2df0ef553 Console region refactoring/changes 2021-04-27 23:30:00 -04:00
Sour 2029191669 Input configuration work 2021-04-14 22:32:22 -04:00
Sour 12bf5c5e1b NES/GB/SNES config, audio filters 2021-04-11 18:50:31 -04:00
Sour e27e511558 File reorganization 2021-04-09 21:45:04 -04:00
Sour 2a3a955dc3 Reorganize files (debugger + netplay) 2021-04-09 20:01:50 -04:00