Commit Graph

109 Commits

Author SHA1 Message Date
Flyinghead b47f4f56ef user-defined literals: _KB, _MB, _GB 2023-07-01 14:31:25 +02:00
Flyinghead ac2637286b Merge remote-tracking branch 'origin/master' into dev 2023-05-13 15:55:47 +02:00
Flyinghead c8a45d95a7 dynarec: fix mov64 edge case when registers must be swapped
Handle case where mov64 must swap its operands depending on register
allocation.
Fix canonical call for FSCA when return operands are register-allocated.

Issue #1020
2023-04-24 17:38:49 +02:00
Flyinghead 5bfbcb210c dynarec: refactor imm mem r/w and store queue handlers. clean up mmu
Eliminate duplicate code for immediate memory read/write in all dynarecs
Simplify PREF to use do_sqw_nommu even for simple SQ remap
Check for address errors before mmu translation
Get rid of unneeded template params in mmu translation funcs
2023-02-18 13:33:38 +01:00
Flyinghead 143073b61d rename _vmem to addrspace and move platform vmem stuff to virtmem ns
use namespaces
simplify names
no functional changes
2023-01-29 18:48:33 +01:00
Flyinghead 1149d499a8 x86: windows ce support in dynarec
clean up some unused methods and return values
2023-01-28 19:22:36 +01:00
Flyinghead 99d5266aa0 Merge remote-tracking branch 'origin/master' into dev
# Conflicts:
#	core/hw/holly/sb_mem.cpp
#	core/hw/naomi/naomi.cpp
#	core/hw/naomi/naomi_flashrom.cpp
#	core/hw/pvr/ta_ctx.h
#	core/rend/gui.cpp
2023-01-27 15:41:45 +01:00
scribam 80cf4406a7 cleanup include headers 2023-01-26 10:06:51 +01:00
Flyinghead f8372c51a7 Revert "wip headers"
This reverts commit e3e2c3a0d2.
2023-01-24 14:26:14 +01:00
scribam e3e2c3a0d2 wip headers 2023-01-23 18:29:04 +01:00
Flyinghead 06c5ba7f0e sh4: simplify exceptions 2023-01-11 20:42:33 +01:00
flyinghead c5c87522ca x64 dynarec: wrong op in GenReadMemImmediate
Fixes MINIDUMP-14
2023-01-02 16:06:58 +01:00
Flyinghead 62085539a7 dynarec: reg alloc 64-bit regs. avoid some interpreter fallbacks
Option to reg alloc 64-bit regs in two host regs. Used when FPSCR.SZ ==
1 (64-bit reg and memory transfers.) Enabled for arm, arm64 and x64
(windows only) dynarecs.
Don't fallback to interpreter when FPSCR.PR==1 (double precision) for
FMOV, FLDS and FLTS.
2022-12-23 16:06:54 +01:00
Flyinghead 32e3e7d9c5 vmem: no more 4GB vmem mode. only map elan RAM in naomi2 mode
Do not attempt to reserve 4GM of virtual space on 64-bit hosts. Use
512MB everywhere.
Don't map elan RAM if not needed and dont protect/unprotect it in
memwatch.
2022-12-09 17:37:49 +01:00
flyinghead 501244ed25 x64 rec: incorrect stack alignment of memory handlers on windows 2021-11-20 12:29:07 +01:00
flyinghead 8262c9ece7 UWP support - WIP 2021-11-19 23:18:45 +01:00
Flyinghead bc3be1029c fix sh4 scheduler. use common cycle counter in sh4 context
scheduler reset and unregister
schedule requests during reset(), not init()
preserve cntx.sh4_sched_next on sh4 reset
Use cntx.cycle_counter in dynarecs and interpreter
Fixes Confidential Mission hang at boot with HLE
2021-10-07 16:18:32 +02:00
Flyinghead 9d6c548730 naomi: close cart on reset. sh4: replace some verify by throw
Close naomi/aw cart on reset. Reset input mapping/button names
Get rid of ngen_GetFeatures()
throw exception instead of failing verify if not internal error
catch sh4 exceptions in dynarecs and throw fatal error
2021-08-03 09:47:13 +02:00
Flyinghead cfa21934bb x64: fix stack unwinding issue. don't save xmm regs on stack 2021-07-30 19:10:34 +02:00
Flyinghead 7561ce753a unwind info for arm64. use static c++ lib for android
include oboe static libs
get rid of old regalloc
2021-07-29 17:46:46 +02:00
Flyinghead 710f379bd3 unwind info for x64 dynarecs
delegate to previous signal handler, proper abort for win32
arm32: use builtin gcc __clear_cache
dyna/driver.cpp: no need for a code buffer in win32, cleanup
2021-07-24 22:24:37 +02:00
scribam d6545b253b Misc cleanup 2021-06-06 11:15:06 +02:00
scribam 20b838b968 deps: update xbyak 2021-05-22 10:45:50 +02:00
Flyinghead 3a1ae0db00 mmu: fix macos crash. only flush user mem in address lut
force rtt2vram for JSR (custom graffiti)
clean up vmem32 remains
missing host_context.h change
gh action: build sdl from source on macos
2021-05-18 12:53:14 +02:00
Flyinghead 373dffc65a wince: ditch vmem32. use address LUT in dynarec. finer grained flush 2021-05-17 11:59:34 +02:00
Flyinghead 1464c02903 mmu: add address cache to mem slow path. better fastmmu hashtable.
mmu: add address cache to Read/WriteMemNoEx
fastmmu: ignore 1k pages. optimize hashtable
get rid of NO_MMU
2021-05-14 19:03:57 +02:00
Flyinghead a5eecf59b3 x64 rec: wrong arg0 reg for windows. need to handle 512mb addr space 2021-03-29 17:30:56 +02:00
Flyinghead 65290a70f3 x64/x86: store queue dynarec optimization 2021-03-29 14:26:55 +02:00
scribam d715836c40 clang-tidy: run modernize-use-override 2021-03-13 17:28:32 +01:00
Flyinghead c61a66257f macos: no fast-math. fix xbyak "offset too big" 2021-03-13 10:34:13 +01:00
Flyinghead 5227259048 No more fast-math on x86/x64. Yet another FTRC fix
Don't compile with -ffast-math
Fix FTRC to return 0x80000000 for NaN
-> fixes Arcade Racing Legend sound problems and disappearing cars
Remove unsupported GCW0 platform
Remove unused android makefiles
2021-03-11 12:27:00 +01:00
Flyinghead 31e0b3ab51 x64/x86 dynarecs: fast-math fcmp/eq implementation
Fixes Shin Nihon Pro Wrestling - Toukon Retsuden 4
Fixes Project Justice (Issue #38)
2021-03-07 16:59:17 +01:00
Flyinghead 3f4993979f Merge remote-tracking branch 'origin/master' into fh/x64-arm-jit 2021-01-31 22:45:35 +01:00
Flyinghead 3dfe4f96fa x64 rec: mul_s64 fix
GTA2 hang on start
2021-01-31 17:31:47 +01:00
Flyinghead e773880e6f x64 rec: save one op in CheckBlock 2021-01-31 11:56:07 +01:00
Flyinghead 80782475da x64 rec: get rid of setjmp. standardize ngen_Rewrite/HandleException
move rewrite code from exception handlers to x86/x64 dynarecs
use same host context info on linux/win
x64: stack alignment issue in mem handlers
2021-01-30 16:14:44 +01:00
Flyinghead 594241ffa3 x64 rec: generate main loop. use mem stubs. fast mem access for !mmu
enable fast mem path for both !mmu and mmu
simplify rewrite
get rid of .asm file and inline assembler code
2021-01-29 11:46:05 +01:00
flyinghead c344903a23 new x86 dynarec. Enable for android
refactor common code between x64 and x86 dynarecs.
x86 rewrite based on the x64 one
some discarded dyna blocks weren't fully unlinked
2021-01-26 13:16:48 +01:00
Flyinghead 36451614d2 rec-x64: don't use vfmadd to avoid intel/amd variations 2021-01-08 21:40:13 +01:00
flyinghead e5b3c5268b wince: attempt immediate read/write when address isn't translated 2021-01-07 19:18:53 +01:00
Flyinghead 34d86500fa compile warnings. debug log. minor changes 2020-12-16 15:12:32 +01:00
flyinghead 700994340b cmake: add sdl to vstudio build. Fix WinCE crash 2020-07-23 18:50:55 +02:00
scribam 6ee4b6de85 Replace OS_DARWIN by __APPLE__ 2020-04-26 14:19:21 +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
scribam fef96c125a deps: Update xbyak to version 5.891 2020-03-29 13:47:20 +02:00
Flyinghead 0b6b6339ed nvmem: generate console ID at startup. rec-x64: Call stack alignment
Generate console ID in dc_nvmem.bin if blank. Used by chuchu rocket
login.
Align stack to 16-byte
2020-03-10 14:47:45 +01:00
Flyinghead 12b9b7254a reduce precision of FIPR and FTRV sh4 ops on x86 platforms 2019-12-17 20:23:58 +01:00
Flyinghead 530cdaa23f use doubles to emulate FIPR on x86. avoid crash with per-game config
Don't store the renderer type in per-game config as this crashes.
Fixes Sonic Adventure falling off track
Other non-functional changes
2019-12-13 12:27:43 +01:00
Flyinghead bad10bae20 dyna: only protect ram when needed. Use const ref to avoid copies
avoid extra op in x64 rec
2019-09-30 15:47:05 +02:00