Commit graph

389 commits

Author SHA1 Message Date
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
f63daf8185 Io: Change async thread priority if running.
Really thought I'd already done this, must've made a mistake...
Fixes #12400.
2019-10-20 10:26:37 -07:00
Unknown W. Brackets
4065fae262 Io: Destroy async threads on reset.
Oops, this left us in a different state on exit.
2019-10-20 10:25:57 -07:00
Henrik Rydgård
eb2109a0f1
Merge pull request #12328 from unknownbrackets/io-async
Use PSP threads for async IO
2019-10-07 21:50:57 +02:00
Unknown W. Brackets
cc6115d875 Io: Join loading/manager threads more explicitly. 2019-09-28 11:18:42 -07:00
Unknown W. Brackets
c53acfcac9 Io: Correct result on async file not found. 2019-09-01 09:43:01 -07:00
Unknown W. Brackets
c26becb545 Io: Wait async thread on IO completion.
So it doesn't exit early.
2019-09-01 09:32:58 -07:00
Unknown W. Brackets
419ac33dcd Io: Cleanup some logging. 2019-09-01 09:18:27 -07:00
Unknown W. Brackets
8e77db2b72 Io: Check callbacks in sceIoWaitAsyncCB(). 2019-09-01 09:11:09 -07:00
Unknown W. Brackets
e817d79c39 Io: Handle open async in a thread. 2019-09-01 08:16:06 -07:00
Unknown W. Brackets
2bfcba0623 Io: Use async for read/write/seek/ioctl.
This should properly respect the thread priority setting and improve IO
timing.  Improves IO thread timing tests.
2019-09-01 08:16:05 -07:00
Unknown W. Brackets
4578381f7a Io: Prepare HLE thread handling for async. 2019-09-01 08:16:05 -07:00
Unknown W. Brackets
5fec5c90d8 Io: Cleanup some error handling. 2019-09-01 08:16:05 -07:00
Unknown W. Brackets
f1037248f1 Io: Store sceIoChangeAsyncPriority value.
Also some prep for async threaded IO.
2019-09-01 08:16:05 -07:00
Henrik Rydgard
3d114c5bca Compat: Force realistic UMD timing for F1 2006. Fixes #9193 but not the game, since there's also #11177. 2019-02-06 10:45:12 +01:00
Unknown W. Brackets
ac6106af03 Io: Ensure sign extension for error codes.
The ternary `cond ? EnumValue : IntValue` was not sign extending
consistently across compilers, but we actually want it to always sign
extend in either case.
2018-12-01 09:43:02 -08:00
Unknown W. Brackets
b4496f1975 Core: Move config enums to separate file.
These are a bit strewn about and there are constants that aren't
consistently used, which just adds confusion.
2018-06-23 10:59:18 -07:00
Unknown W. Brackets
e313a9bf6c Debugger: Lock startup/shutdown for threadsafety.
Otherwise things can get freed while we're trying to inspect them.
2018-06-06 05:58:49 -07:00
Henrik Rydgård
d7770307f3 Change some log levels to verbose 2018-05-27 21:53:27 +02: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
Henrik Rydgård
e488227398 Just some log cleanup 2017-12-15 16:33:49 +01:00
Henrik Rydgård
89f0ffc1bc Just reduce some log levels 2017-11-25 12:13:27 +01:00
Unknown W. Brackets
82beb726fc GE Debugger: Record init state and display buf.
Some things are now visible, but still drawing wrong...
2017-06-04 10:38:52 -07:00
Henrik Rydgard
50be4e72b2 Get rid of our own silly reimplementation of std::thread 2017-02-27 20:51:36 +01:00
Henrik Rydgard
b0942cf40f Implement sceIoCreate flag O_EXCL. Should fix #9322 2017-02-19 10:05:17 +01:00
Henrik Rydgard
5df4bac6d2 Delete some left behind unused code 2017-01-25 10:05:39 +01:00
Unknown W. Brackets
c9f5cc6bad Fix a type comparison warning. 2016-09-24 14:38:11 -07:00
Unknown W. Brackets
5a797a08f7 Io: Do not delay on file seek.
This doesn't seem to reschedule, must've measured wrong in #939.

Fixes #8749.
2016-08-27 14:18:59 -07:00
Unknown W. Brackets
980d4194c0 Io: Add a config setting for memstick status. 2016-08-05 21:27:53 -07:00
Unknown W. Brackets
bf7a020c6a Io: Notify callbacks on memstick insert/remove. 2016-08-05 21:05:48 -07:00
Unknown W. Brackets
9e488e8be4 Io: Correct some memstick devctl accuracy issues.
This makes it pass the right values in a few more cases, and unregister
callbacks properly.  Also handles duplicate callbacks.
2016-08-05 20:42:58 -07:00
Unknown W. Brackets
db12337b39 Add basic kernel mode file func entries. 2016-08-04 09:46:29 -07:00
Unknown W. Brackets
e78a389ecc Move sceIo kernel tables to sceIo. 2016-08-04 09:46:29 -07:00
Henrik Rydgard
40549b14fd Error code cleanup 2016-07-24 21:22:26 +02:00
Henrik Rydgard
745081cc4e Return errors when trying to close file with pending operations. May help #6357. 2016-07-24 16:03:34 +02:00
Henrik Rydgard
082d839965 Fix minor issues in ISOFileSystem 2016-03-06 14:28:10 +01:00
Unknown W. Brackets
65a5c92c7e Io: Change some logging flags.
Not used yet, just prep work.
2016-01-24 22:52:19 -08:00
Unknown W. Brackets
a8d918b50a Automatically mount exdata/ for remasters.
Using memstick/exdata/GAMEID/.
2015-12-28 14:13:05 -08:00
Unknown W. Brackets
3687be42bc Jit: Invalidate blocks after IO reads.
Fixes #7617.
2015-12-27 21:58:29 -08:00
Unknown W. Brackets
e0f85a9c6b Native merge part 1: skip native/ in includes. 2015-09-06 12:19:33 -07:00
Henrik Rydgard
00094e0fcc More work on savedata UI. 2015-06-12 11:40:50 +02:00
Unknown W. Brackets
d323dd472f Account for io sync time in io statistics. 2015-05-27 20:02:09 -07:00
Henrik Rydgard
26624709f7 Hook up the frame profiler to a few measurements 2015-05-24 23:45:36 +02:00
Henrik Rydgård
bc490e60ab Merge pull request #7661 from lioncash/false
sceIo: Remove always false condition
2015-04-06 23:29:52 +02:00
Lioncash
1ac81b5014 sceIo: Remove always false condition 2015-04-06 10:05:44 -04:00
Unknown W. Brackets
e2ecd1eabd Add memchecks for ReadStruct/WriteStruct. 2015-04-05 18:09:35 -07:00
Unknown W. Brackets
fcf0518223 Update all the HLE tables with arg and ret info. 2015-03-22 20:51:55 -07:00
Unknown W. Brackets
3d29b0d278 Fix typo breaking old savestates. 2014-12-29 08:53:19 -08:00
Unknown W. Brackets
93fee10899 Typo. 2014-12-27 09:12:50 -08:00
Unknown W. Brackets
523a75e2bb Fix another stupid mistake. 2014-12-26 08:03:55 -08:00