A Python library for working with PlayStation 2 memory card files.
Project description
ps2mc
A Python library for working with PlayStation 2 memory card files.
Installation
pip install ps2mc
Quick Start
Example 1: Use the high-level Browser wrapper
with Browser("my_memory_card.ps2") as browser:
root_dir = browser.list_root_dir()
browser.export("game_name", ".")
Example 2: Subclass Ps2mc for custom parsing
class MemcardReader(Ps2mc):
def read_save_entries(self) -> list[Saka04SaveEntry]:
save_entries: list[Saka04SaveEntry] = list()
root_entries = [e for e in self.entries_in_root if e.is_exists()]
for entry in [e for e in root_entries if e.name.startswith("BISLPM-65530Saka_G")]:
sub_entries = self.lookup_entry_by_name(entry.name)
for sub_entry in sub_entries:
if sub_entry.is_file():
if sub_entry.name == entry.name:
main_save_entry = self.read_data_cluster(sub_entry)
if sub_entry.name == 'head.dat':
save_head_entry = self.read_data_cluster(sub_entry)
if sub_entry.name == 'icon.sys':
sys_icon_entry = self.read_data_cluster(sub_entry)
save_entries.append(Saka04SaveEntry(entry.name, main_save_entry, save_head_entry, sys_icon_entry))
return save_entries
Documentation
Reference
- gothi - icon.sys format
- Martin Akesson - PS2 Icon Format v0.5
- Florian Märkl - mymcplus
- Ross Ridge - PlayStation 2 Memory Card File System
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ps2mc-0.1.1.tar.gz
(9.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
ps2mc-0.1.1-py3-none-any.whl
(11.8 kB
view details)
File details
Details for the file ps2mc-0.1.1.tar.gz.
File metadata
- Download URL: ps2mc-0.1.1.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9de339a785e659c40094dfd639c6b15250c4520a2a29e1c05165210c113fbd99
|
|
| MD5 |
6d54c2b8a339e3fcaf3360c0d7ef9635
|
|
| BLAKE2b-256 |
c2af205732f83a52b3cbdc8fd55736f9ca43a807075710562b45423457d4eddc
|
File details
Details for the file ps2mc-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ps2mc-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9084b02b0810540e8479ef2d430da969606ff5eb465e92a6737941ea2e718097
|
|
| MD5 |
6dc84941267af289553f87bb34d93a66
|
|
| BLAKE2b-256 |
a47a1f7286a2230ff2ab4b4b0960ab81505c31fa0fb462e46f94eac1bb2c20e1
|