MFLI-FCB-Convert

Basic and Machine Language

Moderator: Moderators

Post Reply
User avatar
tokra
Vic 20 Scientist
Posts: 1120
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

MFLI-FCB-Convert

Post by tokra »

Name: MFLI-FCB-Convert
Author: tokra
Released: Feb, 24th, 2016
Requirements: PAL VIC-20 +24K RAM expansion

Description: A tool to split-up an MFLI-image into four FCB-images that can be edited with fcbpaint and which can then merged into a full MFLI-image again.

Screenshot:
Image
Image

Download: http://www.tokra.de/vic/mfli-fcb-conver ... onvert.zip


MFLI <-> FCB-Conversion-Suite

Ever since the MFLI-image-format was first presented in the 2011 demo "Yes Vic Can" there have been requests to provide an editor for this format, so that pixel artists could make use of the higher resolution.

Writing an editor from scratch was out of the question for me, because it was just too demanding for my abilities and time. However recently I thought about the idea to make use of the excellent FCBPaint-editor which Daniel Kahlin (tlr) provided back in 2010 for his image format.

Let's compare both formats first:

Code: Select all

MFLI:                                      FCB:
-----                                      ----
208x256 pixels                             168x192 pixels
8x8 blocks for foregound-color             4x8 blocks for foreground-color
256 rastersplits (each vertical line)      192 rastersplits (each vertical line)
    background/border/auxiliary color          background/border/auxiliary color
no inline-splits                           inline-splits possible
So, apart from the resolution itself, FCB is a subset of MFLI's capabilities. Because of that it is possible to cut an MFLI-image into four quadrants and convert each quadrant into an FCB-image, which can then be edited with FCBPaint. When done with editing a quadrant you can merge the four quadrants into an MFLI-image again and then convert this into four FCB-quadrants again if another quadrant needs editing.

Since each quadrant has a large overlap-area with each other quadrant you will always be able to edit a large enough picture of an MFLI-picture not to loose overview of the whole picture.


Usage:
I strongly suggest using this toolchain in an emulated environment like VICE on a PC. The software itself is written in BASIC and will take some time. You can make use of VICE's warp-feature (Alt+W) to speed up conversion considerably - it only takes about a minute this way depening on your PC speed.

You must set VICE to at least 24K memory expansion. I prefer to work with the virtual filesytem (Autostart settings - PRG Autostart mode - Virtual FS), however you may also use the disk-image mode. Either way you start by loading the "boot"-file and executing it. This will load the MFLI-library and offer you five options.

Options 1 to 4 convert four FCB-files ending in filenames ".1",".2",".3" and ".4" into a single MFLI-file. Depending on which option you choose one of the four quadrants will be the "priority" quadrant in the MFLI-picture. Think of it like if you put stamps on top of each other. The chosen option will be the last to be stamped. The small picture shown should help with your choice. To start the conversion just press RETURN. To load and view the resulting file type:

LOAD "result",8,1 (or whichever device number you use instead of 8 )
SYS 24171

Option 5 will cut an MFLI-file into four FCB-files ending in filenames ".1", ".2",".3" and ".4". Each of these files can be edited with FCBPaint. I would suggest editing just ONE of these files, then merging to MFLI and re-cutting those again to four FCB-files as otherwise you will have to take exact care when editing one of the non-priorty quadrants. As always save plenty and often and make copies of your working stages.


Things to note:
While FCBPaint allows for inline-splits these will be completely ignored upon conversion. So make sure not to use them by mistake. You can set initial colors for each rasterline and these are the ones that will be converted.

Regarding color-RAM only the top 4x8 color of a 8x8 block will be used in the converted MFLI-image. So make sure that you set the right foreground-color in the top 4x8 block of an 8x8 block even when you only use that color in the lower half of that 8x8 block.

I hope that an amended version of FCBPaint can be created that does not require the user to watch for these restrictions. But for the time being you have been warned .


Included images:
I have included two MFLI-pictures:

"terminators" - which is a conversion to strict multicolor-MFLI as shown in the "Yes Vic Can"-demo

"dkm" - an MFLI-extension of the DK-picture I did in Minipaint a few months back. I converted this to FCB paint and merged it with 3 blank images to create a MFLI-picture. This was cut up by the converter and then I could expand each partial picture to make this an MFLI-image in the end.

Again, to display MFLI-images:
LOAD "image",8,1 (or whichever device number you use instead of 8 )
SYS 24171


Useful links:
Original FCBPaint 0.5-thread (contains tips on using the editor)

Updated FCBPaint 0.6 and 0.7-thread

Mike's MINIPAINT to FCB-converter (providing a way to update your MINIPAINT-images to MFLI-images)
tlr
Vic 20 Nerd
Posts: 567
Joined: Mon Oct 04, 2004 10:53 am

Re: MFLI-FCB-Convert

Post by tlr »

Nice tool, good work!
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: MFLI-FCB-Convert

Post by Mike »

Nice!

In a similar fashion I once used variants of the two programs "MG IMPORT" and "HHM PAN" on the MAXIGRAFIK disk to draw a picture of Mickey Mouse. I split a raw convert into two overlapping pictures, edited them in MINIPAINT, and then recombined them with this result:

Image

Here are the two parts after the edits in MP for download. Besides the different resolutions, there's no other mismatch between the capabilities of MINI- and MAXIGRAFIK: both employ three global colours and attribute cells with 8x16 pixels.
User avatar
tokra
Vic 20 Scientist
Posts: 1120
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: MFLI-FCB-Convert

Post by tokra »

Last week I created another image using FCBPaint and this toolchain:

Image

Download MFLI-image

To display unpack and on your VIC or in VICE type:
LOAD "donkey",8,1 (or whichever device number you use instead of 8 )
SYS 24171

Notes:
- this image was done in a better aspect ratio. While the last picture used 2 vertical multicolor pixel for 1 horizontal multicolor pixel, this one actually uses 3 pixel high multicolor blocks.
- a screenshot taken in MAME from the original Arcade was taken as template this time (the first image was from the NES-version).
- I tried to convert pixel for pixel, but had to to make some concessions. Pauline stands a few pixels lower than she should and Mario has some light brown pixels and a blue line below his hat. This is due to limitations of the MFLI-format, which does not allow in-line-splits like FCBPaint does.
tonyrocks
Vic 20 Hobbyist
Posts: 118
Joined: Mon Jan 04, 2016 10:17 pm
Website: http://www.tonyrocks.com
Location: Pittsburgh
Occupation: IBM Watson Engr

Re: MFLI-FCB-Convert

Post by tonyrocks »

that is insanely awesome!
User avatar
darkatx
Vic 20 Afficionado
Posts: 470
Joined: Wed Feb 04, 2009 2:17 pm
Location: Canada

Re: MFLI-FCB-Convert

Post by darkatx »

OMG, How did I miss this?!!! :shock:
Learning all the time... :)
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: MFLI-FCB-Convert

Post by Mike »

@tonyrocks, darkatx:

The technique of "square" multi-colour pixels tokra used in this MFLI picture surely was inspired by my Pokémon picture tribute. ;)

There, the MG bitmap is raster-enhanced and employs in-line splits of the global colour registers:

Image
Post Reply