Skip to content
This repository was archived by the owner on Dec 15, 2025. It is now read-only.

caol64/ps2mc-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ps2mc

⚠️ Maintenance Status Notice

This repository is no longer actively maintained and has been archived (read-only). No new features or enhancements will be added here.

All new development and ongoing maintenance have been moved to the ps2mc-browser project, specifically the core library located at:

👉 ps2mc-core (actively maintained) https://github.com/caol64/ps2mc-browser/tree/main/packages/ps2mc-core


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

License

MIT License

About

A PS2 memory card utilities library.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages