Loading a bitmap straight in without conversion

Страница 1/2
| 2

By Daemos

Paragon (2044)

Аватар пользователя Daemos

27-01-2011, 14:37

I have been thinking and experimenting some time with the bitmap format and these are my findings. If it is possible to do what I think it is it just might be very usefull. Just tell me what you think about my premature theory.

-The bitmap can be indexed to 16 colors with any photo editor program. This could be gimp or photoshop. By injecting the MSX 16 color bitmap pallete into the program the picture can be drawn or even converted from another picture without any problems.

-The file formed after saving the indexed bitmap is a per pixel based file format that first contains the pallete code which can be skipped (add hl,x) and then contains a 4bit per pixel matrix. Thus two dots per byte. I have tested this by changing values in the HEX editor and monitor the changes in a live image viewer.

-The bitmap is saved from left to right and then down to up. Loading the file could be done by loading in increments of the adress pointer but the VDP must be told to start on the lower part of the screen and work upwards (I believe that such a thing is possible)

-However I do not know if the number of each value is in order. By that i mean 0=black 1=blue etc. Changing the values of the bitmap shows double colors and unexpected results on PC have not been able to try this on MSX because I still lack some skill.

I might be reinventing the wheel here and I am aware of the converters. However this could be a feasable method of for example making the artwork and tilemaps on the PC and then simply shoot them straight into the program as a bitmap on MSX. Has anyone allready tried this? What where the results? Or am I thinking like a mess right now?

Для того, чтобы оставить комментарий, необходимо регистрация или !login

By Huey

Prophet (2694)

Аватар пользователя Huey

27-01-2011, 14:52

Shouldn't be a real problem. The bitmap format is quite straight format. It's even easier if you limit the image to a specific format (eg.16 colors, 256 x 212).

But I can imagine for speed and space sake you would convert/compress the data to a more optimized format for your programs.
I use BMP all the way for making gfx (tiles, screens and sprites). Depending on the desired output I run it through one of my converters.

By Daemos

Paragon (2044)

Аватар пользователя Daemos

27-01-2011, 15:00

I can take that as a solid: "yes that works, it is tested, you are reinveting the wheel, but you are not thinking as a mess right now" Smile

Thanks for clearing up. Time to try things out.

By NYYRIKKI

Enlighted (6016)

Аватар пользователя NYYRIKKI

27-01-2011, 16:56

Yep, done that. (but not anymore, because it's useless) There exists also BMP loaders for MSX (and JPG and GIF)

Modern graphic software usually has possibility to output RAW-data that is even more easy... but still too hard... as you can just copy/paste your stuff to BMP2MSX. If the image is already in correct format, then this will not affect image quality (just file format change) and you even have the possibility to order colors just like you wish without headache.

Your idea was a good method 10-20 years ago Smile

By Daemos

Paragon (2044)

Аватар пользователя Daemos

27-01-2011, 20:24

hahahah lol I knew I was reinventing the wheel. So what is the new standard today? Is that .SC5 ? Since I got a tool here that can draw and save in that format I guess something like that is mostly used for such matters. bmp2msx saves in sc5 too right?

By NYYRIKKI

Enlighted (6016)

Аватар пользователя NYYRIKKI

27-01-2011, 21:05

SC5 is a RAW format that includes the 7 byte header so, that you can load the picture in BASIC:

Example:
10 SCREEN 5
20 BLOAD"PICTURE.SC5",S
30 COLOR=RESTORE
40 A$=INPUT$(1)

BMP2MSX can convert pictures to SCREEN 2/4, 3, 5, 6, 7, 8, 10/11 and 12. You can also export palette as separate file.

There are also lots of other tools available for download... If you don't want to download any tool you may like to test this online tool:
http://msx.jannone.org/conv/

By ARTRAG

Enlighted (6923)

Аватар пользователя ARTRAG

27-01-2011, 22:50

Yep, done that. (but not anymore, because it's useless) There exists also BMP loaders for MSX (and JPG and GIF)

Modern graphic software usually has possibility to output RAW-data that is even more easy... but still too hard... as you can just copy/paste your stuff to BMP2MSX. If the image is already in correct format, then this will not affect image quality (just file format change) and you even have the possibility to order colors just like you wish without headache.

Your idea was a good method 10-20 years ago Smile

Hi! Where can I find sources for BMP/JPG/GIF loaders for MSX ?

By NYYRIKKI

Enlighted (6016)

Аватар пользователя NYYRIKKI

27-01-2011, 23:36

No idea... I know only the binarys...

By ARTRAG

Enlighted (6923)

Аватар пользователя ARTRAG

28-01-2011, 00:22

where can i find them?

By Daemos

Paragon (2044)

Аватар пользователя Daemos

28-01-2011, 01:22


SC5 is a RAW format that includes the 7 byte header so, that you can load the picture in BASIC:

Can I somehow make a basic call from my program that loads the file into the ram or is that only possible with a msxdos call?

Страница 1/2
| 2