MIF package v2.1

Page 3/4
1 | 2 | | 4

By Louthrax

Prophet (2414)

Louthrax's picture

28-12-2013, 02:40

Quote:

About opening the source: It would be nice to have the file specs published somewhere too. This way your nice file format could be even used for developing games on the MSX.

Yes, this definitvely lacks documentation for now. The assembly sources of the MSX are available in the package though (in the "msxdos" folder). The MIF format is bascially just :

Byte 0 : Screen number + 1 flag for interlaced or not :
    SCREEN_5 = 0
    SCREEN_6 = 1
    SCREEN_7 = 2
    SCREEN_8 = 3
    SCREEN_10 = 4
    SCREEN_12 = 5
    GFX9000_RGB = 6
    GFX9000_PAL = 7
    SCREEN_2 = 8
    SCREEN_3 = 9
    (INTERLACED_FLAG = 16)
Byte 1 : Backround/Border color.
Byte 2 : Palette if needed (32 bytes)
Following is the VRAM content, compressed using LZW on 8 bits boundaries, except for GFX9000 paletted mode (5 bits in this case).

I kept GFX9000 support in the MSXDOS viewer, but the windows tools do not support it anymore (because I just rewrote everything). If there's a demand for it, I might add it back.

Anyway, the MIF format is not the best one for games production (no width or height), but it does the job for just showing pictures.

By Louthrax

Prophet (2414)

Louthrax's picture

28-12-2013, 02:45

ARTRAG wrote:

Just an idea for screen 2 and 4: what about allowing to use the mouse to pan the input image in the screen window to see in real time how the screen 2/4 color bleeding appears?
Sometimes artifacts can be reduced by properly aligning the input image within an ideal grid of columns of 8 pixels width

It's already possible to do that in the current version of the tool : try the H.S. parameter in the MIF & SC? settings (it stands for "Horizontal Scroll").

This can improve things in screen 10 / 12 too. Range is limited from -4 to +4 (which should be enough to fix color bleeding). Borders that appear on the left or right side of the image because of this are set to black (or darkest palette color), which might be an issue (I should add a "background" color setting or something).

By Louthrax

Prophet (2414)

Louthrax's picture

28-12-2013, 02:57

KdL wrote:

Hi Louthrax!
It's very good job!! SCREEN10 is wonderful with the palette correction. Smile
Have you ever thought about using sprites to get such correction on SCREEN2/4 and SCREEN12?
I remember the intro screen of "Penguin Adventure" for example.

Yes, I've been thinking about that for screen 2 & 4, but not for screen 12. That might be interesting too ! I'm just wondering if the sprites are paletted in screen 12 ? (I'm sure they are using a fixed palette in screen 8, but never tested sprites in screen 12 !).

For screen 2 & 4, I've no consistent algorithm to do that for now. Screen 10 palette correction was a bit complex, but not that much. Generating an optimal set of sprites (using OR color combination), with the 8 sprites per line constraints is a magnitude more tricky oO But I'm thinking about that, it's a very interesting math / computation problem Smile By the way, maybe some investigations have already been done in the past ?

By Louthrax

Prophet (2414)

Louthrax's picture

28-12-2013, 03:00

Jorito wrote:

I just added the package to our downloads database; it should be publicly available now!

Great, thanks Jorito !

By KdL

Paragon (1434)

KdL's picture

28-12-2013, 04:26

100 SCREEN12,2:COLOR180,96,180:CLS
110 LINE(0,0)-(255,211):LINE(0,211)-(255,0)
120 A$=CHR$(&B11111110)+CHR$(&B01111111)
130 A$=CHR$(&B01010101)+A$+A$+A$+CHR$(&B10101010):A$=A$+A$+A$+A$
140 FORI=1TO8:GOSUB230
150 PUTSPRITEI-1,(I*16+48,72),I:COLOR=(I,I-1,0,0):NEXTI
160 FORI=9TO16:GOSUB230
170 PUTSPRITEI-1,(I*16-80,88),I-8:NEXTI
180 FORI=17TO24:GOSUB230
190 PUTSPRITEI-1,(I*16-208,104),I-16:NEXTI
200 FORI=25TO32:GOSUB230
210 PUTSPRITEI-1,(I*16-336,120),I-24:NEXTI
220 GOTO 220
230 SPRITE$(I-1)=A$:RETURN

By ARTRAG

Enlighted (6843)

ARTRAG's picture

28-12-2013, 09:50

@Louthrax
I see, nevertheless I think you should consier to add this:
- panning with the mouse
- zooming with the mouse wheel

These feature are very handy in screen 2/4 and screen 10/12 as artifacts depend both on allignment (as you already pointed out) and on details held in 8 pixel column that in turn can change a lot by slightly zooming the input image

By Louthrax

Prophet (2414)

Louthrax's picture

28-12-2013, 09:51

KdL wrote:
100 SCREEN12,2:COLOR180,96,180:CLS
110 LINE(0,0)-(255,211):LINE(0,211)-(255,0)
120 A$=CHR$(&B11111110)+CHR$(&B01111111)
130 A$=CHR$(&B01010101)+A$+A$+A$+CHR$(&B10101010):A$=A$+A$+A$+A$
140 FORI=1TO8:GOSUB230
150 PUTSPRITEI-1,(I*16+48,72),I:COLOR=(I,I-1,0,0):NEXTI
160 FORI=9TO16:GOSUB230
170 PUTSPRITEI-1,(I*16-80,88),I-8:NEXTI
180 FORI=17TO24:GOSUB230
190 PUTSPRITEI-1,(I*16-208,104),I-16:NEXTI
200 FORI=25TO32:GOSUB230
210 PUTSPRITEI-1,(I*16-336,120),I-24:NEXTI
220 GOTO 220
230 SPRITE$(I-1)=A$:RETURN

Thanks Kdl, so we have palette for sprites in screen 12, that's good Smile. Another tricky thing for patching screen 12 with sprites will be interlaced-mode (1 sprite line will always cover 2 "screen-lines" in this case).

By Louthrax

Prophet (2414)

Louthrax's picture

28-12-2013, 10:05

ARTRAG wrote:

@Louthrax
I see, nevertheless I think you should consier to add this:
- panning with the mouse
- zooming with the mouse wheel

These feature are very handy in screen 2/4 and screen 10/12 as artifacts depend both on allignment (as you already pointed out) and on details held in 8 pixel column that in turn can change a lot by slightly zooming the input image

Makes sense. I think I'll put this in a separate settings dialog, so that values can be changed precisely (the main settings dialog is already big enough). This dialog would just produce 3x3 transformation matrix (that could be specified in the command line too). We could go for rotations or any other effects with that.

By ARTRAG

Enlighted (6843)

ARTRAG's picture

28-12-2013, 10:17

Another feature to make your tool 'definitive': allow to disable dithering, it can be useful for batch processing as line command

By Louthrax

Prophet (2414)

Louthrax's picture

03-01-2014, 11:51

ARTRAG wrote:

Another feature to make your tool 'definitive': allow to disable dithering, it can be useful for batch processing as line command

You already have that, it's the "E.D." (error diffusion) setting in the Settings dialog, and -df parameter in the command line version. Set it to 0 and you'll have no dithering at all.

Page 3/4
1 | 2 | | 4