Linux ASTC encoder

FTDI/Bridgetek EVE2 & EVE3 & EVE4 SPI TFT Series by Matrix Orbital

Moderator: Mods

Post Reply
rascalito
LCD Geek
Posts: 38
Joined: Sat Apr 18, 2020 11:22 pm

Linux ASTC encoder

Post by rascalito »

Hello!

I have already asked this on Bridgetek's forum, but it might be better to ask
actual users. And beside this, it takes ages to get my posts approved for publication.

Here is what I did:
As using bitmap (astc encoding) is a pain where you know, especially keeping track
of all the bitmaps you use, their place in flash, etc... I have tried to make it easier
to use, and now the whole process of adding bitmaps can be summarized in 3 steps:
- Prepare the bitmaps in PNG format or whatever else with your favorite editor
- Transform all the bitmaps with EVE asset builder
- Run a php script which produces:
1. One .c / .h pair for every bitmap
2. One BitmapList.h / .c which is a structure list of all the bitmaps used in the
program. Each structure item contains the name of the bitmap, width, height,
size, place in the FLASH (from 0x801000)

As for the EVE library:
- It checks if there are some changes with the bitmaps already stored and stores
the whole set if there was any change.
- It can search the bitmap by name, and now writing a bitmap needs only 2 parameters,
one screen location and one bitmap info structure.

Now the problem:
I'm developing this on Linux. If I first convert the files using asset builder on Windows, then it works fine.
IMG_0382.png
IMG_0382.png (183.04 KiB) Viewed 5813 times
As Linux (Ubuntu) has an astcenc program which produces astc files, it would be nice to use it
and skip one step, starting from regular PNG files and converting them to .astc first, and then to
a .c, .h pair.
The format of these files is a bit similar to EVE asset builder format, there is a 16-byte header before the raw
data, which can be removed by reading the whole file from byte 16.
However, the output looks a bit scrambled although not completely random, so I suppose it's a matter of
using the right parameters.
IMG_0383.png
IMG_0383.png (202.5 KiB) Viewed 5813 times
Question:
Does anybody know detail about EVE astc format? Especially why it's different to
Linux' format?
Has anybody managed to use Linux' astcenc application to display bitmaps with EVE screen?

Thanks for any hint!

R

Ray
Matrix Orbital
Matrix Orbital
Posts: 742
Joined: Thu Dec 13, 2001 4:00 pm
Location: Earth.... I think..
Contact:

Re: Linux ASTC encoder

Post by Ray »

The format is a little different, it requires a specific block order, you can find some details and a conversion script on the bridgetek forums over at

http://www.brtcommunity.com/index.php?t ... 108#msg108

Post Reply