$Id$

ps2rd Software Architecture
written by misfire <misfire@xploderfreax.de>

NOTE: This document is far from being complete.


Software Components:

libconfig
---------

ee/libconfig/

The current version of ps2rd uses a PS2 port of libconfig - a simple library for
manipulating structured configuration files - to read and store its
configuration (see config_help.txt for details).

Home of libconfig:
http://www.hyperrealm.com/libconfig/


libcheats
---------

common/libcheats/

Furthermore, ps2rd makes use of the libcheats library to read, manipulate, and
write cheat codes in text format - see cheats_format.txt.


Cheat Engine
------------

ee/engine/

The cheat engine's primary task is to run in the game's background and process
the cheat codes (see code_types.txt for more information).

As the engine is built as an ERL, it can be relocated at any memory address in
user space.


Debugger
--------

ee/debugger/
iop/debugger/

The debugger allows you to hack/debug commercial PS2 games over Ethernet using a
PC-side debugger client.


ELF Loader
----------

ee/elfldr/

When the ELF loader is installed, it replaces the original (evil) LoadExecPS2()
syscall. This component is required by the debugger to work properly.


Boot Loader
-----------

ee/loader/

This is where all the components come together. The loader does the following:
- read configuration from file
- set up EE and IOP (modules, SBV patches, etc.)
- install ERLs (cheat engine, ELF loader, etc.)
- load cheats from text file and pass them to the cheat engine
- start the inserted game


EOF
