Commit graph

287 commits

Author SHA1 Message Date
Sour
d3afd0dbf2 Debugger: PCE - Tilemap viewer - Fixed scroll overlay Y position 2025-03-22 08:44:49 +09:00
Sour
f359b80eb5 Debugger: Assembler - Allow using #label syntax on NES/SNES/PCE
This used to be allowed in Mesen-S
2025-03-13 18:32:46 +09:00
Sour
d0a3db20d8 PCE: Fixed ADPCM audio decoding issues
-Output is a 12-bit value and should wrap
-"Magnitude"/"step size" should be reset to 0 when playback starts

This fixes sound effects in NEXZR that were broken by the previous (incorrect) fix and also broken because _magnitude was not being reset to 0 when each sample started playing
2025-03-12 16:46:32 +09:00
Sour
031cb7058c Debugger: Fixed issues with NES/SNES/PCE assemblers
-Labels defined within the assembler that were referred to before their definition did not work properly and ended up being assigned the wrong value (when the label's address wasn't a value between 0x100 and 0xFFFF) - this is fixed by running multiple passes until the resulting byte code stops changing.
-Fixed issues where e.g EOR $00, Y would be assembled as a 2-byte instruction, which is invalid.
2025-02-06 21:20:24 +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
4ce300877d PCE: Fixed memory mappings for save ram
Save ram is not mirrored across the entire 8kb, can only be accessed in the first 2kb
This fixes Death Bringer corrupting save ram when trying to start a new game
2025-02-01 18:01:15 +09:00
Sour
6820db3793 Fixed compilation errors in clang (in VS) 2024-12-25 18:58:57 +09:00
Sour
88210b3fcf SNES/PCE/SMS: Added missing "allow invalid input" option (and prevent invalid inputs by default) 2024-12-20 14:48:15 +09:00
Sour
f7c1bebdbc PCE: Fixed PSG channels in DDA mode not immediately updating output when a new output value was written 2024-12-16 20:41:20 +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
e52fa70944 Debugger: Source View - Improve active row behavior when multiple mirrors exist
+ Automatically move to current address when clicking on the source view tab (so that the active row is shown after manually loading a symbol file, etc.)
2024-12-07 20:00:24 +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
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
582c753384 PCE: Fixed incorrect overscan values for a single frame when game swaps between multi-resolution and single-resolution screens 2024-10-16 17:08:39 +09:00
Sour
d751502a58 NES: Added Rainbow support (mapper 682) 2024-10-08 21:37:44 +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
2aa9cc5908 PCE: Fixed save ram size (2kb instead of 8kb)
+ only create .sav file if game actually writes to save ram
2024-09-20 21:53:36 +09:00
Sour
e79e655d3b Debugger: Event Viewer - Added missing address/value for some event types (marked breakpoints, etc.) 2024-09-12 17:11:56 +09:00
Sour
816e77e8a5 PCE: Fixed noise period when frequency register is set to 0x1F
Fixes noise issues in some games (Cyber Cross, Eternal City, Victory Run, etc.)
2024-09-05 17:03:51 +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
4d92cc6d72 PCE: Fixed 6-button controller emulation
SF2 was detecting a single 6-button controller with no turbo tap as two 6-button controllers with a turbo tap
2024-07-03 20:02:36 +09:00
Sour
16e0f716c7 PCE: Added missing controller data to save states 2024-07-02 21:26:55 +09:00
Sour
c7f97aba60 PCE: Fixed issue with turbo tap implementation
SF2 did not work properly when two 6-button controllers were connected
2024-07-02 21:06:20 +09:00
Sour
074034aa66 Debugger: Use cpu-specific cycle counts for profiler data
Fixed SNES co-processors (including the SPC) reporting their profiling data based on SNES master clocks, which wasn't accurate/reliable
2024-06-23 16:21:49 +09:00
Sour
abe6f0f860 PCE: Fixed sound mixing issue causing pops in ADPCM and CD audio 2024-06-07 20:25:43 +09:00
Sour
950c1d80c9 PCE: Added option to select between the original HuC6280 and the A revision of the PSG
HuC6280A (which has less popping) was (and still is) the default behavior
2024-06-01 12:49:39 +09:00
Sour
6cc490e90f PCE: Fixed emulator crash when running large block transfers 2024-05-13 17:58:33 +09:00
Sour
7f4ba93e88 PCE: Fixed hud scale for HES player 2024-04-01 09:14:19 +09:00
Sour
13acb3fe42 Added GBA support 2024-03-30 11:42:31 +09:00
Sour
1f1b7c1db2 PCE: Fixed IO port read behavior when no controller is plugged in 2024-03-10 22:14:38 +09:00
Sour
64126ace83 PCE: CD-ROM timing improvements
-IRQ/SCSI status should happen after seek is done when a play command is sent (fixes  audio sync in Brandish intro cutscene)
-Fixed seek delay not being applied correctly when swapping from audio playback to data loading and tweaked seek delays to make them a bit slower (fixes Brandish audio glitch during introduction)
-Fixed regression that causes the "transfer ready" irq flag to not be reset when a sector was done reading (this broke the intro sequence in "It came from the desert")
-Improved behavior when a load operation is cancelled (to match the expected results of both scsitest and verificator tests)
2024-02-03 12:00:45 +09:00
Sour
aa9c459630 Debugger: Step Back - Allow stepping back 1 scanline/frame at a time + remove restriction that caused step back to only work for up to 30 frames 2024-01-26 23:39:31 +09:00
Sour
6ed7e45bd4 Fixed compilation warnings 2024-01-09 16:46:02 +09:00
Sour
7a2e410883 Debugger: PCE - Fixed crashes with Lua tutorial script due to the way overscan/resolution is handled for the PCE 2024-01-05 14:28:44 +09:00
Sour
01a663d19d PCE: Fixed "remove sprite limit" not working properly in some scenarios 2024-01-04 11:15:12 +09:00
Sour
f9614e0b1e PCE: Allow reading back bits 0-3 for 1804 + minor code cleanup 2024-01-03 20:21:50 +09:00
Sour
4696c2ca50 PCE: More CD-ROM emulation improvements
-ADPCM DMA speed now matches what krikzz's test rom expects
-Implemented some delays in CD-ROM interface that mostly match the test rom
-Implemented delay when software fails to read an entire sectore before the next one is ready (improves audio sync in Sherlock Holmes movies)
-Re-fixed issues with Ys IV that were apparently caused by the read command not properly updating the SCSI signals after the drive starts seeking to the requested sector
-Fixed some ADPCM playback flags/timing issues based on okitest test rom (playing/busy flag gets turned off slightly delayed vs end reached flag, etc.)
-Implemented delay for $1805 writes, based on test rom
2023-12-29 23:12:05 +09:00
Sour
c6b86ba887 PCE: CD-ROM emulation improvements
-ADPCM edge cases work better (reset, length latching, dma, etc.)
-BRAM unlocking/locking fixes
-Read ToC command returns the correct amount of data
-SCSI data port returns the drive's reply whenever a reply is being read, regardless of the value written to the port through $1801
-Implemented/fixed audio sample read behavior (latching, L/R toggle)
-Fixed missing (unused) readable/writable bits in some registes

All of these fixes are based on the test results from krikzz's test rom here: https://github.com/krikzz/turbo-ed-pro-pub/tree/main/tcd-verificator
2023-12-27 23:27:07 +09:00
Sour
dcd9c2249e Debugger: PCE - Highlight arcade card accesses in memory viewer 2023-12-27 23:27:07 +09:00
Sour
64e189f047 PCE: Improve cd-rom seek time emulation + adpcm read/write delays
Fixes issues in Ys IV (black bars while scrolling), F1 Team Simulation (loud noise at start of intro), Mugen Senshi Valis (de-synced audio/video)
2023-12-26 17:08:54 +09:00
Sour
04793df83c PCE: Fixed (?) arcade card register mirroring
Unsure if any games depend on this
2023-12-25 16:50:37 +09:00
Sour
b984985f88 PCE: Allow 6-button controllers to be connected to the turbo tap 2023-12-25 16:31:00 +09:00
Sour
e521fe700f PCE: Fixed arcade card shift register behavior for right shifts
Garou Densetsu Special was broken because of this - going in the  stage's back row would cause character sprites to disappear for several seconds
2023-12-25 15:40:51 +09:00
Sour
9a7e52d820 PCE: Log unexpected arcade card reads/writes in debug 2023-12-25 15:39:26 +09:00
Sour
b6d865fdcd Debugger: PCE - Event Viewer - Split CD-ROM and Arcade Card reads/writes into 2 separate categories 2023-12-25 15:29:39 +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