13 Commits
Author SHA1 Message Date
SourMesen 142884b598 NES: Ignore consecutive reads to 4016/4017 (#185)
The NES (and AV Famicom) both ignore consecutive reads to 4016/4017 (when the reads on 2 consecutive CPU cycles). This implements that behavior when the corresponding console type is selected.
These changes also simplify the DMA code, because a lot of extra code was in the DMA logic to simulate the same result. Moving this logic to the 4016/4017 reads makes the code simpler and allows it to work properly when a regular instruction reads from 4016/4017 twice in a row, too.
2026-06-21 19:17:51 -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
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 152abf690b Rename stdafx.h to pch.h 2022-09-08 21:29:52 -04:00
Sour c6e527cded Debugger: Lua - getScreenBuffer/setScreenBuffer, getInput/setInput implementations + other fixes/refactoring 2022-07-30 15:39:07 -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 ff331362be Input: Implemented mouse-based input devices (Windows only) 2022-03-12 19:03:17 -05:00
Sour 1f222fd300 NES/SNES: Allow more flexibility when configuring inputs (2x multitap, etc.) 2022-03-11 23:51:42 -05:00
Sour aa6a9699fb UI: Added global input options (deadzone, display inputs on screen, etc.) 2022-03-04 22:08:29 -05:00
Sour 5c07d87d3a VS system todo fixes/refactoring 2021-04-26 23:44:32 -04:00
Sour add120abdb Integrate NES input devices 2021-04-20 22:51:15 -04:00
Sour e27e511558 File reorganization 2021-04-09 21:45:04 -04:00