From 0013f6c0a45acfdaafd04ad913f6570fec555a1a Mon Sep 17 00:00:00 2001 From: Lazorne Date: Wed, 14 Feb 2024 12:51:47 +0100 Subject: [PATCH] compression --- .../wiki_development/functions/compression.md | 58 ++++++++++++++++--- ...add-splashes.md => easter-egg-splashes.md} | 4 +- wiki-rtd/mkdocs.yml | 3 +- 3 files changed, 55 insertions(+), 10 deletions(-) rename wiki-rtd/docs/wiki_development/functions/{add-splashes.md => easter-egg-splashes.md} (92%) diff --git a/wiki-rtd/docs/wiki_development/functions/compression.md b/wiki-rtd/docs/wiki_development/functions/compression.md index b67111f..9c64b9e 100644 --- a/wiki-rtd/docs/wiki_development/functions/compression.md +++ b/wiki-rtd/docs/wiki_development/functions/compression.md @@ -1,9 +1,51 @@ # Compress games -## Compression function +## Compression shell script -The function is called `/RetroDECK/functions/compression.sh` +The script is called `/RetroDECK/functions/compression.sh` + +With in the script there are several functions. + +### compress_game() + +Description: +``` + # Function for compressing one or more files to .chd format + # USAGE: compress_game $format $full_path_to_input_file +``` + +### find_compatible_compression_format() + + +Description: +``` + # This function will determine what compression format, if any, the file and system are compatible with from the compression_targets.cfg + # USAGE: find_compatible_compression_format "$file" +``` + +### validate_for_chd() + +Description: +``` + # Function for validating chd compression candidates, and compresses if validation passes. Supports .cue, .iso and .gdi formats ONLY + # USAGE: validate_for_chd $input_file +``` + + +### cli_compress_single_game() + +Description: +``` + # This function will compress a single file passed from the CLI arguments + # USAGE: cli_compress_single_game $full_file_path +``` + +### cli_compress_all_games() +Description: +``` + # This function will compress a all games passed from the CLI arguments +``` ## Compression targets reference list @@ -12,10 +54,12 @@ The reference list is located under: `/RetroDECK/emu-configs/defaults/retrodeck/reference_lists/compression_targets.cfg` -The config is populated with compression formats with within [] and what es-de folders that are targeted for the format compression. +The config is populated with compression formats with within `[]` and what es-de folders that are targeted for the format compression. Each system can only have one format. -Each new system has to be on a new line under it's compression format +Each new system has to be on a new line under it's compression format. + +This is used by the `find_compatible_compression_format()` function above. ### Example @@ -27,9 +71,9 @@ gc [zip] atari2600 -- 3do and amigcd32 is converted to chd -- gc is conrverted to rvz -- atari2600 is converted to zip +- 3do and amigcd32 is compressed to chd +- gc is compressed to rvz +- atari2600 is compressed to zip ## How to add new system to compress diff --git a/wiki-rtd/docs/wiki_development/functions/add-splashes.md b/wiki-rtd/docs/wiki_development/functions/easter-egg-splashes.md similarity index 92% rename from wiki-rtd/docs/wiki_development/functions/add-splashes.md rename to wiki-rtd/docs/wiki_development/functions/easter-egg-splashes.md index 97cc534..af7da55 100644 --- a/wiki-rtd/docs/wiki_development/functions/add-splashes.md +++ b/wiki-rtd/docs/wiki_development/functions/easter-egg-splashes.md @@ -12,9 +12,9 @@ This is used at all times unless it is being overridden by the Easter Egg functi ## Easter Egg function -The function is part of the `/RetroDECK/functions/functions.sh` +The function is part of the `/RetroDECK/functions/functions.sh` shell script. -The Easter Egg function looks in the reference list and overrides the bootlogo with one of the .svg files from the referense list. +The `easter_eggs()` function looks in the reference list and overrides the bootlogo with one of the .svg files from the referense list. Decription of the function: diff --git a/wiki-rtd/mkdocs.yml b/wiki-rtd/mkdocs.yml index 5b6504f..02f78e4 100644 --- a/wiki-rtd/mkdocs.yml +++ b/wiki-rtd/mkdocs.yml @@ -273,4 +273,5 @@ nav: - CLI Guide: wiki_development/general/cli-guide.md - Development Notes: wiki_development/general/general-development.md - Functions: - - Add Boot Splashes: wiki_development/functions/add-splashes.md + - Easter Egg Splashes: wiki_development/functions/easter-egg-splashes.md + - Compression: wiki_development/functions/compression.md