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 coommit makes reicast use $XDG_CONFIG_HOME from XDG Base Directory
Specification[1] if possible.
For backwards-compatability with older installations, it checks if the
old-style config directory at $HOME/.reicast exists. If so, it'll use
that instead.
All new installation should use $XDG_CONFIG_HOME/reicast (or if
that environment variable is not set: $HOME/.config/reicast).
[1] http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
Reicast doesn't support exceptions yet, so this isn't of much use now,
and is intended mostly as documentation. nullDC used some call stack
hooking magic to handle exceptions, which was never generic and clean
enough to be worth the effort to port to Reicast.
On some compiler versions, this caused an error:
../../core/linux-dist/evdev_mappings.cpp:57:3: error: uninitialized
const member ‘s_evdev_controller_mapping::Axis_DPad_X’
../../core/linux-dist/evdev_mappings.cpp:57:3: error: uninitialized
const member ‘s_evdev_controller_mapping::Axis_DPad_Y’
../../core/linux-dist/evdev_mappings.cpp:57:3: error: uninitialized
const member ‘s_evdev_controller_mapping::Axis_DPad2_X’
../../core/linux-dist/evdev_mappings.cpp:57:3: error: uninitialized
const member ‘s_evdev_controller_mapping::Axis_DPad2_Y’
../../core/linux-dist/evdev_mappings.cpp:57:3: error: uninitialized
const member ‘s_evdev_controller_mapping::Axis_Analog_X’
../../core/linux-dist/evdev_mappings.cpp:57:3: error: uninitialized
const member ‘s_evdev_controller_mapping::Axis_Analog_Y’
../../core/linux-dist/evdev_mappings.cpp:57:3: error: uninitialized
const member ‘s_evdev_controller_mapping::Axis_Trigger_Left’
../../core/linux-dist/evdev_mappings.cpp:57:3: error: uninitialized
const member ‘s_evdev_controller_mapping::Axis_Trigger_Right’
- Setups state, copies binary
- Binary locks up w/ a reboot loop
Naomi roms have a 512-byte header, executable length seems to be
at 368 or 3C0. The rom is copied from [0, len) to 0x0c020000.The
bios then hands over control at 0x0c021000
Here's the original compiler warning:
../../core/hw/sh4/dyna/shil.cpp:700:24: warning: '&&' within '||'
[-Wlogical-op-parentheses]
...if (op->rd.is_reg() && op->rd._reg==reg_sr_T || op->op==shop_ifb)
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ~~
../../core/hw/sh4/dyna/shil.cpp:700:24: note: place parentheses around the '&&'
expression to silence this warning
...if (op->rd.is_reg() && op->rd._reg==reg_sr_T || op->op==shop_ifb)
^
( )
../../core/hw/sh4/dyna/shil.cpp:843:25: warning: '&&' within '||'
[-Wlogical-op-parentheses]
if (op->rs1.is_reg() && op->rs1._reg==reg_sr_T
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
../../core/hw/sh4/dyna/shil.cpp:843:25: note: place parentheses around the '&&'
expression to silence this warning
if (op->rs1.is_reg() && op->rs1._reg==reg_sr_T
^
( )
../../core/hw/sh4/dyna/shil.cpp:844:25: warning: '&&' within '||'
[-Wlogical-op-parentheses]
|| op->rs2.is_reg() &&
op->rs2._reg==reg_sr_T
~~ ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
../../core/hw/sh4/dyna/shil.cpp:844:25: note: place parentheses around the '&&'
expression to silence this warning
|| op->rs2.is_reg() && op->rs2._reg==reg_sr_T
^
( )
../../core/hw/sh4/dyna/shil.cpp:845:25: warning: '&&' within '||'
[-Wlogical-op-parentheses]
|| op->rs3.is_reg() && op->rs3._reg==reg_sr_T
~~ ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
../../core/hw/sh4/dyna/shil.cpp:845:25: note: place parentheses around the '&&'
expression to silence this warning
|| op->rs3.is_reg() && op->rs3._reg==reg_sr_T
^
( )
This compiler warning has been fixed:
../../core/hw/sh4/dyna/decoder.cpp:1181:66: warning: '&&' within '||'
[-Wlogical-op-parentheses]
...|| blk->BlockType==BET_Cond_1 && blk->BranchBlock<=blk->addr)
~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../core/hw/sh4/dyna/decoder.cpp:1181:66: note: place parentheses around the
'&&' expression to silence this warning
...|| blk->BlockType==BET_Cond_1 && blk->BranchBlock<=blk->addr)
^
( )
This is the original warning message:
../../core/hw/holly/sb_mem.cpp:219:12: warning: comparison of unsigned
expression >= 0 is always true [-Wtautological-compare]
if ((base >=0x0000) && (base <=0x001F) /*&& (addr<=0x001FFFFF)*/...
~~~~ ^ ~~~~~~
This consolidates some of the work done for TARGET_NO_NVMEM and
feat/no-direct-memmap. If nvmem is disabled at compile time or alloc
fails _nvmem_enabled() will return false. Various other fixes
and cleanups all around.
- Import naomi code from nullDC, modify and cleanup
- Only unprotected dimm-board support, custom lst files
- Still a compile option
- Boots naomi bios and some games, no input yet
This required moving the SH4_TCB outside the exe, as new tables that belong on the executable are ignored.
This isn't perfect, but there's a large area to scan for available address space so it shouldn't be a problem
- Basic pixel pipeline, a bit better triangle tests, specialized render handlers
- Textures w/ point filtering. Not very smart is it goes 32 -> 16 -> 32 bpp, but works.
- The texture cache is shared rather inelegantly w/ OpenGL one
- Culling
- PParam sorting (shared w/ GL)
The texturing and color blending paths are ugly and slow
- Adapted for indexed, async rendering, shared ta decoder
- This blits via a quick-and-hacky GDI blitter for now
- SSE/MMX intrins based, so not very portable
- A rather not good "reference" implementation
- At least, it's not terribly slow though
- GetTexture moved to Renderer interface
Using external function pointers is broken after the rec-cpp structural changes,
and relatively low priority so disabled for now.
Fixes builds on arm, non-android (see #720)
Since read_params, packet_cmd, read_buff, pio_buff, ata_cmd, cdda and
ByteCount have not been declared static, they are visible in other
translation units. Since their structs are anonymous, their types have
internal linkage only. Thus, accessing them in other translations units
is impossible anyway.
By declaring them static, we're giving it internal linkage so that
neither the type nor the variable are visible in other translation
units.
Here are the errors:
../../core/hw/gdrom/gdromv3.cpp:50:3: warning: anonymous type with no
linkage used to declare variable '<anonymous struct> read_params' with
linkage
} read_params;
^
../../core/hw/gdrom/gdromv3.cpp:83:3: warning: anonymous type with no
linkage used to declare variable '<anonymous struct> packet_cmd' with
linkage
} packet_cmd;
^
../../core/hw/gdrom/gdromv3.cpp:91:3: warning: anonymous type with no
linkage used to declare variable '<anonymous struct> read_buff' with
linkage
} read_buff;
^
../../core/hw/gdrom/gdromv3.cpp💯3: warning: anonymous type with no
linkage used to declare variable '<anonymous struct> pio_buff' with
linkage
} pio_buff;
^
../../core/hw/gdrom/gdromv3.cpp:106:3: warning: anonymous type with no
linkage used to declare variable '<anonymous struct> ata_cmd' with
linkage
} ata_cmd;
^
../../core/hw/gdrom/gdromv3.cpp:122:3: warning: anonymous type with no
linkage used to declare variable '<anonymous struct> cdda' with linkage
} cdda;
^
../../core/hw/gdrom/gdromv3.cpp:156:4: warning: anonymous type with no
linkage used to declare variable '<anonymous union> ByteCount' with
linkage
} ByteCount;
^
- Full IL mode now works!
- Dispatch up to 270 mips on 2.2ghz i7, on a complex 3d scene
- Will run many games fullspeed on modern pc, thanks to idleskip
- Nest shil implementations to shilop_##name::form::impl for easier template matching
- Add more direct handlers
- Add prints if a direct handler isn't found
- Remove multiple indirect handlers, leave them for fallback
This adds the ability to simply close the emulator when launched
externally and prevents changes designed for linux from generating
conflicting controller configurations on Android (and may be needed for
iOS as well).
This introduces the USE_ALSA flag (replaces the somewhat hacky
"HOST_OS==OS_LINUX && !defined(TARGET_NACL32) && !defined(ANDROID)"
if case).
The Makefiles for beagle, gcwz, lin86 and pandora have been adapted to
reflect this change.
This commit introduces PulseAudio support using PulseAudio's "Simple
API".
The PulseAudio backend will be included during compilation if
USE_PULSEAUDIO is defined.
This *should* add the Android audio backend. I do not have any idea how
to do this properly, but I figured that this might work for the moment.
There's probably a lot of testing required for this to work.
This commit adds the DirectSound audio backend, which is a modified
version of core/oslib/ds_audiostream.cpp.
Porting this was a bit tricky, since ds_audiostream.cpp defined 3
extern functions that the other backends didn't have:
* bool os_IsAudioBuffered();
* bool os_IsAudioBufferedLots();
* int os_getusedSamples();
I came to the conclusion that these methods are obsolete since they are
only used core/windows/winmain.cpp in the function void os_wait_cycl(u32
cycl) - which is used nowhere. Thus, I removed os_wait_cycl and the
headers of the three functions in core/oslib/oslib.h. I also removed the
functions themselves (except for int os_getusedSamples(), which is still
used inside the directsound backend, but can safely declared static for
that purpose).
The DirectSound backend will be included during compilation if HOST_OS
is OS_WINDOWS.
This adds the OSS audio backend, which is basically a slightly modified
version of core/oslib/alsa_audiostream.cpp from the skmp/linux-x64
branch (as of commit cdf9f3dc971506c2efd979275c2869f064e1027c).
The ALSA backend will be included during compilation if HOST_OS is OS_LINUX
and neither TARGET_NACL32 nor ANDROID are defined. This should be
changed to a USE_ALSA flag in the future (for constistency and and
simplicity reasons), but i didn't want to put too much stuff into this
commit.
This adds the OSS audio backend and removes OSS code from
core/linux-dist/main.cpp and core/sdl/main.cpp.
The OSS backend will be included during compilation if the USE_OSS
flag is set.
Although OSS code in core/linux-dist/main.cpp depended on the
TARGET_PANDORA flag instead of USE_OSS, the latter should work too
since it is defined in the Pandora Makefile (lines 7 & 83).
This makes it possible to have multiple audio backends compiled into
reicast (e.g. ALSA & OSS on Linux). These can then selected by the user
via a config option ("backend" iin the "audio" section). It *should*
also be possible to reduce the number of platform-specific ifdefs with this
approach.
Audio backends need to define a struct (audiobackend_t) that holds a
pointer to it's init, push and term function and also a slug and a name
as string. They then need to pass a pointer to this struct to
RegisterAudioBackend() before InitAudio() is called.
For now, I defined a function (RegisterAllAudioBackends) that get's
called exactly once (i.e. upon first call of InitAudio()), where
we can put ifdef'd RegisterAudioBackend() calls into for each backend
that reicast supports.
Please note that this commit just implements the basic audio backend
system - no backends have been ported to the new API yet. For the meantime,
reicast will run without any audio support accross all systems.