Skip to content

Commit 8a0b038

Browse files
authored
Add files via upload
1 parent a7d16cf commit 8a0b038

File tree

1 file changed

+299
-0
lines changed

1 file changed

+299
-0
lines changed

readme.txt

Lines changed: 299 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,299 @@
1+
------------------
2+
CFSpace
3+
------------------
4+
5+
FAT32 partition contiguous file space manager.
6+
Creating, checking or copying contiguous, not-fragmented files.
7+
Command line utility for Linux and Windows platforms.
8+
9+
Features:
10+
11+
* Checks if file can be created contiguous before
12+
begining to copy the data, by default.
13+
Usefull for limiting the wear of the flash memory on the USB
14+
connected devices.
15+
16+
* Can be used to check if the files on the disk are already
17+
contiguous or not.
18+
Providing contiguous, non-fragmented files can be necessary
19+
for a hardware that has limited capabilities of reading the
20+
data from the FAT32 partitions.
21+
22+
* Can be used to open system disks or disk image files.
23+
(Administrator or root level privileges are usually required,
24+
depending on the disk type, operating system type or version.)
25+
26+
* Can be configured to run only from the actual shell, with
27+
no need of entering the internal micro shell otherwise.
28+
See the '--run_cmd' switch or the 'scr' internal command.
29+
30+
31+
This project makes use of the FatFs library that
32+
enables reading and writing files on the FAT32 disks
33+
(see the Links section for more info).
34+
35+
36+
WARNING!
37+
---------------------
38+
39+
USE AT YOUR OWN RISK!
40+
NO WARRANTY PROVIDED!
41+
BACKUP YOUR DATA FIRST!
42+
43+
44+
Command line interface
45+
-----------------------------
46+
47+
--open_disk DISKNAME
48+
49+
Open disk on the program startup.
50+
DISKNAME can be:
51+
* File name of the FAT32 partition image.
52+
* System name of the partition on the physical HDD/SDD.
53+
Eg. on Linux this may be "/dev/sdd2".
54+
55+
Note that this is an optional switch and the disk can be always
56+
opened with the "open" command from the program's micro shell.
57+
58+
--read_only
59+
60+
Open the disk in read only mode.
61+
This affect both, the "--open_disk" switch
62+
and the "open" command.
63+
64+
--current_dir PATH
65+
66+
Directory on the opened disk to srart in.
67+
Valid only when opening disk on startup with the "--open_disk" switch.
68+
69+
--error_exit
70+
71+
Exit the program when command error occuts.
72+
Usefull when the program is running text script via the "scr" command.
73+
74+
--buff_rw_size NUM
75+
76+
Buffer size for read and write operations. Default is 1MiB.
77+
For debug purposes.
78+
79+
--run_cmd CMD
80+
81+
Run command on the program startup.
82+
Can be used for automation from the shell.
83+
See "scr" command on how to execute commands from text file.
84+
85+
--crc_ul TEXT
86+
87+
Utility.
88+
Generates checksum that goes into the "ul.cfg" file and the ties game entry
89+
with the game split-files. USB Advance and OpenPS2Loader (OPL) format.
90+
This is so that you can manually create and copy files to the disk,
91+
For example, for game title "New Playstation Game", final file
92+
name may endup being: ul.88BC6456.SLUS_123.45.00
93+
94+
95+
--ul_cfg_add TEXT
96+
97+
Utility. Opens "ul.cfg" file in current system direntory,
98+
adds entry froom text eneterd, and exits the program.
99+
The TEXT sould contain game name followed by game id.
100+
Game id can be with or without the punctuation. Either
101+
SLUS12345 or SLUS_123.45 is expected.
102+
Eg. if the TEXT is set to "New Playstation Game SLUS_123.45",
103+
added will be game with name set to "New Playstation Game"
104+
and game-id set to "SLUS_123.45".
105+
Note 1: This is only a command line switch that makes the
106+
program exit after it's done - does not starts the main program.
107+
Note 2: No game files are opened or copied when using this switch.
108+
109+
--no_disk_reinit_w
110+
111+
Do not reinit the disk at the end of all write operations, like
112+
injecting a file using the "inj" command.
113+
114+
--write_sync
115+
116+
For debug purposes.
117+
Performs a sync operation on each buffer write.
118+
119+
120+
Micro shell interface
121+
------------------------------
122+
123+
This is just simple command line interpreter that parses user
124+
input from the STDIN in the console/terminal.
125+
Once started, enter "help" or "list" to get more info.
126+
Enter "help all" to show list and info for all commands.
127+
128+
Commands
129+
--------------------
130+
131+
>>> open <<<
132+
Opens FAT32 disk, partition or disk image.
133+
Use -r switch to open in the read-only mode.
134+
135+
>>> close <<<
136+
Closes current, previously opened disk.
137+
138+
>>> ls <<<
139+
Alias: dir
140+
Shows contents of current directory.
141+
Use '-l' switch to get long listing.
142+
Use '-f' switch to show fragmentation for each file.
143+
144+
>>> cd <<<
145+
Changes current directory.
146+
Use 'cd ..' to switch to the parent directory.
147+
Use 'cd /' to switch to the root directory.
148+
149+
>>> pwd <<<
150+
Shows current directory path.
151+
152+
>>> diskinfo <<<
153+
Alias: dinf
154+
Shows basic disk information.
155+
Size, empty space, label, etc.
156+
157+
>>> exit <<<
158+
Aliases: quit, q
159+
Exits the program and returns to the shell.
160+
161+
>>> dele <<<
162+
Deletes single file or empty-directory.
163+
Will not delete files with read-only flag
164+
or non-empty directories.
165+
Use '-f' switch to force delete of read-only file.
166+
167+
>>> mkfile <<<
168+
Alias: mkf
169+
Creates new file. Empty or with prealocated size.
170+
File is created contiguous, with contents undefined.
171+
Use '-s SIZE' switch to specify its size.
172+
Fails if there is not enough contiguous space available.
173+
174+
>>> extr <<<
175+
Copies file from curently mounted disk to the system.
176+
Syntax: extr <source> <dest>.
177+
178+
179+
>>> inj <<<
180+
Copies file from the system to the currently opened disk.
181+
By default, new file is being created contiguous.
182+
Fails if there is not enouh contiguous space on the disk.
183+
Use '-o' switch to allow file to be created non-contiguous.
184+
Syntax: inj [-o] <source> [<dest>]
185+
If <dest> is omited, new file name is automatically taken from the path in <source>.
186+
If the file name in <dest> is without the path part, creates file in the current directory.
187+
188+
>>> showfrag <<<
189+
Alias: sfr
190+
Shows the file fragmentation.
191+
Syntax: showfrag <file-name>
192+
This command is limited in that it can only tell if the file is fragmented or not.
193+
If retrieved value of is 1 then the file is not fragmented, contiguous.
194+
If the file is fragmented, the value shown is '2+'.
195+
Note: you can also use the 'ls -f' command.
196+
197+
>>> scr <<<
198+
Alias: s
199+
Runs commands from the text script - file on the system.
200+
Syntax: scr [-c] <file-name>
201+
File name is expected to be an ANSI or UTF-8 text file.
202+
Use '-c' switch to continue executing on errors.
203+
This command can be used to automate tasks from the actual shell.
204+
For shell automation, consider command line switches: '--run_cmd'
205+
and '--error_exit'.
206+
If file name is without the extension, auto checks for the TXT file.
207+
208+
>>> show_disks <<<
209+
Alias: sd
210+
Shows system disks or volumes.
211+
Use the 'open' command to open diisk from the list.
212+
For example, to open disk D, use 'open D:' command.
213+
On unix platforms use device names from the /dev directory.
214+
Example: 'open /dev/sdc1'.
215+
216+
>>> ul_inject <<<
217+
Alias: uli
218+
Injects ISO adding entry to the 'ul.cfg' file.
219+
Asks to press Enter key once files allocated, before file copy.
220+
WARNING: does not checks if the same game already exists.
221+
For PS2 games on USB disks.
222+
This is USB Advance format that is also used by OPL.
223+
Use '-b' to do not update the 'ul.cfg' file.
224+
Use '-i' to do set game-id manually.
225+
226+
>>> ul_list <<<
227+
Alias: ull
228+
Lists contents of 'ul.cfg' file in current directory on the disk.
229+
Use '-l' switch to show more info (game-id).
230+
231+
>>> ul_dele <<<
232+
Alias: uld
233+
Delete entry from 'ul.cfg' file in current directory on the disk.
234+
Specify one or more entries as asterissk with number, 1-based.
235+
Eg. 'ul_dele *2' or 'ul_dele *1 *5 *10'
236+
Use '-t' switch for test mode - don't delete or modify any files.
237+
238+
239+
Build Instructions
240+
----------------------------
241+
242+
Unix:
243+
244+
* Download and unpack source code package.
245+
* Enter directory: "projects/01_cli"
246+
* Run the command: "make release"
247+
* On success, the binary file is created under this path:
248+
"projects/01_cli/bin/release/cfspace"
249+
250+
Windows:
251+
252+
Use Microsoft Visual C++ (MSVC) version 2017 and Windows
253+
SDK that comes with it. Possibly can be compiled with
254+
other MSVC versions.
255+
256+
257+
Changelog
258+
-----------------
259+
260+
v1.1.1
261+
* Initial release.
262+
* Builds for Linux x86_64 platforms.
263+
264+
v1.1.2
265+
* Adds Windows support.
266+
267+
v1.3.1
268+
* Added handling of USB Advance (also OpenPS2Loader) format games.
269+
* Added ul.cfg commands: ul_inject, ul_list and ul_dele.
270+
* Minor filesystem handling improvements.
271+
* Previous official release was version 1.1.2.
272+
* Readme file documentation updates.
273+
274+
275+
Links
276+
------------------
277+
278+
Github Project Page
279+
https://github.com/ike9000e/CFSpace
280+
281+
FatFs Library - Generic FAT Filesystem Module
282+
http://elm-chan.org/fsw/ff/00index_e.html
283+
284+
FatFs User Forum
285+
http://elm-chan.org/fsw/ff/bd/
286+
287+
Forum Topic on PS2-HOME Website
288+
https://www.ps2-home.com/forum/viewtopic.php?p=43159
289+
290+
291+
292+
Special Thanks
293+
--------------------
294+
295+
Authors of the FatFs project.
296+
297+
Authors and contributors of the Linux and Ubuntu operating system.
298+
299+

0 commit comments

Comments
 (0)