Commit graph

103 commits

Author SHA1 Message Date
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
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
Henrik Rydgard
792dd1557c Improve StorageFileLoader enough to actually kind of work 2017-03-23 10:02:28 +01:00
Henrik Rydgard
d64f367e1d Assorted warning fixes 2017-03-05 10:52:45 +01:00
Unknown W. Brackets
5fcf6ee012 Provide clearer errors for invalid ISOs. 2016-06-04 22:10:47 -07:00
Henrik Rydgard
d4e432dadd Fix issue with lazy loading directory entries. Fixes #8613. 2016-03-06 14:28:14 +01:00
Henrik Rydgard
082d839965 Fix minor issues in ISOFileSystem 2016-03-06 14:28:10 +01:00
Henrik Rydgard
cef0a6311d ISOFileSystem: Remove the "restrictTree" functionality which is now obsolete with lazy directory loading. 2016-02-29 01:13:57 +01:00
Henrik Rydgard
6f9755d498 ISOFileSystem: Lazily load directory information as needed. Should speed up game icon loading a bit. 2016-02-28 12:02:01 +01:00
Henrik Rydgard
0b95c4bbd1 ISOFileSystem: Move the level into the tree nodes 2016-02-28 11:51:15 +01:00
Henrik Rydgard
afc8736b9a ISOFileSystem: Move the startsector and dirsize information into the tree nodes 2016-02-28 11:46:21 +01:00
Henrik Rydgard
0458c7a590 ISOFileSystem coding style cleanup to reduce future diffs 2016-02-28 11:39:57 +01:00
Henrik Rydgard
35b6c7341b Fix a bunch of memory leaks, after enabling file+line-number memory leak tracking for the MS Debug CRT.
Few of these were serious, most were on-exit, but good to have a cleaner memory report after running.
2016-02-10 15:36:10 +01:00
latot
53ac6d98d8 Little things
back 1

other little change, join 2 in 1
2016-01-09 20:44:02 -03:00
Unknown W. Brackets
7b921d3bb7 Avoid crash when savestate is for different ISO. 2015-12-24 14:31:23 -08:00
Henrik Rydgård
96c4fecccc Merge pull request #7952 from KentuckyCompass/isofilesystem_map
Make ISO filesystem case sensitive and add a few optimizations
2015-09-18 22:31:37 +02:00
KentuckyCompass
8c72cb17b1 remove the unordered_map from ISOFileSystem 2015-09-12 21:12:11 -07:00
Henrik Rydgård
1e109a3b27 Add unittest for ParseLBN. Seems we already parse correctly.
See #7960
2015-09-12 11:21:54 +02:00
KentuckyCompass
c7d24407ee tests show PSP doesn't tolerate extra /s at the end in an ISO 2015-09-07 18:56:18 -07:00
KentuckyCompass
4f0ec690a7 Try to fix my whitespace changes 2015-09-07 18:52:17 -07:00
KentuckyCompass
aed469ef9a Advance a pathLength variable instead of calling .erase() in GetFromPath 2015-09-07 18:43:10 -07:00
KentuckyCompass
3f36b476ad Add an unordered_map to TreeEntry for faster lookup 2015-09-07 17:39:17 -07:00
KentuckyCompass
481eac7184 more spaces around operators for readability 2015-09-07 16:44:34 -07:00
KentuckyCompass
fe9055c98e make some things const 2015-09-07 16:42:57 -07:00
KentuckyCompass
32bea0c0e3 Don't copy each name in a loop 2015-09-07 16:36:40 -07:00
KentuckyCompass
8fb9403735 spacing and readability: add spaces around ==, etc 2015-09-07 16:35:23 -07:00
KentuckyCompass
b55015992c std::string comparison can be faster than strcmp 2015-09-07 16:31:37 -07:00
KentuckyCompass
7dcb4c9df7 Move a loop constant substr call out of a for loop 2015-09-07 16:29:46 -07:00
KentuckyCompass
766735b9b1 Tests show PSP is case sensitive for ISO, so skip tolower() 2015-09-07 14:07:08 -07:00
Unknown W. Brackets
57f40589b2 Fix reads starting outside of files on isos. 2015-01-09 18:34:41 -08:00
Unknown W. Brackets
1cefac6473 Clean up some different clamping.
Could be cleaned up more but at least this is less weird.
2015-01-09 15:59:39 -08:00
Unknown W. Brackets
52288f5905 Report any attempt to read a negative size.
If this should return an error, that should be handled in sceIo.
2015-01-09 15:50:06 -08:00
Unknown W. Brackets
8f3a8fd233 Very rough approximation of UMD seek delays. 2014-12-26 01:15:18 -08:00
Unknown W. Brackets
d6a113809b Add basic infrastructure to time io better.
This allows the filesystems to more accurately control timing.
But they're not actually doing it yet (same timing as before.)
2014-12-26 01:15:17 -08:00
Unknown W. Brackets
c085b9c082 Don't try to read negative file sizes. 2014-11-06 08:45:33 -08:00
Unknown W. Brackets
9c5ad44000 Add an interface to read multiple blocks at once. 2014-11-02 19:54:13 -08:00
Henrik Rydgard
8146ff85f3 umd0 solution: Add "OnlyEntireISOFileSystem"
Wraps around an ISOFileSystem, redirecting all the filenames to "" to
achieve the desired effect (should fix Bleach Soul Carnival 2 without resorting
to CPkmn's hack from #6638)

Probably breaks savestates as-is...
2014-07-27 23:42:46 +02:00
Unknown W. Brackets
bc7bc87941 The total size of umd0: is in blocks.
Therefore sceIoLseek(umd0:, 0, 2) should return the number of blocks, not
the number of bytes, in the iso.

Looks like this may help Zero no Kiseki.
2014-01-11 08:34:04 -08:00
Henrik Rydgård
00c32ddadb Mostly get rid of including "Globals.h" 2013-12-30 10:17:11 +01:00
Henrik Rydgård
79ff2f0ba8 Start untangling our include mess a little. 2013-12-29 23:34:45 +01:00
Unknown W. Brackets
0bf1ef5773 Improve sceIoGetDevType() return values.
At least for block/file devices.  Can't find a way to get an alias.
2013-12-27 08:04:00 -08:00
Unknown W. Brackets
23971e9900 Implement ioctl command 0x01020002. 2013-12-27 08:03:59 -08:00
Unknown W. Brackets
dbf86187e3 Add Ioctl() to IFileSystem, cleaner. 2013-12-27 08:03:59 -08:00
Henrik Rydgard
ab6bdfa84d Workaround for a weird I/O issue 2013-11-23 12:49:32 +01:00
Unknown W. Brackets
ade4f76ac1 Don't try to load bogus isos, carnage awaits. 2013-10-05 11:12:52 -07:00
Unknown W. Brackets
50e9e45d65 Check version in each DoState() func.
They bail on PointerWrap error or bad version.
2013-09-14 20:23:03 -07:00
Henrik Rydgard
8c88dff5a4 More log categories, use them (and existing ones). Improve log config. 2013-09-07 22:02:55 +02:00
Unknown W. Brackets
7349de55d1 Fix some initialization/sprintf warnings. 2013-09-01 01:15:07 -07:00
CPkmn
5729523d9c ISOFileSystem support for umd0:umd0
Allows Bleach: Soul Carnival 2 to find what it's looking for in its boot process (umd0:umd0). The game is still stuck in a blackscreen, but the boot process seems better than before (judging from the logs).

Prior to requesting umd0:umd0 the log is interesting. This is the second game I've seen waiting within a callback, and having something other than hleDelayResultFinish waking up an HLE-blocked thread.
2013-08-02 04:28:01 -07:00
Unknown W. Brackets
32de51fdf7 Use u32_be where appropriate as well. 2013-07-28 21:04:19 -07:00