Commit graph

379 commits

Author SHA1 Message Date
Unknown W. Brackets
c829ccb87d Io: Track whether the game is on a UMD or storage. 2020-05-21 18:57:46 -07:00
Unknown W. Brackets
67416e5919 Io: Simulate VFAT bug only when simulating FAT32.
And cleanup flag handling a bit.
2020-05-21 18:57:46 -07:00
Unknown W. Brackets
3777d32ac8 Io: Cleanup sceIoOpen errors and logging. 2020-05-21 18:56:57 -07:00
Henrik Rydgård
1ddc8ac3df Back to ERROR 2020-03-28 14:12:42 +01:00
Henrik Rydgård
caff4591cc Minor log improvement in BlockDevices.cpp 2020-03-28 12:40:45 +01:00
Unknown W. Brackets
08b6275bc7 Io: Apply VFAT hack only to dirs <= 8 chars long.
Fixes Mega Drops 2, which relies on the lowercase name at about 10
characters.
2020-03-21 22:49:19 -07:00
Unknown W. Brackets
cb1b7b1e43 Core: Bring over some file related Switch changes.
Reducing the distance from the Switch port code.
2020-03-03 22:53:03 -08:00
Unknown W. Brackets
5009698cc0 Core: Use a shared_ptr for i18n categories.
This does not make them thread safe, but it reduces the chances of a crash
a bit (see #12594.)
2020-02-09 07:35:16 -08:00
Henrik Rydgård
cef83158fd
Merge pull request #12597 from unknownbrackets/cso-futureproof
Core: Future proof CSO support a bit
2020-01-26 22:18:22 +01:00
Unknown W. Brackets
931dff6125 Core: Future proof CSO support a bit.
For CSO versions >= 2, respect the header size field and uncompressed
frame size behavior.  This will allow more options for future files, like
adding a field for the CRC or otherwise.
2020-01-26 10:18:41 -08:00
shenweip
9fa4ae7b15 fix 2020-01-04 09:11:15 +08:00
shenweip
d09543ebd7 Move umd replace to loaders. 2020-01-02 14:56:24 +08:00
shenweip
fb696f8a71 Just return error if current directory not be setted. 2019-12-25 11:16:56 +08:00
shenweip
c3a489fa90 Don't ignore SCE_KERNEL_ERROR_NOCWD in many cases.
Use a error 1 to mean the uccessful mapping but carry with  SCE_KERNEL_ERROR_NOCWD error.
2019-12-13 17:59:55 +08:00
shenweip
fd6b0554d6 IO:Re-grab SCE_KERNEL_ERROR_NOCWD.
Fix issue#12492,the issue occur since commit e09296b9b1
2019-12-13 11:15:58 +08:00
Unknown W. Brackets
913121cf2b Io: Consistently use error codes with OpenFile().
This gets rid of OpenWithError(), and just always returns a negative value
on error for OpenFile().  Also fixed the sequence rollover, which could've
returned 0.

0 should be considered a valid handle ideally, but left it never returning
0 to simplify cleanup in some areas.
2019-10-20 11:03:37 -07:00
Unknown W. Brackets
45516783f6 Io: Return error code for write attempt to UMD.
Previously, we were returning file not found (because 0), which was not
correct.  We were also allowing write handles to sce_lbn.
2019-10-20 10:36:13 -07:00
M4xw
15a9a0ac8f Switch: Cleanup some includes.
Disable dlopen and tty checks too.
2019-09-28 09:22:38 -07:00
Unknown W. Brackets
761a9d321f Windows: Allow write-only files to be read later.
Fixes #11939, at least the hang described in that issue.  Seems to match
with how the PSP handles file locking.
2019-08-10 08:34:01 -07:00
Henrik Rydgård
4d195ce955 Workaround for DJ Max Portable's clumsy copy protection. Fixes #9477. 2019-08-01 18:45:28 +02:00
Unknown W. Brackets
33cfac549d Replay: Attempt to ignore reads in PSP/GAME.
Unless there are writes in this directory, we should be able to safely
ignore them.

Currently detection isn't perfect (like PSP/./GAME/../GAME), but this
should catch the vast majority of cases.
2019-07-04 23:46:15 -07:00
Henrik Rydgård
0cd3ac06d0 Avoid trying to create a FileLoader for empty filenames
Assorted cleanup
2019-02-25 21:35:51 +01:00
Henrik Rydgård
b572dc52a5 Remove usage of deprecated function readdir_r (and ugly Blackberry hack diren_large) 2019-01-08 12:29:59 +01:00
Unknown W. Brackets
340460f01c Io: Add missing error code on file open.
Doesn't affect Windows.
2018-11-06 19:28:22 -08:00
Unknown W. Brackets
ce6cb7e7c9 Core: Report disc read errors to the user.
At least when we can detect this, better not to keep silent about it.
2018-09-29 00:45:50 -07:00
Unknown W. Brackets
ac5467ca67 Io: Linux buildfix.
Fixes #11300.
2018-08-13 07:32:53 -07:00
Henrik Rydgård
a495537164
Merge pull request #11297 from unknownbrackets/fs-root
Io: Prevent cur/parent dir in listing of root
2018-08-13 07:48:51 +02:00
Unknown W. Brackets
7a058180bb Io: Prevent cur/parent dir in listing of root.
See #9344.  Matches tests.
2018-08-12 19:27:26 -07:00
Unknown W. Brackets
048afb6d24 UI: Resolve symlinks when adding things to recent.
See #11131.  This also normalizes paths, captialization, etc. as
necessary.
2018-08-12 08:25:10 -07:00
Unknown W. Brackets
3c698a5ddb Io: Prevent error when file locked for writing.
When reopening with file sharing flags fixed it, we shouldn't set error.
That would cause the open to still fail.
2018-05-08 18:25:15 -07:00
Unknown W. Brackets
f4e8e68c44 Io: Cleanup file not found error codes.
Replay (#10888) caused error to be non zero, which was later translated to
something else, confusingly...
2018-05-06 10:15:05 -07:00
Unknown W. Brackets
224229fc1b Replay: Skip recording virtual disc reads.
Oops.
2018-04-17 07:51:49 -07:00
Unknown W. Brackets
89186d8113 Replay: Initial structure for replay functionality. 2018-04-07 15:36:28 -07:00
Henrik Rydgård
fb798cf6b2 Win32 textdrawer: Fix rare crash affecting Patapon 2 in savedata manager. See 10764. 2018-03-23 10:27:08 +01:00
Henrik Rydgård
f76e5e70a7 Enable FlushInstructionCache on UWP, it's been allowed finally.
Minor warning fixes, UWP buildfix

Retarget UWP project to latest SDK.
2018-03-20 20:30:33 +01:00
Unknown W. Brackets
0e2a586c1b Global: Fix some type comparison/shadow warnings. 2018-02-11 07:03:23 -08:00
Henrik Rydgård
6a1fa728d8 Remove Globals.h 2017-08-31 17:15:22 +02:00
Simonas Kazlauskas
3c3596dbf2 Make the Loader API thread-safe
Since the majority of the code is using ReadAt API already, map this to
a `readp` "syscall" which does not mutate any state about the file
descriptor therefore making it fairly safe multi-threading wise.

This allows to get rid of read-time mutexes in RamCachedFileLoader and
therefore fixes #9803
2017-06-23 17:23:43 +03:00
Unknown W. Brackets
3249d81654 GE Debugger: Buildfix for BSD.
`tm` was not defined, as per jbeich.
2017-06-18 12:17:48 -07:00
Unknown W. Brackets
a223d4e272 Apply a hack to simulate USB created files.
Fixes #9794.  Some homebrew accidentally depend on this PSP firmware bug.
2017-06-12 22:55:50 -07:00
Unknown W. Brackets
7e26c75a27 GE Debugger: Pass filename into dump replay. 2017-06-04 15:11:10 -07:00
Unknown W. Brackets
36069d1446 GE Debugger: Simple framework to load dumps.
This tries to execute them within the context of the emulator as much as
possible, so we don't have weird bugs.  Going with a file type so we can
easily load the dump by opening the file directly.
2017-06-03 15:29:11 -07:00
Henrik Rydgard
792dd1557c Improve StorageFileLoader enough to actually kind of work 2017-03-23 10:02:28 +01:00
Henrik Rydgard
ff2b6b3fca Assorted cleanup, UWP memory map fixes. PSPFlower runs in both 32-bit and 64-bit. 2017-03-23 10:02:28 +01:00
Henrik Rydgård
ad5bf8c6f6 This mutex should not have been made local, thanks @unknownbrackets 2017-03-13 16:14:47 +01:00
Henrik Rydgård
440e72d250 Clean up among the logs. Remove MASTER_LOG. 2017-03-06 13:10:23 +01:00
Henrik Rydgard
d64f367e1d Assorted warning fixes 2017-03-05 10:52:45 +01:00
Henrik Rydgard
26a2d42731 Big mutex overhaul - remove our custom ones, make them non-recursive where possible 2017-02-28 11:40:29 +01:00
Henrik Rydgard
c219ae9e63 Further UWP fixes 2017-02-25 09:57:24 +01:00
Henrik Rydgard
fcbc20f240 Small changes to make Common and Core build under my preliminary UWP setup. 2017-02-24 18:59:41 +01:00