From d3ab13be35b536dee094e98fb2cae22f49b5b789 Mon Sep 17 00:00:00 2001 From: tmpz23 <28760271+tmpz23@users.noreply.github.com> Date: Fri, 15 Apr 2022 23:57:43 +0200 Subject: [PATCH] Create README.md --- doltool/README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 doltool/README.md diff --git a/doltool/README.md b/doltool/README.md new file mode 100644 index 0000000..3dde5a2 --- /dev/null +++ b/doltool/README.md @@ -0,0 +1,38 @@ +# doltool.py +**Tests for --patch-action-replay command has to be done so this command is experimental for now.** + +Python3 script for manipuling dol file format. This tool can stats with all informations from dol header and patch dol .text and .data using a list of write Action Replay code in an formated .ini file. MIT License. + +## User manual +Translate a virtual address into a dol offset if this was originaly mapped from data or text. virtual_address has to be in hexadecimal: 80003000 +``` +doltool.py --virtual2image virtual_address +``` + +Translate a dol offset to a virtual address mapped from data or text. dol_offset has to be in hexadecimal: 2000 +``` +doltool.py --image2virtual dol_offset +``` + +Extract a section_index between 0 to 17 from the dol file **source.dol** with the name _source.dol\_sectiontypeN_. sectiontype = data or text and N is the index from 0 to 17. +``` +doltool.py --extract source.dol section_index +``` + +Print stats about the dol file. This stats contains informations about full header information formated (with sections used or not), empty spaces informations splited .bss and entry point. +``` +doltool.py --stats source.dol +``` + +**experimental** Patch the dol data and text section using an action_replay.ini file containing write instructions (02/04 implemented yet). If the virtual address of the ARCode doesn't match existing mapped data or text sections it raise an Exception. +``` +doltool.py --patch-action-replay source.dol action_replay_list.ini +``` + +## Action Replay ini file format +All ARCodes present in the ini will be enabled without taking care of \[ActionReplay_Enabled\] section +Raise an Exception if lines are in invalid format: +* empty lines are removed +* lines beginning with $ are considered as comments and are removed +* lines beginning with \[ are considered as comments and are removed +* others lines have to be in format: "0AXXXXXX XXXXXXXX" with (A=2 or A=4) and X in \[0-9a-fA-F\]