Convert BMX files to SPRITE
Posted: Tue Jul 30, 2024 7:55 am
The included example program is another BMX file viewer. But it runs in Hi-Res mode.
It will first load the BMX into VRAM and then "carve it up" into a series of Sprites.
These are first saved into seperate files then concatenated into a BMX.SPRITES file.
A BMX.SPRITES.PAL file is also created.
The image is then loaded and displayed and the individual temporary files and folder are deleted.
On subsequent runs if the same BMX file is chosen the BMX.SPRITES file is just loaded and displayed.
This program opens the BMX file everytime, BUT if the BMX.SPRITES file is available then the algorithm DOES NOT require the original BMX file.
This program works best for 240 (or less) color BMX file's created with my convertor: viewtopic.php?p=30702#p30702. It will work with any valid 8 bit BMX file but there is no other provision to preserve the user interface colors if such a BMX is loaded. BMX files created with my convertor will preserve the VERA text palette.
HERES THE CODE:
New version with optimized "GrabSprite" Machine Language Helper
Old version using general purpose BASIC BITBLT routine
ANIMATED GIF (optimized version)
It will first load the BMX into VRAM and then "carve it up" into a series of Sprites.
These are first saved into seperate files then concatenated into a BMX.SPRITES file.
A BMX.SPRITES.PAL file is also created.
The image is then loaded and displayed and the individual temporary files and folder are deleted.
On subsequent runs if the same BMX file is chosen the BMX.SPRITES file is just loaded and displayed.
This program opens the BMX file everytime, BUT if the BMX.SPRITES file is available then the algorithm DOES NOT require the original BMX file.
This program works best for 240 (or less) color BMX file's created with my convertor: viewtopic.php?p=30702#p30702. It will work with any valid 8 bit BMX file but there is no other provision to preserve the user interface colors if such a BMX is loaded. BMX files created with my convertor will preserve the VERA text palette.
HERES THE CODE:
New version with optimized "GrabSprite" Machine Language Helper
Old version using general purpose BASIC BITBLT routine
ANIMATED GIF (optimized version)