Skip to content

Commit

Permalink
Rename to "siboimg".
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Brown committed Feb 9, 2019
1 parent 282402b commit 3f7b635
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 13 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
CC=gcc

all: psirom
all: siboimg

psirom: argparse/argparse.c psion-rom-extractor.c
$(CC) argparse/argparse.c psion-rom-extractor.c -o psirom
siboimg: argparse/argparse.c siboimg.c
$(CC) argparse/argparse.c siboimg.c -o siboimg

mingw32: argparse/argparse.c psion-rom-extractor.c
i686-w64-mingw32-clang argparse/argparse.c psion-rom-extractor.c -o bin/win32/psirom.exe
mingw32: argparse/argparse.c siboimg.c
i686-w64-mingw32-clang argparse/argparse.c siboimg.c -o bin/win32/siboimg.exe

mingw64: argparse/argparse.c psion-rom-extractor.c
x86_64-w64-mingw32-clang argparse/argparse.c psion-rom-extractor.c -o bin/win64/psirom.exe
mingw64: argparse/argparse.c siboimg.c
x86_64-w64-mingw32-clang argparse/argparse.c siboimg.c -o bin/win64/siboimg.exe
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
# psion-rom-extractor
# siboimg
This is the SIBO Image Extractor, designed to extract files from Psion Solid State Disk images. In future it might also build images for copying/burning to SSDs.

**THIS IS ALPHA-QUALITY SOFTWARE!** It's worked for me, but it might not work for you.

## Build
For Linux, BSD, macOS and other POSIX-compliant systems.
```make```

For Windows you will need MinGW and either gcc or clang. Pre-made binaries can be found in _releases_.

## Usage

```siboimg _image file_```

At the moment the switches don't work so all it does it extract the files to a directory. The directory will be named after the image's embedded name.

## Credits
Thanks to Clive DW Feather for his description of the SIBO Flash filesystem. Thanks to Karl for helping me out.
10 changes: 5 additions & 5 deletions psion-rom-extractor.c → siboimg.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include "argparse/argparse.h"
static const char *const usage[] = {
"psirom [options] [[--] args]",
"psirom [options]",
"siboimg [options] [[--] args]",
"siboimg [options]",
NULL,
};

Expand Down Expand Up @@ -196,7 +196,7 @@ void getfile(int pos, char path[], char *buffer[], const char localpath[], const

printf("Next entry record: 0x%06x\n", next_pos);
if (next_pos > buffer_len) {
printf("psirom: detected pointer too high\n");
printf("siboimg: detected pointer too high\n");
exit(EXIT_FAILURE);
}

Expand Down Expand Up @@ -306,7 +306,7 @@ void walkpath(int pos, char path[], char *buffer[], const char img_name[], const
memcpy(&first_entry_ptr, *buffer + (pos + ENTRY_FIRSTENTRYRECORDPTR_OFFSET), ENTRY_FIRSTENTRYRECORDPTR_LENGTH);
printf("First Entry Pointer: 0x%06x\n", first_entry_ptr);
if(first_entry_ptr > buffer_len) {
printf("psirom: detected pointer too high\n");
printf("siboimg: detected pointer too high\n");
exit(EXIT_FAILURE);
}

Expand All @@ -330,7 +330,7 @@ void walkpath(int pos, char path[], char *buffer[], const char img_name[], const
strcat(localpath, newpath);
if (fsitemexists(localpath)) {
if(!direxists(localpath)) {
printf("psirom: %s: item exists and isn't a folder", localpath);
printf("siboimg: %s: item exists and isn't a folder", localpath);
exit(EXIT_FAILURE);
}
} else {
Expand Down

0 comments on commit 3f7b635

Please sign in to comment.