From f44f53e57103157ae36185525a256b80b287e205 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Wed, 8 Jun 2022 17:59:41 +0200 Subject: [PATCH] mod: Added support for ULT and 699 files --- plugins/mod/__init__.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/plugins/mod/__init__.py b/plugins/mod/__init__.py index a2f7070b..fcd14d89 100644 --- a/plugins/mod/__init__.py +++ b/plugins/mod/__init__.py @@ -21,7 +21,7 @@ PLUGIN_AUTHOR = 'Philipp Wolfer' PLUGIN_DESCRIPTION = ( 'Support for loading and renaming various tracker files formats ' - '(.mod, .xm, .it, .mptm, .ahx, .mtm, .med, .s3m, .okt). ' + '(.mod, .xm, .it, .mptm, .ahx, .mtm, .med, .s3m, .ult, .699, .okt). ' 'There is limited support for writing the title tag as track name for some ' 'formats.' ) @@ -269,6 +269,28 @@ class S3MFile(ModuleFile): ) +class ULTFile(ModuleFile): + EXTENSIONS = ['.ult'] + NAME = 'ULT' + + # http://www.textfiles.com/programming/FORMATS/ultform.pro + # http://www.textfiles.com/programming/FORMATS/ultform14.pro + _magic = MagicBytes(b'MAS_UTrack_V00') + _static_text_fields = ( + StaticField('title', 15, 32, FieldAccess.READ_WRITE), + ) + + +class Composer669File(ModuleFile): + EXTENSIONS = ['.669'] + NAME = 'Composer 669' + + # http://www.textfiles.com/programming/FORMATS/669-form.pro + _magic = MagicBytes(b'if') + _static_text_fields = ( + StaticField('comment', 2, 108, FieldAccess.READ_WRITE), + ) + class OktalyzerFile(ModuleFile): EXTENSIONS = ['.okt'] @@ -286,4 +308,6 @@ class OktalyzerFile(ModuleFile): register_format(MEDFile) register_format(MTMFile) register_format(S3MFile) +register_format(ULTFile) +register_format(Composer669File) register_format(OktalyzerFile)