Create a bin from bmp 320x240 and create a bmx

All aspects of programming on the Commander X16.
Post Reply
funkheld
Posts: 322
Joined: Mon Feb 26, 2024 11:11 am

Create a bin from bmp 320x240 and create a bmx

Post by funkheld »

Create a bin from bmp 320x240 to load.
How does that work please?

How do you create a bmx from a bmp 320x240?
how is the bmx loaded into basic?

Thanks.
greeting


10 VLOAD "TEST.BIN",8,0,0
20 POKE $9F2A,64
30 POKE $9F2B,64
40 POKE $9F34,%00011111
50 POKE $9F35,0
60 POKE $9F36,0
User avatar
desertfish
Posts: 1098
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Re: Create a bin from bmp 320x240 and create a bmx

Post by desertfish »

Here's one tool that might be able to do it:
viewtopic.php?t=6992

I know someone on the discord made a C program to do roughly the same, and I have a Python script lying around that can do it as well but it has to be cleaned up first to be generally usable.

In the meantime, there's also PAINT that you can use to draw images and save them in BMX format directly on the X16 itself: viewtopic.php?t=6931
User avatar
ahenry3068
Posts: 1146
Joined: Tue Apr 04, 2023 9:57 pm

Re: Create a bin from bmp 320x240 and create a bmx

Post by ahenry3068 »

If you want to use BMX then my convertor is the right one. (the one Desertfish linked above). BMX is a bit more complicated to load but has all the image info in one file. (There is example code under Downloads-->Graphics Apps.)

The BIN format is a raw image and is just pixel bytes. It contains no Palette info or Width or Height Info. You have to know those from other sources. If a seperate palette is required you need another file to hold the palette. These are very easy to code for though if you know all the information. You just copy them straight to VERA Ram.

To create BIN files I use Jestin's very capable GIMP VERA Plugin. https://github.com/jestin/gimp-vera-tileset-plugin

When combined with the GIMP Video Plugin it's even useful to batch convert files for animation purposes. (Ive been doing a bit of that lately, I'm so happy GIMP lets you chain plugins this way, the Video plugin originally had nothing to do with the X16)
funkheld
Posts: 322
Joined: Mon Feb 26, 2024 11:11 am

Re: Create a bin from bmp 320x240 and create a bmx

Post by funkheld »

Hello, thank you for your help with the description.

I'll see which format I use.

Thanks.
greeting
Post Reply