Skip to content

Commit

Permalink
Added ZSO code, sector cache, and ZISO compressor.
Browse files Browse the repository at this point in the history
From PR and closes ps2homebrew#641
  • Loading branch information
JoseAaronLopezGarcia authored and uyjulian committed May 26, 2022
1 parent 2e25d4b commit c34a072
Show file tree
Hide file tree
Showing 34 changed files with 1,896 additions and 86 deletions.
2 changes: 2 additions & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
./modules/network/lwnbdsvr/nbd-protocol.h
./modules/isofs/lz4.c
./modules/isofs/lz4.h
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ endif
endif

FRONTEND_OBJS = pad.o fntsys.o renderman.o menusys.o OSDHistory.o system.o lang.o lang_internal.o config.o hdd.o dialogs.o \
dia.o ioman.o texcache.o themes.o supportbase.o bdmsupport.o ethsupport.o hddsupport.o \
dia.o ioman.o texcache.o themes.o supportbase.o bdmsupport.o ethsupport.o hddsupport.o zso.o lz4.o \
appsupport.o gui.o guigame.o textures.o opl.o atlas.o nbns.o httpclient.o gsm.o cheatman.o sound.o ps2cnf.o

IOP_OBJS = iomanx.o filexio.o ps2fs.o usbd.o bdmevent.o \
Expand Down
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Open PS2 Loader (OPL) is a 100% Open source game and application loader for
the PS2 and PS3 units. It supports three categories of devices: USB mass
storage devices, SMB shares and the PlayStation 2 HDD unit. USB devices and
SMB shares support USBExtreme and \*.ISO formats while PS2 HDD supports HDLoader
format. It's now the most compatible homebrew loader.
format, all devices also support ZSO format (compressed ISO). It's now the most compatible homebrew loader.

OPL developed continuously - anyone can contribute improvements to
the project due to its open-source nature.
Expand Down Expand Up @@ -219,6 +219,37 @@ Not supported.
</p>
</details>

<details>
<summary> <b> ZSO Format </b> </summary>
<p>

As of version 1.2.0, compressed ISO files in ZSO format is supported by OPL.

To handle ZSO files, a python script (ziso.py) is included in the pc folder of this repository.
It requires Python 3 and the LZ4 library:

```sh
pip install lz4
```

To compress an ISO file to ZSO:

```sh
python ziso.py -c 2 "input.iso" "output.zso"
```

To decompress a ZSO back to the original ISO:

```sh
python ziso.py -c 0 "input.zso" "output.iso"
```

You can copy ZSO files to the same folder as your ISOs and they will be detected by OPL.
To install onto internal HDD, you can use the latest version of HDL-Dump.

</p>
</details>

<details>
<summary> <b> PS3 BC </b> </summary>
<p>
Expand Down
3 changes: 3 additions & 0 deletions include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ enum CONFIG_INDEX {
#define CONFIG_OPL_HDD_MODE "hdd_mode"
#define CONFIG_OPL_ETH_MODE "eth_mode"
#define CONFIG_OPL_APP_MODE "app_mode"
#define CONFIG_OPL_BDM_CACHE "bdm_cache"
#define CONFIG_OPL_HDD_CACHE "hdd_cache"
#define CONFIG_OPL_SMB_CACHE "smb_cache"
#define CONFIG_OPL_ENABLE_ILINK "enable_ilink"
#define CONFIG_OPL_ENABLE_MX4SIO "enable_mx4sio"
#define CONFIG_OPL_SWAP_SEL_BUTTON "swap_select_btn"
Expand Down
2 changes: 1 addition & 1 deletion include/dia.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct UIItem
struct
{
const char *text;
int stringId; // if zero, the text is used
int stringId; // if negative, the text is used
} label;

struct
Expand Down
3 changes: 3 additions & 0 deletions include/dialogs.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ enum UI_ITEMS {
CFG_HDDMODE,
CFG_ETHMODE,
CFG_APPMODE,
CFG_BDMCACHE,
CFG_HDDCACHE,
CFG_SMBCACHE,
CFG_ENABLEILK,
CFG_ENABLEMX4SIO,
CFG_LASTPLAYED,
Expand Down
3 changes: 3 additions & 0 deletions include/opl.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ extern int gBDMStartMode;
extern int gHDDStartMode;
extern int gETHStartMode;
extern int gAPPStartMode;
extern int bdmCacheSize;
extern int hddCacheSize;
extern int smbCacheSize;

extern int gEnableILK;
extern int gEnableMX4SIO;
Expand Down
2 changes: 1 addition & 1 deletion modules/iopcore/cdvdman/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
IOP_OBJS = cdvdman.o ioops.o ncmd.o scmd.o searchfile.o streaming.o ioplib_util.o smsutils.o imports.o exports.o
IOP_OBJS = cdvdman.o ioops.o ncmd.o scmd.o searchfile.o streaming.o ioplib_util.o smsutils.o imports.o exports.o ../../isofs/zso.o ../../isofs/lz4.o
USE_DEV9 ?= 0

ifeq ($(USE_HDD),1)
Expand Down
Loading

0 comments on commit c34a072

Please sign in to comment.