26 Commits
Author SHA1 Message Date
SourMesen f5f790d6e1 NES: Improve CPU read performance for most common case (#145)
Modified NesMemoryManager & BaseMapper to allow inlining the read logic when the CPU is e.g executing code from ROM. This speeds up execution by around 5%.
2026-05-27 21:59:12 -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 86c81867fc NES: Fix handling of internal and external open buses. (#62)
When reading from $4015, the internal and external CPU buses are isolated. This means the CPU reads the value from the internal $4015 register, which is not repeated onto the external bus, and any response to the read from an external device is not seen by the CPU (not even in the form of a bus conflict).

As a result, the internal $4015 result updates only the internal open bus value, and any external result updates only the external open bus value. If the buses are isolated again on the next CPU cycle, then open bus bits on the internal bus read will not be affected by the external open bus value.

This has been verified in a new test that lands a DMA-that-activates-$4015 on a $4015 read, so the two buses diverge on the DMA read cycle and $4015 is then read by the CPU on the next cycle to verify that the internal open bus was not affected by the DMA read. Furthermore, if the CPU then reads from external open bus afterward, it gets the DMA value from external open bus, which persisted but wasn't previously accessible due to bus isolation.

Mesen previously had a bug where its GetInternalOpenBus function was returning the wrong bus value (_externalOpenBus instead of _internalOpenBus). Fixing this was not enough to fix the test, because SetOpenBus would update both buses on any external read. This change fixes the GetInternalOpenBus bug and changes SetOpenBus to be able to update either bus independently.

This was tested with the new AccuracyCoin "Internal Data Bus" test.
2026-04-26 18:16:31 -07:00
Sour d751502a58 NES: Added Rainbow support (mapper 682) 2024-10-08 21:37:44 +09:00
Sour 0e8c544cf8 NES: Improve open bus implementation for register 4015 2024-09-28 16:43:42 +09:00
Sour 607d9219c0 NES/SNES: Update open bus on writes 2023-05-15 00:41:27 -04:00
Sour 1df7d9aeac Debugger: Added freeze address option in memory viewer 2022-09-25 19:56:02 -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 6b9acb0b86 NES: Fixed missing internal ram in save states 2022-08-29 22:54:01 -04:00
Sour aca122dde0 Debugger: NES - Fixed issues with famicombox's bigger system ram 2022-08-29 21:03:44 -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 8354f48357 NES: Rename some functions/variables to match nomenclature used in the rest of the code 2022-07-24 20:31:19 -04:00
Sour b456170551 Save states: Serializer rework/rewrite 2022-07-20 00:40:32 -04:00
Sour 69350fea6b NES: Implemented break on bus conflict option 2022-07-13 22:17:00 -04:00
Sour 5414afdbb4 Debugger: Added "Show jump labels" option 2022-06-26 14:44:59 -04:00
Sour e855d0466e PCE: Add support for cheat codes 2022-05-09 18:16:16 -04:00
Sour a79a13eca2 Cheats: Added UI and implemented cheats in core 2022-03-30 12:28:53 -04:00
Sour dffbd4921a Refactoring: Renamed SnesMemoryType 2022-01-22 12:16:10 -05:00
Sour 0479d6f90a VS system/dualsystem (missing palette and proper audio/video option support) 2021-04-25 14:12:10 -04:00
Sour b4aefda1d2 Battery save fixes 2021-04-21 20:46:21 -04:00
Sour e27e511558 File reorganization 2021-04-09 21:45:04 -04:00
Sour 434ecef8f7 Nes disassembly 2021-04-06 23:10:14 -04:00
Sour fa05b4ec7a Tile viewer works for NES 2021-04-05 20:59:36 -04:00
Sour 70c9a39f3d Step 3 - compiles 2021-04-04 10:53:17 -04:00
Sour e344505a9a WIP 2021-04-02 18:12:42 -04:00