80 Commits
Author SHA1 Message Date
SourMesen 49c9a3a4ba GB: Added overclock and remove sprite limit options (#216) 2026-07-11 17:47:41 +09: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
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
Fiskbit 48e4cd469b Adds a new, default GB option to prefer the best model the game supports.
There was previously no auto option that would select the best model a game has any support for and which falls back to the original Game Boy if that's all the game can do. The "Auto (prefer Game Boy)" option would select Game Boy except when given a GBC-exclusive game. The new "Auto (prefer best)" option selects GBC if the game has any GBC support, SGB if it has any SGB support, and GB otherwise. This option is now selected by default.
2026-04-08 18:51:44 -07:00
Sour 18e1aeabbd GB: MBC3 - Fixed some MBC3 RTC issues
-Reloading the ROM would incorrectly reload the old .rtc file and reset the time to what it used to be
-The day counter was never incremented when rolling over from 23:59:59 to 00:00:00
2025-05-06 18:39:37 +09: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 0f08c71c5a GB: Improved header detection for MMM01 games to avoid misdetecting other roms 2024-10-23 17:29:10 +09:00
Sour 00a592cade GB: MMM01 support 2024-07-20 19:22:36 +09:00
Sour caaf8ed8e8 GB: Added basic support for gbx files 2024-07-06 17:54:34 +09:00
Sour 13acb3fe42 Added GBA support 2024-03-30 11:42:31 +09:00
Sour 25142a9451 GB: Improved STOP behavior for GB/GBC
Fixes the stop_instr and stop_instr_gbc_mode3 tests
2024-01-31 17:50:15 +09:00
Sour 71ecaffbcd GB: Added support for MBC1M boards 2024-01-25 20:20:30 +09:00
Sour 8986841b09 GB: Prevent potential crashes with roms that aren't a multiple of 16kb 2024-01-25 20:16:26 +09:00
Sour f466a69083 GB: Minor refactoring 2024-01-23 23:44:48 +09:00
Sour 1c1a0a9985 Debugger: GB - Fixed issues with step back caused by running the LCD/etc. before calling ProcessInstruction 2024-01-23 22:26:01 +09:00
Sour 7a94e22043 GB: Fixed regression in rtc-invalid-banks-test
Only allow banks 4-7 when save ram is 64+kb (MBC30)
2023-05-12 23:21:22 -04:00
Sour fdcb334329 GB: Fixed compatibility issues with some GBS files 2023-04-23 14:04:59 -04:00
Sour 50562407ed GB: Fixed crash when reloading a GBS at the same time as a track change occurs 2023-04-23 14:04:52 -04: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 e191a22451 Debugger: GB - Prevent tooltips from showing a work ram address for registers at $FF00+ 2023-03-12 15:11:39 -04:00
Sour feaa435441 GB: Added MBC3 RTC support
Fixes the ax6 and cpp RTC tests
2023-03-11 15:45:08 -05:00
Sour a69f38d661 GB: Display clearer error message when cart type is not supported 2023-03-10 18:11:10 -05:00
Sour b954db45b7 GB: APU improvements (passes div_* tests) 2023-03-09 22:10:20 -05:00
Sour 176451ffbb GB: Improved DMA conflict handling, passes "bully" test 2023-02-25 22:35:13 -05:00
Sour 040cfbb24d GB: Fixed crash when APU frame sequencer isn't clocked for a very long time
Run APU at least once per frame - fixes crash in div_write test
2023-02-25 17:11:48 -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 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
Eldred Habert 097e2d40c7 Fix build errors with GCC (#2)
* Delete libevdev as well with `make clean`
* Fix explicit specialization is non-namespace scope
* Fix declaration of CgbFlag changing its meaning
* Fix declaration of NesHeader changing its meaning
2023-01-28 17:59:08 -05:00
Sour 135cab16d2 Debugger: Trace logger - Fixed missing cpu cycle counter for GB 2022-09-19 18:15:12 -04:00
Sour c90181c1a2 Refactoring - Moved some GB/PCE files into subfolders 2022-09-08 22:23:30 -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 0de17a6df1 Debugger: MemoryType::Register refactoring 2022-08-29 20:29:12 -04:00
Sour af6d4f0da2 Debugger: Refactoring for specific break options (+ added nes break on 2000 scroll glitch option) 2022-08-21 16:11:22 -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 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 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 d530b49402 Debugger: Added tooltip for memory mappings 2022-07-05 19:07:53 -04:00
Sour 4937a62fe6 GB: Default to using GBC instead of SGB, added more options for model selection 2022-07-03 20:23:33 -04:00
Sour 6e62782a2e Video: Fixed integer fps mode option 2022-07-02 16:13:24 -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 a79a13eca2 Cheats: Added UI and implemented cheats in core 2022-03-30 12:28:53 -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 8b142de54a Input: Gameboy input config (core & UI) 2022-01-29 14:43:41 -05:00
Sour dffbd4921a Refactoring: Renamed SnesMemoryType 2022-01-22 12:16:10 -05:00