Commit graph

72 commits

Author SHA1 Message Date
Connor McLaughlin 29690c4635 GPU/SW: Fix interlaced output getting corrupted when size changes
Fixes glitches in screen when tilting table in Pro Pinball.
2021-01-17 02:45:13 +10:00
Connor McLaughlin 7b6d30a994 GPU/HW: Fix possible VRAM corruption when live switching resolutions
Mask bit was getting lost based on guest state.
2020-12-17 01:20:06 +10:00
Connor McLaughlin 5e05a14f97 GPU: Fix incorrect draw time approximation of lines
Fixes flickering pre-mission screen in Omega Boost.
2020-12-06 00:35:54 +10:00
Albert Liu e12c68cf65 GPU/SW: Fix 16-bit wraparound output crashing 2020-11-26 23:58:06 -08:00
Connor McLaughlin b49067d165 Build: Fix Android armv8 performance regression 2020-11-22 02:33:02 +10:00
Connor McLaughlin a6529a9537 Android: Enable armeabi-v7a builds 2020-11-21 23:47:12 +10:00
Connor McLaughlin 2595e31575 GPU: Split software to frontend/backend 2020-11-21 18:39:04 +10:00
Connor McLaughlin 03d4f80883 GPU: Move enums/types into separate file 2020-11-21 18:39:04 +10:00
Connor McLaughlin d3d881aa6b GPU/Software: Reduce number of copies by one, enable 16-bit scanout 2020-11-21 18:39:04 +10:00
Romain TISSERAND b2ef931772 Minor gpu_sw optimizations and warning fixes 2020-10-12 13:15:21 +02:00
Connor McLaughlin fe25f005c2 GPU: Fix incorrect sign extension of positions
Fixes missing objects in Skullmonkeys (again).
2020-10-11 12:21:08 +10:00
Connor McLaughlin 50b025c75a GPU: Use triangle area for ticks rather than bbox
Fixes slow transitions in Tales of Phantasia.
2020-10-04 00:12:01 +10:00
Connor McLaughlin 8f9f039665 GPU/SW: Port triangle/line rasterizer from Mednafen 2020-09-30 23:04:14 +10:00
Connor McLaughlin cacf7a7cc9 GPU: Precompute texture window expression [SAVEVERSION+] 2020-09-30 23:03:52 +10:00
Connor McLaughlin d73271ec0a GPU: Add option to force 4:3 for 24-bit content (e.g. FMVs) 2020-09-26 15:11:45 +10:00
Connor McLaughlin 3847be86b0 Fix a bunch of random warnings 2020-09-13 11:54:51 +10:00
Connor McLaughlin 231c0b5ff6 GPU/SW: Wrap texture coordinates when sampling 2020-08-04 14:40:00 +10:00
Connor McLaughlin 818892cb1b GPU: Claer interlaced field buffer when enabling
Fixes old frames getting briefly displayed.
2020-08-03 03:26:13 +10:00
Connor McLaughlin 0c1b637549 PGXP: Add initial implementation 2020-08-02 00:25:07 +10:00
Connor McLaughlin b6f871d2b9
JIT optimizations and refactoring (#675)
* CPU/Recompiler: Use rel32 call where possible for no-args

* JitCodeBuffer: Support using preallocated buffer

* CPU/Recompiler/AArch64: Use bl instead of blr for short branches

* CPU/CodeCache: Allocate recompiler buffer in program space

This means we don't need 64-bit moves for every call out of the
recompiler.

* GTE: Don't store as u16 and load as u32

* CPU/Recompiler: Add methods to emit global load/stores

* GTE: Convert class to namespace

* CPU/Recompiler: Call GTE functions directly

* Settings: Turn into a global variable

* GPU: Replace local pointers with global

* InterruptController: Turn into a global pointer

* System: Replace local pointers with global

* Timers: Turn into a global instance

* DMA: Turn into a global instance

* SPU: Turn into a global instance

* CDROM: Turn into a global instance

* MDEC: Turn into a global instance

* Pad: Turn into a global instance

* SIO: Turn into a global instance

* CDROM: Move audio FIFO to the heap

* CPU/Recompiler: Drop ASMFunctions

No longer needed since we have code in the same 4GB window.

* CPUCodeCache: Turn class into namespace

* Bus: Local pointer -> global pointers

* CPU: Turn class into namespace

* Bus: Turn into namespace

* GTE: Store registers in CPU state struct

Allows relative addressing on ARM.

* CPU/Recompiler: Align code storage to page size

* CPU/Recompiler: Fix relative branches on A64

* HostInterface: Local references to global

* System: Turn into a namespace, move events out

* Add guard pages

* Android: Fix build
2020-07-31 17:09:18 +10:00
Connor McLaughlin fc0560087f GPU: Skip primitives where clip area is invalid
Fixes palettes being overwritten/menus being broken in
Yoshimoto Mahjong Club Deluxe.
2020-06-14 01:01:01 +10:00
Connor McLaughlin bda528d70a GPU: Alter timings to reflect new clock 2020-06-13 01:40:05 +10:00
Connor McLaughlin 445bd02cad GPU/HW: Interlace at native resolution rather than 1x
Also fixes screen bobbing when interlacing is disabled.
2020-05-27 00:27:27 +10:00
Connor McLaughlin 23436f08ba GPU/HW: More improvements to GPUSTAT.31
Fixes True Pinball without breaking intros to Final Fantasy 7/8.
2020-05-26 22:57:58 +10:00
Connor McLaughlin e368dbbadc GPU: Implement non-interleaved interlaced rendering
Fixes screen shaking in True Pinball.
2020-05-26 03:18:05 +10:00
Connor McLaughlin 237f469baa GPU: Mask variable sprite/rectangle sizes
Fixes broken sprites in Gradius Deluxe Pack (Gradius II).
2020-05-21 12:04:57 +10:00
Connor McLaughlin b25ed6c151 GPU: Fix interlaced rendering in vblank breaking 2020-05-17 01:02:20 +10:00
Connor McLaughlin bf3c83658a GPU: More accurate texture blending in non-true-colour-mode
Fixes Silent Hill loading animation, Advanced V.G. intro fade-out, and
probably others.
2020-05-15 01:32:22 +10:00
Connor McLaughlin 81f297456c GPU: Fix mismatched scanout between hardware/software renderers 2020-05-12 01:35:06 +10:00
Connor McLaughlin 8c6cb877eb GPU: Disable display when CRTC configuration is invalid 2020-04-27 21:49:34 +10:00
Connor McLaughlin 304391bd00 GPU: Truncate sprite/rectangle positions to 12 bits before rendering
Fixes disappearing objects in Skullmonkeys.
2020-04-27 12:51:18 +10:00
Connor McLaughlin 98ff136f67 GPU: Round texture coordinates instead of flooring
Fixes misaligned textures in some games such as Crash Bandicoot.

Currently, because the vertex offset is not applied at >1x resolution
scale, this will not work so it is disabled at >1x.
2020-04-26 19:15:50 +10:00
Connor McLaughlin 1757932b3a GPU: Implement FIFO and timings
This will cause a slight performance loss. I've left some knobs in which
can be tweaked to mitigate this, but the goal is to be compatible with
all games which require them.
2020-04-19 01:17:28 +10:00
Connor McLaughlin 9e024b7a51 GPU: Handle VRAM wrap-around behavior on scanout 2020-04-11 16:09:03 +10:00
Connor McLaughlin f0a3e66d08 GPU/Software: Fix broken display when VRAM is X-offset 2020-04-09 20:50:57 +10:00
Connor McLaughlin 2413c5a6a3 GPU/Software: Fix incorrect colours in 24-bit FMVs 2020-04-09 00:46:00 +10:00
Connor McLaughlin 3cfead36c4 Revert "GPU: Clamp coordinates to 11 bits after applying drawing offset"
This reverts commit 5302f83818.

This is not the correct fix, and breaks other games.
2020-04-04 19:31:19 +10:00
Connor McLaughlin ddf52cc8c7 GPU/SW: Implement interlaced display 2020-04-04 00:24:37 +10:00
Connor McLaughlin c483a78889 GPU: Implement interlaced VRAM fills 2020-04-04 00:24:37 +10:00
Connor McLaughlin 2aecb570c1 GPU: Implement interlaced rendering in hardware backends 2020-04-04 00:24:37 +10:00
Connor McLaughlin 5302f83818 GPU: Clamp coordinates to 11 bits after applying drawing offset
Fixes flickering in some scenes (e.g. Galbadia Missile Base).
2020-04-04 00:10:45 +10:00
Connor McLaughlin 48fba47ee6 GPU: Implement skip-drawing-to-active-field for interlaced mode
Currently only in the software renderer.
2020-04-04 00:10:41 +10:00
Connor McLaughlin 148279e2f2 GPU: Rewrite CRTC display modeling and overscan handling 2020-03-29 01:14:37 +10:00
Connor McLaughlin fe824d6c89 GPU: Display VRAM with 1:1 pixel ratio rather than scaling 2020-03-29 01:14:33 +10:00
Connor McLaughlin 90121aa169 GPU: Fix VRAM display in software renderer 2020-03-13 23:21:44 +10:00
Connor McLaughlin f9a298f1b7 GPU: Fix incorrect handling of check mask bit
Fixes boxes in Silent Hill in Software Renderer.
2020-03-06 00:45:21 +10:00
Connor McLaughlin 7412e78aa1 GPU: Move software copy/fill functions to base class so it can be used as fallback 2020-02-29 00:18:33 +10:00
Connor McLaughlin 6bacbf3438 GPU: Fix 480i displays getting cut off in OpenGL and Software 2020-02-28 23:01:38 +10:00
Connor McLaughlin e8e44991db GPU: Fix display in OpenGL renderer 2020-02-28 22:42:56 +10:00
Connor McLaughlin fcc0ae9571 GPU: Implement "Crop Mode" (none, overscan, all borders) 2020-02-28 17:01:01 +10:00