44 Commits
Author SHA1 Message Date
SourMesen e5075abe29 Runahead: Fixed issue causing runahead X to behave like runahead X-1 for all cores (except NES) (#219)
An additional frame's worth of input lag was added by runahead because of the timing at which it loads/saves the state vs when the inputs are polled (NES core was not affected due to the timing at which it polls controllers compared to other cores)

Also fixed a SNES-specific runahead issue when the game starts a very long DMA before vblank that ends after vblank, causing some frames to not be rendered at all and showing older frames instead (this is a rare scenario, but caused issues in Star Fox)
2026-07-15 05:09:22 -07:00
SourMesen 5e8b8e12ed Debugger: SNES - GSU - Allow labels on GSU work ram (#163)
Also fixes GsuWorkRam not being able to lookup its relative CPU address (which caused the "CPU Addr" column to always read <unavailable> in the label list)
2026-06-03 22:03:43 -07:00
SourMesen 37de357b75 NES: FDS - Performance improvements (#143)
-ProcessCpuClock was used to check for events that don't need to be checked that often (auto-switch disk + auto fast-forward options). This has been moved to an EndFrame callback.
-This was even slower than intended because of the call to _emu->GetFrameCount() which was, relatively speaking, fairly slow. To improve its performance (since it's used rarely for some things like turbo button processing), a separate GetFrameCount function was added on all console classes, and Emulator::GetFrameCount was also optimized to be faster when called from the emulation thread.

When the auto-switch disk option is enabled, this can improve performance by about 25-30%. When the option is not enabled, this still improves performance by 4-5%.
2026-05-27 04:02:54 -07:00
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
NovaSquirrel 8e7e4c2ff9 SNES: Add SPC dumper tool (#89)
* SNES: Add SPC dumper tool

* SNES: SPC dumper fixes
2026-05-08 17:31:34 -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 36bd1611c6 Debugger: Catch up APU for all consoles when breaking, to allow register viewer/etc. to display up-to-date values 2025-04-03 22:41:27 +09:00
Sour 991136e58a Audio Player: Fixed shuffle/repeat buttons not working 2025-02-13 22:07:10 +09:00
Sour 18269da46b SNES: Add support for Sufami Turbo games 2025-01-03 09:18:59 +09:00
Sour 8d6830a70a SNES: Add support for ST018 coprocessor
Used by a single game: Hayazashi Nidan Morita Shougi 2
2024-12-29 23:41:52 +09:00
Sour 4ae738f028 SNES: Fixed emulator crash caused by large DMA transfer (across multiple frames) 2024-11-17 19:34:14 +09:00
Sour 13acb3fe42 Added GBA support 2024-03-30 11:42:31 +09:00
Sour efcf0d1523 SNES: Improved gamepad auto-read emulation
-Read each bit at roughly the correct cycles (instead of all at once at the start of nmi)
-Don't perform auto-read when auto-read flag is disabled at the very start of nmi, before it actually starts
2023-08-17 18:24:03 +09:00
Sour bccdfa2d82 Debugger: Register Viewer - SNES - Added wram register position 2023-05-28 17:56:39 +09:00
Sour 2761a5814e UI: Fixed broken screenshots in load/save state menus on NES when a hd pack is loaded 2023-04-22 20:44:25 -04:00
Sour 4ea985f4b5 When a file has an unknown extension, check for known file signatures to pick a core 2023-03-12 16:39:48 -04:00
Sour 9504973e7c Video: Split fullscreen refresh rate option into 2 (ntsc/pal) 2023-02-18 22:38:38 -05:00
Sour c363474035 Rewind: Reduce memory usage, increase save state frequency (which reduces delay when rewind starts) 2023-02-16 22:18:56 -05:00
Sour 5f2d12767c SNES: Fixed SPC issues when loading the SPC file from inside an archive (playlist would be invalid, crash would occur when track ended, etc.) 2023-02-03 21:49:55 -05:00
Sour b4618eb47a GB: Allow loading GB/GBC/SGB save states on any of the 3 models 2023-01-30 19:50:05 -05:00
Sour 23b43eb984 GB: Refactoring, removed ConsoleType::GameboyColor 2023-01-29 23:05:29 -05: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 0de17a6df1 Debugger: MemoryType::Register refactoring 2022-08-29 20:29:12 -04:00
Sour 84da5cdcd3 Debugger: Make GetTimingInfo return GB timing info when called in SGB mode if the caller is bound to the Gameboy cpu 2022-07-27 23:35:02 -04:00
Sour bf53d8ff8e Debugger: Register viewer - Added a few missing values 2022-07-27 18:22:49 -04:00
Sour 077e8db3d7 Fixed some minor TODOs 2022-07-26 00:29:02 -04:00
Sour 623892d6c3 Fixed ram init logic to ensure the correct config option is used when loading a game 2022-07-25 22:04:44 -04:00
Sour fe7dfbb11b Input: Allow mapping buttons/shortcuts to mouse buttons + refactoring (16-bit keycodes, make mouse buttons behave like all other keys) 2022-07-22 17:00:00 -04:00
Sour 4a7b69f2d8 UI: Don't refresh config when loading a ROM, causes issues when config window is opened 2022-07-22 14:02:06 -04:00
Sour 77692f323d Fixed behavior when loading an invalid rom while a rom is loaded, fixed battery save behavior when switching between games, fix/cleanup some TODOs 2022-07-21 16:12:24 -04:00
Sour 612724a1fe SNES: Fixed screen output when loading save state in high res mode 2022-07-20 20:57:45 -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 c4361b9192 Debugger: Allow opening GB viewers when in SGB mode 2022-07-05 22:25:51 -04:00
Sour 6e62782a2e Video: Fixed integer fps mode option 2022-07-02 16:13:24 -04:00
Sour 6212e84410 SNES: Fixed MSU-1 support 2022-06-22 00:27:57 -04:00
Sour b4c56e0cfb Linux: Fixed struct size differences between clang & msvc caused by empty base class 2022-05-10 18:15:57 -04:00
Sour 64cd81adcd Code cleanup (removed TODOs) 2022-03-30 19:56:45 -04:00
Sour 0a9eb5dade Video: Added Bisqwit NTSC filter for NES + presets for picture settings 2022-03-27 17:03:04 -04:00
Sour a31eb671ac Input: Support for barcode readers and tape recorders (NES) 2022-03-15 22:39:30 -04:00
Sour eeee9fbd95 Debugger: Fixed crashes when switching between games while debug tools are opened 2022-01-25 22:45:24 -05:00
Sour dffbd4921a Refactoring: Renamed SnesMemoryType 2022-01-22 12:16:10 -05:00
Sour 0b228f5951 Refactoring: Added Snes prefix to files/classes 2022-01-22 11:55:17 -05:00