37 Commits
Author SHA1 Message Date
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 c1fe01129d PCE: CPU accuracy improvements based on hardware captures
-Replaced dummy reads with idle cycles where needed
-Fixed order of operation for some instructions
-Fixed IRQ timing (was 10 cycles, should be 8)
-Tweaked VDC timings to match test roms after the IRQ timing changes
2025-06-30 22:00:58 +09:00
Sour 797ef1f57a PCE: Improved timing for SATB/VRAM DMA
Fixes freeze in TV Sports Football's "New Season" screen and is very close to new test rom's timings/results
2025-02-01 19:43:59 +09:00
Sour 604f1a6fc9 PCE: Fixed SuperGrafx layering problem
When VDC1 had both BG and sprites disabled, it blocked the VDC2's background (resulting in a black screen). VDC1's output should count as transparent in this scenario
2024-12-11 18:32:55 +09:00
Sour c9adff355f PCE: Tweak trigger for RCR counter increments
The RCR counter doesn't appear to increment unless the HDW mode (e.g the visible scanline) actually starts. On the other hand, the vertical mode counter will get clocked even if the VDC doesn't hit HDW (trigger seems to be earlier, currently set to be the same timing as the Y scroll latch). The RCR IRQ could occur later than on hardware because of this
2024-10-19 22:34:39 +09:00
Sour b6e9dcbc13 PCE: Improved X/Y scroll and CR latch timing
Also update the latched values when a register write occurs at the same time
This matches the results seen in the rcrtest (https://github.com/pce-devel/huc/tree/master/examples/asm/elmer/rom-bare-rcrtest) for all VDC clock speeds
2024-09-21 14:17:06 +09:00
Sour 5b992e35f8 PCE: Implement better MWR latch timing
Changing anything but CG Mode mid-screen should not be allowed (latched in vblank)
2024-08-19 10:54:57 +09:00
Sour 01a663d19d PCE: Fixed "remove sprite limit" not working properly in some scenarios 2024-01-04 11:15:12 +09:00
Sour 30a564d932 PCE: Allow vram reads/writes during sprite fetching if the VDC is done fetching all of the sprite data required for the next scanline 2023-12-24 17:25:26 +09:00
Sour 1204a399f9 PCE: Fixed typo in previous commit which broke the intended logic 2023-12-24 15:00:16 +09:00
Sour d3a6aadbef PCE: Block vram accesses at the start of horizontal sync
Makes timing test rom results match hardware a bit better
2023-12-23 22:29:19 +09:00
Sour 0cb1c2bc5e PCE: VDC - Allow VRAM transfers to run at any time when rendering is disabled
Fixes issues in movies in both Cosmic Fantasy 4 and Flash Hiders
2023-12-23 21:33:19 +09:00
Sour 935df44068 PCE: VDC - Allow vram read/writes during sprite fetching if no sprites need to be fetched for the next scanline
Fixes last remaning issues in Popful Mail's intro scene
2023-12-23 21:31:49 +09:00
Sour b84d4f23cf PCE: Improved VRAM read/write delays
Not perfect, but a lot closer than before. Matches hardware results pretty well in most scenarios, but most of it is guesswork
Fixed Wonder Momo and seems to not have any negative impacts on other games
2023-12-23 13:28:21 +09:00
Sour 7a2927793c PCE: Fixed SGX games video issue caused by another recent fix
Row buffer for VDC2 was being cleared too early, causing the 2nd layer to always be empty
2023-10-30 21:44:23 +09:00
Sour bb57e13572 PCE: Fixed data from previous frames sometimes being shown on screen when VCE clock changes mid-scanline
Caused flickering line in Order of the Griffon
2023-09-30 17:31:49 +09:00
Sour 5f89c254ad PCE: Improved start timing for the SATB DMA transfer
This was needed to fix a homebrew rom (which works on hardware)
2023-09-15 22:53:24 +09:00
Sour abd779c1ce PCE: Fixed VRAM-VRAM DMA speed
This was apparently running 2x faster than hardware
2023-09-15 18:20:55 +09:00
Sour a1cd60be33 PCE: Improved/fixed vram read address increment logic/timing
Fixes issues found by Vectrex28 in a homebrew rom
2023-07-05 21:27:46 +09:00
Sour 63b779be8d PCE: Reset cycle counter at the end of DMA 2023-04-07 13:39:20 -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 603ac38251 PCE: Fixed issues with runahead caused by frame skipping 2022-09-01 15:16:44 -04:00
Sour 45287639ca PCE: Added support for frame skipping, moved frame skipping option to global video settings 2022-09-01 14:45:18 -04:00
Sour a5c6e0911c PCE: Fixed out-of-bounds memory writes when sprites were in the left offscreen margin 2022-09-01 00:12:41 -04:00
Sour f05260ad90 PCE: Optimize Exec() logic with templates/logic to avoid calls when not needed, etc. 2022-08-31 22:30:07 -04:00
Sour 6d254cd487 PCE: Optimize DrawScanline using template 2022-08-31 22:16:04 -04:00
Sour ebd289182b PCE: Optimize rendering by tracking which pixels potentially have sprites 2022-08-31 20:12:37 -04:00
Sour 1a95508e9c PCE: Optimize GetTilePixelColor 2022-08-31 20:10:28 -04:00
Sour 9b73fadab9 Debugger: PCE - Added option to break on invalid vram access 2022-08-21 16:55:08 -04:00
Sour 76014f1271 Save states: Performance improvements (improves runahead performance) 2022-08-18 21:19:09 -04:00
Sour 2eda2cc27e Debugger: Lua - Allow callback to change read/written value, allow callbacks on any memory type (not just cpu memory), allow callbacks for ppu memory 2022-08-02 01:42:14 -04:00
Sour 6163158637 Debugger: Lua - Implemented getState + setState 2022-07-31 15:00:53 -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 05180385ab PCE: Implemented save states 2022-07-20 18:49:25 -04:00
Sour 0a6a8e92b2 PCE: SuperGrafx support 2022-05-15 20:35:56 -04:00
Sour 6d0fb13cdc PCE: Rename PPU to VDC 2022-05-13 18:02:25 -04:00