MIF package 2.2 released

Page 1/2
| 2

By Louthrax

Paragon (1746)

Louthrax's picture

22-08-2016, 13:57

I've just put online on my website a new version of the MIF package (v2.2).

The main change since v2.1 is the introduction of the new "MIG" format that SofaRun uses for its "snapshots / pictures" viewer. The MIF format (very close from the GIF format but specific to MSX) was fine but a bit slow to browse big (interlaced) MSX 2 pictures.

MIG uses TeamBomba's BitBuster compression, which has an amazingly fast uncompression speed.

The uncompressed data of a MIG file are just sequences of simple operations (write to VRAM, write ot palette, write to registers with mask...) to be performed on the VDP (plus a header specifying the target VDP type). This makes the format quite versatile, with for example, the possibility to load screen 2 images containing sprites. Those images could be created by a TCL script in openMSX (dumping only parts of VRAM that are interesting).

The sources of MIGVIEW.COM are available in the MIF package if you want more informations. I'll try to create a document describing the format in details later. Also note that you can concatenate MIG files, using copy (Windows) or concat (MSX-DOS) commands: the generated file will be "browsable" with joystick or keyboard in MIGVIEW.

I've also updated the small sample snapshots pack of SofaRun to this new format.

Note that the previous SofaRun .SNP format used for snapshots is now dead (should not be a problem as I never released any tool for it :)).

Ah, yes, forgot to mention the crappy side of the MIG format: it's a bit hard to decode on a non-MSX machine, so MIFui can't read it for now (see it as a one-way conversion, and always keep your source images !!).

Login or register to post comments

By Pippo

Champion (285)

Pippo's picture

22-08-2016, 14:18

Wonderful work! Big smile
I have to try it! Big smile
Thank you for this jewel! Big smile Big smile

By KdL

Paragon (1049)

KdL's picture

23-08-2016, 16:50

Hi Louthrax. It would be nice to improve the image conversion screen of 2/4 with a mask of hardware sprites (in a similar way to the screen 11 with palette). Wink

By Louthrax

Paragon (1746)

Louthrax's picture

23-08-2016, 16:54

KdL wrote:

Hi Louthrax. It would be nice to improve the image conversion of screen 2/4 using the hardware sprites like the screen 11 does with palette. Wink

I've been thinking about that for years... Had some algorithms (more or less slow / efficient) in mind, but the MIF format was not well designed for that. The new MIG format is perfect for that purpose, just need to implement things now Smile

I think I'll first try to creatie a TCL script in openMSX that generates "MSX 1 viewable" snapshot of games, including sprites (press a key and you get your "SNAPSHOT.MIG" file !). That script would need to analyze the VDP state to compute which VRAM ranges to save, then do the BitBuster compression... I was a bit hesitating between TCL and a C implementation somewhere in openMSX, but the TCL way could be fun (another occasion to learn something new thanks to MSX Smile).

By syn

Paragon (1644)

syn's picture

20-11-2016, 18:01

I am testing mifui 2.2 at the moment, I think the results are pretty nice.

two things:

1. On my windows 7 pc, the tool hangs/freezes when I try to pick "Brute force" as a RGB2YJK method
2. I was wondering, would it be possible to restrict certain colors for being used in the coversion? Now with "Auto" palette you generate 16 colors depending on the colors used in the image, but I would like to be able to reserve some colors for sprites for example.

*edit* I forgot to mention Avira Free antivirus is giving detecting mifui.exe as a virus (HEUR/APC(cloud)) for both the .exe of 2.1 and 2.2, I trust this is a false positive since another viruscanner (trendmicro housecall) doesnt pick up anything.

By mboixo

Resident (35)

mboixo's picture

18-03-2017, 15:06

Any tutorial on integrating mig or mif for any game?
How to add multiple images for a game?

By Louthrax

Paragon (1746)

Louthrax's picture

18-03-2017, 16:05

Hi mboixo,

You have the sources of the MIF and MIG viewers in the MIF zip file. They are a mix of C and assembly, so that will be tricky to re-use if your game is in pure assembly or in BASIC (you'll have to port the C code to assembly).

You still have the option to export your images to .SCx files, that can be directly used in BASIC.

By mboixo

Resident (35)

mboixo's picture

19-03-2017, 12:37

Thank you for responding Louthrax

I have not explained well, the snapshots where they have to put, in some special folder ?, along with the rom?

Then the example snapshot file from your web page "Metal Gear (1987) (Konami) (JP)" inside includes several images of the covers, instructions, etc ..., how to do? MIF 2.2 only lets you create a MIG / MIF with only one image inside.

By Louthrax

Paragon (1746)

Louthrax's picture

19-03-2017, 16:03

Ah, ok, that will be simpler then: you just have to concatenate the MIG or MIF files together. You can do that on Windows with:

copy /B *.mig all.mig

or on MSX-DOS 2 with:

concat /B *.mig all.mig

I recommend the MIG format as it's faster.

By mboixo

Resident (35)

mboixo's picture

20-03-2017, 19:41

Ok thanks for the information
Only one thing "MIG" where they should be? Together with the rom file or in the Sofarun root folder??

By Louthrax

Paragon (1746)

Louthrax's picture

20-03-2017, 19:52

You can put them where you want, even inside a ZIP file, together with the ROMs. This has changed a bit in the newer versions of SofaRun: previously you displayed them using the "Snapshot" option in the selected game's menu, now they are treated as "normal files", just select them in SofaRun to display them (the file associations can be re-defined in SR.INI).

Page 1/2
| 2
My MSX profile