Commit Graph

35 Commits

Author SHA1 Message Date
Flyinghead 77e7c25e9c iOS support. Work in progress 2021-08-06 10:30:30 +02:00
Flyinghead 6bb4575c95 Merge remote-tracking branch 'origin/master' into libretro 2021-08-05 18:17:30 +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
vkedwardli 3c483c61e7
Support Apple Silicon (macOS ARM Universal Binary) (#253)
* Add audio arm64 cpp into Xcode project

* Build universal binary for SDL2 also

* Add vixl aarch64 dependency + build arm64 in cmake

* hardcode pagesize for M1 CPU

* Use `MAP_JIT` and toggle between RX and RW

* add pthread.h for cmake

* Disable audio dynarec temporary

* Enable aica arm dynarec

* Supports `br` with condition

* Dynamic linker flag for libSDL2.a since Homebrew path is different on arm (for xcodeproj)

* Fallback path for Intel

* de-dup for arm64, allow cross compilation on both Intel and Apple Silicon Mac

* Rename WriteProtect() to JITWriteProtect(), Move JITWriteProtect from arm7_rec to arm7_rec_arm64

* Remove CodeCache memset

* Remove keyboard_device.cpp from xcodeproj

* Use hard tab

* Update libchdr to support compiling on M1 (thanks @scribam)
2021-07-23 22:34:12 +02:00
Flyinghead 855836d9aa switch: arm rec EntryPoints need rx. fix arm & dsp cache flush 2021-07-14 14:57:43 +02:00
Flyinghead 44213bf830 lr: fix res change for rotated games. display version. vmem: simplify 2021-07-13 13:45:01 +02:00
Flyinghead 63a3f02368 libretro: better switch support 2021-07-12 20:14:21 +02:00
scribam d6545b253b Misc cleanup 2021-06-06 11:15:06 +02:00
scribam 1cc3490f51 Remove HOST_OS references 2021-03-13 11:38:34 +01:00
Flyinghead 478b9a9f68 linux: vmem conflict with malloc. Ignore savestate with future version 2021-03-07 17:05:34 +01:00
C.W. Betts 4d5c6e1551 Fix an oversight. 2021-03-03 01:00:08 -07:00
C.W. Betts 3c8a2f2372 Don't compile rec_arm64 on non ARM64 machines.
Include header in posix_vmem that makes calls to sys_cache_control compile on Mac ARM64.

Replaces flyinghead#184
2021-03-03 00:57:53 -07:00
Flyinghead 882e14f13f aica: x64 jit for arm
aica arm x86: use pc-relative addressing to access arm registers

OSX project fix

arm7: add simple ldm/stm handling. optimize arm32 and x64 recs

update CMakeLists.txt and Makefile. finish rebase
2021-01-26 21:32:43 +01:00
flyinghead 4215f7090f android: use ASharedMemory_create instead of /dev/ashmem if available 2021-01-26 14:02:14 +01:00
Flyinghead 8f77a5482a config/data folders improvements
linux: look for legacy ~/.reicast and ~/.reicast/data
else look for ~/.config/flycast and ~/.local/share/flycast
and ~/.config/reicast and ~/.local/share/reicast
(defaults to flycast)

look for bios files in home folder and data folders (android, windows
,macos), then in game folder.
on linux, search in /usr/share/flycast and /usr/local/share/flycast and
legacy locations
2020-11-26 16:45:57 +01: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 c1b37b56bc Remove "sh4_if.h" and "stdclass.h" from "types.h" 2020-03-30 23:00:43 +02:00
Flyinghead 17501e880e vmem: unmap all reserved vmem at exit 2020-01-07 20:45:44 +01:00
Flyinghead 76b7970589 osx: xcode 11 / swift 5 2019-12-26 21:41:44 +01: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 2015d9a696 rename and clean up 2019-08-30 23:35:10 +02:00
scribam 61382316c9 Use __ANDROID__ to handle specific Android code 2019-08-28 20:37:53 +02:00
Flyinghead 1333d6f776 Remove TARGET_BOUNDED_EXECUTION. Build warnings and clean up 2019-07-28 17:37:04 +02:00
Flyinghead 8404c6322c New logging framework stolen from dolphin 2019-06-30 21:06:46 +02:00
Flyinghead 61a867e1ad FPCB was only partially mprotected 2019-05-24 17:40:10 +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
Flyinghead fb76efb08d Standard functions for virtual mem alloc/protect/map/... 2019-05-22 11:41:12 +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