Commit Graph

16 Commits

Author SHA1 Message Date
Stefanos Kornilios Mitsis Poiitidis 34b495baa7
Merge pull request #1098 from reicast/pr/1092
fix gdi track parsing in unix #1092
2018-04-19 20:51:13 +02:00
Stefanos Kornilios Mitsis Poiitidis 90e901f4a3 gdi: Normalize paths, add test gdi files 2018-04-18 22:28:05 +02:00
Stefanos Kornilios Mitsis Poiitidis 4300951b51 gdi: Cleanup path code, use C++ strings 2018-04-11 11:40:15 +02:00
TwistedUmbrella fb418d568c Don't skip whitespace when reading filename
https://stackoverflow.com/a/6774866
2018-04-02 03:51:38 -04:00
TwistedUmbrella 052c5c1cb3 Fix for Windows missing definition of ssize_t 2018-04-02 02:54:30 -04:00
i30817 3fdd7f50ea
fix gdi track parsing in unixx
Same problem as https://github.com/libretro/reicast-emulator/pull/24

in unix that iteration would not work if the path of the original .gdi file (where we are finding the 'parent directory') was:

1. not existent, ie a gdi on the same directory as the current. It was iterating until the index 3 and stop there. Disaster strikes later ofc, if the first characters weren't C:\ or other thing like that.
2. in a relative subdirectory that is 'small enough' ie: a/crazy-taxi.gdi. In this case the last '/' wouldn't be found, the derived string would be 'crazy-taxi.gdi' and the file not found ofc.

Anyway, this can be solved simply by searching the whole string and using a signed integer. It will go up to -1, stop iteration and increase to 0 on the len++.

Dunno if using relative subdirectories for the tracks on *other* platforms works because of the path separator being different from what's inside the gdi but with this code fixed it works on linux with / at least.
2018-03-25 18:53:18 +01:00
Jan Holthuis 1868f1e91f imgread/gdi.cpp: Fix buffer overflow in load_gdi() 2016-02-22 18:55:34 +01:00
Jan Holthuis b106efde5f imgread/common.cpp: Add buffer size checks in case buffer size are changed later 2016-02-22 18:55:33 +01:00
~skmp 39e1439b93 imgread/common: On read error, print the sector that failed 2015-07-29 00:41:14 +02:00
Stefanos Kornilios Mitsis Poiitidis 3ca3b1220d http support for cdi & gdi, updated based gdipsr
- Fix coreio fsize
- Fix coreio fopen to seek to 0
- Fix coreio/http to smart-escape urls
-  For urls that include \ or % in the filenames, you have to pass them
   escaped
- Update gdi parser to use (mostly) streamstream. That code is horrible
  and should be rewritten
- coreio core is hacky and horrible at places as well
- Update imgreader to use coreio
- Update cdi parser + driver to use coreio
2015-01-09 15:50:07 +01:00
Stefanos Kornilios Mitsis Poiitidis d59197f843 gdtool: better command line, stdin lists, cleanup
Also, imgread const filenames and such
2014-06-13 18:41:48 +03:00
Stefanos Kornilios Mitsis Poiitidis 2bd1c4c976 First idea for a gdrom tool 2014-05-26 15:35:41 +03:00
MrPsyMan ecbe828cfa Previous commit was one byte short. 2014-03-15 13:51:16 +02:00
MrPsyMan 6b4deb4b16 Implemented a very basic form of GD-ROM Sense. Only disc swap related Sense currently works. Added some very basic disc swap handling on x86/Windows (press "0">Cancel to remove disc, then "0" again and select the new disc).
Notes:
Disc swapping should work on .gdi files (probably .chd files too).
Swapping with .cdi files is not currently supported because we currently create inaccurate TOC for them.
Only x86/Windows has a disc swap handler right now (ie: you can't swap on Android).
2014-03-15 13:42:17 +02:00
Stefanos Kornilios Mitsis Poiitidis f5d29677b3 Merge branch 'androidui'
Conflicts:
	core/hw/pvr/spg.cpp
	core/hw/sh4/interpr/sh4_interpreter.cpp
	reicast/android/src/com/reicast/emulator/MainActivity.java
2013-12-28 22:28:50 +01:00
Stefanos Kornilios Mitsis Poiitidis 7ef9de3cae Moving code around, cleanups 2013-12-28 22:20:08 +01:00