47 Commits
Author SHA1 Message Date
SourMesen 7f418e352a Clang: Fixed all compilation warnings (#241)
-Some warnings were suppressed (undefined-inline and return-type-c-linkage)
-Warnings as errors was enabled to make CI builds fail when warnings are introduced
-Slightly altered the behavior of SnesCpu::IdleOrRead, but this should match what ares does
2026-08-01 13:40:07 +09:00
SourMesen 9219fab3ed Debugger: Profiler - Keep track of cycles executed while the CPU is halted (#243)
Also adds a "cpu usage" meter in the debugger window which appears when software makes uses of halt/wai/etc.
2026-08-01 12:10:12 +09:00
SourMesen 918379b7a7 Debugger: Tilemap viewer - Added option to pick background color (#238)
Also, minor bug fixes for WS:
-Fixed tilemap viewer for sometimes using the wrong background color
-Fixed the 4-bit RGB color values in the palette viewer having the R and B values swapped
2026-07-28 19:55:12 +09:00
SourMesen e055ddee35 SNES: Added deinterlacing options (#224) 2026-07-24 14:50:15 +09:00
Adrian "asie" Siekierka ec5f14d95e WS: WonderWitch/NOR flash + extended 2003 mapper emulation support (#100) 2026-07-18 19:30:57 +09:00
Adrian "asie" Siekierka 9cb5c5f46e WS: Fix LCD control port initial read when skipping boot ROM (#182) 2026-06-20 08:25:56 +09:00
Adrian "asie" Siekierka 045e9c2e70 WS: Emulate internal EEPROM unlock bit in cartridge header when a boot ROM is not present. (#174) 2026-06-14 19:38:33 +09:00
SourMesen 27da83d457 CI: Automatically run recorded tests to validate PRs and commits (#151) 2026-05-30 05:20:34 -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
Adrian "asie" SiekierkaandSour 22424d7412 WS: Initial cartridge RTC implementation (#98)
* GBA: Separate S3511A RTC emulation code from GBA interface emulation code.

* WS: Initial cartridge RTC implementation.

* WS: Expose cartridge RTC state to register viewer.

* Code: Fix formatting.

* WS: Update Core.vcxproj.

* Fix compilation error, remove unused method

---------

Co-authored-by: Sour <[email protected]>
2026-05-19 05:50:19 -07:00
SourMesen 830ffc3b04 Video: Fixed "merge fields" issues (#129)
Phase should be 0 when this option is enabled, otherwise there's still jitter from one frame to another (though less obvious jitter)
Also made the GB/GBA/WS filters alternate between the 2 phases (SNES filter is used), which makes the colors look much better, even without merge fields enabled.
2026-05-19 00:02:25 -07:00
Adrian "asie" Siekierka 5bb64aacf0 WS: Initial Pocket Challenge V2 support (#95)
The Pocket Challenge V2 is an education handheld based on the ASWAN SoC, as used in the WonderSwan. It uses the same boot ROM (with an early exit), but has some implementation changes:

    The LCD icon segment area is not present (on the display panel only).
    There is no onboard internal EEPROM.
    The input keypad layout differs.
    The headphone output is always used with a custom onboard DAC, as opposed to relying on the SoC's own PWM DAC for the internal speaker.

This PR implements support for all of this. Support for the PCv2-exclusive cartridge mapper (KARNAK) will be added by a separate PR.
2026-05-17 01:11:02 +09: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
SourMesen 4b8669d34b Debugger: Tilemap viewer - Fixed "edit tile" behavior on SNES when the tilemap is using 16x16 (or 16x8) tiles (#72)
Also, added support for horizontal/vertical mirroring when editing the mirrored tiles from the tilemap.
2026-04-27 09:18:53 -07:00
SourMesen 8e4dd329ac Debugger: Lua - Added new APIs: getCpuState, setCpuState, getMasterClock, getCpuCycleCount (#58)
getCpuState/setCpuState allow the same functionality as getState/setState, but limited to only the CPU's state, making them much faster (some performance optimizations to the serialization & Lua code were also done)
getMasterClock/getCpuCycleCount are very fast alternatives to getState when all the script needs is a cycle count.
2026-04-26 18:00:08 -07:00
Fiskbit 4beea87cc3 Merge pull request #15 from asiekierka/feature/ws-script-fix
Debugger: WS - Fixed I/O port script memory callbacks not working
2026-03-31 13:41:46 -07:00
Adrian Siekierka ba8c80f71d Debugger: WS - Fixed I/O port script memory callbacks not working 2026-03-30 19:55:01 +02:00
Adrian Siekierka 7a59101b67 WS: Improve initialization logic.
- Games expecting vertical mode are now correctly auto-rotated on start when
  the boot ROM is not present.
- Cartridge SRAM and I/O port timings are now correctly slowed down when
  emulating the monochrome console model.
- Other minor improvements to initialization accuracy when the boot ROM is
  not present.
2026-03-29 12:50:51 +02:00
Sour 998ab6e3de WS: Minor tweaks to EEPROM delay logic 2025-07-14 17:24:32 +09:00
Sour ed7d8ca6a3 WS: Fixed zero flag after unsigned multiplication on monochrome model 2025-07-13 20:58:30 +09:00
Sour 5f6c362a93 WS: EEPROM - Add delay when processing read/write/erase commands 2025-07-13 20:58:09 +09:00
Sour 8026952a87 WS: Enable EEPROM writes when skipping boot rom 2025-07-13 09:57:03 +09:00
Sour 9808b0f2ca WS: Fixed regression for SDMA Control port
According to sound_dma, bit 7 can be read as set, but WSHSTest expects bit 7 to be clear after setting it. WSHSTest attempts to start the sound dma while length is 0, which might immediately clear the enable flag.
2025-06-25 22:19:16 +09:00
Sour 28881c0fcd WS: Fixed behavior for undocumented CALL/JMP FAR variants
Fixes the new undefined opcode tests in WSCpuTest
2025-06-25 21:33:17 +09:00
Sour eddf540e30 Debugger: WS - Fixed DS segment prefix not being disassembled properly 2025-06-25 21:31:37 +09:00
Sour 9494c65dba WS: Fixed key IRQ timing
Fixes the result of the LCD Off test in WSHWTest
2025-06-25 20:07:29 +09:00
Sour 308d077427 WS: Fixed IRQ edge case when an IRQ source is disabled after it was triggered
Fixes a test case in the Interrupt Manager tests in WSHWTest
2025-06-25 16:47:29 +09:00
Sour 88462e6ffa WS: Fixed minor port-related issues (missing bits, etc.)
Fixes the IO Regs test in WSHWTest for all 3 console types
2025-06-25 16:40:43 +09:00
Sour c33b6f59ec WS: Added better color emulation for monochrome WS 2025-05-11 23:18:55 +09:00
Sour cb0da64c5b PCE/SMS/WS: Fixed behavior/crashes when loading ROMs that aren't a power-of-2 size 2025-04-24 21:26:15 +09:00
Sour e4bf1660b1 Debugger: WS - Display negative branch offsets as negative hex numbers in disassembly 2025-04-24 21:06:33 +09:00
Sour 2d0845058b Debugger: WS - Fixed value display for instructions that load 2x 16-bit values (e.g LES) 2025-04-24 21:05:14 +09:00
Sour 601898aa87 WS: PPU - Color 0 doesn't exist in palettes 4-7, 12-15 2025-04-09 18:10:44 +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 0dfdbbdd9b WS: APU - Revert LSFR behavior change when noise flag is clear
This seems to be incorrect despite the test rom's results - Card Captor's intro sequence freezes for a few seconds because of this
2025-04-01 17:40:17 +09:00
Sour 7ae5d7c83a WS: APU - Fixed inverted sample order for wave table 2025-03-10 17:57:43 +09:00
Sour 1d947180a9 WS: APU - LSFR value doesn't update unless all 3 enable flags (channel+noise+lfsr) are enabled 2025-03-10 17:56:32 +09:00
Sour c90b8a9ef6 WS: APU - Disabled channels should output 0
+ Ch2 outputs PCM if PCM is enabled, even when channel is disabled
2025-03-10 17:55:22 +09:00
Sour 77fc5301eb WS: Suppress trace IRQ for 1 instruction after it gets enabled 2025-03-03 18:25:50 +09:00
Sour 211b42e91c WS: Improved IRQ handling after IRQ flag is set or SS segment is modified 2025-03-01 22:17:45 +09:00
Sour 7f0831a542 GBA/SMS/WS: Fixed broken lag counter
Also make counter reset to 0 when game is reset on all consoles
2024-12-26 12:01:19 +09:00
Sour b30bb12000 WS: EEPROM - Fixed "read done" flag never being reset 2024-12-12 21:04:26 +09:00
Sour 460ea81ca3 Debugger: WS - Fixed "freeze" memory not working 2024-12-12 20:57:55 +09:00
Sour 614e61a2d1 Debugger: Fixed issues with step over/out in some scenarios (bank swapping, recursive functions, etc.)
Only break when both the stack pointer and the return address match what the debugger was expecting, instead of just the return address
2024-12-07 17:46:28 +09:00
Sour 2e6a2e5494 Debugger: WS - Fixed effective address calculation for LES/LDS
Show first word's address instead of the second's
2024-11-13 21:27:48 +09:00
Sour d751502a58 NES: Added Rainbow support (mapper 682) 2024-10-08 21:37:44 +09:00
Sour c5406773a0 Added WonderSwan support 2024-09-19 21:19:43 +09:00