2016-01-07 08:14:33 +00:00
|
|
|
#pragma once
|
2010-10-14 10:07:38 +00:00
|
|
|
|
2016-05-16 09:51:12 +00:00
|
|
|
#include <nall/string.hpp>
|
2010-10-14 10:07:38 +00:00
|
|
|
|
2016-05-16 09:51:12 +00:00
|
|
|
namespace nall { namespace Path {
|
|
|
|
|
|
|
|
inline auto active() -> string {
|
2012-06-18 10:13:51 +00:00
|
|
|
char path[PATH_MAX] = "";
|
2012-11-02 10:37:38 +00:00
|
|
|
auto unused = getcwd(path, PATH_MAX);
|
Update to v093r02 release.
byuu says:
Changelog:
- nall: fixed major memory leak in string class
- ruby: video shaders support #define-based settings now
- phoenix/GTK+: support > 256x256 icons for window / task bar / alt-tab
- sfc: remove random/ and config/, merge into system/
- ethos: delete higan.png (48x48), replace with higan512.png (512x512)
as new higan.png
- ethos: default gamma to 100% (no color adjustment)
- ethos: use "Video Shaders/Display Emulation/" instead of "Video
Shaders/Emulation/"
- use g++ instead of g++-4.7 (g++ -v must be >= 4.7)
- use -std=c++11 instead of -std=gnu++11
- applied a few patches from Debian upstream to make their packaging job
easier
So because colors are normalized in GLSL, I won't be able to offer video
shaders absolute color literals. We will have to perform basic color
conversion inside the core.
As such, the current plan is to create some sort of Emulator::Settings
interface. With that, I'll connect an option for color correction, which
will be on by default. For FC/SFC, that will mean gamma correction
(darker / stronger colors), and for GB/GBC/GBA, it will mean simulating
the weird brightness levels of the displays. I am undecided on whether
to use pea soup green for the GB or not. By not doing so, it'll be
easier for the display emulation shader to do it.
2013-11-09 11:45:54 +00:00
|
|
|
string result = path;
|
2016-01-23 07:29:34 +00:00
|
|
|
if(!result) result = ".";
|
Update to v093r02 release.
byuu says:
Changelog:
- nall: fixed major memory leak in string class
- ruby: video shaders support #define-based settings now
- phoenix/GTK+: support > 256x256 icons for window / task bar / alt-tab
- sfc: remove random/ and config/, merge into system/
- ethos: delete higan.png (48x48), replace with higan512.png (512x512)
as new higan.png
- ethos: default gamma to 100% (no color adjustment)
- ethos: use "Video Shaders/Display Emulation/" instead of "Video
Shaders/Emulation/"
- use g++ instead of g++-4.7 (g++ -v must be >= 4.7)
- use -std=c++11 instead of -std=gnu++11
- applied a few patches from Debian upstream to make their packaging job
easier
So because colors are normalized in GLSL, I won't be able to offer video
shaders absolute color literals. We will have to perform basic color
conversion inside the core.
As such, the current plan is to create some sort of Emulator::Settings
interface. With that, I'll connect an option for color correction, which
will be on by default. For FC/SFC, that will mean gamma correction
(darker / stronger colors), and for GB/GBC/GBA, it will mean simulating
the weird brightness levels of the displays. I am undecided on whether
to use pea soup green for the GB or not. By not doing so, it'll be
easier for the display emulation shader to do it.
2013-11-09 11:45:54 +00:00
|
|
|
result.transform("\\", "/");
|
2016-05-16 09:51:12 +00:00
|
|
|
if(!result.endsWith("/")) result.append("/");
|
2012-06-18 10:13:51 +00:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2016-05-16 09:51:12 +00:00
|
|
|
inline auto real(string_view name) -> string {
|
2012-06-18 10:13:51 +00:00
|
|
|
string result;
|
|
|
|
char path[PATH_MAX] = "";
|
Update to v099r16 release (public beta).
byuu says:
Changelog:
- hiro: BrowserDialog can navigate up to drive selection on Windows
- nall: (file,path,dir,base,prefix,suffix)name =>
Location::(file,path,dir,base,prefix,suffix)
- higan/tomoko: rename audio filter label from "Sinc" to "IIR - Biquad"
- higan/tomoko: allow loading files via icarus on the command-line
once again
- higan/tomoko: (begrudging) quick hack to fix presentation window focus
on startup
- higan/audio: don't divide output audio volume by number of streams
- processor/r65816: fix a regression in (read,write)DB; fixes Taz-Mania
- fixed compilation regressions on Windows and Linux
I'm happy with where we are at with code cleanups and stability, so I'd
like to release v100. But even though I'm not assigning any special
significance to this version, we should probably test it more thoroughly
first.
2016-07-04 11:53:24 +00:00
|
|
|
if(::realpath(name, path)) result = Location::path(string{path}.transform("\\", "/"));
|
2016-05-16 09:51:12 +00:00
|
|
|
if(!result) return active();
|
Update to v093r02 release.
byuu says:
Changelog:
- nall: fixed major memory leak in string class
- ruby: video shaders support #define-based settings now
- phoenix/GTK+: support > 256x256 icons for window / task bar / alt-tab
- sfc: remove random/ and config/, merge into system/
- ethos: delete higan.png (48x48), replace with higan512.png (512x512)
as new higan.png
- ethos: default gamma to 100% (no color adjustment)
- ethos: use "Video Shaders/Display Emulation/" instead of "Video
Shaders/Emulation/"
- use g++ instead of g++-4.7 (g++ -v must be >= 4.7)
- use -std=c++11 instead of -std=gnu++11
- applied a few patches from Debian upstream to make their packaging job
easier
So because colors are normalized in GLSL, I won't be able to offer video
shaders absolute color literals. We will have to perform basic color
conversion inside the core.
As such, the current plan is to create some sort of Emulator::Settings
interface. With that, I'll connect an option for color correction, which
will be on by default. For FC/SFC, that will mean gamma correction
(darker / stronger colors), and for GB/GBC/GBA, it will mean simulating
the weird brightness levels of the displays. I am undecided on whether
to use pea soup green for the GB or not. By not doing so, it'll be
easier for the display emulation shader to do it.
2013-11-09 11:45:54 +00:00
|
|
|
result.transform("\\", "/");
|
2016-05-16 09:51:12 +00:00
|
|
|
if(!result.endsWith("/")) result.append("/");
|
2012-06-18 10:13:51 +00:00
|
|
|
return result;
|
2010-10-14 10:07:38 +00:00
|
|
|
}
|
|
|
|
|
2016-05-16 09:51:12 +00:00
|
|
|
inline auto program() -> string {
|
2014-01-28 10:04:58 +00:00
|
|
|
#if defined(PLATFORM_WINDOWS)
|
2016-01-08 09:23:46 +00:00
|
|
|
wchar_t path[PATH_MAX] = L"";
|
|
|
|
GetModuleFileName(nullptr, path, PATH_MAX);
|
|
|
|
string result = (const char*)utf8_t(path);
|
|
|
|
result.transform("\\", "/");
|
Update to v098r11 release.
byuu says:
Changelog:
- fixed nall/path.hpp compilation issue
- fixed ruby/audio/xaudio header declaration compilation issue (again)
- cleaned up xaudio2.hpp file to match my coding syntax (12.5% of the
file was whitespace overkill)
- added null terminator entry to nall/windows/utf8.hpp argc[] array
- nall/windows/guid.hpp uses the Windows API for generating the GUID
- this should stop all the bug reports where two nall users were
generating GUIDs at the exact same second
- fixed hiro/cocoa compilation issue with uint# types
- fixed major higan/sfc Super Game Boy audio latency issue
- fixed higan/sfc CPU core bug with pei, [dp], [dp]+y instructions
- major cleanups to higan/processor/r65816 core
- merged emulation/native-mode opcodes
- use camel-case naming on memory.hpp functions
- simplify address masking code for memory.hpp functions
- simplify a few opcodes themselves (avoid redundant copies, etc)
- rename regs.* to r.* to match modern convention of other CPU cores
- removed device.order<> concept from Emulator::Interface
- cores will now do the translation to make the job of the UI easier
- fixed plurality naming of arrays in Emulator::Interface
- example: emulator.ports[p].devices[d].inputs[i]
- example: vector<Medium> media
- probably more surprises
Major show-stoppers to the next official release:
- we need to work on GB core improvements: LY=153/0 case, multiple STAT
IRQs case, GBC audio output regs, etc.
- we need to re-add software cursors for light guns (Super Scope,
Justifier)
- after the above, we need to fix the turbo button for the Super Scope
I really have no idea how I want to implement the light guns. Ideally,
we'd want it in higan/video, so we can support the NES Zapper with the
same code. But this isn't going to be easy, because only the SNES knows
when its output is interlaced, and its resolutions can vary as
{256,512}x{224,240,448,480} which requires pixel doubling that was
hard-coded to the SNES-specific behavior, but isn't appropriate to be
exposed in higan/video.
2016-05-25 11:13:02 +00:00
|
|
|
return Path::real(result);
|
2014-01-28 10:04:58 +00:00
|
|
|
#else
|
|
|
|
Dl_info info;
|
2016-05-16 09:51:12 +00:00
|
|
|
dladdr((void*)&program, &info);
|
Update to v098r11 release.
byuu says:
Changelog:
- fixed nall/path.hpp compilation issue
- fixed ruby/audio/xaudio header declaration compilation issue (again)
- cleaned up xaudio2.hpp file to match my coding syntax (12.5% of the
file was whitespace overkill)
- added null terminator entry to nall/windows/utf8.hpp argc[] array
- nall/windows/guid.hpp uses the Windows API for generating the GUID
- this should stop all the bug reports where two nall users were
generating GUIDs at the exact same second
- fixed hiro/cocoa compilation issue with uint# types
- fixed major higan/sfc Super Game Boy audio latency issue
- fixed higan/sfc CPU core bug with pei, [dp], [dp]+y instructions
- major cleanups to higan/processor/r65816 core
- merged emulation/native-mode opcodes
- use camel-case naming on memory.hpp functions
- simplify address masking code for memory.hpp functions
- simplify a few opcodes themselves (avoid redundant copies, etc)
- rename regs.* to r.* to match modern convention of other CPU cores
- removed device.order<> concept from Emulator::Interface
- cores will now do the translation to make the job of the UI easier
- fixed plurality naming of arrays in Emulator::Interface
- example: emulator.ports[p].devices[d].inputs[i]
- example: vector<Medium> media
- probably more surprises
Major show-stoppers to the next official release:
- we need to work on GB core improvements: LY=153/0 case, multiple STAT
IRQs case, GBC audio output regs, etc.
- we need to re-add software cursors for light guns (Super Scope,
Justifier)
- after the above, we need to fix the turbo button for the Super Scope
I really have no idea how I want to implement the light guns. Ideally,
we'd want it in higan/video, so we can support the NES Zapper with the
same code. But this isn't going to be easy, because only the SNES knows
when its output is interlaced, and its resolutions can vary as
{256,512}x{224,240,448,480} which requires pixel doubling that was
hard-coded to the SNES-specific behavior, but isn't appropriate to be
exposed in higan/video.
2016-05-25 11:13:02 +00:00
|
|
|
return Path::real(info.dli_fname);
|
2014-01-28 10:04:58 +00:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
Update to v097r17 release.
byuu says:
Changelog:
- ruby: if DirectSoundCreate fails (no sound device present), return
false from init instead of crashing
- nall: improved edge case return values for
(basename,pathname,dirname,...)
- nall: renamed file_system_object class to inode
- nall: varuint_t replaced with VariadicNatural; which contains
.bit,.bits,.byte ala Natural/Integer
- nall: fixed boolean compilation error on Windows
- WS: popa should not restore SP
- GBA: rewrote the CPU/APU cores to use the .bit,.bits functions;
removed registers.cpp from each
Note that the GBA changes are extremely major. This is about five hours
worth of extremely delicate work. Any slight errors could break
emulation in extremely bad ways. Let's hold off on extensive testing
until the next WIP, after I do the same to the PPU.
So far ... endrift's SOUNDCNT_X I/O test is failing, although that code
didn't change, so clearly I messed up SOUNDCNT_H somehow ...
To compile on Windows:
1. change nall/string/platform.hpp line 47 to
return slice(result, 0, 3);
2. change ruby/video.wgl.cpp line 72 to
auto lock(uint32_t*& data, uint& pitch, uint width, uint height) -> bool {
3. add this line to the very top of hiro/windows/header.cpp:
#define boolean FuckYouMicrosoft
2016-02-23 11:08:44 +00:00
|
|
|
// /
|
|
|
|
// c:/
|
2016-05-16 09:51:12 +00:00
|
|
|
inline auto root() -> string {
|
Update to v097r17 release.
byuu says:
Changelog:
- ruby: if DirectSoundCreate fails (no sound device present), return
false from init instead of crashing
- nall: improved edge case return values for
(basename,pathname,dirname,...)
- nall: renamed file_system_object class to inode
- nall: varuint_t replaced with VariadicNatural; which contains
.bit,.bits,.byte ala Natural/Integer
- nall: fixed boolean compilation error on Windows
- WS: popa should not restore SP
- GBA: rewrote the CPU/APU cores to use the .bit,.bits functions;
removed registers.cpp from each
Note that the GBA changes are extremely major. This is about five hours
worth of extremely delicate work. Any slight errors could break
emulation in extremely bad ways. Let's hold off on extensive testing
until the next WIP, after I do the same to the PPU.
So far ... endrift's SOUNDCNT_X I/O test is failing, although that code
didn't change, so clearly I messed up SOUNDCNT_H somehow ...
To compile on Windows:
1. change nall/string/platform.hpp line 47 to
return slice(result, 0, 3);
2. change ruby/video.wgl.cpp line 72 to
auto lock(uint32_t*& data, uint& pitch, uint width, uint height) -> bool {
3. add this line to the very top of hiro/windows/header.cpp:
#define boolean FuckYouMicrosoft
2016-02-23 11:08:44 +00:00
|
|
|
#if defined(PLATFORM_WINDOWS)
|
|
|
|
wchar_t path[PATH_MAX] = L"";
|
|
|
|
SHGetFolderPathW(nullptr, CSIDL_WINDOWS | CSIDL_FLAG_CREATE, nullptr, 0, path);
|
|
|
|
string result = (const char*)utf8_t(path);
|
|
|
|
result.transform("\\", "/");
|
2016-02-25 10:38:03 +00:00
|
|
|
return slice(result, 0, 3);
|
Update to v097r17 release.
byuu says:
Changelog:
- ruby: if DirectSoundCreate fails (no sound device present), return
false from init instead of crashing
- nall: improved edge case return values for
(basename,pathname,dirname,...)
- nall: renamed file_system_object class to inode
- nall: varuint_t replaced with VariadicNatural; which contains
.bit,.bits,.byte ala Natural/Integer
- nall: fixed boolean compilation error on Windows
- WS: popa should not restore SP
- GBA: rewrote the CPU/APU cores to use the .bit,.bits functions;
removed registers.cpp from each
Note that the GBA changes are extremely major. This is about five hours
worth of extremely delicate work. Any slight errors could break
emulation in extremely bad ways. Let's hold off on extensive testing
until the next WIP, after I do the same to the PPU.
So far ... endrift's SOUNDCNT_X I/O test is failing, although that code
didn't change, so clearly I messed up SOUNDCNT_H somehow ...
To compile on Windows:
1. change nall/string/platform.hpp line 47 to
return slice(result, 0, 3);
2. change ruby/video.wgl.cpp line 72 to
auto lock(uint32_t*& data, uint& pitch, uint width, uint height) -> bool {
3. add this line to the very top of hiro/windows/header.cpp:
#define boolean FuckYouMicrosoft
2016-02-23 11:08:44 +00:00
|
|
|
#else
|
|
|
|
return "/";
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2013-01-21 12:27:15 +00:00
|
|
|
// /home/username/
|
|
|
|
// c:/users/username/
|
2016-05-16 09:51:12 +00:00
|
|
|
inline auto user() -> string {
|
2013-04-09 13:31:46 +00:00
|
|
|
#if defined(PLATFORM_WINDOWS)
|
2012-06-18 10:13:51 +00:00
|
|
|
wchar_t path[PATH_MAX] = L"";
|
2013-03-15 13:11:33 +00:00
|
|
|
SHGetFolderPathW(nullptr, CSIDL_PROFILE | CSIDL_FLAG_CREATE, nullptr, 0, path);
|
2013-12-10 12:12:54 +00:00
|
|
|
string result = (const char*)utf8_t(path);
|
2012-06-18 10:13:51 +00:00
|
|
|
result.transform("\\", "/");
|
|
|
|
#else
|
2013-12-10 12:12:54 +00:00
|
|
|
struct passwd* userinfo = getpwuid(getuid());
|
|
|
|
string result = userinfo->pw_dir;
|
2012-06-18 10:13:51 +00:00
|
|
|
#endif
|
2016-01-23 07:29:34 +00:00
|
|
|
if(!result) result = ".";
|
2016-05-16 09:51:12 +00:00
|
|
|
if(!result.endsWith("/")) result.append("/");
|
2012-06-18 10:13:51 +00:00
|
|
|
return result;
|
2010-10-14 10:07:38 +00:00
|
|
|
}
|
|
|
|
|
2013-01-21 12:27:15 +00:00
|
|
|
// /home/username/.config/
|
|
|
|
// c:/users/username/appdata/roaming/
|
2016-05-16 09:51:12 +00:00
|
|
|
inline auto config() -> string {
|
2013-04-09 13:31:46 +00:00
|
|
|
#if defined(PLATFORM_WINDOWS)
|
2013-01-21 12:27:15 +00:00
|
|
|
wchar_t path[PATH_MAX] = L"";
|
2013-03-15 13:11:33 +00:00
|
|
|
SHGetFolderPathW(nullptr, CSIDL_APPDATA | CSIDL_FLAG_CREATE, nullptr, 0, path);
|
2013-12-10 12:12:54 +00:00
|
|
|
string result = (const char*)utf8_t(path);
|
2013-01-21 12:27:15 +00:00
|
|
|
result.transform("\\", "/");
|
2017-09-29 10:36:35 +00:00
|
|
|
#elif defined(PLATFORM_MACOS)
|
Update to v098r11 release.
byuu says:
Changelog:
- fixed nall/path.hpp compilation issue
- fixed ruby/audio/xaudio header declaration compilation issue (again)
- cleaned up xaudio2.hpp file to match my coding syntax (12.5% of the
file was whitespace overkill)
- added null terminator entry to nall/windows/utf8.hpp argc[] array
- nall/windows/guid.hpp uses the Windows API for generating the GUID
- this should stop all the bug reports where two nall users were
generating GUIDs at the exact same second
- fixed hiro/cocoa compilation issue with uint# types
- fixed major higan/sfc Super Game Boy audio latency issue
- fixed higan/sfc CPU core bug with pei, [dp], [dp]+y instructions
- major cleanups to higan/processor/r65816 core
- merged emulation/native-mode opcodes
- use camel-case naming on memory.hpp functions
- simplify address masking code for memory.hpp functions
- simplify a few opcodes themselves (avoid redundant copies, etc)
- rename regs.* to r.* to match modern convention of other CPU cores
- removed device.order<> concept from Emulator::Interface
- cores will now do the translation to make the job of the UI easier
- fixed plurality naming of arrays in Emulator::Interface
- example: emulator.ports[p].devices[d].inputs[i]
- example: vector<Medium> media
- probably more surprises
Major show-stoppers to the next official release:
- we need to work on GB core improvements: LY=153/0 case, multiple STAT
IRQs case, GBC audio output regs, etc.
- we need to re-add software cursors for light guns (Super Scope,
Justifier)
- after the above, we need to fix the turbo button for the Super Scope
I really have no idea how I want to implement the light guns. Ideally,
we'd want it in higan/video, so we can support the NES Zapper with the
same code. But this isn't going to be easy, because only the SNES knows
when its output is interlaced, and its resolutions can vary as
{256,512}x{224,240,448,480} which requires pixel doubling that was
hard-coded to the SNES-specific behavior, but isn't appropriate to be
exposed in higan/video.
2016-05-25 11:13:02 +00:00
|
|
|
string result = {Path::user(), "Library/Application Support/"};
|
2012-06-18 10:13:51 +00:00
|
|
|
#else
|
Update to v098r11 release.
byuu says:
Changelog:
- fixed nall/path.hpp compilation issue
- fixed ruby/audio/xaudio header declaration compilation issue (again)
- cleaned up xaudio2.hpp file to match my coding syntax (12.5% of the
file was whitespace overkill)
- added null terminator entry to nall/windows/utf8.hpp argc[] array
- nall/windows/guid.hpp uses the Windows API for generating the GUID
- this should stop all the bug reports where two nall users were
generating GUIDs at the exact same second
- fixed hiro/cocoa compilation issue with uint# types
- fixed major higan/sfc Super Game Boy audio latency issue
- fixed higan/sfc CPU core bug with pei, [dp], [dp]+y instructions
- major cleanups to higan/processor/r65816 core
- merged emulation/native-mode opcodes
- use camel-case naming on memory.hpp functions
- simplify address masking code for memory.hpp functions
- simplify a few opcodes themselves (avoid redundant copies, etc)
- rename regs.* to r.* to match modern convention of other CPU cores
- removed device.order<> concept from Emulator::Interface
- cores will now do the translation to make the job of the UI easier
- fixed plurality naming of arrays in Emulator::Interface
- example: emulator.ports[p].devices[d].inputs[i]
- example: vector<Medium> media
- probably more surprises
Major show-stoppers to the next official release:
- we need to work on GB core improvements: LY=153/0 case, multiple STAT
IRQs case, GBC audio output regs, etc.
- we need to re-add software cursors for light guns (Super Scope,
Justifier)
- after the above, we need to fix the turbo button for the Super Scope
I really have no idea how I want to implement the light guns. Ideally,
we'd want it in higan/video, so we can support the NES Zapper with the
same code. But this isn't going to be easy, because only the SNES knows
when its output is interlaced, and its resolutions can vary as
{256,512}x{224,240,448,480} which requires pixel doubling that was
hard-coded to the SNES-specific behavior, but isn't appropriate to be
exposed in higan/video.
2016-05-25 11:13:02 +00:00
|
|
|
string result = {Path::user(), ".config/"};
|
2012-06-18 10:13:51 +00:00
|
|
|
#endif
|
2016-01-23 07:29:34 +00:00
|
|
|
if(!result) result = ".";
|
2016-05-16 09:51:12 +00:00
|
|
|
if(!result.endsWith("/")) result.append("/");
|
2015-04-21 11:51:57 +00:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2016-01-23 07:29:34 +00:00
|
|
|
// /home/username/.local/share/
|
2015-04-21 11:51:57 +00:00
|
|
|
// c:/users/username/appdata/local/
|
2016-05-16 09:51:12 +00:00
|
|
|
inline auto local() -> string {
|
2015-04-21 11:51:57 +00:00
|
|
|
#if defined(PLATFORM_WINDOWS)
|
2015-05-16 07:37:13 +00:00
|
|
|
wchar_t path[PATH_MAX] = L"";
|
2015-04-21 11:51:57 +00:00
|
|
|
SHGetFolderPathW(nullptr, CSIDL_LOCAL_APPDATA | CSIDL_FLAG_CREATE, nullptr, 0, path);
|
|
|
|
string result = (const char*)utf8_t(path);
|
|
|
|
result.transform("\\", "/");
|
2017-09-29 10:36:35 +00:00
|
|
|
#elif defined(PLATFORM_MACOS)
|
Update to v098r11 release.
byuu says:
Changelog:
- fixed nall/path.hpp compilation issue
- fixed ruby/audio/xaudio header declaration compilation issue (again)
- cleaned up xaudio2.hpp file to match my coding syntax (12.5% of the
file was whitespace overkill)
- added null terminator entry to nall/windows/utf8.hpp argc[] array
- nall/windows/guid.hpp uses the Windows API for generating the GUID
- this should stop all the bug reports where two nall users were
generating GUIDs at the exact same second
- fixed hiro/cocoa compilation issue with uint# types
- fixed major higan/sfc Super Game Boy audio latency issue
- fixed higan/sfc CPU core bug with pei, [dp], [dp]+y instructions
- major cleanups to higan/processor/r65816 core
- merged emulation/native-mode opcodes
- use camel-case naming on memory.hpp functions
- simplify address masking code for memory.hpp functions
- simplify a few opcodes themselves (avoid redundant copies, etc)
- rename regs.* to r.* to match modern convention of other CPU cores
- removed device.order<> concept from Emulator::Interface
- cores will now do the translation to make the job of the UI easier
- fixed plurality naming of arrays in Emulator::Interface
- example: emulator.ports[p].devices[d].inputs[i]
- example: vector<Medium> media
- probably more surprises
Major show-stoppers to the next official release:
- we need to work on GB core improvements: LY=153/0 case, multiple STAT
IRQs case, GBC audio output regs, etc.
- we need to re-add software cursors for light guns (Super Scope,
Justifier)
- after the above, we need to fix the turbo button for the Super Scope
I really have no idea how I want to implement the light guns. Ideally,
we'd want it in higan/video, so we can support the NES Zapper with the
same code. But this isn't going to be easy, because only the SNES knows
when its output is interlaced, and its resolutions can vary as
{256,512}x{224,240,448,480} which requires pixel doubling that was
hard-coded to the SNES-specific behavior, but isn't appropriate to be
exposed in higan/video.
2016-05-25 11:13:02 +00:00
|
|
|
string result = {Path::user(), "Library/Application Support/"};
|
2015-04-21 11:51:57 +00:00
|
|
|
#else
|
Update to v098r11 release.
byuu says:
Changelog:
- fixed nall/path.hpp compilation issue
- fixed ruby/audio/xaudio header declaration compilation issue (again)
- cleaned up xaudio2.hpp file to match my coding syntax (12.5% of the
file was whitespace overkill)
- added null terminator entry to nall/windows/utf8.hpp argc[] array
- nall/windows/guid.hpp uses the Windows API for generating the GUID
- this should stop all the bug reports where two nall users were
generating GUIDs at the exact same second
- fixed hiro/cocoa compilation issue with uint# types
- fixed major higan/sfc Super Game Boy audio latency issue
- fixed higan/sfc CPU core bug with pei, [dp], [dp]+y instructions
- major cleanups to higan/processor/r65816 core
- merged emulation/native-mode opcodes
- use camel-case naming on memory.hpp functions
- simplify address masking code for memory.hpp functions
- simplify a few opcodes themselves (avoid redundant copies, etc)
- rename regs.* to r.* to match modern convention of other CPU cores
- removed device.order<> concept from Emulator::Interface
- cores will now do the translation to make the job of the UI easier
- fixed plurality naming of arrays in Emulator::Interface
- example: emulator.ports[p].devices[d].inputs[i]
- example: vector<Medium> media
- probably more surprises
Major show-stoppers to the next official release:
- we need to work on GB core improvements: LY=153/0 case, multiple STAT
IRQs case, GBC audio output regs, etc.
- we need to re-add software cursors for light guns (Super Scope,
Justifier)
- after the above, we need to fix the turbo button for the Super Scope
I really have no idea how I want to implement the light guns. Ideally,
we'd want it in higan/video, so we can support the NES Zapper with the
same code. But this isn't going to be easy, because only the SNES knows
when its output is interlaced, and its resolutions can vary as
{256,512}x{224,240,448,480} which requires pixel doubling that was
hard-coded to the SNES-specific behavior, but isn't appropriate to be
exposed in higan/video.
2016-05-25 11:13:02 +00:00
|
|
|
string result = {Path::user(), ".local/share/"};
|
2015-04-21 11:51:57 +00:00
|
|
|
#endif
|
2016-01-23 07:29:34 +00:00
|
|
|
if(!result) result = ".";
|
2016-05-16 09:51:12 +00:00
|
|
|
if(!result.endsWith("/")) result.append("/");
|
2013-01-21 12:27:15 +00:00
|
|
|
return result;
|
2010-10-14 10:07:38 +00:00
|
|
|
}
|
|
|
|
|
2013-12-10 12:12:54 +00:00
|
|
|
// /usr/share
|
|
|
|
// /Library/Application Support/
|
|
|
|
// c:/ProgramData/
|
2016-05-16 09:51:12 +00:00
|
|
|
inline auto shared() -> string {
|
2013-04-09 13:31:46 +00:00
|
|
|
#if defined(PLATFORM_WINDOWS)
|
|
|
|
wchar_t path[PATH_MAX] = L"";
|
|
|
|
SHGetFolderPathW(nullptr, CSIDL_COMMON_APPDATA | CSIDL_FLAG_CREATE, nullptr, 0, path);
|
2013-12-10 12:12:54 +00:00
|
|
|
string result = (const char*)utf8_t(path);
|
2013-04-09 13:31:46 +00:00
|
|
|
result.transform("\\", "/");
|
2017-09-29 10:36:35 +00:00
|
|
|
#elif defined(PLATFORM_MACOS)
|
2013-12-10 12:12:54 +00:00
|
|
|
string result = "/Library/Application Support/";
|
2013-04-09 13:31:46 +00:00
|
|
|
#else
|
2013-12-10 12:12:54 +00:00
|
|
|
string result = "/usr/share/";
|
2013-04-09 13:31:46 +00:00
|
|
|
#endif
|
2016-01-23 07:29:34 +00:00
|
|
|
if(!result) result = ".";
|
2016-05-16 09:51:12 +00:00
|
|
|
if(!result.endsWith("/")) result.append("/");
|
2013-04-09 13:31:46 +00:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2013-12-10 12:12:54 +00:00
|
|
|
// /tmp
|
|
|
|
// c:/users/username/AppData/Local/Temp/
|
2016-05-16 09:51:12 +00:00
|
|
|
inline auto temp() -> string {
|
2013-04-09 13:31:46 +00:00
|
|
|
#if defined(PLATFORM_WINDOWS)
|
2012-08-16 10:30:47 +00:00
|
|
|
wchar_t path[PATH_MAX] = L"";
|
|
|
|
GetTempPathW(PATH_MAX, path);
|
2013-01-21 12:27:15 +00:00
|
|
|
string result = (const char*)utf8_t(path);
|
|
|
|
result.transform("\\", "/");
|
2013-12-10 12:12:54 +00:00
|
|
|
#elif defined(P_tmpdir)
|
|
|
|
string result = P_tmpdir;
|
2012-08-16 10:30:47 +00:00
|
|
|
#else
|
2013-12-10 12:12:54 +00:00
|
|
|
string result = "/tmp/";
|
2012-08-16 10:30:47 +00:00
|
|
|
#endif
|
2016-05-16 09:51:12 +00:00
|
|
|
if(!result.endsWith("/")) result.append("/");
|
2013-12-10 12:12:54 +00:00
|
|
|
return result;
|
2012-08-16 10:30:47 +00:00
|
|
|
}
|
|
|
|
|
2016-05-16 09:51:12 +00:00
|
|
|
}}
|