Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Note that what I just replied was only to clarify the actual problem's nature.

Of course ZXPiixelPaste should allow to access the full 9 bits colours range and generate a relevant 8 bits palette out of the selected ones, which is great.

I suppose the nxi loader will create the correct palette in turn from the data in the nxi file... At least each colours should be converted into 8 bit indexes, unlike BMP files that stay coded in 24 bits despite simply limitating the number of colours to 256. :p 

The bmp format, howevern is quite user friendly. Every important information such as the picture dimension and palette length are stored at fixed locations in the file, the palette comes first, then the pixels, and special filler bytes are used for odd numbers of pixels, so the internal layout is quite simple and straightforward.

A universal (I mean for other resolutions than Layer 2,1 only) bmp loader project can actually be written in Next BASIC using its powerful file manipulation commands allowing to extract any block of bytes from any file. :) 

In fact, until I've managed to understand how they're called from machine code, it will be simpler to use them from Next BASIC to parse the file header and load the data, before passing the actual conversion and display work to machine code... ^_^