Flyinghead
632731bede
vmem: map area 4 access to vram
...
pass DDT0101 diag test
fix vmem handler bug with >= 8 handlers
ch2-DMA: use SB_LMMODE1 for upper mirror
dmac: update SAR and DAR according to CHCR.SM and CHCR.DM
use function templates for vram 32b handlers
clean up
2020-12-20 17:25:28 +01:00
Flyinghead
22dcb1ec99
sh4 ocache implementation. IC and OC address/data read/write in P4
...
ignore SR.RB in user mode instead of forcing it 0
add STRICT_MODE to enable ocache in interpreter
don't flush mmu table when enabling it
fix fixNan64()
2020-06-12 17:35:14 +02:00
Flyinghead
333df13fce
sh4 icache implementation. move aica out of sh4/interp.
...
revert to original div1 impl
serialize rtc clock value
cmake fixes: asan and logging options, -no-pie on x64/linux
2020-06-09 12:02:01 +02:00
Flyinghead
d1b29a59d2
vulkan: re-enable vulkan 1.1 on Android. Fix TEST_AUTOMATION
...
disable vmem32 for Heroes of Might and Magic III
support no vmem in _vmem.cpp
2020-04-03 16:32:53 +02:00
scribam
769770ab81
Replace cMutex by std::mutex
2020-03-30 23:00:43 +02:00
scribam
e99aac3575
Remove "using namespace std;"
2020-03-30 23:00:43 +02:00
scribam
4bf6802855
Cleanup include headers
2020-03-29 14:26:21 +02:00
Flyinghead
c5a42a57bc
limit maple schedule time, allow vram 8-bit reads, minor changes
2020-03-28 12:19:36 +01:00
Flyinghead
9826afa063
upload all texture mipmap levels to gpu
...
implemented for gl/gl4/vulkan/oit
don't auto-generate mipmaps in vulkan
simpler/smaller detwiddle table
use std::lock_guard with cMutex
2020-02-07 16:55:32 +01:00
Flyinghead
87023c722d
Hide unsafe optimizations on all but arm32 platform
...
Non-functional changes
2019-09-30 15:36:39 +02:00
Flyinghead
e85b724085
vmem: mprotect P2 vram space
...
Used by NHL 2K2 yuv textures
Fixes FMV not being updated
2019-09-22 10:29:53 +02:00
Flyinghead
8b949e1dca
Get rid of time_sync timer. Clean-up
2019-09-11 15:09:23 +02:00
scribam
49b7e0682b
Cleanup
2019-09-07 20:36:13 +02:00
Flyinghead
61f4cd4ecd
Merge remote-tracking branch 'origin/master' into fh/hle-bios
2019-08-31 22:10:09 +02:00
Flyinghead
bae43c236e
dynarec: use paddr to check for bios blocks + more
2019-08-30 14:11:15 +02:00
scribam
269297be18
Use _WIN32 to handle Windows specific code
2019-08-28 20:37:53 +02:00
scribam
61382316c9
Use __ANDROID__ to handle specific Android code
2019-08-28 20:37:53 +02:00
flyinghead
02b450ff19
Fix vram and code block protection in 32-bit mode
2019-08-28 14:08:13 +02:00
Flyinghead
326bc580ec
Merge branch 'fh/unified' into fh/wince-dynarec
2019-07-13 12:50:19 +02:00
Flyinghead
bbc11a30aa
Naomi rename vars and clean up. Logging changes.
2019-07-13 12:44:10 +02:00
Flyinghead
5285911133
Mirror writable aica ram to 8mb in 512mb vmem mode
...
Fixes switching from dc to naomi on windows
Should help games reading past end of aica ram (HeadHunter and others)
2019-07-10 20:17:59 +02:00
Flyinghead
ad98e583c8
win32: fix vmem reset
2019-07-10 18:58:55 +02:00
Flyinghead
f3a91de1af
Unify dreamcast, naomi and atomiswave builds WIP
2019-07-09 23:52:19 +02:00
Flyinghead
c60e2d29e8
modem: add termination function to stop pico thread
...
use new logging
log: set max verbosity to warning for release builds
2019-07-01 10:28:31 +02:00
Flyinghead
8404c6322c
New logging framework stolen from dolphin
2019-06-30 21:06:46 +02:00
Flyinghead
7dab84fd80
vmem handlers: last block wasn't mapped
2019-06-24 22:56:07 +02:00
Flyinghead
f862903a74
Don't unprotect vram when a texture is updated
...
Adjacent textures in other pages still need vram protection
Fixes texture corruption in many games since ad5ab6240b
2019-06-23 21:30:46 +02:00
Flyinghead
3e8cdc76f3
wince: fix load state hanging
2019-06-21 13:17:34 +02:00
Flyinghead
6ed098a929
wince: enable code block protection
2019-06-19 22:55:47 +02:00
Flyinghead
ad5ab6240b
refactor vram lock/unlock code into new vmem.cpp functions
2019-06-19 14:49:14 +02:00
Flyinghead
318852e261
dynarec: use mprotect to protect code areas
...
All ram pages containing code are write protected. In that case, no need
for block checks. Memory reads in the same block(s) can also be executed
at compile time and the results propagated as constants.
When a write is detected in a protected area, the corresponding blocks
are discarded and recompiled using traditional (slow) block checks.
Backported the blkmap code finding change from upstream.
Use smart pointers for block management to avoid reference issues.
Added WriteAfterWrite ssa pass
Fixed crash in ssa ConstProp pass when op list is modified
2019-06-19 11:01:33 +02:00
Flyinghead
8506355447
wrap aica ram to 8MB instead of only 2MB (dc)
...
fix crash with GuruGuru Onsen 2 and HeadHunter
2019-06-13 21:58:09 +02:00
Flyinghead
a4453c0a81
Fix vmem in 512MB mode
2019-06-10 19:01:56 +02:00
Flyinghead
3dd16e80d2
arm64 and x64 recs use ssa regalloc
2019-06-10 13:57:10 +02:00
Flyinghead
bd30752b86
Use auto& to avoid copy when iterating. Inline mmu_Read/WriteMemNoEx
2019-06-08 13:04:35 +02:00
Flyinghead
5b2cef3fdd
dynarec: add negc and xtrct op codes
...
native implementation of negc and xtrct for x64 and arm64
rec-arm64: pass exception pc in w27 instead of sh4 context
inline mmu_intruction_translation() and clean up
2019-05-26 13:30:05 +02:00
Flyinghead
e7e387b443
wince: enable/disable vmem32 based on mmu state
2019-05-24 18:19:33 +02:00
Flyinghead
e3d95f2258
wince: unify _vmem and vmem32. Use 4GB virtual space on 64-bit arch
...
On 64-bit architectures, _vmem first tries to allocate 4GB then falls
back to 512 MB.
The same virtual space is now used by _vmem and vmem32 (mmu)
2019-05-23 11:40:33 +02:00
Flyinghead
c2c0215e1b
Merge remote-tracking branch 'origin/master' into fh/wince-dynarec
2019-05-22 14:13:00 +02:00
David Guillen Fandos
aa4fc8dd60
Move cache invalidation to vmem_platform and implement NO_RWX on arm64
...
Still not functional yet, this commit breaks arm64 on android for instance.
Rewrites are not yet figured out, will push them in the next commit.
2019-05-12 23:25:43 +02:00
David Guillen Fandos
3b760f9869
Add FEAT_NO_RWX_PAGES and implement it for x64 CPU (Win and Linux)
...
Tested: Both with and without the feature, works only for x64 CPUs for
now, but supported in both windows and linux (see vmem implementation
for it, using mem-mapped files).
2019-05-12 22:02:57 +02:00
David Guillen Fandos
1a2b1c8672
Remove traces of memory manager from Jit driver.
...
Still stuff to be removed in the Naomi file handler and the ARM
AREC, which need to get ported to the new vmem interface.
2019-05-12 19:47:11 +02:00
David Guillen Fandos
55e7c17030
Fix minor build issue with madvise flags.
2019-05-12 13:40:18 +02:00
David Guillen Fandos
b74db6ef53
Moving vmem to separate files with a proper interface.
...
Works so far for Linux and Android, need to do some testing on Windows.
2019-05-11 22:09:52 +02:00
David Guillen Fandos
be1ecbaa8b
Fix TARGET_NO_NVMEM and deprecate TARGET_NO_EXCEPTIONS
...
Linked them both toghether since you can't really define one and
not the other (plus Linux honors one windows the other in some
cases).
More refactoring on this area to follow.
2019-05-10 18:57:28 +02:00
flyinghead
0d19da2b4b
wince: disable vmem32 on windows
2019-04-30 17:43:21 +02:00
Flyinghead
920a93b19c
more win32 fix
2019-04-29 18:38:28 +02:00
Flyinghead
4f4d99872b
win32 build fix
2019-04-29 18:33:14 +02:00
Flyinghead
810b8a59da
wince: 32-bit virtual mem space
...
use fast mem read/write for x64 and arm64 dynarecs
2019-04-29 18:23:00 +02:00
Flyinghead
693a6c97f3
vmem: revert aica ram mapping change. Fix ptr diff overflow in 64-bit
...
Aica ram mapping conflicts with P4 store queues in arm dynarecs
2019-04-28 20:46:18 +02:00