Disclaimer & Thanks
These plugins are still in development and will be for long, as the code is always growing with changes and new features. Surely it needs some fixes and optimizations. Sorry if the code is a bit messy! Both plugins could be mixed in only one, but by now I keep them separated.
Also, they're made to fit Paxanga's workflow & needs. Different users, different needs. So maybe some features are not good for you. But good news, the source is easy to change, and this way you can make it fit your personal needs. Feel free to do so!
These plugins started being a conversion routine from RGB Images to MSX Screen 2 file. But, also, there was already some plugin to load an SC2 Image to Gimp. So I started to add stuff to both. Now then MSX Load plugin can load more MSX formats. And the converter can convert to more formats.
If you find any error, you have some request or you made new features you want to share, feel free to mail us, but we promise NOTHING :) Also, the text on this page can have errors.
So at this point, I need to thank some people that started with some parts of this code, like Leandro Correia, Sepulep, Marcelo Teixeira Silveira and sorry if I forget someone... ^_^!
License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Before start using the plugins...
It's recommended to check the paths embedded at the beginning of the code, as the plugin uses them to find the packer/depackers, the temporal folder for them and some debug stuff, and change these paths for your own ones. Pack/depack features are not mandatory, so if you are not going to use them, you can leave the default paths. Same for the program to Preview the converted file on the convert plugin. I disabled the debug on the code, but you can re-enable it by uncommenting some lines.
File: msx_importer.py / msx_importer_numpy.py
Plugin: MSX LOAD - Import MSX Image Formats
This plugin should show under the Image menu on GIMP. Also, you can load a file directly with File > Open, or even using drag & drop on the GIMP screen. As first plugin wasn't working on GIMP 2.10 due to numpy issues, I made the same plugin deleting all numpy functions and changing them for normal python code.
This Plugin can load MSX images in the following formats:
+ These formats can be compressed. If the plugin finds a .PCK file, it calls the BitBuster decompressor on a custom path. You can change that path and the binary it calls if you use a diferent compressor, like Pletter, for example. It decompress the packed file to a temporal folder. The path of this folder can also be changed on the source code. But, before the .PCK extension it has to maintain the original format extension, for example: IMAGE.SC2.PCK
+ It can also read splitted files on bitmap modes. If you have a big Screen 5 file wich is 26.5 kb, and you split it on small chunks of 8kbs, for example, the plugin can load them, as long as they're named like: IMAGE.S5a, IMAGE.S5b, IMAGE.S5c and so.... And they can use compression too.
+ A palette file can be dragged into an existing image, as long as it's INDEXED type, and this way you can assign the MSX palette to that image.
+ It can read the file (on most of the modes) even without the standard MSX header. The code tries to detect if a standard MSX header is present or not. Should load it the same way with header and without it.
+ The plugin will try to find a palette file for these formats than don't have one embedded. It must be named the same as the data file. For example: MYTILES.PAT will look for a MYTILES.PAL. The same way, on .PAT files, it will try to find the proper .COL file automatically, with the same name (MYTILES.COL on the example before). It's not mandatory. If there's no .COL file it will assign default data. Same for palette, if there is none it will use default MSX1 palette.
File: msx_converter.py
Plugin: MSX SAVE - Convert & Export to MSX Formats
This plugin should show under the Image menu on GIMP and also under File > Save MSX Screen
This Plugin can convert and export non MSX images to the following MSX formats:
This plugin will pop up a menu with different options:
+ You can select the output format. You need to convert any image from RGB to INDEXED palette first on GIMP. If you try to convert from RGB to MSX, it will use the default MSX1 or MSX2 palettes, if they exist on your GIMP palette list. This needs to be improved. I will.
+ For RGB to MSX palette conversion, there's a Quantization option on the plugin menu with several modes.
+ You can save the palette inside the MSX file (if it's standard MSX Screen, SC*) or on a separated file.
+ You can PACK a file using a compressor. Default is BitBuster from Team Bomba and the path must be set on the BBPACK_Path variable on the code. But you can any other.
+ The plugin has an option to split a bitmap file into smaller chunks. From 1 (full normal file) to 4 chunks. They can be packed with the PACK option, but THIS IS NOT IMPLEMENTED YET. But it will.
+ There's an option to pass the output file to a custom script of your own. This way you can do further data process to the file, like custom splits, repacking or anything. You need to set the location path on the dialog box.
+ Of course, you have the option to set the Save Directory and name of the file. Name must be maximum 8 character + the extension (needed). That was in the original code, I plan to change it later.
+ Finally, you can preview the output file after conversion. I use my own Viewer. But you can set the path of the viewer on the code. Warning. I use one made in python so it call python *nameofthe_viewer! If you use a binary you need to change that. Of course, you can view the output file opening it on the same GIMP, using the Load plugin!
Use them wisely to (cross)develop for our beloved MSX system!!