This adds support for separate config and data dirs.
On Linux, these will be compliant XDG Basedir Specification, i.e.
XDG_CONFIG_HOME and XDG_CONFIG_DIRS (or XDG_DATA_HOME and XDG_DATA_DIRS
respectively). On all other platforms, there currently just set to the
homedir path (so no previous behaviour has been changed).
If reicast wants to read and write a data file, it just calls
get_data_path("/samplefile.txt"). If it does not need to write to
that file, it just uses get_data_path("/samplefile.txt", false). That
way, we can also use system-wide dirs (like /usr/share/reicast on
linux), that the user usually doesn't have write access to.
The same applies for config file, where you use get_config_path(args)
respectively.
This works, but is extremelly hacky. Must be started without attached debugger, lldb doesn't want to let go of EXC_BAD_ADDRESS, but reicast really depends on it getting delivered as SIGSEGV/SIGBUS. Also xcode has a really bad day upon seeing the jit code. Oh well.
There's some dynarec bug that causes color corruption on bios logo/boot triagles, TA crash on ikaruga and infinitive loop on crazy taxi. I'd guess some fp-memory-write thingy, abi, or smth. Too bad.
- Force code to compile in arm mode (arm jit -> thumb mem functions is complicated)
- SIGILL, SIGBUS. Works w/o Mach exceptions and EXC_BAD_ADDRESS
- Code buffers move to __TEXT, munmapped && memmapped to actually work
- Primitive input. Button + start, or left (works to get out of bios date screen)
- Fixup emitter for thumb2/interworking (didn't work though, reverted to arm cc)
- Block Manager: Disable mem saving / page fault alloc-on-demand logic
- Move cycle counter to r11, r9 is not clean on iOS. Remove r11 from reg alloc list
- Cache flushes for iOS
- log to log.txt
- load game.chd
THIS IS A MESS. Sorry @angelXwind :p. We'll have to clean up and merge for r8, but most of the nasty work is there.
What works:
- full init, memalloc, mprotects, etc
- boot
- gles2
What doesn't:
- Exceptions for page faults
- Breaks texture cache
- Breaks dynarec because of fastpath
- segfaults don't work, needs special mach exc_server magic that still eludes me after 5 hours
- Dynarecs. RWX issues, and broken buffer mappings. Also some minnor linking stuff (most of it is taken care of)
- Audio. I just killed it off.
- All of the ui. Was getting in the way of me not knowing how to edit story boards...
- Input
Also, merged branch 'skmp/mac86-hackport' into skmp/ios-wip
Have fun~