MMM rebooted

Page 4/4
1 | 2 | 3 |

By inchl

Resident (33)

inchl's picture

13-08-2020, 16:07

The screen convertor of Louthrax generates static images using a fixed color palette. It does it very well!
However, if you still would like to have more colors then screenspliting techniques are required. Note that you cannot disable interrupts during the display of your pictures. Especially during disk i/o you are limited to use images with a fixed palette.

To answer your question: the following post is very interesting and explains it very well.
https://www.msx.org/forum/development/msx-development/idea-m...

The game engine of MMM is using 58 screensplits in which it updates the palette of two color indexes. One screensplit is just before the critical scanline 212 to enable the overscan effect.

By Manel46

Hero (591)

Manel46's picture

13-08-2020, 17:15

Thank you. Yes, I tried this, in a rom.
https://www.msx.org/forum/msx-talk/software-and-gaming/scree...
The problem is that the BMP2HAM encoder, depending on which image, generates corruptions.
Apart from the dithering problem.

By inchl

Resident (33)

inchl's picture

13-08-2020, 18:19

I have seen your rom. Very nice! For MMM I have created a scene-builder in C#. It collects all data like gifs, music, sprites etc. and compiles it into one big .dat file (via glass). That program also calculates the palette colors and indexes that need to be updated on each screensplit. After collecting for each screensplit what gfx are displayed in that specific area (area is 512x4) I build a histogram and apply a color quantization (k-means based).

I am unfamiliar with the BMP2HAM encoder, so I cannot help you on that. What kind of corruption do you get? One of the problems I ran into is to determine the best starting palette for the image. The best solution I found was to combine the histograms of the first N screensplits. Start with N = 1 and increase until the quantization contains at least (after conversion to msx colors) 16 unique colors.

By Manel46

Hero (591)

Manel46's picture

13-08-2020, 19:17

Thank you very much for your explanations.
Unfortunately I can't program for PC.
I link HAM image in my Google Drive, with the corruptions that it said. With ViewMSX, these files are displayed well. The color counter reports that there are 212.
Depending on which bmp, it comes out perfect.
It would be great to have this improved utility.
https://drive.google.com/file/d/1ElsJ33A3jPE0ckPksSLeL6aOzzG...

By inchl

Resident (33)

inchl's picture

14-08-2020, 09:13

Can you provide a link to the original image and one of the msx version (screenshot). I am curious about the difference between algorithms being used.

By Manel46

Hero (591)

Manel46's picture

14-08-2020, 11:46

The result in the rom is the same as in the HAM file.
In the folder are included the 4 starting bmp's and the rom with these images.
Note that the first 3 have problems, but the fourth is perfect.
Perhaps this is off the topic of this thread. If you want to try more things we can do it via email. The address appears on my profile.
https://drive.google.com/file/d/1Us1THs25iwb8GkShueim_6etb1J...

By Manel46

Hero (591)

Manel46's picture

14-08-2020, 15:15

It is said that msx2 has a lot to investigate.
Well, go ahead!
This is one thing. But there are many more ...
Overscand is a great thing, but what about real hardware?
It depends on the monitor / TV.
I think this innovation to get more colors on interlaced screen7, should focus on interlaced images of 512x424

By inchl

Resident (33)

inchl's picture

14-08-2020, 19:34

Manel46 wrote:

Note that the first 3 have problems, but the fourth is perfect.

I think it has something to do with the fact that only two (or three) colors are having their palette being updated, while that particular image requires more colors to be updated. This is just the limitation of the algorithm I think. You might could try increase the number of scanlines used in the palette analysis. In MMM a default of 8 scanlines are used (2x the size of a screensplit area), but its dynamically increased if the resulting image generates a better result. Note that the use of screensplits reduce the overall game performance. So that's why 'only' 58 are being used in MMM instead of 212 in yours.

I added a download link on our website of all development builds of MMM (zip file will be updated on regular basis). In this download an MMM version using your images is added. The result is less perfect than yours, but that's because the colors of the sprites are evaluated by the algorithm aswell.

https://nopmsx.nl -> development -> MMM-rebooted

Please feel free to contact me by email (see contact page on website).

By Manel46

Hero (591)

Manel46's picture

15-08-2020, 01:39

I understand what you say, this would have to be modified in the bmp2ham.exe.
With the viewer they look the same as in the rom, therefore it is not necessary to modify the loading routine.
I have seen your 4 dsk, with my images.
There is less corruption, but the spots are noticeable due to the lack of dithering.
Images with a lot of detail come out better.

Page 4/4
1 | 2 | 3 |