Commit Graph

30 Commits

Author SHA1 Message Date
RSDuck 1793abcfb4 don't printf from exception handler
it was handy for debugging, but it's dangerous
2021-06-07 19:02:09 +02:00
WaluigiWare64 2ff065e5ea Fix some compiler warnings 2021-05-03 13:40:44 +01:00
WaluigiWare64 ac49d8e25c Update copyright year and add missing GPL headers part 2
Looks like a lot of files were missed...
Closes #1036
2021-03-21 21:32:26 +00:00
RSDuck 6a3aa551da remove direct reference to Switch frontend header 2021-03-03 00:43:56 +01:00
WaluigiWare64 89051f63d4
Define CONTEXT_PC and use instead for much cleaner code (#1017)
* Define CONTEXT_PC and use instead for much cleaner code

Also include ways to get the Program Counter on ARM64 FreeBSD and NetBSD
2021-02-25 21:17:11 +00:00
RSDuck 891427c75c fix #994 2021-02-09 23:36:46 +01:00
RSDuck e7ee3b7bc8 wild shot into the dark 2021-02-09 22:19:44 +01:00
WaluigiWare64 2502c8d212
Add NetBSD support (#985)
Note - This will require PaX MPROTECT to be disabled for melonDS by running:
paxctl +m melonDS
2021-02-03 16:14:53 +00:00
WaluigiWare64 9994d3a644
Add FreeBSD support (#939)
* Add FreeBSD support

* Fix indentation

* Fix Linux not finding OpenGL

* Link POSIX Realtime Extensions library

* Link POSIX Realtime Extensions when OpenGL is enabled too

* Fail if shm_open memory exists and also check for errors

* fix the last commit

* (try to) Setup FreeBSD CI

* Fix some issues with FreeBSD CI

* Make with all cores

* Remove FreeBSD CI 

It doesn't want to work for some reason
2021-01-22 19:20:32 +01:00
RSDuck ef75e3cdd1 JIT A64: fixes
also update Switch code for latest libnx
2021-01-05 14:36:50 +01:00
WaluigiWare64 a9223d6c0a
Fix fastmem building on ARM64 Macs (#841) 2020-12-11 01:41:53 +01:00
RSDuck 49b5860f0f aligned_alloc instead of memalign
also carry over new Switch changes
2020-12-09 18:58:51 +01:00
Filippo Scognamiglio acb272ed78
Use ashmem instead of memfd_create on Android. (#816)
* Use ashmem instead of memfd_create on Android.

* Fix code styling issues.

* fix small mistake in merge commit

Co-authored-by: RSDuck <RSDuck@users.noreply.github.com>
2020-11-30 15:33:43 +01:00
WaluigiWare64 7da4550eea
Add support for macOS (#771)
* use shm_open() instead of memfd_create() on macOS

malloc.h isn't a header on macOS

* Change OpenGL headers + create ifdef for DO_PROCLIST

macOS seems to already have the OpenGL functions defined, without the ifdef, it gives "ambiguous references" errors.

* macOS doesn't have ->gregs in uc_mcontext

and it doesn't have REG_RIP either
https://github.com/gperftools/gperftools/blob/master/m4/pc_from_ucontext.m4

* use getpid() to make memory file name unique

* #ifndef __APPLE__ for AF_PACKET and linux/if_packet.h

* Add include and link directories for macOS and link the OpenGL framework

* Add macOS CI

* Use newly added libslirp package from Homebrew

https://github.com/Homebrew/homebrew-core/pull/63412

* Use Apple's Clang instead of GNU GCC on macOS

* Add macOS build instructions to README

* Try to fix macOS undefined symbol

* snprintf doesn't take null terminator into account

* Map new memory on macOS for JIT

* Only use gcc-ar if using GNU Compiler

* re-add fastmem code - whoops!

* Fix style issue - use camelCase not snake_case

* Set Minimum macOS version

* Switch Minimum OS X version to 10.9

* Add macOS libpcap library name

* fix memory leak

* Fix binding keys in macOS

* Allow getting MAC address on macOS

melonDS on Linux uses AF_PACKET, which doesn't exist on macOS. Instead, this commit uses AF_LINK on macOS to get the MAC address.

* Remove unneeded macOS CI dependencies

* Build melonDS app bundle on macOS

Now it is no longer required to install the libraries on macOS, they come with the app bundle.

* fix macOS CI not being able to find macdeployqt

* copy melonDS.app with recursive because it's a folder

* Disable fastmem checkbox on macOS

* Disable fastmem by default in config

* forgot a semicolon

* Don't bundle libraries, causes issues on macOS <10.15

* Update README + allow finding version in Finder on macOS

* Make sure fastmem checkbox stays uncheckable
2020-11-29 17:11:33 +01:00
RSDuck d697f9e0d2 make fastmem work again 2020-11-13 15:20:53 +01:00
RSDuck 052079afeb fix Windows 2020-11-09 20:56:31 +01:00
RSDuck 78839f862e JIT fixes
- fix fastmem problems on linux
- small fix memory leak
- SlowWrite functions always take in a 32-bit variable so that the C compiler knows that the values aren't necessary zero extended
- a few other stylistic things
- handle SIGBUS as well (for macos)
2020-11-09 20:43:31 +01:00
RSDuck edf4c66724 fix build on Switch 2020-09-11 19:29:06 +02:00
RSDuck b12e1a1b6e JIT fastmem: fix out of bounds read
seems to fix #727
2020-08-25 18:13:17 +02:00
RSDuck 4299ef5f06 use unordered map for JIT RestoreCandidates
also fix WifiRead32?
2020-08-14 23:38:47 +02:00
RSDuck 36bdb591be fix JIT for code in VRAM
apparantely Pokemon B/W needs this
fixes #708
2020-08-09 13:29:04 +02:00
RSDuck 2a3147db46 reset fastmem on DSi soft reset 2020-07-31 22:39:27 +02:00
RSDuck a89741c628 fix unterminated string + remove some JIT logging 2020-07-29 01:31:57 +02:00
RSDuck e63bd7e38c for some reason tabs and spaces were mixed 2020-07-23 17:43:25 +02:00
RSDuck 1519b3d5fa attempt at fixing aarch64 linux yet again 2020-07-08 23:57:43 +02:00
RSDuck 8f5d8d1e12 fix for fastmem when pc is used as immediate
and (hopefully) make SIGSEGV handler work for aarch64 linux
2020-07-08 23:47:24 +02:00
RSDuck 3786660099 misc JIT changes 2020-07-08 23:08:25 +02:00
RSDuck 778623a8b7 make linux work and fix a few bugs 2020-07-04 18:58:00 +02:00
RSDuck c5381d2911 reconcile DSi and JIT, fastmem for x64 and Windows 2020-06-30 23:50:41 +02:00
RSDuck e335a8ca76 first steps in bringing over the JIT refactor/fastmem 2020-06-16 12:11:19 +02:00