13177 Commits
Author SHA1 Message Date
Stenzek 4de442eb74 Bus: Reset RAM size when releasing memory map
Fixes failing cheats test.
preview
2026-11-07 21:22:09 +10:00
Stenzek 970fd6f992 GPU: Match v2 GPUSTAT.13 timing and hold it with interlace off
Bit 13 changes at the start of the last line of the frame, and keeps its
value when interlace is turned off. GP1(00h) sets it to 1.
2026-11-07 21:22:05 +10:00
Stenzek 60b3239eac Common: Remove TaskQueue
No longer used.
2026-11-07 21:06:03 +10:00
Stenzek 3f2a9e8aad Host: Move QueueAsyncTask to host/remove WaitForAllAsyncTasks
Qt uses a QThreadPool, avoiding lazy Qt TLS allocation on foreign threads.
FlushSaveStates() now waits on the outstanding task counter directly.
2026-11-07 21:06:03 +10:00
PeterDelta f26d441247 Update duckstation-qt_es.ts (#3821) 2026-11-07 20:20:34 +10:00
Stenzek 779a94f3b4 GameDB: Remove more hacks 2026-11-07 19:10:29 +10:00
Stenzek 4360c2c673 Settings: Rename DMA slice and GPU run-ahead keys
Old settings files hold the previous defaults, and run-ahead is now counted
in CPU cycles.

Also has the helpful effect of resetting everyone's values.
2026-11-07 19:10:23 +10:00
Stenzek 389927b9ce Settings: Don't save DMA and GPU timing tweaks
They're only set from the tweak table, so saving them pinned the defaults in
every settings file.
2026-11-07 19:01:00 +10:00
Stenzek 43a6a1f6de GPU: Drop unused bool return from GP0 command handlers
Incomplete commands are caught by the command table, so every handler
returned true.

Also fix unused variable warnings.
2026-11-07 19:00:59 +10:00
Stenzek 9d1c0eb302 GPU: Use measured v2 fill and VRAM copy costs
Copies pay for each VRAM page opened, one per 128 pixels of a row.
2026-11-07 18:47:08 +10:00
Stenzek 3e5410821f GPU: Use measured v2 rectangle and line costs
Rectangles get a 50 cycle setup, per-row costs and pixel pairs. Lines get a
per-segment setup and a cost for each row crossed.
2026-11-07 18:47:08 +10:00
Stenzek aa3d524a59 GPU: Use measured v2 polygon costs
Setup, per-row and per-pixel costs from psx-spx drawing timings, with textures
assumed cached.
2026-11-07 18:17:39 +10:00
Stenzek fe24c06369 GPU: Release held DMA requests at the release point
Holds are only recorded when they exceed run-ahead, so releasing them run-ahead
early just raised bit 28 too soon and added an event.
2026-11-07 18:17:39 +10:00
Stenzek 65134f7944 GPU: Count command ticks in system clock cycles
The GPU draws two pixels per clock rather than running at twice the system
clock, so fixed costs now take their measured CPU cycle duration and pixel
terms are halved.
2026-11-07 18:17:39 +10:00
Stenzek 4f6c0f5e58 GameDB: Remove DMA slice overrides matching the new default 2026-11-07 17:34:23 +10:00
Stenzek 66a76e05b2 Settings: Reduce default DMA max slice ticks to 200
Long DMAs could starve short CPU sequences of external timers, e.g. Tama
losing a CDROM INT2. Performance impact is within noise in gameplay.

Also helps with the GPU timeouts in Magical Drop III - Yokubari Tokudai-gou!.
2026-11-07 17:34:23 +10:00
Stenzek 6b47b1b151 Hotkeys: Fix frame number not toggling with OSD toggle 2026-11-07 17:02:20 +10:00
Stenzek cdf6694efb GPU: Don't postpone command completion when rescheduling
The deadline is relative to the last event run, not the current time.
2026-11-07 16:33:40 +10:00
Stenzek 4594018702 GPU: Use measured FIFO slots held by quads in FIFO mode 2026-11-07 16:33:38 +10:00
Stenzek f7fc961375 GPU: Look up GP0 command word counts in the command table
Replaces the CHECK_COMMAND_SIZE checks in each handler.
2026-11-07 16:29:35 +10:00
Stenzek 08aabb1d76 GPU: Remove FIFO size hack, use the hardware 16-word FIFO 2026-11-07 16:29:35 +10:00
Stenzek 4084c549a3 GPU: Report FIFO mode request from FIFO occupancy
Not full until 11 words are queued, counting a held polygon's packet.
2026-11-07 16:29:35 +10:00
Stenzek 3975250db7 GPU: Hold DMA request until a poly-line's last segment starts 2026-11-07 16:29:35 +10:00
Stenzek c3740936e3 GameDB: Remove DMA timing overrides from Chrono Cross
No longer needed for the UI flicker with the GPU DMA request fixes.
2026-11-07 16:29:35 +10:00
Stenzek 4d053ecab2 GPU: Request next GP0 DMA block while at most one word is queued
Matches hardware, keeps E1/sprite pairs together. Fixes Chrono Cross UI flicker.
2026-11-07 16:29:35 +10:00
Stenzek 02198f61c5 GPU: Hold DMA request through polygon setup and quad first triangle
Holds within the run-ahead window are ignored, default raised to 512 so
triangle setup does not need an extra event. Fixes Driver menu flicker.
2026-11-07 16:29:35 +10:00
Stenzek 8fd049b161 CDROM: Don't cancel a speed change when switching back
Verified on hardware, the drive is back at the original speed 0.93-1.26s
after the first change.
2026-11-07 15:23:16 +10:00
Stenzek 457d1f0b5d CDROM: Overlap a speed change with a seek in progress
Verified on hardware, the seek ends about one revolution later instead of
after the full change time.
2026-11-07 15:23:15 +10:00
Stenzek d2114ca615 CDROM: Overlap seeks with a pending speed change
Verified on hardware, the seek finishes with the change instead of after it.
2026-11-07 15:23:15 +10:00
Stenzek 90808f100e CDROM: Don't delay for double speed change with the motor stopped
Verified on hardware, the spin-up covers it.
2026-11-07 15:23:15 +10:00
Stenzek 6f7eac5fb2 CDROM: Retune speed change times to hardware measurements
0.55s for single to double, 0.83s for double to single.
2026-11-07 15:23:15 +10:00
Stenzek 4c785b908a CDROM: Reject ReadTOC on vC0 mechacons
Verified on hardware, INT5 03h 40h.
2026-11-07 15:23:15 +10:00
Stenzek 6f60cacfc8 CDROM: Scale Stop time with the disc's angular velocity
Two-point fit: published 409ms average at the start of the disc, and 279ms
measured at 30:24 on hardware.
2026-11-07 15:23:15 +10:00
Stenzek e006773d55 CDROM: Init spins up a stopped motor, after braking finishes
Takes ~1.83 seconds on hardware when the motor is stopped, instead of 118ms.
2026-11-07 15:07:53 +10:00
Stenzek ddf81ae7e8 CDROM: Keep the motor braking in the background after Stop
The motor reports as on until it stops, and stops even if the completion
was replaced. Verified with hardware tests.
2026-11-07 15:07:53 +10:00
Stenzek fe8075f698 CDROM: Any command replaces a second response not yet sent
Verified on hardware for Stop, Pause and SeekL: the operation still finishes,
but its INT2 is never sent. Seeks and session changes now track it too.
2026-11-07 15:07:53 +10:00
Stenzek 237f98f0d9 CDROM: Queue GetID response immediately
Matches hardware, it only waits for the acknowledge to be cleared.
2026-11-07 15:07:53 +10:00
Stenzek 4b07e3e01f CDROM: Clear active status bits before Stop acknowledge
Verified on hardware: the ACK while reading is 02h, not 22h.
2026-11-07 15:07:53 +10:00
Stenzek a83110b6e0 Host: Move core thread handle to host 2026-11-07 15:07:53 +10:00
Stenzek da82096f22 GPU: Decode GP1 command bits 29-31, only GP1(10h) ignores bits 30-31
Hardware shows GP1(40h..FFh) are not mirrors, fixes GameShark Sampler Disc
resetting the GPU per glyph. Unfortunately it also relies on I_STAT going
active before the exception triggers, which I'm not going to fix (at least
not at the moment) due to the performance impact.
2026-11-07 13:26:23 +10:00
Stenzek bb4e9ac5e6 Qt: Add copy/view in dump to debugger register and stack lists latest 2026-11-07 01:17:36 +10:00
Stenzek b85648e54c Qt: Tab debugger call stack, breakpoints and threads by default 2026-11-07 01:17:36 +10:00
Stenzek 5443d027b1 Qt: Round the bottom corners of south-facing tabs in themes 2026-11-07 01:17:36 +10:00
Stenzek f46d11ec27 Qt: Allow debugger windows to be closed
Adds a Window menu to show/hide each dock, and reset the layout.
2026-11-07 01:17:36 +10:00
Stenzek 90da456736 Qt: Add debugger call stack context menu 2026-11-07 01:17:36 +10:00
Stenzek 2015c40d2f Qt: Add symbol support to debugger
Loads ELF/GNU ld map symbols next to the game or from a chosen file, showing
labels and branch targets.
2026-11-07 01:17:36 +10:00
Stenzek 33245ebe56 Qt: Refresh debugger memory view region on system start
Opening the debugger before starting a game left the RAM view one byte long.
2026-11-07 01:05:01 +10:00
Stenzek 18543d4a5c Qt: Align debugger code view addresses to instructions 2026-11-07 01:05:00 +10:00
Stenzek 715ebadf76 CPU: Bound call stack function scan by the live call target
Fixes leaf functions failing to unwind when the preceding code is an
out-of-line block of the previous function containing a call.
2026-11-07 01:05:00 +10:00
Stenzek 5cbdc008df System: Report EXE override alongside running game
Sideloading or clearing the override now raises OnSystemGameChanged.
2026-11-07 00:22:17 +10:00