David Guillen Fandos
c0d8ffaa38
Adding DMA transfer "Sleep" mode
...
This accounts for DMA stealing cycles from the CPU whenever the CPU
triggers a DMA (does not affect H/V blank or sound DMAs).
Works by moving the CPU to a PAUSED state where the cycles are accounted
for, reusing a similar mechanism for HALT/STOP.
Fixes a couple of games, notably GTA that has a DMA/IRQ race condition
(likely a bug really) if cycles are grossly miscalculated.
2023-09-08 19:44:13 +02:00
David Guillen Fandos
2352adcc50
Improve savestate loading to avoid corrupting the current state
...
It should not happen since the magic value and version would normally
discard incompatible savestates, however it's preferrable to check
before loading the state (it's just some minor sanity check).
2023-09-07 20:26:44 +02:00
David Guillen Fandos
1d1c719372
Remove COMPLETED_FRAME flag to simplify things
2023-09-06 00:48:37 +02:00
David Guillen Fandos
5f3e0a88cf
Remove alert_loop in favour of cpu_sleep_loop
2023-09-06 00:02:47 +02:00
David Guillen Fandos
8ae2234374
Fix delay slot issue on PSP/PS2
2023-09-04 23:44:28 +02:00
David Guillen Fandos
c1586a4825
Add sprite limit options and honor H-Blank Free too.
2023-09-01 23:57:57 +02:00
David Guillen Fandos
7321d49ca4
Remove PSP special weirdness, has almost no perf impact.
2023-08-31 00:26:42 +02:00
David Guillen Fandos
7906413f28
Define more I/O registers
2023-08-29 23:07:58 +02:00
David Guillen Fandos
188887e6c8
Mix MacOS x86 builds too
2023-08-27 13:40:36 +02:00
David Guillen Fandos
9d46b84dee
Fix iOS builds
2023-08-27 12:28:55 +02:00
David Guillen Fandos
36b607d2b4
Merge remote-tracking branch 'upstreamssh/master'
2023-08-26 12:21:46 +02:00
David Guillen Fandos
91e8ca8f4e
Merge remote-tracking branch 'origin/master'
2023-08-26 12:19:58 +02:00
David Guillen Fandos
ff4e1da1f3
Merge branch 'cxx_impl'
...
Merge the new video code, which fixes many long-standing issues.
This also implements Video 4 effects and mosaic effect.
2023-08-26 12:16:49 +02:00
David Guillen Fandos
4ca45efcc7
Implement Mosaic effect (for all modes and types).
...
The effect is not pixel perfect, and the code is slower than non-mosaic
code. However this is intentional to ensure rendering is not very slow.
This improves most games that use this effect, and it's definitely
better than not having it.
2023-08-23 21:18:09 +02:00
David Guillen Fandos
1526af3b68
Implement mode 4 color effects
...
Modes 3/5 are still not supported and use regular fullcolor path.
Fixes many games, particularly menus and initial sequences for many
other games.
2023-08-18 03:30:14 +02:00
David Guillen Fandos
38390d4c55
Fix backdrop flag filling
...
Fixes a few games (specially transitions that use backdrop effects)
2023-08-17 22:21:37 +02:00
David Guillen Fandos
2c0c8c85d7
Some cosmetic changes
2023-08-06 20:21:50 +02:00
David Guillen Fandos
7bcd7939fb
Implement row/half-row skip
...
This helps a lot with backgrounds that are mostly transparent.
2023-08-06 14:19:27 +02:00
David Guillen Fandos
01471a4295
Improve object blitting too
2023-08-06 13:21:47 +02:00
David Guillen Fandos
88fdbebd53
More perf improvements
2023-08-05 16:02:57 +02:00
David Guillen Fandos
d6f5d72a97
Minor perf improvements
2023-08-05 00:39:44 +02:00
David Guillen Fandos
195e82b615
Minor simplification
2023-08-04 23:17:33 +02:00
David Guillen Fandos
d1b4f69e32
Some more perf tweaks!
2023-08-04 01:59:06 +02:00
David Guillen Fandos
3858694aad
More perf tweaks to sprite rendering
2023-08-04 01:30:53 +02:00
David Guillen Fandos
4822923b90
Improve affine text renderer
2023-08-04 00:26:46 +02:00
David Guillen Fandos
71df26db98
Optimize bitmap rendering a bit further
2023-08-03 00:32:32 +02:00
andymcca
8292786363
Add u1 extension to supported filetypes
...
As requested in issue #37 . Could probably lose the 'v0.91' from the build version as well and just have it report the github build.
2023-08-02 23:38:52 +02:00
David Guillen Fandos
b020a646e7
Optimize regular object blitting too
2023-08-01 20:47:12 +02:00
David Guillen Fandos
a42ebbbedc
Improve text blitting performance
2023-08-01 20:27:08 +02:00
David Guillen Fandos
cde8a90ff8
Move pixel blitting from single mem access to byte-level
2023-08-01 01:20:29 +02:00
David Guillen Fandos
b4f394459d
Rewrite pixel blit functions for speed
...
Expand some conditions to make it clear what values are required in each
path.
2023-08-01 00:29:49 +02:00
David Guillen Fandos
a5c82bccd0
Update the winobj render logic
2023-07-31 22:27:12 +02:00
David Guillen Fandos
e6cde3e981
Further breakdown function modes for speed
2023-07-31 20:17:36 +02:00
David Guillen Fandos
8622c43d48
Implement sprite limit
...
Accounts for number of cycles per scanline and stops pushing objects
that go over the limit. Reversed processing from high to low priority
and drawing from low to high.
2023-07-31 20:14:27 +02:00
David Guillen Fandos
54484ff131
Refactor sprite rendering
2023-07-31 00:35:11 +02:00
David Guillen Fandos
361f106393
Clean up a bit more and refactor optimizations.
...
This should also cover the affine case which was left out.
2023-07-30 23:41:46 +02:00
David Guillen Fandos
82cb11990f
Improve blending code when no st-objs are visible
2023-07-30 21:26:19 +02:00
David Guillen Fandos
4349668315
Fix ST-OBJ blending
...
This uses an extra bit and does proper color stacking when needed to
ensure we render things correctly when ST-objects are visible.
Fixes most games that had coloring issues finally :)
2023-07-30 18:01:47 +02:00
David Guillen Fandos
8a50e2bcf1
More clean up and code rearrange
2023-07-30 00:51:31 +02:00
David Guillen Fandos
b0bbe36c08
Improve windowing render functions.
2023-07-29 23:19:12 +02:00
David Guillen Fandos
fbfae2e6f4
Minor cleanup
2023-07-29 22:38:16 +02:00
David Guillen Fandos
a5429384fe
Add missing register
2023-07-29 20:51:47 +02:00
David Guillen Fandos
b026ea626a
Disable optimization when there are some ST objects on the line
2023-07-29 17:20:35 +02:00
David Guillen Fandos
fef2b89e87
Backport VRAM mirroring issues for OBJ rendering
...
When using a big sprite with a tile at the end of the 32KB VRAM block it
might end up reading past the 32KB block. This is not an "issue" since
the VRAM wraps around within the 32KB block.
2023-07-29 16:53:50 +02:00
David Guillen Fandos
c6b2f315c5
Fix tile offset mask for 8bpp/2D mode
2023-07-29 16:35:08 +02:00
David Guillen Fandos
75a302d1d2
Merge video0/affine fixes from master
2023-07-29 15:47:47 +02:00
David Guillen Fandos
9a48e3a231
Update copyright and remove unused stuff
2023-07-29 01:08:55 +02:00
David Guillen Fandos
c68b734bfb
Some more cleanup
2023-07-29 01:06:51 +02:00
David Guillen Fandos
ef7e0bbe37
Remove last macros, fix sprite alpha blending
...
Fixes many games, might break one or two in some weird cases.
Needs some cleanup, and bitmap support for color effects
2023-07-29 00:51:07 +02:00
David Guillen Fandos
1ee50ada80
Reimplement sprite copy-mode for obj-based windowing
...
Seems it fixes a couple of visual issues in games too.
Might need to re-check that we do not overdraw too much to avoid
performance issues.
2023-07-28 19:35:33 +02:00