MIF package v2.1

Page 2/4
1 | | 3 | 4

By ARTRAG

Enlighted (6845)

ARTRAG's picture

26-12-2013, 10:55

What are you using for screen 2/4 conversion ?

Yours looks very good but the optimal converter (almost in mathematical sense) has been implemented by Jannone
Its source is available in google code
http://jannone.org/elesheep/2007/03/msx-screen-conversor-08-...

Have a look for inspiration also at this (in the end I followed his solution in my converter)
http://www.msx.org/downloads/related/graphics/screen-2-conve...

By ARTRAG

Enlighted (6845)

ARTRAG's picture

26-12-2013, 15:40

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

By NYYRIKKI

Enlighted (5923)

NYYRIKKI's picture

26-12-2013, 20:47

Very nice program! Great work!

Louthrax wrote:

If you're on a MSX 1, there's not palette, the loader will be:
10 SCREEN 2
20 COLOR ,,0
30 BLOAD"image.sc2",S
40 A$=INPUT$(1)
(be sure to generate your image using "MSX 1" palette in this case)

Let me know if that works !

It will not work because MSX1 does not support ",S"-parameter on BLOAD. You need to use a custom loader.

By sd_snatcher

Prophet (3505)

sd_snatcher's picture

26-12-2013, 22:43

Quote:

It will not work because MSX1 does not support ",S"-parameter on BLOAD. You need to use a custom loader.

Are you sure? I could swear I used BLOAD,S quite some times on my MSX1 back then...

@Louthrax

Thanks for all your effort to improve this excellent tool more and more! Big smile

By sd_snatcher

Prophet (3505)

sd_snatcher's picture

26-12-2013, 23:24

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.

By NYYRIKKI

Enlighted (5923)

NYYRIKKI's picture

27-12-2013, 00:11

sd_snatcher wrote:
Quote:

It will not work because MSX1 does not support ",S"-parameter on BLOAD. You need to use a custom loader.

Are you sure? I could swear I used BLOAD,S quite some times on my MSX1 back then...

I just tested and it seems you are right... I think I remembered wrong just because most of the MSX1 titles were made for cassette and with cassette the ",S" doesn't work.

By gdx

Enlighted (5512)

gdx's picture

27-12-2013, 02:23

I can't download the Mif package. I get a message "You are not authorized to access this page.".

By Jorito

Mr. Ambassadors (1782)

Jorito's picture

27-12-2013, 13:45

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

By KdL

Paragon (1434)

KdL's picture

28-12-2013, 00:20

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.

By Louthrax

Prophet (2414)

Louthrax's picture

28-12-2013, 03:01

Quote:

What are you using for screen 2/4 conversion ?

Yours looks very good but the optimal converter (almost in mathematical sense) has been implemented by Jannone
Its source is available in google code
http://jannone.org/elesheep/2007/03/msx-screen-conversor-08-...

Have a look for inspiration also at this (in the end I followed his solution in my converter)
http://www.msx.org/downloads/related/graphics/screen-2-conve...

I'm using a simple "brute force" method (here in pseudo-code):

bestdelta = infinite

for col1=0 to 15
    for col2=0 to 15
        find the best 8 pixels block using col1,col2
        compute col1col2_delta for the 8 pixels block computed above
        if col1col2_delta < col1col2_delta
            keep (col1, col2) as best result
        end
    end
end

I realize when typing that this could be optimized to something like:

for col1=0 to 15
    for col2=col1+1 to 15
...

which should make conversion 2x faster.

Anyway, unless there's a bug, the conversion should be the mathematical best one. Had no time to look at Jannone's solution yet, maybe there's something smarter (and faster) than brute force used here.

I compared Jannone's and MIF's results:
Original:

Jannone:

MIF:

The results are quite different. For this test, I'm using a pre-scaled 256x192 image, no error diffusion or dithering. I think that's because MIF and Jannone are not using the same MSX 1 palette. That's a question I might have for MSX 1 video experts : "what are the values of the MSX 1 palette, expressed in 0-255 RGB values ?"

I'm currently using this palette for MSX 1:
0 0 0
0 0 0
73 182 73
109 219 109
73 73 182
146 109 255
182 73 36
73 219 255
219 109 73
255 146 109
219 219 73
219 219 146
36 146 36
182 109 182
219 219 219
255 255 255

You can notice that all values are result of conversion from a 0-7 RGB palette to a 0-255 RGB palette, but maybe the MSX 1 palette has a finer "granularity" ? Please let me know if someone has make studies on the question.

With error diffusion enabled, the results are not so different:
Jannone:

MIF:

(I'm using MIF default 0.80 value for error diffusion).

Last comparison : Adaptive palette + error diffusion:
Jannone:

MIF:

Page 2/4
1 | | 3 | 4