Commit graph

3330 commits

Author SHA1 Message Date
wwylele
0647f86649 FileSys: w->rw permission lift only happens in SDMC archive 2016-11-19 18:55:34 +02:00
wwylele
0987783699 FileSys: add SDMCWriteOnlyArchive 2016-11-19 18:55:34 +02:00
wwylele
93aa14e345 FileSys: add SDMCArchive
Now DiskArchive only serves for SDMC, then it should be just a "SDMCArchive"
2016-11-19 18:24:37 +02:00
wwylele
a879984c06 FileSys: add ExtSaveDataArchive
ExtSaveData is more similar to SaveData, so let it be a subclass of SaveData
2016-11-19 18:24:37 +02:00
wwylele
7166fdc490 FileSys: add SaveDataArchive
The error checking of SaveDataArchive is completely different from DiskArchive, so it has to be a new class instead of a subclass of DiskArchive.
2016-11-19 17:17:19 +02:00
wwylele
9a0405858a FileSys: remove Open from FileBackend
Same as directory, file shouldn't expose Open either.
2016-11-19 17:17:19 +02:00
wwylele
0e754875d1 FileSys: remove Open from DirectoryBackend
Open should not be an interface exposed by Directory because it is the Archive thats implement the methed to open the directory. The service API of 3DS also implies this - Open is not a function of directory service, but is of FS main service
2016-11-19 17:17:19 +02:00
wwylele
75ee2f8c67 FileSys: add PathParser 2016-11-19 17:17:19 +02:00
wwylele
4dd8a831bd FileSys: make Archive interfaces return error code
and make the mode parameter a reference since it is a BitField union
2016-11-01 18:30:32 +02:00
bunnei
ae2fab4a0e Merge pull request #2126 from wwylele/stub-nwm
NWM: stub Initialize with an error
2016-10-31 16:16:12 -04:00
bunnei
946b62c03d Merge pull request #2123 from jbeich/freebsd
Fix build on DragonFly and FreeBSD
2016-10-31 15:33:39 -04:00
mailwl
3c37ee434a Small fix to let IDA see target.xml 2016-10-28 20:50:45 +03:00
Jan Beich
2240cb2eb0 build: add default install for DragonFly, Solaris, etc. 2016-10-27 23:28:30 +00:00
Jan Beich
702439b519 core: some errno values are uncommon on Unix
src/core/hle/service/soc_u.cpp:107:6: error: 'ENODATA' was not declared in this scope
     {ENODATA, 43},
      ^
src/core/hle/service/soc_u.cpp:117:6: error: 'ENOSR' was not declared in this scope
     {ENOSR, 53},
      ^
src/core/hle/service/soc_u.cpp:118:6: error: 'ENOSTR' was not declared in this scope
     {ENOSTR, 54},
      ^
src/core/hle/service/soc_u.cpp:139:6: error: 'ETIME' was not declared in this scope
     {ETIME, 75},
      ^
2016-10-27 23:28:30 +00:00
Jan Beich
94d23b480e common: use system bswap* functions on more BSDs 2016-10-27 23:28:30 +00:00
Jan Beich
ddd8709e14 common: use system CPUID routine on DragonFly as well 2016-10-27 23:28:30 +00:00
Jan Beich
3d801be97d common: some FreeBSD headers are incomplete to avoid namespace pollution
In file included from src/common/x64/cpu_detect.cpp:16:
/usr/include/machine/cpufunc.h:66:17: error: unknown type name 'u_int'
static __inline u_int
                ^
/usr/include/machine/cpufunc.h:67:6: error: unknown type name 'u_int'
bsfl(u_int mask)
     ^
/usr/include/machine/cpufunc.h:69:2: error: unknown type name 'u_int'
        u_int   result;
        ^
/usr/include/machine/cpufunc.h:75:17: error: unknown type name 'u_long'; did you mean 'long'?
static __inline u_long
                ^
/usr/include/machine/cpufunc.h:76:6: error: unknown type name 'u_long'; did you mean 'long'?
bsfq(u_long mask)
     ^
/usr/include/machine/cpufunc.h:78:2: error: use of undeclared identifier 'u_long'; did you mean
      'long'?
        u_long  result;
        ^
[...]
2016-10-27 23:28:30 +00:00
Anthony J. Bentley
26af2b644c common: convert to standard stat()/fstat() interfaces
Most modern Unix environments use 64-bit off_t by default: OpenBSD,
FreeBSD, OS X, and Linux libc implementations such as Musl.

glibc is the lone exception; it can default to 32 bits but this is
configurable by setting _FILE_OFFSET_BITS.

Avoiding the stat64()/fstat64() interfaces is desirable because they
are nonstandard and not implemented on many systems (including
OpenBSD and FreeBSD), and using 64 bits for stat()/fstat() is either
the default or trivial to set up.
2016-10-27 23:28:30 +00:00
Jan Beich
51f92f0e4e common: stat64 is non-standard, hide on a random Unix
src/common/file_util.cpp:79:19: error: variable has incomplete type 'struct stat64'
    struct stat64 file_info;
                  ^
src/common/file_util.cpp:79:12: note: forward declaration of 'stat64'
    struct stat64 file_info;
           ^
src/common/file_util.cpp:99:19: error: variable has incomplete type 'struct stat64'
    struct stat64 file_info;
                  ^
src/common/file_util.cpp:99:12: note: forward declaration of 'stat64'
    struct stat64 file_info;
           ^
src/common/file_util.cpp:342:19: error: variable has incomplete type 'struct stat64'
    struct stat64 buf;
                  ^
src/common/file_util.cpp:342:12: note: forward declaration of 'stat64'
    struct stat64 buf;
           ^
src/common/file_util.cpp:359:19: error: variable has incomplete type 'struct stat64'
    struct stat64 buf;
                  ^
src/common/file_util.cpp:359:12: note: forward declaration of 'stat64'
    struct stat64 buf;
           ^
4 errors generated.
2016-10-27 23:28:29 +00:00
Jan Beich
8ce1ec7ffa common: only FreeBSD has thread affinity compatible with Linux
src/common/thread.cpp:90:5: error: unknown type name 'cpu_set_t'; did you mean 'cpuset_t'?
    cpu_set_t cpu_set;
    ^~~~~~~~~
    cpuset_t
/usr/include/sys/_cpuset.h:48:24: note: 'cpuset_t' declared here
typedef struct _cpuset cpuset_t;
                       ^
1 error generated.
2016-10-27 23:28:29 +00:00
Jan Beich
1410bd3bd0 common: define routines to set thread name on more BSDs
src/common/thread.cpp:123:5: error: use of undeclared identifier 'pthread_setname_np'
    pthread_setname_np(pthread_self(), szThreadName);
    ^
1 error generated.
2016-10-27 23:28:29 +00:00
mailwl
f672c7bd24 FRD: fix GetMyFriendKey 2016-10-25 09:54:29 +03:00
Ricardo de Almeida Gonzaga
13d46f6820 Fix typos 2016-10-20 12:26:59 -02:00
wwylele
32789a70fb NWM: stub Initialize with an error 2016-10-12 22:33:44 +08:00
bunnei
cc7f1155a8 Merge pull request #2024 from JamePeng/update-boss-code
Update the stub code of BOSS
2016-10-07 23:02:39 -04:00
bunnei
d989102c9c Merge pull request #2082 from yuriks/shader-interp-crash
Fix/mask crash in shader debugger in Mii Maker
2016-10-06 19:35:37 -04:00
bunnei
09c3e444d4 Merge pull request #1652 from wwylele/kernal-tool
Debugger: implement wait tree widget
2016-10-04 23:01:56 -04:00
bunnei
7ed97fb89a Merge pull request #2106 from wwylele/delete-recursive
FS: implement DeleteDirectoryRecursively
2016-10-03 20:34:56 -04:00
bunnei
49b10339bf Merge pull request #2103 from wwylele/gpu-reg-cleanup
GPU: DisplayTransfer & MemoryFill cleanup and param check
2016-10-03 20:21:55 -04:00
JamePeng
bd8c80a7b4 Update the stub code of BOSS 2016-10-02 17:36:57 +08:00
wwylele
257e7afb79 fs: clean up log format 2016-10-02 12:39:28 +08:00
wwylele
96b0e9476b fs: implement DeleteDirectoryRecursively 2016-10-02 11:29:16 +08:00
Yuri Kunde Schlesner
d9a904f9cb VideoCore: Shader interpreter cleanups 2016-09-29 21:15:49 -07:00
Yuri Kunde Schlesner
6219654ded Common: Remove dangerous Vec[234] array constructors
They're not currently used, and it's easy to accidentally pass a single
pointer argument to them, causing an out-of-bounds read.
2016-09-29 21:11:36 -07:00
Yuri Kunde Schlesner
26b68313b9 VideoCore: Fix out-of-bounds read in ShaderSetup::ProduceDebugInfo
As far as I can tell, memset was replaced by a fill without correcting
the parameter type, causing an out-of-bounds array read in the Vec4
constructor.
2016-09-29 21:11:36 -07:00
Yuri Kunde Schlesner
01667d9a35 OpenGL: Take cached viewport sub-rect into account for scissor
Fixes #1938
2016-09-29 20:55:24 -07:00
wwylele
58ae94af4c gpu: DisplayTransfer: a less amazing algorithm for flip
the old implementation modifies the loop variable in the loop. Though it actually works, it is really confusing. Makes it morereadable now.
2016-09-29 10:01:34 +08:00
wwylele
30ab0fa45d gpu: keep the old signal strategy for null pointer
previous commits changes the behaviour of interrupt when meeting invalid params. Regresses to the same behaviour as before
needs more hwtest
2016-09-29 10:01:34 +08:00
wwylele
48470e57fc gpu: add validity check for TextureCopy, DisplayTransfer and FillMemory
prevent further operation with invalid values which may cause assertion failure or divided by zero.
needs more hwtest
2016-09-29 10:01:34 +08:00
wwylele
3f87d70f0e memory: fix IsValidVirtualAddress for RasterizerCachedMemory
RasterizerCachedMemory doesn't has pointer but should be considered as valid
2016-09-29 10:01:34 +08:00
wwylele
c88cdc9a2b gpu: move MemoryFill, TextureCopy and DisplayTransfer into functions
The old code indented too much to read. Split into functions and do general cleanup.
2016-09-29 10:01:34 +08:00
wwylele
d2419570b9 rasterizer: separate TextureCopy from DisplayTransfer 2016-09-29 10:01:34 +08:00
wwylele
3aa047cd1d qt: shutdown system if error 2016-09-22 16:40:33 +08:00
wwylele
85a83158fb move ResetType to kernel.h 2016-09-22 13:52:52 +08:00
wwylele
1c0179ad1b name objects 2016-09-22 13:52:52 +08:00
wwylele
f69a543110 implement wait tree widget 2016-09-22 13:52:52 +08:00
Yuri Kunde Schlesner
f120e78b56 Remove special rules for Windows.h and library includes 2016-09-21 00:16:33 -07:00
Yuri Kunde Schlesner
84fbbe2629 Use negative priorities to avoid special-casing the self-include 2016-09-21 00:15:56 -07:00
Emmanuel Gil Peyrot
ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
2016-09-21 11:15:47 +09:00
Yuri Kunde Schlesner
396a8d91a4 Manually tweak source formatting and then re-run clang-format 2016-09-18 21:14:25 -07:00